You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Renzo Tomaselli <re...@tecnotp.it> on 2008/01/30 11:52:57 UTC

[Trinidad] tr:panelPopup and PPR

Hi, can anybody suggest a way to PPR a modal tr:panelPopup ? There is no 
reason to render the entire page, since it's already there and the popup 
just overwrites it.
I tried to catch the popup component through binding, then I used 
RequestContext.getCurrentInstance().addPartialTarget(component).
Candidate buttons on the page have partialSubmit="true", but nothing 
appears, although a PPR cycle is fired and the above call is performed.
Indeed response XDR contains some error message - without any explicit 
text - but the popup code is entirely missing.
The overall thing works fine if the entire page is rendered.



Re: [Trinidad] tr:panelPopup and PPR

Posted by Renzo Tomaselli <re...@tecnotp.it>.
I spent sometime on this issue. I wonder if anybody knowing PPR internal 
details can explain me how it should work.
I noticed that calling addPartialTarget ends up in adding a component to 
a list in RequestContextImpl.
But any PPR rendering then looks for a current target in 
PartialPageContextImpl (_currentTargetStack). No target, no rendering.
That's why my XDR response looks nearly empty.
I guess I miss something. Any help is appreciated.

-- Renzo

Renzo Tomaselli wrote:
> Hi, can anybody suggest a way to PPR a modal tr:panelPopup ? There is 
> no reason to render the entire page, since it's already there and the 
> popup just overwrites it.
> I tried to catch the popup component through binding, then I used 
> RequestContext.getCurrentInstance().addPartialTarget(component).
> Candidate buttons on the page have partialSubmit="true", but nothing 
> appears, although a PPR cycle is fired and the above call is performed.
> Indeed response XDR contains some error message - without any explicit 
> text - but the popup code is entirely missing.
> The overall thing works fine if the entire page is rendered.
>
>
>

Re: [Trinidad] tr:panelPopup and PPR

Posted by Andrew Robinson <an...@gmail.com>.
I don't think PPR and JSTL tags can be mixed.

JSTL is evaluated at page compilation time, not when it is rendered. Use the
rendered attribute to change run-time visibility.

also, if the popup is not on the page, then you will need to PPR the parent
component, not the popup. This is because the client HTML will be replaced.
If the component was not rendered (or a place holder), then there is nothing
to update on a PPR. PPR pretty much never inserts new elements, only
replaces.

On Jan 30, 2008 11:17 AM, Renzo Tomaselli <re...@tecnotp.it>
wrote:

>  Andrew,
> the popup is not yet on the current page. Then I click on a button having
> partialSubmit="true" (one out of several candidate buttons).
> As an action followup, the popup component is created on the page (a c:if
> condition becomes true, the component is ui:included), registering itself
> for rendering through addPartialTarget().
> I expected that the PPR response will carry the popup alone together with
> its contents.
> Then a small js chunk at the end of the popup code calls
> TrPanelPopup.showPopup() to make it visible (dirty, but the component does
> not allow for external triggers).
> All of this works fine with full page rendering, e.g. I must render the
> full page (same contents as actually displayed) plus the popup.
> With PPR nothing changes on the page: XDR response is nearly empty and
> thus js is not executed, since there is no popup.
> It seems that there is no PPR target (see my own previous reply).
>
> -- Renzo
>
>
>
> Andrew Robinson wrote:
>
> Do you mean when you open the popup, or when it is already open? If you
> are referring to when it is already open, why not just PPR all the children
> of the popup (put a PPR-able top level component in the popup and add that
> as the target).
>
> On Jan 30, 2008 3:52 AM, Renzo Tomaselli <re...@tecnotp.it>
> wrote:
>
> > Hi, can anybody suggest a way to PPR a modal tr:panelPopup ? There is no
> > reason to render the entire page, since it's already there and the popup
> > just overwrites it.
> > I tried to catch the popup component through binding, then I used
> > RequestContext.getCurrentInstance().addPartialTarget(component).
> > Candidate buttons on the page have partialSubmit="true", but nothing
> > appears, although a PPR cycle is fired and the above call is performed.
> > Indeed response XDR contains some error message - without any explicit
> > text - but the popup code is entirely missing.
> > The overall thing works fine if the entire page is rendered.
> >
> >
> >
>

Re: [Trinidad] tr:panelPopup and PPR

Posted by Andrew Robinson <an...@gmail.com>.
Do you mean when you open the popup, or when it is already open? If you are
referring to when it is already open, why not just PPR all the children of
the popup (put a PPR-able top level component in the popup and add that as
the target).

On Jan 30, 2008 3:52 AM, Renzo Tomaselli <re...@tecnotp.it> wrote:

> Hi, can anybody suggest a way to PPR a modal tr:panelPopup ? There is no
> reason to render the entire page, since it's already there and the popup
> just overwrites it.
> I tried to catch the popup component through binding, then I used
> RequestContext.getCurrentInstance().addPartialTarget(component).
> Candidate buttons on the page have partialSubmit="true", but nothing
> appears, although a PPR cycle is fired and the above call is performed.
> Indeed response XDR contains some error message - without any explicit
> text - but the popup code is entirely missing.
> The overall thing works fine if the entire page is rendered.
>
>
>