cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject Re: persisting re-arranged repeater-rows
Date Thu, 27 Nov 2003 13:00:25 GMT

On 26 Nov 2003, at 19:05, Hugo Burm wrote:

> I dived a little bit into the Woody internals. When a row is added to 
> the
> repeater the saveFormToModel method in InsertBeanJXPathBinding class is
> called. This method executes the "addMethod" that was defined in the
> <wb:insert-bean> binding. (you are talking about "add-row" in the model
> definition, I am talking about "insert-bean" in the bean binding. 
> Somtimes I
> think this Woody beast is too complicated for me).

yeah, that caught me out ....
I had no <wb:insert-bean> in my binding ..... as soon as I added an 
appropriate one, everything JustWorked ™

> When a row is removed from the repeater and removed by jxpath, all 
> keys of
> your Resource bean will be set to null. So it looks like the record is
> removed. But it will still be there in your database, living as a 
> zombie. So
> may be we need some "deleteMethod" executed by a 
> DeleteBeanJXPathBinding.

Yes, my DB is filling up with The Living Dead .... un-linked resources 
that did not get deleted.

My attempt to use an <on-activate> handler in the button appears to 
fail, because I suspect the row is being deleted before my handler gets 
called, meaning I cannot find the ID of the deleted resource.

@see thread : "deleting repeater-rows" on Users. (Not archived yet).

So I think you are right .... we maybe need the Delete equivalent of :


something like this? :

     deletemethod="removeResource"/> <!-- called on the Context? -->


regards Jeremy
View raw message