Yeah, that won't work as easily.
FacesContext.getCurrentInstance(); implies that FacesServlet was called
which is the entity responsible of its instanciation. You can try:
FacesContextFactory factory = (FacesContextFactory)FactoryFinder.getFactory(
FactoryFinder.FACES_CONTEXT_FACTORY);
FacesContext context = factory.getFacesContext(context, request, response,
dummyLifeCycle);
However, I'm not sure this will work with the request structure built by
DWRServlet, but it might. Since you need acces to those low level objects
(context, request, and response) you'll have to edit DWR code a bit to have
it creates the context instance.
Regards,
~ Simon
On 10/5/06, Anthony Yulo <[EMAIL PROTECTED]> wrote:
Actually what I want is to launch a dialog when the onfocus() event fires.
I am getting the FacesContext Instance on the method that is called by the
javascript so that will pose a problem?
<af:inputText ... onfocus=FocusFunction() />
...
...
...
//
function FocusFunction() {
BackingBean.launchDialog();
}
...
...
...
public void launchDialog() {
FacesContext context = FacesContext.getCurrentInstance();
...
...
...
}
-----Original Message-----
From: Simon Lessard [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 05, 2006 9:41 PM
To: [email protected]
Subject: Re: DWR and ADF Faces
I did not try it, but I don't see any reason why it would not work though,
as long as you don't need a FacesContext instance in your DWR method. If
you
do, it might get hellish.
Regards,
~ Simon
On 10/5/06, Anthony Yulo <[EMAIL PROTECTED]> wrote:
>
> Has anyone tried to integrate DWR with ADF Faces?
>
> *************The information transmitted is intended only for the person
> or
> entity to which it is addressed and may contain confidential and/or
> privileged material. Any review,retransmission,dissemination or other
use
> of, or taking of any action in reliance upon, this information by
persons
> or
> entities other than the intended recipient is prohibited. If you
received
> this in error, please contact the sender and delete the material from
any
> computer.*********************
>
>
*************The information transmitted is intended only for the person
or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review,retransmission,dissemination or other use
of, or taking of any action in reliance upon, this information by persons
or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.*********************