You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Damien VIEL <da...@studioclick.fr> on 2002/05/24 18:24:33 UTC
Pb : request.SetAttribute() from Action
Hi,
I've many problem to put a ArrayList from my Action in the request.
----------------------------------------------------------------------------
-----------
By doing for example in my Action Class :
ArrayList proj = new ArrayList();
proj.add(new LabelValueBean("name", "id"));
request.setAttribute("projects", proj);
return (mapping.findForward("success"));
----------------------------------------------------------------------------
-----------
In my JSP if I try this :
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/tld/app.tld" prefix="app" %>
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>
<logic:present name="projects" scope="request">
<logic:iterate name="projects" id="proj" scope="request"
type="LabelValueBean">
<bean:write name="proj" property="label"/>
<bean:write name="proj" property="value"/>
</logic:iterate>
</logic:present>
<logic:notPresent name="projects" scope="request">
Error
</logic:notPresent>
---------------------------------------------------------------------------
------------
I have allays the "notPresent" message
I can not fint the solution !!
Deos it comes from the Struts-config.xml, form the fact that i'm use the
Template TagLib ??
Please Help
Thanks All
Dams
Dams
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>