[jboss-jira] [JBoss JIRA] Commented: (JBAS-8726) Sample Auction project stopped to work due to argument type mismatch in JSF
Stan Silvert (JIRA)
jira-events at lists.jboss.org
Tue Dec 14 16:23:52 EST 2010
[ https://issues.jboss.org/browse/JBAS-8726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570173#comment-12570173 ]
Stan Silvert commented on JBAS-8726:
------------------------------------
I found out what the problem is. I'm going to close this Jira as invalid. Mojarra is working correctly, but it needs a better error message.
Here is what happened. You have a composite component menuItem.xhtml with an interface defined llike this:
<composite:interface>
<composite:attribute name="label" type="java.lang.String"
required="true" />
<composite:attribute name="page" type="java.lang.String"
required="true" />
<composite:attribute name="active" type="java.lang.Boolean"
default="false" />
<composite:attribute name="rendered" type="java.lang.Boolean"
default="true" />
</composite:interface>
The problem is with the rendered attribute. All components already have a "rendered" attribute. So when you tried to define a new component and override the attribute's meaning you get into trouble. Mojarra 2.0.3 is trying to gather all the attributes that have a default value and put them in the attribute map for the UIComponent. But since the attribute already exists it does some unexpected logic and tries to invoke the write method for the attribute.
So the solution for the sample auction project is to just change the attribute name from "rendered" to something else. I'll open up a jira against Mojarra to put out a more informative message.
> Sample Auction project stopped to work due to argument type mismatch in JSF
> ---------------------------------------------------------------------------
>
> Key: JBAS-8726
> URL: https://issues.jboss.org/browse/JBAS-8726
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 6.0.0.CR1
> Environment: OpenJDK Runtime Environment (IcedTea6 1.9.2)
> Apache Maven 3.0 (r1004208; 2010-10-04 13:50:56+0200)
> Reporter: Lukas Fryc
> Assignee: Stan Silvert
> Attachments: jboss-faces.jar, jsf-api-2.0.3-b05.jar, jsf-impl-2.0.3-b05.jar, stacktrace.txt
>
>
> This project was working on AS 6.0.0.M5, but stopped to work on CR1.
> I assume it is because of bundled JSF version, since it started to work with javax.faces.jsf-impl:2.0.2.FCS also on CR1.
> Sample:
> https://svn.devel.redhat.com/repos/jboss-qa/people/ozizka/VUTcourse/project/branches/practice02-jsf/
> Revision: 11867
> I modified tied version of javaee-spec-6.0 to 1.0.0.CR1, richfaces to 4.0.0.M5 and seam-faces to 3.0.0.Beta1, all of these wasn't helpful.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list