[Seaside] Problem with calling owner from decoration

Lukas Renggli renggli at gmail.com
Tue Oct 28 22:38:15 UTC 2008


#addValidatedForm answers the added decoration, as all add decoration
methods do. You need to append a ; yourself.

Lukas

On 10/28/08, Julian Fitzell <jfitzell at gmail.com> wrote:
> On Mon, Oct 27, 2008 at 11:27 AM, M. Polák <nigol at nigol.cz> wrote:
>> I must apolgize myself, I replied for Dario's mail, but I wanted new
>> thread.
>> So once again. Thanks.
>>
>>
>> Hi there,
>> I have a component with method editAction like this:
>>
>> | ar |
>>        ar := self
>>                                call: ((self article descriptionEdit
>> asComponentOn: self article)
>>                                                addValidatedForm.
>>        ar
>>                ifNotNil: [self article copyFrom: ar]
>>
>> When I call this method directly from this component, editor is rendered
>> succesfully. But when i wrap component with decoration, where
>> renderContentOn looks like:
>>
>> html anchor
>>                callback: [self owner editAction];
>>                 with: 'edit'.
>>        self renderOwnerOn: html
>>
>> after clicking on 'edit', nothing happens. Except reloading page, of
>> course.
>> Any suggestions here?
>
> Hmm... I'm not exactly sure, except to say that this pattern seems a
> little strange to me somehow. Nothing jumps out immediately as to why
> it isn't working though.
>
> Beware of #owner, though. It is badly named (following a refactoring
> some time ago). It return the *next* item in the Decoration chain,
> which is only the Component if this is the last Decoration. That can't
> be your problem, though, because you'd presumably get an error that
> #editAction was not understood.
>
> Try putting a halt in your callback to make sure that the callback is
> actually being called. If so, then it must be some interaction between
> your Decoration and the WADelegation that is added by the call:, but
> as I said, I can't immediately see just from looking at your code,
> what that problem is. You'll need to put a halt in somewhere and
> inspect the decoration chain to see what's happening.
>
> Or, maybe somebody else on the list can spot the problem right off...
>
> Julian
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list