My 2¢: I think extending DBList into a "DynamicList" with scripts for displaying valid entries and validating input would be a nice addition.  Indeed, validation scripts should probably be attachable to any property.

Somewhat related, Ludovic has agreed in the past that we should extend XWiki classes to allow "method" scripts for lifecycle events; shame on me for not yet creating a JIRA task with this request.  Perhaps "get list values" and "validate property value" should be treated as methods?
- - -
Hans Gerwitz
http://phobia.com/



On Jul 31, 2005, at 8:41 AM, Stéphane Laurière wrote:


Hi XWiki devs,

At Mandriva we have the need for a class property type that would be
able to handle dynamic lists. Well, the DBList properties are already
dynamic, but we'd need something more dynamic.

Usage examples:
* apply some filter to a list of results fetched from the database,
* translate the DBList values returned by a SQL query before presenting
them to the user
* build lists from other sources than the database (from a web service
call etc.)

Such lists would be built by a Velocity or Groovy script, declared as an
attribute of the class property. What do you think of the feature? Do
you have any suggestion on the way it should be implemented? We could
either create a new Java type "DynamicList" + new wiki table
xwikidynlistclasses, inspired by the "DBList" Java type, or transform
the DBList into a "DynamicList" that would handle either Hibernate SQL
queries, or Velocity/Groovy scripts. That would be handy also to have
the possibility to specify the name of the document containing the
script to be executed, if the script is to be reused by several classes.

Stéphane and Christophe



--
You receive this message as a subscriber of the xwiki-dev@objectweb.org mailing list.
To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws




- - -
Hans Gerwitz