:: Forum >>

Problem using setAttribute on AW.UI controls in a grid

Hi folks

I have a one line grid (that I am using as a form) and in the cells I am putting various AW.UI controls (e.g. input, radio, checkbox). I want to be able to set various attributes for the underlying elements (input, radio etc..) so that I can perform some validation on them. So for example, when using an input control, I am wanting the resulting <input> tag to have an attribute, say:
<input type="text" myAtttribute="something">
What I'm finding, however, is that the attribute actually gets put in the <span> tag that is "holding" the <input> and not to the input tag itself, i.e.
<span myAtttribute="something"><input type="text"></span>

(As an alternative I've tried writing the input statement as static html and assigning that html to the grid cell using setCellText. While this gets the attribute into the input tag in the cell, it then seems that trying to edit text in the input is difficult - e.g. no ability to use arrow keys, home, end and mouse drag in the input box.)

Not sure if I've made this clear (?), but I wonder if anyone can suggest any other way of getting an attribute into the <input> tag itself of an AW.UI.Input control, when such a control is being used in a grid cell?

Many thanks
Will
Will
Friday, December 16, 2005
... I think I've got it:

var myInput = new AW.UI.Input
myInput.getContent("box/text").setAttribute("myAttribute_name", "myAttribute_value";


seems to do it.

Will
Will
Friday, December 16, 2005

This topic is archived.


Back to support forum

Forum search