[Cubicweb] edition of coupled relations

Sylvain Thénault sylvain.thenault at logilab.fr
Thu May 21 17:57:06 CEST 2015

On 20 mai 09:25, Christophe de Vienne wrote:
> Hi Sylvain,
> For a one shot solution, I would not do anything generic. Something like
> this:
> - Create an ajax function that returns the right values given a scheme.
> This function is easy to write, although very specific to your case.
> - Add a javascript function that update the value select depending on
> the scheme select using the ajax function
> - Call this function at the form loading and on any change of the scheme
> select.
> We do this (more of less) in Unlish for a form that hide/show some
> fields depending on 2 selects.
> It is not a beautifully generic solution, but it is fast and efficient,
> and as long as there are not too many cases like this in the
> application, it remains pretty easy to maintain because it is easy to
> understand.

yep that's probably what I'll do given the litle time I have for this. This
sounds easier with regular combobox than with the relation widget though...

Sylvain Thénault, LOGILAB, Paris ( - Toulouse (
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org

More information about the Cubicweb mailing list