Thanks for the pointer Alonso; in fact, I have already read the paper.
Unfortunately, it doesn't help with my problem: I want the AJAX
handler to be a JSF PhaseListener and not a servlet. Why? Because then
the AJAX handler can access the FacesContext and update faces UI
components, apply validators etc., ie take advantage of the JSF
framework. With an AJAX -> Servlet I can't access FacesContext so I
would be by-passing faces altogether.

Since I wrote the original post, I noticed there is a JIRA issue:

http://issues.apache.org/jira/browse/PB-73

Does anyone know

a) if that Jira would solve my problem?

b) when would the issue be solved? (I noticed the JIRA had a patch with it).

Cheers,
- Karl

On 9/13/07, Alonso Dominguez <[EMAIL PROTECTED]> wrote:
> Hi Karl, you may read this:
>
> http://developers.sun.com/portalserver/reference/techart/ajax-portlets.html
>
> 2007/9/13, Karl Krukow <[EMAIL PROTECTED]>:
> >
> > Hello,
> >
> > I am having problems with implementing an portlet AJAX solution using
> > JSF and JSF Apache portlet bridge.
> >
> > Specifically I am trying to implement an AJAX enabled JSF page using
> > the technique referenced in
> >
> > http://java.sun.com/javaee/javaserverfaces/ajax/tutorial.jsp
> >
> > Specifically I'm registering a PhaseListener to handle the AJAX requests.
> >
> > This would work as in the tutorial in a non-portal context. However,
> > I'm having problems in my portal (WebSphere Portal v6.0) using the
> > org.apache.portals.bridges.jsf.FacesPortlet.
> >
> > The problem is the following:
> >
> > Client makes an XMLHttpRequest to the faces servlet
> > (javax.faces.webapp.FacesServlet) which eventually triggers my
> > PhaseListener. I guess this is already where something is wrong: The
> > FacesServlet throws an exception upon this request
> >
> > [Faces Servlet]: java.lang.IllegalArgumentException: Only
> > PortletContext supported.
> >
> > (Stacktrace below).
> >
> > It seems that the SessionMap can only use a PortletRequest in its
> > constructs, which is apparently not what it is getting. So I guess
> > using the FacesServlet is wrong.
> >
> > So which servlet should I use to route the AJAX through the faces
> > lifecycle in a portlet context?
> >
> > Hope someone can help ;-)
> >
> > Cheers,
> > - Karl
> >
> > --- Techs ----
> > WebSphere Portal v6.0
> > Java1.4
> > MyFaces 1.1.5
> > Apache Portal Bridge: portals-bridges-common-1.0.3,
> > portals-bridges-jsf.1.0.3
> >
> >
> > --- stacktrace for FacesServlet-----
> >
> > [Faces Servlet]: java.lang.IllegalArgumentException: Only
> > PortletContext supported.
> > at org.apache.portals.bridges.jsf.SessionMap.<init>(SessionMap.java:56)
> >         at
> > org.apache.portals.bridges.jsf.ServletExternalContextImpl.getSessionMap(
> > ServletExternalContextImpl.java:230)
> >         at org.apache.myfaces.portlet.PortletUtil.isPortletRequest(
> > PortletUtil.java:64)
> >         at org.apache.myfaces.lifecycle.RestoreViewExecutor.deriveViewId(
> > RestoreViewExecutor.java:107)
> >         at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(
> > RestoreViewExecutor.java:57)
> >         at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(
> > LifecycleImpl.java:95)
> >         at org.apache.myfaces.lifecycle.LifecycleImpl.execute(
> > LifecycleImpl.java:70)
> >         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to