Hi Helmut,

you are right, i oversight something yesterday whn i did a quick source lookup,
bernd has just fixed this, please try the next neightly build or do a
new checkout.

Regards,
 Volker

2007/1/20, H. Swaczinna <[EMAIL PROTECTED]>:
Hello Volker,

I don't think, value binding works. Example:

Jsp:

<tc:page id="mainPage" width="1020px" height="600px"
    focusId="#{mainController.fieldId}"
    label="#{mainController.fieldId}">
...

MainContoller:

  public String getFieldId() {
    getLog().debug("getFieldId: mainPage:headView:programm");
    return "mainPage:headView:programm";
  }

I can see the debug output from getFieldId() only once and I can see
the correct field id in the browser title. The focus is set to the
first field (which is not the desired field).

This works:

<tc:page id="mainPage" width="1020px" height="600px"
    focusId="mainPage:headView:programm"


Regards
Helmut



>Hi Helmut,
>
>the focusId attribute supports valuebinding, but the value must be the
>clientId of the component. This means the id prefixed by the ids of
>namingContainers, at leas by the id of the page. This should be
>improved to be handled like for attributes, ge do a findComponent() to
>examine the clientId.
>
>And yes there is a bug in the javascript, empty string or every
>illegal value forces the default behavior. please add a jira entry.
>
>Regards,
>  volker
>
>
>
>2007/1/19, H. Swaczinna <[EMAIL PROTECTED]>:
>> Hi,
>>
>> I want to set the initial focus when the page is loaded programmaticly,
>> determined by a bean property. I've found no way to do this.
>> The focusId attribute of tc:page doesn't allow value bindings (right?)
>> So I set the focus via javascript in the onload attribute of tc:script.
>> This sets the focus to the desired field, but afterwords, the focus
>> is reset to the first field on the page. Even when I set focusId to
>> the empty string. The doc says, setting focusId to the empty string
>> disables automatic focus setting. So this seems to be a bug to me.
>>
>> Regards
>> Helmut
>>

Reply via email to