Announcement Announcement Module
Collapse
No announcement yet.
Bug in ActionStateAction Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bug in ActionStateAction

    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 :

    Code:
    this.properties = new Properties( passedProperties );
    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.

    So the method ActionStateAction.getProperty needs to be changed from this :

    Code:
    return (String)getProperties().get( propertyName );
    to

    Code:
    return getProperties().getProperty( propertyName );
    this will ensure that the properties are propertly retrieved.

    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

  • #2
    Please upgrade to PR3. that class is now obsolete.

    Comment


    • #3
      Thx. The response does beg the question...

      How stable is api? And when is the eta of it to be stable?

      Comment


      • #4
        Check http://forum.springframework.org/showthread.php?t=15228

        Erwin
        Last edited by robyn; May 16th, 2006, 04:29 AM.

        Comment


        • #5
          Thx for the timely reponses )

          Comment

          Working...
          X