myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Imhof <Matze.Im...@web.de>
Subject Re: [Tomahawk] ModalDialog: close with dialogok-event
Date Tue, 29 May 2007 08:46:05 GMT
hi mario,

I've modified my code like you said:

		<h:panelGrid columns="2">
			<t:commandButton id="ok" forceId="true" value="Ok"
				action="#{backingBean.closeDialog}" />
			<t:commandButton id="cancel" forceId="true" value="Abbrechen"
				onclick="window.parent._myfaces_currentModal.hide();" />
		</h:panelGrid>
		<h:panelGroup rendered="#{!backingBean.closeDialog}">
			<f:verbatim>
		window.parent._myfaces_currentModal._myfaces_ok=true; 
		window.parent._myfaces_currentModal.hide(); 
	</f:verbatim>
		</h:panelGroup>

but if I click on the ok-button, nothing happens.
no call to the backing bean.

isn't my code correct ?

cheers,
matze


> Hi!
> > didn't I have to close the dialog immediatly ?
> > without closing the dialog there wouldn't be a call to the backing bean .. ?
> >   
> Keep in mind that the dialog is in fact a different jsf page. So you
> have to "finish" the lifecycle of this "sub page" to get the model
> updated and then refresh the "master" page to reflect the changes there too.
> With some more javascript magic you can avoid this round-trip, though,
> you'll find thats hard too as manual javascript and JSF has its own
> oddities.
> 
> For now, all this means you have to put the bean required on the sub
> page (or at least a lightweight "result" bean) into the session scope
> ... which is a bad thing, but should do it for now.

_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192


Mime
View raw message