• 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

retrieve values from database at the time of form loading using struts

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my module (skill maintenance is module name and skill is table name) I have to take reference of another module, that is skill category (and table name is skill category). At the time of skill creation, (that is first form of my module) I need data from skill category table. So at the time of form loading my combo should be filled with data of another table.


In model I have written code to fetch data from skill category table and set it into VO but I am afraid this model will be called only when we press submit button of the create skill form. So no values will be set in VO and so it is showing null pointer exception.

Can any one tell me how to resolve this problem?

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Before forwarding to the create skill page load call the action which you need to load at create skill page.

for example:

If you are calling this page(create skill page) from pressing button or link, then you can call the action on that link/button. And the action will create skillSetList and forward to create skill page.
reply
    Bookmark Topic Watch Topic
  • New Topic