You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Heath Borders <he...@gmail.com> on 2005/01/04 21:57:17 UTC

Remote Procedure Calls

I'm trying to develop a custom component that makes background remote
procedure calls on the client.

Ideally, I would like all calls to be handled within the Faces
framework (this makes things a lot more convenient for a variety of
reasons).  However, my concern is that if I direct the call through
the FacesServlet, the generic JSP page that will be used to make my
method call will replace the serialized view stored in the session. 
This means that the user would have to click twice (once to refresh
the view into the session and again to actually make their call),
which is obviously not optimal.  Ideally, I would like it if the
generic page didn't get stored in the View at all.

What are my options?

Also, it would be nice if I could create XML renders for the various
components that will be used in the RPC.

The common use case is dependent menus.  If the main menu changes, the
sub-menu should get new options.  So, the main-menu's onchange will
call a javascript function to make the RPC call, and get XML back from
JSF that represents the new options, and then replace the sub-menu's
options with the new ones.

-- 
-Heath Borders-Wing
hborders@mail.win.org