Done :)
HTML CODE
panel with visible = false
<span id="form1:dataPanel" class="hidden_sun4" style="position: absolute; left: 576px; top: 48px">panel with visible = true<span id="form1:dataPanel" style="position: absolute; left: 576px; top: 48px">
So, I've used
function hide() { var panel = document.getElementById("form1:dataPanel"); panel.setAttribute('class','hidden_sun4'); return false;
}
function show() { var panel = document.getElementById("form1:dataPanel"); panel.removeAttribute('class'); return false;
}Is this the right way or is there a better way??
From: alucard___at_hotmail.itTo: users_at_woodstock.dev.java.netDate: Wed, 30 Jan 2008 13:19:27 +0100Subject: layoutPanel/groupPanel visible property
hi all!I have written the code below...When the button is activated the panel must be displayed without a full reload of the page.This code works with simple components like staticText, textField... but not with layoutPanels or groupPanels with components inside (JS makes an error and the page is submitted). Is there an error in my code? How can I display panels with components inside? Thanks in advance. Employment.java[CODE]...private boolean showPanel = false; public boolean getShowPanel() { return showPanel;} public void setShowPanel(boolean showPanel) { this.showPanel = showPanel;}...[/CODE] Employment.jsp[CODE]...<webuijsf:head>... <webuijsf:script> function showPanel() { (document.getElementById("form1:hidden")).setProps({value:true}); var panel = document.getElementById("form1:dataPanel"); panel.refresh("form1:hidden"); return false; } </webuijsf:script></webuijsf:head>...<webuijsf:button binding="#{Employment.addBtn}" id="addBtn" onClick="return showPanel()" text="#{employment.add}"/>...<webuijsf:hiddenField binding="#{Employment.hidden}" id="hidden" text="#{Employment.showPanel}"/>...<webuijsf:panelGroup binding="#{Employment.dataPanel}" id="dataPanel" style="position: absolute; left: 576px; top: 48px" visible="#{Employment.showPanel}">...</webuijsf:panelGroup>...<webuijsf:staticText binding="#{Employment.staticText8}" id="staticText8" style="position: absolute; left: 48px; top: 408px" text="TEST" visible="#{Employment.showPanel}"/>...[/CODE]
Messenger Giochi Prenditi una pausa e sfida i tuoi amici a Ladybird su Messenger!
_________________________________________________________________
Ti piace giocare con le lettere? Prova ABCLive!
http://messengergiochi.it.msn.com/