> > Hi Baptiste, > > > I would like to have a dynamic suggestion list, e.g. the content of > > the list would be recovered from a database when the other fields of > > the CForms are changed. > > Is it possible for a widget to fire an event to the suggestion list > > and then changing the content of the list ? > > I just want to know if this is would take too much time for such a > > feature. > > First please have a look at: > http://cocoon.apache.org/2.1/userdocs/widgetconcepts/selection > lists.html > According to the book "Cocoon 2 und Tomcat" from Stephan Niedermeier > there is another way via a Java class extending > org.apache.cocoon.forms.datatype.AbstractJavaSelectionList.
Exactly: very easy and efficient! > Anyway, updating the selection list dynamically is not the > problem. The > tricky part is getting access to the underlying model. > > Any elegant ideas out there? (I need it, too :-) just use some jdo like jpox or something as a mapping from java obj to persistency. I copy the source code how i recently added this dynamic selection list: See [1] an example of a dynamic class extending (and jpox things, though it is not totally finished). In your definition, all you need is : <fd:selection-list type="java" class="nl.hippo.cocoon.forms.NewsLetterTypesJavaSelectionList" nullable="false"/> Regards Ard [1] http://svn.hippocms.org/repos/hippo/hippo-components/hippo-community-apps/trunk/hca/src/java/nl/hippo/cocoon/forms/NewsLetterTypesJavaSelectionList.java > > Florian > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
