Details
-
Type: Improvement
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 1.8.2
-
Fix Version/s: None
-
Component/s: ICE-Components
-
Labels:None
-
Environment:WebSphere Application Server 6.1, Java 1.5 (IBM J9), AIX / Tomcat 5.5, Java 1.5.0_21 (SUN), Windows
-
ICEsoft Forum Reference:
-
Affects:Documentation (User Guide, Ref. Guide, etc.)
-
Community Contribution:Yes
Description
Currently <ice:panelSeries> 'stamps' its contents as if it were a table with only one column (ie http://wiki.icefaces.org/display/ICE/Panel+Series). There are, however, people interested on showing its children as if it were a table with 'n' columns, as if it where a PanelGrid. Although the IceFaces component showcase shows a 2 column PanelSeries, this is achieved through css, through the 'align' attribute, so only two columns can be obtained.
The icefaces forum reference attached to this issue proposes using a <ui:repeat> component inside an <ice:panelGrid>, but this approach doesn't work as the <ice:panelGrid> considers the <ui:repeat>.
Using a <c:forEach> is not an option either since its children cannot 'see' the value of 'var', as 'var' only exists while the view is being created. This issue is discussed here: http://www.ninthavenue.com.au/blog/c:foreach-vs-ui:repeat-in-facelets
The solution would be to modify PanelSeriesRenderer so it uses a table with n columns instead of a div for rendering its components, effectively making it a mix of the current PanelSeriesRenderer and GridRenderer classes, then adding a "cols" attribute to PanelSeries.
Additionaly, a new "layout" attribute (grid | group) could be added to PanelSeries so the new PanelSeriesRenderer could fall back to using a div as it is currently done.
The icefaces forum reference attached to this issue proposes using a <ui:repeat> component inside an <ice:panelGrid>, but this approach doesn't work as the <ice:panelGrid> considers the <ui:repeat>.
Using a <c:forEach> is not an option either since its children cannot 'see' the value of 'var', as 'var' only exists while the view is being created. This issue is discussed here: http://www.ninthavenue.com.au/blog/c:foreach-vs-ui:repeat-in-facelets
The solution would be to modify PanelSeriesRenderer so it uses a table with n columns instead of a div for rendering its components, effectively making it a mix of the current PanelSeriesRenderer and GridRenderer classes, then adding a "cols" attribute to PanelSeries.
Additionaly, a new "layout" attribute (grid | group) could be added to PanelSeries so the new PanelSeriesRenderer could fall back to using a div as it is currently done.
Not quite.
What a datatable does is that for each element on a datasource (ie an array, a collection, etc.) it renders a new row.
What panelSeries with a grid layout aims to do is to render those components on a new column; horizontally in other words.
In order to achieve the same with ice:columns you would need to know beforehand the length of the datasource and add ice:columns accordingly, but that wouldn't work well if the datasource varies in length.
Placing the ice:columns inside a c:forEach sounds like a tempting option, but as the first post states, the scope of its variables exists only while the view is created, so the contents of each ice:column would always be empty (null).