List Info

Thread: Re: h:commandButton link




Re: h:commandButton link
user name
2007-10-03 15:33:19
Hi Andrew,

I tried to code the url directly in the navigation handler.
I tried
several combinations etc.
but it does not really work and I guess your right that the
navigation
should only be used by
inter-application navigation!
Furthermore I don't understand what you mean with "send
a redirect to the
external URL"
I guess I can imagine what you want to do, but how is this
working?

Cheers Wolfgang

> Command button passes the outcome and the action to the
navigation
> handler. If you want it to work with external URLs, you
would have to
> code that into your navigation handler. Instead, the
best solution is
> to send a redirect to the external URL. Navigation
really should be
> reserved for inter-application navigation.
>
> -Andrew
>
> On 10/3/07, Wolfgang <wklugeebi.ac.uk> wrote:
>> Hi,
>>
>> I can use the action parameter of the
h:commandButton to change to
>> another xhtml site.
>> But can I also link to a internet site for example
google.de?
>>
>> Cheers Wolfgang
>>




Re: h:commandButton link
country flaguser name
Sweden
2007-10-03 16:23:54
To generate a plain link that points to another site, use
<h:outputLink>.

To send a redirect from an action method, do something like
this:

  public void doSomething()
  {
    FacesContext.getCurrentInstance().
      getExternalContext().redirect("http://google.de");
  }

Regards,

Simon

On Wed, 2007-10-03 at 21:33 +0100, wklugeebi.ac.uk
wrote:
> Hi Andrew,
> 
> I tried to code the url directly in the navigation
handler. I tried
> several combinations etc.
> but it does not really work and I guess your right that
the navigation
> should only be used by
> inter-application navigation!
> Furthermore I don't understand what you mean with
"send a redirect to the
> external URL"
> I guess I can imagine what you want to do, but how is
this working?
> 
> Cheers Wolfgang
> 
> > Command button passes the outcome and the action
to the navigation
> > handler. If you want it to work with external
URLs, you would have to
> > code that into your navigation handler. Instead,
the best solution is
> > to send a redirect to the external URL. Navigation
really should be
> > reserved for inter-application navigation.
> >
> > -Andrew
> >
> > On 10/3/07, Wolfgang <wklugeebi.ac.uk> wrote:
> >> Hi,
> >>
> >> I can use the action parameter of the
h:commandButton to change to
> >> another xhtml site.
> >> But can I also link to a internet site for
example google.de?
> >>
> >> Cheers Wolfgang
> >>
> 
> 
> 


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )