• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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">
<h:outputText 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>
<h:outputText name="cvgCode"
value="#{cvgInfo.selectedAmount}" rendered="#{cvgInfo.cvgAmtUnitCd=='06'}" >
</h:outputText>
</div>
</LABEL>
</p>
</ui:repeat> <p>
thanks
alex.
 
Ranch Hand
Posts: 121
Mac Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

now I am facing the same problem, if any one has the solution that would be more helpfull.
 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic