You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Dave Syer <da...@hotmail.com> on 2007/10/09 12:45:04 UTC

[Trinidad]: is there a way to get an "onLoad" from a partial submit?

Is there a way to get an "onLoad" from a partial submit?  It seems like there
should be a way to get a client-side callback when the Ajax request is
complete, so I can show a hidden panel.  Is it possible?

Alternatively, is there a way to add an actionListener to a panelPopup
component, which would probably be the most direct way to do what I want?  I
find it quite strange that it is not exposed as a standard attribute of that
component anyway.  Is there a reason why it wouldn't be possible to expose
as an attribute (or facet)?
-- 
View this message in context: http://www.nabble.com/-Trinidad-%3A-is-there-a-way-to-get-an-%22onLoad%22-from-a-partial-submit--tf4593436.html#a13113193
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Trinidad]: is there a way to get an "onLoad" from a partial submit?

Posted by Abhijit Ghosh <ab...@gmail.com>.
Hi Dave,
AFAIK,addDomReplaceListener  was added in 1.0.3,so it should be 1.2.3 which
is not released yet.I think addStateChangeListener(myCallback) should be
available in 1.2.2.

Maybe the committers can corroborate this information.

Thanks,
Abhijit Ghosh


On 10/10/07, Dave Syer <da...@hotmail.com> wrote:
>
>
> Looks interesting.  But I get a Javascript error
> "TrPage.getInstance().addDomReplaceListener is not a function".  I am
> using
> 1.2.2.  When I look in the jar file I find Page.js and TrPage.getINstance
> ()
> is defined there but I can't see the callback.  Is it a new feature?
>
>
> Abhijit Ghosh wrote:
> >
> > Hi Dave,
> > There is a 'TrPage.getInstance
> > ().getRequestQueue().addStateChangeListener(myCallback);'
> > and a
> > 'TrPage.getInstance().addDomReplaceListener(myCallback);' which might
> help
> > you.
> >
> > More information here:
> >
> http://myfaces.apache.org/trinidad/devguide/ppr.html#Javascript%20APIs%20for%20PPR
> >
> > HTH,
> > Abhi
> >
> > On 10/9/07, Dave Syer <da...@hotmail.com> wrote:
> >>
> >>
> >> Is there a way to get an "onLoad" from a partial submit?  It seems like
> >> there
> >> should be a way to get a client-side callback when the Ajax request is
> >> complete, so I can show a hidden panel.  Is it possible?
> >>
> >> Alternatively, is there a way to add an actionListener to a panelPopup
> >> component, which would probably be the most direct way to do what I
> >> want?  I
> >> find it quite strange that it is not exposed as a standard attribute of
> >> that
> >> component anyway.  Is there a reason why it wouldn't be possible to
> >> expose
> >> as an attribute (or facet)?
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/-Trinidad-%3A-is-there-a-way-to-get-an-%22onLoad%22-from-a-partial-submit--tf4593436.html#a13113193
> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/-Trinidad-%3A-is-there-a-way-to-get-an-%22onLoad%22-from-a-partial-submit--tf4593436.html#a13130847
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Re: [Trinidad]: is there a way to get an "onLoad" from a partial submit?

Posted by Dave Syer <da...@hotmail.com>.
Looks interesting.  But I get a Javascript error
"TrPage.getInstance().addDomReplaceListener is not a function".  I am using
1.2.2.  When I look in the jar file I find Page.js and TrPage.getINstance()
is defined there but I can't see the callback.  Is it a new feature?


Abhijit Ghosh wrote:
> 
> Hi Dave,
> There is a 'TrPage.getInstance
> ().getRequestQueue().addStateChangeListener(myCallback);'
> and a
> 'TrPage.getInstance().addDomReplaceListener(myCallback);' which might help
> you.
> 
> More information here:
> http://myfaces.apache.org/trinidad/devguide/ppr.html#Javascript%20APIs%20for%20PPR
> 
> HTH,
> Abhi
> 
> On 10/9/07, Dave Syer <da...@hotmail.com> wrote:
>>
>>
>> Is there a way to get an "onLoad" from a partial submit?  It seems like
>> there
>> should be a way to get a client-side callback when the Ajax request is
>> complete, so I can show a hidden panel.  Is it possible?
>>
>> Alternatively, is there a way to add an actionListener to a panelPopup
>> component, which would probably be the most direct way to do what I
>> want?  I
>> find it quite strange that it is not exposed as a standard attribute of
>> that
>> component anyway.  Is there a reason why it wouldn't be possible to
>> expose
>> as an attribute (or facet)?
>> --
>> View this message in context:
>> http://www.nabble.com/-Trinidad-%3A-is-there-a-way-to-get-an-%22onLoad%22-from-a-partial-submit--tf4593436.html#a13113193
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/-Trinidad-%3A-is-there-a-way-to-get-an-%22onLoad%22-from-a-partial-submit--tf4593436.html#a13130847
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Trinidad]: is there a way to get an "onLoad" from a partial submit?

Posted by Abhijit Ghosh <ab...@gmail.com>.
Hi Dave,
There is a 'TrPage.getInstance
().getRequestQueue().addStateChangeListener(myCallback);'
and a
'TrPage.getInstance().addDomReplaceListener(myCallback);' which might help
you.

More information here:
http://myfaces.apache.org/trinidad/devguide/ppr.html#Javascript%20APIs%20for%20PPR

HTH,
Abhi

On 10/9/07, Dave Syer <da...@hotmail.com> wrote:
>
>
> Is there a way to get an "onLoad" from a partial submit?  It seems like
> there
> should be a way to get a client-side callback when the Ajax request is
> complete, so I can show a hidden panel.  Is it possible?
>
> Alternatively, is there a way to add an actionListener to a panelPopup
> component, which would probably be the most direct way to do what I
> want?  I
> find it quite strange that it is not exposed as a standard attribute of
> that
> component anyway.  Is there a reason why it wouldn't be possible to expose
> as an attribute (or facet)?
> --
> View this message in context:
> http://www.nabble.com/-Trinidad-%3A-is-there-a-way-to-get-an-%22onLoad%22-from-a-partial-submit--tf4593436.html#a13113193
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>