hi, Simon,

Thanks for the comments. I still feel it's better to have the client code explicitly say "replace...()" since it's more clear. On the other way if you wrap all your logic in one single API and controls the logic by pass in parameters, it's gonna create a hard time for people who read the client code.

As for backward compatibility, you don't need to worry about it. It's already implemented in ChangeManager. If your subclass doesn't override it and somehow calls it, it will be a no-op and we will just log a message on that.

Thanks,
-Yuan

On 4/8/2010 6:17 AM, Simon Lessard wrote:
-1. I really don't like it. It should be an implementation detail of the ChangeManager to either replace/chain the attribute change in the addComponentChange (or any other change for that matter). We have an implementation on our project doing just that. That method would make no sense for our use case and would introduce backward compatibility issues. I could change my opinion, but I'd like a detailed use case as of why this cannot be just an implementation detail before I do.


Regards,

~ Simon

On Wed, Apr 7, 2010 at 5:17 PM, Yuan Gao <yuan....@oracle.com <mailto:yuan....@oracle.com>> wrote:

    hi,

    For JIRA 1761
    (https://issues.apache.org/jira/browse/TRINIDAD-1761), we propose
    to add this API to the ChangeManager interface:
     /**
      * Replace an AttributeComponentChange if it's present.
      *
      * @param facesContext
      * @param uiComponent
      * @param attributeComponentChange
      * @return the old change instance
      */
     public AttributeComponentChange
    replaceAttributeChangeIfPresent(FacesContext facesContext,
       UIComponent uiComponent,
       AttributeComponentChange attributeComponentChange);


    Let me know what do you think about it.

    Thanks,
    -Yuan



Reply via email to