public void initInputText() throws PropertyVetoException
{
org.w3c.dom.Document doc = itsNatDoc.getDocument();
HTMLInputElement inputElem = (HTMLInputElement)doc.getElementById("textFormattedWithFactoryFieldId");
ItsNatComponentManager componentMgr = itsNatDoc.getItsNatComponentManager();
ItsNatHTMLInputTextFormatted inputComp = (ItsNatHTMLInputTextFormatted)componentMgr.findItsNatComponent(inputElem);
ItsNatFormatterFactoryDefault factory = (ItsNatFormatterFactoryDefault)inputComp.createDefaultItsNatFormatterFactory();
ItsNatFormatter dispFormatter = inputComp.createItsNatFormatter(DateFormat.getDateInstance(DateFormat.LONG ,Locale.US));
factory.setDisplayFormatter(dispFormatter);
ItsNatFormatter editFormatter = inputComp.createItsNatFormatter(DateFormat.getDateInstance(DateFormat.SHORT,Locale.US));
factory.setEditFormatter(editFormatter);
inputComp.setItsNatFormatterFactory(factory);
try{ inputComp.setValue(new Date()); } catch(PropertyVetoException ex) { throw new RuntimeException(ex); }
inputComp.addPropertyChangeListener("value",this);
inputComp.addVetoableChangeListener(this);
inputComp.addEventListener("change",this);
PlainDocument dataModel = (PlainDocument)inputComp.getDocument();
dataModel.addDocumentListener(this);
}