• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in integrating Single GWt Textboxs in jsp

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Glad you found the answer,

I am still interested in what your question was
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
He was probably confused on how to set the loginID value inside the TextBox
 
salvin francis
Bartender
Posts: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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


hmmm
 
Hang a left on main. Then read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic