myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Delbecq <de...@oma.be>
Subject Re: passing parameters to window.open
Date Fri, 17 Nov 2006 12:37:01 GMT
Hi,

Ty this:
0) layout you page like this
<form id="main">...</form>
<form id="popupForm" target="ThePopup">...</form>

1) do a javascript 'window.open' like this

window.open('','ThePopup','left=220,top=300,width=600,height=250,scrollbars=1,status=1,toolbar=0,resizable=0,menubar=0');

2) transfert, if needed, using javascript, datas from main form to popup
form

3) do a submit of  hidden form that has 'target' defined to 'ThePopup'
(the form can be hidden either using some css, either by having only
hidden fields)

viorel.chelaru a écrit :
> hi all, 
> i have a problem with passing parameters to window.open; i've searched this
> forum , i saw resolvings but non works for me; let me show you my context of
> problem:
>
> i have a jsf page with a commandLink:
> <t:commandLink action="#{MB1.showSottoscritori}" 
>                         onclick="popupSottoscritori()" >
>                 <t:outputText value="Sottoscritori" />
> </t:commandLink>
>
> with :
> function popupSottoscritori()
> {
> var wnd =
> window.open('/BCO/sottoscritori_jsf.faces','','left=220,top=300,width=600,height=250,scrollbars=1,status=1,toolbar=0,resizable=0,menubar=0');
> wnd.focus();
> }
>
> the page with the commanLink has a managed bean MB1, and window.open page
> has MB2
>
> first i don't want the somepage.jsp?param=value because my values are
> private...are not to be seen; so i want to use post not get method
>
> i've tried putting the parameters in request in MB1 function
> action="#{MB1.showSottoscritori}"  and get in the popup page the params from
> request: all are null; 
> i've tried to user MB2 as a session bean to set the params in MB2 in the
> page with the action and then in window.open page to get them from MB2 ; all
> values are null
>
> i tried to use updateActionListerer....to update the MB2 values but all are
> null;
>
> does anyone have an ideea how to pass parameters from a page to window.open
> page but with backing beans ?
> please help, 
> Viorel
>   


Mime
View raw message