| Author |
getting jsp form attribute back into form field from database
|
Vivek Bhardwaj
Ranch Hand
Joined: Nov 07, 2011
Posts: 61
|
|
I am facing with a problem that i want to access form attribute back into jsp form for update purpose but m unable to getting that where i m missing
i have set List element into maintOb.
i need your suggestion for whatever i missing here.......!
thanks...
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
maintOb or maintObj ?
|
 |
Vivek Bhardwaj
Ranch Hand
Joined: Nov 07, 2011
Posts: 61
|
|
thanks.... Venkatasamy
when i print the element of maintObj object then it prints all element whatever maintObj contained , m doing like ....
sop(maintObj.getParticulars());
sop(maintObj.getRecommsolution()); then it shows the data on console but....why its not printing in form field over jsp form....
please reply me........waiting for your reply..
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
Hint:
List list ;
//MaintananceData maintObj ;
list=(List)request.getAttribute("maintObj") ;
is that list ? why Iterator there?
<edit>
(or) you also have attribute called maintOb in request . I am wondering you dont get exception in former case ?
</edit>
|
 |
Vivek Bhardwaj
Ranch Hand
Joined: Nov 07, 2011
Posts: 61
|
|
ok....but i use for loop rather than iterator for getting element from the List cList to hold into an object maintObj...yet i m facing that when i try to access <%maintObj.getParticulars()%> as a form value then it is not working....
I have a query to all of you that i am using jsp:Bean then i want to know that only by defining id of jsp:bean [id=maintObj] can i access data containing by the maintObj. or rather than this i have to use getAttribute() method for retrieving the data containing by "maintObj". because i want to show the data into jsp form field .
I have used following line of code..
List clist=sqlMap.queryForList("selectmaint",maintObj);
request.setAttribute("maintObj",maintObj);
and now i want to retrieve the element containing by string maintObj over jsp form. so please tell me that how should i do???
|
 |
Vivek Bhardwaj
Ranch Hand
Joined: Nov 07, 2011
Posts: 61
|
|
I resolved the problem...
thanks to All for support..
|
 |
 |
|
|
subject: getting jsp form attribute back into form field from database
|
|
|