cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Order of Processing inside CForms
Date Tue, 26 Aug 2008 13:58:25 GMT


I just ran into a small problem here. Even if I was able to create a
workaround, I would suggest a fix.


I created my CForm/JavaFlow application to work stateless, without
continuations. It is here where I ran into a problem when using unions.

It seems the “process” method doesn’t deal with the form-content in a
specific order. When using unions with a state widget, it is important to
set this first. In my case the union was processed before the state widget.
Causing the union not to parse the parameters of my non-default union group.


I managed to get everything working, by manuals setting the state-widgets
value manually before calling the process method of the form … 


Here the code:


                        FormInstance form = new

                        Form model = (Form) form.getModel();

                        FormContext formContext = new
FormContext(getRequest(), Locale.getDefault());


                        // Manually set this, otherwise process won't fill

                        // union fields correctly.


                        String rateType =





                        if (!model.validate()) {

                              // Send the form again with the error messages

} else {

                              // Do the post form processing



By evaluating state-fields first, this would not be needed. 

As everything is working for me now, this is no urgent case. I just thought,
that if someone puts his hand on the code, maybe he could fix this while he
is at it ;-)



[ C h r i s t o f e r  D u t z ]

C-Ware IT-Service
Dipl. Inf. Christofer Dutz
Karlstraße. 104, 64285 Darmstadt

fon:  0 61 51 / 27315 - 61
fax:  0 61 51 / 27315 - 64
mobil:  0171 / 7 444 2 33
email:   <>

FA Darmstadt: 07 813 60581


View raw message