You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bill Blackmon <bi...@verizon.net> on 2002/07/31 04:19:30 UTC

application-level item disappearing from jsp page after validate is called

I'm using the following iterator in a jsp page
<%
Iterator disciplineListIt = (Iterator)
application.getAttribute("DISCIPLINE_LIST");
%>

The code that uses the iterator follows:
while(disciplineListIt.hasNext()) {
 db = (DisciplineBean) disciplineListIt.next();
 description = db.getDiscipline();
 id = db.getDisciplineID();
 sid = String.valueOf(id);
%>
 <td align="left" width=50%>
  <input type="checkbox" name="selDisciplineList" value="<%= sid %>" > <%=
description %>
 </td>
<%
}

The 'selDisciplineList' is returned to the Action form and the checked
results are correct. However,
if there is an error during the validate() method of the Action form, the
form is re-displayed and
the output of the 'disciplineListIt' is no longer on the page (nor any other
of the application-level iterators) .
The application-level items are not defined in the Action form. I was hoping
they'd be visible whenever the page
is rendered. Any ideas?



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Action Error and scope

Posted by Deepa <de...@sify.com>.
HI,

  I am working with Tomcat 4.0.1 and struts 1.1. I have an action class which collects the list of users and display it in JSP. But whenever an error is thrown from the validate method of form bean, i couldnt access the userlist which i am getting from the action class. Everything works fine when the scope of the user object is set to session.But i would like to keep the scope to request.Is there any solution!! The struts-config.xml file is

<action    path="/xx"	      
 type="XXPrivilegeAction"
 name="XXForm"
 scope="request"
 validate="true"
 input="/xx.jsp">
<forward   name="go" path="/xx.jsp"/>             
</action>

-------------------------------------------------
Sify Mail - now with Anti-virus protection powered by Trend Micro, USA.
Know more at http://mail.sify.com

One click here and you could be counting money!
StreetsCall from Walletwatch.com. Subscribe now!  http://www.walletwatch.com/cgi-bin/ww/walletwatch/equity/news_articles/news_detail.jsp?oid=11658894

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>