-
1. Re: setWidth on HtmlColumn ignored when showing rich:columns
ilya_shaikovsky May 21, 2010 8:30 AM (in response to quajo)please add code snippets.. it will make investigation easier and much faster.
-
2. Re: setWidth on HtmlColumn ignored when showing rich:columns
quajo May 24, 2010 4:34 AM (in response to ilya_shaikovsky)This is the declaration of the extendedDataTable:
<a4j:form>
<rich:extendedDataTable height="140px"
id="actList" rows="0" var="act" sortMode="single"
binding="#{visBean.tableAct}" value="#{visBean.listaAct}" selection="#{visBean.selection}" styleClass="scroll" enableContextMenu="false">
<a4j:support event="onRowClick" action="#{visBean.buscaSeleccion}"
oncomplete="selectG(data);" data="#{visBean.allElems}" id="clickRowAct" />
<rich:columns width="100px" value="#{visBean.columns}" var="colum" index="index">
<f:facet name="header">
<h:outputText value="#{colum.title}" />
</f:facet>
<h:outputText value="#{act[colum.label]}" />
</rich:columns>
</rich:extendedDataTable>
</a4j:form>and the code in the bean when dynamic columns are created is the following:
HtmlColumn c1 = new HtmlColumn();
c1.setTitle("id");
c1.setLabel("id");c1.setWidth("130px"
columns.add(c1);
HtmlColumn c2 = new HtmlColumn();
c2.setTitle("mp");
c2.setLabel("mp");c2.setWidth("130px");
columns.add(c2);
HtmlColumn c3 = new HtmlColumn();
c3.setTitle("pl");
c3.setLabel("pl");c3.setWidth("70px");
c3.setVisible(false);
columns.add(c3);where columns is declared as: private ArrayList<HtmlColumn> columns = new ArrayList<HtmlColumn>();
and rows is an ArrayList of objects which fields are called: id, mp and pl and they have their respective getters and setters.
According to the previous code c3 shouldn´t be shown but it is. The width isn't updated either.
Thanks.
-
3. Re: setWidth on HtmlColumn ignored when showing rich:columns
nbelaevski May 25, 2010 6:23 AM (in response to quajo)Hi,
rich:columns accept list of objects, not list of UIColumn components. If you want to use list of UIColumn, use c:forEach then.