final FeedbackPanel feedback = new FeedbackPanel("feedback");
feedback.setOutputMarkupId(true);
add(feedback);
document = new JetspeedDocument();
Form infoForm = new Form("newForm");
Label nameLabel = new Label("name", "Name");
TextField nameField = new TextField("nameField", new PropertyModel(
this, "document.name"));
nameField.setRequired(true);
infoForm.add(nameLabel);
infoForm.add(nameField);
Label titleLabel = new Label("title", "Title");
TextField titleField = new TextField("titleField",
new PropertyModel(this, "document.title"));
titleField.setRedirect(true);
infoForm.add(titleLabel);
infoForm.add(titleField);
Label shortTitleLabel = new Label("shortTitle", "ShortTitle");
TextField shortTitleField = new TextField("shortTitleField",
new PropertyModel(this, "document.shortTitle"));
infoForm.add(shortTitleField);
infoForm.add(shortTitleLabel);
Label pageDecoratorLabel = new Label("pageDecorator",
"Page Decorator");
DropDownChoice decoratorsList = new DropDownChoice(
"decoratorsList", new PropertyModel(this,
"document.pageDecorator"), getPageDecorators());
infoForm.add(decoratorsList);
infoForm.add(pageDecoratorLabel);
Label portletDecoratorLabel = new Label("portletDecorator",
"Portlet Decorator");
DropDownChoice portletDecoratorsList = new DropDownChoice(
"portletDecoratorsList", new PropertyModel(this,
"document.portletDecorator"),
getPortletDecorators());
infoForm.add(portletDecoratorLabel);
infoForm.add(portletDecoratorsList);
Label themeLabel = new Label("theme", "Theme");
DropDownChoice themeField = new DropDownChoice("themeList",
new PropertyModel(this, "document.desktopTheme"),
getThemes());
infoForm.add(themeField);
infoForm.add(themeLabel);
Label visibleLabel = new Label("visible", "Hidden");
CheckBox visibleCheckbox = new CheckBox("visibleCheck",
new PropertyModel(this, "document.hidden"));
infoForm.add(visibleLabel);
infoForm.add(visibleCheckbox);
infoForm.add(new AjaxButton("new",new ResourceModel("add.page"),infoForm)