Hi...
Mebbe this piece of code might help u.....
In ur listUserDetails.jsp I guess u r doing sth like this
<td>
<a href="javascript:userClicked(<bean:write name='userInfo'
property='userId'/>)">
</a>
ur javascript function should forward set form action to the requsite
class mapping
userClicked(userId){
document.forms[0].action=/showuser.do?id=userId
document.forms[0].submit()
}
where showuser.do would map to ur UserDetailsAction .java
In ur UserDetailsAction .java, get the id usring req.getParameter("id");
Fetch the userdetails , construct the user form , forward to
UserDetails.jsp
Regs
Guess iam clear...
-----Original Message-----
From: Anjali Jain [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 2:24 PM
To: Struts Users Mailing List
Subject: RE: preloading the values of next pageAction form in Action of
previous page.
Hi Satish,
thanx for the prompt reply.
My query is bit different:
What I'm asking about is after I've the details of the clicked user, how
to
send them to UserDetails.jsp from ListUserAction.java
-------anjali
-----Original Message-----
From: SATISH.T [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 2:30 PM
To: 'Struts Users Mailing List'
Subject: RE: preloading the values of next pageAction form in Action of
previous page.
hi
When u show the list of values(I guess ur showing the user name as a
href) , I guess u can u can hard code the mapping for your next action
class (UserDetailsAction) and also pass the id of the user as a
parameter by appending to the url .You can call a javascript function to
do all this.
In ur UserDetailsAction, do a req.getParameter for that id,fetch the
user details and show the user details page..
Hope it helps!
-----Original Message-----
From: Anjali Jain [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 2:07 PM
To: [EMAIL PROTECTED]
Subject: preloading the values of next pageAction form in Action of
previous page.
Hi All,
Scenario:
End User is shown the list of all users of the application. Clicking on
user
name, the details of that particular user should be shown.
Requirement:
how to populate the user details to the UserDetails.jsp
Files used:
ListUser.jsp -- shows the listing of the users
ListUserForm.java --- ActionForm for ListUser.jsp
ListUserAction.java -- Action class for ListUser.jsp
UserDetails.jsp --- shows the details of the particular user
UserDetailsForm.java -- ActionForm for UserDetails.jsp
UserDetailsAction.java --Action class for UserDetails.jsp
My approach:
in ListUserAction.java:
extracting the values of user details from the database .
Setting the details of the user in the request attribute.
In UserDetails.jsp
retrieving the values from the requestAttribute an' showing on to the
jsp
Please tell me how to populate the from bean of the next page i.e from
ListUserAction.java, how to populate the UserDetailsForm.java and the
show
the values on UserDetails.jsp
thanx a lot
-------------anjali
Power your enterprise with custom solutions in eLearning and Knowledge
Management from NIIT - Knowledge Solutions. For details visit our
website
http://www.ksb.niit.com
___________________NOTICE____________________________
This electronic mail transmission contains confidential information
intended
only for the person(s) named. Any use, distribution, copying or
disclosure
by any other person is strictly prohibited. If you received this
transmission in error, please notify the sender by reply e-mail and then
destroy the message. Opinions, conclusions, and other information in
this
message that do not relate to the official business of NIIT shall be
understood to be neither given nor endorsed by NIIT When addressed to
NIIT
clients, any information contained in this e-mail is subject to the
terms
and conditions in the governing client contract.
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
Power your enterprise with custom solutions in eLearning and Knowledge
Management from NIIT - Knowledge Solutions. For details visit our
website
http://www.ksb.niit.com
___________________NOTICE____________________________
This electronic mail transmission contains confidential information
intended
only for the person(s) named. Any use, distribution, copying or
disclosure
by any other person is strictly prohibited. If you received this
transmission in error, please notify the sender by reply e-mail and then
destroy the message. Opinions, conclusions, and other information in
this
message that do not relate to the official business of NIIT shall be
understood to be neither given nor endorsed by NIIT When addressed to
NIIT
clients, any information contained in this e-mail is subject to the
terms
and conditions in the governing client contract.
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
**************************Disclaimer************************************
Information contained in this E-MAIL being proprietary to Wipro Limited is
'privileged' and 'confidential' and intended for use only by the individual
or entity to which it is addressed. You are notified that any use, copying
or dissemination of the information contained in the E-MAIL in any manner
whatsoever is strictly prohibited.
***************************************************************************
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>