[Seaside] body attributes?

Andreas Nilsson wahboh at mac.com
Sun Sep 19 10:36:29 CEST 2004


Is there any way to alter the body attributes while rendering, ie. 
inside renderContentOn?
Otherwise Avi's proposed solution to getting the name of the file-input:

|name|
name := html context nextKey.
html fileInputWith...

doesn't help much anymore as that's the name that I need to reference 
from the Javascript that I'm putting in body.onLoad.
I need to be able to get the name first and then set the body attribute 
and I don't have any control of when #updateRoot: is called so I can't 
guarantee that I've got the file-input name.

/Adde

On 2004-09-18, at 20.04, Michel Bany wrote:

> Andreas Nilsson a écrit :
>
>> I'm trying to do exactly the same thing via 'html document root 
>> bodyAttributes at: put:' but I can't get it to work.
>> Anybody care to explain what's so obvious about #updateRoot:? I can't 
>> even find any methods with that name.
>>
> You need to implement this method in your component to override the 
> default implementation
> from the superclass. In your method send #bodyAttributes to the 
> parameter and #at:put:
> Make sure you pass on the #updateRoot: message to super.
> See WAAllTests for a (simple) exemple.
> Michel.
>
>> /Adde
>>
>> On 2004-09-09, at 00.49, radoslav hodnicak wrote:
>>
>>> On Thu, 9 Sep 2004, radoslav hodnicak wrote:
>>>
>>>>
>>>> the body element in a component? In 2.3 I could just use "html 
>>>> document
>>>> body attributeAt:put:" ... I'm stuffing some javascript for onLoad 
>>>> there
>>>
>>>
>>> Doh. updateRoot:
>>> /me slaps forehead
>>>
>>> _______________________________________________
>>> Seaside mailing list
>>> Seaside at lists.squeakfoundation.org
>>> http://lists.squeakfoundation.org/listinfo/seaside
>>>
>>
>> _______________________________________________
>> Seaside mailing list
>> Seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/listinfo/seaside
>>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside



More information about the Seaside mailing list