[Seaside] Anonymous Component

Mariano Martinez Peck marianopeck at gmail.com
Tue Jan 19 18:15:19 UTC 2016


On Tue, Jan 19, 2016 at 3:11 PM, J.F. Rick <self at je77.com> wrote:

> I'm using AJAX a decent amount with my Seaside application. One common
> thing is to replace an IDed element with a component using something like:
>     s << (s jQuery: #event) replaceWith: self.
> inside a "html jQuery ajax script: [ :s | ]" block.
>
> Is there a way to do this replacement without using a component that
> implements the renderContentOn: message? For instance, what could I just do
> to replace the #event component with this HTML: '<b>Success</b>'? I'm
> hoping there's something I can do along the lines of:
>     s << (s jQuery: #event) replaceWith: [ :html |
>         html html: '<b>'.
>         html text: (self isSuccess
>             ifTrue: [ 'Success' ]
>             ifFalse: [ 'Failed' ]).
>         html html: '</b>' ].
>
>
Jeff, I think that should work, exactly as you typed it.
It doesn't?



-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20160119/71b61967/attachment.htm


More information about the seaside mailing list