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
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
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
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,
Hi,
is it possible to have a link to new site behind the commandButton?
Cheers Wolfgang
On Thu, 2007-09-06 at 16:19 +0200, Wolfgang wrote:
Hi,
is it possible to have a link to new site behind the commandButton?
Not directly. A commandButton causes a form submit, and that is always
going to go back to the original server.
Why would you want this? Linking to a new site is not
6 matches
Mail list logo