[
https://jira.jboss.org/jira/browse/JBSEAM-2133?page=com.atlassian.jira.pl...
]
Dan Allen commented on JBSEAM-2133:
-----------------------------------
Here is what had to change. I want to mention that these are Seam ValueExpression objects
and they can be mixed content (not necessarily bounded by #{and })
1 - org.jboss.seam.Component needed to consider the property's type when determining
it is dealing with an ELInitialValue (previously it was only looking at the contents of
the value to be assigned). It's possible to set a ValueExpression/MethodExpression
property now even if the value to be assigned does not contain #{...} (not possible
before)
2 - The contents of the value is now searched entirely for an EL expression so that when
the target type is a string, the EL will be evaluated at component creation time (this is
the inconsistency fix; before it only interpreted the value if it began with #{)
3 - Home and Query needed to change to use ValueExpression properties to prevent inline EL
from being interpreted. This consists of created/updated/deleted message properties on
Home and the restrictions collection on Query.
inline EL in component property value not properly detected
-----------------------------------------------------------
Key: JBSEAM-2133
URL:
https://jira.jboss.org/jira/browse/JBSEAM-2133
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.CR2
Reporter: Dan Allen
Assignee: Dan Allen
Fix For: 2.1.0.CR1
Attachments: JBSEAM-2133-v1.txt
Currently, the EL notation in a property is only being evaluated if the property starts
with "#{". There are two problems with this assumption.
1. Inline EL can only be used if the property starts with an expression (i.e.
<property name="message">#{applicationName} is a cool
application</property>)
2. There is no way to escape EL so that is is evaluated by the property accepting the
string (rather than when the value is assigned).
The correct behavior would be to treat the property value as a value expression if it
CONTAINS "#{". The benefits are two fold:
1. A property value can use inline EL that is evaluated when the property value is set
(see above)
2. The resolved value of the property can be EL (delayed EL) that is to be interpreted by
the component as needed. This is done by escaping the EL per the unified EL spec (i.e.
<property name="created-message">The user \#{user.name} has been
created!</property)
Surprisingly, everything is already in place. All that needs to happen is the check for
EL needs to change from "startsWith" to "contains".
--
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