Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    PortalLayout State

    Hello,

    I want to persist the state of a PortalLayout, and all is good with respect to each Portlet's portal position, that is, I can persist each Portlet's column number, row number, and position within the row.

    However, I am using "setCanResizePortlets(Boolean.TRUE);", which means not all columns and rows have the same width and height. When restoring a PortalLayout, I want to make sure that column/row width and height ratios remain consistent.

    Can you recommend a best practice for this?

    Thanks

    SmartClient Version: v9.1p_2014-06-30/Pro Deployment (built 2014-06-30)
    Last edited by stonebranch2; 3 Jul 2014, 07:55. Reason: Added SmartClient Version

    #2
    The sample for Portal Layout persistence already preserves the user's modifications to row and column sizes. Can you take a look at how your approach differs from the sample?

    Comment


      #3
      Looks like that example is SmartClient not Smart GWT, but from what I can see, the same idea applies. What you're recommending is to embed my PortalLayout within an EditPane and allow the EditPane to provide the state information needed for persisting the PortalLayout state.
      I am currently not embedding my PortalLayout within an EditPane, but I can certainly give that a try. Is my understanding correct?
      Thanks

      Comment


        #4
        Sorry, yes, the same sample exists for SmartGWT.

        This whole set of samples uses the Dashboards & Tools framework, which is part of Enterprise Edition, which you currently don't seem to have.

        However, it handles what you want to do now, as well as probably the next 5 things you might attempt in fleshing out the features that typically appear in a saveable/sharable portal system (see eg the Portal Dashboard sample).

        Comment


          #5
          Understood.

          At this point, the only obstacle I seem to have is dealing with persistence of the state in the case where "setCanResizePortlets(Boolean.TRUE);" and the user has made a size adjustment. Aside from that, what I am doing seems to fit within the features of the Pro release at this time. So I guess the question at this point is, can we handle this specific case on our own with the license we have, specifically, "SmartClient Version: v9.1p_2014-06-30/Pro Deployment (built 2014-06-30)".

          Thanks

          Comment


            #6
            You can start down the path of replicating certain Dashboards & Tools features within Pro, yes. This kind of thing is almost always later revealed to be a very serious mistake, but it's up to you :)

            getColumnWidth() provides the column widths and you can determine the row heights also from the portlets themselves or the "row"/"rowLayout" autoChildren.

            Comment


              #7
              Your point is understood. We will assess our options. Thx.

              Comment

              Working...
              X