numberTextField.setModelObject(new AddressDO().setName(getPhoneNumber()));
numberTextField.modelChanged();
parentPage.call();
}
};
final TextLinkPanel numberLinkPanel = new TextLinkPanel(addressPanel.newChildId(), numberLink, new Model<String>() {
@Override
public String getObject()
{
final String number = (String) BeanHelper.getProperty(address, property);
return HtmlHelper.escapeHtml(number + " (" + label + ")\n", true);
}
}) {
/**
* @see org.apache.wicket.Component#isVisible()
*/
@Override
public boolean isVisible()
{
if (address == null) {
return false;
}
final String number = (String) BeanHelper.getProperty(address, property);
return (StringUtils.isNotBlank(number) == true);
}
};
numberLinkPanel.getLabel().setEscapeModelStrings(false);
addressPanel.add(numberLinkPanel);
}