Sunday, August 14, 2011

How to put html created by uibinder to another uibinder xml template?

For example,I have a html called Indicator created by uibinder like
this:
------------------------------------------------------------------------------------------
public class IndicatorImpl extends UIObject implements Indicator
{

private static IndicatorImplUiBinder uiBinder =
GWT.create(IndicatorImplUiBinder.class);

interface IndicatorImplUiBinder extends UiBinder<Element,
IndicatorImpl>
{
}

public IndicatorImpl()
{
setElement(uiBinder.createAndBindUi(this));
}
//methods.....................................
}
-------------------------------------------------------------------------------------------
And want to reference above in this Widget's template:
-------------------------------------------------------------------
............................................
<g:HTMLPanel>
<aImpl:IndicatorImpl ui:field="indicator" />
<.g:HTMLPanel>
..............................................
-------------------------------------------------------------------

This will generate compile error:
----------------------------------------------
[ERROR] Line 74: The method addAndReplaceElement(Widget, Element) in
the type HTMLPanel is not applicable for the arguments (IndicatorImpl,
Element)
----------------------------------------------

Question is since HTMLPanel can contain htmls,why can't it accept
htmls created by uibinder?Or did I do something wrong here?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate