Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
swee shah
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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?

 
Ranveer K Kumar
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic