Hi Baptiste,
Just saw that the main part of my solution was a custom generator I
wrote, that simply gets a form instance curently shown and outputs it's
current content in xml form. I use this to transform it to any
individual suggestion-list output.
Unfortunately you have to tweak the dojo code a litte to make the
suggestion lists "onvaluechangeable" ... I will gladly share my code.
Christofer
Baptiste Placé schrieb:
Dev at weitling a écrit :
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/selectionlists.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.
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 :-)
Florian
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi Florian,
Thanks for your answer !
About updating the list, do you mean using something like
<fd:selection-list src="cocoon:/mychoices.xml" dynamic="true"/> ?
Or is it about changing the <map:match
pattern="_cocoon/forms/suggest"> part ?
I'm quite interested about this, as the only information I've found is
Christofer Dutz' idea
(http://marc.info/?l=xml-cocoon-users&m=115649772124493&q=p3).
You are certainly right about the tricky part, I am querying my
database with java objects using Hibernate. Sessions are managed by
the flowscript and a servlet filter so I don't see any solution here :-(
- Baptiste Placé.
---------------------------------------------------------------------
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]