So the problem you are having is you don't know how to update the labels under the dropdown list when the dropdown list's selection changes, correct?
Here is a demo panel that should show you how to do such a thing:
<abs contexttype="opengear" style="">
<meta>
<params>
<param access="1" maxlength="0" name="Names" oid="params.names" precision="0" stateless="true" type="STRING_ARRAY" value="Name 1;Name 2;Name 3" widget="default">
<value>Name 1</value>
<value>Name 2</value>
<value>Name 3</value>
</param>
<param access="1" maxlength="0" name="Parties" oid="params.parties" precision="0" stateless="true" type="STRING_ARRAY" value="Party 1;Party 2;Party 3" widget="default">
<value>Party 1</value>
<value>Party 2</value>
<value>Party 3</value>
</param>
<param access="1" constrainttype="INT_NULL" name="Votes" oid="params.votes" precision="0" stateless="true" type="INT16_ARRAY" value="1;2;3" widget="default"/>
<param access="1" constrainttype="STRING_CHOICE" name="Table" oid="params.table" precision="0" stateless="true" type="INT16" value="-1" widget="table">
<constraint>params.names</constraint>
<constraint>params.parties</constraint>
<constraint>params.votes</constraint>
</param>
<param access="1" maxlength="0" name="XPression Names" oid="xpression.names" precision="0" type="STRING_ARRAY" value="Name 3;Name 3;" widget="label">
<value>Name 3</value>
<value>Name 3</value>
<value>
</value>
</param>
<param access="1" maxlength="0" name="XPression Parties" oid="xpression.parties" precision="0" type="STRING_ARRAY" value="Party 3;Party 3;" widget="label">
<value>Party 3</value>
<value>Party 3</value>
<value>
</value>
</param>
<param access="1" constrainttype="INT_NULL" name="XPression Votes" oid="xpression.votes" precision="0" type="INT16_ARRAY" value="3;3;0" widget="label"/>
<param access="1" constrainttype="INT_CHOICE" name="XPression Selectors" oid="xpression.selectors" precision="0" type="INT16_ARRAY" value="2;2;-1" widget="default">
<constraint key="-1">SELECT ONE</constraint>
<constraint key="0">Name 1</constraint>
<constraint key="1">Name 2</constraint>
<constraint key="2">Name 3</constraint>
</param>
</params>
<api>function copyParameters(index)
{
var selectedIndex = params.getValue('xpression.selectors', index);
var nameToUse = '';
var partyToUse = '';
var votesToUse = 0;
if (selectedIndex >= 0)
{
nameToUse = params.getValue('params.names', selectedIndex);
partyToUse = params.getValue('params.parties', selectedIndex);
votesToUse = params.getValue('params.votes', selectedIndex);
}
params.setValue('xpression.names', index, nameToUse);
params.setValue('xpression.parties', index, partyToUse);
params.setValue('xpression.votes', index, votesToUse);
}
</api>
</meta>
<param expand="true" height="483" left="5" oid="params.table" showlabel="false" top="7" width="993"/>
<table height="249" left="6" style="bg#dark;bdr:etched;" top="498" width="327">
<tr>
<param colspan="2" element="0" expand="true" fill="both" insets="2,2,2,2" left="13" oid="xpression.selectors" rowspan="1" runtasksonload="true" showlabel="false" top="501" weightx="1.0" weighty="1.0">
<task tasktype="ogscript">/*! block id=1000 !*/
copyParameters(0)
/*!!
<block id="1000" type="function_copyParameters" x="10" y="100" w="243" index="0" />
!!*/
/*!!<checksum>709cb77fa54965293d59b588d7407ca6</checksum>!!*/</task>
</param>
</tr>
<tr>
<label colspan="1" fill="both" insets="2,2,2,2" name="Name: " rowspan="1" style="txt-align:east" weightx="0.0" weighty="1.0"/>
<param colspan="1" element="0" expand="true" fill="both" insets="2,2,2,2" oid="xpression.names" rowspan="1" showlabel="false" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<label colspan="1" fill="both" insets="2,2,2,2" name="Party: " rowspan="1" style="txt-align:east;" weightx="0.0" weighty="1.0"/>
<param colspan="1" element="0" expand="true" fill="both" insets="2,2,2,2" oid="xpression.parties" rowspan="1" showlabel="false" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<label colspan="1" fill="both" insets="2,2,2,2" name="Votes: " rowspan="1" style="txt-align:east;" weightx="0.0" weighty="1.0"/>
<param colspan="1" element="0" expand="true" fill="both" insets="2,2,2,2" oid="xpression.votes" rowspan="1" showlabel="false" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<button colspan="2" fill="both" insets="2,2,2,2" name="Refresh" rowspan="1" top="501" weightx="1.0" weighty="1.0">
<task tasktype="ogscript">/*! block id=1000 !*/
copyParameters(0)
/*!!
<block id="1000" type="function_copyParameters" x="10" y="100" w="243" index="0" />
!!*/
/*!!<checksum>709cb77fa54965293d59b588d7407ca6</checksum>!!*/</task>
</button>
</tr>
</table>
<table height="249" left="340" style="bg#dark;bdr:etched;" top="500" width="327">
<tr>
<param colspan="2" element="1" expand="true" fill="both" insets="2,2,2,2" left="13" oid="xpression.selectors" rowspan="1" runtasksonload="true" showlabel="false" top="501" weightx="1.0" weighty="1.0">
<task tasktype="ogscript">/*! block id=1001 !*/
copyParameters(1)
/*!!
<block id="1001" type="function_copyParameters" x="10" y="100" w="243" index="1" />
!!*/
/*!!<checksum>c8adfab8b853c3fd0492e5fd9cb0aa82</checksum>!!*/</task>
</param>
</tr>
<tr>
<label colspan="1" fill="both" insets="2,2,2,2" name="Name: " rowspan="1" style="txt-align:east" weightx="0.0" weighty="1.0"/>
<param colspan="1" element="1" expand="true" fill="both" insets="2,2,2,2" oid="xpression.names" rowspan="1" showlabel="false" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<label colspan="1" fill="both" insets="2,2,2,2" name="Party: " rowspan="1" style="txt-align:east;" weightx="0.0" weighty="1.0"/>
<param colspan="1" element="1" expand="true" fill="both" insets="2,2,2,2" oid="xpression.parties" rowspan="1" showlabel="false" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<label colspan="1" fill="both" insets="2,2,2,2" name="Votes: " rowspan="1" style="txt-align:east;" weightx="0.0" weighty="1.0"/>
<param colspan="1" element="1" expand="true" fill="both" insets="2,2,2,2" oid="xpression.votes" rowspan="1" showlabel="false" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<button buttontype="push" colspan="2" fill="both" insets="2,2,2,2" name="Refresh" rowspan="1" top="501" weightx="1.0" weighty="1.0">
<task tasktype="ogscript">
/*! block id=1000 !*/
copyParameters(1)
/*!!
<block id="1000" type="function_copyParameters" x="10" y="100" w="243" index="1" />
!!*/
/*!!<checksum>4a92c89c8fdfbbe9b283240a348724c1</checksum>!!*/</task>
</button>
</tr>
</table>
<table height="249" left="677" style="bg#dark;bdr:etched;" top="502" width="327">
<tr>
<param colspan="2" element="2" expand="true" fill="both" insets="2,2,2,2" left="13" oid="xpression.selectors" rowspan="1" runtasksonload="true" showlabel="false" top="501" weightx="1.0" weighty="1.0">
<task tasktype="ogscript">/*! block id=1002 !*/
copyParameters(2)
/*!!
<block id="1002" type="function_copyParameters" x="10" y="100" w="243" index="2" />
!!*/
/*!!<checksum>0e3c1fd2bc0663d8b9be5eef10afb494</checksum>!!*/</task>
</param>
</tr>
<tr>
<label colspan="1" fill="both" insets="2,2,2,2" name="Name: " rowspan="1" style="txt-align:east" weightx="0.0" weighty="1.0"/>
<param colspan="1" element="2" expand="true" fill="both" insets="2,2,2,2" oid="xpression.names" rowspan="1" showlabel="false" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<label colspan="1" fill="both" insets="2,2,2,2" name="Party: " rowspan="1" style="txt-align:east;" weightx="0.0" weighty="1.0"/>
<param colspan="1" element="2" expand="true" fill="both" insets="2,2,2,2" oid="xpression.parties" rowspan="1" showlabel="false" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<label colspan="1" fill="both" insets="2,2,2,2" name="Votes: " rowspan="1" style="txt-align:east;" weightx="0.0" weighty="1.0"/>
<param colspan="1" element="2" expand="true" fill="both" insets="2,2,2,2" oid="xpression.votes" rowspan="1" showlabel="false" weightx="1.0" weighty="1.0"/>
</tr>
<tr>
<button buttontype="push" colspan="2" fill="both" insets="2,2,2,2" name="Refresh" rowspan="1" top="501" weightx="1.0" weighty="1.0">
<task tasktype="ogscript">
/*! block id=1000 !*/
copyParameters(2)
/*!!
<block id="1000" type="function_copyParameters" x="10" y="100" w="243" index="2" />
!!*/
/*!!<checksum>aa984189aad6f8147340a852b64952e7</checksum>!!*/</task>
</button>
</tr>
</table>
</abs>
The key part is this piece of code that copies the parameters from the table to the ones you are trying to DataLinq:
function copyParameters(index)
{
var selectedIndex = params.getValue('xpression.selectors', index);
var nameToUse = '';
var partyToUse = '';
var votesToUse = 0;
if (selectedIndex >= 0)
{
nameToUse = params.getValue('params.names', selectedIndex);
partyToUse = params.getValue('params.parties', selectedIndex);
votesToUse = params.getValue('params.votes', selectedIndex);
}
params.setValue('xpression.names', index, nameToUse);
params.setValue('xpression.parties', index, partyToUse);
params.setValue('xpression.votes', index, votesToUse);
}
Hopefully I have correctly answered your question. If not, please feel free to let me know.
"‹James
#DashBoard