All pastes #490183 Raw Edit

Something

public text v1 · immutable
·published 2007-05-15 21:49 UTC
rendered paste body
	public class ProductForm extends Form {
		private static final long serialVersionUID = 1L;
		private FileUploadField u;

		public ProductForm(String arg0, IModel arg1) {
			super(arg0, arg1);
			setMultiPart(true);

			final CategoryDao cdao = (CategoryDao) getCtx().getBean(
					"categoryDao");
			
			add(new DropDownChoice("category", new LoadableDetachableModel() {
				private static final long serialVersionUID = 1L;
				
				@Override
				protected Object load() {
					return cdao.all();
				}
			}, new PropertyModel(getModel(), "category"));

		}