Reduce property resolution code by adding a resolveProperty method to
XhtmlRenderer
-----------------------------------------------------------------------------------
Key: TRINIDAD-661
URL: https://issues.apache.org/jira/browse/TRINIDAD-661
Project: MyFaces Trinidad
Issue Type: Improvement
Affects Versions: 1.0.2-core, 1.2.2-core
Reporter: Simon Lessard
Assignee: Simon Lessard
Priority: Trivial
Fix For: 1.0.3-core
Most renderers uses a protected getProperty method receiving a FacesBean
argument to get component's property values. That code always looks like the
following:
if (myPropertyKey == null)
{
return null;
}
Object value = bean.getProperty(myPropertyKey);
if (value == null)
{
return myPropertyKey.getDefault();
}
else
{
return value;
}
Adding a method in XhtmlRenderer to handle that redundant code would reduce
boilerplate code as well the risk of typos, mistakes and omissions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.