You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Rafael Nami <ra...@gmail.com> on 2005/11/24 14:18:24 UTC

How to use a navigationMenuItem to call a HTML?

Hi everyone. We're trying to call a .html from our navigationMenuItem, but
it isn't working.
If we try to declare it as a Action in the faces-config.xml, it will treat
the html as a .faces, throwing
a Exception. We're trying now to call a method from the backing bean that
uses the facesContext to send
a redirect to the html. Is this the only reasonable approach?

Thanks and Best Regards

Rafael Mauricio Nami

Re: How to use a navigationMenuItem to call a HTML?

Posted by Bruno Aranda <br...@gmail.com>.
Using recent nightly builds use can put in the action attribute an
external link, like this (got this snipped from the examples):

<t:navigationMenuItem id="nav_3"
            itemLabel="Apache MyFaces Home"
action="http://myfaces.apache.org" />
</t:jscookMenu>

Just use the "http:" to redirect to external pages,

HTH,

Bruno

2005/11/24, Rafael Nami <ra...@gmail.com>:
> Thanx Peter, but It's not working since I'm using JsCookMenu instead of
> Panel Navigation 2.
>
>  Thanks
>
>  Rafael Mauricio Nami
>
> 2005/11/24, Peter Maas <pf...@gmail.com>:
> > Hmmm,
> >
> > did some testing... easiest way to do it seems to use the onclick handler
> of the commandNavication tag:
> >
> > <t:commandNavigation2 value="google"
> onclick="javascript:window.open('http://www.google.com');"/>
> >
> > works for me!
> >
> > -P
> >
> >
> >
> >
> >
> > On 11/24/05, Peter Maas <pfmmaas@gmail.com > wrote:
> > > I've not tried this, but I think je could just put a simple <a href="">
> in your menu pointing to the html page you are trying to link....? Otherwise
> I would just rename it jsp... and put in in je navigation context... no
> backing bean required.
> > >
> > >
> > >
> > >
> > > On 11/24/05, Rafael Nami <rafanami@gmail.com > wrote:
> > > > Hi everyone. We're trying to call a .html from our navigationMenuItem,
> but it isn't working.
> > > > If we try to declare it as a Action in the faces-config.xml, it will
> treat the html as a .faces, throwing
> > > > a Exception. We're trying now to call a method from the backing bean
> that uses the facesContext to send
> > > > a redirect to the html. Is this the only reasonable approach?
> > > >
> > > > Thanks and Best Regards
> > > >
> > > > Rafael Mauricio Nami
> > > >
> > >
> > >
> >
> >
>
>

Re: How to use a navigationMenuItem to call a HTML?

Posted by Rafael Nami <ra...@gmail.com>.
Thanx Peter, but It's not working since I'm using JsCookMenu instead of
Panel Navigation 2.

Thanks

Rafael Mauricio Nami

2005/11/24, Peter Maas <pf...@gmail.com>:
>
> Hmmm,
>
> did some testing... easiest way to do it seems to use the onclick handler
> of the commandNavication tag:
>
> <t:commandNavigation2 value="google" onclick="javascript:window.open('
> http://www.google.com');"/>
>
> works for me!
>
> -P
>
>
>
> On 11/24/05, Peter Maas <pf...@gmail.com> wrote:
> >
> > I've not tried this, but I think je could just put a simple <a href="">
> > in your menu pointing to the html page you are trying to link....? Otherwise
> > I would just rename it jsp... and put in in je navigation context... no
> > backing bean required.
> >
> >
> > On 11/24/05, Rafael Nami <rafanami@gmail.com > wrote:
> > >
> > > Hi everyone. We're trying to call a .html from our navigationMenuItem,
> > > but it isn't working.
> > > If we try to declare it as a Action in the faces-config.xml, it will
> > > treat the html as a .faces, throwing
> > > a Exception. We're trying now to call a method from the backing bean
> > > that uses the facesContext to send
> > > a redirect to the html. Is this the only reasonable approach?
> > >
> > > Thanks and Best Regards
> > >
> > > Rafael Mauricio Nami
> > >
> >
> >
>

Re: How to use a navigationMenuItem to call a HTML?

Posted by Peter Maas <pf...@gmail.com>.
Hmmm,

did some testing... easiest way to do it seems to use the onclick handler of
the commandNavication tag:

<t:commandNavigation2 value="google" onclick="javascript:window.open('
http://www.google.com');"/>

works for me!

-P



On 11/24/05, Peter Maas <pf...@gmail.com> wrote:
>
> I've not tried this, but I think je could just put a simple <a href=""> in
> your menu pointing to the html page you are trying to link....? Otherwise I
> would just rename it jsp... and put in in je navigation context... no
> backing bean required.
>
>
> On 11/24/05, Rafael Nami <ra...@gmail.com> wrote:
> >
> > Hi everyone. We're trying to call a .html from our navigationMenuItem,
> > but it isn't working.
> > If we try to declare it as a Action in the faces-config.xml, it will
> > treat the html as a .faces, throwing
> > a Exception. We're trying now to call a method from the backing bean
> > that uses the facesContext to send
> > a redirect to the html. Is this the only reasonable approach?
> >
> > Thanks and Best Regards
> >
> > Rafael Mauricio Nami
> >
>
>

Re: How to use a navigationMenuItem to call a HTML?

Posted by Peter Maas <pf...@gmail.com>.
I've not tried this, but I think je could just put a simple <a href=""> in
your menu pointing to the html page you are trying to link....? Otherwise I
would just rename it jsp... and put in in je navigation context... no
backing bean required.


On 11/24/05, Rafael Nami <ra...@gmail.com> wrote:
>
> Hi everyone. We're trying to call a .html from our navigationMenuItem, but
> it isn't working.
> If we try to declare it as a Action in the faces-config.xml, it will treat
> the html as a .faces, throwing
> a Exception. We're trying now to call a method from the backing bean that
> uses the facesContext to send
> a redirect to the html. Is this the only reasonable approach?
>
> Thanks and Best Regards
>
> Rafael Mauricio Nami
>