cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist>
Subject Re: v2 (was Re: [CForms binding] access to model data from repeater row widget)
Date Thu, 23 Jun 2005 20:38:44 GMT

On Jun 23, 2005, at 2:25 AM, Sylvain Wallez wrote:

>> One thing I don't care so much for in v2 is the idiom of attaching  
>> view data as properties of the widget tree root.  The minimalist  
>> approach (losing 'bizData') was clever, but in actual practice I find  
>> that I really like having one locus of transfer of data between the  
>> flowscript and the presentation, so I usually end up with something  
>> like this anyway:
>>     w.viewData =
>>         {
>>             schtuff:     foobar,
>>             etc:        otherStuff
>>         };
>>     form.showForm ('whatev');
> Uh? Didn't knew about that, and looks hacky IMO.

Ex-hacktly! :-)

>>     BTW, why do you prefer v2 rather than v1?

Hey, this morning I remembered what started me down the v2 path, as I  
was replying to a guy on the users' list.  It was that in v2, I can set  
someWidget.onValidate to a function that is nested inside the form  
controller flowscript function, where it can access that function's  
local variables.  (Here's that mail: 
users&m=111954841402175&w=2... I mention a way that might work in v1  
that I hadn't thought of until today as I was composing that!)


View raw message