Package com.totsp.gwittir.example.client.remote

Examples of com.totsp.gwittir.example.client.remote.Contact


     *
     */
    public void execute(BoundWidget model) {
        if (model instanceof BoundTable) {
            BoundTable contacts = (BoundTable) model;
            Contact c = (Contact) contacts.getSelected().get(0);
            FlowController.call(contacts, ContactsEntryPoint.EDIT, c);
        }

        if (model instanceof Button) {
            Contact c = new Contact();
            FlowController.call((Button) model, ContactsEntryPoint.EDIT, c);
        }
    }
View Full Code Here


        binding.unbind();
        binding.getChildren().clear();
    }

    public void set(BoundWidget widget) {
        final Contact c = (Contact) widget.getModel();
        final ContactEdit e = (ContactEdit) widget;
        binding.getChildren()
               .add(new Binding(e.firstName, "value", c, "firstName"));
        binding.getChildren()
               .add(new Binding(e.lastName, "value", c, "lastName"));
View Full Code Here

   
    /**
     * Test of saveContact method, of class com.totsp.gwittir.example.remote.ContactsServiceServlet.
     */
    public void testSaveContact() throws Exception {
        Contact c = new Contact();
        c.setFirstName("Charlie");
        c.setLastName("Collins");
        StateLookup state = new StateLookup();
        state.id = Integer.valueOf( 13 );
        state.code = "GA";
        state.name = "Georgia";
        ArrayList addresses = new ArrayList();
        Address a = new Address();
        a.setAddress1( "555 Peachtree St.");
        a.setCity( "Somewhere");
        a.setState( state );
        TypeLookup type = new TypeLookup();
        type.id = Integer.valueOf( 1 );
        type.name = "home";
        a.setType( type );
        addresses.add( a );
        c.setAddresses( addresses );
       
        ContactsServiceServlet servlet = new ContactsServiceServlet();
        servlet.setMappings( MAPPING_PROPS );
        servlet.setService( service );
        c = servlet.saveContact( c );
       
        Address work = new Address();
        work.setAddress1("333 Work St.");
        work.setState( state );
        work.setType( type );
        work.setZip("30308");
       
        c.getAddresses().add(work);
       
        servlet.saveContact( c );
    }
View Full Code Here

TOP

Related Classes of com.totsp.gwittir.example.client.remote.Contact

Copyright © 2018 www.massapicom. 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.