FileDocCategorySizeDatePackage
EditPersonAction.javaAPI DocApache Struts 2.0.9 Apps2582Mon Jul 23 13:43:26 BST 2007org.apache.struts2.showcase.person

EditPersonAction

public class EditPersonAction extends com.opensymphony.xwork2.ActionSupport
EditPerson

Fields Summary
private static final long
serialVersionUID
PersonManager
personManager
List
persons
Constructors Summary
Methods Summary
public java.lang.Stringexecute()
A default implementation that does nothing an returns "success".

return
{@link #SUCCESS}

        persons.addAll(personManager.getPeople());
        return SUCCESS;
    
public java.util.ListgetPersons()

        return persons;
    
public java.lang.Stringsave()
A default implementation that does nothing an returns "success".

return
{@link #SUCCESS}


        // Set people = personManager.getPeople();

        for ( Iterator iter = persons.iterator(); iter.hasNext();) {
            Person p = (Person) iter.next();
            personManager.getPeople().remove(p);
            personManager.getPeople().add(p);
        }
        return "list";
    
public voidsetPersonManager(PersonManager personManager)


        
        this.personManager = personManager;
    
public voidsetPersons(java.util.List persons)

        this.persons = persons;