Not sure if this where bugs are to be reported for WebFlows, but...
In ActionStateAction, when using the constructor signature ActionStateAction( Action, Properties) or ActionStateAction( ActionState, Action, Properties ), the passed properties are set into the properties member via :
That is fine, except that you must use Properties.getProperty method (and not the Properties.get method) for the Properties object to cascade into its wrapped Properties object.Code:this.properties = new Properties( passedProperties );
So the method ActionStateAction.getProperty needs to be changed from this :
toCode:return (String)getProperties().get( propertyName );
this will ensure that the properties are propertly retrieved.Code:return getProperties().getProperty( propertyName );
Another thing to note is that the ActionStateAction.containsProperty has a similar issue as the Properties.containsKey method does not cascade the cehck to its wrapped Properties instance, so calling it when you you have used one of the constructors mentioned above will always return false for any properties located in the Properties object passed in.
Example :
Code:Proprties props = new Properties(); props.setProperty( ActionStateAction.METHOD_PROPERTY, "cancelAction" ); Action action = new SomeActionClass(); ActionStateAction asa = new ActionStateAction( action, properties ); asa.setProperty( "MODE", "A" ); assert( "A".equals( asa.getProperty("MODE") ) ); // Assert passes assert( asa.containsKey( "MODE" ) ); // Assert passes assert( "cancelAction".equals( asa.getProperty("MODE") ) ); // Assert fails assert( asa.containsKey( "MODE" ) ); // Assert fails


Reply With Quote