Hi,
I noticed that some formitems use the html label tag for the title, this is great as a click on the title then puts focus in the field. There are however two cases where this does not happen:
- containeritem
- selecitem
For the first case the containeritem I can change the getTitleHTML to use a label tag, this seems to work fine (see the code below). Is this something which can be added to/changed in Smartclient by Isomorphic?
For the selectitem I have trouble finding the correct element id to use in the FOR attribute of the Label tag. Do you have a tip what to use there? Or is this something which can be changed in Smartclient by Isomorphic, or maybe the api to get the correct elementid can be made unobfiscated (i.e. not start with an underscore)?
Thanks for any guidance on this!
Here is the implementation I use for the ContainerItem.getTitleHTML:
gr. Martin
I noticed that some formitems use the html label tag for the title, this is great as a click on the title then puts focus in the field. There are however two cases where this does not happen:
- containeritem
- selecitem
For the first case the containeritem I can change the getTitleHTML to use a label tag, this seems to work fine (see the code below). Is this something which can be added to/changed in Smartclient by Isomorphic?
For the selectitem I have trouble finding the correct element id to use in the FOR attribute of the Label tag. Do you have a tip what to use there? Or is this something which can be changed in Smartclient by Isomorphic, or maybe the api to get the correct elementid can be made unobfiscated (i.e. not start with an underscore)?
Thanks for any guidance on this!
Here is the implementation I use for the ContainerItem.getTitleHTML:
Code:
getTitleHTML: function(){ var elementID, focusableItem; var title = this.getTitle(); if (!this.getCanFocus()) { return title; } if (this.accessKey != null) { title = isc.Canvas.hiliteCharacter(title, this.accessKey); } for (var i = 0; i < this.items.length; i++) { if (this.items[i].getCanFocus() && this.items[i].hasDataElement()) { focusableItem = this.items[i]; break; } } if (!focusableItem) { return title; } return isc.SB.concat("<LABEL FOR=", focusableItem.getDataElementId(), ">", title, "</LABEL>"); }
Comment