You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gunter D'Hondt <gu...@sofico.be> on 2004/07/28 10:38:44 UTC
Woody binding: save/load-form not triggered
I've got the following binding definition but the save-form and load-form
is never triggered (or is doesn't have any effect anyway):
<bnd:value id="field1" path="field1/value">
<bnd:on-update>
<bnd:javascript id="field1" path="field1/value">
<bnd:load-form>
var appValue = jxpathPointer.getValue();
if (appValue==""||appValue==null) appValue="0";
widget.setValue(appValue);
</bnd:load-form>
<bnd:save-form>
var formValue = widget.getValue();
if (formValue==""||formValue==null)
jxpathPointer.setValue("0");
else
jxpathPointer.setValue(appValue);
</bnd:save-form>
</bnd:javascript>
</bnd:on-update>
</bnd:value>
Any help is welcome!
Regards,
Gunter D'Hondt
SOFICO NV Belgium
Re: Woody binding: save/load-form not triggered
Posted by Bruno Dumon <br...@outerthought.org>.
On Thu, 2004-07-29 at 10:37, Gunter D'Hondt wrote:
> I've removed the value binding and just put a javascript-binding
> inside my repeater but still no action is triggered (only the other
> value bindings are logging). I've got other bindings where the
> javascript inside the value binding does work; like this one:
>
> <bnd:value id="name" path="customername">
> <bnd:on-update>
> <bnd:javascript id="name" path="..">
> <bnd:load-form/>
> <bnd:save-form>
> var wsfield = jxpathContext.getPointer('country');
> wsfield.setValue("159");
> </bnd:save-form>
> </bnd:javascript>
> </bnd:on-update>
> </bnd:value>
>
> But that only works for jxpath's not equal to the one of the value
> binding; so I cannot change the "customername" but only the "country".
>
> Is the javascript-binding recently added coz I'm working on a cvshead
> from 12/May ?
No, it's been there for a long time.
I recommend switching to CForms though (it's just some XML namespace and
java package names that need updating, see info on the wiki).
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Woody binding: save/load-form not triggered
Posted by Gunter D'Hondt <gu...@sofico.be>.
Consider this issue solved; apparently if value binding and javascript
binding is performed on the same formfield (or binding field) then a
subnode is made; so the result is:
<customername>
<customername>...</customername>
</customername>
Regards,
Gunter
Gunter D'Hondt <gu...@sofico.be>
29/07/2004 10:37
Please respond to
users@cocoon.apache.org
To
users@cocoon.apache.org
cc
Subject
Re: Woody binding: save/load-form not triggered
I've removed the value binding and just put a javascript-binding inside my
repeater but still no action is triggered (only the other value bindings
are logging). I've got other bindings where the javascript inside the
value binding does work; like this one:
<bnd:value id="name" path="customername">
<bnd:on-update>
<bnd:javascript id="name" path="..">
<bnd:load-form/>
<bnd:save-form>
var wsfield = jxpathContext.getPointer('country');
wsfield.setValue("159");
</bnd:save-form>
</bnd:javascript>
</bnd:on-update>
</bnd:value>
But that only works for jxpath's not equal to the one of the value
binding; so I cannot change the "customername" but only the "country".
Is the javascript-binding recently added coz I'm working on a cvshead from
12/May ?
Regards,
Gunter
Bruno Dumon <br...@outerthought.org>
29/07/2004 10:03
Please respond to
users@cocoon.apache.org
To
users@cocoon.apache.org
cc
Subject
Re: Woody binding: save/load-form not triggered
On Wed, 2004-07-28 at 10:38, Gunter D'Hondt wrote:
> I've got the following binding definition but the save-form and
> load-form is never triggered (or is doesn't have any effect anyway):
>
> <bnd:value id="field1" path="field1/value">
> <bnd:on-update>
> <bnd:javascript id="field1" path="field1/value">
> <bnd:load-form>
> var appValue = jxpathPointer.getValue();
> if (appValue==""||appValue==null) appValue="0";
> widget.setValue(appValue);
> </bnd:load-form>
> <bnd:save-form>
> var formValue = widget.getValue();
> if (formValue==""||formValue==null)
> jxpathPointer.setValue("0");
> else
> jxpathPointer.setValue(appValue);
> </bnd:save-form>
> </bnd:javascript>
> </bnd:on-update>
> </bnd:value>
>
> Any help is welcome!
Simply put the javascript binding outside of the value binding, you
don't need the value binding at all.
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Woody binding: save/load-form not triggered
Posted by Gunter D'Hondt <gu...@sofico.be>.
I've removed the value binding and just put a javascript-binding inside my
repeater but still no action is triggered (only the other value bindings
are logging). I've got other bindings where the javascript inside the
value binding does work; like this one:
<bnd:value id="name" path="customername">
<bnd:on-update>
<bnd:javascript id="name" path="..">
<bnd:load-form/>
<bnd:save-form>
var wsfield = jxpathContext.getPointer('country');
wsfield.setValue("159");
</bnd:save-form>
</bnd:javascript>
</bnd:on-update>
</bnd:value>
But that only works for jxpath's not equal to the one of the value
binding; so I cannot change the "customername" but only the "country".
Is the javascript-binding recently added coz I'm working on a cvshead from
12/May ?
Regards,
Gunter
Bruno Dumon <br...@outerthought.org>
29/07/2004 10:03
Please respond to
users@cocoon.apache.org
To
users@cocoon.apache.org
cc
Subject
Re: Woody binding: save/load-form not triggered
On Wed, 2004-07-28 at 10:38, Gunter D'Hondt wrote:
> I've got the following binding definition but the save-form and
> load-form is never triggered (or is doesn't have any effect anyway):
>
> <bnd:value id="field1" path="field1/value">
> <bnd:on-update>
> <bnd:javascript id="field1" path="field1/value">
> <bnd:load-form>
> var appValue = jxpathPointer.getValue();
> if (appValue==""||appValue==null) appValue="0";
> widget.setValue(appValue);
> </bnd:load-form>
> <bnd:save-form>
> var formValue = widget.getValue();
> if (formValue==""||formValue==null)
> jxpathPointer.setValue("0");
> else
> jxpathPointer.setValue(appValue);
> </bnd:save-form>
> </bnd:javascript>
> </bnd:on-update>
> </bnd:value>
>
> Any help is welcome!
Simply put the javascript binding outside of the value binding, you
don't need the value binding at all.
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Woody binding: save/load-form not triggered
Posted by Bruno Dumon <br...@outerthought.org>.
On Wed, 2004-07-28 at 10:38, Gunter D'Hondt wrote:
> I've got the following binding definition but the save-form and
> load-form is never triggered (or is doesn't have any effect anyway):
>
> <bnd:value id="field1" path="field1/value">
> <bnd:on-update>
> <bnd:javascript id="field1" path="field1/value">
> <bnd:load-form>
> var appValue = jxpathPointer.getValue();
> if (appValue==""||appValue==null) appValue="0";
> widget.setValue(appValue);
> </bnd:load-form>
> <bnd:save-form>
> var formValue = widget.getValue();
> if (formValue==""||formValue==null)
> jxpathPointer.setValue("0");
> else
> jxpathPointer.setValue(appValue);
> </bnd:save-form>
> </bnd:javascript>
> </bnd:on-update>
> </bnd:value>
>
> Any help is welcome!
Simply put the javascript binding outside of the value binding, you
don't need the value binding at all.
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org