This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes GWT and the fly likes Problem in integrating Single GWt Textboxs in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "Problem in integrating Single GWt Textboxs in jsp" Watch "Problem in integrating Single GWt Textboxs in jsp" New topic
Author

Problem in integrating Single GWt Textboxs in jsp

jaan bhavsar
Ranch Hand

Joined: Aug 23, 2008
Posts: 32
Hi to All,

I am working on web application where i need to change all HTML Component with GWT component.I am trying to put GWT Component on JSP page.
I added this line in Java file of in client.

Then in jsp page


I generated .js and included in jsp page.i need to give value in Div tag to login id which stored some id, like it is given in to html.
textbox?
To render GWT componenet we use Div tag but how can i give value in div tag?
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

you are mixing up two different things.
one is server side technology and other is a client side technology


My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
jaan bhavsar
Ranch Hand

Joined: Aug 23, 2008
Posts: 32
salvin francis wrote:you are mixing up two different things.
one is server side technology and other is a client side technology


Hi salvin,
Thank you for your suggestion.But can you focus more on this issue.
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

errr...
here is a hack that works but i would not recommend:

suppose you had code like:


you could access this in GWT as a Textbox as:



Basically if you have the element you can convert it into a widget...
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

ok i think i misunderstood the problem,

you mean to say that you have the textbox and you want to access its value and place it into a div tag?

in that case i would recommend to give the textbox an id then access its element using RootPanel.get("whatever").getElement()

and then convert it to a TextBox object.

Then you can access its text and set it where ever you want on screen.

Remember you can access any element once you know its id...
jaan bhavsar
Ranch Hand

Joined: Aug 23, 2008
Posts: 32
salvin francis wrote:ok i think i misunderstood the problem,

you mean to say that you have the textbox and you want to access its value and place it into a div tag?

in that case i would recommend to give the textbox an id then access its element using RootPanel.get("whatever").getElement()

and then convert it to a TextBox object.

Then you can access its text and set it where ever you want on screen.

Remember you can access any element once you know its id...


No GWt text box will replace existing html text box. no html code only gwt component.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167
    
    8

You need to rephrase your question. Personally, I am not sure I understand your question either.
If you have a TextBox you can use the getter and setter methods. Is this what you are asking?

Forget the JSP tags and stuff. Please tell us what you want to do with the TextBox


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
jaan bhavsar
Ranch Hand

Joined: Aug 23, 2008
Posts: 32
Hey thank you for your help,
I found the solution with getter and setter and also implementing listeners.

Again thank you for your help
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

Glad you found the answer,

I am still interested in what your question was
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167
    
    8

He was probably confused on how to set the loginID value inside the TextBox
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

Maneesh Godbole wrote:He was probably confused on how to set the loginID value inside the TextBox

hmmm
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in integrating Single GWt Textboxs in jsp
 
Similar Threads
document.forms[0].submit(); throws Invalid Argument in IE
CSS is not get included in Richfaces while using DOJO
trying to change value in a text field when a checkbox is ticked - trouble id'ing text field(SOLVED)
Getting null while trying to get value of Multiple list
Object does not support property error!