• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

populating ActionForm

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I use WL 8,Struts 1.0 and Win2000.

I have a form in JSP which has "add","update","delete" functionalites for the records. records can be seen in grid.

I am able to "add" the new records ,and see that my ActionForm is populating it's fields with the values given in JSP form. i.e, it's calling setter methods.
But When I try "update" it's not calling some of the setter methods !!! It's definitely calling few setter methods but not all of them ...I' have been using struts for more than 9 months..but never encountered this problem.

Could anybody please comment on this ?

Thanks a lot
-Anand.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Canyou give an example of a struts tag in your jsp and it's corresponding setter in a form that is not getting called properly? It's hard to really say what might be happening without more information.
 
Anand Gondhiya
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<html:text property="loginName" size="20" maxlength="20" />

I fixed the problem. while doing "add" operation , this field was enabled(read-write). But while doing "update" this field was disabled(read only).

For that reason(field disable) , struts was not even calling the setter method for this field !

Thanks very much for your help.
-Anadn.
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Anand Gondhiya:
For that reason(field disable) , struts was not even calling the setter method for this field !



You can't really blame Struts for that. Your browser does not submit disabled fields with the form.
 
Anand Gondhiya
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes that's true.. My fault .......
 
The human mind is a dangerous plaything. This tiny ad is pretty safe:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic