Hi,
I can't force s:selectItems to work. Even the easiest example doesn't work.
| Name("personHome")
| public class PersonHome extends EntityHome<Person> {
|
|
|
| public List<SelectItem> countries = new ArrayList();
| public String country = "";
|
| public void setCountries(List<Country> countries) {}
|
| public List<SelectItem> getCountries(){
|
| for(int i=0;i<3;i++){
| countries.add( new SelectItem());
| }
| countries.get(0).setLabel("Great Britain");
| countries.get(0).setValue("GB");
| countries.get(1).setLabel("Germany");
| countries.get(1).setValue("D");
| countries.get(2).setLabel("Italy");
| countries.get(2).setValue("I");
|
| return countries;
| }
| }
|
|
And in xhtml:
| <h:selectOneMenu value="#{personHome.country}" >
| <s:selectItems value="#{personHome.countries}" var="country"
label="#{country.label}" />
| </h:selectOneMenu>
|
|
And then I get error:
Value is no String (class=javax.faces.model.SelectItem, [EMAIL PROTECTED]) and
component person:_id38with path: {Component-Path : [Class:
org.ajax4jsf.framework.ajax.AjaxViewRoot,ViewId:
/specialist/spec_registration.xhtml][Class:
javax.faces.component.html.HtmlForm,Id: person][Class:
org.jboss.seam.ui.UIValidateAll,Id: _id7][Class:
org.jboss.seam.ui.UIDecorate,Id: _id37][Class:
javax.faces.component.html.HtmlSelectOneMenu,Id: _id38]} does not have a
Converter
Everythig is String so what does the error mean?
What am I doing wrong?
Thanks in advance,
jquery
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026764#4026764
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026764
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user