Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 94520 invoked from network); 2 Mar 2011 12:03:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Mar 2011 12:03:18 -0000 Received: (qmail 71589 invoked by uid 500); 2 Mar 2011 12:03:17 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 71196 invoked by uid 500); 2 Mar 2011 12:03:14 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 71189 invoked by uid 99); 2 Mar 2011 12:03:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Mar 2011 12:03:13 +0000 X-ASF-Spam-Status: No, hits=4.0 required=5.0 tests=FUZZY_AMBIEN,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [212.36.72.25] (HELO ob1.smr.serenamail.com) (212.36.72.25) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Mar 2011 12:03:05 +0000 Received: from Server_08.serenamail.com (localhost [127.0.0.1]) by ob1.smr.serenamail.com (Postfix) with SMTP id 89F64405AA for ; Wed, 2 Mar 2011 13:02:41 +0100 (CET) Received: from XGW0101.INTRANET.MANGO.ES (213.0.19.230) by serenamail.com with ESMTP USCSS_Nostromo [JoeL 1.9.1mu_BP] id:; Wed, 02 Mar 2011 13:02:39 +0100 (CET) X-RealSender: ricard.more@mango.com X-ToDomain: myfaces.apache.org x-m-msg: B22D2c2958128B_8 Received: from xvs0101.intranet.mango.es ([192.168.63.12]) by xgw0101.intranet.mango.es with Microsoft SMTPSVC(6.0.3790.3959); Wed, 2 Mar 2011 13:02:39 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CBD8D1.B99EB2CB" Subject: Problem with ui:repeat and behaviorized commandLink Date: Wed, 2 Mar 2011 13:02:37 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Problem with ui:repeat and behaviorized commandLink Thread-Index: AcvY0QkiNRg7QUwJTzyhTjJY9+yXLQAAKcYw From: "RICARD MORE FARRES" To: X-OriginalArrivalTime: 02 Mar 2011 12:02:39.0130 (UTC) FILETIME=[BA0BEFA0:01CBD8D1] This is a multi-part message in MIME format. ------_=_NextPart_001_01CBD8D1.B99EB2CB Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, =20 I'm trying to upgrade from MyFaces 1.2.7 to 2.0.4 our online store. To do it, I need to adapt our own UICommand components to the new version. I'm working on overwrite your HTMLLinkRendererBase in order to adapt it to our graphic requirements, but keeping original javascript generation. Now I think I have found a bug if there is a commandLink or commandButton with ajax behavior, inside a ui:repeat tag. For example: =20

=20
=20 If there is no ajax modifier, all works fine, but if there's they trhow a: javax.faces.FacesException: Component with id:texto not found =20 org.apache.myfaces.renderkit.html.HtmlAjaxBehaviorRenderer.getComponentI d(HtmlAjaxBehaviorRenderer.java:289) =20 I have solved it rewriting the findComponent(String id) method in our implementation, in order to search for the 'render' id (texto in the example) starting from the viewRoot. I think the problem is that in the UIComponentBase.findComponent(String id) it looks for the referenced component, starting from the closest NamingContainer to the source element: =20 if (this instanceof NamingContainer) { findBase =3D this; } else { findBase =3D _ComponentUtils.findParentNamingContainer(this, true /* root= if not found */); }=20 =20 And, I'm not sure, but I think ui:repeat related component should implements NamingContainer, so it looks for the referenced component only inside the ui.repeat tag. Could it be? And could it be solved? =20 Thanks in advance! Ricard =20 =20 =20 =20 Para el medi= oambiente cada gesto cuenta: por favor, no imprimas este e-mail si no es = realmente necesario =20 =20 =20 Este correo = y sus archivos asociados son privados y confidenciales y va dirigido excl= usivamente a su destinatario. Si =20 recibe este = correo sin ser el destinatario del mismo, le rogamos proceda a su elimina= cion y lo ponga en conocimiento =20 del emisor. = La difusion por cualquier medio del contenido de este correo podr=EDa ser= sancionada conforme a lo previsto =20 en las leyes= espanyolas. No se autoriza la utilizacion con fines comerciales o para s= u incorporacion a ficheros =20 automatizado= s de las direcciones del emisor o del destinatario. =20 =20 =20 Each one of = us can do our bit for the environment: please, do not print this e-mail u= nless it is absolutely essential. =20 =20 =20 This mail an= d its attached files are confidential and are exclusively intented to the= ir addresses. In case you may =20 receive this= mail not being its address, we beg you to let us know the error by reply= and to proceed to delete it. The =20 circulation = by any mean of this mail could be penalised in accordance with the Spanis= h legislation. The use of both =20 the transmit= ter and the addresses with a commercial aim, or in order to be incorporat= ed to automated files, =20 is not autho= rized. =20 =20 ------_=_NextPart_001_01CBD8D1.B99EB2CB Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

