Em Sat, 18 Apr 2009 16:48:03 -0300, Yeargan Yancey <[email protected]> escreveu:

Before I go banging my head against a wall for too long, is it
possible to create a custom property editor to handle a complex (multi-
valued) property?

Yes! :) There's a guide here: http://tapestry.apache.org/tapestry5/guide/beaneditform.html. If it is not enough, post yourr doubts here and we'll try to help you. ;)

I am working with a directory services database via LDAP and it would
be extremely helpful if I can mange to enhance BeanEditForm and
BeanDisplay to handle LDAP entries where a property (LDAP attribute)
may have multiple values.

To be more specific, I want to create a property editor for the
String[] type. At the moment, I just want to display String[]
properties using the BeanDisplay component, but I can already foresee
a need to be able to fully edit a String[] property (including
adding / removing values from the array, using AJAX to add/remove
fields to the form).

Have you taken a look at the Palette component? It looks like it it already implements what you need: http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Palette.html. It, together with a custom DataTypeAnalyzer, one view block (for BeanDisplay) and one edit block (for BeanEditForm/BeanEditor). The BeanEditForm guide previously mentioned tells you how to do it.

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to