}
});
final WebMarkupContainer streetCodeDiv = new WebMarkupContainer("streetCodeDiv");
streetCodeDiv.setOutputMarkupId(true);
streetCodeDiv.add(new AjaxMaxLengthEditableLabel("street", new PropertyModel<String>(newEntryValue, "street")) {
/**
* @see org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel#onEdit(org.apache.wicket.ajax.AjaxRequestTarget)
*/
@Override
public void onEdit(final AjaxRequestTarget target)
{
super.onEdit(target);
if (newEntryValue.getStreet().equals(DEFAULT_ENTRY_VALUE) == true)
newEntryValue.setStreet(DEFAULT_STREET_VALUE);
}
/**
* @see org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel#onSubmit(org.apache.wicket.ajax.AjaxRequestTarget)
*/
@Override
protected void onSubmit(final AjaxRequestTarget target)
{
super.onSubmit(target);
zipCode.setVisible(true);
target.add(mainContainer);
}
}).setOutputMarkupId(true).setOutputMarkupPlaceholderTag(true).setVisible(true);
item.add(streetCodeDiv);
final WebMarkupContainer zipCodeDiv = new WebMarkupContainer("zipCodeDiv");
zipCodeDiv.setOutputMarkupId(true);
zipCodeDiv.add( zipCode= new AjaxMaxLengthEditableLabel("zipCode", new PropertyModel<String>(newEntryValue, "zipCode")) {
/**
* @see org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel#onSubmit(org.apache.wicket.ajax.AjaxRequestTarget)
*/
@Override
protected void onSubmit(final AjaxRequestTarget target)
{
super.onSubmit(target);
city.setVisible(true);
target.add(mainContainer);
}
}.setOutputMarkupId(true).setOutputMarkupPlaceholderTag(true).setVisible(false));
item.add(zipCodeDiv);
final WebMarkupContainer cityDiv = new WebMarkupContainer("cityDiv");
cityDiv.setOutputMarkupId(true);
cityDiv.add( city = new AjaxMaxLengthEditableLabel("city", new PropertyModel<String>(newEntryValue, "city")) {
/**
* @see org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel#onSubmit(org.apache.wicket.ajax.AjaxRequestTarget)
*/
@Override
protected void onSubmit(final AjaxRequestTarget target)
{
super.onSubmit(target);
country.setVisible(true);
target.add(mainContainer);
}
}.setOutputMarkupId(true).setOutputMarkupPlaceholderTag(true).setVisible(false));
item.add(cityDiv);
final WebMarkupContainer countryDiv = new WebMarkupContainer("countryDiv");
countryDiv.setOutputMarkupId(true);
countryDiv.add( country = new AjaxMaxLengthEditableLabel("country", new PropertyModel<String>(newEntryValue, "country")) {
/**
* @see org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel#onSubmit(org.apache.wicket.ajax.AjaxRequestTarget)
*/
@Override
protected void onSubmit(final AjaxRequestTarget target)
{
super.onSubmit(target);
state.setVisible(true);
target.add(mainContainer);
}
}.setOutputMarkupId(true).setOutputMarkupPlaceholderTag(true).setVisible(false));
item.add(countryDiv);
final WebMarkupContainer stateDiv = new WebMarkupContainer("stateDiv");
stateDiv.setOutputMarkupId(true);
stateDiv.add( state = new AjaxMaxLengthEditableLabel("state", new PropertyModel<String>(newEntryValue, "state")) {
/**
* @see org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel#onSubmit(org.apache.wicket.ajax.AjaxRequestTarget)
*/
@Override
protected void onSubmit(final AjaxRequestTarget target)