struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anshuman <Anshu...@gsr-inc.com>
Subject Iteration using the Vector Object
Date Fri, 23 Mar 2001 23:48:50 GMT
Hi!,

I have a vector object in my FormBean.

and have respective get and set methods for that Vector Object.  The vectore
object contains my Detail Class Objects.

Can anyone have any idea as to How can I use this Vector using "iterate " or
any other tag in Struts to display the Information of the Detal Class object
row by row where each row represents complete information form a single
Detail Class.



Thanks for all the help.

Regards
Anshuman Nanda


-----Original Message-----
From: Suriyanarayanan, Senthil Kumar
[mailto:senthilkumar.suriyanarayanan@capitalone.com]
Sent: Friday, March 23, 2001 3:41 PM
To: struts-user@jakarta.apache.org
Subject: How to use html:errors ?


How do you make the errors shows up on the generated page.? Here is the code
snapshot..

LogonForm.java
public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request)
	{
		if(password == null || !password.equals("password"))
		{
			ActionErrors aes = new ActionErrors();
			ActionError ae = new ActionError("Please type the
valid password");
			aes.add("?", ae);
			return aes;
		}
		return null;
	}
What should I put at the place of '?' in the above add method 

struts-config.xml

	<form-beans>
	    <form-bean name="logonForm" type="package.LogonForm"/>
	</form-beans>


  <action-mappings>
    <!-- Logon Action -->
    <action    path="/logon"
               type="package.LogonAction"
               scope="request"
               name="logonForm"
               validate="true"
               input="/logon.jsp">
               <forward name="successpage" path="/success.jsp" />
    </action>
  </action-mappings>


logon.jsp

<html:errors/>
<html:form action="logon.do">
	UserId: <html:text property="userId" size="15" maxlength="15"
redisplay="false" />
	Password: <html:password property="password" size="16"
maxlength="16" redisplay="false" />
	<html:submit/>
</html:form>

I saw one of the postings talking about saveErrors method. It belongs to
Action Object, and I how do
I get reference to action object from the validate method?

Thanks in advance,
Senthil Kumar.S
 
**************************************************************************
The Information transmitted herewith is sensitive information intended only
for use to the individual or entity to which it is addressed. If the reader
of this message is not the intended recipient, you are hereby notified that
any review, retransmission, dissemination, distribution, copying or other
use of, or taking of any action in reliance upon, this information is
strictly prohibited. If you have received this communication in error,
please contact the sender and delete the material from your computer.

Mime
View raw message