nameTextItem.setWidth(300);
String escapedBundleDeploymentName = StringUtility.escapeHtml(bundleDeploymentName);
wizard.setSubtitle(escapedBundleDeploymentName);
nameTextItem.setValue(escapedBundleDeploymentName);
final TextAreaItem descriptionTextAreaItem = new TextAreaItem("description", MSG
.view_bundle_revertWizard_getInfoStep_revertDeployDesc());
descriptionTextAreaItem.setWidth(300);
String liveDesc = wizard.getLiveDeployment().getDescription();
liveDesc = (null == liveDesc) ? wizard.getLiveDeployment().getName() : liveDesc;
String escapedLiveDesc = StringUtility.escapeHtml(liveDesc);
String prevDesc = wizard.getPreviousDeployment().getDescription();
prevDesc = (null == prevDesc) ? wizard.getPreviousDeployment().getName() : prevDesc;
String escapedPrevDesc = StringUtility.escapeHtml(prevDesc);
wizard.setDeploymentDescription(MSG.view_bundle_revertWizard_getInfoStep_revertDeployDescFull(
escapedLiveDesc, escapedPrevDesc));
descriptionTextAreaItem.setValue(StringUtility.escapeHtml(wizard.getDeploymentDescription()));
descriptionTextAreaItem.setValidateOnChange(true);
descriptionTextAreaItem.setValidateOnExit(true);
LengthRangeValidator validator = new LengthRangeValidator();
validator.setMin(0);
validator.setMax(500); // database column limit
descriptionTextAreaItem.setValidators(validator);
descriptionTextAreaItem.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent event) {
Object value = event.getValue();
if (value == null) {
value = "";
}