SimpleTogglePanel's opened attribute only works with String bean properties
---------------------------------------------------------------------------

                 Key: RF-7206
                 URL: https://jira.jboss.org/jira/browse/RF-7206
             Project: RichFaces
          Issue Type: Bug
    Affects Versions: 3.3.1
         Environment: JRE 6, Tomcat 6
            Reporter: Matthew Lieder


Given the bean

public class MyBean {
        public boolean getBooleanProp() {
                return true;
        }
        
        public void setBooleanProp(boolean prop) {}

        public boolean getStringProp() {
                return "true";
        }
        
        public void setStringProp(String prop) {}
}

and the XHTML

<rich:simpleTogglePanel label="Close Me" switchType="client" 
opened="#{myBean.booleanProp}">
Blah blah blah
</rich:simpleTogglePanel>

I get the following error if I close the tab panel and then submit the page:

/test.xhtml @646,220 opened="#{myBean.booleanProp}": 
java.lang.IllegalArgumentException: argument type mismatch

If I change the opened attribute to #{myBean.stringProp} however, then it works 
fine.

The problem seems to narrow down to the following method in UISimpleTogglePanel:

    public void setOpened(boolean opened) {
        setValue(new Boolean(opened).toString());
    }

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

        
_______________________________________________
richfaces-issues mailing list
richfaces-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to