myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Robinson" <andrew.rw.robin...@gmail.com>
Subject Re: can we post to another web application from a button action ?
Date Wed, 27 Sep 2006 15:20:13 GMT
Then I would recommend one of the redirect methods. That way, your
action runs then the new URL is loaded in the browser for the external
site.

On 9/27/06, Legolas Woodland <legolas.w@gmail.com> wrote:
> Thank you Andrew.
> I should show that page to user because user will continue on that page
> until his/her operation complete
> that web site will send user back to my web site.
> url will be dynamic because i should pass some parameters to that web page.
> Andrew Robinson wrote:
> > Do you want to send him/her to that page or do you want to just post
> > data and "ignore" the response from that website?
> >
> > If you want to send them, create a navigation rule with the full URL
> > (if it is static) with a "redirect" set. Then return that action
> > result.
> >
> > If you want to send them but the URL is dynamic:
> > 1) create a custom navigation handler that performs a redirect
> > -or-
> > 2) redirect and return null:
> >
> > public String myAction()
> > {
> >  // your business code
> >
> >  FacesContext facesContext = FacesContext.getCurrentInstance();
> >  facesContext.getExternalContext().redirect(someURL);
> >  facesContext.responseComplete();
> >  return null;
> > }
> >
> > On 9/26/06, Legolas Woodland <legolas.w@gmail.com> wrote:
> >> Thank you for reply.
> >> what about sending them from server side ?
> >> if i send user to that url from serverside i can make my database change
> >> and then send him/her to other web site.
> >> can i have an action for outputlink and also send the user to other web
> >> site?
> >> for example in action binding i made database change and when he/she
> >> clicked on it i post the parameter to that website?
> >>
> >> thanks
> >>
> >> Andrew Robinson wrote:
> >> > Do you want to post from the client or the server? If from the client,
> >> > just use the "normal" method. You can use h:outputLink with embedded
> >> > f:param elements.
> >> >
> >> > On 9/26/06, Legolas Woodland <legolas.w@gmail.com> wrote:
> >> >>
> >> >>  Hi
> >> >>  Thank you for reading my post
> >> >>  I need to use post method to send some parameters to a web site,
> >> >>  now , in my web application which is based on jsf , i do not know
> >> >> how i can
> >> >> do this as parameters has their name and also i should compute their
> >> >> values
> >> >> before i post them to other web site.
> >> >>
> >> >>  should we do this in button action method or there are some other
> >> ways?
> >> >>  thanks
> >> >>
> >> >
> >>
> >>
> >
>
>

Mime
View raw message