Friday, February 3, 2012

Re: Custom widget with custom UiBinder markup

Add two methods

@UiChild
public void addLeft(Widget w) {...}

@UiChild
public void addRight(Widget w) {..}

Then make sure you widget implements HasWidgets or similar.

In your uibinder you can now use


<custom:mywidget ui:field="widget"> 
<custom:left><!-your widget><custom:/left>  
<custom:right><!-your widget><custom:/right> 
<!- your widget>
<!- your widget>
<!- your widget> 
</custom:mywidget> 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/pkucQe-mMbwJ.
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.

No comments:

Post a Comment