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

BEGIN:VCARD
VERSION:2.1
N:Imhof;Matthias;;;
FN:Matthias Imhof
EMAIL;INTERNET:[EMAIL PROTECTED]
END:VCARD

Reply via email to