1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    2
    Vote Rating
    0
    godspeed is on a distinguished road

      0  

    Default Seam 3 Remoting Model integration

    Seam 3 Remoting Model integration


    I am dying to move forward with Sencha Touch 2, but I am not sure whether or not I will be able to leverage Seam 3's powerful remoting capabilities. I am struggling to see wrap the technology with Sencha's data components, especially the Proxy in particular. Is this something that is doable? There are other options if necessary, and I would prefer not to fight the Touch 2 framework!

    http://docs.jboss.org/seam/3/remotin...ing-model.html

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,677
    Vote Rating
    749
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    What is the response going to look like?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    2
    Vote Rating
    0
    godspeed is on a distinguished road

      0  

    Default


    The "response" essentially is a javascript object containing the server-side model/entity values ... you can even lazily load associations by calling the model.expand() function. Thanks for your help!

    Code:
    model.expand(model.getValue("person"),"addresses", loadAddressesCallback);

    Code:
    functioncreatePerson(){
        var action = new Seam.Action()
                .setBeanType("org.jboss.seam.remoting.examples.model.PersonAction")
                .setMethod("createPerson");
    
    
        model = new Seam.Model();
        model.addBeanProperty("person", "org.jboss.seam.remoting.examples.model.PersonAction", "person");
        model.fetch(action, fetchCallback);
    }
    
    
    function editPerson(personId) {
        var action = new Seam.Action()
                .setBeanType("org.jboss.seam.remoting.examples.model.PersonAction")
                .setMethod("editPerson")
                .addParam(personId);
    
    
        model = new Seam.Model();
        model.addBeanProperty("person", "org.jboss.seam.remoting.examples.model.PersonAction", "person");
        model.fetch(action, fetchCallback);
    }
    
    
    function fetchCallback(model) {
        var person = model.getValue("person");
        document.getElementById("firstName").value = person.getFirstName();
        document.getElementById("lastName").value = person.getLastName();
        document.getElementById("dob").value = dateToString(person.dateOfBirth);
    
    
        var addressDiv = document.getElementById("addresses");
        clearElement(addressDiv);
        addressDiv.appendChild(createLinkRow("Load addresses", "loadAddresses()", "loadAddresses"));
    
    
        document.getElementById("personDetail").style.display = "block";
    
    
        if (person.addresses) loadAddressesCallback();
    }
    
    
    function loadAddresses() {
        model.expand(model.getValue("person"), "addresses", loadAddressesCallback);
    }

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar