Add an eventhandler to a select filed in options dialog
Hi,
I'm developing a component for AEM 6, now I'm stuck. I need to change the shown tabs in the options dialog, on an onChange event (or something similar) hopefully thrown by the select field I'm using.
Here is the code for my select field:
<graphtype jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/select" emptyText="Please select a charttype." fieldLabel="Charttype" name="./chartType"> <items jcr:primaryType="nt:unstructured"> <chart1 jcr:primaryType="nt:unstructured" value="line" text="Line Chart" selected="{Boolean}true"/> <chart2 jcr:primaryType="nt:unstructured" value="bar" text="Bar Chart"/> </items> </graphtype>And the tabs in need to switch:
<diagramm jcr:primaryType="nt:unstructured" jcr:title="Chart" sling:resourceType="granite/ui/components/foundation/section"> <layout jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns" margin="{Boolean}false"/> <items jcr:primaryType="nt:unstructured"> <column jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container"> <items jcr:primaryType="nt:unstructured"> ... here some options ... </items> </column> </items> </diagramm>These tabs all have a similar structure, but important divergences between their content.
My Questions:
Is there a way to activate one of these tabs an hide the other, depending on the selected item in the select field shown above?
How to implement this solution?
Thanks for your help.