To Inject Behavior to Exiting a large list of Exiting Components without generate dependencies..<br><br>By Example, implement a JQuery Boxy with the same behavior like Scriptaculous lightbox in Seaside 2.9..<br><br>:)<br><br>
Best. <br><br><div class="gmail_quote">On Wed, Mar 30, 2011 at 1:13 PM, Sebastian Sastre <span dir="ltr">&lt;<a href="mailto:sebastian@flowingconcept.com">sebastian@flowingconcept.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div>if it&#39;s for the sake of making it work all is valid</div><div><br></div><div>otherwise that sounds a bit extreme for something you just need to do once</div><div><br></div><div>besides, why justify a hack when you can compose a normal component and make it react properly (and remove the wrapper or change its state normally from a callback)</div>
<div><br></div><div>(note this is aimed to talk about good practices not to slow you down)</div><div><div></div><div class="h5"><div><br></div><div><br></div><div><br><div><br><div><div>On Mar 30, 2011, at 1:01 PM, Diogenes Moreira wrote:</div>
<br><blockquote type="cite">well, I solved my problem extended WAActionCallback and using a Annoucement.<br><br>It may not be very elegant, but work.. :).<br><br>In this way I modify the decoration without generate functional dependences in the subComponents, when I have actions<br>

<br>Best.<br><br><br>WAActionCallback class&gt;&gt;on: aBlock<br>    |newBlock|<br>    newBlock := [ <br>        WACurrentRequestContext value announce: SBAnnouncementClean.<br>        aBlock value. ].<br>    ^ self new block: aBlock<br>

<br>MySession&gt;&gt;announcer<br>    ^ announcer ifNil:[ announcer := Announcer new].<br><br>MyComponent&gt;&gt;announcer<br>    ^ self session announcer.<br><br>MyComponent&gt;&gt;on: anAnnouncement  send: aMessage to: anObject<br>

    self announcer on: anAnnouncement  send: aMessage to: anObject.<br><br>MyComponent&gt;&gt;initialize<br>      super initialize.<br>      self on: SBAnnouncementClean send: #clean: to:self.<br>      &quot;and do other staff&quot;<br>

<br>MyComponent&gt;&gt;clean<br>     &quot;here remove the decorations and do my staff&quot;<br><br><br><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Diogenes Moreira</b> <span dir="ltr">&lt;<a href="mailto:diogenes.moreira@gmail.com" target="_blank">diogenes.moreira@gmail.com</a>&gt;</span><br>

Date: Tue, Mar 29, 2011 at 3:04 PM<br>Subject: Re: [Seaside] revel decoration<br>To: Seaside - general discussion &lt;<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a>&gt;<br>
<br><br>
well, in fact i&#39;m remove the decoration, after rendering process.. is it posible?.<br>I wanna use a decorator only one time.<div><div></div><div><br><br><div class="gmail_quote">On Tue, Mar 29, 2011 at 2:29 PM, Johan Brichau <span dir="ltr">&lt;<a href="mailto:johan@inceptive.be" target="_blank">johan@inceptive.be</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br>
On 29 Mar 2011, at 19:17, Diogenes Moreira wrote:<br>
<br>
&gt; I don&#39;t know why, but  the decorator is present at next rendering time for my component.<br>
<br>
</div>afaik, adding or removing a decorator is similar to changing the state of the component: you should not do that while rendering.<br>
The component state is saved before rendering, which means state changes during rendering are lost.<br>
<br>
A solution can be to add/remove the decorator in an action callback (e.g. from the calling site of #inform: ?)<br>
But I&#39;m also interested why you are dynamically adding/removing a decorator like that.<br>
<br>
Johan_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</blockquote></div><br>
</div></div></div><br>
_______________________________________________<br>seaside mailing list<br><a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</blockquote></div><br></div></div></div></div></div><br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br>