You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Niels van Kampenhout <n....@hippo.nl> on 2004/05/03 10:05:17 UTC

RE: [woody / cforms] woody-lib.js causes delay

> -----Original Message-----
> From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]
> Posted At: Friday, April 30, 2004 2:36 AM
> Posted To: Cocoon User List
> Conversation: [woody / cforms] woody-lib.js causes delay
> Subject: Re: [woody / cforms] woody-lib.js causes delay
> 
> 
> On 29.04.2004 11:16, Niels van Kampenhout wrote:
> 
> > Hello list,
> > 
> > In the case of a very large Woody form, it takes a lot of 
> time (up to
> > seconds) before a check (dis)appears in a checkbox after the user
> > clicks in it. The same happens with radio buttons. It seems 
> that this
> > is caused by Woody's javascript code in woody-lib.js, since the
> > problem does not occur  when woody-lib.js is "disabled".
> > 
> > There is not a lot of code in woody-lib.js, however I 
> cannot see what
> > causes the delay. What happens when a checkbox is (un)checked? The
> > delay is rather annoying for users filling out the form. Does anyone
> > have a solution or workaround for this problem?
> 
> Per default no event listener seems to be attached to 
> checkboxes. So in 
> theory there should be no interaction with Javascript. Do you 
> have added 
> any @on* in your code or is it just a plain checkbox??
> 
> Joerg

Hello Joerg,

This is how a multivalue field with checkboxes is defined in the form definition and template. They are generated out of a Schema so each multivaluefield is defined using the same pattern.

Form definition:
----------------
<wd:multivaluefield id="Product-SalesMethod">
  <wd:label>Sales methods</wd:label>
  <wd:help>Distribution method of the product</wd:help><wd:datatype base="string"/>
  <wd:selection-list>
    <wd:item value="Online"><wd:label>Online</wd:label></wd:item>
    <wd:item value="Implementation partners"><wd:label>Implementation partners</wd:label></wd:item>
    <wd:item value="Resellers"><wd:label>Resellers</wd:label></wd:item>
    <wd:item value="Sales force"><wd:label>Sales force</wd:label></wd:item>
    <wd:item value="Other"><wd:label>Other</wd:label></wd:item>
    <wd:item value="None"><wd:label>None</wd:label></wd:item>
  </wd:selection-list>
</wd:multivaluefield>

Form template:
--------------
<wt:widget-label id="Product-SalesMethod"/>
<wt:widget id="Product-SalesMethod">
  <wi:styling list-type="checkbox"/>
</wt:widget>

The resulting HTML page with the form only has the standard <body onload="woody_onload(); ">. Otherwise there are no @on* attributes anywhere in the code.

Thanks,
Niels

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [woody / cforms] woody-lib.js causes delay

Posted by Joerg Heinicke <jo...@gmx.de>.
On 03.05.2004 10:05, Niels van Kampenhout wrote:

> This is how a multivalue field with checkboxes is defined in the form
> definition and template. They are generated out of a Schema so each
> multivaluefield is defined using the same pattern.

> The resulting HTML page with the form only has the standard <body
> onload="woody_onload(); ">. Otherwise there are no @on* attributes
> anywhere in the code.

That sounds really strange. Maybe you can use the JavaScript Debugger 
inside Mozilla to see what's going on.

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org