I’m trying to upgrade from MyFaces 1.2.7 = to 2.0.4 our online store. To do it, I need to adapt our own UICommand compo= nents to the new version. I’m working on overwrite your HTMLLinkRendererB= ase in order to adapt it to our graphic requirements, but keeping original javas= cript generation.

Now I think I have found a bug if there is a commandLink or commandButton with ajax behavior, inside a ui:repeat tag. For example:

 

<h:outputText id=3D"texto" = value=3D"#{bean.texto}&quo= t;>

</h:outputText>

<br/><br/>

<ui:repeat value=3D"#{be= an.textos}" var=3D"text"= >

<h:commandLink id=3D"boton10" value=3D"#{text}">

           = ; <f:ajax event=3D"click" = render=3D"texto" = listener=3D"#{bean.actionListenerLink}"/>

      </h:commandLink>

      <br/>

</ui:repeat>

 

If there is no ajax modifier, all works fine, but if there’s they trhow a:

javax.faces.FacesException: Component with id:texto not fou=
nd
        org.apache.myfaces.renderki=
t.html.HtmlAjaxBehaviorRenderer.getComponentId(HtmlAjaxBehaviorRenderer.j=
ava:289)

 

I have solved i= t rewriting the findComponent(String id) method in our implemen= tation, in order to search for the ‘render’ id (texto in the example) st= arting from the viewRoot.

I think the pro= blem is that in the UIComponentBase.findComponent(String id) it looks for the referenced component, starting from the closest NamingConta= iner to the source element:

 

if (this instan= ceof NamingContainer)

{

findBase =3D this;

}

else=

{

findBase =3D _ComponentUtils.findParentNamingContainer(this, true /* root if not f= ound */);

}

 

And, I’m = not sure, but I think ui:repeat related component should implements NamingContainer= , so it looks for the referenced component only inside the ui.repeat tag. Coul= d it be? And could it be solved?

 

Thanks in advan= ce!

Ricard

 

 


Para el medioambiente cada gesto cuenta: por f= avor, no imprimas este e-mail si no es realmente necesario.

=20 Este correo y sus archivos asociados son privados y confidenciales y va d= irigido exclusivamente a su destinatario. =20 Si recibe este correo sin ser el destinatario del mismo,le rogamos proced= a a su eliminaci=F3n y lo ponga en conocimiento del emisor. =20 La difusi=F3n por cualquier medio del contenido de este correo podr=EDa s= er sancionada conforme a lo previsto en las leyes espa=F1olas. =20 No se autoriza la utilizaci=F3n con fines comerciales o para su incorpora= ci=F3n a ficheros automatizados de las direcciones del emisor o del desti= natario. =20

=20 Each one of us can do our bit for the environment: please, do not print t= his e-mail unless it is absolutely essential. =20

=20 This e-mail and its attached files are confidential and are exclusively i= ntented for their addressees. =20 If you have received this e-mail and it is not addressed to you, please n= otify us of the error by replying to it before proceeding to delete it. =20 The diffusion of the contents of this e-mail by whatever means may be pen= alised in accordance with Spanish law. =20 The utilisation of the addresses of the sender and the addressee for comm= ercial purposes or for inclusion on computer files is not authorized. =20
------_=_NextPart_001_01CBD8D1.B99EB2CB--