Multiple selection widgets dependency




I would like to populate a second dropdown box (cq widget, eg xtype="selection") dynamically based on what was selected from the first dropdown via a component's dialog.xml.  How do I do this in AEM 6?

For example, I have a country dropdown box, when you select say, Australia, the second dropdown box would populate the states available for Australia.  This is only an example, but hope you know what I mean.