You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2009/04/28 02:04:33 UTC

svn commit: r769206 [2/3] - in /portals/jetspeed-2/applications/j2-admin/trunk: ./ src/main/java/org/apache/jetspeed/portlets/ src/main/java/org/apache/jetspeed/portlets/prm/ src/main/java/org/apache/jetspeed/portlets/prm/application/ src/main/java/org...

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/UploadPortletApp.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/UploadPortletApp.html?rev=769206&r1=769205&r2=769206&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/UploadPortletApp.html (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/UploadPortletApp.html Tue Apr 28 00:04:31 2009
@@ -1,5 +1,21 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   
+<!-- 
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <html 
 	xmlns="http://www.w3.org/1999/xhtml" 
 	xmlns:wicket="http://wicket.sourceforge.net/" 

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/UploadPortletApp.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/UploadPortletApp.properties?rev=769206&r1=769205&r2=769206&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/UploadPortletApp.properties (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/UploadPortletApp.properties Tue Apr 28 00:04:31 2009
@@ -1,3 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
 deployHeader=Deploy Portlet Application
 cancel=Cancel
 uploadFile=Upload File

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsApplication.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsApplication.java?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsApplication.java (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsApplication.java Tue Apr 28 00:04:31 2009
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.portlets.prm.application;
+
+import org.apache.jetspeed.portlets.wicket.AbstractAdminWebApplication;
+
+public class ApplicationDetailsApplication extends AbstractAdminWebApplication
+{
+    @Override
+    public Class<ApplicationDetailsView> getHomePage()
+    {
+        return ApplicationDetailsView.class;
+    }
+
+    protected void init()
+    {
+//        mountBookmarkablePage("/edit", ApplicationsListEdit.class);
+    }
+
+}

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsApplication.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsApplication.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsView.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsView.html?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsView.html (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsView.html Tue Apr 28 00:04:31 2009
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   
+<!-- 
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<html 
+	xmlns="http://www.w3.org/1999/xhtml" 
+	xmlns:wicket="http://wicket.sourceforge.net/" 
+	xml:lang="en" 
+	lang="en">
+<head>
+<style type="text/css">
+</style>
+</head>
+<body>
+
+<p wicket:id="status"></p>
+
+<div wicket:id="tabs" class="tabpanel">[application details + tabs will be here]</div>
+
+</body>
+</html>
\ No newline at end of file

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsView.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsView.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsView.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsView.java?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsView.java (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsView.java Tue Apr 28 00:04:31 2009
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.portlets.prm.application;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.jetspeed.portlets.AdminPortletWebPage;
+import org.apache.jetspeed.portlets.prm.MetadataPanel;
+import org.apache.jetspeed.portlets.prm.ApplicationBean;
+import org.apache.jetspeed.portlets.prm.ApplicationsListApplication;
+import org.apache.jetspeed.portlets.prm.model.ApplicationModel;
+import org.apache.portals.messaging.PortletMessaging;
+import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
+import org.apache.wicket.extensions.markup.html.tabs.ITab;
+import org.apache.wicket.extensions.markup.html.tabs.TabbedPanel;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.Model;
+
+public class ApplicationDetailsView extends AdminPortletWebPage
+{
+    private ApplicationModel applicationModel;
+    private Map<String, ITab> tabs;
+    private boolean dirty = true;
+    private String title;
+
+    public ApplicationDetailsView()
+    {
+        tabs = new HashMap<String, ITab>();
+        this.title = getPortletName();
+    }
+
+    void constructLayout()
+    {
+        if (applicationModel == null)
+        {
+            removeAll();
+            add(new Label("status", "No application selected"));
+            add(new Label("tabs").setEnabled(false).setVisible(false));
+        }
+        else
+        {
+
+            if (get("status") != null)
+            {
+                remove("status");
+            }
+            add(new Label("status", ""));
+
+            ITab metadataTab = new AbstractTab(new Model("Metadata"))
+            {
+
+                public Panel getPanel(String panelId)
+                {
+                    return new MetadataPanel(panelId, applicationModel);
+                }
+            };
+            tabs.put("metadata", metadataTab);
+
+            ITab detailsTab = new AbstractTab(new Model("Details"))
+            {
+
+                public Panel getPanel(String panelId)
+                {
+                    return new DetailsPanel(panelId, applicationModel);
+                }
+            };
+            tabs.put("details", detailsTab);
+
+            ITab userAttributesTab = new AbstractTab(new Model("User Attributes"))
+            {
+
+                public Panel getPanel(String panelId)
+                {
+                    return new UserAttributePanel(panelId, applicationModel);
+                }
+            };
+            tabs.put("userattributes", userAttributesTab);
+
+            TabbedPanel tabbedPanel = new TabbedPanel("tabs", Arrays.asList(tabs.values().toArray(new ITab[tabs.values().size()])));
+            if (get("tabs") == null)
+            {
+                tabbedPanel.setSelectedTab(0);
+            }
+            else if (get("tabs") instanceof TabbedPanel)
+            {
+                TabbedPanel current = (TabbedPanel) get("tabs");
+                remove(current);
+
+                if (current.getTabs() == tabbedPanel.getTabs())
+                {
+                    tabbedPanel.setSelectedTab(current.getSelectedTab());
+                }
+            }
+
+            add(tabbedPanel);
+        }
+    }
+
+    @Override
+    protected void onBeforeRender()
+    {
+        ApplicationBean applicationBean = (ApplicationBean) PortletMessaging.consume(getPortletRequest(), ApplicationsListApplication.PRM_TOPIC,
+                ApplicationsListApplication.SELECTED_APPLICATION_EVENT);
+
+        if (applicationBean != null)
+        {
+            this.applicationModel = new ApplicationModel(getServiceLocator(), applicationBean.getName());
+            this.title = getPortletName() + " - " + applicationBean.getName();
+            this.dirty = true;
+        }
+
+        if (dirty)
+        {
+            constructLayout();
+            dirty = false;
+        }
+
+        setTitle(title);
+
+        super.onBeforeRender();
+    }
+
+}

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsView.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationDetailsView.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationModel.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationModel.java?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationModel.java (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationModel.java Tue Apr 28 00:04:31 2009
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.portlets.prm.application;
+
+import org.apache.jetspeed.portlets.prm.ApplicationBean;
+import org.apache.wicket.model.LoadableDetachableModel;
+
+/**
+ * Provides a model for a single portlet application bean
+ * 
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id$
+ */
+class ApplicationModel extends LoadableDetachableModel<ApplicationBean>
+{
+    private static final long serialVersionUID = 1L;
+    private ApplicationBean pa;
+
+    /**
+     * @param c
+     */
+    public ApplicationModel(ApplicationBean pa)
+    {
+        this.pa = pa;
+    }
+
+    /**
+     * @see java.lang.Object#hashCode()
+     */
+    public int hashCode()
+    {
+        return pa.getName().hashCode();
+    }
+
+    /**
+     * used for dataview with ReuseIfModelsEqualStrategy item reuse strategy
+     * 
+     * @see org.apache.wicket.markup.repeater.ReuseIfModelsEqualStrategy
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    public boolean equals(final Object obj)
+    {
+        if (obj == this)
+        {
+            return true;
+        }
+        else if (obj == null)
+        {
+            return false;
+        }
+        else if (obj instanceof ApplicationModel)
+        {
+            ApplicationModel other = (ApplicationModel) obj;
+            return pa.getName().equals(other.getModelBean().getName());
+        }
+        return false;
+    }
+
+    public ApplicationBean getModelBean()
+    {
+        return this.pa;
+    }
+
+    /**
+     * @see org.apache.wicket.model.LoadableDetachableModel#load()
+     */
+    protected ApplicationBean load()
+    {
+        return pa;
+    }
+}
\ No newline at end of file

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationModel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/ApplicationModel.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/DetailsPanel.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/DetailsPanel.html?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/DetailsPanel.html (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/DetailsPanel.html Tue Apr 28 00:04:31 2009
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- 
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:wicket="http://wicket.sourceforge.net/" xml:lang="en" lang="en">
+<head></head>
+<body>
+	<wicket:panel>
+	<table style="border-collapse: collapse; width: 100%; margin-top: 8px; float: left;">
+		<thead>
+			<tr>
+				<th class="portlet-section-subheader">Name</th>
+				<th class="portlet-section-subheader">Value</th>
+			</tr>
+		</thead>
+		<tr wicket:id="data">
+			<td class="portlet-section-body"><span wicket:id="name"></span></td>
+			<td class="portlet-section-body"><span wicket:id="value"></span></td>
+		</tr>
+	</table>
+	</wicket:panel>
+</body>
+</html>
\ No newline at end of file

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/DetailsPanel.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/DetailsPanel.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/DetailsPanel.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/DetailsPanel.java?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/DetailsPanel.java (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/DetailsPanel.java Tue Apr 28 00:04:31 2009
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.portlets.prm.application;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+
+import org.apache.jetspeed.om.portlet.Description;
+import org.apache.jetspeed.om.portlet.JetspeedServiceReference;
+import org.apache.jetspeed.om.portlet.PortletApplication;
+import org.apache.jetspeed.portlets.prm.KeyVal;
+import org.apache.jetspeed.portlets.prm.model.ApplicationModel;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.markup.repeater.RefreshingView;
+import org.apache.wicket.markup.repeater.util.ModelIteratorAdapter;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+
+public class DetailsPanel extends Panel
+{
+    private transient List<KeyVal> detailList;
+
+    public DetailsPanel(String id, ApplicationModel model)
+    {
+        super(id, model);
+
+        detailList = new ArrayList<KeyVal>();
+        PortletApplication app = model.getObject();
+        detailList.add(new KeyVal("Name", app.getName()));
+        detailList.add(new KeyVal("Version", app.getVersion()));
+        detailList.add(new KeyVal("Description", getDescription(app)));
+        detailList.add(new KeyVal("Type", getType(app)));
+        detailList.add(new KeyVal("Services", new Object()
+        {
+
+            String toString(Iterator<JetspeedServiceReference> it)
+            {
+                StringBuffer buffer = new StringBuffer();
+                while (it.hasNext())
+                {
+                    buffer.append(it.next().getName() + "<br/>");
+                }
+                return buffer.toString();
+            }
+        }.toString(app.getJetspeedServices().iterator())));
+
+        final RefreshingView<KeyVal> dataRepeater = new RefreshingView<KeyVal>("data", new PropertyModel<List<KeyVal>>(this, "detailList"))
+        {
+
+            @Override
+            protected void populateItem(Item<KeyVal> item)
+            {
+                final KeyVal field = item.getModelObject();
+                item.add(new Label("name", field.getKey()));
+                item.add(new Label("value", field.getValue()).setEscapeModelStrings(false));
+            }
+
+            @Override
+            protected Iterator<IModel<KeyVal>> getItemModels()
+            {
+                List<KeyVal> list = (List<KeyVal>) getDefaultModelObject();
+                return new ModelIteratorAdapter<KeyVal>(list.iterator())
+                {
+
+                    @Override
+                    protected IModel<KeyVal> model(KeyVal object)
+                    {
+                        return new Model<KeyVal>(object);
+                    }
+                };
+            }
+        };
+
+        add(dataRepeater);
+    }
+
+    private String getDescription(PortletApplication app)
+    {
+        Description desc = app.getDescription(new Locale("en"));
+        if (desc == null) { return null; }
+        return desc.getDescription();
+    }
+
+    private String getType(PortletApplication pa)
+    {
+        int type = pa.getApplicationType();
+        if (type == PortletApplication.LOCAL)
+        {
+            return "local";
+        }
+        else if (type == PortletApplication.WEBAPP) { return "webapp"; }
+        return "unknown";
+    }
+}

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/DetailsPanel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/DetailsPanel.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/UserAttributePanel.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/UserAttributePanel.html?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/UserAttributePanel.html (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/UserAttributePanel.html Tue Apr 28 00:04:31 2009
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   
+<!-- 
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<html 
+	xmlns="http://www.w3.org/1999/xhtml" 
+	xmlns:wicket="http://wicket.sourceforge.net/" 
+	xml:lang="en" 
+	lang="en">
+<head></head>
+<body>
+	<wicket:extend>
+		<th class="portlet-section-subheader">Name</th>
+		<th class="portlet-section-subheader">Locale/Description</th>
+		<wicket:fragment wicket:id="itemFragment">
+			<td class="portlet-section-body"><input type="text" wicket:id="name"/></td>
+			<td class="portlet-section-body"><span wicket:id="localizationEditor"/></td>
+		</wicket:fragment>
+		<wicket:fragment wicket:id="newFragment">
+			<td style="border-top:1px dashed #000;"><input wicket:id="newName" style="margin-top:10px;" type="text"/></td>
+			<td style="border-top:1px dashed #000;"><input wicket:id="newLocale" style="margin-top:10px;" type="text"/><input wicket:id="newDescription" style="margin-top:10px;" type="text"/></td>
+		</wicket:fragment>
+	</wicket:extend>
+</body>
+</html>
\ No newline at end of file

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/UserAttributePanel.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/UserAttributePanel.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/UserAttributePanel.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/UserAttributePanel.java?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/UserAttributePanel.java (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/UserAttributePanel.java Tue Apr 28 00:04:31 2009
@@ -0,0 +1,210 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.portlets.prm.application;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.jetspeed.components.portletregistry.RegistryException;
+import org.apache.jetspeed.om.portlet.Description;
+import org.apache.jetspeed.om.portlet.PortletApplication;
+import org.apache.jetspeed.om.portlet.UserAttribute;
+import org.apache.jetspeed.portlets.prm.model.ApplicationModel;
+import org.apache.jetspeed.portlets.prm.model.DescriptionModel;
+import org.apache.jetspeed.portlets.wicket.component.editor.EditorTemplate;
+import org.apache.jetspeed.portlets.wicket.component.editor.LocalizedDescriptionEditor;
+import org.apache.wicket.markup.html.form.Button;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.markup.repeater.data.IDataProvider;
+import org.apache.wicket.markup.repeater.data.ListDataProvider;
+import org.apache.wicket.markup.repeater.util.ModelIteratorAdapter;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+
+public class UserAttributePanel extends EditorTemplate<UserAttribute>
+{
+    private String newName, newLocale, newDescription;
+
+    public UserAttributePanel(String id, ApplicationModel model)
+    {
+        super(id, model);
+    }
+
+    @Override
+    public void buildNew(Fragment fragment)
+    {
+        fragment.add(new TextField<String>("newName", new PropertyModel<String>(this, "newName")));
+        fragment.add(new TextField<String>("newLocale", new PropertyModel<String>(this, "newLocale")));
+        fragment.add(new TextField<String>("newDescription", new PropertyModel<String>(this, "newDescription")));
+    }
+
+    @Override
+    public int getColumnCount()
+    {
+        return 3;
+    }
+
+    @Override
+    public void buildItems(Fragment fragment, final UserAttribute model)
+    {
+        fragment.add(new TextField<String>("name", new PropertyModel<String>(model, "name")));
+        fragment.add(new LocalizedDescriptionEditor("localizationEditor", getDefaultModel())
+        {
+
+            @Override
+            public IDataProvider<DescriptionModel> getDataProvider()
+            {
+                PortletApplication portletApplication = (PortletApplication) getDefaultModelObject();
+                final UserAttribute attribute = portletApplication.getUserAttribute(model.getName());
+
+                List<DescriptionModel> list = new ArrayList<DescriptionModel>();
+
+                Iterator<Description> desc = attribute.getDescriptions().iterator();
+                while (desc.hasNext())
+                {
+                    list.add(new DescriptionModel(attribute, desc.next()));
+                }
+
+                return new ListDataProvider<DescriptionModel>(list);
+            }
+
+            @Override
+            protected Button saveButton(String componentId)
+            {
+                final ApplicationModel applicationModel = (ApplicationModel) getDefaultModel();
+                return new Button(componentId)
+                {
+
+                    @Override
+                    public void onSubmit()
+                    {
+                        if (newLocale != null && newDescription != null)
+                        {
+                            model.addDescription(newLocale).setDescription(newDescription);
+                        }
+
+                        try
+                        {
+                            applicationModel.getServiceLocator().getPortletRegistry().updatePortletApplication(applicationModel.getObject());
+                        }
+                        catch (RegistryException e)
+                        {
+                            // TODO Auto-generated catch block
+                            e.printStackTrace();
+                        }
+                    }
+                };
+            }
+
+            @Override
+            public void delete(IModel<DescriptionModel>[] fields)
+            {
+                for (IModel<DescriptionModel> field : fields)
+                {
+                    field.getObject().remove();
+                }
+            }
+        });
+
+    }
+
+    @Override
+    public void delete(IModel<UserAttribute>[] fields)
+    {
+        ApplicationModel applicationModel = (ApplicationModel) getDefaultModel();
+
+        Iterator<UserAttribute> it = applicationModel.getObject().getUserAttributes().iterator();
+        while (it.hasNext())
+        {
+            String id = it.next().getName();
+            for (IModel<UserAttribute> field : fields)
+            {
+                if (field.getObject().getName().equals(id))
+                {
+                    it.remove();
+                    break;
+                }
+            }
+        }
+
+        try
+        {
+            applicationModel.getServiceLocator().getPortletRegistry().updatePortletApplication(applicationModel.getObject());
+        }
+        catch (RegistryException e)
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+
+    }
+
+    @Override
+    public Iterator<IModel<UserAttribute>> getItemModels()
+    {
+        PortletApplication def = (PortletApplication) getDefaultModelObject();
+        return new ModelIteratorAdapter<UserAttribute>(def.getUserAttributes().iterator())
+        {
+
+            @Override
+            protected IModel<UserAttribute> model(UserAttribute object)
+            {
+                return new Model<UserAttribute>(object);
+            }
+
+        };
+    }
+
+    @Override
+    public IModel<UserAttribute> getNewRowModel(UserAttribute object)
+    {
+        return new Model<UserAttribute>(object);
+    }
+
+    @Override
+    protected Button saveButton(String componentId)
+    {
+        final ApplicationModel applicationModel = (ApplicationModel) getDefaultModel();
+        return new Button(componentId)
+        {
+
+            @Override
+            public void onSubmit()
+            {
+                if (newName != null && newDescription != null && newLocale != null)
+                {
+                    UserAttribute attribute = applicationModel.getObject().addUserAttribute(newName);
+                    attribute.addDescription(newLocale).setDescription(newDescription);
+                }
+
+                try
+                {
+                    applicationModel.getServiceLocator().getPortletRegistry().updatePortletApplication(applicationModel.getObject());
+                }
+                catch (RegistryException e)
+                {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
+                }
+            }
+        };
+    }
+
+}

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/UserAttributePanel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/application/UserAttributePanel.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/ApplicationModel.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/ApplicationModel.java?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/ApplicationModel.java (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/ApplicationModel.java Tue Apr 28 00:04:31 2009
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.portlets.prm.model;
+
+import org.apache.jetspeed.om.portlet.PortletApplication;
+import org.apache.jetspeed.portlets.JetspeedServiceLocator;
+import org.apache.wicket.model.LoadableDetachableModel;
+
+public class ApplicationModel extends LoadableDetachableModel<PortletApplication>
+{
+    private static final long serialVersionUID = 1L;
+    private JetspeedServiceLocator locator;
+    private String applicationName;
+
+    public ApplicationModel(JetspeedServiceLocator locator, String applicationName)
+    {
+        this.locator = locator;
+        this.applicationName = applicationName;
+    }
+
+    @Override
+    protected PortletApplication load()
+    {
+        return locator.getPortletRegistry().getPortletApplication(applicationName);
+    }
+
+    public PortletModel getPorletDefinitionModel(String name)
+    {
+        return new PortletModel(this, name);
+    }
+
+    public JetspeedServiceLocator getServiceLocator()
+    {
+        return locator;
+    }
+}

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/ApplicationModel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/ApplicationModel.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/DescriptionModel.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/DescriptionModel.java?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/DescriptionModel.java (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/DescriptionModel.java Tue Apr 28 00:04:31 2009
@@ -0,0 +1,246 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.portlets.prm.model;
+
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.Locale;
+
+import org.apache.jetspeed.om.portlet.Description;
+import org.apache.jetspeed.om.portlet.InitParam;
+import org.apache.jetspeed.om.portlet.PortletApplication;
+import org.apache.jetspeed.om.portlet.PortletDefinition;
+import org.apache.jetspeed.om.portlet.UserAttribute;
+import org.apache.wicket.model.LoadableDetachableModel;
+
+public class DescriptionModel extends LoadableDetachableModel<Description>
+{
+    private String locale;
+    private FieldLocator locator;
+
+    private abstract class FieldLocator<T> implements Serializable
+    {
+
+        private T object;
+
+        public FieldLocator(T object)
+        {
+            this.object = object;
+        }
+
+        public T getObject()
+        {
+            return object;
+        }
+
+        public abstract Description locate(String locale);
+
+        public abstract Description newInstance(String locale);
+
+        public abstract void remove(String locale);
+    }
+
+    private DescriptionModel(Description field)
+    {
+        this.locale = field.getLocale().getLanguage();
+    }
+
+    public DescriptionModel(final InitParam param, Description field)
+    {
+        this(field);
+
+        setFieldLocator(new FieldLocator<InitParam>(param)
+        {
+
+            @Override
+            public Description locate(String locale)
+            {
+                return getObject().getDescription(new Locale(locale));
+            }
+
+            @Override
+            public Description newInstance(String locale)
+            {
+                return getObject().addDescription(locale);
+            }
+
+            @Override
+            public void remove(String locale)
+            {
+                Iterator<Description> it = getObject().getDescriptions().iterator();
+                while (it.hasNext())
+                {
+                    if (it.next().getLang().equals(locale))
+                    {
+                        it.remove();
+                        break;
+                    }
+                }
+            }
+
+        });
+    }
+
+    public DescriptionModel(final PortletApplication application, Description field)
+    {
+        this(field);
+
+        setFieldLocator(new FieldLocator<PortletApplication>(application)
+        {
+
+            @Override
+            public Description locate(String locale)
+            {
+                return getObject().getDescription(new Locale(locale));
+            }
+
+            @Override
+            public Description newInstance(String locale)
+            {
+                return getObject().addDescription(locale);
+            }
+
+            @Override
+            public void remove(String locale)
+            {
+                Iterator<Description> it = getObject().getDescriptions().iterator();
+                while (it.hasNext())
+                {
+                    if (it.next().getLang().equals(locale))
+                    {
+                        it.remove();
+                        break;
+                    }
+                }
+            }
+
+        });
+    }
+
+    public DescriptionModel(final UserAttribute userattribute, Description field)
+    {
+        this(field);
+
+        setFieldLocator(new FieldLocator<UserAttribute>(userattribute)
+        {
+
+            @Override
+            public Description locate(String locale)
+            {
+                return getObject().getDescription(new Locale(locale));
+            }
+
+            @Override
+            public Description newInstance(String locale)
+            {
+                return getObject().addDescription(locale);
+            }
+
+            @Override
+            public void remove(String locale)
+            {
+                Iterator<Description> it = getObject().getDescriptions().iterator();
+                while (it.hasNext())
+                {
+                    if (it.next().getLang().equals(locale))
+                    {
+                        it.remove();
+                        break;
+                    }
+                }
+            }
+
+        });
+    }
+
+    public DescriptionModel(final PortletDefinition portlet, Description field)
+    {
+        this(field);
+
+        setFieldLocator(new FieldLocator<PortletDefinition>(portlet)
+        {
+
+            @Override
+            public Description locate(String locale)
+            {
+                return getObject().getDescription(new Locale(locale));
+            }
+
+            @Override
+            public Description newInstance(String locale)
+            {
+                return getObject().addDescription(locale);
+            }
+
+            @Override
+            public void remove(String locale)
+            {
+                Iterator<Description> it = getObject().getDescriptions().iterator();
+                while (it.hasNext())
+                {
+                    if (it.next().getLang().equals(locale))
+                    {
+                        it.remove();
+                        break;
+                    }
+                }
+            }
+
+        });
+    }
+
+    private void setFieldLocator(FieldLocator locator)
+    {
+        this.locator = locator;
+    }
+
+    @Override
+    protected Description load()
+    {
+        return this.locator.locate(locale);
+    }
+
+    public String getLang()
+    {
+        return getObject().getLang();
+    }
+
+    public void setLang(String lang)
+    {
+        String desc = getDescription();
+
+        locator.newInstance(lang).setDescription(desc);
+        remove();
+
+        this.locale = lang;
+    }
+
+    public void remove()
+    {
+        locator.remove(locale);
+    }
+
+    public String getDescription()
+    {
+        return getObject().getDescription();
+    }
+
+    public void setDescription(String description)
+    {
+        getObject().setDescription(description);
+    }
+}

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/DescriptionModel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/DescriptionModel.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/LocalizedFieldModel.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/LocalizedFieldModel.java?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/LocalizedFieldModel.java (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/LocalizedFieldModel.java Tue Apr 28 00:04:31 2009
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.portlets.prm.model;
+
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.Locale;
+
+import org.apache.jetspeed.om.portlet.LocalizedField;
+import org.apache.wicket.model.LoadableDetachableModel;
+
+public class LocalizedFieldModel extends LoadableDetachableModel<LocalizedField>
+{
+    private static final long serialVersionUID = 1L;
+    private String locale;
+    private String name;
+    private LocalizedFieldLocator locator;
+
+    private abstract class LocalizedFieldLocator implements Serializable
+    {
+
+        public abstract LocalizedField locate(String name, String locale);
+    }
+
+    private LocalizedFieldModel(LocalizedField field)
+    {
+        this.name = field.getName();
+        this.locale = field.getLocale().getLanguage();
+    }
+
+    private void setLocalizedFieldLocator(LocalizedFieldLocator locator)
+    {
+        this.locator = locator;
+    }
+
+    public LocalizedFieldModel(final PortletModel portletModel, LocalizedField field)
+    {
+        this(field);
+
+        setLocalizedFieldLocator(new LocalizedFieldLocator()
+        {
+
+            @Override
+            public LocalizedField locate(String name, String locale)
+            {
+                Iterator<LocalizedField> it = portletModel.getObject().getMetadata().getFields(name).iterator();
+                while (it.hasNext())
+                {
+                    LocalizedField lf = it.next();
+                    if (lf.getLocale().getLanguage().equals(locale)) { return lf; }
+                }
+                return null;
+            }
+        });
+    }
+
+    public LocalizedFieldModel(final ApplicationModel applicationModel, LocalizedField field)
+    {
+        this(field);
+
+        setLocalizedFieldLocator(new LocalizedFieldLocator()
+        {
+
+            @Override
+            public LocalizedField locate(String name, String locale)
+            {
+                Iterator<LocalizedField> it = applicationModel.getObject().getMetadata().getFields(name).iterator();
+                while (it.hasNext())
+                {
+                    LocalizedField lf = it.next();
+                    if (lf.getLocale().getLanguage().equals(locale)) { return lf; }
+                }
+                return null;
+            }
+        });
+    }
+
+    public String getLocale()
+    {
+        return getObject().getLocale().getLanguage();
+    }
+
+    public String getName()
+    {
+        return getObject().getName();
+    }
+
+    public String getValue()
+    {
+        return getObject().getValue();
+    }
+
+    public void setLocale(String locale)
+    {
+        getObject().setLocale(new Locale(locale));
+        this.locale = locale;
+    }
+
+    public void setName(String name)
+    {
+        getObject().setName(name);
+        this.name = name;
+    }
+
+    public void setValue(String value)
+    {
+        getObject().setValue(value);
+    }
+
+    @Override
+    protected LocalizedField load()
+    {
+        return locator.locate(name, locale);
+    }
+}
\ No newline at end of file

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/LocalizedFieldModel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/LocalizedFieldModel.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/PortletModel.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/PortletModel.java?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/PortletModel.java (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/PortletModel.java Tue Apr 28 00:04:31 2009
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.portlets.prm.model;
+
+import org.apache.jetspeed.om.portlet.PortletDefinition;
+import org.apache.wicket.model.LoadableDetachableModel;
+
+public class PortletModel extends LoadableDetachableModel<PortletDefinition>
+{
+    private ApplicationModel applicationModel;
+    private String portletName;
+    
+    public PortletModel(ApplicationModel applicationModel, String portletName)
+    {
+        this.applicationModel = applicationModel;
+        this.portletName = portletName;
+    }
+
+    @Override
+    protected PortletDefinition load()
+    {
+        return applicationModel.getObject().getPortlet(portletName);
+    }
+    
+    public ApplicationModel getParent()
+    {
+        return applicationModel;
+    }
+}

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/PortletModel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/model/PortletModel.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/DetailsPanel.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/DetailsPanel.html?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/DetailsPanel.html (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/DetailsPanel.html Tue Apr 28 00:04:31 2009
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- 
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:wicket="http://wicket.sourceforge.net/" xml:lang="en" lang="en">
+<head></head>
+<body>
+	<wicket:panel>
+	<table style="border-collapse: collapse; width: 100%; margin-top: 8px; float: left;">
+		<thead>
+			<tr>
+				<th class="portlet-section-subheader">Name</th>
+				<th class="portlet-section-subheader">Value</th>
+			</tr>
+		</thead>
+		<tr>
+			<td class="portlet-section-body">Expiration Cache</td>
+			<td class="portlet-section-body"><span wicket:id="expirationCache"></span></td>
+		</tr>
+		<tr>
+			<td class="portlet-section-body">Unique Name</td>
+			<td class="portlet-section-body"><span wicket:id="uniqueName"></span></td>
+		</tr>
+		<tr>
+			<td class="portlet-section-body">Class Name</td>
+			<td class="portlet-section-body"><span wicket:id="className"></span></td>
+		</tr>
+	</table>
+	</wicket:panel>
+</body>
+</html>
\ No newline at end of file

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/DetailsPanel.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/DetailsPanel.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/DetailsPanel.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/DetailsPanel.java?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/DetailsPanel.java (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/DetailsPanel.java Tue Apr 28 00:04:31 2009
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.portlets.prm.portlet;
+
+import org.apache.jetspeed.om.portlet.PortletDefinition;
+import org.apache.jetspeed.portlets.prm.model.PortletModel;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.panel.Panel;
+
+
+public class DetailsPanel extends Panel
+{  
+    public DetailsPanel(String id, PortletModel model)
+    {
+        super(id, model);
+        
+        PortletDefinition definition = model.getObject();
+        add(new Label("expirationCache", Integer.toString(definition.getExpirationCache())));
+        add(new Label("uniqueName", definition.getUniqueName()));
+        add(new Label("className", definition.getPortletClass()));
+    }
+
+}

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/DetailsPanel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/DetailsPanel.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/InitParameterPanel.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/InitParameterPanel.html?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/InitParameterPanel.html (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/InitParameterPanel.html Tue Apr 28 00:04:31 2009
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   
+<!-- 
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<html 
+	xmlns="http://www.w3.org/1999/xhtml" 
+	xmlns:wicket="http://wicket.sourceforge.net/" 
+	xml:lang="en" 
+	lang="en">
+<head></head>
+<body>
+<wicket:panel>
+	<form action="post" wicket:id="form">
+	<table style="border-collapse: collapse; width: 100%; margin-top: 8px; float: left;">
+		<thead>
+			<tr>
+				<th class="portlet-section-subheader"></th>
+				<th class="portlet-section-subheader">Name</th>
+				<th class="portlet-section-subheader">Value</th>
+				<th class="portlet-section-subheader">Locale/Description</th>
+			</tr>
+		</thead>
+		<tbody>
+			<tr wicket:id="data">
+				<td class="portlet-section-body"><input type="checkbox" wicket:id="select"/></td>
+				<td class="portlet-section-body"><input type="text" wicket:id="name"/></td>
+				<td class="portlet-section-body"><input type="text" wicket:id="locale"/></td>
+				<td class="portlet-section-body"><input type="text" wicket:id="value"/></td>
+			</tr>
+		</tbody>
+		<tfoot>
+			<tr>
+				<td style="border-top:1px dashed #000;"><img wicket:id="add" style="margin-top:10px;"/></td>
+				<td style="border-top:1px dashed #000;"><input wicket:id="nName" style="margin-top:10px;" type="text"/></td>
+				<td style="border-top:1px dashed #000;"><input wicket:id="nValue" style="margin-top:10px;" type="text"/></td>
+			</tr>
+			<tr>
+				<td class="portlet-section-footer">
+					<input wicket:id="save" type="submit" value="Save"/> 
+					<input wicket:id="delete" type="submit" value="Delete"/>
+				</td>
+			</tr>
+		</tfoot>
+	</table>
+	</form>
+</wicket:panel>
+</body>
+</html>
\ No newline at end of file

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/InitParameterPanel.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/InitParameterPanel.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/ParameterPanel.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/ParameterPanel.html?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/ParameterPanel.html (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/ParameterPanel.html Tue Apr 28 00:04:31 2009
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   
+<!-- 
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<html 
+	xmlns="http://www.w3.org/1999/xhtml" 
+	xmlns:wicket="http://wicket.sourceforge.net/" 
+	xml:lang="en" 
+	lang="en">
+<head></head>
+<body>
+	<wicket:extend>
+		<th class="portlet-section-subheader">Name</th>
+		<th class="portlet-section-subheader">Value</th>
+		<th class="portlet-section-subheader">Locale/Description</th>
+		<wicket:fragment wicket:id="itemFragment">
+			<td class="portlet-section-body"><input type="text" wicket:id="name"/></td>
+			<td class="portlet-section-body"><input type="text" wicket:id="value"/></td>
+			<td class="portlet-section-body"><span wicket:id="localizationEditor"/></td>
+		</wicket:fragment>
+		<wicket:fragment wicket:id="newFragment">
+			<td style="border-top:1px dashed #000;"><input wicket:id="newName" style="margin-top:10px;" type="text"/></td>
+			<td style="border-top:1px dashed #000;"><input wicket:id="newValue" style="margin-top:10px;" type="text"/></td>
+			<td style="border-top:1px dashed #000;"><input wicket:id="newLocale" style="margin-top:10px;" type="text"/><input wicket:id="newDescription" style="margin-top:10px;" type="text"/></td>
+		</wicket:fragment>
+	</wicket:extend>
+</body>
+</html>
\ No newline at end of file

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/ParameterPanel.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/ParameterPanel.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/ParameterPanel.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/ParameterPanel.java?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/ParameterPanel.java (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/ParameterPanel.java Tue Apr 28 00:04:31 2009
@@ -0,0 +1,220 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.portlets.prm.portlet;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.jetspeed.components.portletregistry.RegistryException;
+import org.apache.jetspeed.om.portlet.Description;
+import org.apache.jetspeed.om.portlet.InitParam;
+import org.apache.jetspeed.om.portlet.PortletDefinition;
+import org.apache.jetspeed.portlets.prm.model.DescriptionModel;
+import org.apache.jetspeed.portlets.prm.model.PortletModel;
+import org.apache.jetspeed.portlets.wicket.component.editor.EditorTemplate;
+import org.apache.jetspeed.portlets.wicket.component.editor.LocalizedDescriptionEditor;
+import org.apache.wicket.markup.html.form.Button;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.markup.repeater.data.IDataProvider;
+import org.apache.wicket.markup.repeater.data.ListDataProvider;
+import org.apache.wicket.markup.repeater.util.ModelIteratorAdapter;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+
+public class ParameterPanel extends EditorTemplate<InitParam>
+{
+    private String newName, newLocale, newDescription, newValue;
+
+    public ParameterPanel(String id, PortletModel model)
+    {
+        super(id, model);
+    }
+
+    @Override
+    public void buildNew(Fragment fragment)
+    {
+        fragment.add(new TextField<String>("newName", new PropertyModel<String>(this, "newName")));
+        fragment.add(new TextField<String>("newValue", new PropertyModel<String>(this, "newValue")));
+        fragment.add(new TextField<String>("newLocale", new PropertyModel<String>(this, "newLocale")));
+        fragment.add(new TextField<String>("newDescription", new PropertyModel<String>(this, "newDescription")));
+    }
+
+    @Override
+    public int getColumnCount()
+    {
+        return 3;
+    }
+
+    @Override
+    public void buildItems(Fragment fragment, final InitParam model)
+    {
+        fragment.add(new TextField<String>("name", new PropertyModel<String>(model, "name")));
+        fragment.add(new TextField<String>("value", new PropertyModel<String>(model, "value")));
+
+        fragment.add(new LocalizedDescriptionEditor("localizationEditor", getDefaultModel())
+        {
+
+            @Override
+            public IDataProvider<DescriptionModel> getDataProvider()
+            {
+                PortletDefinition portletModel = (PortletDefinition) getDefaultModelObject();
+                final InitParam param = portletModel.getInitParam(model.getParamName());
+
+                List<DescriptionModel> list = new ArrayList<DescriptionModel>();
+
+                Iterator<Description> desc = param.getDescriptions().iterator();
+                while (desc.hasNext())
+                {
+                    list.add(new DescriptionModel(param, desc.next()));
+                }
+
+                return new ListDataProvider<DescriptionModel>(list);
+            }
+
+            @Override
+            protected Button saveButton(String componentId)
+            {
+                final PortletModel portlet = (PortletModel) getDefaultModel();
+                return new Button(componentId)
+                {
+
+                    @Override
+                    public void onSubmit()
+                    {
+                        if (newLocale != null && newDescription != null)
+                        {
+                            model.addDescription(newLocale).setDescription(newDescription);
+                        }
+
+                        try
+                        {
+                            portlet.getParent().getServiceLocator().getPortletRegistry().savePortletDefinition(portlet.getObject());
+                        }
+                        catch (RegistryException e)
+                        {
+                            // TODO Auto-generated catch block
+                            e.printStackTrace();
+                        }
+                    }
+                };
+            }
+
+            @Override
+            public void delete(IModel<DescriptionModel>[] fields)
+            {
+                for (IModel<DescriptionModel> field : fields)
+                {
+                    field.getObject().remove();
+                }
+            }
+        });
+
+    }
+
+    @Override
+    public void delete(IModel<InitParam>[] fields)
+    {
+        PortletModel portletModel = (PortletModel) getDefaultModel();
+
+        Iterator<InitParam> it = portletModel.getObject().getInitParams().iterator();
+        while (it.hasNext())
+        {
+            String id = it.next().getParamName();
+            for (IModel<InitParam> field : fields)
+            {
+                if (field.getObject().getParamName().equals(id))
+                {
+                    it.remove();
+                    break;
+                }
+            }
+        }
+
+        try
+        {
+            portletModel.getParent().getServiceLocator().getPortletRegistry().savePortletDefinition(portletModel.getObject());
+        }
+        catch (RegistryException e)
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+
+    }
+
+    @Override
+    public Iterator<IModel<InitParam>> getItemModels()
+    {
+        PortletDefinition def = (PortletDefinition) getDefaultModelObject();
+        return new ModelIteratorAdapter<InitParam>(def.getInitParams().iterator())
+        {
+
+            @Override
+            protected IModel<InitParam> model(InitParam object)
+            {
+                return new Model<InitParam>(object);
+            }
+
+        };
+    }
+
+    @Override
+    public IModel<InitParam> getNewRowModel(InitParam object)
+    {
+        return new Model<InitParam>(object);
+    }
+
+    @Override
+    protected Button saveButton(String componentId)
+    {
+        final PortletModel portletModel = (PortletModel) getDefaultModel();
+        return new Button(componentId)
+        {
+
+            @Override
+            public void onSubmit()
+            {
+
+                if (newName != null && newValue != null)
+                {
+                    InitParam param = portletModel.getObject().addInitParam(newName);
+                    param.setParamValue(newValue);
+
+                    if (newLocale != null && newDescription != null)
+                    {
+                        Description desc = param.addDescription(newLocale);
+                        desc.setDescription(newDescription);
+                    }
+                }
+
+                try
+                {
+                    portletModel.getParent().getServiceLocator().getPortletRegistry().savePortletDefinition(portletModel.getObject());
+                }
+                catch (RegistryException e)
+                {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
+                }
+            }
+        };
+    }
+
+}

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/ParameterPanel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/ParameterPanel.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/PortletDetailsApplication.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/PortletDetailsApplication.java?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/PortletDetailsApplication.java (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/PortletDetailsApplication.java Tue Apr 28 00:04:31 2009
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.portlets.prm.portlet;
+
+import org.apache.jetspeed.portlets.wicket.AbstractAdminWebApplication;
+
+public class PortletDetailsApplication extends AbstractAdminWebApplication
+{
+    public static final String SELECTED_PORTLET_EVENT = "org.apache.jetspeed.portlets.prm.portlets.details.SelectedPortletEvent";
+
+    @Override
+    public Class<PortletDetailsView> getHomePage()
+    {
+        return PortletDetailsView.class;
+    }
+
+    protected void init()
+    {
+        // mountBookmarkablePage("/edit", ApplicationsListEdit.class);
+    }
+
+}

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/PortletDetailsApplication.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/PortletDetailsApplication.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/PortletDetailsView.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/PortletDetailsView.html?rev=769206&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/PortletDetailsView.html (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/PortletDetailsView.html Tue Apr 28 00:04:31 2009
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   
+<!-- 
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<html 
+	xmlns="http://www.w3.org/1999/xhtml" 
+	xmlns:wicket="http://wicket.sourceforge.net/" 
+	xml:lang="en" 
+	lang="en">
+<head>
+<style type="text/css">
+</style>
+</head>
+<body>
+
+<p wicket:id="status"></p>
+
+<div wicket:id="tabs" class="tabpanel">[tabs]</div>
+
+</body>
+</html>
\ No newline at end of file

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/PortletDetailsView.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/portlet/PortletDetailsView.html
------------------------------------------------------------------------------
    svn:keywords = Id



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