Hi,
is it possible to convert the Visualbuilder JS code to a JavaScriptObject usable in Java-Code?
For example when I'm calling a servlet that returns the Javascript from Visualbuilder (as it is explained in the FAQ) i want to do something like the following:
The bold line is the important one. Is it possible to do something like that? And if so, what so I have to put into that createJavaScriptObject(o) method? I've already tried to convert the returned String in various ways, but didn't have success(JSNI, JSON.decode(), JSOHelper).
Thanks in advance.
is it possible to convert the Visualbuilder JS code to a JavaScriptObject usable in Java-Code?
For example when I'm calling a servlet that returns the Javascript from Visualbuilder (as it is explained in the FAQ) i want to do something like the following:
Code:
final VLayout mainLayout = new VLayout(); mainLayout.setWidth100(); mainLayout.setHeight100(); IButton button = new IButton("Request"); button.addClickHandler(new ClickHandler() { public void onClick(ClickEvent clickEvent) { RPCRequest request = new RPCRequest(); request.setHttpMethod("GET"); request.setActionURL("/test/ui/main"); RPCManager.sendRequest(request, new RPCCallback() { public void execute(RPCResponse rpcResponse, Object o, RPCRequest rpcRequest) { [b]mainLayout.addMember(new Canvas([i]createJavaScriptObject(o)[/i]));[/b] } }); } }); mainLayout.addMember(button); mainLayout.draw();
Thanks in advance.
Comment