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 <ja...@yahoo.com> on 2009/06/11 03:32:26 UTC

Re: trinidad ppr issue: ajax submit does not work in partially refreshed region

partialTargets are added programmatically for ppr:
 
RequestContext rc = RequestContext.getCurrentInstance();
UIViewRoot root = FacesContext.getCurrentInstance().getViewRoot();
rc.addPartialTargets(root, targets);
 
In our case, no page navigation. the same page is used for ajax call.
 
I am trying to figure out how the initial ppr affects the subsequent ppr calls.
Thanks for further help.
Dave


--- On Wed, 6/10/09, Andrew Robinson <an...@gmail.com> wrote:


From: Andrew Robinson <an...@gmail.com>
Subject: Re: trinidad ppr issue: ajax submit does not work in partially refreshed region
To: "MyFaces Discussion" <us...@myfaces.apache.org>
Date: Wednesday, June 10, 2009, 11:34 AM


Where are your partial triggers? If no components trigger off of the
command link, then nothing will be updated on the client. Also, with
action and not actionListener make sure you never match a navigation
rule. Navigation will invalidate the PPR.

-Andrew

On Wed, Jun 10, 2009 at 10:21 AM, Dave<ja...@yahoo.com> wrote:
> <t:div id="region1">
>
> <tr:commandLink text="updateRegion2" action="#{bean.updateRegion2}"
> partialSubmit="true" ... />
>
> </t:div>
>
> <t:div id="region2">
>  ....
>
> </t:div>
>
> After clicking the updateRegion2 commandLink using ajax submit, the region2
> content is refreshed successfully.  But the <tr:commandLink
> partialSubmit="true" ...> ajax submit in refreshed region2 content did not
> work. When clicking the commandLink, nothing happened. It seems that ajax
> request was not sent to server.
>
> If I changed the the updateRegion2 commandLink as normal submit(not ajax),
> the <tr:commandLink partialSubmit="true" ...> ajax submit in refreshed
> region2 content worked.
>
> I cound not figure out what is the cause. Thanks for any ideas and help.
>
> Dave
>
>



      

Re: trinidad ppr issue: ajax submit does not work in partially refreshed region

Posted by Andrew Robinson <an...@gmail.com>.
What are "targets", and when is this code called? Are you ensuring
that the targets are added while their client ID's are correct
(stamping can change them for example) and before any of these
components are rendered?

-Andrew

On Wed, Jun 10, 2009 at 7:32 PM, Dave<ja...@yahoo.com> wrote:
> partialTargets are added programmatically for ppr:
>
> RequestContext rc = RequestContext.getCurrentInstance();
> UIViewRoot root = FacesContext.getCurrentInstance().getViewRoot();
> rc.addPartialTargets(root, targets);
>
> In our case, no page navigation. the same page is used for ajax call.
>
> I am trying to figure out how the initial ppr affects the subsequent ppr
> calls.
> Thanks for further help.
> Dave
>
> --- On Wed, 6/10/09, Andrew Robinson <an...@gmail.com> wrote:
>
> From: Andrew Robinson <an...@gmail.com>
> Subject: Re: trinidad ppr issue: ajax submit does not work in partially
> refreshed region
> To: "MyFaces Discussion" <us...@myfaces.apache.org>
> Date: Wednesday, June 10, 2009, 11:34 AM
>
> Where are your partial triggers? If no components trigger off of the
> command link, then nothing will be updated on the client. Also, with
> action and not actionListener make sure you never match a navigation
> rule. Navigation will invalidate the PPR.
>
> -Andrew
>
> On Wed, Jun 10, 2009 at 10:21 AM, Dave<ja...@yahoo.com> wrote:
>> <t:div id="region1">
>>
>> <tr:commandLink text="updateRegion2" action="#{bean.updateRegion2}"
>> partialSubmit="true" ... />
>>
>> </t:div>
>>
>> <t:div id="region2">
>>  ....
>>
>> </t:div>
>>
>> After clicking the updateRegion2 commandLink using ajax submit, the
>> region2
>> content is refreshed successfully.  But the <tr:commandLink
>> partialSubmit="true" ...> ajax submit in refreshed region2 content did not
>> work. When clicking the commandLink, nothing happened. It seems that ajax
>> request was not sent to server.
>>
>> If I changed the the updateRegion2 commandLink as normal submit(not ajax),
>> the <tr:commandLink partialSubmit="true" ...> ajax submit in refreshed
>> region2 content worked.
>>
>> I cound not figure out what is the cause. Thanks for any ideas and help.
>>
>> Dave
>>
>>
>
>