portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vku...@apache.org
Subject svn commit: r768369 [2/3] - in /portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site: ./ resources/
Date Fri, 24 Apr 2009 16:56:48 GMT
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java?rev=768369&r1=768368&r2=768369&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java Fri Apr 24 16:56:47 2009
@@ -40,6 +40,7 @@
 import javax.swing.tree.DefaultTreeModel;
 import javax.swing.tree.TreeModel;
 
+import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.components.portletregistry.PortletRegistry;
 import org.apache.jetspeed.decoration.DecorationFactory;
 import org.apache.jetspeed.exception.JetspeedException;
@@ -71,6 +72,7 @@
 import org.apache.jetspeed.portlets.wicket.component.DynamicResourceLink;
 import org.apache.jetspeed.portlets.wicket.component.JavascriptEventConfirmation;
 import org.apache.jetspeed.portlets.wicket.component.ResourceProvider;
+import org.apache.jetspeed.request.RequestContext;
 import org.apache.jetspeed.security.SecurityException;
 import org.apache.wicket.Component;
 import org.apache.wicket.ResourceReference;
@@ -100,6 +102,8 @@
 import org.apache.wicket.markup.html.form.upload.FileUpload;
 import org.apache.wicket.markup.html.form.upload.FileUploadField;
 import org.apache.wicket.markup.html.image.Image;
+import org.apache.wicket.markup.html.link.ExternalLink;
+import org.apache.wicket.markup.html.link.PopupSettings;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
 import org.apache.wicket.markup.html.panel.FeedbackPanel;
@@ -113,6 +117,8 @@
 import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.util.string.Strings;
 import org.apache.wicket.validation.validator.StringValidator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Manage the Portal Site
@@ -123,39 +129,69 @@
  */
 public class PortalSiteManager extends AdminPortletWebPage
 {
-    // protected final Logger log = LoggerFactory.getLogger(this.getClass());
+
+    protected final Logger log = LoggerFactory.getLogger(this.getClass());
     // components
     protected PortletRegistry registry;
+
     protected DecorationFactory decorationFactory;
+
     // session
     protected final static String SESSION_FOLDERS = "jetspeed.site.manager.folders";
+
     protected final static String SESSION_ROOT = "jetspeed.site.manager.root";
+
     // context
     public final static String FOLDERS = "folders";
+
     public final static String JSROOT = "jsroot";
+
     private final static String JETSPEED_PATH_SEPRATOR = "/";
+
     public static final String ALL_SECURITY_REFS = "allSecurityRefs";
+
     private DefaultTreeModel treeModel;
+
     private AjaxTabbedPanel tabPanel;
+
     private DefaultTreeModel treeRoot;
+
     private JetspeedDocument document;
+
     private MenuDefinition menuDefinition;
+
     private static List<String> pageDecoraters;
+
     private static List<String> portletDecorators;
+
     private static List<String> pageThemes;
+
     private static List<String> constraintsDefs;
+
     private static List<String> targetList;
+
     private final static String ADD_ACTION = "add";
+
     private final static String REMOVE_ACTION = "remove";
+
     private final static String SAVE_ACTION = "save";
+
     private final static String INCLUDES = "includes";
+
     private final static String EXCLUDES = "excludes";
+
     private final static String FOLDER_NODE_TYPE = "folder";
+
     private final static String PAGE_NODE_TYPE = "page";
+
     List<ITab> menuTabs = new ArrayList<ITab>();
+
     private List menuOptions = new ArrayList();
+
     String userFolder;
+
     private DefaultTreeModel menuTreeRoot;
+
     private LinkTree menuTree;
 
     public PortalSiteManager()
@@ -163,15 +199,19 @@
         super();
         List<ITab> tabList = new ArrayList<ITab>();
         DefaultMutableTreeNode rootNode = populateTree();
-        populateDocument(new SiteTreeNode("ROOT", "/", SiteTreeNode.FileType.Folder, true));
-        PortalTree siteTree = new PortalTree("siteTree", new PropertyModel(this, "treeRoot"));
+        populateDocument(new SiteTreeNode("ROOT", "/",
+                SiteTreeNode.FileType.Folder, true));
+        PortalTree siteTree = new PortalTree("siteTree", new PropertyModel(
+                this, "treeRoot"));
         siteTree.getTreeState().expandNode(rootNode);
         tabPanel = new AjaxTabbedPanel("tabs", tabList);
         tabPanel.setOutputMarkupId(true);
         add(siteTree);
         Form treeForm = new Form("treeForm");
-        treeForm.add(new AutoCompleteTextField<String>("userFolder", new PropertyModel(this, "userFolder"))
+        treeForm.add(new AutoCompleteTextField<String>("userFolder",
+                new PropertyModel(this, "userFolder"))
         {
+
             @Override
             protected Iterator<String> getChoices(String input)
             {
@@ -184,9 +224,9 @@
                 List<String> userNames = null;
                 try
                 {
-                    userNames = getServiceLocator().getUserManager().getUserNames(input);
-                }
-                catch (SecurityException e)
+                    userNames = getServiceLocator().getUserManager()
+                            .getUserNames(input);
+                } catch (SecurityException e)
                 {
                     // TODO Auto-generated catch block
                     e.printStackTrace();
@@ -199,8 +239,7 @@
                 if (userNames.size() > 10)
                 {
                     return userNames.subList(0, 10).iterator();
-                }
-                else
+                } else
                 {
                     return userNames.iterator();
                 }
@@ -208,19 +247,23 @@
         });
         treeForm.add(new Button("userFolderButton")
         {
+
             @Override
             public void onSubmit()
             {
-                ((LinkTree) getPage().get("siteTree")).getTreeState().expandNode(populateUserTree(userFolder));
+                ((LinkTree) getPage().get("siteTree")).getTreeState()
+                        .expandNode(populateUserTree(userFolder));
             }
         });
         treeForm.add(new Button("portalFolderButton")
         {
+
             @Override
             public void onSubmit()
             {
                 setUserFolder("");
-                ((LinkTree) getPage().get("siteTree")).getTreeState().expandNode(populateTree());
+                ((LinkTree) getPage().get("siteTree")).getTreeState()
+                        .expandNode(populateTree());
             }
         });
         add(treeForm);
@@ -230,6 +273,7 @@
 
     private class PortalTree extends LinkTree
     {
+
         private static final long serialVersionUID = 3315834315652490831L;
 
         public PortalTree(String id, IModel model)
@@ -243,25 +287,31 @@
             final IModel nodeModel = model;
             return new LinkIconPanel(id, model, PortalTree.this)
             {
+
                 private static final long serialVersionUID = 1L;
+
                 String path = "images";
 
                 @Override
-                protected Component newContentComponent(String componentId, BaseTree tree, IModel model)
+                protected Component newContentComponent(String componentId,
+                        BaseTree tree, IModel model)
                 {
                     return new Label(componentId, getNodeTextModel(model));
                 }
 
                 @Override
-                protected void onNodeLinkClicked(Object node, BaseTree tree, AjaxRequestTarget target)
+                protected void onNodeLinkClicked(Object node, BaseTree tree,
+                        AjaxRequestTarget target)
                 {
                     super.onNodeLinkClicked(node, tree, target);
                     DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) node;
-                    SiteTreeNode siteNode = (SiteTreeNode) treeNode.getUserObject();
+                    SiteTreeNode siteNode = (SiteTreeNode) treeNode
+                            .getUserObject();
                     if (!tree.getTreeState().isNodeExpanded(treeNode))
                     {
                         populateDocument(siteNode);
-                        if (siteNode.getDocType() == SiteTreeNode.FileType.Folder && !siteNode.isLoaded())
+                        if (siteNode.getDocType() == SiteTreeNode.FileType.Folder
+                                && !siteNode.isLoaded())
                         {
                             retrieveFolders(siteNode.getNodePath(), treeNode);
                             siteNode.setLoaded(true);
@@ -269,8 +319,7 @@
                         }
                         tree.getTreeState().expandNode(treeNode);
                         controlTabs();
-                    }
-                    else
+                    } else
                     {
                         tree.getTreeState().collapseNode(treeNode);
                     }
@@ -278,29 +327,31 @@
                 }
 
                 @Override
-                protected Component newImageComponent(String componentId, BaseTree tree, IModel<Object> model)
+                protected Component newImageComponent(String componentId,
+                        BaseTree tree, IModel<Object> model)
                 {
                     return new Image(componentId)
                     {
+
                         private static final long serialVersionUID = 1L;
 
                         @Override
                         protected ResourceReference getImageResourceReference()
                         {
-                            SiteTreeNode siteModel = (SiteTreeNode) ((DefaultMutableTreeNode) nodeModel.getObject()).getUserObject();
+                            SiteTreeNode siteModel = (SiteTreeNode) ((DefaultMutableTreeNode) nodeModel
+                                    .getObject()).getUserObject();
                             if (siteModel.getDocType() == SiteTreeNode.FileType.Folder)
                             {
-                                return new ResourceReference(PortalTree.class, path + "/folder.gif");
-                            }
-                            else if (siteModel.getDocType() == SiteTreeNode.FileType.Page)
+                                return new ResourceReference(PortalTree.class,
+                                        path + "/folder.gif");
+                            } else if (siteModel.getDocType() == SiteTreeNode.FileType.Page)
                             {
-                                return new ResourceReference(PortalTree.class, path + "/page.gif");
-                            }
-                            else if (siteModel.getDocType() == SiteTreeNode.FileType.Link)
-                            {
-                                return new ResourceReference(PortalTree.class, path + "/link.gif");
-                            }
-                            return new ResourceReference(PortalTree.class, path + "/folder_closed.gif");
+                                return new ResourceReference(PortalTree.class,
+                                        path + "/page.gif");
+                            } else if (siteModel.getDocType() == SiteTreeNode.FileType.Link) { return new ResourceReference(
+                                    PortalTree.class, path + "/link.gif"); }
+                            return new ResourceReference(PortalTree.class, path
+                                    + "/folder_closed.gif");
                         }
                     };
                 }
