You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by Sabina Albu <sa...@gmail.com> on 2007/01/12 20:49:20 UTC
commandLink open new window
Hi,
I'm trying to open a new window using:
<tr:commandLink action="#{backingBean.performOpenWindow}"
target="_blank" text="Open new window" useWindow="false"
windowWidth="800" windowHeight="500"></tr:commandLink>
in my backing bean:
public String performOpenWindow(){
...
return "summaryView";
}
In my navigate.xml
<navigation-case>
<from-outcome>summaryView</from-outcome>
<to-view-id>/pages/SummaryView.xhtml</to-view-id>
<redirect/>
</navigation-case>
Can someone point me to the right direction here.
regards,
Sabina
Re: commandLink open new window
Posted by Sabina Albu <sa...@gmail.com>.
Thank you Matthias,
I did try your proposal and a couple other things and this is what I
came up with:
<tr:commandLink text="Open new window"
action="#{backingBean.performOpenWindow}"
onclick="window.open('./SummaryView.xhtml', 'summaryView',
'status=1,toolbar=1,location=0,titlebar=0,menubar=1,personalbar=1,width=800,height=500,hot
keys=0,resizable=1');">
</tr:commandLink>
And as described in the documentation I'm losing the PageFlowScope
from the original
window.
One thing that is not really clear to me is the scope of the bean when using
PageFlowScope. However the PageFlowScope documentation states clearly:
" "page flow"
cannot be used as a <managed-bean-scope>."
Also, is there a way to open a non-modal popup window, like
"dialog:summaryView", so that I can take advantage of PageFlowScope
and navigation, and still have my second window
Sabina
On 1/13/07, Matthias Wessendorf <ma...@apache.org> wrote:
> the dev guide contains lot of more useful infos
>
> http://incubator.apache.org/adffaces/devguide/index.html
>
> -M
>
> On 1/13/07, Matthias Wessendorf <ma...@apache.org> wrote:
> > useWindow="true"
> >
> > outcome returns something like dialog:edit
> >
> > <navigation-rule>
> > <from-view-id>/all.xhtml</from-view-id>
> > <navigation-case>
> > <from-outcome>dialog:edit</from-outcome>
> > <to-view-id>/edit1.xhtml</to-view-id>
> > </navigation-case>
> > </navigation-rule>
> >
> > -Matthias
> >
> > On 1/12/07, Sabina Albu <sa...@gmail.com> wrote:
> > > Hi,
> > > I'm trying to open a new window using:
> > >
> > >
> > > <tr:commandLink action="#{backingBean.performOpenWindow}"
> > > target="_blank" text="Open new window" useWindow="false"
> > > windowWidth="800" windowHeight="500"></tr:commandLink>
> > >
> > > in my backing bean:
> > > public String performOpenWindow(){
> > > ...
> > > return "summaryView";
> > > }
> > >
> > > In my navigate.xml
> > > <navigation-case>
> > > <from-outcome>summaryView</from-outcome>
> > > <to-view-id>/pages/SummaryView.xhtml</to-view-id>
> > > <redirect/>
> > > </navigation-case>
> > >
> > > Can someone point me to the right direction here.
> > >
> > > regards,
> > > Sabina
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > http://tinyurl.com/fmywh
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>
Re: commandLink open new window
Posted by Matthias Wessendorf <ma...@apache.org>.
the dev guide contains lot of more useful infos
http://incubator.apache.org/adffaces/devguide/index.html
-M
On 1/13/07, Matthias Wessendorf <ma...@apache.org> wrote:
> useWindow="true"
>
> outcome returns something like dialog:edit
>
> <navigation-rule>
> <from-view-id>/all.xhtml</from-view-id>
> <navigation-case>
> <from-outcome>dialog:edit</from-outcome>
> <to-view-id>/edit1.xhtml</to-view-id>
> </navigation-case>
> </navigation-rule>
>
> -Matthias
>
> On 1/12/07, Sabina Albu <sa...@gmail.com> wrote:
> > Hi,
> > I'm trying to open a new window using:
> >
> >
> > <tr:commandLink action="#{backingBean.performOpenWindow}"
> > target="_blank" text="Open new window" useWindow="false"
> > windowWidth="800" windowHeight="500"></tr:commandLink>
> >
> > in my backing bean:
> > public String performOpenWindow(){
> > ...
> > return "summaryView";
> > }
> >
> > In my navigate.xml
> > <navigation-case>
> > <from-outcome>summaryView</from-outcome>
> > <to-view-id>/pages/SummaryView.xhtml</to-view-id>
> > <redirect/>
> > </navigation-case>
> >
> > Can someone point me to the right direction here.
> >
> > regards,
> > Sabina
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>
--
Matthias Wessendorf
http://tinyurl.com/fmywh
further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com
Re: commandLink open new window
Posted by Matthias Wessendorf <ma...@apache.org>.
useWindow="true"
outcome returns something like dialog:edit
<navigation-rule>
<from-view-id>/all.xhtml</from-view-id>
<navigation-case>
<from-outcome>dialog:edit</from-outcome>
<to-view-id>/edit1.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
-Matthias
On 1/12/07, Sabina Albu <sa...@gmail.com> wrote:
> Hi,
> I'm trying to open a new window using:
>
>
> <tr:commandLink action="#{backingBean.performOpenWindow}"
> target="_blank" text="Open new window" useWindow="false"
> windowWidth="800" windowHeight="500"></tr:commandLink>
>
> in my backing bean:
> public String performOpenWindow(){
> ...
> return "summaryView";
> }
>
> In my navigate.xml
> <navigation-case>
> <from-outcome>summaryView</from-outcome>
> <to-view-id>/pages/SummaryView.xhtml</to-view-id>
> <redirect/>
> </navigation-case>
>
> Can someone point me to the right direction here.
>
> regards,
> Sabina
>
--
Matthias Wessendorf
http://tinyurl.com/fmywh
further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com