This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Micro Frontends in Action and have Michael Geers on-line!
See this thread for details.
Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Dynamic UI rendering using GWT

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
We are developing a web application using GWT in the UI layer. Some of the UIs needs to be dynamically generated/rendered. The data for rendering the UI comes from an external system. For example, for a specific item A, the external application provides data saying the page requires 2 text boxes with labels and one submit button. For another item B, the application provides the data saying for item B, we need to have 5 text boxes one submit button and one cancel button.
So how can we address this scenarion if we are using GWT in UI layer.
As far as i understand, the development process for GWT is:
Define the Java class with the required UI needs.
Compile the class into HMTL+Java Scripts.
Deploy the same.


If we look the above flow, dynamic rendering/dynamic UI generation looks to be impossible if we use GWT framework. Is this true? If not, have you come across any such scenarios and any solutions
thanks in advance.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May I humbly suggest Metawidget? It does dynamic UI generation in the way you describe and supports GWT.

Regards,

Richard.
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Abhilash,

Yes, you can dynamically create or modify your GUI with GWT. You may do it much as you would with Swing. You do not need any other frameworks or toolkits. It works because the GWT-generated JavaScript, like all JavaScript, can manipulate the browser DOM to create the desired web page. If you write code to add widgets, it will add widgets when you ask it to.

I hope this clarifies things.

Glenn
 
author
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

The answer above is correct; you can work in "Swing-style", create panels, add widgets to them, and do everything dynamically. In fact, most of my forms are built up dynamically in this way; only with GWT 2.0 you can start separating a bit the view, by using UIBinder.

Hope this helps!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic