P
Pavel
Greetings to all -
I'm having a difficulty with struts action mapping input attribute. In
my case, I have the following actions sequence:
prepareData -> showData1 -> saveData
prepareData -> showData2 -> saveData
prepareData -> showData3 -> saveData
....
where
- prepareData is the Action that fills the form bean with the data
to be edited. Part of this data also identifies what jsp is used to
show the data (different template). Once form bean is filled, action
forwards the control to one of the JSPs.
- showDataX.jsp are the JSPs that show the data.
- saveData is the Action that saves the data.
The form bean that is used here has a validate() method that may
return errors so the input attribute must be specified in the saveData
mapping. Here is my problem: I can specify only one of them which
means that errors will be displayed only on one of the JSPs. If any
other JSP was used to forward to by prepareData action then errors
will be displayed on the one that is specified in the input attribute.
If no input attribute is specified, an error is thrown from struts
RequestProcessor saying that input attribute is missing.
Does anybody know how I could get around it ?
P.S. Wouldn't it make sense for struts to try to use the original
destination if the input attribute is not specified ?
Thanks
Pavel
I'm having a difficulty with struts action mapping input attribute. In
my case, I have the following actions sequence:
prepareData -> showData1 -> saveData
prepareData -> showData2 -> saveData
prepareData -> showData3 -> saveData
....
where
- prepareData is the Action that fills the form bean with the data
to be edited. Part of this data also identifies what jsp is used to
show the data (different template). Once form bean is filled, action
forwards the control to one of the JSPs.
- showDataX.jsp are the JSPs that show the data.
- saveData is the Action that saves the data.
The form bean that is used here has a validate() method that may
return errors so the input attribute must be specified in the saveData
mapping. Here is my problem: I can specify only one of them which
means that errors will be displayed only on one of the JSPs. If any
other JSP was used to forward to by prepareData action then errors
will be displayed on the one that is specified in the input attribute.
If no input attribute is specified, an error is thrown from struts
RequestProcessor saying that input attribute is missing.
Does anybody know how I could get around it ?
P.S. Wouldn't it make sense for struts to try to use the original
destination if the input attribute is not specified ?
Thanks
Pavel