wood burning stoves*
The moose likes Struts and the fly likes Empty Form after submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Empty Form after submit" Watch "Empty Form after submit" New topic
Author

Empty Form after submit

Michael Ernst
Greenhorn

Joined: Jul 03, 2005
Posts: 23
I have an Action, named PrepareEditCatAction and an Action named processAction. In the ProcessEditCatAction I prefill the form for editing the record and all looks fine but if the form is submitted, the form is completely empty. What could be the reason for this.
struts-config.xml

processEditCatAction:

Thanks in advance!

Regards Michael
Choon-Chern Lim
Ranch Hand

Joined: Aug 29, 2005
Posts: 74
In your struts-config.xml, you should not have key properties (like shop.showCategories etc...), replace that with real URI path. The key properties are not going to get resolved in my opinion, even if you associate the property file in that config file.
Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 254
Could you post the section of struts-config where you setup the DynaActionForm?


http://www.goodercode.com
SCJP 1.4
Michael Ernst
Greenhorn

Joined: Jul 03, 2005
Posts: 23
In your struts-config.xml, you should not have key properties (like shop.showCategories etc...), replace that with real URI path. The key properties are not going to get resolved in my opinion, even if you associate the property file in that config file.

I'm using Tiles for the layout and the properties like shop.showCategories etc. are set in the tiles-config.xml which I have associated in the struts-config.xml. I think there is no mistake becouse I could see the filled Form in the Browser and the Action for storing the edited fields will be executed. The mistake is, that all fields in the form are empty after submitting it!
Could you post the section of struts-config where you setup the DynaActionForm?



Validation rules are not set!

Regards Michael
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Empty Form after submit