Re: Re: Custom tag
Hi For that case, in JSF 2.1 a new attribute for cc:attribute was added called targetAttributeName. For example: testComposite:compositeActionTargetAttributeName.xhtml actionTargetAttributeName.xhtml 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. regards, 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 8.0.0.1 > 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: > >
Re: Re: Custom tag
I saw you example before, but i get confused when i try yo use the targetAttributeName, in my xhtml says: "The attribute targetAttributeName is not defined in the component attribute" Im using MyFaces 2.1.8 with TomEE 1.0.0 (trunk updated version). Why targetAttributeName is not defined? what im doing wrong? 2012/7/6 Leonardo Uribe : > Hi > > For that case, in JSF 2.1 a new attribute for cc:attribute was added > called targetAttributeName. For example: > > submitAction2="testActionMethodTypeSubmit" > cancelAction="#{bean.cancelAction}"> > binding="#{bean.submitActionListener}"/> > binding="#{bean.cancelActionListener}"/> > > > testComposite:compositeActionTargetAttributeName.xhtml > > >targetAttributeName="submitAction" method-signature="java.lang.Object > action()"/> >method-signature="java.lang.Object action()"/> > > > > > > > > actionTargetAttributeName.xhtml > > >targetAttributeName="action" method-signature="java.lang.Object > action()"/> >method-signature="java.lang.Object action()"/> > > > > > > > > > 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. > > regards, > > 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 8.0.0.1 >> 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: >> >> -- --- SCJA. José Luis Cetina ---
Re: Re: Custom tag
Here is what i have: http://www.w3.org/1999/xhtml"; xmlns:h="http://java.sun.com/jsf/html"; xmlns:f="http://java.sun.com/jsf/core"; xmlns:p="http://primefaces.org/ui"; xmlns:kx="http://java.sun.com/jsf/composite/componentes"; xmlns:cc="http://java.sun.com/jsf/composite";> .. I see this: "The component library Composite Components does not contain component targetAttributeName" As i can see i dont have the targetAttributeName and clientBehaviour attributes, why? pom.xml: org.apache.myfaces.core myfaces-bundle 2.1.8 provided Using Netbeans 7.1 2012/7/6 José Luis Cetina : > I saw you example before, but i get confused when i try yo use the > targetAttributeName, in my xhtml says: > "The attribute targetAttributeName is not defined in the component attribute" > > Im using MyFaces 2.1.8 with TomEE 1.0.0 (trunk updated version). > > > Why targetAttributeName is not defined? what im doing wrong? > > 2012/7/6 Leonardo Uribe : >> Hi >> >> For that case, in JSF 2.1 a new attribute for cc:attribute was added >> called targetAttributeName. For example: >> >> > submitAction2="testActionMethodTypeSubmit" >> cancelAction="#{bean.cancelAction}"> >> > binding="#{bean.submitActionListener}"/> >> > binding="#{bean.cancelActionListener}"/> >> >> >> testComposite:compositeActionTargetAttributeName.xhtml >> >> >> > targetAttributeName="submitAction" method-signature="java.lang.Object >> action()"/> >> > method-signature="java.lang.Object action()"/> >> >> >> >> >> >> >> >> actionTargetAttributeName.xhtml >> >> >> > targetAttributeName="action" method-signature="java.lang.Object >> action()"/> >> > method-signature="java.lang.Object action()"/> >> >> >> >> >> >> >> >> >> 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. >> >> regards, >> >> 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 8.0.0.1 >>> 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: >>> >>> > > > > -- > --- > SCJA. José Luis Cetina > --- -- --- SCJA. José Luis Cetina ---