setMaxSize(Bytes.megabytes(getJtrac().getAttachmentMaxSizeInMb()));
// send notifications===============================================
add(new CheckBox("sendNotifications"));
// validation that assignedTo is not null if status is not null and not CLOSED
// have to use FormValidator because this is conditional validation across two FormComponents
add(new AbstractFormValidator() {
public FormComponent[] getDependentFormComponents() {
// actually we depend on assignedToChoice also, but wicket logs a warning when the
// component is not visible but we are doing ajax. anyway we use assignedToChoice.getInput()
// not assignedToChoice.convertedInput() so no danger there
return new FormComponent[] {statusChoice};