This would require a custom XForm widget (http://wiki.alfresco.com/wiki/Creating_XForms_Widgets) that detects (or is notified of) changes in the parent dropdown, and recalculates the values to be displayed in the child dropdown (perhaps by calling a Web Script or some other external service - it depends how much data in total there is and whether it can be filtered solely in the browser).
Because Web Forms are basically just DOJO forms (http://dojotoolkit.org/), a good working knowledge of DOJO would be beneficial.
But i was trying to find a way define it directly from the XSD
It's ok to me to create a new widget. But then what's the best way to "pass" the parent-child relationship and the datas(or where to find the datas) from the XSD to the widget?
i can create 2 custom widget that are linked between togheter by a parent-child relationship but then i had to create new custom widgets (and reboot alfresco) for every new dropdown
Can you advice a way to pass this informations from XSD to the Widget without defining them in the web-client-config-wcm.xml or inside the javascript?
Have you implemented anything or started working on your widget?
I'd like to see what documentation sources you used to get to your solution.
There aren't any alfresco dependent widget examples out there at all (at least none that I've found yet). Any information you can provide will benefit everyone!
We didn't go on with this because we changed the way things were done. The reply I can give you is: you must create a new custom widget and play with javascript.
You'll need a way to "link" the parent and the child select box widget. A way is:
put 3 configuration options in your widget: parentWidgetId, widgetClassId, childClassId.
when you build the widget through javascript assing the widgetClassId to it and use parent/child ones to "find" the other two.
when a select box change it's value if it has a childId use it to notify the child
if you receive a notification use your parentId to get the parent value (or pass it with the previous notification, or whatever)
update the options of your select box in any way you want. Ajax call, XSD values manipulations and so on…
Good luck and if you manage to create a widget think about making it public. If I'll ever write a widget like that (in my spare time) I'll make it public and I'll say that here.