3.2.0

BUG: caching of the html fragments

Alex,

Regarding AW.UI.Input and getContent('box/text').setAttribute, to quote you from /javascript.forum.16359.7/input-text-and-input-password.html:

This is a bug in AW related to the caching of the html fragments. The workaround is to clear html cache manually on the control and intermediary level ('box' content).



Can you let us know what all is related to the HTML caching for AW input controls? I've found this on all the following cases:


Make a password box
//related post: 
//   /javascript.forum.16359.7/input-text-and-input-password.html

    var obj = new AW.UI.Input;
    obj.setId("passwordInput");
    obj.getContent('box/text').setAttribute('type','password');
    document.write(obj);


Set the maxlength for the input
var obj = new AW.UI.Input;
    obj.setId("maxInput");
    obj.getContent('box/text').setAttribute('maxlength','250');
    document.write(obj);



Set the readonly attribute
//related post: 
//   /javascript.forum.7648.18/disable-input-edit-box.html

    var obj = new AW.UI.Input;
    obj.setId("readonlyInput");
    obj.getContent('box/text').setAttribute('readonly','readonly');
    document.write(obj);




My Fix - from /javascript.forum.16359.7/input-text-and-input-password.html
var obj = new AW.UI.Input;
    obj.setId("passwordInput");
    obj.getContent('box/text').setAttribute('type','password');

    obj.getContent("box")._innerHTML = "";
    obj.getContent("box")._outerHTML = "";
    obj._innerHTML = "";
    obj._outerHTML = "";

    document.write(obj);



Any comment's, plans for bug fixes, IS this a bug? etc. would be great.

Thanks

John Mason
December 22,
Alex, any comments?
John Mason
December 30,
Alex, what about a function that clears out the _innerHTML/_outerHTML called obj.refreshHTML();

That way you can set an attribute, and then rather than refreshing the control, you can refresh just the HTML?
John Mason
January 9,
This is a bug and it will be fixed in 2.0.2 (it is already fixed in the development branch). Basically for all functions like setAttribute() in addition to clearing _outerHTML property one has to go up in the parent chain and clear all parents.
Alex (ActiveWidgets)
January 9,

This topic is archived.

See also:


Back to support forum