If you want to stretch a column in a dynamically generated table, then one possibility is to use an EL to fix the component ID to an 'Identifier' that changes per forEach iteration. Please see the below given tag snippet to get a more clear picture on the implementation part.
<af:table rows="#{bindings.DynamicVO.rangeSize}"
fetchSize="#{bindings.DynamicVO.rangeSize}"
emptyText="#{bindings.DynamicVO.viewable ? 'No data to display.' : 'Access Denied.'}"
var="row" rowBandingInterval="0"
columnStretching="column:clmn1"
value="#{bindings.DynamicVO.collectionModel}"
selectedRowKeys="#{bindings.DynamicVO.collectionModel.selectedRow}"
selectionListener="#{bindings.DynamicVO.collectionModel.makeCurrent}"
rowSelection="single" id="t1"
styleClass="AFStretchWidth">
<af:forEach items="#{bindings.DynamicVOIterator.attributeDefs}"
var="def" varStatus="vs">
<af:column headerText="#{def.name}" sortable="true"
sortProperty="#{def.name}"
id="clmn${vs.index}">
<af:inputText value="#{row.bindings[def.name].inputValue}"
maximumLength="#{row.bindings[def.name].hints[def.name].precision}"
id="fld1"/>
</af:column>
</af:forEach>
</af:table>
2 comments:
I have tried with above mentioned snippet for stretching the column for dynamic table it is not working .Can you please let me know need to do something more.
Post a Comment