[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1093) s:selectItems noSelectionLabel issue w/JSF 1.2

Pete Muir (JIRA) jira-events at lists.jboss.org
Thu Mar 22 19:02:40 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBSEAM-1093?page=comments#action_12357092 ] 
            
Pete Muir commented on JBSEAM-1093:
-----------------------------------

Thanks, that information is invaluable.  The priorities are correct, but the order of the chain is wrong (there is an optimisation in there to only sort the chain into priority order if it is dirty).  I've committed a change to CVS which *might* help.  Can you test it for me?  If it doesn't help, can you try this patch, and tell me if it fixes the problem:

### Eclipse Workspace Patch 1.0
#P jboss-seam
Index: src/ui/org/jboss/seam/ui/ConverterChain.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/ui/org/jboss/seam/ui/ConverterChain.java,v
retrieving revision 1.8
diff -u -r1.8 ConverterChain.java
--- src/ui/org/jboss/seam/ui/ConverterChain.java	22 Mar 2007 22:56:40 -0000	1.8
+++ src/ui/org/jboss/seam/ui/ConverterChain.java	22 Mar 2007 22:58:55 -0000
@@ -206,10 +206,7 @@
 
    private List<PrioritizableConverter> getConverters()
    {
-      if (dirty)
-      {
-         Collections.sort(converters);
-      }
+      Collections.sort(converters);
       return converters;
    }

Thanks :)

> s:selectItems noSelectionLabel issue w/JSF 1.2
> ----------------------------------------------
>
>                 Key: JBSEAM-1093
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1093
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: JSF
>    Affects Versions: 1.2.0.GA
>         Environment: Latest Seam version.  JSF 1.2, Facelets, JBoss 4.0.5 on OS X 10.4.9.  
>            Reporter: Stuart Robertson
>         Assigned To: Pete Muir
>
> <h:selectOneMenu value="#{criteria.operation}">
> 	<s:selectItems value="#{itemSearch.operations}" var="operation"
> 		label="#{operation.description}"
> 		noSelectionLabel="Select operation..."
> 		hideNoSelectionLabel="false" />
> 	<s:convertEnum />
> </h:selectOneMenu>
> produces the following exception:
> Caused by: java.lang.IllegalArgumentException: No enum const class com.fb.core.model.cdm.CdmField.Se
> lect search field...
> 	at java.lang.Enum.valueOf(Enum.java:192)
> 	at org.jboss.seam.ui.EnumConverter.getAsObject(EnumConverter.java:16)
> 	at org.jboss.seam.ui.PrioritizableConverter.getAsObject(PrioritizableConverter.java:61)
> 	at org.jboss.seam.ui.ConverterChain.getAsObject(ConverterChain.java:103)
> 	at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRender
> er.java:152)
> 	at com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectOneValue(MenuRenderer.java:197)
> 	at com.sun.faces.renderkit.html_basic.MenuRenderer.getConvertedValue(MenuRenderer.java:359)
> 	at javax.faces.component.UIInput.getConvertedValue(UIInput.java:934)
> This worked fine before I upgraded to JSF 1.2 (tonight) - though I also upgraded to the latest Seam at the same time. 
> The problem is that the noSelectionLabel is being interpreted as a legitimate selection, rather than being, well, an indicator nothing was selected. 
> The converter is being asked to convert the noSelection value back into an enum. 

-- 
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