All pastes #414662 Raw Edit

Stuff

public text v1 · immutable
#414662 ·published 2007-03-29 04:55 UTC
rendered paste body
	public class BrandForm extends Form {
		private Brand brand;
		private String message;
		private ModalWindow win;

		public BrandForm(String id, Brand brand,final ModalWindow win) {
			super(id);
			
			this.brand = brand;
			this.win = win;
			add(new Label("created",new PropertyModel(brand,"created")));
			add(new Label("updated",new PropertyModel(brand,"updated")));
			add(new TextField("name",new PropertyModel(brand,"name")).setRequired(true));
			add(new Label("message",new PropertyModel(this,"message")));
			add(new AjaxSubmitButton("save",this) {

				@Override
				protected void onSubmit(AjaxRequestTarget arg0, Form arg1) {
					win.close(arg0);
				}
				
			});
		}
}