Malcolm McEwan <malcolm.mcewan <at> xmarc.com.au> writes:
> How do I access the componentID of the "current" component being processed
> when the get/set is being called ?
> <component id="layer1" type="Checkbox" >
> <binding name="selected" expression="layerVisibility" />
> <static-binding name="layerName" value="AERIAL_IMAGE" />
> </component>
>
> <component id="layer2" type="Checkbox" >
> <binding name="selected" expression="layerVisibility" />
> <static-binding name="layerName" value="ROADS" />
> </component>
Try:
<component id="layer1" type="Checkbox" >
<binding name="selected" expression="layerVisibility[0]" />
<static-binding name="layerName" value="AERIAL_IMAGE" />
</component>
<component id="layer2" type="Checkbox" >
<binding name="selected" expression="layerVisibility[1]" />
<static-binding name="layerName" value="ROADS" />
</component>
Java code:
public void setLayerVisibility(int idx, boolean visible) {
...
}
public boolean getLayerVisibility(int idx) {
...
}
--
Author of an e-Book for learning Tapestry (http://www.agileskills2.org/EWDT)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]