if you try to apply value on textbox it is simple but if you use fully GWT
textbox component then there are two solutions

1. <div id="textBox"></div><input type="hidden" id="textBoxValue" value="<?=
Constant.TextBoxValue; ?>"/>
   Constant.TextBoxValue is located in your server side Java Model and JSP
file has the above two html lines.

   But in GWT onModuleLoad() method you need to write the following three
lines.

   a) Hidden hidden  =  Hidden.wrap(DOM.getElementById("textBoxValue"));

   b) TextBox t = new TextBox(hidden.getText());

   c) RootPanel.get("textBox").add(t);

2. in Jsp there are no hidden field concepts.all you have only <div
id="textBox"></div> tag.
    In this case your GWT onModuleLoad() have the following lines.

   public function AAA implements EntryPoint {
        TextBox t = new TextBox();

        function onModuleLoad() {
          Call gwt-rpc to connect to server side model to retrieve the
default value.
           if results arrive in Browser then render that default textvalue
to the html.

           // this is ajax method i did not write details
           function onSuccess() {
                   // render the textbox default value
                   t.setText = retrieved gwt-rpc default textbox value;
           }


           RootPanel.get("textBox").add(t);
        }
  }
   Call






On Wed, Mar 31, 2010 at 6:38 PM, warrior <jatanbhav...@gmail.com> wrote:

> Hi to all,
>
>  I am Trying to integrate GWT component in existing where i need to
> replace all html componenet with GWT componenet.I am starting with
> Login page where i need to replace Text box.
>
> I can show text box with the code
> <div id="textBox"></div> but what i suppose to do to give this textbox
> a value on jsp page?
> Value is coming somewhere from request.
>
> --
> 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-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to