You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "David Evans (JIRA)" <ji...@apache.org> on 2006/05/02 02:28:18 UTC
[jira] Reopened: (STR-616) and with parameter doesn´t work
[ 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