• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Action forms

 
Anjali Naveen
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have a jsp page which has name and address fields, education details etc.can i have the action form as

class Details extends ActionForm{
String name;
Address obj;
String degree;

getters and setters for the above
}

class Address{
String address1;
String city;
String state;

getters and setters for the above
}

so my main action form will be a composition. can this be done??
Anjali
 
Kerry Wilson
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If address1 is an inner class, I do not if it will work. However, if it is a normal seperate class, it should work. Just access properties with standard dot notation ( i.e. address.city ) in you struts:html tags
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic