[
https://jira.jboss.org/browse/RF-8898?page=com.atlassian.jira.plugin.syst...
]
Bernard Labno updated RF-8898:
------------------------------
Attachment: keywordAttributes2.patch
Alex, my patch is a disaster! If we use any suffix, then ComponentStateHelper will (if we
do not specify direct value, but a binding) delegate evaluation to UIComponent, and it is
set by default facelet handlers accordingly to attribute name:
public Object eval(Serializable key, Object defaultValue) {
Object retVal = get(key);
if (retVal == null) {
ValueExpression ve = component.getValueExpression(key.toString());
if (ve != null) {
retVal = ve.getValue(component.getFacesContext().getELContext());
}
}
return ((retVal != null) ? retVal : defaultValue);
}
Either we abandon this path or cut suffix in generated Properties enum in it's
toString().
CDK could generate object names that conflict with Java keywords.
-----------------------------------------------------------------
Key: RF-8898
URL:
https://jira.jboss.org/browse/RF-8898
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: CDK
Reporter: Alexander Smirnov
Assignee: Alexander Smirnov
Fix For: 4.0.0.Milestone2
Attachments: generator.patch.zip, keywordAttributes.patch,
keywordAttributes2.patch
CDK creates enum for attributes referenced in the property getters/setters. If attribute
name coincides with Java keyword, generated Java class couldn't be compiled.
Mojarra uses a little bit more complicated enum class for these cases, so CDK has to do
the same:
enum PropertyKeys {
forValue("for"),
showDetail,
showSummary,
redisplay;
String toString;
PropertyKeys(String toString) {
this.toString = toString;
}
PropertyKeys() {
}
public String toString() {
return ((this.toString != null) ? this.toString : super.toString());
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira