myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonardo Uribe <>
Subject Re: Re: Custom tag
Date Fri, 06 Jul 2012 08:35:43 GMT

For that case, in JSF 2.1 a new attribute for cc:attribute was added
called targetAttributeName. For example:

<testComposite:compositeActionTargetAttributeName id="cc1"
                    <f:actionListener for="submitButton"
                    <f:actionListener for="cancelButton"


  <cc:attribute name="submitAction2" targets="submitCancelButton"
targetAttributeName="submitAction" method-signature="java.lang.Object
  <cc:attribute name="cancelAction" targets="submitCancelButton"
method-signature="java.lang.Object action()"/>
  <cc:actionSource name="submitButton" targets="submitCancelButton"/>
  <cc:actionSource name="cancelButton" targets="submitCancelButton"/>
  <testComposite:actionTargetAttributeName id="submitCancelButton"/>


  <cc:attribute name="submitAction" targets="submitButton"
targetAttributeName="action" method-signature="java.lang.Object
  <cc:attribute name="cancelAction" targetAttributeName="action"
method-signature="java.lang.Object action()"/>
  <cc:actionSource name="submitButton"/>
  <cc:actionSource name="cancelButton" targets="cancelAction"/>
  <h:commandButton id="submitButton" value="Submit Button"/>
  <h:commandButton id="cancelAction" value="Cancel Button"/>

This is an example using two composite components from the test case.
I think it is enough to put targetAttributeName="action", there is no
need to add the method signature, I don't remember well, but I hope
you get the idea.

The problem described with clientBehavior sounds something different.
Maybe one client behavior overrides the other one, but it doesn't
sound like a bug. I don't know the details behind primefaces to say
something about it, my first guess could be check if  primefaces ajax
is a "real" ClientBehavior, or its renderers do something under
curtains, which is possible because after all, in that library you can
add effects using component properties, and that's not possible
without tweak p:ajax and the component renderers somehow. Note I'm
speculating here.


Leonardo Uribe

2012/7/5 Thomas Herzog <>:
> I do have a simular problem with clientBehavor and primefaces ajax tag.
> When a clientBehavor is defined in the composite component and in the view
> the composite component is used with primefaces ajax then the clientBehavior
> is not added to the component but will added with faclet ajax.
> Did anyone face this ?
> Is there anything to be aware of maybe naming convention of the
> clienBehavior name ?
> I tried this with an trivial example with nothing defined but clientBehavior
> and i cannot get this work. We need the callback parameter provided by
> primefaces ajax tag.
> Is that an myfaces issue or primefaces related ?
> Websphere
> Myfaces 2.1.1 (i guess )
> Primefaces 3.1
> Send via Samsung Galaxy S2
> -------- Urspr√ľngliche Nachricht --------
> Betreff: Re: Custom tag
> Von: José Luis Cetina <>
> An: MyFaces Discussion <>,Rafael Pestano
> <>
> CC:

View raw message