cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist <mlundqui...@comcast.net>
Subject Aack!
Date Wed, 10 Mar 2004 04:43:22 GMT
OK Cocooners, here is the deal.

I'm porting a woo... er, CForms form from 2.1.3 to 2.1.4.  Before, 
without <wd:action> I had to emulate that myself.  I hacked my own 
showForm() that checked the request to figure out which button was 
pressed, and it only invoked validation if a particular one of the form 
buttons was pressed (the "Update" button, which conceptually is the 
real "submit" control, i.e. whose intent is to finalize the form 
processing).

So I thought I'd switch to using action and submit widgets in 2.1.4.  
But there's a problem.

In my hacked-over showForm(), if the form was submitted by something 
other than the "Update" button, I not only bypassed validation, but I 
exited showForm()'s loop and returned.  That took me back to the "outer 
loop" in my flow that checked the request to find out which button was 
pressed.  This was essential, because some of the other buttons do 
things that affect the display of the page.  So redisplaying the form 
entailed a new invocation of sendPageAndWait() in the next iteration of 
the loop, with potentially different bizdata.

When I switched to <wd:action>, this broke... my event handlers fired, 
so the model has changed, but I'm stuck in showForm()'s loop with stale 
bizdata until showForm() decides that form processing is finished 
(i.e., validation succeeded).

Can someone tell me how do I fix this?

Thanks,
Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message