You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Dan Tran (JIRA)" <de...@myfaces.apache.org> on 2007/07/23 06:23:31 UTC
[jira] Created: (MYFACES-1684) myface 1.2 cant handle enum type
myface 1.2 cant handle enum type
--------------------------------
Key: MYFACES-1684
URL: https://issues.apache.org/jira/browse/MYFACES-1684
Project: MyFaces Core
Issue Type: Bug
Affects Versions: 1.2.1-SNAPSHOT
Environment: xp
Reporter: Dan Tran
Fix For: 1.2.1-SNAPSHOT
I switch my jsf 1.2 from ri to myfaces 1.2.0 and run in this issue
java.lang.IllegalArgumentException: Value is no String (class=com.iplocks.model.domain.target.DatabaseType, value=DB27) and component databaseSearchForm:j_id25with path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /database/search.xhtml][Class: javax.faces.component.html.HtmlForm,Id: databaseSearchForm][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id22][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id23][Class: javax.faces.component.html.HtmlSelectOneMenu,Id: j_id25]} does not have a Converter
org.apache.myfaces.shared_impl.renderkit.RendererUtils.getConvertedStringValue(RendererUtils.java:560)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (MYFACES-1684) myface 1.2 cant handle enum type
Posted by "Dan Tran (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-1684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Tran reopened MYFACES-1684:
-------------------------------
Just tried 1.2.1-SNAPSHOT build on 7/27/2007, the issue remains
> myface 1.2 cant handle enum type
> --------------------------------
>
> Key: MYFACES-1684
> URL: https://issues.apache.org/jira/browse/MYFACES-1684
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 1.2.1-SNAPSHOT
> Environment: xp
> Reporter: Dan Tran
> Assignee: Matthias Weßendorf
> Fix For: 1.2.1-SNAPSHOT
>
>
> I switch my jsf 1.2 from ri to myfaces 1.2.0 and run in this issue
> java.lang.IllegalArgumentException: Value is no String (class=com.iplocks.model.domain.target.DatabaseType, value=DB27) and component databaseSearchForm:j_id25with path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /database/search.xhtml][Class: javax.faces.component.html.HtmlForm,Id: databaseSearchForm][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id22][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id23][Class: javax.faces.component.html.HtmlSelectOneMenu,Id: j_id25]} does not have a Converter
> org.apache.myfaces.shared_impl.renderkit.RendererUtils.getConvertedStringValue(RendererUtils.java:560)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (MYFACES-1684) myface 1.2 cant handle enum type
Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-1684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Marinschek updated MYFACES-1684:
---------------------------------------
Resolution: Fixed
Assignee: Martin Marinschek (was: Matthias Weßendorf)
Status: Resolved (was: Patch Available)
thanks to Achim Hügen and Michael Kurz for providing patches. Special thanks for providing tests as well. I love patches like this!
regards,
Martin
> myface 1.2 cant handle enum type
> --------------------------------
>
> Key: MYFACES-1684
> URL: https://issues.apache.org/jira/browse/MYFACES-1684
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 1.2.1-SNAPSHOT
> Environment: xp
> Reporter: Dan Tran
> Assignee: Martin Marinschek
> Fix For: 1.2.1-SNAPSHOT
>
> Attachments: myfaces-api-1684.patch, myfaces-impl-1684.patch, myfaces1684-patch-new.zip
>
>
> I switch my jsf 1.2 from ri to myfaces 1.2.0 and run in this issue
> java.lang.IllegalArgumentException: Value is no String (class=com.iplocks.model.domain.target.DatabaseType, value=DB27) and component databaseSearchForm:j_id25with path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /database/search.xhtml][Class: javax.faces.component.html.HtmlForm,Id: databaseSearchForm][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id22][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id23][Class: javax.faces.component.html.HtmlSelectOneMenu,Id: j_id25]} does not have a Converter
> org.apache.myfaces.shared_impl.renderkit.RendererUtils.getConvertedStringValue(RendererUtils.java:560)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (MYFACES-1684) myface 1.2 cant handle enum type
Posted by "Michael Kurz (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-1684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Kurz updated MYFACES-1684:
----------------------------------
Status: Patch Available (was: Reopened)
> myface 1.2 cant handle enum type
> --------------------------------
>
> Key: MYFACES-1684
> URL: https://issues.apache.org/jira/browse/MYFACES-1684
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 1.2.1-SNAPSHOT
> Environment: xp
> Reporter: Dan Tran
> Assignee: Matthias Weßendorf
> Fix For: 1.2.1-SNAPSHOT
>
> Attachments: myfaces-api-1684.patch, myfaces-impl-1684.patch
>
>
> I switch my jsf 1.2 from ri to myfaces 1.2.0 and run in this issue
> java.lang.IllegalArgumentException: Value is no String (class=com.iplocks.model.domain.target.DatabaseType, value=DB27) and component databaseSearchForm:j_id25with path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /database/search.xhtml][Class: javax.faces.component.html.HtmlForm,Id: databaseSearchForm][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id22][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id23][Class: javax.faces.component.html.HtmlSelectOneMenu,Id: j_id25]} does not have a Converter
> org.apache.myfaces.shared_impl.renderkit.RendererUtils.getConvertedStringValue(RendererUtils.java:560)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (MYFACES-1684) myface 1.2 cant handle enum type
Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-1684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthias Weßendorf resolved MYFACES-1684.
-----------------------------------------
Resolution: Fixed
fixed, please check out the 1.2.1-branch and check your app
> myface 1.2 cant handle enum type
> --------------------------------
>
> Key: MYFACES-1684
> URL: https://issues.apache.org/jira/browse/MYFACES-1684
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 1.2.1-SNAPSHOT
> Environment: xp
> Reporter: Dan Tran
> Assignee: Matthias Weßendorf
> Fix For: 1.2.1-SNAPSHOT
>
>
> I switch my jsf 1.2 from ri to myfaces 1.2.0 and run in this issue
> java.lang.IllegalArgumentException: Value is no String (class=com.iplocks.model.domain.target.DatabaseType, value=DB27) and component databaseSearchForm:j_id25with path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /database/search.xhtml][Class: javax.faces.component.html.HtmlForm,Id: databaseSearchForm][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id22][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id23][Class: javax.faces.component.html.HtmlSelectOneMenu,Id: j_id25]} does not have a Converter
> org.apache.myfaces.shared_impl.renderkit.RendererUtils.getConvertedStringValue(RendererUtils.java:560)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-1684) myface 1.2 cant handle enum type
Posted by "Achim Hügen (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-1684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521405 ]
Achim Hügen commented on MYFACES-1684:
--------------------------------------
The reason is that the EnumConverter gets java.lang.Enum handed in as targetClass parameter, while it expects the concrete enum type (like MyEnum for example). It throws an IllegalargumentException which is swallowed by ApplicationImpl.internalCreateConverter.
Instead a a new instance of EnumConverter is created using the noargs constructor. This results in an NPE when calling EnumConverter#getAsString later.
IMHO these changes must be done:
- fix internalCreateConverter so that it handles Enums correctly
- fix the exception handling of internalCreateConverter: there is no reason to catch any exception thrown by the constructor of a converter. And the conclusion of such an exception is _not_ that the constructor doesnt't exist in any case
- fix EnumConverter: it should check for targetClass == null in getAsString, since a no-args constructor is required by the spec
I will attach a patch soon.
> myface 1.2 cant handle enum type
> --------------------------------
>
> Key: MYFACES-1684
> URL: https://issues.apache.org/jira/browse/MYFACES-1684
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 1.2.1-SNAPSHOT
> Environment: xp
> Reporter: Dan Tran
> Assignee: Matthias Weßendorf
> Fix For: 1.2.1-SNAPSHOT
>
>
> I switch my jsf 1.2 from ri to myfaces 1.2.0 and run in this issue
> java.lang.IllegalArgumentException: Value is no String (class=com.iplocks.model.domain.target.DatabaseType, value=DB27) and component databaseSearchForm:j_id25with path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /database/search.xhtml][Class: javax.faces.component.html.HtmlForm,Id: databaseSearchForm][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id22][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id23][Class: javax.faces.component.html.HtmlSelectOneMenu,Id: j_id25]} does not have a Converter
> org.apache.myfaces.shared_impl.renderkit.RendererUtils.getConvertedStringValue(RendererUtils.java:560)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.