I am referring to getting a definition of a layout and a strategy for a "widget"
to display, you may have a different strategy in different mode or a fit to size strategy.
I am using the term widget to unerdline another point of choosing the correct granularity
to decide whether or not a widget fit in a portlet or a portlet display several widgets.
There are 4 questions: what is a layout, choosing a layout, distribute widgets and where
to implement a strategy.
I found the YUI approach of a layout very simple and fluid. It's what they call
"grid". Put it with my abstract words, it 's controlling by width. The
document generally control the total width (define header, main, footer and a left or
right margin), a grid is a recursive definition of blocks ("lines") divided in
columns. Of course you can customize things but they provide pattern of divisions : 1//2,
1/2 or 1/3,1/3,1/3 or 1/3,2/3 or 2/3,1/3 or 1/4,3/4 or 3/4,1/4. It's all controlled by
CSS and play it simple and easy. A layout stay a jsp file as defined by Portal and to
associate a portlet instance to a block, simply put the <p:region> tag into it.
Now, because it is controlled by width you run into this problem when a portlet renders
differently in different modes. You need to have a strategy as choosing one size for all
mode is inconvenient. Actually it is already what JBP is doing in the layouts.xml file
when the URI has the attribute "state=maximized" to associate a layout to a
window state. Where to control the layout should be in the event listener : when a portlet
turns into EDIT mode change layout to give it more space if needed. If changing layout is
necessary, it is not sufficient, you also need to put it on spot. Actually that what JBP
does with the region "maximized" in the maximized.jsp layout.
Actually, with no new concept and minimal changes you can do a lot and let it all to the
application to implement a strategy.
Is that better?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4101701#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...