[
https://issues.jboss.org/browse/RF-10170?page=com.atlassian.jira.plugin.s...
]
Martin Kočí commented on RF-10170:
----------------------------------
As I can remember, we have similiar problem in Trinidad renderkit. There was a long
discussion about this problem and the result is that EL is a litte schizoid in way of
handling expression evaluations:
ValueExpression.getValue() throws PropertyNotFoundException only if the last part of
expression does not exist: #{bean.firstProperty.secondProperty} throws PNFE only if
bean.firstProperty resolves to not-null and secondProperty is not present at resolved
object. If bean.firstProperty resolves to null, it returns null
ValueExpression.getType() throws PNFE even if #{bean} exists, has property
'firstProperty', but this property value is null.
But JavaDoc for both methods says: "PropertyNotFoundException - if one of the
property resolutions failed because a specified variable or property does not exist or is
not readable."
It can also depend on EL implementation used: I used implementation from
http://java.net/projects/uel/.
Improve Converter finding if EL expression is semi-resolvable
-------------------------------------------------------------
Key: RF-10170
URL:
https://issues.jboss.org/browse/RF-10170
Project: RichFaces
Issue Type: Enhancement
Security Level: Public(Everyone can see)
Components: compatibility
Affects Versions: Future_4.X
Environment: RichFaces 4 svn rev. 20933
Reporter: Martin Kočí
Assignee: Konstantin Mishin
Fix For: Future_4.X
example (#{bean.propertyNull} resolves to null):
<h:inputText value="#{bean.propertyNull.zeitangabe}" /> outputs a input
field
<r:calendar value="#{bean.propertyNull.zeitangabe}" /> throws
value="#{bean.propertyNull.zeitangabe}": Target Unreachable,
'propertyNull' returned null
Problem is in org.richfaces.component.util.SelectUtils.findConverter: method tries to
locate a Converter even if informations for this are "uknown".
Simple solution can be: find converter only for ValueExpression which leads to not null
value, because if no value for "value" ValueExpression :), then no conversion
getAsString is necessary (at least is is true if spec does not mandates conversion for
null value).
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira