Yes, this is expected behavior. You click on the button, the onclick code runs, and after it completes, the form is submitted, which causes the server to execute your actionListener and return a response.
Jenia4Faces PopupFrame appears to do what you want. However, I've been unable to get it to work properly in my environment so far, but that might just be because I'm using facelets, and haven't created the correct TagHandler yet. http://www.jenia.org, Family Popup On 9/29/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > I have a problem displaying the current data of a database query in a popup. > The Popup is opened with javascript by a window.open COmmand. The data for > the popup is retrieved by a ActionListener Method Binding. > > The Problem now seems to me, that the javascript is executed before the > method and that's why I always have the previous shown data(from the popup > opened before - because the data is in session) in the popup, although the > database query was done perfectly. When I press F5 the correct data is > shown. > > How can I tell Myfaces to use the method first and then open the Popup with > the javascript command? > Or do I have to use a completly other code? Perhaps is it possible to define > a navigation rule, where I can tell Myfaces to open a small window? > > Here is my code: > > <t:commandButton actionListener="#{detailsDto.getListDatenblaetter}" > image="images/downloaddatenblatt.gif" > rendered="#{detailsDto.b_showdatenblatt}" > onclick="window.open('popupDatasheet.jsf', 'Datasheets', > 'width=800,height=400');" > > </t:commandButton > > Regards > Andy > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify your system manager. > This footnote also confirms that this email message has been swept for the > presence of computer viruses. > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >

