Hi Simone Do you get an exception on the server when the example below runs? (EG a NullPointerException because collezioni is not initialised)
I've added your code to the demo webapp and it works (although I added a constructor to Pippo to initialise collezioni); I've committed the changes and you'll find Pippo in src/test/com/zenesis/qx/remote/test/simple John On 14/07/2011 16:01, "Simone Pandolfo" <s.pando...@erreedi.it> wrote: >i try this: > >================ JAVA =================== >public class Pippo implements Proxied { > > @Property > private String name; > > @Property(onDemand=true,arrayType=Pippo.class) > private ArrayList<Pippo> collezioni; > > @Method > public ArrayList<Pippo> getExampleCode(){ > Pippo prova1 = new Pippo(); > prova1.setName("prova1"); > Pippo prova2 = new Pippo(); > prova2.setName("prova2"); > collezioni.add(prova1); > collezioni.add(prova2); > return collezioni; > } > >[...] > >} >========================================== > >================ QOOXDOO ================= > var prova = new it.project.serverobject.Pippo(); > console.log(prova.getExampleCode()); // return an empty array! >========================================== > >but prova.getExampleCode() return an empty array, what i miss/wrong? > >Regards > Sp > > >Il giorno gio, 14/07/2011 alle 14.44 +0200, Simone Pandolfo ha scritto: >> Il giorno gio, 14/07/2011 alle 11.47 +0100, John Spackman ha scritto: >> > Hi Simone >> > >> > >I get most of the tutorial working, at the moment i'm tring to >> > >understand Collections and Arrays. >> > > >> > >At the moment if i change some data in the java class i don't see the >> > >change in javascript side. >> > >> > Are you changing the Java array or changing one of the objects in the >> > array? The objects in the array must implement the Proxied >> > Interface. >> > >> For the change of the value i have resolved, i miss to include >> ProxyManager.changeProperty() >> >> But of i want send to the backend an array of objects, >> >> like: >> >> var var1 = new com.project.serverobject.ExampleClass(); >> var var2 = new com.project.serverobject.ExampleClass(); >> >> var return = this.boot.testArray([var1,var2]); >> >> The serverobject itself don't work anymore, and result undefined. >> >> how i can send to the backend an array of custom objects? >> >> Thanks >> >> Sp >> >> >> >> >> > >Another question, the comunication is syncronus, for make Async i >>need >> > >to make a thread in java right? >> > >> > No - the communication is driven from the client and goes over normal >>HTTP >> > so Tomcat will provide the thread for you. The client will always >>make >> > synchronous calls to the server, but as much as possible it >>queues/caches >> > changes to minimise network trips. >> > >> > John >> > >> > >> > >> > >> > >>------------------------------------------------------------------------- >>----- >> > AppSumo Presents a FREE Video for the SourceForge Community by Eric >> > Ries, the creator of the Lean Startup Methodology on "Lean Startup >> > Secrets Revealed." This video shows you how to validate your ideas, >> > optimize your ideas and identify your business strategy. >> > http://p.sf.net/sfu/appsumosfdev2dev >> > _______________________________________________ >> > qooxdoo-devel mailing list >> > qooxdoo-devel@lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >> > >> > >-- >Erreedi Srl >Tel. 06.7900639 >Fax 06.79840900 >e-mail: s.pando...@erreedi.it >------------------------------ > > >-------------------------------------------------------------------------- >---- >AppSumo Presents a FREE Video for the SourceForge Community by Eric >Ries, the creator of the Lean Startup Methodology on "Lean Startup >Secrets Revealed." This video shows you how to validate your ideas, >optimize your ideas and identify your business strategy. >http://p.sf.net/sfu/appsumosfdev2dev >_______________________________________________ >qooxdoo-devel mailing list >qooxdoo-devel@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel