
|
If you were logged in you would be able to see more operations.
|
|
|
Struts 1
Created: 29/Sep/06 10:33 AM
Updated: 03/Jul/07 08:36 PM
|
|
| Component/s: |
Core
|
| Affects Version/s: |
None
|
| Fix Version/s: |
1.3.6
|
|
|
Given the actions below, with validate set to false on PrimaryAction the validate for ExtendedAction is not set to true in the ActionConfig object and validation doesn't occure.
<action path="/ExtendendedAction" extends="/PrimaryAction" type="ExtendedAction"
name="ExtendedForm" validate="true" scope="request" input="/WEB-INF/jsp/extended_input.jsp"
parameter="ExtendParam">
<forward name="success" path="/WEB-INF/jsp/extendedView.jsp" />
</action>
<action path="/PrimaryAction" type="PrimaryAction"
name="PrimaryForm" validate="false" scope="request" input="/WEB-INF/jsp/primary_inputjsp"
parameter="primaryParam">
<forward name="success" path="/WEB-INF/jsp/primaryView.jsp" />
</action>
If the PrimaryAction's validate is set to true or isn't there (default is validate=true) and ExtendedAction is set to false it works correctly.
looking at
public void inheritFrom(ActionConfig config) in ActionConfig
...
if (getValidate()) {
setValidate(config.getValidate());
}
The validate would not be set if the baseConfig was set to false.
Perhaps this is the semantics that is wanted, but it seems reasonable to be able to overide this attribute in either direction.
|
|
Description
|
Given the actions below, with validate set to false on PrimaryAction the validate for ExtendedAction is not set to true in the ActionConfig object and validation doesn't occure.
<action path="/ExtendendedAction" extends="/PrimaryAction" type="ExtendedAction"
name="ExtendedForm" validate="true" scope="request" input="/WEB-INF/jsp/extended_input.jsp"
parameter="ExtendParam">
<forward name="success" path="/WEB-INF/jsp/extendedView.jsp" />
</action>
<action path="/PrimaryAction" type="PrimaryAction"
name="PrimaryForm" validate="false" scope="request" input="/WEB-INF/jsp/primary_inputjsp"
parameter="primaryParam">
<forward name="success" path="/WEB-INF/jsp/primaryView.jsp" />
</action>
If the PrimaryAction's validate is set to true or isn't there (default is validate=true) and ExtendedAction is set to false it works correctly.
looking at
public void inheritFrom(ActionConfig config) in ActionConfig
...
if (getValidate()) {
setValidate(config.getValidate());
}
The validate would not be set if the baseConfig was set to false.
Perhaps this is the semantics that is wanted, but it seems reasonable to be able to overide this attribute in either direction. |
Show » |
|
http://svn.apache.org/viewvc?view=rev&revision=480593