You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Matt Benson (JIRA)" <de...@myfaces.apache.org> on 2011/08/02 18:37:28 UTC
[jira] [Created] (MYFACES-3256) CommonPropertyUtils assumes all its
managed HTML attributes hold string values
CommonPropertyUtils assumes all its managed HTML attributes hold string values
------------------------------------------------------------------------------
Key: MYFACES-3256
URL: https://issues.apache.org/jira/browse/MYFACES-3256
Project: MyFaces Core
Issue Type: Bug
Affects Versions: 2.0.8-SNAPSHOT, 2.1.2-SNAPSHOT
Reporter: Matt Benson
Priority: Blocker
I encountered the ClassCastException due to Integer vs. String on {{h:input @maxlength}}, which is defined at http://download.oracle.com/docs/cd/E17802_01/j2ee/javaee/javaserverfaces/2.0/docs/pdldocs/facelets/h/inputText.html as {{(must evaluate to int)}}. I would presume the same for {{@size}} ({{int}}) and {{@readonly}} ({{boolean}}). Perhaps naively, it would seem that simply removing the {{String}} cast and using {{Object}} in {{CommonPropertyUtils#renderHtmlStringAttribute()}} (potentially renaming this method in the process) would solve the issue.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (MYFACES-3256) CommonPropertyUtils assumes all
its managed HTML attributes hold string values
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe resolved MYFACES-3256.
-------------------------------------
Resolution: Fixed
Fix Version/s: 2.1.2
2.0.8
Assignee: Leonardo Uribe
The solution is just call the original method from HtmlRendererUtils for all non string properties called from CommonPropertyUtils.
> CommonPropertyUtils assumes all its managed HTML attributes hold string values
> ------------------------------------------------------------------------------
>
> Key: MYFACES-3256
> URL: https://issues.apache.org/jira/browse/MYFACES-3256
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.0.8-SNAPSHOT, 2.1.2-SNAPSHOT
> Reporter: Matt Benson
> Assignee: Leonardo Uribe
> Priority: Blocker
> Fix For: 2.0.8, 2.1.2
>
>
> I encountered the ClassCastException due to Integer vs. String on h:input @maxlength, which is defined at http://download.oracle.com/docs/cd/E17802_01/j2ee/javaee/javaserverfaces/2.0/docs/pdldocs/facelets/h/inputText.html as (must evaluate to int). I would presume the same for @size (int) and @readonly (boolean). Perhaps naively, it would seem that simply removing the String cast and using Object in CommonPropertyUtils#renderHtmlStringAttribute() (potentially renaming this method in the process) would solve the issue.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MYFACES-3256) CommonPropertyUtils assumes all
its managed HTML attributes hold string values
Posted by "Matt Benson (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078302#comment-13078302 ]
Matt Benson commented on MYFACES-3256:
--------------------------------------
Thanks for the quick turnaround, Leo!
> CommonPropertyUtils assumes all its managed HTML attributes hold string values
> ------------------------------------------------------------------------------
>
> Key: MYFACES-3256
> URL: https://issues.apache.org/jira/browse/MYFACES-3256
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.0.8-SNAPSHOT, 2.1.2-SNAPSHOT
> Reporter: Matt Benson
> Assignee: Leonardo Uribe
> Priority: Blocker
> Fix For: 2.0.8, 2.1.2
>
>
> I encountered the ClassCastException due to Integer vs. String on h:input @maxlength, which is defined at http://download.oracle.com/docs/cd/E17802_01/j2ee/javaee/javaserverfaces/2.0/docs/pdldocs/facelets/h/inputText.html as (must evaluate to int). I would presume the same for @size (int) and @readonly (boolean). Perhaps naively, it would seem that simply removing the String cast and using Object in CommonPropertyUtils#renderHtmlStringAttribute() (potentially renaming this method in the process) would solve the issue.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira