cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hugh Sparks" <h...@csparks.com>
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
slider.

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");
        form.lookupWidget("scrollBar").addValueChangedListener(updateSlider) 
;
        while (true)
                form.showForm("cview-display-pipeline.jx");
}

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

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

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

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

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

-Hugh Sparks, hugh@csparks.com


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


Mime
View raw message