In fact, I already tried to change the String that is returned by getClassName
of ScriptableWidget like this:
public String getClassName() {
return "_Widget";
}
Of course I deleted the build-directory and rebuilt Cocoon afterwards.
But toString() still returns the String "[object Widget]" (like before).
Invocation of getClassName returns an error.
org.mozilla.javascript.EcmaError: TypeError: Cannot find function getClassName.
(file:/D:/apache-tomcat-6.0.10/webapps/dibatest/exKo/flows/exKo.js#73)
> >
> > Also the above looks very much like some data binding. Maybe you
can
> > just reuse the binding framework.
>
> What do you mean by that?
CForms has a binding framework, with which you can bind your form
model to a
data model (be it objects or XML). I thought before programming
binding of form
model to a page local and back you could reuse that one. But if
PageLocal has so
much auto magic you don't need it.
Maybe there is another way to solve that, but the intention is to save the data
only after the user has confirmed his data at the end of the process. And not
to save data, that is not necessary.
Imagine Pages A, B and C. The data of B is only necessary, if one of the values
entered in A has a special value.
If the user fills out A, B and C and then decides to go back and choose another
value on that deciding variable in A, the data in B should be deleted before
saving it in the database.
pageLocal does that.
The intention is not to delete parts of the data manually before saving it,
because depending on the complexity of the form this can cause mistakes easily.
> Yes, I wanted to say, that reading the values in a loop doesn't
work.
Why?
var test = false;
for(var schluessel in dataModel)
{
test = true;
}
Either the loop is not executed if written like this (as if it were a
javascript object) or
an error is thrown if I try to call a function like e.g.
var test = false;
for(var schluessel in dataModel.getChildren())
{
test = true;
}
The error says that the function getChildren is not defined.
Thanks again!
Franzi
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]