Tab and dialog box
Hi, I am grateful for this community since it has helped me with my project so far, but now im hopelessly stuck
Im creating a web-app with one main page and the rest of the pages are shown in the form of content of dialog boxes( Ex: button2.onclick=window.showModalDialog("faces/EditPersonDetails.jsp","","dialog Width:900px;dialogHeight:585px;dialogLeft:200px; dialogTop:200px;");
now the dialog Boxes has 1 tabset with one layer of "tabs", and depending on button clicked from Main.jsp , different tabs need to be shown up on loading the same dialog box.
what i have tried so far are:
1. binding selected property of the tabset to a sessionbean string ("tab")which is set in the main (calling) page
public String button2_action(){
getSessionBean1().setTab("tab2");
returnnull;
}
when the button is clicked, and set again to the bean value in the dialogbox's pre-render of EditPersonDetails
publicvoid prerender(){
tabSet1.setSelected(null);
tabSet1.setSelected(getSessionBean1().getTab());
}
2. using no bean but making the tab public static setting in Main.jsp
public String button2_action(){
EditPersonDetails.tab2.setSelectedChildId("tab2");
}
3. I even tried putting Thread.sleep since i suspect its a timing/race issue in EditPersonDetails
publicvoid prerender(){
try{
Thread.sleep(1000);
catch(Exception e){}
tabSet1.setSelected(null);
tabSet1.setSelected(getSessionBean1().getTab());
try{
Thread.sleep(1000);
catch(Exception e){}
}
I have a feeling theres a simple way that im not aware of that will fix the problem.
I appreciate any comments/help from you experts
Thanks and regards,
Nick

