Here I am again, posting another question... I must say that my
experience with OpenLaszlo either makes me feel stupid or makes me
think there's still a lot of work around OpenLaszlo to be done... Hope
it's the first one, so that OpenLaszlo remains being a possibility to
my project.
I'm trying to find a way to do the following:
Create a class component, that will have a remotecall to a started
javarpc. That remotecall is supposed to map its returned value to a
dataset local to the class. Is that possible? I tried the following
code, but with no success.
<library>
<class name="Component">
<handler name="oninit">
var dataset = new LzDataset(this, {
name : "available_models"
});
this.getAvailableModels.invoke(['equipment']);
Debug.write("Created component " + this.name);
</handler>
<datacombobox shownitems="6" defaulttext="Choose One..."
itemdatapath="local:parent.available_models:/*"
valuedatapath="name()">
<handler name="onselected">
Debug.write("Selected model " +
this.getValue());
canvas.configuration.selectModel.invoke(['equipment',
this.getValue()]);
</handler>
</datacombobox>
<remotecall name="getAvailableModels"
dataobject="parent.available_models"
funcname="getAvailableModelsOL"
remotecontext="$once{canvas.configuration}" />
</class>
</library>
I also tried another things like, instead of creating the dataset
locally to the class to put it into canvas, but still the remotecall
was not able to see the dataset.
I wonder if the only way to make this work, is to put both dataset and
remotecall into canvas...
Regards,
Daniel Garrido