function Input(id){this.base=ViewBase;this.base(id);this.type="Input";this.hashcode="Input@"+Math.floor(Math.random()*9999999999);this.format=null;this.setModel=function(model)
{this.model=model;this.model.addOnChange(this,this.update,[]);if(model.eClass=="eInteger")
this.setFormat("integer");}
this.setFormat=function(format)
{this.format=format;}
this.getFormat=function()
{return this.format;}
this.update=function()
{if(this.format!=null&&this.model!=null)
{var oldValue=this.model.getValue();var newValue=null;if(this.formatter[this.format])
{newValue=eval("this.formatter."+this.format+"(this.model.getValue())");}
else
{newValue=this.formatter.format(this.model.getValue(),this.format);}
if(newValue!=oldValue){this.model.setValue(newValue);this.model.validate();}}
this.setLabel(this.model.getValue());}}
Input.prototype.formatter=new EformFormatter();
