struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Evans (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (STR-616) <logic:present> and <logic:notPresent> with parameter doesn´t work
Date Tue, 02 May 2006 00:28:18 GMT
     [ http://issues.apache.org/struts/browse/STR-616?page=all ]
     
David Evans reopened STR-616:
-----------------------------

    Assign To: Craig McClanahan  (was: Struts Developer Mailing List)

> <logic:present> and <logic:notPresent>  with parameter doesn´t work
> -------------------------------------------------------------------
>
>          Key: STR-616
>          URL: http://issues.apache.org/struts/browse/STR-616
>      Project: Struts Action 1
>         Type: Bug

>   Components: Taglibs
>     Versions: 1.0 Final
>  Environment: Operating System: All
> Platform: PC
>     Reporter: Victor Montenegro
>     Assignee: Craig McClanahan

>
> <logic:present> and <logic:notPresent> tags doesn´t work properly to test
for  
> the collection you are iterating, if it contains null values.
> In the Iterate.java code you can find:
>         if (iterator.hasNext()) ....pageContext.setAttribute(id, element);
> but the Present.java code at the method:
>          protected boolean condition(boolean desired) 
> asks to see the attribute in the following way:
> [*]       String value = pageContext.getRequest().getParameter(parameter);
> so <logic:present> and <logic:notPresent> tags will never guess that the

> collection we are iterating over has a next element and therefore the mentioned 
> tags will not work.
> I tried to change the last sentence  [*] by :
>           Objetct value = pageContext.getAttribute(parameter);
> and it worked fine.
> Neither in the beta release 1.1  will work.
> Regards

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


Mime
View raw message