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

GWT and creation of own widgets

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm actually trying to write an own widget, enabling to realize a kind of "tabbed panel" based on HTML list (<ul> and <li>).
Besides, no enclosing <div> should be generated - opposed to the most GWT widgets.

The background is that I want to integrate my widget into a css framework: as soon as an enclosing <div> comes into play, the whole widget is not displayed correctly.

I've just tried to write an own Widget class, looking like this:



The problem is that the widget from outside (for example HTML) has an enclosing <div>, thus destroying my design.
The add-Method (line 31, from ComplexPanel class) only takes a Widget as first argument, not an Element - so it seems to be unpossible to get rid of the <div>, doesn't it?

Or maybe there is a more elegant way to generate own widgets, bypassing the enclosing <div> tags?

In any case, my final output should look like this:


Any ideas?
 
Ranch Hand
Posts: 45
Google Web Toolkit Fedora Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you planning to use javascript to modify the div you are creating?
 
The only thing that kept the leeches off of me was this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic