Loop is not stateful
--------------------

                 Key: TAPESTRY-1998
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1998
             Project: Tapestry
          Issue Type: Bug
          Components: Core Components
    Affects Versions: 5.0.8
         Environment: MaxOSX 10.5 / Java 1.5 / Jetty 5.1
            Reporter: Eric BIANCHI
             Fix For: 5.0.8


Using some Cayenne Objects, Loop is not stateful even with the parameter 
volatile set to false.

If you put a textfield inside a loop, value is not persistent.

<t:loop source="objects" value="currentObject">
  <t:textfield value="currentObject"/> <br />
</t:loop>
-- 

@Persist
private List<String> _objects;
        
private String _currentObject;
        
  public List<String> getObjects() {
    if (_objects == null) {
                
                System.out.println ("NEW LIST OF OBJECTS CREATED");
                
                _objects = new ArrayList<String>();
                
                _objects.add("foo");
                _objects.add("bar");
            }
            
            return _objects;
        }
        
   public String getCurrentObject() {
        return this._currentObject;
    }

    public void setCurrentObject(String currentObject) {
        this._currentObject = currentObject;
    }

    public void setObjects(List<String> objects) {
        this._objects = objects;
    }

--

when submitted with foo2 and bar2

System.out.println ("_objects : " + _objects); gives _objects : [foo, bar]


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to