Re: v2 (was Re: [CForms binding] access to model data from repeater row widget)

2005-06-24 Thread Sylvain Wallez

Mark Lundquist wrote:

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:  
http://marc.theaimsgroup.com/?l=xml-cocoon- 
usersm=111954841402175w=2... I mention a way that might work in v1  
that I hadn't thought of until today as I was composing that!)



Ah yes. I'll add this to V1 as well.

Sylvain


--
Sylvain WallezAnyware Technologies
http://apache.org/~sylvainhttp://anyware-tech.com
Apache Software Foundation Member Research  Technology Director



Re: v2 (was Re: [CForms binding] access to model data from repeater row widget)

2005-06-23 Thread Mark Lundquist


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:  
http://marc.theaimsgroup.com/?l=xml-cocoon- 
usersm=111954841402175w=2... I mention a way that might work in v1  
that I hadn't thought of until today as I was composing that!)


cheers,
—ml—



Re: v2 (was Re: [CForms binding] access to model data from repeater row widget)

2005-06-22 Thread Mark Lundquist


On Jun 21, 2005, at 8:41 AM, Mark Lundquist wrote:



On Jun 20, 2005, at 11:42 PM, Sylvain Wallez wrote:


BTW, why do you prefer v2 rather than v1?

..schnip!..


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');

...and so I guess I'd rather have it as an explicit parameter (and also 
not needing to have 'viewData.' at the head of the expression path 
within the JX template).


While on the subject... since I am Mr. Anal Nomenclature Pants, I 
would vote for changing 'bizData' to 'viewData' (as in v3)... a much 
better name IMHO :-)


cheers,
—ml—