Andrew Robinson said the following On 9/24/2008 9:38 PM PT:
Partial target support already exists in Trinidad, not just
declaratively. So I am not sure why the distinction.
It only works programmatically and programmatic changes are not guaranteed to cause the component's clientId to be rendered. The ability to suppress rendering of clientIds is a useful optimization and one Trinidad should take better advantage of in the future.
 Either way it is
done RequestContextImpl.addPartialTarget(UIComponent) gets called. In
the case of partialTriggers, UIXComponentBase builds up a list of
components and then if an event is broadcast, it loops through these,
calling (not directly, but eventually) addPartalTarget. The
partialTargets simply finds the components and calls addPartialTarget,
passing those components. So since the code is the same in the end,
what is the problem? I am not sure of the problem, I guess I am
missing something. Is there some code that only adds ID attributes
onto HTML only when their partialTriggers attribute is set?
Here is the CoreRenderer implementation of shouldRenderId():

 protected boolean shouldRenderId(
   FacesContext context,
   UIComponent  component)
 {
   String id = component.getId();

   // Otherwise, if ID isn't set, don't bother
   if (id == null)
     return false;
// ... or if the ID was generated, don't bother
   if (id.startsWith(UIViewRoot.UNIQUE_ID_PREFIX))
     return false;

   return true;
 }

This clearly doesn't work well with partialTriggers or partialTargets, but a Renderer can override this to always render the id if any partial triggers are set (and in fact, the rich client does). However, the Renderer knows nothing about other partial targets.

-- Blake Sullivan

-Andrew

On Wed, Sep 24, 2008 at 10:29 PM, Blake Sullivan
<[EMAIL PROTECTED]> wrote:
Andrew,

One disadvantage of specifying partial targets is that the component can no
longer know at the point it is being rendered whether it will need to
potentially re-render itself (as opposed to partial triggers).  How would a
renderer know whether it needs to render an id when partial triggers exist?

-- Blake Sullivan

Andrew Robinson (JIRA) said the following On 9/24/2008 7:55 PM PT:

     [
https://issues.apache.org/jira/browse/TRINIDAD-663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrew Robinson resolved TRINIDAD-663.
--------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.0.4-core)
                   1.2.10-core
         Assignee: Andrew Robinson

Added to the 1.2 Trinidad sandbox



Idea for a new component to enhance PPR
---------------------------------------

                Key: TRINIDAD-663
                URL: https://issues.apache.org/jira/browse/TRINIDAD-663
            Project: MyFaces Trinidad
         Issue Type: Improvement
         Components: Components
   Affects Versions: 1.0.2-core
           Reporter: Andrew Robinson
           Assignee: Andrew Robinson
            Fix For: 1.2.10-core

        Attachments: PartialTriggerEvent.java, PartialTriggerListener.java,
UIPartialTrigger.java


It is not currently possible out of the box to control when in the JSF
lifecycle a Trinidad component triggers its partial notification outside of
actually changing the phase ID of the events, which is not always possible.
Also, it is very difficult to have a component listen to many components.
For example, someone may want to say, re-render component x when any child
of y is triggered.
There is also no functionality  for a push type of PPR. Meaning that right
now components specify that they want to be triggered, but there is no way
to say for a component to target other components (for example, specify on a
button to re-render a text box, instead of specifying on a text-box to
re-render on that button).
I will attach code that I am using in my private project for a component
that makes this relatively easy.





Reply via email to