Examples of PersonManager


Examples of net.sourceforge.stripes.examples.bugzooky.biz.PersonManager

    /**
     * Registers a new user, logs them in, and redirects them to the bug list page.
     */
    public Resolution register() {
        PersonManager pm = new PersonManager();
        pm.saveOrUpdate(this.user);
        getContext().setUser(this.user);
        getContext().getMessages().add(
                new LocalizableMessage(getClass().getName() + ".successMessage",
                                       this.user.getFirstName(),
                                       this.user.getUsername()));
View Full Code Here

Examples of net.sourceforge.stripes.examples.bugzooky.biz.PersonManager

     * If no list of people is set and we're not handling the "save" event then populate the list of
     * people and return it.
     */
    public List<Person> getPeople() {
        if (people == null && !"Save".equals(getContext().getEventName())) {
            people = new PersonManager().getAllPeople();
        }

        return people;
    }
View Full Code Here

Examples of net.sourceforge.stripes.examples.bugzooky.biz.PersonManager

        return new ForwardResolution("/bugzooky/AdministerBugzooky.jsp");
    }

    @HandlesEvent("Save")
    public Resolution saveChanges() {
        PersonManager pm = new PersonManager();

        // Save any changes to existing people (and create new ones)
        for (Person person : people) {
            pm.saveOrUpdate(person);
        }

        // Then, if the user checked anyone off to be deleted, delete them
        if (deleteIds != null) {
            for (int id : deleteIds) {
                pm.deletePerson(id);
            }
        }

        return new RedirectResolution(getClass());
    }
View Full Code Here

Examples of net.sourceforge.stripes.examples.bugzooky.biz.PersonManager

            Collection<ValidationError> errors) {
        Person person = null;

        try {
            int id = Integer.valueOf(input);
            PersonManager personManager = new PersonManager();
            person = personManager.getPerson(id);
        }
        catch (NumberFormatException e) {
            errors.add(new SimpleError("The number {0} is not a valid Person ID", input));
        }
View Full Code Here

Examples of test.reverspring.beans.PersonManager

public class TestSingleton extends TestCase {

  public void testSingleton() {
    PersonManagerList list = new PersonManagerList();
    list.getList().add(new PersonManager());
    list.getList().add(new PersonManager());
    list.getList().add(new PersonManager());
    list.getList().add(new PersonManager());
    list.getList().add(new PersonManager());
    list.getList().add(new PersonManager());
    list.getList().add(new PersonManager());
    list.getList().add(new PersonManager());
    list.getList().add(new PersonManager());
    list.getList().add(new PersonManager());
    BeanSet set = new BeanSet();
    set.addBeanDescriptor(list, "personManagerList");
    System.out.println(XmlGenerator.getXml(set));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.