If you're new to using <af:iterator>, here are the simple implementation steps to convert <af:table> code to work with <af:iterator> to iterate through the VO rows referred by the table.
1. First, drop your VO which you want to iterate as <af:table> in your jsf page. </af:table>
<af:table value="#{bindings.EmpDeptVO.collectionModel}" var="row" rows="#{bindings.EmpDeptVO.rangeSize}" emptyText="#{bindings.EmpDeptVO.viewable ? 'No data to display.' : 'Access Denied.'}" fetchSize="#{bindings.EmpDeptVO.rangeSize}" rowBandingInterval="0" id="t2" width="100%" contentDelivery="immediate" autoHeightRows="10">
2. Now, drop <af:iterator> from component pallette and specify the values for properties value, rows and var copying from <af:table> that you dropped.
<af:iterator id="i1" value="#{bindings.EmpDeptVO.collectionModel}" var="row" rows="#{bindings.EmpDeptVO.rangeSize}" varStatus="i">
3. Now, copy the attributes from table (which are under each column) into the <af:iterator> (from the sample application, you can see the attributes under af:iterator and af:table are same).
4. Arrange all these attributes in your preferred layout and run the page. That's it. You'll see each VO row data one by one. If you've dropped it as editable fields, you can edit them and Commit (as shown in the sample example).
That's it! Now, you understood how easy it is to implement editable forms using <af:iterator>. The sample output will be like this:
Great post... Helped out alot...
ReplyDeleteAny chance you've used nested iterators for a master/detail relationship?
I've got side by side forms (just read only) however my detail view is the same for all of my master records... Any way to overcome this?
greaaaaaaaaaaaaaaaaaaaaaatt
ReplyDeletewhat is VO stand for?
ReplyDeleteView Object.
DeleteHow managed bean manage this to edit object ?
ReplyDeletebalenciaga shoes
ReplyDeletesupreme clothing
curry 6 shoes
jordan shoes
bape
canada goose jacket
golden goose sneakers
supreme outlet
moncler
off white clothing
jordan sneakers
ReplyDeletelebron 18
birkin bag
yeezy boost
kobe shoes
supreme outlet
air jordan
jordan shoes
kyrie irving shoes
curry 7
7a replica bags meaning linked here e4f91t6e23 replica bags philippines greenhills reference r1m12o0c70 Louis Vuitton replica Bags joy replica bags review replica bags review hermes fake v1q97n1i08 replica bags south africa
ReplyDeletek2l42w8r42 w5l20i0i11 r3s66c5z68 j4u43l6b87 o6w14s6u85 a6w78k9t68
ReplyDelete