Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validation form and struts.xwork.chaining

 
Honzak Troubak
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys,

I have troubles with validation of forms.

I decided that I will use way where if have any problem I will call addActionError(getText("error")); and return ERROR.

Unfortunatly I'm using a lot of "type=chain" because I have call more method together. I found is a lot of troubles with using chain. I cant show errors in my <s:actionerror/> because error does not pass through chain.

Maybe only one resolution is use struts.xwork.chaining. I found that I should put



to struts.xml.

With using struts.xwork.chaining it is better but I have still trouble: I have 3 actions. I have to go from action updateTopic to adminTopics.jsp.




And when I set struts.xwork.chaining.copyErrors to true (others both are TRUE) method addTopic() returns Error but methods readTopic() and readConference() didn't run and application skip to page adminTopics.jsp and actionError is showed.

When I set struts.xwork.chaining.copyErrors to false, all methods run OK but <s:actionError> show nothing.

Could anybody say me what should I do?



 
muyinliu xing
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the new version of Struts like Struts 2.3.14 which I proved working well.
The older version of Struts might had the BUG.
If you find new problems, talk to me 470372243@qq.com
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic