[Seaside] Can't set id attribute

Hilaire hilaire at drgeo.eu
Sat Apr 11 12:49:29 UTC 2015


Dear all,

In the following circumstance the id is not set as an attribute of the
inputField (last line):

renderWidgetId: id on: html
    | tag inputField |
    tag := (html span)
        with: [
            inputField := (html textInput)
                value: input;
                size: 10;
                callback: [ :val | self input: val ].
            [...]
        ];
        yourself.   
    inputField id: id.


Only when the id is set immediately, the id is correctly set:

renderWidgetId: id on: html
    | tag inputField |
    tag := (html span)
        with: [
            inputField := (html textInput)
                value: input;
                size: 10;
                id: id;
                callback: [ :val | self input: val ].
            [...]
     ];
      yourself.   


I need to set the id afterwards to factor out some code. There are
probably other way I can do it, but I am really curious to know why the
former code does not work.

Thanks!

Hilaire

-- 
Dr. Geo - http://drgeo.eu
iStoa - http://istoa.drgeo.eu




More information about the seaside mailing list