<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Okay, well... I have a follow-up question.<div><br></div><div>It turns out that the problem is not so much that the children are being added dynamically, as it is that the component the children are in is being added to the page via an SUUpdater. &nbsp;When an anchor is clicked, I'm using the updater to redisplay only the portion of the page that has that component.</div><div><br></div><div>Is there any way to update the style when this happens? &nbsp;I've looked at #updateRoot: but it's not clear how I could call that or where I could find the root to pass as a parameter.</div><div><br></div><div>(I know, I know... external style sheet. &nbsp;I'm starting to lean in that direction, but I'm reluctant. &nbsp;I realize it's more efficient, but I'm a Smalltalker who goes way back, and I like the idea of each component having its own #style method. &nbsp;Good encapsulation, and all that....)</div><div><br></div><div>Here are some code snippets:</div><div><br></div><div>The render method with the anchor:</div><div><br></div><div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">renderTableDataFor: reportName on: html</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp;"Render one cell of the table, showing reportName as a clickable anchor. &nbsp;When the user clicks on the anchor, trigger an updater which will then tell the PWReportView to update and re-render its parameterForm."</span></font></div></div><div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp; &nbsp;html tableData</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;class: 'reportListTableData';</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;with: [&nbsp;</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;html anchor</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;onClick: (</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;html updater</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;id: reportView parameterFormDivID; &nbsp;"the id of the div that will be updated"</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;callback: [:renderer |</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;reportView renderSelectedReport: reportName on: renderer</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;]</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;);</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;with: reportName</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp; &nbsp;].</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div><div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">PWReportView&gt;&gt;renderSelectedReport: reportName on: renderer</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp;"The user selected a report by clicking on an anchor that is the name of the type of the report. &nbsp;Inform the parameterForm of the name of the selected report so the parameterForm can display the parameters that will allow the user to further specify the report to be run. &nbsp;Also, since this was triggered via an updater, re-render the parameterForm only (not the entire window)."</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp;parameterForm reportName: reportName. &nbsp;</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp;renderer render: parameterForm.</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">PWParameterForm&gt;&gt;reportName: aReportName</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp;"The user has clicked on a report name in the list of reports that can be run. &nbsp;In order to allow the user to further parameterize the report before it is run, create a new parametersEditor to display, based on the report name."</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp;reportName := aReportName.</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp; &nbsp;parameterEditor := &nbsp;PWReportParametersEditor new: reportName. &nbsp;"This creates the editor and initializes its children; prior to this the parameterEditor was a PWReportParametersEditor with no children."</span></font></div><div><br></div></div><div><br></div><div>Thanks,</div><div>-- Sigrid.</div></div></div><div><br></div></div><div><br><div><div>On Apr 12, 2010, at 7:00 PM, Mortensen Sigrid E. wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Never mind. &nbsp;(I knew as soon as I sent the message I'd figure it out!)<br><br>It has to do with how I'm dynamically adding child components to the parent component. &nbsp;At the time the #style method is called, the child I've added isn't in the children collection, so the #style method isn't called for that child. &nbsp;Then I add the component, and it's in the collection, but the style method isn't called again until I refresh the page.<br><br>Tricky.<br><br>-- S.<br><br><br>On Apr 12, 2010, at 6:50 PM, Mortensen Sigrid E. wrote:<br><br><blockquote type="cite">Hi All,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Any idea why a style would not be applied to a component until the page is reloaded?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">When I first click on an anchor that shows the component, the style is not applied. &nbsp;If I click the reload button on the browser, the style shows up. &nbsp;It was impossible to figure out what was going on by toggling halos, because that reloads the page, but I can see it clearly in Firebug. &nbsp;When the component is first rendered, firebug shows no style directly associated with that component (it only shows a style inherited from the containing div), but if I reload the page, it's there.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This is on a div that's buried deep within another div, in a form, in a div, etc., in td in a tr of a tbody, etc. &nbsp;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I am using #style methods, which I realize is no longer the recommended procedure, but it has always worked up until now.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks in advance for any insights.<br></blockquote><blockquote type="cite">-- Sigrid.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">seaside mailing list<br></blockquote><blockquote type="cite"><a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br></blockquote><blockquote type="cite"><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br></blockquote><br>_______________________________________________<br>seaside mailing list<br><a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br></div></blockquote></div><br></div></body></html>