[ http://issues.apache.org/jira/browse/TAPESTRY-300?page=all ]
     
Brian K. Wallace resolved TAPESTRY-300:
---------------------------------------

    Resolution: Fixed

Applied patch to take into account the colon in the constant for 
OGNL_EXPRESSION_PREFIX.

> Bug in external jsp tag
> -----------------------
>
>          Key: TAPESTRY-300
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-300
>      Project: Tapestry
>         Type: Bug

>   Components: Web
>     Versions: 3.0.3, 3.0
>     Reporter: Greg Lappen
>     Assignee: Brian K. Wallace
>      Fix For: 3.0.5
>  Attachments: TAPESTRY-300-branch-3.0.patch
>
> I am using Tapestry for some new pages in my admin section.  I have other 
> pages that are jsps that I want to have contain links to Tapestry pages.  I 
> used the "page" tag and it worked great.  I need to pass a service parameter 
> to one page so I tried using the external tag and made my page implement 
> IExternalPage.  To pass the parameter, which is an object ID, as an int and 
> not a string, I tried using the "parameters" parameter in the external tag 
> like this:
> <tapestry:external page="AdViewer" 
> parameters="ognl:getAttribute(\"nlAd\").id"><%=nlAd.getId()%></tapestry:external>
> This gave me the following error:
> javax.servlet.jsp.JspException: Unable to evaluate OGNL expression 
> 'etAttribute("nlAd").id': Unable to read expression '<parsed expression>' of 
> [EMAIL PROTECTED]
>       at 
> org.apache.tapestry.jsp.AbstractTapestryTag.evaluateExpression(AbstractTapestryTag.java:156)
>       at 
> org.apache.tapestry.jsp.AbstractTapestryTag.convertExpression(AbstractTapestryTag.java:135)
>       at 
> org.apache.tapestry.jsp.AbstractTapestryTag.convertParameters(AbstractTapestryTag.java:127)
>       at 
> org.apache.tapestry.jsp.AbstractTapestryTag.constructExternalServiceParameters(AbstractTapestryTag.java:81)
>       at 
> org.apache.tapestry.jsp.ExternalTag.getURLRetriever(ExternalTag.java:38)
>       at 
> org.apache.tapestry.jsp.AbstractLinkTag.doStartTag(AbstractLinkTag.java:105)
> Notice the ognl expression in the error message is missing the 'g' in the 
> beginning.  When I added an extra character like this:
> <tapestry:external page="AdViewer" 
> parameters="ognl:ggetAttribute(\"nlAd\").id"><%=nlAd.getId()%></tapestry:external>
> it worked.  The tag is stripping the ognl: off the expression improperly, 
> losing the first character.  I tested with 3.0.3 also (it was high time I 
> upgraded!) and it still did the same thing.
> Greg

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to