struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maurizio Cucchiara (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (WW-3677) If tags within URL being evaluated but not pushed into URL component
Date Tue, 20 Sep 2011 16:58:09 GMT

     [ https://issues.apache.org/jira/browse/WW-3677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Maurizio Cucchiara closed WW-3677.
----------------------------------

    Resolution: Invalid

Hi Jeff, 
please ask first this kind of question to the user [ML|http://struts.apache.org/mail.html].

> If tags within URL being evaluated but not pushed into URL component
> --------------------------------------------------------------------
>
>                 Key: WW-3677
>                 URL: https://issues.apache.org/jira/browse/WW-3677
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Value Stack
>    Affects Versions: 2.2.3
>         Environment: Windows XP.  Java 1.6u16
>            Reporter: Jeff T
>            Priority: Minor
>
> When trying to use an IF tag within a URL, the IF tag is evaluated correctly (seen through
debug) but the URL does not contain the parameter within the IF statement but does contain
the other parameters.
> Example:
> <s:url action="ViewTask" id="testing">
>     <s:param name="taskId">
>         <s:property value="#task.id" />
>     </s:param>
>     <s:if test='#task.state == "New Request"'>
>         <s:param name="param2">
>             Test param
>         </s:param>
>     </s:if>
> </s:url>
> The param2 is not pushed, even though the if test passes (via debug).  Workaround is
to use an if tag around the entire url tag such as:
> <s:if test='#task.state == "New Request"'>
>     <s:url action="ViewTask" id="testing">
>         <s:param name="taskId">
>             <s:property value="#task.id" />
>         </s:param>
>         <s:param name="param2">
>             Test param
>         </s:param>
>     </s:url>
> </s:if> 
> The workaround works but if having a few if statements, it could be problematic having
to copy the same URL data over and over. I'll be going the custom tag route instead due to
the nesting needed my specific needs.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message