{
ItsNatComponentManager compMgr = listMult.getItsNatComponentManager();
compMgr.buildItsNatComponents(cellContentElem);
}
final ItsNatHTMLInputText firstNameComp = getInputText("firstNameId",cellContentElem,listMult);
final ItsNatHTMLInputText lastNameComp = getInputText("lastNameId",cellContentElem,listMult);
firstNameComp.setText(person.getFirstName());
lastNameComp.setText(person.getLastName());
DocumentListener firstNameListener = new DocumentListener()
{
public void insertUpdate(DocumentEvent e)
{
update();
}
public void removeUpdate(DocumentEvent e)
{
update();
}
public void changedUpdate(DocumentEvent e)
{
update();
}
public void update()
{
person.setFirstName(firstNameComp.getText());
}
};
firstNameComp.getDocument().addDocumentListener(firstNameListener);
DocumentListener lastNameListener = new DocumentListener()
{
public void insertUpdate(DocumentEvent e)
{
update();
}
public void removeUpdate(DocumentEvent e)
{
update();
}
public void changedUpdate(DocumentEvent e)
{
update();
}
public void update()
{
person.setLastName(lastNameComp.getText());
}
};
lastNameComp.getDocument().addDocumentListener(lastNameListener);
}
else
{
ItsNatHTMLInputText firstNameComp = getInputText("firstNameId",cellContentElem,listMult);
ItsNatHTMLInputText lastNameComp = getInputText("lastNameId",cellContentElem,listMult);
firstNameComp.setText(person.getFirstName());
lastNameComp.setText(person.getLastName());
}
}