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, [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to