• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

link with dispatchAction doesn't transfer the form's content.

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have an dispatchAction form and a link in my jsp page. the idea, is that when the user clicks a link, the 'addLevel' method will be invoked with the level_id (as parameter) and the form's content.

I have this in my jsp:



now, when the user clicks the link '1', it goes to the addLevel method WITH the level_id (1) but WITHOUT the form's content.

why? and what can I do in order to have the form's content?

thank you
 
Kaustabh Singha Roy
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It will be helpful if you post the part of your struts-config.xml here. What is the scope of your form bean. If it is a request one that only the 'label' information will be stored in it. However there should be a setLabel() method present in the form class.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This doesn't work for the simple reason that clicking on a link does not submit a form. If you want to sumit the form, change the link to a submit button and make reqCode and level hidden fields on the form.
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, I suspected that will be the reason.
thanks, I'll put buttons
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic