Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 90447 invoked from network); 3 Jul 2007 08:49:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jul 2007 08:49:18 -0000 Received: (qmail 583 invoked by uid 500); 3 Jul 2007 08:49:14 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 546 invoked by uid 500); 3 Jul 2007 08:49:14 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 529 invoked by uid 99); 3 Jul 2007 08:49:14 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jul 2007 01:49:14 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [165.212.64.21] (HELO gateout01.mbox.net) (165.212.64.21) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jul 2007 01:49:10 -0700 Received: from gateout01.mbox.net (gateout01.mbox.net [165.212.64.21]) by gateout01.mbox.net (Postfix) with ESMTP id 3B698186E for ; Tue, 3 Jul 2007 08:48:47 +0000 (GMT) Received: from GW2.EXCHPROD.USA.NET [165.212.116.254] by gateout01.mbox.net via smtad (C8.MAIN.3.34P) with ESMTP id XID650LgciWv0532Xo1; Tue, 03 Jul 2007 08:48:47 -0000 X-USANET-Source: 165.212.116.254 IN mhn@recommind.com GW2.EXCHPROD.USA.NET X-USANET-MsgId: XID650LgciWv0532Xo1 Received: from VS6.EXCHPROD.USA.NET ([10.116.208.162]) by GW2.EXCHPROD.USA.NET with Microsoft SMTPSVC(6.0.3790.1830); Tue, 3 Jul 2007 02:47:03 -0600 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_01C7BD4E.F8330CC6" Subject: how to render various components dynamically for a generic editor ? Date: Tue, 3 Jul 2007 02:48:45 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: how to render various components dynamically for a generic editor ? Thread-Index: Ace9TvdVZbtZJVwjRKW6XhOArmaviA== From: "Michael Heinen" To: X-OriginalArrivalTime: 03 Jul 2007 08:47:03.0564 (UTC) FILETIME=[BA652CC0:01C7BD4E] X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C7BD4E.F8330CC6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, =20 I have to create a generic editor with various fields based on a configuration(file, database ...). Each field can be rendered as a different input type, e.g. selectOneCheckbox, selectManyCheckbox, selectOneRadio, selectOneMenu, selectManyMenu or even inside a tree2 structure. Moreover I have to add validators and converters to the components, e.g. for numeric input, dates etc. =20 I am currently no sure what's the best approach for this and I would be happy about some feedback. I am sure that some of you have to implement these type of requirements and therefore I look forward to your recommendations and experiences. =20 I see the following alternatives: a) loop over the fields in the jsp (with a datalist) and define all the possible types of components. Then the rendered attribute could be used to show/hide them based on the configuration. --> seems not very performant --> no idea how to add converters and validators because they don't offer a rendered attribute =20 b) create the UIComponents and the component tree on serverside and use component bindings --> complicates the maintenance from my point of view. because styleclasses, js-eventhandlers etc must be set in java. =20 c) use some kind of dynamic includes ? --> ?? =20 d) ??? =20 Michael ------_=_NextPart_001_01C7BD4E.F8330CC6 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

I have to create a generic = editor with various fields based on a configuration(file, database …). Each = field can be rendered as a different input type, e.g. selectOneCheckbox, selectManyCheckbox, selectOneRadio, selectOneMenu, selectManyMenu or = even inside a tree2 structure. Moreover I have to add validators and = converters to the components, e.g. for numeric input, dates etc.

 

I am currently no sure what's = the best approach for this and I would be happy about some = feedback.

I am sure that some of you have = to implement these type of requirements and therefore I look forward to your = recommendations and experiences.

 

I see the following = alternatives:

a) loop over the fields in the = jsp (with a datalist) and define all the possible types of = components.

   Then the rendered = attribute could be used to show/hide them based on the = configuration.

   --> seems not = very performant

   --> no idea how = to add converters and validators because they don't offer a rendered = attribute

   =

b) create the UIComponents and = the component tree on serverside and use component = bindings

  --> complicates the = maintenance from my point of view. because styleclasses, js-eventhandlers etc must = be set in java.

 

c) use some kind of dynamic = includes ?

  --> = ??

 

d) ???

 

Michael

------_=_NextPart_001_01C7BD4E.F8330CC6--