myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Wessendorf" <>
Subject Re: [Trinidad] how to PPR without trigger/target dependencies
Date Wed, 30 Jan 2008 11:12:07 GMT

On Jan 24, 2008 7:29 PM, Renzo Tomaselli <> wrote:
> Hi, I'm trying to figure out how to PPR a target which has no static
> knowledge about its triggers, e.g. no partialTriggers are specified.
> At the same time triggers (button and links) do not know about the
> target they will potentially PPR.
>  From the dev-guide, I knew about the addPartialTarget(component)
> method, which seems nearly perfect for my purposes, but I have a couple
> of questions:
> - assume I use a binding attribute to let a bean knowing about a
> component to PPR (e.i. tr:panelPopup or tr:panelGroupLayout), all I need
> is to invoke the method above when the binding method is called to give
> the component to a bean ? If not, what is the right context to call this
> method ?

this is what I do, for instance

    // find the UIComponent (or use binding)
    UIXTable table = (UIXTable)
// TODO: check if != null.....

    // set new "data" to the table

    // add the Table as a target;
    RequestContext afContext = RequestContext.getCurrentInstance();

> - what about the partialSubmit attribute of potential triggers: must it
> be set on all candidates, in spite of missing any target ? Does it have
> any side effect if the target is missing ?

I think I don't understand.
partialSubmit must be true to cause PPR.
you can update ANY JSF UIComponent, with the addPartialTarget()

if the the passed in comp is NULL, you get a NPE


> Comments are welcome, thanks.
> -- Renzo

Matthias Wessendorf

further stuff:
mail: matzew-at-apache-dot-org

View raw message