[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-3059) <s:selectItems> doesn't retain selected value

infinity2heaven (JIRA) jira-events at lists.jboss.org
Sun Jun 1 16:58:45 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBSEAM-3059?page=all ]

infinity2heaven updated JBSEAM-3059:
------------------------------------

    Description: 
Currently there is no way to select a particular item by default using <s:selectItems>. 

Example used in facelet
<h:selectOneMenu id="fof" value="#{selectedFoo}">    
  <s:selectItems value="#{foosQuery.resultList}" var="foo" label="#{foo.name}"/>
  <s:convertEntity/>                    
</h:selectOneMenu>

It's assumed that the html attribute 
"selected" in <option="foo" selected> would be automatically identified by <s:selectItems> depending on the bound value in 
<h:selectOneMenu id="fof" value="#{selectedFoo}">   but that doesn't work.

selectedFoo, however is printing the correct value but the selection doesn't retain.

If there is way to do this, either the reference doc should be updated on how to do this.
(HTML reference or for instance, Spring MVC's similar implementation documents it clearly and it works perfectly.
http://static.springframework.org/spring/docs/2.0.x/reference/spring-form.tld.html#spring-form.tld.option)

Otherwise, this is possibly a bug.

Other info:-
The property Foo has been overridden with hashcode() and equals().



  was:
Currently there is no way to select a particular item by default using <s:selectItems>. 

Example used in facelet
<h:selectOneMenu id="fof" value="#{selectedFoo}">    
  <s:selectItems value="#{foosQuery.resultList}" var="foo" label="#{foo.name}"/>
  <s:convertEntity/>                    
</h:selectOneMenu>

It's assumed that the html attribute 
"selected" in <option="foo" selected> would be automatically identified by <s:selectItems> depending on the bound value in 
<h:selectOneMenu id="fof" value="#{selectedFoo}">   but that doesn't work.

selectedFoo, however is printing the correct value but the selection doesn't retain.

If there is way to do this, either the reference doc should be updated on how to do this.
(HTML reference or for instance, Spring MVC's similar implementation documents it clearly and it works perfectly.
http://static.springframework.org/spring/docs/2.0.x/reference/spring-form.tld.html#spring-form.tld.option)

Otherwise, this is possibly a bug.





> <s:selectItems> doesn't retain selected value
> ---------------------------------------------
>
>                 Key: JBSEAM-3059
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-3059
>             Project: Seam
>          Issue Type: Bug
>          Components: JSF Controls
>    Affects Versions: 2.0.1.GA, 2.0.2.GA, 2.0.2.SP1
>         Environment: Windows XP SP2, JBoss 4,2,1
>            Reporter: infinity2heaven
>            Priority: Minor
>
> Currently there is no way to select a particular item by default using <s:selectItems>. 
> Example used in facelet
> <h:selectOneMenu id="fof" value="#{selectedFoo}">    
>   <s:selectItems value="#{foosQuery.resultList}" var="foo" label="#{foo.name}"/>
>   <s:convertEntity/>                    
> </h:selectOneMenu>
> It's assumed that the html attribute 
> "selected" in <option="foo" selected> would be automatically identified by <s:selectItems> depending on the bound value in 
> <h:selectOneMenu id="fof" value="#{selectedFoo}">   but that doesn't work.
> selectedFoo, however is printing the correct value but the selection doesn't retain.
> If there is way to do this, either the reference doc should be updated on how to do this.
> (HTML reference or for instance, Spring MVC's similar implementation documents it clearly and it works perfectly.
> http://static.springframework.org/spring/docs/2.0.x/reference/spring-form.tld.html#spring-form.tld.option)
> Otherwise, this is possibly a bug.
> Other info:-
> The property Foo has been overridden with hashcode() and equals().

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list