text: /*!
   * @project JSDK JavaScript Development Kit
   * @copyright Copyright(c) 2004-2012, Dragonfly.org. All rights reserved.
   * @license LGPLv3
   * 
   * @version 0.2
   * @author feng.chun
   * @date 2011-09-05
   * @date 2011-09-14
   * 
   * @version 0.1
   * @author feng.chun
   * @date 2010-8-15
   */
  js.ui.HTMLButton=function(a){a=a||{};a["widgetClass"]="js.ui.HTMLButton";js.ui.HTMLButton.superclass.constructor.apply(this,[a]);};js.lang.System.extend(js.ui.HTMLButton,js.ui.Widget,{render:function(){this.fireEvent("rendering");this.set("type","button");this.set("html",this.get("text"));this._renderHTMLWidget("button");this.fireEvent("rendered");}});js.ui.HTMLImage=function(a){a=a||{};a["widgetClass"]="js.ui.HTMLImage";js.ui.HTMLImage.superclass.constructor.apply(this,[a]);};js.lang.System.extend(js.ui.HTMLImage,js.ui.Widget,{DOM_ATTRIBUTES:{id:1,name:1,title:1,type:1,cssName:1,cssText:1,src:1,widgetClass:1},render:function(){this.fireEvent("rendering");this._renderHTMLWidget("img");this.fireEvent("rendered");}});js.ui.HTMLTextbox=function(a){a=a||{};a["widgetClass"]="js.ui.HTMLTextbox";js.ui.HTMLTextbox.superclass.constructor.apply(this,[a]);};js.lang.System.extend(js.ui.HTMLTextbox,js.ui.Widget,{render:function(){this.fireEvent("rendering");this.set("type","text");this._renderHTMLWidget("input");this.fireEvent("rendered");}});js.ui.HTMLPassword=function(a){a=a||{};a["widgetClass"]="js.ui.HTMLPassword";js.ui.HTMLPassword.superclass.constructor.apply(this,[a]);};js.lang.System.extend(js.ui.HTMLPassword,js.ui.Widget,{render:function(){this.fireEvent("rendering");this.set("type","password");this._renderHTMLWidget("input");this.fireEvent("rendered");}});js.ui.HTMLHidden=function(a){a=a||{};a["widgetClass"]="js.ui.HTMLHidden";js.ui.HTMLHidden.superclass.constructor.apply(this,[a]);};js.lang.System.extend(js.ui.HTMLHidden,js.ui.Widget,{render:function(){this.fireEvent("rendering");this.set("type","hidden");this._renderHTMLWidget("input");this.fireEvent("rendered");}});js.ui.HTMLRadio=function(a){a=a||{};a["widgetClass"]="js.ui.HTMLRadio";js.ui.HTMLRadio.superclass.constructor.apply(this,[a]);};js.lang.System.extend(js.ui.HTMLRadio,js.ui.Widget,{render:function(){this.fireEvent("rendering");this.set("type","radio");this._renderHTMLWidget("input");this.fireEvent("rendered");},select:function(){var a=this.getEl();if(!a){return;}this.set("checked",true);a.checked=true;},unselect:function(){var a=this.getEl();if(!a){return;}this.set("checked",false);a.checked=false;},isSelected:function(){var a=this.getEl();if(!a){return null;}return a.checked;},getSelectedValue:function(){var a=this.getEl();if(!a){return null;}return this.isSelected()?this.getValue():null;}});js.ui.HTMLCheckbox=function(a){a=a||{};a["widgetClass"]="js.ui.HTMLCheckbox";js.ui.HTMLCheckbox.superclass.constructor.apply(this,[a]);};js.lang.System.extend(js.ui.HTMLCheckbox,js.ui.Widget,{render:function(){this.fireEvent("rendering");this.set("type","checkbox");this._renderHTMLWidget("input");this.fireEvent("rendered");},select:function(){var a=this.getEl();if(!a){return;}this.set("checked",true);a.checked=true;},unselect:function(){var a=this.getEl();if(!a){return;}this.set("checked",false);a.checked=false;},isSelected:function(){var a=this.getEl();if(!a){return null;}return a.checked;},getSelectedValue:function(){var a=this.getEl();if(!a){return null;}return this.isSelected()?this.getValue():null;}});js.ui.HTMLSelect=function(a){a=a||{};a["widgetClass"]="js.ui.HTMLSelect";js.ui.HTMLSelect.superclass.constructor.apply(this,[a]);};js.lang.System.extend(js.ui.HTMLSelect,js.ui.Widget,{DOM_ATTRIBUTES:{id:1,name:1,title:1,cssName:1,cssText:1,multiple:1,size:1,validate:1,widgetClass:1},render:function(){this.fireEvent("rendering");this._renderHTMLWidget("select");this.addOption(this.get("options"));this.fireEvent("rendered");},getSelectedValue:function(){var f=this.getEl();if(!f){return null;}var g=f.selectedIndex;if(g<0){return null;}if(!this.get("multiple")){return[f.options[g].value];}var b=[],c=f.options;for(var e=0,a=c.length;e<a;e++){var d=c[e];if(d.selected){b.push(d.value);}}return b;},_addOption:function(d,a,b){if(a){var c=new Option();c.value=b["value"];c.innerHTML=b["text"];a.appendChild(c);}else{d.options.add(new Option(b["text"],b["value"]));}},_addOptionGroup:function(e,f,c){var b=null;if(c){b=document.createElement("optgroup");b.label=c;e.appendChild(b);}for(var d=0,a=f.length;d<a;d++){this._addOption(e,b,f[d]);}},addOption:function(e){if(!e){return;}var d=this.getEl();if(!d){return;}if(js.lang.System.isArray(e)){for(var c=0,a=e.length;c<a;c++){var b=e[c];this._addOptionGroup(d,b["group"],b["label"]);}}else{this._addOptionGroup(d,e["group"],e["label"]);}},removeAt:function(b){var c=this.getEl();if(!c){return false;}var a=c.options;if(b<0||b>a.length){return false;}if(js.core.Env.ie){a.remove(b);}else{a[b]=null;}return true;},removeBy:function(e){var d=this.getEl();if(!d){return false;}if(js.lang.System.isUndefined(e)){return false;}var b=d.options;for(var c=0,a=b.length;c<a;c++){if(b[c].value==e){if(js.core.Env.ie){b.remove(c);}else{b[c]=null;}return true;}}return false;}});js.ui.HTMLFile=function(a){a=a||{};a["widgetClass"]="js.ui.HTMLFile";js.ui.HTMLFile.superclass.constructor.apply(this,[a]);};js.lang.System.extend(js.ui.HTMLFile,js.ui.Widget,{STYLE_ATTRIBUTES:{display:1},render:function(){this.fireEvent("rendering");this.set("type","file");this._renderHTMLWidget("input");this.fireEvent("rendered");}});js.ui.HTMLTextarea=function(a){a=a||{};a["widgetClass"]="js.ui.HTMLTextarea";js.ui.HTMLTextarea.superclass.constructor.apply(this,[a]);};js.lang.System.extend(js.ui.HTMLTextarea,js.ui.Widget,{render:function(){this.fireEvent("rendering");this._renderHTMLWidget("textarea");this.fireEvent("rendered");}});js.ui.HTMLForm=function(a){a=a||{};a["widgetClass"]="js.ui.HTMLForm";js.ui.HTMLForm.superclass.constructor.apply(this,[a]);};js.ui.HTMLForm.NORMAL_TYPE="application/x-www-form-urlencoded";js.ui.HTMLForm.UPLOAD_TYPE="multipart/form-data";js.ui.HTMLForm.GET_METHOD="get";js.ui.HTMLForm.POST_METHOD="post";js.lang.System.extend(js.ui.HTMLForm,js.ui.Widget,{DOM_ATTRIBUTES:{id:1,name:1,title:1,type:1,cssName:1,cssText:1,method:1,action:1,target:1,enctype:1,widgetClass:1},render:function(){this.fireEvent("rendering");if(!this.get().hasOwnProperty("method")){this.set("method",js.ui.HTMLForm.GET_METHOD);}if(!this.get().hasOwnProperty("enctype")){this.set("enctype",js.ui.HTMLForm.NORMAL_TYPE);}this._renderHTMLWidget("form");this.fireEvent("rendered");},submit:function(){var a=this.getEl();if(a){a.submit();}}});js.ui.HTMLRadioGroup=function(){config=config||{};config["widgetClass"]="js.ui.HTMLRadioGroup";js.ui.HTMLRadioGroup.superclass.constructor.apply(this,[config]);};js.lang.System.extend(js.ui.HTMLRadioGroup,js.ui.Widget,{addChildWidget:function(c){var a=js.lang.System.isArray(c)?c:[c],b=this.get("name");a.forEach(function(d){d.set("name",b);});this.addChildWidget(c,"js.ui.HTMLRadio");},render:function(){this.fireEvent("rendering");var a=this.getChildWidget();for(k in a){a[k].render();}this.fireEvent("rendered");},select:function(b){var a=this.getChildWidget(b);if(!a){return;}a.select();},unselect:function(c){if(c){var b=this.getChildWidget(c);if(!b){return;}b.unselect();}else{var a=this.getChildWidget();if(!a){return;}for(k in a){a[k].unselect();}}},isSelected:function(c){if(c){var b=this.getChildWidget(c);return b&&b.isSelected();}else{var a=this.getChildWidget();if(!a){return false;}for(k in a){if(a[k].isSelected()){return true;}}return false;}},getSelectedValue:function(){var a=this.getChildWidget();for(k in a){var b=a[k].getSelectedValue();if(b!=null){return b;}}return null;}});js.ui.HTMLCheckboxGroup=function(){config=config||{};config["widgetClass"]="js.ui.HTMLCheckboxGroup";js.ui.HTMLCheckboxGroup.superclass.constructor.apply(this,[config]);};js.lang.System.extend(js.ui.HTMLCheckboxGroup,js.ui.Widget,{addChildWidget:function(c){var a=js.lang.System.isArray(c)?c:[c],b=this.get("name");a.forEach(function(d){d.set("name",b);});this.addChildWidget(c,"js.ui.HTMLCheckbox");},render:function(){this.fireEvent("rendering");var a=this.getChildWidget();for(k in a){a[k].render();}this.fireEvent("rendered");},select:function(c){if(c){var b=this.getChildWidget(c);if(!b){return;}b.select();}else{var a=this.getChildWidget();if(!a){return;}for(k in a){a[k].unselect();}}},unselect:function(c){if(c){var b=this.getChildWidget(c);if(!b){return;}b.unselect();}else{var a=this.getChildWidget();if(!a){return;}for(k in a){a[k].unselect();}}},isSelected:function(c){if(c){var b=this.getChildWidget(c);return b&&b.isSelected();}else{var a=this.getChildWidget();if(!a){return false;}for(k in a){if(a[k].isSelected()){return true;}}return false;}},getSelectedValue:function(){var a=this.getChildWidget(),b=null;if(!a){return b;}for(k in a){var c=a[k];if(c.isSelected()){if(!b){b=[];}b.push(c.getValue());}}return b;}});