• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to retrieve all the elements created by ui repeat in backing bean

 
alex dethose
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
I have a list which mantains information for the ui repeat to create either drop down or text box

i would like to retieve all the components created by ui:repeat tag in the backing bean
does any one has a solution for this
This is my jsf code
<div id="homeQuoteCvg">

<ui:repeat value="#{quoteBean.homeCoverageContainer.homePolicyCoverageInfo.basicCvgInfoList}" var="cvgInfo"> <p id="personalliabilityTRbasic">
<LABEL> <SPAN style="WIDTH: 150px" class="Inline">
<hutputText style="cursor: pointer; color: #4aa6ef;" value="#{cvgInfo.cvgDescAbbrv}"/>
</SPAN> <div id="#{cvgInfo.coverageTypeCode}" > <h:selectOneMenu title="#{cvgInfo.coverageTypeCode}" style="backgroundColor : white" value="#{cvgInfo.selectedSeqNum}"
onchange="alert();tabValueChange();"
rendered="#{cvgInfo.cvgAmtUnitCd=='05'}" >
<f:selectItems value="#{cvgInfo.coverageItemList}" />
</h:selectOneMenu>
<hutputText name="cvgCode"
value="#{cvgInfo.selectedAmount}" rendered="#{cvgInfo.cvgAmtUnitCd=='06'}" >
</hutputText>
</div>
</LABEL>
</p>
</ui:repeat> <p>
thanks
alex.
 
suresh dasari
Ranch Hand
Posts: 121
Chrome Eclipse IDE Mac
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

now I am facing the same problem, if any one has the solution that would be more helpfull.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17646
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Alex!

There's a "Code" button in the message editor that helps make stuff like what you did more readable.

Rather than use ui:repeat, it looks like you should use a dataTable:


The less raw HTML in a JSF View, the better. I usually use either a 1-column panelGrid or something like RichFaces panel control where you used div, BTW. Or, since the dataTable is itself a block element, I could have just attached the "id=" attribute to the dataTable directly.

Note also that I moved all the style info into column classes. That makes it easier to "skin" the View
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic