开发者

Custom widgets containing other HTML/widgets

I'm trying to create a custom widget that would internally be represented by a simple DIV and a BUTTON element, but which would accept other widgets inside it, pretty much like HTMLPanel.

So, I want something like this...

<div class="XXX">
  <button class="YYY"></button>
  {other widget(s) here}
</div>

...encapsulated inside some widget, say WrapperWidget. Then, I could use this WrapperWidget inside some other (multiple) ui.xml files:

开发者_Python百科
<ns:WrapperWidget>
   <ul>
     <li>item 1</li>
     <li>item 2</li>
   </ul>
</ns:WrapperWidget>

How is that achievable in GWT?

Thanks!


I don't use UI binder, so I can't help you there. To nest widgets, one would usually use a Composite http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/Composite.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