cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hugh Sparks" <>
Subject Cocoon 2.2 - CForm with a dojo slider
Date Tue, 15 Jul 2008 16:06:27 GMT
I have an ajax cform with two widgets: one is a slider
and the other a simple box to display the value.
I want the value of the slider to be displayed
continuously in the box as the user moves the

The flowscript attaches a listener function to the slider.
This function simply displays the current value.

var form ;

function updateSlider()
{      var value = form.lookupWidget("scrollBar").value ;
        form.lookupWidget("valueBox").setValue(value) ;

function startup()
{      form = new Form("cview_form.xml");
        while (true)

This code works correctly when the form template specifies only
two boxes, i.e. widgets with no styling:

        <fi:styling layout="columns"/>
                <ft:widget id="valueBox"/>
                <ft:widget id="scrollBar"/>

But when the widget is displayed as a slider, the
value never changes on the the form:

        <fi:styling layout="columns"/>
                <ft:widget id="valueBox"/>
                <ft:widget id="scrollBar">
                        <fi:styling dojoType="dojo:sliderhorizontal"/>

The updateSlider function is never called.
Any suggestions are appreciated.

-Hugh Sparks,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message