@@ -310,89 +361,115 @@
 
     protected class InformationTab extends BasePanel
     {
+
         private static final long serialVersionUID = 3039163446419682350L;
 
         public InformationTab(String id, JetspeedDocument document)
         {
             super(id, document);
             Form infoForm = new Form("infoForm");
-            Label nameLabel = new Label("name", "Name");
-            TextField nameField = new TextField("nameField", new PropertyModel(this, "document.name"));
+            Label nameLabel = new Label("name",
+                    new ResourceModel("common.name"));
+            TextField nameField = new TextField("nameField", new PropertyModel(
+                    this, "document.name"));
             infoForm.add(nameLabel);
             infoForm.add(nameField);
-            Label titleLabel = new Label("title", "Title");
-            TextField titleField = new TextField("titleField", new PropertyModel(this, "document.title"));
+            Label titleLabel = new Label("title", new ResourceModel("Title"));
+            TextField titleField = new TextField("titleField",
+                    new PropertyModel(this, "document.title"));
             infoForm.add(titleLabel);
             infoForm.add(titleField);
-            Label shortTitleLabel = new Label("shortTitle", "ShortTitle");
-            TextField shortTitleField = new TextField("shortTitleField", new PropertyModel(this, "document.shortTitle"));
+            Label shortTitleLabel = new Label("shortTitle", new ResourceModel(
+                    "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());
+            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());
+            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());
+            DropDownChoice themeField = new DropDownChoice("themeList",
+                    new PropertyModel(this, "document.desktopTheme"),
+                    getThemes());
             themeField.setVisibilityAllowed(true);
             themeLabel.setVisibilityAllowed(true);
             infoForm.add(themeField);
             infoForm.add(themeLabel);
-            Label visibleLabel = new Label("visible", "Hidden");
-            CheckBox visibleCheckbox = new CheckBox("visibleCheck", new PropertyModel(this, "document.hidden"));
+            Label visibleLabel = new Label("visible", new ResourceModel(
+                    "Hidden"));
+            CheckBox visibleCheckbox = new CheckBox("visibleCheck",
+                    new PropertyModel(this, "document.hidden"));
             infoForm.add(visibleLabel);
             infoForm.add(visibleCheckbox);
-            Label urlLabel = new Label("urlLabel", "URL");
-            TextField urlField = new TextField("urlField", new PropertyModel(this, "document.url"));
+            Label urlLabel = new Label("urlLabel", new ResourceModel("Url"));
+            TextField urlField = new TextField("urlField", new PropertyModel(
+                    this, "document.url"));
             infoForm.add(urlLabel);
             infoForm.add(urlField);
             urlLabel.setVisibilityAllowed(true);
             urlField.setVisibilityAllowed(true);
             Label targetLabel = new Label("targetLabel", "Target Window");
-            DropDownChoice targetField = new DropDownChoice("target", new PropertyModel(this, "document.target"), getTargetList());
+            DropDownChoice targetField = new DropDownChoice("target",
+                    new PropertyModel(this, "document.target"), getTargetList());
             infoForm.add(targetLabel);
             infoForm.add(targetField);
             targetLabel.setVisibilityAllowed(true);
             targetField.setVisibilityAllowed(true);
-            Label defaultPageLabel = new Label("defaultPage", "Default Page");
-            TextField defaultPageField = new TextField("defaultPageField", new PropertyModel(this, "document.page"));
+            Label defaultPageLabel = new Label("defaultPage",
+                    new ResourceModel("DefaultPage"));
+            TextField defaultPageField = new TextField("defaultPageField",
+                    new PropertyModel(this, "document.page"));
             infoForm.add(defaultPageLabel);
             infoForm.add(defaultPageField);
             defaultPageLabel.setVisibilityAllowed(true);
             defaultPageField.setVisibilityAllowed(true);
             final ModalWindow metaDataModalWindow;
             add(metaDataModalWindow = new ModalWindow("modalwindow"));
-            AjaxLink addFolder = new AjaxLink("addFolder")
+            AjaxLink addFolder = new AjaxLink("addFolder",new ResourceModel("add.subfolder"))
             {
+
                 @Override
                 public void onClick(AjaxRequestTarget target)
                 {
-                    metaDataModalWindow.setContent(new AddFolderPanel(metaDataModalWindow.getContentId()));
+                    metaDataModalWindow.setContent(new AddFolderPanel(
+                            metaDataModalWindow.getContentId()));
                     metaDataModalWindow.show(target);
                 }
             };
             add(addFolder);
-            AjaxLink addPage = new AjaxLink("addPage")
+            AjaxLink addPage = new AjaxLink("addPage",new ResourceModel("add.Page"))
             {
+
                 @Override
                 public void onClick(AjaxRequestTarget target)
                 {
-                    metaDataModalWindow.setContent(new AddPagePanel(metaDataModalWindow.getContentId()));
+                    metaDataModalWindow.setContent(new AddPagePanel(
+                            metaDataModalWindow.getContentId()));
                     metaDataModalWindow.show(target);
                 }
             };
             add(addPage);
-            AjaxLink addLink = new AjaxLink("addLink")
+            AjaxLink addLink = new AjaxLink("addLink",new ResourceModel("add.link"))
             {
+
                 @Override
                 public void onClick(AjaxRequestTarget target)
                 {
-                    metaDataModalWindow.setContent(new AddLinkPanel(metaDataModalWindow.getContentId()));
+                    metaDataModalWindow.setContent(new AddLinkPanel(
+                            metaDataModalWindow.getContentId()));
                     metaDataModalWindow.show(target);
                 }
             };
@@ -410,8 +487,7 @@
                 addFolder.setVisible(true);
                 addPage.setVisible(true);
                 addLink.setVisible(true);
-            }
-            else if (node.getDocType() == SiteTreeNode.FileType.Page)
+            } else if (node.getDocType() == SiteTreeNode.FileType.Page)
             {
                 defaultPageLabel.setVisible(false);
                 defaultPageField.setVisible(false);
@@ -422,8 +498,7 @@
                 addFolder.setVisible(false);
                 addPage.setVisible(false);
                 addLink.setVisible(false);
-            }
-            else if (node.getDocType() == SiteTreeNode.FileType.Link)
+            } else if (node.getDocType() == SiteTreeNode.FileType.Link)
             {
                 defaultPageLabel.setVisible(false);
                 defaultPageField.setVisible(false);
@@ -439,55 +514,72 @@
                 addPage.setVisible(false);
                 addLink.setVisible(false);
             }
-            infoForm.add(new AjaxButton("view", infoForm)
+            if (node.getDocType() == SiteTreeNode.FileType.Link)
             {
-                @Override
-                protected void onSubmit(AjaxRequestTarget target, Form form)
-                {
-                    excuteAction(getDocument(), "view");
-                }
-            });
-            infoForm.add(new AjaxButton("remove", infoForm)
+                infoForm.add(new ExternalLink("view", new Model(getDocument().getUrl()),new ResourceModel("common.view")).setPopupSettings(new PopupSettings()));
+            } else
+            {
+                RequestContext context = (RequestContext) getPortletRequest()
+                        .getAttribute(
+                                PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
+                String basePath = context.getPortalURL().getBasePath().replace(
+                        "portal", "configure");
+                infoForm.add(new ExternalLink("view", new Model(basePath
+                        + getDocument().getPath()),new ResourceModel("common.view")).setPopupSettings(new PopupSettings()));
+            }
+
+            infoForm.add(new AjaxButton("remove",new ResourceModel("common.remove"),infoForm)
             {
+
                 @Override
                 protected void onSubmit(AjaxRequestTarget target, Form form)
                 {
-                    excuteAction(getDocument(), "remove");
+                    excuteAction(getDocument(), REMOVE_ACTION);
                     DefaultMutableTreeNode node = getSelectedNode();
-                    DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode) node.getParent();
+                    DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode) node
+                            .getParent();
                     parentNode.remove(node);
                     LinkTree tree = (PortalTree) getPage().get("siteTree");
                     tree.updateTree(target);
                 }
             }.add(new JavascriptEventConfirmation("onclick", "are you sure?")));
