You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by dushyant agarwal <ag...@yahoo.co.in> on 2009/01/23 05:58:48 UTC

Re: calling backing bean method from Javascript

jax is a client side technology . It would mot call a method in the BB(which is on the server). Alternatively you can call a javascript method from the BB(by using Extended RenderKitService class) in Trinidad's PIs.

Thanks,
Dushyant

--- On Mon, 19/1/09, Shasi Mitra Yarram <sh...@yahoo.com> wrote:
From: Shasi Mitra Yarram <sh...@yahoo.com>
Subject: calling backing bean method from Javascript
To: "MyFaces Discussion" <us...@myfaces.apache.org>
Date: Monday, 19 January, 2009, 8:25 AM

Hi i want some methods of backing bean to be called onload of the page. can u lemme know how to call a backing bean method from javascript using AJAX.

       Add more friends to your messenger and enjoy!  Invite them now.


      Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/

Re: calling backing bean method from Javascript

Posted by Walter Mourão <wa...@gmail.com>.
Quick & dirt solution:
1 - link the backing bean action to a commandButton with id="hiddenButton"
2 - make the commandButton hidden using css (ex. display:none)
3 - "click" the button using its click function (ex.
document.getElementById('hiddenButton').click() )

I hope it works.

Walter Mourão
http://waltermourao.com.br
http://arcadian.com.br
http://oriens.com.br



On Fri, Jan 23, 2009 at 2:58 AM, dushyant agarwal <
agarwal_dushyant@yahoo.co.in> wrote:

> jax is a client side technology . It would mot call a method in the
> BB(which is on the server). Alternatively you can call a javascript method
> from the BB(by using Extended RenderKitService class) in Trinidad's PIs.
>
> Thanks,
> Dushyant
>
> --- On *Mon, 19/1/09, Shasi Mitra Yarram <sh...@yahoo.com>* wrote:
>
> From: Shasi Mitra Yarram <sh...@yahoo.com>
> Subject: calling backing bean method from Javascript
> To: "MyFaces Discussion" <us...@myfaces.apache.org>
> Date: Monday, 19 January, 2009, 8:25 AM
>
> Hi i want some methods of backing bean to be called onload of the page. can
> u lemme know how to call a backing bean method from javascript using AJAX.
> ------------------------------
> Add more friends to your messenger and enjoy! Invite them now.<http://in.rd.yahoo.com/tagline_messenger_6/*http://messenger.yahoo.com/invite/>
>
>
> ------------------------------
> Check out the all-new Messenger 9.0! Click here.<http://in.rd.yahoo.com/tagline_messenger_7/*http://in.messenger.yahoo.com/>