hi all,
there is a question. I have the application that uses smartgwt libraries and so written on Java. Now I have to integrate some UI parts written on JavaScript with using SmartClient library. How it can be done?
to clarify it, for example I have some .js file
isc.HLayout.create({
name: "hl_mainLayout",
width: "100%",
height: "50%",
border: "1px solid blue",
members: [
isc.Label.create({
contents: "Navigation",
align: "center",
overflow: "hidden",
width: "30%",
showResizeBar: true,
border: "1px solid blue"
})
]
})
I wrote a wrapper that loads the file from the server and make a conversion from js fragment into JavaScriptObject like
jso = JSOHelper.eval(jsFrag);
where jsFrag is the javascript code shown above with added $wnd.isc prefix
and then I try to create a java component based on layout
HLayout hl = new HLayout(jso);
in order to work with it futher (add a click handlers and so forth)
That approach works for simple components like buttons, labels and so on, but doesn’t work for more complicated components like nested layouts.
I get the error :
'Object doesn't support that property or method'
in http://localhost:8080/crm_gwt/sc/modules/ISC_Core.js
at line 505
Array.addList(_1=>Array[2], _2=>undef, _3=>undef) Layout.initWidget(Obj, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef)
Canvas.init(_1=>Obj, _2=>undef, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef)
Maybe I’m wrong here. Could you please suggest a correct way to integrate interface parts written on JavaScript with Smartclient and get them within java code (SmartGWT) to work with them?