-            infoForm.add(new AjaxButton("save", infoForm)
+            infoForm.add(new AjaxButton("save",new ResourceModel("common.save"), infoForm)
             {
+
                 @Override
                 protected void onSubmit(AjaxRequestTarget target, Form form)
                 {
-                    excuteAction(getDocument(), "save");
+                    excuteAction(getDocument(), SAVE_ACTION);
                 }
             });
             add(infoForm);
-            add(new AjaxLink("copy")
+            add(new AjaxButton("copy",new ResourceModel("common.copy"),infoForm)
             {
+
                 @Override
-                public void onClick(AjaxRequestTarget target)
+                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                 {
                     SiteTreeNode selectedNode = getUserSelectedNode();
-                    metaDataModalWindow.setContent(new CopyMoveWindow(metaDataModalWindow.getContentId(), selectedNode.getDocType().name(),
-                                                                      selectedNode.getNodeName(), getUserSelectedNode().getNodePath(), true));
+                    metaDataModalWindow.setContent(new CopyMoveWindow(
+                            metaDataModalWindow.getContentId(), selectedNode
+                                    .getDocType().name(), selectedNode
+                                    .getNodeName(), getUserSelectedNode()
+                                    .getNodePath(), true));
                     metaDataModalWindow.show(target);
                 }
             });
-            add(new AjaxLink("move")
+            add(new AjaxButton("move",new ResourceModel("common.move"),infoForm)
             {
+
                 @Override
-                public void onClick(AjaxRequestTarget target)
+                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                 {
                     SiteTreeNode selectedNode = getUserSelectedNode();
-                    metaDataModalWindow.setContent(new CopyMoveWindow(metaDataModalWindow.getContentId(), selectedNode.getDocType().name(),
-                                                                      selectedNode.getNodeName(), getUserSelectedNode().getNodePath(), false));
+                    metaDataModalWindow.setContent(new CopyMoveWindow(
+                            metaDataModalWindow.getContentId(), selectedNode
+                                    .getDocType().name(), selectedNode
+                                    .getNodeName(), getUserSelectedNode()
+                                    .getNodePath(), false));
                     metaDataModalWindow.show(target);
                 }
             });
@@ -496,6 +588,7 @@
 
     protected class SecurityTab extends BasePanel
     {
+
         private static final long serialVersionUID = 7948533482848224251L;
 
         public SecurityTab(String id, JetspeedDocument document)
@@ -503,42 +596,62 @@
             super(id, document);
             final ModalWindow metaDataModalWindow;
             add(metaDataModalWindow = new ModalWindow("modalwindow"));
-            final WebMarkupContainer ajaxPanel = new WebMarkupContainer("basePanel");
+            final WebMarkupContainer ajaxPanel = new WebMarkupContainer(
+                    "basePanel");
             ajaxPanel.setOutputMarkupId(true);
-            ajaxPanel.add(new ListView("metaData", new PropertyModel(this, "document.securityConstraints"))
+            ajaxPanel.add(new Label("constraintLabel",new ResourceModel("security.constraint.title")));
+            ajaxPanel.add(new Label("constraintTypeLabel",new ResourceModel("ecurity.type.title")));
+            
+            ajaxPanel.add(new ListView("metaData", new PropertyModel(this,
+                    "document.securityConstraints"))
             {
+
                 public void populateItem(final ListItem listItem)
                 {
-                    final String constraints = (String) listItem.getModelObject();
+                    final String constraints = (String) listItem
+                            .getModelObject();
                     listItem.add(new Label("name", constraints));
-                    listItem.add(new Label("type", "Security Reference"));
-                    listItem.add(new AjaxLink("edit")
+                    listItem.add(new Label("type", new ResourceModel("security.ref")));
+                    AjaxLink editLink = new AjaxLink("edit")
                     {
+
                         @Override
                         public void onClick(AjaxRequestTarget target)
                         {
-                            metaDataModalWindow.setContent(new SecurityTabWindowPanel(metaDataModalWindow.getContentId(), constraints, ajaxPanel));
+                            metaDataModalWindow
+                                    .setContent(new SecurityTabWindowPanel(
+                                            metaDataModalWindow.getContentId(),
+                                            constraints, ajaxPanel));
                             metaDataModalWindow.show(target);
                             target.addComponent(ajaxPanel);
                         }
-                    });
-                    listItem.add(new AjaxLink("delete")
+                    };
+                    editLink.add(new Label("editLabel",new ResourceModel("common.edit")));
+                    listItem.add(editLink);
+                    
+                    AjaxLink deleteLink = new AjaxLink("delete")
                     {
+
                         @Override
                         public void onClick(AjaxRequestTarget target)
                         {
-                            securityConstraintAction(REMOVE_ACTION, constraints, "");
+                            securityConstraintAction(REMOVE_ACTION,
+                                    constraints, "");
                             target.addComponent(ajaxPanel);
                         }
-                    }.add(new JavascriptEventConfirmation("onclick", "are you sure?")));
+                    };
+                    deleteLink.add(new JavascriptEventConfirmation("onclick","are you sure?"));                    
+                    deleteLink.add(new Label("deleteLabel",new ResourceModel("common.delete")));
+                    listItem.add(deleteLink);
                 }
             });
-            add(new AjaxLink("new")
+            add(new AjaxButton("new",new ResourceModel("common.new"))
             {
                 @Override
-                public void onClick(AjaxRequestTarget target)
+                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                 {
-                    metaDataModalWindow.setContent(new SecurityTabWindowPanel(metaDataModalWindow.getContentId(), "", ajaxPanel));
+                    metaDataModalWindow.setContent(new SecurityTabWindowPanel(
+                            metaDataModalWindow.getContentId(), "", ajaxPanel));
                     metaDataModalWindow.show(target);
                 }
             });
@@ -548,42 +661,55 @@
 
     protected class MetaDataTab extends BasePanel
     {
+
         private static final long serialVersionUID = 6429774536790672910L;
 
         public MetaDataTab(String id, JetspeedDocument doc)
         {
             super(id, doc);
             final ModalWindow metaDataModalWindow;
-            final WebMarkupContainer ajaxPanel = new WebMarkupContainer("basePanel");
+            final WebMarkupContainer ajaxPanel = new WebMarkupContainer(
+                    "basePanel");
             add(metaDataModalWindow = new ModalWindow("modalwindow"));
-            
-            ajaxPanel.add(new Label("nameLabel", new ResourceModel("metedataTab.name")));
-            ajaxPanel.add(new Label("languageLabel", new ResourceModel("metedataTab.language")));
-            
-            final ListView metaDataListView = new ListView("metaData", new PropertyModel(this, "document.metaData"))
+
+            ajaxPanel.add(new Label("nameLabel", new ResourceModel(
+                    "metedataTab.name")));
+            ajaxPanel.add(new Label("languageLabel", new ResourceModel(
+                    "metedataTab.language")));
+
+            final ListView metaDataListView = new ListView("metaData",
+                    new PropertyModel(this, "document.metaData"))
             {
+
                 private static final long serialVersionUID = 1L;
 
                 public void populateItem(final ListItem listItem)
                 {
-                    final JetspeedDocumentMetaData metaData = (JetspeedDocumentMetaData) listItem.getModelObject();
+                    final JetspeedDocumentMetaData metaData = (JetspeedDocumentMetaData) listItem
+                            .getModelObject();
                     listItem.add(new Label("name", metaData.getName()));
                     listItem.add(new Label("language", metaData.getLanguage()));
                     listItem.add(new Label("value", metaData.getValue()));
                     AjaxLink editLink = new AjaxLink("edit", new Model("edit"))
                     {
+
                         @Override
                         public void onClick(AjaxRequestTarget target)
                         {
-                            metaDataModalWindow.setContent(new MetaDataPanel(metaDataModalWindow.getContentId(), metaData, ajaxPanel));
+                            metaDataModalWindow.setContent(new MetaDataPanel(
+                                    metaDataModalWindow.getContentId(),
+                                    metaData, ajaxPanel));
                             metaDataModalWindow.show(target);
                         }
-                    };                    
-                    editLink.add(new Label("editLabel",new ResourceModel("common.edit")));
+                    };
+                    editLink.add(new Label("editLabel", new ResourceModel(
+                            "common.edit")));
                     listItem.add(editLink);
-                    
-                    AjaxLink deleteLink = new AjaxLink("delete",new Model("delete"))
+
+                    AjaxLink deleteLink = new AjaxLink("delete", new Model(
+                            "delete"))
                     {
+
                         private static final long serialVersionUID = 1L;
 
                         @Override
@@ -592,10 +718,12 @@
                             metaDataAction(REMOVE_ACTION, metaData, null);
                             target.addComponent(ajaxPanel);
                         }
-                    };                    
-                    
-                    deleteLink.add(new Label("deleteLabel", new ResourceModel("common.delete")));
-                    deleteLink.add(new JavascriptEventConfirmation("onclick", "are you sure?"));                                       
+                    };
+
+                    deleteLink.add(new Label("deleteLabel", new ResourceModel(
+                            "common.delete")));
+                    deleteLink.add(new JavascriptEventConfirmation("onclick",
+                            "are you sure?"));
                     listItem.add(deleteLink);
                 }
             };
@@ -604,10 +732,15 @@
             ajaxPanel.add(metaDataListView);
             add(new AjaxLink("new", new ResourceModel("common.new"))
             {
+
                 @Override
                 public void onClick(AjaxRequestTarget target)
                 {
-                    metaDataModalWindow.setContent(new MetaDataPanel(metaDataModalWindow.getContentId(), new JetspeedDocumentMetaData("", "", ""), ajaxPanel));
+                    metaDataModalWindow
+                            .setContent(new MetaDataPanel(metaDataModalWindow
+                                    .getContentId(),
+                                    new JetspeedDocumentMetaData("", "", ""),
+                                    ajaxPanel));
                     metaDataModalWindow.show(target);
                 }
             });
@@ -617,7 +750,9 @@
 
     protected class SecurityTabWindowPanel extends Panel
     {
+
         private static final long serialVersionUID = -3223669376958653554L;
+
         private String constraintName;
 
         /**
@@ -637,7 +772,8 @@
             this.constraintName = constraintName;
         }
 
-        public SecurityTabWindowPanel(String id, final String constrainName, final WebMarkupContainer markUp)
+        public SecurityTabWindowPanel(String id, final String constrainName,
+                final WebMarkupContainer markUp)
         {
             super(id);
             this.constraintName = constrainName;
@@ -645,16 +781,23 @@
             feedback.setOutputMarkupId(true);
             add(feedback);
             Form securityTabForm = new Form("securityDataForm");
-            securityTabForm.add(new Label("securityConstraintLabel", "Security Constraint"));
-            DropDownChoice constraintsChoices = new DropDownChoice("constraints", new PropertyModel(this, "constraintName"), getConstraintsDef());
+            securityTabForm.add(new Label("securityConstraintLabel",
+                    "Security Constraint"));
+            DropDownChoice constraintsChoices = new DropDownChoice(
+                    "constraints", new PropertyModel(this, "constraintName"),
+                    getConstraintsDef());
+            constraintsChoices.setRequired(true);
             securityTabForm.add(constraintsChoices);
-            securityTabForm.add(new AjaxButton("save", securityTabForm)
+            securityTabForm.add(new AjaxButton("save",new ResourceModel("common.save"), securityTabForm)
             {
+
                 @Override
                 protected void onSubmit(AjaxRequestTarget target, Form form)
                 {
-                    securityConstraintAction(SAVE_ACTION, getConstraintName(), constrainName);
-                    ((ModalWindow) SecurityTabWindowPanel.this.getParent()).close(target);
+                    securityConstraintAction(SAVE_ACTION, getConstraintName(),
+                            constrainName);
+                    ((ModalWindow) SecurityTabWindowPanel.this.getParent())
+                            .close(target);
                     target.addComponent(markUp);
                 }
 
@@ -670,7 +813,9 @@
 
     protected class OptionsWindow extends WindowPanel
     {
+
         private static final long serialVersionUID = -3223669376958653554L;
+
         private MenuOptionsDefinition optionsDefinition;
 
         /**
@@ -690,26 +835,45 @@
             this.optionsDefinition = optionsDefinition;
         }
 
-        public OptionsWindow(String id, MenuDefinition definition, MenuOptionsDefinition options, final WebMarkupContainer markUp)
+        public OptionsWindow(String id, MenuDefinition definition,
+                MenuOptionsDefinition options, final WebMarkupContainer markUp)
         {
             super(id);
-            this.optionsDefinition = (MenuOptionsDefinition) copyMenuElement(getNodeType(), options);
+            this.optionsDefinition = (MenuOptionsDefinition) copyMenuElement(
+                    getNodeType(), options);
             final MenuOptionsDefinition optionDef = options;
             final MenuDefinition def = definition;
             final Form menuform = new Form("menuForm");
-            menuform.add(new TextField("optionsField", new PropertyModel(this, "optionsDefinition.options")));
-            menuform.add(new TextField("depthField", new PropertyModel(this, "optionsDefinition.depth")));
-            menuform.add(new CheckBox("pathField", new PropertyModel(this, "optionsDefinition.paths")));
-            menuform.add(new CheckBox("regExpField", new PropertyModel(this, "optionsDefinition.regexp")));
-            menuform.add(new TextField("profileField", new PropertyModel(this, "optionsDefinition.profile")));
-            menuform.add(new TextField("skinField", new PropertyModel(this, "optionsDefinition.skin")));
-            menuform.add(new TextField("orderField", new PropertyModel(this, "optionsDefinition.order")));
-            menuform.add(new AjaxButton("save")
+            menuform.add(new TextField("optionsField", new PropertyModel(this,
+                    "optionsDefinition.options")));
+            menuform.add(new Label("optionLabel",new ResourceModel("menu.option")));
+            menuform.add(new TextField("depthField", new PropertyModel(this,
+                    "optionsDefinition.depth")));
+            menuform.add(new Label("depthLabel",new ResourceModel("menu.depth")));
+            menuform.add(new CheckBox("pathField", new PropertyModel(this,
+                    "optionsDefinition.paths")));
+            menuform.add(new Label("pathLabel",new ResourceModel("menu.path")));
+            menuform.add(new CheckBox("regExpField", new PropertyModel(this,
+                    "optionsDefinition.regexp")));
+            menuform.add(new Label("regExpLabel",new ResourceModel("meni.regExp")));
+            menuform.add(new TextField("profileField", new PropertyModel(this,
+                    "optionsDefinition.profile")));
+            menuform.add(new Label("profileLabel",new ResourceModel("menu.profile")));
+            menuform.add(new TextField("skinField", new PropertyModel(this,
+                    "optionsDefinition.skin")));
+            menuform.add(new Label("skinLabel",new ResourceModel("menu.skin")));
+            menuform.add(new TextField("orderField", new PropertyModel(this,
+                    "optionsDefinition.order")));
+            menuform.add(new Label("orderLabel",new ResourceModel("menu.order")));
+            menuform.add(new AjaxButton("save",new ResourceModel("common.save"))
             {
+
                 protected void onSubmit(AjaxRequestTarget target, Form menuform)
                 {
-                    menuActions(SAVE_ACTION, def, optionDef, getOptionsDefinition());
-                    ((ModalWindow) OptionsWindow.this.getParent()).close(target);
+                    menuActions(SAVE_ACTION, def, optionDef,
+                            getOptionsDefinition());
+                    ((ModalWindow) OptionsWindow.this.getParent())
+                            .close(target);
                     target.addComponent(markUp);
                 }
             });
@@ -719,6 +883,7 @@
 
     protected class MenuWindow extends WindowPanel
     {
+
         private MenuDefinition menuDef;
 
         public MenuDefinition getMenuDef()
@@ -731,42 +896,63 @@
             this.menuDef = menuDef;
         }
 
-        public MenuWindow(String id, final MenuDefinition definition, final AjaxTabbedPanel tabPanel)
+        public MenuWindow(String id, final MenuDefinition definition,
+                final AjaxTabbedPanel tabPanel)
         {
             super(id);
-            this.menuDef = (MenuDefinition) copyMenuElement(getNodeType(), definition);
+            this.menuDef = (MenuDefinition) copyMenuElement(getNodeType(),
+                    definition);
             final FeedbackPanel feedback = new FeedbackPanel("feedback");
             feedback.setOutputMarkupId(true);
             add(feedback);
             Form menuform = new Form("menuForm");
-            TextField nameField = new TextField("nameField", new PropertyModel(this, "menuDef.name"));
-            nameField.add(StringValidator.minimumLength(1));
+            TextField nameField = new RequiredTextField("nameField",
+                    new PropertyModel(this, "menuDef.name"));
+            menuform.add(new Label("nameLabel",new ResourceModel("common.name")));
             menuform.add(nameField);
-            TextField optionsField = new TextField("optionsField", new PropertyModel(this, "menuDef.options"));
+            TextField optionsField = new TextField("optionsField",
+                    new PropertyModel(this, "menuDef.options"));
+            menuform.add(new Label("optionLabel",new ResourceModel("menu.option")));
             menuform.add(optionsField);
-            TextField depthField = new TextField("depthField", new PropertyModel(this, "menuDef.depth"));
+            TextField depthField = new TextField("depthField",
+                    new PropertyModel(this, "menuDef.depth"));
+            menuform.add(new Label("depthLabel",new ResourceModel("menu.depth")));
             menuform.add(depthField);
-            CheckBox pathField = new CheckBox("pathField", new PropertyModel(this, "menuDef.paths"));
+            CheckBox pathField = new CheckBox("pathField", new PropertyModel(
+                    this, "menuDef.paths"));
+            menuform.add(new Label("pathLabel",new ResourceModel("menu.path")));
             menuform.add(pathField);
-            CheckBox regExpField = new CheckBox("regExpField", new PropertyModel(this, "menuDef.regexp"));
+            CheckBox regExpField = new CheckBox("regExpField",
+                    new PropertyModel(this, "menuDef.regexp"));
+            menuform.add(new Label("regExpLabel",new ResourceModel("menu.regExp")));
             menuform.add(regExpField);
-            TextField profileField = new TextField("profileField", new PropertyModel(this, "menuDef.profile"));
+            TextField profileField = new TextField("profileField",
+                    new PropertyModel(this, "menuDef.profile"));
+            menuform.add(new Label("profileLabel",new ResourceModel("menu.profile")));
             menuform.add(profileField);
-            TextField titleField = new TextField("titleField", new PropertyModel(this, "menuDef.title"));
+            TextField titleField = new TextField("titleField",
+                    new PropertyModel(this, "menuDef.title"));
+            menuform.add(new Label("titleLabel",new ResourceModel("menu.title")));
             menuform.add(titleField);
-            TextField skinField = new TextField("skinField", new PropertyModel(this, "menuDef.skin"));
+            TextField skinField = new TextField("skinField", new PropertyModel(
+                    this, "menuDef.skin"));
+            menuform.add(new Label("skinLabel",new ResourceModel("menu.skin")));
             menuform.add(skinField);
-            TextField orderField = new TextField("orderField", new PropertyModel(this, "menuDef.order"));
+            TextField orderField = new TextField("orderField",
+                    new PropertyModel(this, "menuDef.order"));
+            menuform.add(new Label("orderLabel",new ResourceModel("menu.order")));
             menuform.add(orderField);
-            AjaxButton saveButton = new AjaxButton("save")
+            menuform.add(new AjaxButton("save", menuform)
             {
+
                 @Override
                 protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                 {
                     menuActions(SAVE_ACTION, definition, getMenuDef());
-                    ((ModalWindow) MenuWindow.this.getParent()).close(target);
-                    DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode) menuTreeRoot.getRoot();
-                    DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(new MenuTreeNode(getMenuDef()));
+                    DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode) menuTreeRoot
+                            .getRoot();
+                    DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(
+                            new MenuTreeNode(getMenuDef()));
                     rootNode.insert(childNode, rootNode.getChildCount());
                     menuTree.getTreeState().expandNode(rootNode);
                     menuTree.getTreeState().selectNode(childNode, true);
@@ -774,7 +960,7 @@
                     controlMenuTabs(true);
                     tabPanel.setSelectedTab(0);
                     target.addComponent(menuTree);
-                    target.addComponent(tabPanel);
+                    ((ModalWindow) MenuWindow.this.getParent()).close(target);
                 }
 
                 @Override
@@ -782,15 +968,17 @@
                 {
                     target.addComponent(feedback);
                 }
-            };
-            menuform.add(saveButton);
+            });
+
             add(menuform);
         }
     }
 
     protected class IncludesWindow extends WindowPanel
     {
+
         private static final long serialVersionUID = -3223669376958653554L;
+
         private MenuIncludeDefinition includes;
 
         /**
@@ -810,22 +998,30 @@
             this.includes = includes;
         }
 
-        public IncludesWindow(String id, MenuDefinition definition, MenuIncludeDefinition includes, final WebMarkupContainer markUp)
+        public IncludesWindow(String id, MenuDefinition definition,
+                MenuIncludeDefinition includes, final WebMarkupContainer markUp)
         {
             super(id);
-            this.includes = (MenuIncludeDefinition) copyMenuElement(getNodeType(), includes);
+            this.includes = (MenuIncludeDefinition) copyMenuElement(
+                    getNodeType(), includes);
             final MenuIncludeDefinition oldDef = includes;
             final MenuDefinition menuDef = definition;
             final Form menuform = new Form("menuForm");
-            menuform.add(new TextField("nameField", new PropertyModel(this, "includes.name")));
-            menuform.add(new CheckBox("nestField", new PropertyModel(this, "includes.nest")));
-            menuform.add(new AjaxButton("save")
+            menuform.add(new TextField("nameField", new PropertyModel(this,
+                    "includes.name")));
+            menuform.add(new CheckBox("nestField", new PropertyModel(this,
+                    "includes.nest")));
+            menuform.add(new Label("namelabel",new ResourceModel("common.name")));
+            menuform.add(new Label("nestlabel",new ResourceModel("menu.nest.label")));
+            menuform.add(new AjaxButton("save",new ResourceModel("common.save"),menuform)
             {
+
                 @Override
                 protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                 {
                     menuActions(SAVE_ACTION, menuDef, oldDef, getIncludes());
-                    ((ModalWindow) IncludesWindow.this.getParent()).close(target);
+                    ((ModalWindow) IncludesWindow.this.getParent())
+                            .close(target);
                     target.addComponent(markUp);
                 }
             });
@@ -835,7 +1031,9 @@
 
     protected class ExcludesWindow extends WindowPanel
     {
+
         private static final long serialVersionUID = -3223669376958653554L;
+
         private MenuExcludeDefinition excludes;
 
         /**
@@ -855,21 +1053,28 @@
             this.excludes = excludes;
         }
 
-        public ExcludesWindow(String id, MenuDefinition definition, MenuExcludeDefinition excludes, final WebMarkupContainer markUp)
+        public ExcludesWindow(String id, MenuDefinition definition,
+                MenuExcludeDefinition excludes, final WebMarkupContainer markUp)
         {
             super(id);
-            this.excludes = (MenuExcludeDefinition) copyMenuElement(getNodeType(), excludes);;
+            this.excludes = (MenuExcludeDefinition) copyMenuElement(
+                    getNodeType(), excludes);
+            ;
             final MenuExcludeDefinition oldDef = excludes;
             final MenuDefinition menuDef = definition;
             final Form menuform = new Form("menuForm");
-            menuform.add(new TextField("nameField", new PropertyModel(this, "excludes.name")));
-            menuform.add(new AjaxButton("save")
+            menuform.add(new Label("namelabel",new ResourceModel("common.name")));
+            menuform.add(new TextField("nameField", new PropertyModel(this,
+                    "excludes.name")));
+            menuform.add(new AjaxButton("save",new ResourceModel("common.save"),menuform)
             {
+
                 @Override
                 protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                 {
                     menuActions(SAVE_ACTION, menuDef, oldDef, getExcludes());
-                    ((ModalWindow) ExcludesWindow.this.getParent()).close(target);
+                    ((ModalWindow) ExcludesWindow.this.getParent())
+                            .close(target);
                     target.addComponent(markUp);
                 }
             });
@@ -879,7 +1084,9 @@
 
     protected class SeparatorWindow extends WindowPanel
     {
+
         private static final long serialVersionUID = -3223669376958653554L;
+
         private MenuSeparatorDefinition separator;
 
         /**
@@ -899,21 +1106,30 @@
             this.separator = constraintName;
         }
 
-        public SeparatorWindow(String id, final MenuDefinition definition, MenuSeparatorDefinition separator, final WebMarkupContainer markUp)
+        public SeparatorWindow(String id, final MenuDefinition definition,
+                MenuSeparatorDefinition separator,
+                final WebMarkupContainer markUp)
         {
             super(id);
-            this.separator = (MenuSeparatorDefinition) copyMenuElement(getNodeType(), separator);
+            this.separator = (MenuSeparatorDefinition) copyMenuElement(
+                    getNodeType(), separator);
             final MenuSeparatorDefinition sepDef = separator;
             Form separatorForm = new Form("separatorDataForm");
-            separatorForm.add(new TextField("separatorText", new PropertyModel(this, "separator.text")));
-            separatorForm.add(new TextField("separatorTitle", new PropertyModel(this, "separator.title")));
-            separatorForm.add(new AjaxButton("save", separatorForm)
+            separatorForm.add(new TextField("separatorText", new PropertyModel(
+                    this, "separator.text")));
+            separatorForm.add(new TextField("separatorTitle",
+                    new PropertyModel(this, "separator.title")));
+            separatorForm.add(new Label("nameLabel",new ResourceModel("common.name")));
+            separatorForm.add(new Label("titleLabel",new ResourceModel("common.title")));
+            separatorForm.add(new AjaxButton("save",new ResourceModel("common.save"), separatorForm)
             {
+
                 @Override
                 protected void onSubmit(AjaxRequestTarget target, Form form)
                 {
                     menuActions(SAVE_ACTION, definition, sepDef, getSeparator());
-                    ((ModalWindow) SeparatorWindow.this.getParent()).close(target);
+                    ((ModalWindow) SeparatorWindow.this.getParent())
+                            .close(target);
                     target.addComponent(markUp);
                 }
             });
@@ -923,9 +1139,13 @@
 
     protected class ImportDataTab extends BasePanel
     {
+
         private static final long serialVersionUID = 3676403374892366510L;
+
         private boolean recursively = false;
+
         private FileUpload fileUpload;
+
         private ExportJetspeedObject exportObject;
 
         /**
@@ -968,14 +1188,18 @@
             final SiteTreeNode node = getUserSelectedNode();
             Form exportForm = new Form("exportForm");
             Label exportLabel = new Label("exportName", "Export recursively");
-            AjaxCheckBox exportChkBox = new AjaxCheckBox("recursively", new PropertyModel(this, "recursively")){
+            AjaxCheckBox exportChkBox = new AjaxCheckBox("recursively",
+                    new PropertyModel(this, "recursively"))
+            {
+
                 @Override
                 protected void onUpdate(AjaxRequestTarget target)
                 {
-                }                
+                }
             };
             Label exporNameLabel = new Label("expLabel", "Export Object");
-            TextField exportName = new TextField("expName", new PropertyModel(this, "document.name"));
+            TextField exportName = new TextField("expName", new PropertyModel(
+                    this, "document.name"));
             exportLabel.setVisibilityAllowed(true);
             exportChkBox.setVisibilityAllowed(true);
             if (node.getDocType() != SiteTreeNode.FileType.Folder)
@@ -988,21 +1212,26 @@
             exportForm.add(exportLabel);
             exportForm.add(exportChkBox);
             exportObject = new ExportJetspeedObject();
-            DynamicResourceLink exportButton = new DynamicResourceLink("exprtButton", new PropertyModel(this, "exportObject"))
+            DynamicResourceLink exportButton = new DynamicResourceLink(
+                    "exprtButton", new PropertyModel(this, "exportObject"))
             {
+
                 @Override
                 public void onClick()
                 {
-                    if(node.getDocType().equals(SiteTreeNode.FileType.Folder))
+                    if (node.getDocType().equals(SiteTreeNode.FileType.Folder))
+                    {
+                        exportObject.setFileName(getDocument().getName()
+                                + ".zip");
+                    } else
                     {
-                        exportObject.setFileName(getDocument().getName()+".zip");    
-                    }else{
                         exportObject.setFileName(getDocument().getName());
                     }
                     exportObject.setNode(getUserSelectedNode());
-                    exportObject.setUserName(getPortletRequest().getUserPrincipal().getName());
+                    exportObject.setUserName(getPortletRequest()
+                            .getUserPrincipal().getName());
                     exportObject.setRecursively(isRecursively());
-                }           
+                }
             };
             exportForm.add(exportButton);
             add(exportForm);
@@ -1015,79 +1244,113 @@
             {
                 uploadForm.setMultiPart(true);
                 // Add one file input field
-                uploadForm.add(new FileUploadField("fileInput", new PropertyModel(this, "fileUploadField")));
+                uploadForm.add(new FileUploadField("fileInput",
+                        new PropertyModel(this, "fileUploadField")));
                 uploadForm.add(new Button("uploadFile")
                 {
+
                     /*
                      * (non-Javadoc)
+                     * 
                      * @see org.apache.wicket.markup.html.form.Button#onSubmit()
                      */
                     @Override
                     public void onSubmit()
                     {
                         final FileUpload upload = fileUpload;
-                        final String userName = getPortletRequest().getUserPrincipal().getName();
+                        final String userName = getPortletRequest()
+                                .getUserPrincipal().getName();
                         String usrFolder;
                         String fileType;
                         String fileName;
-                        String pathSeparator = System.getProperty("file.separator");
+                        String pathSeparator = System
+                                .getProperty("file.separator");
                         boolean success = false;
                         if (upload != null)
                         {
                             try
                             {
-                                PageManager pageManager = getServiceLocator().getPageManager();
+                                PageManager pageManager = getServiceLocator()
+                                        .getPageManager();
                                 InputStream docStream = upload.getInputStream();
                                 fileName = upload.getClientFileName();
                                 fileType = fileExt(upload.getClientFileName());
                                 cleanUserFolder(userName);
                                 usrFolder = getTempFolder(userName);
                                 String destPath = node.getNodePath();
-                                upload.writeTo(new File(usrFolder + pathSeparator + upload.getClientFileName()));
+                                upload.writeTo(new File(usrFolder
+                                        + pathSeparator
+                                        + upload.getClientFileName()));
                                 // File writed in temp folder
-                                if (fileType != null && !fileType.equals("") && fileName != null && !fileName.equals("") && destPath != null &&
-                                    !destPath.equals(""))
+                                if (fileType != null && !fileType.equals("")
+                                        && fileName != null
+                                        && !fileName.equals("")
+                                        && destPath != null
+                                        && !destPath.equals(""))
                                 {
-                                    // if "/" is path, then file separator will work, as root.
-                                    if (destPath.equals("/"))
-                                        destPath = "";
-                                    Folder folder = getServiceLocator().getCastorPageManager().getFolder(userName);
+                                    // if "/" is path, then file separator will
+                                    // work, as root.
+                                    if (destPath.equals("/")) destPath = "";
+                                    Folder folder = getServiceLocator()
+                                            .getCastorPageManager().getFolder(
+                                                    userName);
                                     if (fileType.equalsIgnoreCase("psml"))
                                     {
                                         Page source = folder.getPage(fileName);
                                         Page page = null;
-                                        if (pageManager.pageExists(destPath + pathSeparator + fileName))
+                                        if (pageManager.pageExists(destPath
+                                                + pathSeparator + fileName))
                                         {
-                                            pageManager.removePage(pageManager.getPage(destPath + pathSeparator + fileName));
-                                            page = pageManager.copyPage(source, destPath + pathSeparator + fileName);
+                                            pageManager.removePage(pageManager
+                                                    .getPage(destPath
+                                                            + pathSeparator
+                                                            + fileName));
+                                            page = pageManager.copyPage(source,
+                                                    destPath + pathSeparator
+                                                            + fileName);
                                         }
-                                        page = pageManager.copyPage(source, destPath + pathSeparator + fileName);
+                                        page = pageManager.copyPage(source,
+                                                destPath + pathSeparator
+                                                        + fileName);
                                         pageManager.updatePage(page);
                                         success = true;
-                                    }
-                                    else if (fileType.equalsIgnoreCase("link"))
+                                    } else if (fileType
+                                            .equalsIgnoreCase("link"))
                                     {
                                         Link source = folder.getLink(fileName);
                                         Link link;
-                                        if (pageManager.linkExists(destPath + pathSeparator + fileName))
+                                        if (pageManager.linkExists(destPath
+                                                + pathSeparator + fileName))
                                         {
-                                            pageManager.removeLink(pageManager.getLink(destPath + pathSeparator + fileName));
-                                            link = pageManager.copyLink(source, destPath + pathSeparator + fileName);
+                                            pageManager.removeLink(pageManager
+                                                    .getLink(destPath
+                                                            + pathSeparator
+                                                            + fileName));
+                                            link = pageManager.copyLink(source,
+                                                    destPath + pathSeparator
+                                                            + fileName);
                                         }
-                                        link = pageManager.copyLink(source, destPath + pathSeparator + fileName);
+                                        link = pageManager.copyLink(source,
+                                                destPath + pathSeparator
+                                                        + fileName);
                                         pageManager.updateLink(link);
                                         success = true;
-                                    }
-                                    else if (fileType.equalsIgnoreCase("zip"))
+                                    } else if (fileType.equalsIgnoreCase("zip"))
                                     {
-                                        unzipfile(fileName, usrFolder + userName, pathSeparator);
-                                        folder = getServiceLocator().getCastorPageManager().getFolder(userName);
-                                        importFolders(pageManager, getServiceLocator().getCastorPageManager(), folder, userName, destPath);
+                                        unzipfile(fileName, usrFolder
+                                                + userName, pathSeparator);
+                                        folder = getServiceLocator()
+                                                .getCastorPageManager()
+                                                .getFolder(userName);
+                                        importFolders(
+                                                pageManager,
+                                                getServiceLocator()
+                                                        .getCastorPageManager(),
+                                                folder, userName, destPath);
                                         success = true;
                                     }
                                 }
-                            }
-                            catch (Exception e)
+                            } catch (Exception e)
                             {
                                 e.printStackTrace();
                             }
@@ -1101,10 +1364,13 @@
 
     protected class MetaDataPanel extends Panel
     {
+
         private JetspeedDocumentMetaData metaData;
+
         private JetspeedDocumentMetaData oldMetaData;
 
-        public MetaDataPanel(String id, JetspeedDocumentMetaData jmetaData, final WebMarkupContainer markup)
+        public MetaDataPanel(String id, JetspeedDocumentMetaData jmetaData,
+                final WebMarkupContainer markup)
         {
             super(id);
             final FeedbackPanel feedback = new FeedbackPanel("feedback");
@@ -1114,25 +1380,34 @@
             this.oldMetaData = jmetaData;
             Form metaDataForm = new Form("metaDataForm");
             FormComponent fc;
-            fc = new RequiredTextField("name", new PropertyModel(this, "metaData.name"));
+            fc = new RequiredTextField("name", new PropertyModel(this,
+                    "metaData.name"));
             fc.add(StringValidator.minimumLength(2));
             metaDataForm.add(fc);
-            metaDataForm.add(new Label("name-label", new ResourceModel("metedataTab.name")));
-            fc = new RequiredTextField("language", new PropertyModel(this, "metaData.language"));
+            metaDataForm.add(new Label("name-label", new ResourceModel(
+                    "metedataTab.name")));
+            fc = new RequiredTextField("language", new PropertyModel(this,
+                    "metaData.language"));
             fc.add(StringValidator.minimumLength(2));
             metaDataForm.add(fc);
-            metaDataForm.add(new Label("language-label", new ResourceModel("metedataTab.language")));
-            fc = new RequiredTextField("metaValue", new PropertyModel(this, "metaData.value"));
+            metaDataForm.add(new Label("language-label", new ResourceModel(
+                    "metedataTab.language")));
+            fc = new RequiredTextField("metaValue", new PropertyModel(this,
+                    "metaData.value"));
             fc.add(StringValidator.minimumLength(2));
             metaDataForm.add(fc);
-            metaDataForm.add(new Label("value-label", new ResourceModel("metedataTab.value")));
-            metaDataForm.add(new AjaxButton("save",new ResourceModel("common.save"), metaDataForm)
+            metaDataForm.add(new Label("value-label", new ResourceModel(
+                    "metedataTab.value")));
+            metaDataForm.add(new AjaxButton("save", new ResourceModel(
+                    "common.save"), metaDataForm)
             {
+
                 @Override
                 protected void onSubmit(AjaxRequestTarget target, Form form)
                 {
                     metaDataAction(SAVE_ACTION, metaData, oldMetaData);
-                    ((ModalWindow) MetaDataPanel.this.getParent()).close(target);
+                    ((ModalWindow) MetaDataPanel.this.getParent())
+                            .close(target);
                     target.addComponent(markup);
                 }
 
@@ -1148,7 +1423,9 @@
 
     protected class DocumentOrderingTabPanel extends BasePanel
     {
+
         List<String> listChoice = new ArrayList<String>();
+
         String orderedList = "";
 
         public DocumentOrderingTabPanel(String id, JetspeedDocument document)
@@ -1156,15 +1433,19 @@
             super(id, document);
             getSubFoldersPage(getDocument());
             Form documentOrdering = new Form("docuOrderingForm");
-            Label doucmentOrderLabel = new Label("doucmentOrderLabel", "Document ordering");
+            Label doucmentOrderLabel = new Label("doucmentOrderLabel",
+                    "Document ordering");
             documentOrdering.add(doucmentOrderLabel);
-            final ListMultipleChoice documnetOrder = new ListMultipleChoice("docOrders", new PropertyModel(this, "listChoice"),
-                                                                            getDocument().getDocumentOrder());
-            final HiddenField pageOrder = new HiddenField("pageOrder", new PropertyModel(this, "orderedList"));
+            final ListMultipleChoice documnetOrder = new ListMultipleChoice(
+                    "docOrders", new PropertyModel(this, "listChoice"),
+                    getDocument().getDocumentOrder());
+            final HiddenField pageOrder = new HiddenField("pageOrder",
+                    new PropertyModel(this, "orderedList"));
             documentOrdering.add(documnetOrder);
             documentOrdering.add(pageOrder);
-            documentOrdering.add(new AjaxButton("save", documentOrdering)
+            documentOrdering.add(new AjaxButton("save",new ResourceModel("common.save"), documentOrdering)
             {
+
                 @Override
                 protected void onSubmit(AjaxRequestTarget target, Form form)
                 {
@@ -1174,12 +1455,15 @@
                 @Override
                 protected IAjaxCallDecorator getAjaxCallDecorator()
                 {
-                    return new AjaxPreprocessingCallDecorator(super.getAjaxCallDecorator())
+                    return new AjaxPreprocessingCallDecorator(super
+                            .getAjaxCallDecorator())
                     {
+
                         private static final long serialVersionUID = 7495281332320552876L;
 
                         @Override
-                        public CharSequence preDecorateScript(CharSequence script)
+                        public CharSequence preDecorateScript(
+                                CharSequence script)
                         {
                             return "convertToString();" + script;
                         }
@@ -1226,6 +1510,7 @@
 
     protected class MenuTabPanel extends BasePanel
     {
+
         public MenuDefinition definition = null;
 
         public DefaultTreeModel getMenuTreeRoot()
@@ -1244,13 +1529,18 @@
             // Adding menu tree node
             menuTreeRoot = new DefaultTreeModel(rootNode);
             // controlMenuTabs(false);
-            final AjaxTabbedPanel menusTab = new AjaxTabbedPanel("menuTabs", menuTabs);
-            menuTree = new LinkTree("menuTree", new PropertyModel(this, "menuTreeRoot"))
+            final AjaxTabbedPanel menusTab = new AjaxTabbedPanel("menuTabs",
+                    menuTabs);
+            menuTree = new LinkTree("menuTree", new PropertyModel(this,
+                    "menuTreeRoot"))
             {
+
                 @Override
-                protected void onNodeLinkClicked(Object node, BaseTree tree, AjaxRequestTarget target)
+                protected void onNodeLinkClicked(Object node, BaseTree tree,
+                        AjaxRequestTarget target)
                 {
-                    MenuTreeNode menuNode = (MenuTreeNode) ((DefaultMutableTreeNode) node).getUserObject();
+                    MenuTreeNode menuNode = (MenuTreeNode) ((DefaultMutableTreeNode) node)
+                            .getUserObject();
                     if (menuNode.getName() == null)
                     {
                         setMenuDefinition(menuNode.getDefinition());
@@ -1262,11 +1552,12 @@
             };
             if (getNodeType().equals(FOLDER_NODE_TYPE))
             {
-                setMenuDefinition(getServiceLocator().getPageManager().newFolderMenuDefinition());
-            }
-            else
+                setMenuDefinition(getServiceLocator().getPageManager()
+                        .newFolderMenuDefinition());
+            } else
             {
-                setMenuDefinition(getServiceLocator().getPageManager().newPageMenuDefinition());
+                setMenuDefinition(getServiceLocator().getPageManager()
+                        .newPageMenuDefinition());
             }
             getServiceLocator().getPageManager().newFolderMenuDefinition();
             // menusTab.setSelectedTab(0);
@@ -1274,32 +1565,37 @@
             menuTree.getTreeState().expandNode(rootNode);
             menuTree.setRootLess(true);
             add(menuTree);
-            add(new AjaxLink("newsave")
+            add(new AjaxButton("newsave",new ResourceModel("add.menu"))
             {
                 @Override
-                public void onClick(AjaxRequestTarget target)
+                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                 {
                     MenuDefinition def = null;
                     if (getNodeType().equals(FOLDER_NODE_TYPE))
                     {
-                        def = getServiceLocator().getPageManager().newFolderMenuDefinition();
-                    }
-                    else
+                        def = getServiceLocator().getPageManager()
+                                .newFolderMenuDefinition();
+                    } else
                     {
-                        def = getServiceLocator().getPageManager().newPageMenuDefinition();
+                        def = getServiceLocator().getPageManager()
+                                .newPageMenuDefinition();
                     }
-                    metaDataModalWindow.setContent(new MenuWindow(metaDataModalWindow.getContentId(), def, menusTab));
+                    metaDataModalWindow.setContent(new MenuWindow(
+                            metaDataModalWindow.getContentId(), def, menusTab));
                     metaDataModalWindow.show(target);
                 }
             });
-            AjaxLink removeLink = new AjaxLink("remove")
+            AjaxButton removeLink = new AjaxButton("remove",new ResourceModel("common.remove"))
             {
+
                 @Override
-                public void onClick(AjaxRequestTarget target)
+                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                 {
                     menuActions(REMOVE_ACTION, getMenuDefinition(), null);
-                    DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode) menuTreeRoot.getRoot();
-                    DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(new MenuTreeNode(getMenuDefinition()));
+                    DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode) menuTreeRoot
+                            .getRoot();
+                    DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(
+                            new MenuTreeNode(getMenuDefinition()));
                     rootNode.remove(childNode);
                     menuTree.getTreeState().expandNode(rootNode);
                     menuTree.updateTree(target);
@@ -1307,7 +1603,8 @@
                     target.addComponent(tabPanel);
                 }
             };
-            removeLink.add(new JavascriptEventConfirmation("onclick", "are you sure?"));
+            removeLink.add(new JavascriptEventConfirmation("onclick",
+                    "are you sure?"));
             add(removeLink);
             add(menusTab);
         }
@@ -1323,7 +1620,9 @@
 
     protected class MenuInfoPanel extends MenuBasePanel
     {
+
         private MenuDefinition menuDef;
+
         MenuDefinition oldDef = null;
 
         public MenuDefinition getMenuDef()
@@ -1336,102 +1635,142 @@
             this.menuDef = menuDef;
         }
 
-        public MenuInfoPanel(String id, JetspeedDocument document, MenuDefinition definition)
+        public MenuInfoPanel(String id, JetspeedDocument document,
+                MenuDefinition definition)
         {
             super(id, document, definition);
             oldDef = (MenuDefinition) copyMenuElement(getNodeType(), definition);
-            this.menuDef = (MenuDefinition) copyMenuElement(getNodeType(), definition);
-            final WebMarkupContainer ajaxPanel = new WebMarkupContainer("ajaxPanel");
+            this.menuDef = (MenuDefinition) copyMenuElement(getNodeType(),
+                    definition);
+            final WebMarkupContainer ajaxPanel = new WebMarkupContainer(
+                    "ajaxPanel");
+            final FeedbackPanel feedbackPanel = new FeedbackPanel("feedback");
             ajaxPanel.setOutputMarkupId(true);
             Form menuform = new Form("menuForm");
-            TextField nameField = new TextField("nameField", new PropertyModel(this, "menuDef.name"));
-            nameField.add(StringValidator.minimumLength(1));
+            TextField nameField = new RequiredTextField("nameField",
+                    new PropertyModel(this, "menuDef.name"));
             menuform.add(nameField);
-            TextField optionsField = new TextField("optionsField", new PropertyModel(this, "menuDef.options"));
+            TextField optionsField = new TextField("optionsField",
+                    new PropertyModel(this, "menuDef.options"));
             menuform.add(optionsField);
-            TextField depthField = new TextField("depthField", new PropertyModel(this, "menuDef.depth"));
+            TextField depthField = new TextField("depthField",
+                    new PropertyModel(this, "menuDef.depth"));
             menuform.add(depthField);
-            CheckBox pathField = new CheckBox("pathField", new PropertyModel(this, "menuDef.paths"));
+            CheckBox pathField = new CheckBox("pathField", new PropertyModel(
+                    this, "menuDef.paths"));
             menuform.add(pathField);
-            CheckBox regExpField = new CheckBox("regExpField", new PropertyModel(this, "menuDef.regexp"));
+            CheckBox regExpField = new CheckBox("regExpField",
+                    new PropertyModel(this, "menuDef.regexp"));
             menuform.add(regExpField);
-            TextField profileField = new TextField("profileField", new PropertyModel(this, "menuDef.profile"));
+            TextField profileField = new TextField("profileField",
+                    new PropertyModel(this, "menuDef.profile"));
             menuform.add(profileField);
-            TextField titleField = new TextField("titleField", new PropertyModel(this, "menuDef.title"));
+            TextField titleField = new TextField("titleField",
+                    new PropertyModel(this, "menuDef.title"));
             menuform.add(titleField);
-            TextField skinField = new TextField("skinField", new PropertyModel(this, "menuDef.skin"));
+            TextField skinField = new TextField("skinField", new PropertyModel(
+                    this, "menuDef.skin"));
             menuform.add(skinField);
-            TextField orderField = new TextField("orderField", new PropertyModel(this, "menuDef.order"));
+            TextField orderField = new TextField("orderField",
+                    new PropertyModel(this, "menuDef.order"));
             menuform.add(orderField);
-            AjaxButton saveButton = new AjaxButton("save")
+            AjaxButton saveButton = new AjaxButton("save", menuform)
             {
+
                 @Override
                 protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                 {
                     menuActions(SAVE_ACTION, oldDef, getMenuDef());
-                    oldDef = (MenuDefinition) copyMenuElement(getNodeType(), getMenuDef());
+                    oldDef = (MenuDefinition) copyMenuElement(getNodeType(),
+                            getMenuDef());
                     target.addComponent(ajaxPanel);
                 }
+
+                @Override
+                protected void onError(AjaxRequestTarget target, Form<?> form)
+                {
+                    target.addComponent(feedbackPanel);
+                }
+
             };
             menuform.add(saveButton);
             ajaxPanel.add(menuform);
             add(ajaxPanel);
+            add(feedbackPanel);
         }
     }
 
     protected class MenuSeparatorPanel extends MenuBasePanel
     {
-        public MenuSeparatorPanel(String id, JetspeedDocument document, MenuDefinition definition)
+
+        public MenuSeparatorPanel(String id, JetspeedDocument document,
+                MenuDefinition definition)
         {
             super(id, document, definition);
             final ModalWindow metaDataModalWindow;
             getMenuElements(definition, MenuElement.SEPARATOR_ELEMENT_TYPE);
-            final MenuDefinition def = (MenuDefinition) copyMenuElement(getNodeType(), definition);
+            final MenuDefinition def = (MenuDefinition) copyMenuElement(
+                    getNodeType(), definition);
             add(metaDataModalWindow = new ModalWindow("modalwindow"));
-            final WebMarkupContainer ajaxPanel = new WebMarkupContainer("basePanel");
+            final WebMarkupContainer ajaxPanel = new WebMarkupContainer(
+                    "basePanel");
             ajaxPanel.setOutputMarkupId(true);
-            ajaxPanel.add(new ListView("separator", new PropertyModel(this, "menuOptions"))
+            ajaxPanel.add(new ListView("separator", new PropertyModel(this,
+                    "menuOptions"))
             {
+
                 public void populateItem(final ListItem listItem)
                 {
-                    final MenuSeparatorDefinition separator = (MenuSeparatorDefinition) listItem.getModelObject();
+                    final MenuSeparatorDefinition separator = (MenuSeparatorDefinition) listItem
+                            .getModelObject();
                     listItem.add(new Label("text", separator.getText()));
                     listItem.add(new Label("title", separator.getTitle()));
                     listItem.add(new AjaxLink("edit")
                     {
+
                         @Override
                         public void onClick(AjaxRequestTarget target)
                         {
-                            metaDataModalWindow.setContent(new SeparatorWindow(metaDataModalWindow.getContentId(), def, separator, ajaxPanel));
+                            metaDataModalWindow.setContent(new SeparatorWindow(
+                                    metaDataModalWindow.getContentId(), def,
+                                    separator, ajaxPanel));
                             metaDataModalWindow.show(target);
                         }
                     });
                     listItem.add(new AjaxLink("delete")
                     {
+
                         @Override
                         public void onClick(AjaxRequestTarget target)
                         {
                             menuActions(REMOVE_ACTION, def, separator, null);
                             target.addComponent(ajaxPanel);
                         }
-                    }.add(new JavascriptEventConfirmation("onclick", "are you sure?")));
+                    }.add(new JavascriptEventConfirmation("onclick",
+                            "are you sure?")));
                 }
             });
             add(new AjaxLink("new")
             {
+
                 @Override
                 public void onClick(AjaxRequestTarget target)
                 {
                     MenuSeparatorDefinition separatorDefinition = null;
                     if (getUserSelectedNode().getDocType() == FileType.Folder)
                     {
-                        separatorDefinition = getServiceLocator().getPageManager().newFolderMenuSeparatorDefinition();
+                        separatorDefinition = getServiceLocator()
+                                .getPageManager()
+                                .newFolderMenuSeparatorDefinition();
+                    } else
+                    {
+                        separatorDefinition = getServiceLocator()
+                                .getPageManager()
+                                .newPageMenuSeparatorDefinition();
                     }
-                    else
-                    {
-                        separatorDefinition = getServiceLocator().getPageManager().newPageMenuSeparatorDefinition();
-                    }
-                    metaDataModalWindow.setContent(new SeparatorWindow(metaDataModalWindow.getContentId(), def, separatorDefinition, ajaxPanel));
+                    metaDataModalWindow.setContent(new SeparatorWindow(
+                            metaDataModalWindow.getContentId(), def,
+                            separatorDefinition, ajaxPanel));
                     metaDataModalWindow.show(target);
                 }
             });
@@ -1441,31 +1780,44 @@
 
     protected class MenuExlcudesPanel extends MenuBasePanel
     {
-        public MenuExlcudesPanel(String id, JetspeedDocument document, MenuDefinition definition)
+
+        public MenuExlcudesPanel(String id, JetspeedDocument document,
+                MenuDefinition definition)
         {
             super(id, document, definition);
             getMenuElements(definition, EXCLUDES);
             final ModalWindow metaDataModalWindow;
-            final MenuDefinition def = (MenuDefinition) copyMenuElement(getNodeType(), definition);
+            final MenuDefinition def = (MenuDefinition) copyMenuElement(
+                    getNodeType(), definition);
             add(metaDataModalWindow = new ModalWindow("modalwindow"));
-            final WebMarkupContainer ajaxPanel = new WebMarkupContainer("basePanel");
+            final WebMarkupContainer ajaxPanel = new WebMarkupContainer(
+                    "basePanel");
             ajaxPanel.setOutputMarkupId(true);
-            ajaxPanel.add(new ListView("menuData", new PropertyModel(this, "menuOptions"))
+            ajaxPanel.add(new Label("nameLabel",new ResourceModel("common.name")));
+            ajaxPanel.add(new ListView("menuData", new PropertyModel(this,
+                    "menuOptions"))
             {
+
                 public void populateItem(final ListItem listItem)
                 {
-                    final MenuExcludeDefinition option = (MenuExcludeDefinition) listItem.getModelObject();
+                    final MenuExcludeDefinition option = (MenuExcludeDefinition) listItem
+                            .getModelObject();
                     listItem.add(new Label("name", option.getName()));
-                    listItem.add(new AjaxLink("edit")
+                    AjaxLink editLink = new AjaxLink("edit")
                     {
+
                         @Override
                         public void onClick(AjaxRequestTarget target)
                         {
-                            metaDataModalWindow.setContent(new ExcludesWindow(metaDataModalWindow.getContentId(), def, option, ajaxPanel));
+                            metaDataModalWindow.setContent(new ExcludesWindow(
+                                    metaDataModalWindow.getContentId(), def,
+                                    option, ajaxPanel));
                             metaDataModalWindow.show(target);
                         }
-                    });
-                    listItem.add(new AjaxLink("delete")
+                    };
+                    editLink.add(new Label("editLabel",new ResourceModel("common.edit")));
+                    listItem.add(editLink);
+                    AjaxLink deleteLink = new AjaxLink("delete")
                     {
                         @Override
                         public void onClick(AjaxRequestTarget target)
@@ -1473,24 +1825,34 @@
                             menuActions(REMOVE_ACTION, def, option, null);
                             target.addComponent(ajaxPanel);

[... 2354 lines stripped ...]


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message