Thank you.
On Sep 24, 12:10 pm, Sripathi Krishnan <[email protected]>
wrote:
> The dictionary class is intended for this purpose, so you are doing the
> right thing.
>
> If the parameter you need to pass is already available in the URL, then you
> can also read it directly from the url using the Window.Location class. For
> eg, if your jsp was invoked as /some.jsp?param1=value1¶m2=value2, then
> you can directly access param1 and param2 in your GWT code. But if you want
> to pass a totally different parameter, then the dictionary is the best
> solution.
>
> --Sri
>
> 2009/9/23 dann <[email protected]>
>
>
>
> > Thanks for the reply. My GWT module is part of classic web
> > application embedded inside an html (generated using jsp). There are
> > certain parameters (string type) I'd like to pass a GWT module upon
> > initial load inside my page. So far, my solution is to use a
> > com.google.gwt.i18n.client.Dictionary. Is this the best way to pass
> > parameters to GWT module upon loading or there are better
> > alternatives?"
>
> > e.g. in my JSP/XSL page
>
> > <script type="text/javascript">
> > var ID = {
> > identifier:"<xsl:value-of select="$path/@ID" disable-output-
> > escaping="yes"/>"
> > };
> > </script>
>
> > and on the GWT module entry point:
>
> > Dictionary dic = null;
> > String ID = null;
>
> > try {
> > dic = Dictionary.getDictionary("ID");
> > ID = dic.get("identifier");
> > } catch (Exception e) {
> > Window.alert("No ID found!");
> > }
>
> > /* fetch some data based on the ID */
>
> > Thanks,
> > Dann
>
> > On Sep 24, 12:23 am, Trevis <[email protected]> wrote:
> > > I'm not 100% sure i understand the question but it sounds like the
> > > answer would be History. That's how you tell a GWT app to show a
> > > specific "page".
>
> > > On Sep 23, 1:38 am, "[email protected]" <[email protected]>
> > > wrote:
>
> > > > My GWT app is embedded inside a tab view of a JSP page and I wanted to
> > > > render the GWT module based on the content/context of the parent
> > > > HTML.
>
> > > > This requires passing initial value to the GWT app entry point and
> > > > from there the GWT app can fetch values to server using RPC. I was
> > > > able to do this using com.google.gwt.i18n.client.Dictionary
> > > > approach.
>
> > > > My question is, is this the best way to do it or is there better
> > > > alternative/s?
>
> > > > Thanks,
> > > > Dann
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---