File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in integrating Single GWt Textboxs in jsp

 
Jordan Josh
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Pie
Posts: 1227
10
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are mixing up two different things.
one is server side technology and other is a client side technology
 
Jordan Josh
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Pie
Posts: 1227
10
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Pie
Posts: 1227
10
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Jordan Josh
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jordan Josh
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Pie
Posts: 1227
10
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glad you found the answer,

I am still interested in what your question was
 
Maneesh Godbole
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
He was probably confused on how to set the loginID value inside the TextBox
 
salvin francis
Bartender
Pie
Posts: 1227
10
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic