cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gunter D'Hondt <gunter.dho...@sofico.be>
Subject Re: Woody binding: save/load-form not triggered
Date Thu, 29 Jul 2004 09:26:44 GMT
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 <gunter.dhondt@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 <bruno@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



Mime
View raw message