[richfaces-issues] [JBoss JIRA] (RF-12249) CDK: generate both get* and is* methods for boolean/Boolean expressions
Lukáš Fryč (JIRA)
jira-events at lists.jboss.org
Tue Jun 12 13:42:04 EDT 2012
[ https://issues.jboss.org/browse/RF-12249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700855#comment-12700855 ]
Lukáš Fryč commented on RF-12249:
---------------------------------
http://download.oracle.com/otndocs/jcp/7224-javabeans-1.01-fr-spec-oth-JSpec/
{quote}
8.3.2 *Boolean properties*
In addition, for boolean properties, we allow a getter method to match the pattern:
{code}
public boolean is<PropertyName>();
{code}
This {{“is<PropertyName>”}} method may be provided instead of a {{“get<PropertyName>”}} meth-
od, or it may be provided in addition to a {{“get<PropertyName>”}} method.
In either case, if the {{“is<PropertyName>”}} method is present for a boolean property then we will
use the {{“is<PropertyName>”}} method to read the property value.
An example boolean property might be:
{code}
public boolean isMarsupial();
public void setMarsupial(boolean m);
{code}
{quote}
> CDK: generate both get* and is* methods for boolean/Boolean expressions
> -----------------------------------------------------------------------
>
> Key: RF-12249
> URL: https://issues.jboss.org/browse/RF-12249
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: cdk
> Affects Versions: 4.2.0.Final
> Reporter: Paul Dijou
> Assignee: Lukáš Fryč
> Priority: Critical
> Fix For: 4.3.0.Milestone1
>
>
> Generate both "get..." and "is..." method for Boolean and boolean attributes
> If you have an attribute like :
> {code:java}
> @Attribute
> abstract public boolean isClosable();
> {code}
> This will generate a "isClosable()" method of course. But, then, trying to access it in a template like :
> {code:xml}
> <c:if test="#{alert.closable}">
> {code}
> Will crash since JSF try to call the "getClosable()" method. The workaround is to write :
> {code:xml}
> <c:if test="#{alert.isClosable()}">
> {code}
> But it would be nicer if the "geClosable()" method was generated in the same time of the "isClosable()" method.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list