AJAY KUMAR UPPALAPATI wrote:
hi,
Below some part of code of my "ActionClass" . I am able to set the
values to my <html:text>. But in one case i need to display as a report
format ie. i will get more than one record.
ie:
034343000 | Mr. abcdefgh | Crd3242345 .....
034343001 | Mr. xyz | Crdsalfkjljsd .....
Thatt means i am getting more that one value.... so is it possible to
store
those values into an vector so chat i can put those values in a "SESSION"
and i can take those value into the page where i needed. my Sample code is
given below.
Is it possible? Certainly. Did you try it? What problem did you have?
I would suggest using a Collection type (e.g. a List) rather than a
Vector; and you might want to consider keeping the collection with the
rest of your form data (i.e. storing it in the form bean) rather than
putting it in the session, depending on what it is.
L.
public void performRim(HttpServletRequest req, X52Form form, ActionErrors
errors) {
try{
form.setAgentcd(totaxpath.getValueAsString("/response/text/agentcd/text()"));
form.setAgentName(totaxpath.getValueAsString("/response/text/agentName/text()"));
form.setCurcd(totaxpath.getValueAsString("/response/text/curcd/text()"));
form.setBankActno(totaxpath.getValueAsString("/response/text/bankActno/text()"));
form.setSwiftcd(totaxpath.getValueAsString("/response/text/swiftcd/text()"));
form.setGlno(totaxpath.getValueAsString("/response/text/glno/text()"));
}
catch(Exception ex){
System.out.println("error!"+ex);
}
for example: -------------
Vector v=new Vector();
v.addElement(totaxpath.getValueAsString("/response/text/agentcd/text()"));
HttpSession session = req.getSession();
session.setAttribute("name",testSrring);
thx, Ajay
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]