Tuesday, January 1, 2013

Re: dynamic update data

Happy New Year!

Your idea is not bad. But I don't know how to achieve your logic. I trying to implement your idea without success.
I can add my new pizza object to ArrayList of pizza objects but how to update the ListBox???


On Mon, Dec 24, 2012 at 6:14 PM, Sebastián Gurin <sebastigurin@gmail.com> wrote:
If the pizza objects that your client posses are not a very big number, then, instead updating against the server, you can mantain a local collection of pizzas in the client. I mean, write a class like PizzaHome or something like that that contains a collection or a map of pizzas. When you add a new pizza or remove a pizza, make a call to the server for adding/updating and then modify the local pizza home PizzaHome.getInstance().addNew(pizza1). The Pizza home can be an Observable that notify other interested part of your client when the local pizza collection changes. Also from time to time you can synchronize this PizzaHome with your server.

On Monday, December 24, 2012 8:48:00 AM UTC-2, Aldin wrote:
Hi guys,

I am developing pizza ordering application. I have two forms:

1) For inserting new pizza
2) and for ordering.

Here you can see:




When I insert a new pizza and go to check on combo box (picture ordering) I can't see my new pizza in combo box. The new pizza is inserted in my databases. The pizzas in combo box are from my database.

I have one idea.  But I don't think it is good. To use

    Timer t = new Timer() {        public void run() {          //display all pizza from my database every 2 se to combobox        }      };
t.schedule(2000);

Any idea for better approach???
Thanks

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/1VMHjsTx0o4J.

To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment