[Seaside] Calling a JQuery enabled component from an anchor
johnptoohey at gmail.com
Sat Apr 18 16:45:39 UTC 2009
Perfect, many thanks.
On Sat, Apr 18, 2009 at 12:10, Lukas Renggli <renggli at gmail.com> wrote:
>> This is the snippet from the table row render that has the anchor :-
>> html tableRow id: id; with:
>> tableData: [html anchor callback: [html render: self
>> testComponent]; with: 'Edit'];
>> tableData: aJulietUser role;
> The problem with the above code is that when the callback is executed
> the reference to the html canvas is not valid anymore. Remember, the
> callback is only evaluated later, after the page has been renderer and
> sent of to the web browser.
> A possible solution would be to use an jQuery load action that on a
> specific DOM element. This gives you a new html renderer to render on.
> Try something along and check out other examples like
> " an empty div that will be the target of the rendering "
> html div id: 'dialogTarget'.
> " the anchor triggering the dialog (the jQu"
> html anchor
> onClick: ((html jQuery: 'dialogTarget') load
> html: [ :r | r render: self textComponent ]));
> with: 'Edit'
> Btw, there is a Slime rule that detects when you accidently use a
> wrong renderer.
> Lukas Renggli
> seaside mailing list
> seaside at lists.squeakfoundation.org
More information about the seaside