Hi,
Thanks a lot of advice.Although build different components is a alternative approach.I had found a way yesterday to implement it. I set the request parameter as a hidden input element, and then fetch it in afterrender event.
The handle of event is like this:
<listeners
jcr:primaryType="nt:unstructured"
afterrender="function(dialog){ return Sample.switchTabs(dialog);}" />
Sample.switchTabs=function(dialog) { var cmtype= $CQ("#parameter")[0].value; var tabpanel = dialog.findByType('tabpanel')[0]; if (cmtype == "1") { tabpanel.hideTabStripItem(0); tabpanel.unhideTabStripItem(1); tabpanel.hideTabStripItem(2); tabpanel.activate(1); } else if (cmtype == "2") { tabpanel.hideTabStripItem(0); tabpanel.hideTabStripItem(1); tabpanel.unhideTabStripItem(2); tabpanel.activate(2); } else { tabpanel.unhideTabStripItem(0); tabpanel.hideTabStripItem(1); tabpanel.hideTabStripItem(2); tabpanel.activate(0); } }Thanks a lot.