selectItem « Facelets « JSF Q&A

Home
JSF Q&A
1.API
2.Bean
3.Component
4.Control
5.Data
6.database
7.Datatable
8.Development
9.Exception
10.Facelets
11.Form
12.Glassfish
13.HTML
14.IceFaces
15.Internationalization
16.JPA
17.JSP
18.MyFaces
19.openfaces
20.Page
21.Portlet
22.PrimeFaces
23.RichFaces
24.Seam
25.Security
26.Servlet
27.Session
28.Tag
29.Test
30.Tomcat
31.validation
32.Web Service
JSF Q&A » Facelets » selectItem 

1. Two collections in f:selectItems - possible?    stackoverflow.com

I have two vectors:

private Vector<City> allCities;
private Vector<Address> allAddresses;
A City-object contains a cityId, postcode and cityname, an Address-object an addressId, street and cityId. Vector allCities can contain more Cities than used by ...

2. Reducing size of HTML output by sharing f:selectItems between h:selectOneMenu?    stackoverflow.com

Got a page with ui:repeat bound to a list collection like below:

<ui:repeat value="#{myBean.products}" var="product">
    ....
    ....
    <h:selectOneMenu id="type" required="true" value="#{product.category}">
   ...

3. JSF 2 not recognizing itemLabel and itemValue attributes    stackoverflow.com

I have the following dropdown in a Facelets page:

<h:selectOneMenu value="#{contactBean.selectedContact}" converter="#{contactConverter}">
    <f:selectItems value="#{contactsHolder.contacts}" var="contact"
    itemLabel="#{contact.firstName}" itemValue="#{contact}" />
</h:selectOneMenu>
The problem is, no matter what I put in ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.