• 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

Problem in Struts 1 html form rendering and populating ?

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a form as below




ISSUE 1 (RENDERING): page is not rendered i get a exception "Invalid argument looking up property:"



i have soled this issue by


My Question

will struts create the instance variable by its own ?

In my previous project i have not created instance variables , why now its want me to create?

 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jayaraj Jaganathan wrote:i have soled this issue by


My Question

will struts create the instance variable by its own ?

In my previous project i have not created instance variables , why now its want me to create?


Struts create the instance for the UserForm, but not for the for attribute(User, Address ) in the UserForm. You've to use getters and setters for the same.
 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Struts create the instance for the UserForm, but not for the for attribute(User, Address ) in the UserForm. You've to use getters and setters for the same.



Thanks for your reply.

Please let me know is this feature not available in Struts1 ???
I hope it is available in Struts 2 !!!
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jayaraj Jaganathan wrote:

Struts create the instance for the UserForm, but not for the for attribute(User, Address ) in the UserForm. You've to use getters and setters for the same.



Thanks for your reply.

Please let me know is this feature not available in Struts1 ???
I hope it is available in Struts 2 !!!


Its S1 we are taking about right ? Why the S2 comes in between ? What is the diffrence between two code snippets you provided ? One has null object wheter another is assign a valid (empty) object. You've to use setter and getter to create an valid instance for the FORM attribute.
 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sagar Rohankar wrote:
Its S1 we are taking about right ? Why the S2 comes in between ?



Cool !!!. It just my interest to know about the features in Struts1 and Struts 2

Sagar Rohankar wrote:
What is the diffrence between two code snippets you provided ? One has null object wheter another is assign a valid (empty) object. You've to use setter and getter to create an valid instance for the FORM attribute.



Struts don't create the instance for the attribute(User, Address ) in the UserForm.
so i coded to the instance variable.


Once again thanks for your reply.
reply
    Bookmark Topic Watch Topic
  • New Topic