You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Adam Chesney <ad...@multicom.co.uk> on 2005/04/25 17:23:57 UTC

Generic JavaBean Editor Component

Hi there,

I am new to Tapestry and so I could use some help in working out the "Tapestry Way" of building a generic bean editor.

I have built one of these in Swing and we use it a great deal for complicated configuration of our software. Basically, we design our configuration beans with an XML Schema, then use a data binder (castor, XMLBeans etc) to generate the classes to hold the config data, then use a DB to store the versioned XML against a set of config keys. By using XML, we can have deeply structured data, that is also resilient to changes (usually additions) in the underlying config beans.

Anyway, in order to allow users to edit this data, I built a Swing bean editor which was essentially just a tree and a table underneath it. The tree displayed the root bean with complex properties (other objects) and collections as child nodes allowing you to navigate to anywhere in the heirachy, and the the table displayed the simple properties (Strings, Numbers, Dates etc), along with custom editors, of the currently selected object (in the tree).

There were also context sensitive buttons to add, reorder and remove etc.

It should be possible to register custom editors for Classes, but to drop back to the generic editor if none are found.

So, has anyone done anything similar in Tapestry? 
Are there any similar examples? 
Would anyone else be interested in contributing to, or just using, such a component? 
In fact, can it be done as a single component in Tapestry?

Basically, where should I start?

Thanks for your time,

Adam.


Re: Generic JavaBean Editor Component

Posted by Danny Mandel <dm...@tolweb.org>.
Hi Adam.  You might want to take a look at the Trails project.  It might 
be a good fit for you (and it's really cool!)

https://trails.dev.java.net/

Danny

Adam Chesney wrote:

>Hi there,
>
>I am new to Tapestry and so I could use some help in working out the "Tapestry Way" of building a generic bean editor.
>
>I have built one of these in Swing and we use it a great deal for complicated configuration of our software. Basically, we design our configuration beans with an XML Schema, then use a data binder (castor, XMLBeans etc) to generate the classes to hold the config data, then use a DB to store the versioned XML against a set of config keys. By using XML, we can have deeply structured data, that is also resilient to changes (usually additions) in the underlying config beans.
>
>Anyway, in order to allow users to edit this data, I built a Swing bean editor which was essentially just a tree and a table underneath it. The tree displayed the root bean with complex properties (other objects) and collections as child nodes allowing you to navigate to anywhere in the heirachy, and the the table displayed the simple properties (Strings, Numbers, Dates etc), along with custom editors, of the currently selected object (in the tree).
>
>There were also context sensitive buttons to add, reorder and remove etc.
>
>It should be possible to register custom editors for Classes, but to drop back to the generic editor if none are found.
>
>So, has anyone done anything similar in Tapestry? 
>Are there any similar examples? 
>Would anyone else be interested in contributing to, or just using, such a component? 
>In fact, can it be done as a single component in Tapestry?
>
>Basically, where should I start?
>
>Thanks for your time,
>
>Adam.
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org