• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

significance of id and property in <bean:define />

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

Can anybody tell me the significance of


To access this we use
This time code is not running and giving the exception


In my form bean there is


So whenever i tried the

i.e. the property's name has the same name as given in id in <bean:define > it works fine .I don't know why is it happening ??
 
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you paste whole jsp?

where your html:text tag is(child tag of which tag) ?
 
Fidel Edwards
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Shailesh Narkhede wrote:Can you paste whole jsp?

where your html:text tag is(child tag of which tag) ?






It is my correctly running code in which first smiley must be same as second smiley ??

Really Confusing !!
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does the ActionForm have a publicly-accessible getter for the DTO? You show only a private member, although your message vaguely implies that there is: it's really important to be clear in your messages what you've actually implemented.
 
Fidel Edwards
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:Does the ActionForm have a publicly-accessible getter for the DTO? You show only a private member, although your message vaguely implies that there is: it's really important to be clear in your messages what you've actually implemented.



VehicleRegistrationForm.jsp
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What specifically is the problem? That it only works when the text tag uses "vehicleDTO.file"?

If so, I'd imagine that the text tag isn't using the defined bean but instead it's accessing the form directly. I don't know if you can use a <bean:define> bean in a text tag--the form tags access the form directly, if I remember correctly.
 
Fidel Edwards
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:What specifically is the problem? That it only works when the text tag uses "vehicleDTO.file"?

If so, I'd imagine that the text tag isn't using the defined bean but instead it's accessing the form directly. I don't know if you can use a &lt;bean:define&gt; bean in a text tag--the form tags access the form directly, if I remember correctly.



Yeah !! You are right !
But my problem is that when i am landing to this JSP page it is just showing those form attributes which are present in FormBean rather than normal Bean Class (or DTO).While I created a setter/getter of DTO in Form Bean.

But still ,to access DTO values I need to define bean explicitly.And in this case I have to define


Well FYI ! If i retrieve all the values from DTO then we do not need to define bean explicitly.

Here My question is that Whether is It necessary to keep the same name of id and property in <bean define while we are using the properties of DTO and FormBean at the same JSP ??>
 
this llama doesn't want your drama, he just wants this tiny ad for his mama
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic