Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

input source

 
manu chaox
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to solve a next problem but since unsuccessfully.

I created :
add.jsp
edit.jsp(difference only in hidden id)
one class PersonEditForm extends ActionForm
one class PersonEditAction extends DispatchAction

All works fine only without validate forms.

I don't know how to put into "input source" in struts-config.xml.
I think it could be put only ONE input source, couldn't be?

I tried to put add.jsp and then edit.jsp, but this didn't remember state filling items at entry to editing form.




How should I solve this problem?
Could you help me please.
(Struts 1.1,MyEclipse)
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd suggest that you create two action mappings in the struts-config.xml file, both pointing to the same Action class, but one used for edit and the other for add. That way you can have the correct input page for each.
 
manu chaox
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you think by this way:

 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that's exactly what I was suggesting.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic