From adffaces-user-return-1475-apmail-incubator-adffaces-user-archive=incubator.apache.org@incubator.apache.org Fri Dec 01 13:10:20 2006 Return-Path: Delivered-To: apmail-incubator-adffaces-user-archive@locus.apache.org Received: (qmail 98527 invoked from network); 1 Dec 2006 13:10:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Dec 2006 13:10:20 -0000 Received: (qmail 3661 invoked by uid 500); 1 Dec 2006 13:10:28 -0000 Delivered-To: apmail-incubator-adffaces-user-archive@incubator.apache.org Received: (qmail 3636 invoked by uid 500); 1 Dec 2006 13:10:27 -0000 Mailing-List: contact adffaces-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: adffaces-user@incubator.apache.org Delivered-To: mailing list adffaces-user@incubator.apache.org Received: (qmail 3619 invoked by uid 99); 1 Dec 2006 13:10:27 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Dec 2006 05:10:27 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [217.89.70.5] (HELO MOES0012.tcc.dmz.local) (217.89.70.5) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Dec 2006 05:10:16 -0800 Received: from MOES0037.tcc.local ([10.6.4.137]) by MOES0012.tcc.dmz.local with InterScan Message Security Suite; Fri, 01 Dec 2006 15:09:48 +0100 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C71549.FC0DA6EE" Subject: Duplicated clientIds in Components embedded in Trinidad TreeTable X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Fri, 1 Dec 2006 14:10:05 +0100 Message-ID: <885AADC3D2318E45807C702ABC2637DD133844@MOES0037.tcc.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Duplicated clientIds in Components embedded in Trinidad TreeTable Thread-Index: AccVSgS8aFh/XWvgRPCPqsNHyAFstA== From: =?iso-8859-1?Q?B=F6hringer_Jochen?= To: X-imss-version: 2.044 X-imss-result: Passed X-imss-scanInfo: M:P L:E SM:0 X-imss-tmaseResult: TT:0 TS:0.0000 TC:00 TRN:0 TV:3.6.1039(14846.002) X-imss-scores: Clean:99.90000 C:2 M:3 S:5 R:5 X-imss-settings: Baseline:2 C:1 M:1 S:1 R:1 (0.1500 0.1500) X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C71549.FC0DA6EE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, =20 It's the first time I'm developing an own component, so I think my = problems have a very simple solution. I want to develop a component for = drag and drop using the dojo toolkit. But my component is by now very simple. It only renders a div Tag around = its children.=20 The component is a simple class extending UIComponentBase and only = overriding getFamily and the saveState/restoreState methods. The renderer is extending javax.faces.render.Renderer and overrides = encodeBegin and ecodeEnd to write the div Tag. The div tag should get a unique id and I thought the clientId would be = the right choice: =20 @Override public void encodeBegin(FacesContext context, UIComponent = component) throws IOException { if ((context =3D=3D null) || (component =3D=3D null)) { throw new NullPointerException(); } Draggable draggable =3D (Draggable) component; =20 if (draggable.isRendered()) { ResponseWriter writer =3D context.getResponseWriter(); writer.startElement("div", component); writer.writeAttribute("id", = draggable.getClientId(context), "clientId"); } } =20 But if I embed the component (tcc:draggable) in a Trinidad Treetable the = div tag is rendered to the client with the same clientid for all rows in = the tree table. What do I have to change to have a unique id for each = row in the table? For tr:outputText it works?! =20 =20 =20 =20 =20 When I have reached a more advanced level of knowledge in component = development I hope I will be able to donate my drag&drop component to = tomahawk or Trinidad. =20 Regards Jochen ------_=_NextPart_001_01C71549.FC0DA6EE--