incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: PPR effects on custom component
Date Fri, 09 Mar 2007 19:15:00 GMT
What you need to do, at a minimum:

- In your Renderer, make sure that the root element
  passes the UIComponent to ResponseWriter.startElement(),
  and that a unique ID is written on that same root element.

If you do that, and just that, RequestContext.addPartialTarget() will
work.

If you want partialTriggers to work, then you need to:

- Add a partialTriggers attribute on your component
- If you don't extend from UIXComponentBase, copy the following code
  from UIXComponentBase.decode() to your decode() methods:

    Object triggers = getAttributes().get("partialTriggers");
    if (triggers instanceof String[])
    {
      RequestContext rc = RequestContext.getCurrentInstance();
      if (rc != null)
        rc.addPartialTriggerListeners(this, (String[]) triggers);
    }

And that's it!

-- Adam




On 3/9/07, Bertrand, Shawn R <shawn.bertrand@tycoelectronics.com> wrote:
> Hi all,
>
>
>
> I have a custom component I've developed that I'd like to be able to
> refresh with PPR as a result of a selectOneChoice component trigger.
> The custom component simply outputs an HTML table at this point, so
> wouldn't I need to just wrap the custom tag with a panelGroup or some
> other component and make that component trigger off of the
> selectOneChoice?  Are there any requirements on the custom component
> side in order for PPR to work?
>
>
>
> Thanks in advance,
>
>
>
> Shawn
>
>
>
>

Mime
View raw message