This content has been marked as final.
Show 2 replies
-
1. Re: selectItems
gimpy21 Apr 18, 2008 6:36 PM (in response to kooudy)Download the Seam package from jboss.com. Unzip it and go into the lib directory. Copy jboss-seam-ui.jar to your project lib directory. Below is an example of how to use it with Facelets.
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j"> <h:selectOneMenu value="#{testBean.selectedName}"> <s:selectItems value="#{testBean.names}" var="name" label="#{name}"/> </h:selectOneMenu>
The testBean in this example returns a List<String> but can technically return a collection of anything. If it is something else, you will need to specify an entity converter. Hope that helps. This is all based on me using Seam 2.0.X.GA.
-
2. Re: selectItems
kooudy Apr 19, 2008 10:56 AM (in response to kooudy)OK, in version 2.x.x there is no need to include another jar (selectItems.jar for si:selectItems, entityconverter for ec:convertEntity), but what about versions 1.1.6 and earlier and what about 1.2.x)?