You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by bu...@apache.org on 2004/03/29 10:22:15 UTC
DO NOT REPLY [Bug 28010] New: -
OGNL bug in org.apache.tapestry.binding.ExpressionBinding ?
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28010>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28010
OGNL bug in org.apache.tapestry.binding.ExpressionBinding ?
Summary: OGNL bug in
org.apache.tapestry.binding.ExpressionBinding ?
Product: Tapestry
Version: 3.0
Platform: PC
OS/Version: Other
Status: NEW
Severity: Critical
Priority: Other
Component: Framework
AssignedTo: tapestry-dev@jakarta.apache.org
ReportedBy: gerard.collin@netonomy.com
Hi,
Using Tapestry rc1, i've got a problem with OGNL inside a component.
This component display an Image who's url is stored in a bean.
If I write this for binding:
<component-specification allow-informal-parameters="no" allow-body="no">
<parameter direction="in" type="com.proto.Handset"
name="toDisplay"/>
<component id="phoneImage" type="Image">
<binding name="image" expression="toDisplay.pictureUrl"/>
</component>
</component-specification>
OGNL is fine but I've got an error because toDisplay.pictureUrl is a String
and the Image component expect an IAsset. OK No problem, I add a method in
the Page object to do the conversion.
So I now have an expression like that:
<component id="phoneImage" type="Image">
<binding name="image"
expression="page.createRelativeAsset(toDisplay.pictureUrl)"/>
</component>
And now I've got an OGNL error "toDisplay property not found !" Ouups ? What's
wrong here ?
I finally managed to make it work with a temporary variable, like that :
<component id="phoneImage" type="Image">
<binding name="image" expression="#url=toDisplay.pictureUrl,
page.createRelativeAsset(#url)"/>
</component>
But this solution doesn't seem to be very elegant.
Gérard
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org