Wednesday, October 31, 2012

Re: how to pass a String[] array in the declarative UI

You are trying to add logic to your UiBinder XML file which is not what it is intended to do. View-specific logic goes in the java code.

Just do it in the constructor or if you are caching your views (which is good for performance) in a dedicated method that can be called before the view is rendered by your Activity.

For the sake of an example, lets assume your UiBinder class is called MyView.

public class MyView extends Composite {

//definition of UiBinder interface and instance

FinishButton finish;

public MyView(){

public MyView(Rights permissions){
public void updateUi(Rights permissions){
if( permissions == FINISH_ORDER || permissions == CANCEL_ORDER ) 

void onClickFinish(ClickEvent e){
//handle the click

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment