struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maurizio Cucchiara (JIRA)" <>
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


Maurizio Cucchiara closed WW-3677.

    Resolution: Invalid

Hi Jeff, 
please ask first this kind of question to the user [ML|].

> If tags within URL being evaluated but not pushed into URL component
> --------------------------------------------------------------------
>                 Key: WW-3677
>                 URL:
>             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="" />
>     </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="" />
>         </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:


View raw message