[Laszlo-dev] Embedding combox box within a checkbox?

dhay at lexmark.com dhay at lexmark.com
Thu Apr 28 09:20:41 PDT 2005


Hi,

We want a combobox within a checkbox tag so that it appears when the
checkbox is clicked.

However, we're having trouble with the datapaths.  I originally thought we
didn't need to specify one for the checkbox, and just set it for the
textlistitems.  However if we do that nothing shows up.  I then tried it
like below, but the listitmes then always only contain the latter Job
values ie worker2 and farmer2.

Can someone explain what's going on?  Why does the combobox need a
datapath?

cheers,

David

<canvas debug="true">

<dataset name="people">
      <Person name="Joe">
                  <Job value="worker"></Job>
                  <Job value="farmer"></Job>
      </Person>
      <Person name="Joe2">
                  <Job value="worker2"></Job>
                  <Job value="farmer2"></Job>
      </Person>
</dataset>

      <view x="10" y="20" id="treeView" oninit="Debug.write('check7')">
            <simplelayout axis="y" spacing="10"/>
            <checkbox datapath="people:/Person"
                  text="$path{'@name'}"
                  name="${this.text">
                  <combobox datapath="people:/Person"
                        name="${this.parent.text + 'cbox'}"
                        visible="${parent.value}" x="35" y="25"
                        width="130" editable="false">
                        <textlistitem datapath="Job"
                              text="$path{'@value'}"
                              name="${this.text}">
                        </textlistitem>
                  </combobox>
            </checkbox>
      </view>
</canvas>




More information about the Laszlo-dev mailing list