Yes, Jose, it is possible!

But then you won't have 2 actions!

Here a detailed explaination of the solutons I see now:
        A. use the form-bean with an selectedEmplyers array as I have explained 
in the previous mail, but this involves having 2 requests to the server. Here 
is the requests chain for this solution:
                1. Browser: in window1, user presses the button "search 
Employes" and so he requets the window2 from the serve
                2. Server: the server gets the request for window2 and sends to 
the client (browser) the response (the rendered html window2)
                3. Browser: in window2, the user selects the employees and 
presses "submit"
                4. Server: the server populates the array selectedEmplyers from 
the form-bean and send back the response (= the rendared html window1 with the 
info about the selected employers)
                5. Browser: window1 appears correctly!
        Conclusions: As you see, you have to interact 2 times with the server 
=> you have to refresh window1 
        
        B. If you do not want to interact one more time with the server to 
render window1 again, you should do all the selecting stuff on the browser, 
using javascript.

But, I cannot help you more as I do have a clear idea of what you want to do: 
do you have a pop-up there? Or what exactly? If you could give me more info, 
maybe I could help!

Have fun,
Emilia



-----Original Message-----
From: José María Tristán [mailto:[EMAIL PROTECTED] 
Sent: woensdag 14 juni 2006 9:25
To: 'Struts Users Mailing List'
Subject: RE: Pass dates between two windows


Very thanks Emilia.
I use the second option, work whith form-bean. Is possible show in the firs 
windows the selected employers and don't refresh all the window?. 

Thank you.

-----Mensaje original-----
De: Emilia Ipate [mailto:[EMAIL PROTECTED]
Enviado el: miércoles, 14 de junio de 2006 8:49
Para: Struts Users Mailing List
Asunto: RE: Pass dates between two windows


Hello, Jose!

Depending on your application requirement, you should choose one of the 
following solutions:
        1. in window2: after the user selects some employers, save the selected 
employers in DB and in window1 retrieve the saved employers from the DB.
        2. in form-bean put a property: selectedEmployers = array of the IDs of 
employers. In window2, after the user selects the employers, the 
selectedEmployers array gets populated with the IDs of the employers selected. 
Back in window1, you have now the IDs of the selected employers so, making a 
simple query to the DB, you can get the info needed for each ID from 
selectedEmployers.

Hope it helps,
Emilia

-----Original Message-----
From: José María Tristán [mailto:[EMAIL PROTECTED] 
Sent: woensdag 14 juni 2006 8:30
To: user@struts.apache.org
Subject: Pass dates between two windows


Hi,
        I have a form bean than it's use in two windows. Per example:

        window1.
                html:button: "search Employers"

        window2
                list Employers
                html:select property="employers"

                html:button close

        The button "search Employers" open the window 2. Here, the user select 
employers of a list and close the windows to save the dates. Then, i need show, 
per example, in a label, into the first window the employers select by the user.
        How can i do it?

        Thank you very much.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to