Hello all-- I'm working with the union widget and have come across a situation where I need the union's case to be determined by a widget outside the container in which the union is defined. However it appears that the case="" can only take the id of a field within the same container as the union widget itself. This causes problems when the union is defined within a struct or another union but the case field is defined elsewhere.
I've dug into the source and found that on line 61 of src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Union.java it finds the widget to use for the case by calling: caseWidget = ((ContainerWidget)getParent()).getChild(caseWidgetId); It seems to me that replacing .getChild() with .lookupWidget() would allow the case="" attribute to take a relative path to find the proper field and allow me to do what I want. Is this the correct approach? Would it cause other problems I can't see with my limited knowledge of the code? Thank you --Jason
