Yes I tried to use the x:popup component but it is not appropriate for what I want to do. Having a onclick behaviour ont it would be great :D The solution you propose is actually what I tried to do. But the problem is that I use javascript to open the new window. It brakes the JSF flow and my backing bean values are not the update ones. Thanks for your help ;)
-----Message d'origine----- De : Bruno Aranda [mailto:[EMAIL PROTECTED] Envoyé : jeudi 21 juillet 2005 16:42 À : MyFaces Discussion Objet : Re: RE : commandLink and onClick javascript popup window problem There is a component x:popup wich you could use, but it shows only onmouseover (if someone had the time to adapt this component to show onclick it would be great, the possibility to choose if the popup should be shown on onmouseover or onclick). Regarding your problem, maybe you can use a session bean with the information of your table and open a new jsf page in a new window which used the same bean...). HTH, Bruno 2005/7/21, Clément Maignien <[EMAIL PROTECTED]>: > Yes indeeed Sean. That's is exactly what I said at the end of my post. But my > question is : is it possible to open a popup window (with or without > javascript) to display my detailed informations ? if yes, how ? > > Thanks. > > -----Message d'origine----- > De: Sean Schofield [mailto:[EMAIL PROTECTED] > Envoyé: jeudi 21 juillet 2005 16:12 > À: MyFaces Discussion > Objet: Re: commandLink and onClick javascript popup window problem > > I think your problem is that you are opening the window with an > *onclick* javascript even. This has nothing to do with the JSF > lifecycle. The regular commandLink approach (without using onclick) > works because you post back (via a form) to the same page. In your > case you are just opening the page in a new window. How would JSF > know the new values from that? > > sean > > On 7/21/05, Clément Maignien <[EMAIL PROTECTED]> wrote: > > > > > > > > Here is the situation : > > > > I have a JSF page (result.jsp) with dataTable component with a commandLink > > in one of his columns. > > > > When clicking on this commandLink, I would like to open a popup window > > (detailStockInv.jsp) to display detail informations about the line that has > > been clicked. > > > > Here is the code I wrote : > > > > <x:dataTable id="stockdatatable" rowIndexVar="numRow" > > > > ... > > > > <h:column> ... </h:column> > > > > ... > > > > <h:column> > > > > <f:facet name="header"> > > > > <h:outputText value="#{res['stock_Etat_Visu_Stockinv']}" /> > > > > </f:facet> > > > > <h:commandLink styleClass="linkRed" > > actionListener="#{stockBean.updateDetailStock} > > > > > > onclick="window.open('detailStockInv.jsp','','width=700,height=400,top=100,left=100')"> > > > > > > > > <h:outputText value="#{stock.stockInv}"/> > > > > <f:param name="numLineClicked" value="#{numRow}"/> > > > > </h:commandLink> > > > > </h:column> > > > > ... > > > > </x:dataTable> > > > > > > > > I've put an actionListener to update datas (a bean property) that are > > displayed in the popup page (detailStockInv.jsp) in a dataTable component. > > > > > > > > My popup is opened and displayed when I click one of the commandLink of my > > results dataTable, but the problem is that the bean values that are read by > > my popup page are the previous ones : the first time I click a commandLink, > > the values displayed by the popup are not the ones updated by my > > actionListener but the initial ones (inited in the bean constructor). The > > second time I click a commandLink, the values of the line I cliked before > > are displayed. > > > > > > > > In my opinion, the popup is displayed before the update model value phase of > > the JSF life cycle occurs. As a consequence, the previous bean values are > > displayed in my popup page. > > > > To confirm that, I tried not to display this page in a popup, but in the > > same window (normal flow) with the action property of the commandLink : > > > > <h:commandLink styleClass="linkRed" action="#{stockBean.showDetailAction}" > > > > <h:outputText value="#{stock.stockInv}"/> > > > > <f:param name="numLigneClicked" value="#{numRow}"/> > > > > </h:commandLink> > > > > > > > > The showDetailAction action and the updateDetailStock actionListener are > > doing exactly the same work (updating the detail values of my bean), except > > that it return a navigation result to display the detailStockInv.jsp page > > > > In this way, the values that are displayed in the detailStockInv.jsp are the > > good ones (the bean's ones). > > > > > > > > Is there a way to force the update value phase before the popup is displayed > > ? Maybe the way I call the popup isn't the right one ... don't know. > > > > > > > > Please help, thanks :D > > > > > > > > Clément Maignien. > > > > > > > > > > > > > > > > > > > > > > > > >