Wednesday, September 29, 2010

Re: How to generate the drop down options onModuleLoad

Well ... if you were using plain-old HTML, you'd have a page reload of some sort to update the drop-down lists right?  An XHR is way less expensive than that.

I generally load cargo data with one or a few XHR requests right after the application loads, but for really dynamic DDLs or SuggestBoxes, you don't have a choice.  If you're doing something simple like the first DDL has 10 options and the second DDL has 10 options that change depending on the first DDL's value, you just load all 110 values into the browser and write the logic to deal with changing the lists (enabling/disabling controls, changing focus, etc) in GWT.

smoyer

On Wed, Sep 29, 2010 at 10:50 AM, Rahul Jain <jainrahul273@gmail.com> wrote:
Thanks Steve for ur response. i tought about this but this wont help me with my project because most of the fields present in the form are dynamic ones so sending a XHR request for field would be very expensive. could u please suggest any another way around.

On Wed, Sep 29, 2010 at 4:48 PM, Steve Moyer <smoyer64@gmail.com> wrote:
The compiled HTML and JavaScript runs in the browser, so you need to make a GWT-RPC or XMLHTTPRequest call to the server for the list contents.

Hang in there ... once you get over the hump it makes a lot more sense!  Try using the GWT plugin and Eclipse ... when you generate a new project there is a greeting service that shows how the client-server communication is done.

Good luck!

smoyer


On Wed, Sep 29, 2010 at 3:16 AM, Rahul <jainrahul273@gmail.com> wrote:
please respond its really urgent

On Sep 28, 6:55 pm, Rahul <jainrahul...@gmail.com> wrote:
> Hello,
>
> Presently am working on GWT to build an front end for my SaaS based
> application and facing a little difficulty with generating a drop down
> list. What I have to do is based on the type of user logged in I have
> to populate a drop down list onModuleLoad so the list of options are
> always fetched from the server. Could anyone please suggest me the
> procedure for the same. Since am new to GWT and as far as i have read
> GWT complies the java code into html and javascript which is runs on
> the server so the compiled code generates the html which is static but
> i need a dynamic html.
>
> At server am using PHP and want to get the same result as we use to
> get the same result from GWT as generated by smarty templates.
>
> Please suggest how should i proceed....

--
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.




--
Sent from my iBerry MacPhone

--
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.



--
Rahul Jain
+919990481340

--
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.



--
Sent from my iBerry MacPhone

--
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