Last active
December 16, 2015 16:29
-
-
Save nikhilv/5463956 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override public Widget doInit() | |
{ | |
final VerticalPanel verticalPanel = new VerticalPanel(); | |
ExpandStringRequest expandStringRequest = this.getRequestFactory().createExpandStringRequest(); | |
expandStringRequest.setValue("$[/javascript var list = myUser.projectList; (!(typeof(list)===\"undefined\")) ? list : getProperty(\"/projects/PluginGlobals/projectList\");]"); | |
expandStringRequest.setCallback(new CommanderObjectCallback() { | |
@Override | |
public void handleResponse(CommanderObject commanderObject) { | |
verticalPanel.add(new Label(commanderObject.get("value"))); | |
} | |
@Override | |
public void handleError(CommanderError commanderError) { | |
} | |
}); | |
this.getRequestManager().doRequest(expandStringRequest); | |
// We're done setting up the UI. Return the panel. | |
return verticalPanel; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment