This content has been marked as final.
Show 6 replies
-
1. Re: Seam 2.0 BETA : convertEntity / SelectOneMenu problem
vincent.latombe Aug 20, 2007 4:56 AM (in response to vwiencek)try to replace
value="#{selectedCity}"
withvalue="#{register.selectedCity}"
.
I think it has to do with scope of your selectedCity variable. -
2. Re: Seam 2.0 BETA : convertEntity / SelectOneMenu problem
vwiencek Aug 20, 2007 5:02 AM (in response to vwiencek)I've already tried to do that. But if I want to use register.selectedCity, I need to write accessors for the value, and expose them in the interface .... and it doesn't solve my problem ....
-
3. Re: Seam 2.0 BETA : convertEntity / SelectOneMenu problem
vwiencek Aug 20, 2007 5:42 AM (in response to vwiencek)Maybe I can add some details :
* Outjection works : when I set the value into the bean, the correct city is selected into the combobox
* Injection doesn't work : when I change the value of the City, change is persisted when I reload the page, but not injected into the selectedCity of my bean ... -
4. Re: Seam 2.0 BETA : convertEntity / SelectOneMenu problem
pmuir Aug 20, 2007 10:05 AM (in response to vwiencek)Normally you use getters and setters with input controls.
-
5. Re: Seam 2.0 BETA : convertEntity / SelectOneMenu problem
vwiencek Aug 20, 2007 11:47 AM (in response to vwiencek)OK,
now I have in my managed bean :@In(required = false) private City selectedCity; public City getSelectedCity() {return selectedCity;} public void setSelectedCity(City c) {this.selectedCity = c;}
with interfaces declared .....<h:selectOneMenu id="selectCity" value="#{selectedCity}" required="false"> <s:selectItems value="#{register.cities}" var="c" label="#{c.postalCode} - #{c.name}" /> <s:convertEntity /> </h:selectOneMenu>
When I submit my form, seam performes validation, but my selectOneMenu validation fails, and then, values are never submited ..... why a selectOneMenu validation can fail ?
Thanks ..... -
6. Re: Seam 2.0 BETA : convertEntity / SelectOneMenu problem
pmuir Aug 20, 2007 11:56 AM (in response to vwiencek)read the SeamProblemsFAQ on the wiki.