History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: STR-2955
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Niall Pemberton
Reporter: Mark Shifman
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Struts 1

extending action does not pick up the correct validate attribute

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


 Description  « Hide
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.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Niall Pemberton - 29/Nov/06 07:19 AM