You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by at...@apache.org on 2007/09/15 04:31:14 UTC
svn commit: r575856 - in
/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples:
./ src/main/java/org/apache/wicket/examples/
src/main/java/org/apache/wicket/examples/portlet/
src/main/java/org/apache/wicket/examples/portlet/menu/ ...
Author: ate
Date: Fri Sep 14 19:31:11 2007
New Revision: 575856
URL: http://svn.apache.org/viewvc?rev=575856&view=rev
Log:
WICKET-657: New Wicket Portlet support: adapting wicket-examples to use the new portlet support so they can be run as portlets
- adding portlet-support for the 1.3.0-beta3 based branch
- adding a new, portlet only, example: WicketExamplesMenuApplication/Portlet capable of rendering all other examples in one Portlet Window
Added:
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/EditPage.html (with props)
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/EditPage.java (with props)
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/ExampleApplication.java (with props)
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/HeaderPage.html (with props)
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/HeaderPage.java (with props)
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/MenuPage.html (with props)
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/MenuPage.java (with props)
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/WicketExamplesMenuApplication.java (with props)
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/WicketExamplesMenuPortlet.java (with props)
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/portlet.xml (with props)
Modified:
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/pom.xml
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExampleHeader.html
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExampleHeader.java
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/web.xml
Modified: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/pom.xml
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/pom.xml?rev=575856&r1=575855&r2=575856&view=diff
==============================================================================
--- wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/pom.xml (original)
+++ wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/pom.xml Fri Sep 14 19:31:11 2007
@@ -104,6 +104,11 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
+ <dependency>
+ <groupId>javax.portlet</groupId>
+ <artifactId>portlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
Modified: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExampleHeader.html
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExampleHeader.html?rev=575856&r1=575855&r2=575856&view=diff
==============================================================================
--- wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExampleHeader.html (original)
+++ wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExampleHeader.html Fri Sep 14 19:31:11 2007
@@ -1,12 +1,13 @@
<html xmlns:wicket>
<body>
<wicket:panel>
- <h1><span wicket:id="inspector"/><a href="index.html" style="color: #E9601A" target="_top">Wicket Examples</a></h1>
- <div id="titleblock" style="font-size:larger;height:1.5em;vertical-align:center;">
+ <h1 wicket:id="hideInPortlet"><a href="index.html" style="color: #E9601A" target="_top">Wicket Examples</a></h1>
+ <span wicket:id="inspector"/>
+ <div id="titleblock" style="font-size:larger;height:1.5em;vertical-align:center;">
<div style="float:left;"><span wicket:id="exampleTitle">Example Title Goes Here</span></div>
- <div style="float:right;padding-right:10px"><a href="#" wicket:id="sources">Source code</a></div>
+ <div style="float:right;padding-right:10px"><a href="#" wicket:id="sources">Source code</a></div>
</div>
<br/>
</wicket:panel>
</body>
-</html>
+</html>
\ No newline at end of file
Modified: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExampleHeader.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExampleHeader.java?rev=575856&r1=575855&r2=575856&view=diff
==============================================================================
--- wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExampleHeader.java (original)
+++ wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/WicketExampleHeader.java Fri Sep 14 19:31:11 2007
@@ -17,8 +17,10 @@
package org.apache.wicket.examples;
import org.apache.wicket.PageMap;
+import org.apache.wicket.RequestContext;
import org.apache.wicket.examples.debug.InspectorBug;
import org.apache.wicket.examples.source.SourcesPage;
+import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.Link;
@@ -46,6 +48,17 @@
public WicketExampleHeader(String id, String exampleTitle, WebPage page)
{
super(id);
+ add(new WebMarkupContainer("hideInPortlet")
+ {
+ /**
+ * @see org.apache.wicket.Component#isVisible()
+ */
+ @Override
+ public boolean isVisible()
+ {
+ return !RequestContext.get().isPortletRequest();
+ }
+ });
add(new InspectorBug("inspector", page));
add(new Label("exampleTitle", exampleTitle));
Link link = new Link("sources")
Added: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/EditPage.html
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/EditPage.html?rev=575856&view=auto
==============================================================================
--- wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/EditPage.html (added)
+++ wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/EditPage.html Fri Sep 14 19:31:11 2007
@@ -0,0 +1,15 @@
+<html xmlns:wicket="http://wicket.apache.org/">
+ <head>
+ <link rel="stylesheet" type="text/css" href="style.css"/>
+ </head>
+ <body>
+ <form wicket:id="form">
+ <p>
+ Select the default Wicket Example to display: <select wicket:id="examples"/>
+ </p>
+ <p>
+ <input type="submit" wicket:id="setButton" value="set"/>
+ </p>
+ </form>
+ </body>
+</html>
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/EditPage.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/EditPage.html
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/EditPage.html
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/EditPage.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/EditPage.java?rev=575856&view=auto
==============================================================================
--- wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/EditPage.java (added)
+++ wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/EditPage.java Fri Sep 14 19:31:11 2007
@@ -0,0 +1,110 @@
+/*
+ * 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.wicket.examples.portlet.menu;
+
+import java.util.List;
+
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletMode;
+import javax.portlet.PortletPreferences;
+
+import org.apache.wicket.RequestContext;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.form.Button;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.protocol.http.portlet.PortletRequestContext;
+
+/**
+ * @author Ate Douma
+ */
+public class EditPage extends WebPage
+{
+ private static final IChoiceRenderer exampleChoiceRenderer = new IChoiceRenderer()
+ {
+ /**
+ * @see org.apache.wicket.markup.html.form.IChoiceRenderer#getDisplayValue(java.lang.Object)
+ */
+ public Object getDisplayValue(Object object)
+ {
+ return ((ExampleApplication)object).getDisplayName();
+ }
+
+ /**
+ * @see org.apache.wicket.markup.html.form.IChoiceRenderer#getIdValue(java.lang.Object, int)
+ */
+ public String getIdValue(Object object, int index)
+ {
+ return Integer.toString(index);
+ }
+ };
+
+ private DropDownChoice ddc;
+
+ public EditPage()
+ {
+ Form form = new Form("form")
+ {
+ /**
+ * @see org.apache.wicket.markup.html.form.Form#onSubmit()
+ */
+ @Override
+ protected void onSubmit()
+ {
+ ExampleApplication selected = (ExampleApplication)ddc.getModelObject();
+ PortletRequestContext prc = (PortletRequestContext)RequestContext.get();
+ PortletPreferences prefs = prc.getPortletRequest().getPreferences();
+ prc.getPortletRequest().getPortletSession().setAttribute(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_ATTR, selected);
+ try
+ {
+ ((ActionResponse)prc.getPortletResponse()).setPortletMode(PortletMode.VIEW);
+ prefs.setValue(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_PREF,selected.getFilterPath());
+ prefs.store();
+ }
+ catch (Exception pe)
+ {
+ throw new RuntimeException(pe);
+ }
+ }
+ };
+ List examples = WicketExamplesMenuApplication.getExamples();
+ ddc = new DropDownChoice("examples", examples, exampleChoiceRenderer);
+ ddc.setNullValid(false);
+ PortletRequestContext prc = (PortletRequestContext)RequestContext.get();
+ String eaFilterPath = prc.getPortletRequest().getPreferences().getValue(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_PREF, null);
+ Model selected = new Model((ExampleApplication)examples.get(0));
+ if (eaFilterPath != null)
+ {
+ for (int i = 0, size = examples.size(); i < size; i++)
+ {
+ if (((ExampleApplication)examples.get(i)).getFilterPath().equals(eaFilterPath))
+ {
+ selected.setObject((ExampleApplication)examples.get(i));
+ break;
+ }
+ }
+ }
+ ddc.setModel(selected);
+ form.add(ddc);
+ form.add(new Button("setButton"));
+ add(form);
+ }
+
+}
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/EditPage.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/EditPage.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/EditPage.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/ExampleApplication.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/ExampleApplication.java?rev=575856&view=auto
==============================================================================
--- wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/ExampleApplication.java (added)
+++ wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/ExampleApplication.java Fri Sep 14 19:31:11 2007
@@ -0,0 +1,89 @@
+/*
+ * 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.wicket.examples.portlet.menu;
+
+import java.io.Serializable;
+import java.util.Map;
+
+/**
+ * @author Ate Douma
+ */
+public class ExampleApplication implements Serializable
+{
+ private final String displayName;
+ private final String filterPath;
+ private final String filterQuery;
+ private final Map initParameters;
+ private final String description;
+
+ public ExampleApplication(String displayName, String filterPath, String filterQuery, Map initParameters, String description)
+ {
+ this.displayName = displayName;
+ this.filterPath = filterPath;
+ this.filterQuery = filterQuery;
+ this.initParameters = initParameters;
+ this.description = description;
+ }
+
+ /**
+ * Gets displayName.
+ * @return displayName
+ */
+ public String getDisplayName()
+ {
+ return displayName;
+ }
+
+ /**
+ * Gets description.
+ * @return description
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ /**
+ * Gets filterPath.
+ * @return filterPath
+ */
+ public String getFilterPath()
+ {
+ return filterPath;
+ }
+
+ /**
+ * Gets filterQuery.
+ * @return filterQuery
+ */
+ public String getFilterQuery()
+ {
+ return filterQuery;
+ }
+
+ /**
+ * Gets initParameter.
+ * @param name initParameter name
+ * @return initParameter
+ */
+ public String getInitParameter(String name)
+ {
+ return (String)initParameters.get(name);
+ }
+
+
+}
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/ExampleApplication.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/ExampleApplication.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/ExampleApplication.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/HeaderPage.html
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/HeaderPage.html?rev=575856&view=auto
==============================================================================
--- wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/HeaderPage.html (added)
+++ wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/HeaderPage.html Fri Sep 14 19:31:11 2007
@@ -0,0 +1,9 @@
+<html xmlns:wicket="http://wicket.apache.org/">
+ <head>
+ <link rel="stylesheet" type="text/css" href="style.css"/>
+ </head>
+ <body>
+ <h1>
+ <a style="color: #E9601A" wicket:id="menu">Wicket Examples</a></h1>
+ </body>
+</html>
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/HeaderPage.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/HeaderPage.html
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/HeaderPage.html
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/HeaderPage.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/HeaderPage.java?rev=575856&view=auto
==============================================================================
--- wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/HeaderPage.java (added)
+++ wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/HeaderPage.java Fri Sep 14 19:31:11 2007
@@ -0,0 +1,45 @@
+/*
+ * 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.wicket.examples.portlet.menu;
+
+import javax.portlet.PortletSession;
+
+import org.apache.wicket.RequestContext;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.protocol.http.portlet.PortletRequestContext;
+
+/**
+ * @author Ate Douma
+ */
+public class HeaderPage extends WebPage
+{
+ public HeaderPage()
+ {
+ add(new Link("menu")
+ {
+ @Override
+ public void onClick()
+ {
+ this.setResponsePage(MenuPage.class);
+ ExampleApplication ea = (ExampleApplication)WicketExamplesMenuApplication.getExamples().get(0);
+ PortletSession session = ((PortletRequestContext)RequestContext.get()).getPortletRequest().getPortletSession();
+ session.setAttribute(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_ATTR, ea);
+ }
+ });
+ }
+}
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/HeaderPage.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/HeaderPage.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/HeaderPage.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/MenuPage.html
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/MenuPage.html?rev=575856&view=auto
==============================================================================
--- wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/MenuPage.html (added)
+++ wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/MenuPage.html Fri Sep 14 19:31:11 2007
@@ -0,0 +1,21 @@
+<html xmlns:wicket="http://wicket.apache.org/">
+ <head>
+ <link rel="stylesheet" type="text/css" href="style.css" />
+ </head>
+ <body>
+ <p>
+ <h1>Wicket Portlet Examples</h1>
+ <p id="titleblock">
+ <b><font size="+1">menu</font></b>
+ </p>
+ <p>
+ The following examples demonstrate both core functionality and also functionality in other modules (e.g. wicket-extensions):
+ </p>
+ <table>
+ <tr wicket:id="examples">
+ <td align="right"><a style="color: #E9601A" wicket:id="example"><span wicket:id="name">[name]</span></a></td>
+ <td> - <span wicket:id="description">[description]</span></td>
+ </tr>
+ </table>
+ </body>
+</html>
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/MenuPage.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/MenuPage.html
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/MenuPage.html
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/MenuPage.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/MenuPage.java?rev=575856&view=auto
==============================================================================
--- wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/MenuPage.java (added)
+++ wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/MenuPage.java Fri Sep 14 19:31:11 2007
@@ -0,0 +1,60 @@
+/*
+ * 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.wicket.examples.portlet.menu;
+
+import javax.portlet.PortletSession;
+
+import org.apache.wicket.RequestContext;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.markup.html.list.Loop;
+import org.apache.wicket.protocol.http.portlet.PortletRequestContext;
+
+/**
+ * @author ate
+ */
+public class MenuPage extends WebPage
+{
+ public MenuPage()
+ {
+ add(new Loop("examples", WicketExamplesMenuApplication.getExamples().size()-1)
+ {
+
+ @Override
+ protected void populateItem(LoopItem item)
+ {
+ final int index = item.getIteration();
+ ExampleApplication ea = (ExampleApplication)WicketExamplesMenuApplication.getExamples().get(index+1);
+ Link link = new Link("example")
+ {
+ @Override
+ public void onClick()
+ {
+ int index = ((LoopItem)getParent()).getIteration();
+ ExampleApplication ea = (ExampleApplication)WicketExamplesMenuApplication.getExamples().get(index+1);
+ PortletSession session = ((PortletRequestContext)RequestContext.get()).getPortletRequest().getPortletSession();
+ session.setAttribute(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_ATTR, ea);
+ }
+ };
+ link.add(new Label("name", ea.getDisplayName()));
+ item.add(link);
+ item.add(new Label("description", ea.getDescription()));
+ }
+ });
+ }
+}
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/MenuPage.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/MenuPage.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/MenuPage.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/WicketExamplesMenuApplication.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/WicketExamplesMenuApplication.java?rev=575856&view=auto
==============================================================================
--- wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/WicketExamplesMenuApplication.java (added)
+++ wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/WicketExamplesMenuApplication.java Fri Sep 14 19:31:11 2007
@@ -0,0 +1,72 @@
+/*
+ * 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.wicket.examples.portlet.menu;
+
+import java.util.Collections;
+import java.util.List;
+
+import javax.portlet.PortletMode;
+import javax.servlet.ServletContext;
+
+import org.apache.wicket.RequestContext;
+import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.protocol.http.portlet.PortletRequestContext;
+
+/**
+ * @author Ate Douma
+ */
+public class WicketExamplesMenuApplication extends WebApplication
+{
+ private static List examples;
+ private static ServletContext servletContext;
+
+ public static List getExamples()
+ {
+ if (examples == null)
+ {
+ examples = (List)servletContext.getAttribute(WicketExamplesMenuPortlet.EXAMPLES);
+ }
+ return examples != null ? examples : Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @see org.apache.wicket.Application#getHomePage()
+ */
+ @Override
+ public Class getHomePage()
+ {
+ PortletRequestContext prc = (PortletRequestContext)RequestContext.get();
+ if (PortletMode.EDIT.equals(prc.getPortletRequest().getPortletMode()))
+ {
+ return EditPage.class;
+ }
+ return MenuPage.class;
+ }
+
+ /**
+ * @see org.apache.wicket.protocol.http.WebApplication#init()
+ */
+ @Override
+ protected void init()
+ {
+ mountBookmarkablePage("/menu", MenuPage.class);
+ mountBookmarkablePage("/header", HeaderPage.class);
+ mountBookmarkablePage("/edit", EditPage.class);
+ servletContext = getWicketFilter().getFilterConfig().getServletContext();
+ }
+
+}
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/WicketExamplesMenuApplication.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/WicketExamplesMenuApplication.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/WicketExamplesMenuApplication.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/WicketExamplesMenuPortlet.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/WicketExamplesMenuPortlet.java?rev=575856&view=auto
==============================================================================
--- wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/WicketExamplesMenuPortlet.java (added)
+++ wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/WicketExamplesMenuPortlet.java Fri Sep 14 19:31:11 2007
@@ -0,0 +1,309 @@
+/*
+ * 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.wicket.examples.portlet.menu;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
+import javax.portlet.PortletException;
+import javax.portlet.PortletMode;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletResponse;
+import javax.portlet.PortletSession;
+
+import org.apache.wicket.markup.parser.XmlPullParser;
+import org.apache.wicket.markup.parser.XmlTag;
+import org.apache.wicket.protocol.http.portlet.WicketPortlet;
+
+/**
+ * @author Ate Douma
+ */
+public class WicketExamplesMenuPortlet extends WicketPortlet
+{
+ public static final String EXAMPLE_APPLICATION_PREF = "exampleApplication";
+ public static final String EXAMPLES = WicketExamplesMenuPortlet.class.getName() + ".examples";
+ public static final String EXAMPLE_APPLICATION_ATTR = WicketExamplesMenuPortlet.class.getName() + "." + EXAMPLE_APPLICATION_PREF;
+ private static final String MENU_APPLICATION_URL_PORTLET_PARAMETER = "_wmu";
+ private static final String PROCESS_MENU_APPLICATION = WicketExamplesMenuPortlet.class.getName() + ".processMenuApplication";
+ private static final String PROCESS_HEADER_PAGE = WicketExamplesMenuPortlet.class.getName() + ".renderHeaderPage";
+ /**
+ * Name of portlet init Parameter for the ExampleHeader page
+ */
+ public static final String PARAM_HEADER_PAGE = "headerPage";
+
+ private static List examples;
+
+ /**
+ * @see org.apache.wicket.protocol.http.portlet.WicketPortlet#init(javax.portlet.PortletConfig)
+ */
+ @Override
+ public void init(PortletConfig config) throws PortletException
+ {
+ super.init(config);
+ if (examples == null)
+ {
+ examples = discoverExamples(config.getPortletContext());
+ if (examples == null)
+ {
+ examples = Collections.EMPTY_LIST;
+ }
+ else
+ {
+ examples = Collections.unmodifiableList(examples);
+ }
+ config.getPortletContext().setAttribute(EXAMPLES, examples);
+ }
+ }
+
+ /**
+ * @see org.apache.wicket.protocol.http.portlet.WicketPortlet#getWicketConfigParameter(javax.portlet.PortletRequest, java.lang.String, java.lang.String)
+ */
+ @Override
+ protected String getWicketConfigParameter(PortletRequest request, String paramName, String defaultValue)
+ {
+ if (paramName.equals(WICKET_FILTER_PATH))
+ {
+ return ((ExampleApplication)request.getAttribute(EXAMPLE_APPLICATION_ATTR)).getFilterPath();
+ }
+ else if (paramName.equals(WICKET_FILTER_QUERY))
+ {
+ return ((ExampleApplication)request.getAttribute(EXAMPLE_APPLICATION_ATTR)).getFilterQuery();
+ }
+ return super.getWicketConfigParameter(request, paramName, defaultValue);
+ }
+
+ /**
+ * @see org.apache.wicket.protocol.http.portlet.WicketPortlet#getWicketUrlPortletParameter(javax.portlet.PortletRequest)
+ */
+ @Override
+ protected String getWicketUrlPortletParameter(PortletRequest request)
+ {
+ return request.getAttribute(PROCESS_MENU_APPLICATION) != null ? MENU_APPLICATION_URL_PORTLET_PARAMETER : super.getWicketUrlPortletParameter(request);
+ }
+
+ /**
+ * @see org.apache.wicket.protocol.http.portlet.WicketPortlet#getWicketURL(javax.portlet.PortletRequest, java.lang.String, java.lang.String)
+ */
+ @Override
+ protected String getWicketURL(PortletRequest request, String pageType, String defaultPage)
+ {
+ ExampleApplication ea = (ExampleApplication)request.getAttribute(EXAMPLE_APPLICATION_ATTR);
+ if (request.getAttribute(PROCESS_HEADER_PAGE) != null)
+ {
+ return ea.getInitParameter(PARAM_HEADER_PAGE);
+ }
+ return super.getWicketURL(request, pageType, ea.getInitParameter(pageType));
+ }
+
+ /**
+ * @see org.apache.wicket.protocol.http.portlet.WicketPortlet#processRequest(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.String, java.lang.String, java.lang.String)
+ */
+ @Override
+ protected void processRequest(PortletRequest request, PortletResponse response, String requestType, String pageType) throws PortletException, IOException
+ {
+ PortletSession session = request.getPortletSession();
+ ExampleApplication ea = (ExampleApplication)session.getAttribute(EXAMPLE_APPLICATION_ATTR);
+ if (ea == null)
+ {
+ String eaFilterPath = request.getPreferences().getValue(EXAMPLE_APPLICATION_PREF, null);
+ if (eaFilterPath != null)
+ {
+ Iterator iter = examples.iterator();
+ while (iter.hasNext())
+ {
+ ea = (ExampleApplication)iter.next();
+ if (ea.getFilterPath().equals(eaFilterPath))
+ {
+ break;
+ }
+ ea = null;
+ }
+ }
+ if (ea == null && examples.size() > 0)
+ {
+ ea = (ExampleApplication)examples.get(0);
+ }
+ session.setAttribute(EXAMPLE_APPLICATION_ATTR, ea);
+ }
+ if (ea == null || ea.getFilterPath().equals(getWicketFilterPath()) || !PortletMode.VIEW.equals(request.getPortletMode()))
+ {
+ request.setAttribute(PROCESS_MENU_APPLICATION, Boolean.TRUE);
+ request.setAttribute(EXAMPLE_APPLICATION_ATTR, examples.get(0));
+ super.processRequest(request, response, requestType, pageType);
+ }
+ else
+ {
+ if (WicketPortlet.ACTION_REQUEST.equals(requestType) || request.getParameter(PORTLET_RESOURCE_URL_PARAMETER) != null)
+ {
+ if (request.getParameter(MENU_APPLICATION_URL_PORTLET_PARAMETER) != null)
+ {
+ request.setAttribute(PROCESS_MENU_APPLICATION, Boolean.TRUE);
+ request.setAttribute(EXAMPLE_APPLICATION_ATTR, examples.get(0));
+ super.processRequest(request, response, requestType, pageType);
+ }
+ else
+ {
+ request.setAttribute(EXAMPLE_APPLICATION_ATTR, ea);
+ super.processRequest(request, response, requestType, pageType);
+ }
+ }
+ else
+ {
+ request.setAttribute(PROCESS_MENU_APPLICATION, Boolean.TRUE);
+ request.setAttribute(PROCESS_HEADER_PAGE, Boolean.TRUE);
+ request.setAttribute(EXAMPLE_APPLICATION_ATTR, examples.get(0));
+ super.processRequest(request, response, requestType, pageType);
+ request.removeAttribute(PROCESS_MENU_APPLICATION);
+ request.removeAttribute(PROCESS_HEADER_PAGE);
+ request.setAttribute(EXAMPLE_APPLICATION_ATTR, ea);
+ super.processRequest(request, response, requestType, pageType);
+ }
+ }
+ }
+
+ protected List discoverExamples(PortletContext portletContext)
+ {
+ ArrayList examples = new ArrayList();
+ InputStream is = portletContext.getResourceAsStream("/WEB-INF/portlet.xml");
+ if (is != null)
+ {
+ try
+ {
+ XmlPullParser parser = new XmlPullParser();
+ parser.parse(is);
+ while (true)
+ {
+ XmlTag elem;
+ String name;
+ int level;
+
+ do
+ {
+ elem = (XmlTag)parser.nextTag();
+ }
+ while (elem != null && (!(elem.getName().equals("portlet") && elem.isOpen())));
+
+ if (elem == null)
+ {
+ break;
+ }
+
+ String description = null;
+ String filterPath = null;
+ String filterQuery = null;
+ String displayName = null;
+ HashMap initParameters = new HashMap();
+
+ level = 0;
+
+ do
+ {
+ elem = (XmlTag)parser.nextTag();
+ name = elem.getName();
+ level = elem.isOpen() ? (level+1) : (level-1);
+
+ if (level == 1)
+ {
+ if (name.equals("description")||name.equals("display-name"))
+ {
+ parser.setPositionMarker();
+ }
+
+ else if (name.equals("init-param"))
+ {
+ String initParamName = null;
+ String initParamValue = null;
+ do
+ {
+ elem = (XmlTag)parser.nextTag();
+ name = elem.getName();
+ level = elem.isOpen() ? (level+1) : (level-1);
+ if (level == 2)
+ {
+ if (name.equals("name")||name.equals("value"))
+ {
+ parser.setPositionMarker();
+ }
+ }
+ else if (level == 1)
+ {
+ if (name.equals("name"))
+ {
+ initParamName = parser.getInputFromPositionMarker(elem.getPos()).toString();
+ }
+ else if (name.equals("value"))
+ {
+ initParamValue = parser.getInputFromPositionMarker(elem.getPos()).toString();
+ }
+ }
+ }
+ while (level > 0);
+ if (initParamName != null && initParamValue != null)
+ {
+ initParameters.put(initParamName, initParamValue);
+ }
+ }
+ }
+ else if (level == 0)
+ {
+ if (name.equals("description"))
+ {
+ description = parser.getInputFromPositionMarker(elem.getPos()).toString();
+ }
+ else if (name.equals("display-name"))
+ {
+ displayName = parser.getInputFromPositionMarker(elem.getPos()).toString();
+ }
+ }
+ }
+ while (level > -1);
+ filterPath = buildWicketFilterPath((String)initParameters.get(WICKET_FILTER_PATH_PARAM));
+ if (displayName != null && filterPath != null && description != null)
+ {
+ filterQuery = buildWicketFilterQuery(filterPath);
+ validateDefaultPages(initParameters, filterPath, filterQuery);
+ ExampleApplication exampleApplication = new ExampleApplication(displayName, filterPath, filterQuery, initParameters, description);
+ if (exampleApplication.getFilterPath().equals(getWicketFilterPath()))
+ {
+ examples.add(0, exampleApplication);
+ }
+ else
+ {
+ examples.add(exampleApplication);
+ }
+ }
+ }
+ }
+ catch (RuntimeException e)
+ {
+ throw e;
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+ return examples;
+ }
+}
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/WicketExamplesMenuPortlet.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/WicketExamplesMenuPortlet.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/portlet/menu/WicketExamplesMenuPortlet.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/portlet.xml?rev=575856&view=auto
==============================================================================
--- wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/portlet.xml (added)
+++ wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/portlet.xml Fri Sep 14 19:31:11 2007
@@ -0,0 +1,688 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+ <portlet>
+ <description>Menu to the available Wicket portlet examples</description>
+ <portlet-name>WicketExamplesMenuApplication</portlet-name>
+ <display-name>wicket examples</display-name>
+ <portlet-class>org.apache.wicket.examples.portlet.menu.WicketExamplesMenuPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/examples</value>
+ </init-param>
+ <init-param>
+ <name>viewPage</name>
+ <value>/examples/menu</value>
+ </init-param>
+ <init-param>
+ <name>editPage</name>
+ <value>/examples/edit</value>
+ </init-param>
+ <init-param>
+ <name>headerPage</name>
+ <value>/examples/header</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Portlet Examples</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>As simple as it gets.</description>
+ <portlet-name>HelloWorldApplication</portlet-name>
+ <display-name>helloworld</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/helloworld</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket HelloWorld Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Trivial input form.</description>
+ <portlet-name>EchoApplication</portlet-name>
+ <display-name>echo</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/echo</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Echo Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Basic form processing.</description>
+ <portlet-name>FormInputApplication</portlet-name>
+ <display-name>forminput</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/forminput</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket FormInput Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Component Reference.</description>
+ <portlet-name>ComponentReferenceApplication</portlet-name>
+ <display-name>compref</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/compref</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket ComponentReference Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Various kinds of images.</description>
+ <portlet-name>ImagesApplication</portlet-name>
+ <display-name>images</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/images</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Images Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Different kinds of links.</description>
+ <portlet-name>LinkomaticApplication</portlet-name>
+ <display-name>linkomatic</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/linkomatic</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Linkomatic Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Page navigation</description>
+ <portlet-name>NavomaticApplication</portlet-name>
+ <display-name>navomatic</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/navomatic</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Navomatic Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Localization.</description>
+ <portlet-name>PubApplication</portlet-name>
+ <display-name>pub</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/pub</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Pub Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Converts input using some model magic.</description>
+ <portlet-name>UnicodeConverterApplication</portlet-name>
+ <display-name>unicode converter</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/unicodeconverter</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket UnicodeConverter Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Demonstrates the use of "nice" URLs.</description>
+ <portlet-name>NiceUrlApplication</portlet-name>
+ <display-name>niceurl</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/niceurl</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket NiceUrl Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Examples using wicket's built-in AJAX.</description>
+ <portlet-name>AjaxApplication</portlet-name>
+ <display-name>ajax</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/ajax</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Ajax Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Trees and nested lists.</description>
+ <portlet-name>NestedApplication</portlet-name>
+ <display-name>nested</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/nested</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Nested Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>DataView, DataTable, GridView component examples.</description>
+ <portlet-name>RepeaterExamplesApplication</portlet-name>
+ <display-name>repeaters</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/repeater</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Repeaters Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>A simple sign-in page.</description>
+ <portlet-name>SignInApplication</portlet-name>
+ <display-name>signin</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/signin</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket SignIn Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>An advanced sign-in page (using cookies).</description>
+ <portlet-name>SignIn2Application</portlet-name>
+ <display-name>signin2</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/signin2</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket SignIn2 Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Single file upload.</description>
+ <portlet-name>UploadSingleApplication</portlet-name>
+ <display-name>upload single</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/upload</value>
+ </init-param>
+ <init-param>
+ <name>viewPage</name>
+ <value>/upload/single</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket UploadSingle Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Multiple file upload.</description>
+ <portlet-name>UploadMultiApplication</portlet-name>
+ <display-name>upload multi</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/upload</value>
+ </init-param>
+ <init-param>
+ <name>viewPage</name>
+ <value>/upload/multi</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket UploadMulti Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Templating example.</description>
+ <portlet-name>TemplateApplication</portlet-name>
+ <display-name>template</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/template</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Template Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Demonstrates stateless pages/sessions.</description>
+ <portlet-name>StatelessApplication</portlet-name>
+ <display-name>stateless</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/stateless</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Stateless Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Examples for serving static files.</description>
+ <portlet-name>StaticPagesApplication</portlet-name>
+ <display-name>staticpages</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/staticpages</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket StaticPages Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Browser snooper.</description>
+ <portlet-name>HelloBrowserApplication</portlet-name>
+ <display-name>hellobrowser</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/hellobrowser</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket HelloBrowser Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Demonstrates the wizard component.</description>
+ <portlet-name>WizardApplication</portlet-name>
+ <display-name>abacadabra</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/wizard</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Wizard Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Demonstrates custom template loading.</description>
+ <portlet-name>CustomResourceLoadingApplication</portlet-name>
+ <display-name>custom template loading</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/customresourceloading</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket CustomResourceLoading Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Don't get lost, use bread-crumbs.</description>
+ <portlet-name>BreadCrumbApplication</portlet-name>
+ <display-name>breadcrumb</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/breadcrumb</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket BreadCrumb Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Image-based "captcha" to distinguish humans from spammers.</description>
+ <portlet-name>CaptchaApplication</portlet-name>
+ <display-name>captcha</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/captcha</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Captcha Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Demonstrates authentication for pages.</description>
+ <portlet-name>MyAuthenticatedWebApplication</portlet-name>
+ <display-name>authentication</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/authentication</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Authentication Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Demonstrates authorization for pages and components.</description>
+ <portlet-name>RolesAuthApplication</portlet-name>
+ <display-name>authorization</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/authorization</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Authorization Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Date component example from the wicket-date project.</description>
+ <portlet-name>DatesApplication</portlet-name>
+ <display-name>dates</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/dates</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Dates Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Stock quote example.</description>
+ <portlet-name>StockQuoteApplication</portlet-name>
+ <display-name>stockquote</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/stock</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket StockQuote Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>A blog-like multi-user guestbook.</description>
+ <portlet-name>GuestBookApplication</portlet-name>
+ <display-name>guestbook</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/guestbook</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket GuestBook Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>The game of hangman.</description>
+ <portlet-name>HangmanApplication</portlet-name>
+ <display-name>hangman</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/hangman</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Hangman Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>A simple application.</description>
+ <portlet-name>LibraryApplication</portlet-name>
+ <display-name>library</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/library</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Library Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Demonstrates integration options with the Spring framework.</description>
+ <portlet-name>SpringExample</portlet-name>
+ <display-name>spring</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/spring</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Spring Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Integration with the Google Guice IoC container.</description>
+ <portlet-name>GuiceApplication</portlet-name>
+ <display-name>guice</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/guice</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket Quice Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+ <portlet>
+ <description>Shows a Velocity panel in action.</description>
+ <portlet-name>VelocityTemplateApplication</portlet-name>
+ <display-name>velocity</display-name>
+ <portlet-class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet-class>
+ <init-param>
+ <name>wicketFilterPath</name>
+ <value>/velocity</value>
+ </init-param>
+ <supports>
+ <mime-type>*/*</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Wicket VelocityTemplate Example</title>
+ <keywords>Wicket</keywords>
+ </portlet-info>
+ </portlet>
+</portlet-app>
\ No newline at end of file
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/portlet.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/portlet.xml
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/portlet.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/web.xml?rev=575856&r1=575855&r2=575856&view=diff
==============================================================================
--- wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/web.xml (original)
+++ wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/web.xml Fri Sep 14 19:31:11 2007
@@ -15,11 +15,10 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<!DOCTYPE web-app
- PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<web-app>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
<display-name>Wicket Examples</display-name>
@@ -52,6 +51,19 @@
</context-param>
<filter>
+ <filter-name>WicketExamplesMenuApplication</filter-name>
+ <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
+ <init-param>
+ <param-name>applicationClassName</param-name>
+ <param-value>org.apache.wicket.examples.portlet.menu.WicketExamplesMenuApplication</param-value>
+ </init-param>
+ <init-param>
+ <param-name>portletOnlyFilter</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ </filter>
+
+ <filter>
<filter-name>AjaxPrototypeApplication</filter-name>
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
<init-param>
@@ -389,8 +401,17 @@
</filter>
<filter-mapping>
+ <filter-name>WicketExamplesMenuApplication</filter-name>
+ <url-pattern>/examples/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+
+ <filter-mapping>
<filter-name>AjaxApplication</filter-name>
<url-pattern>/ajax/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
@@ -401,111 +422,155 @@
<filter-mapping>
<filter-name>RepeaterExamplesApplication</filter-name>
<url-pattern>/repeater/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>NiceUrlApplication</filter-name>
<url-pattern>/niceurl/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>SignInApplication</filter-name>
<url-pattern>/signin/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>StockQuoteApplication</filter-name>
<url-pattern>/stock/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>SignIn2Application</filter-name>
<url-pattern>/signin2/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>HangmanApplication</filter-name>
<url-pattern>/hangman/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>NestedApplication</filter-name>
<url-pattern>/nested/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>PubApplication</filter-name>
<url-pattern>/pub/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>NavomaticApplication</filter-name>
<url-pattern>/navomatic/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>LinkomaticApplication</filter-name>
<url-pattern>/linkomatic/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>LibraryApplication</filter-name>
<url-pattern>/library/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>ImagesApplication</filter-name>
<url-pattern>/images/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>HelloWorldApplication</filter-name>
<url-pattern>/helloworld/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>EchoApplication</filter-name>
<url-pattern>/echo/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>UnicodeConverterApplication</filter-name>
<url-pattern>/unicodeconverter/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>HelloBrowserApplication</filter-name>
<url-pattern>/hellobrowser/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>FormInputApplication</filter-name>
<url-pattern>/forminput/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>GuestBookApplication</filter-name>
<url-pattern>/guestbook/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>UploadApplication</filter-name>
<url-pattern>/upload/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>EncodingsApplication</filter-name>
<url-pattern>/encodings/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>TemplateApplication</filter-name>
<url-pattern>/template/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>ComponentReferenceApplication</filter-name>
<url-pattern>/compref/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
@@ -516,61 +581,85 @@
<filter-mapping>
<filter-name>CustomResourceLoadingApplication</filter-name>
<url-pattern>/customresourceloading/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>WizardApplication</filter-name>
<url-pattern>/wizard/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>CaptchaApplication</filter-name>
<url-pattern>/captcha/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>BreadCrumbApplication</filter-name>
<url-pattern>/breadcrumb/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>StatelessApplication</filter-name>
<url-pattern>/stateless/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>StaticPagesApplication</filter-name>
<url-pattern>/staticpages/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>RolesAuthApplication</filter-name>
<url-pattern>/authorization/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>MyAuthenticatedWebApplication</filter-name>
<url-pattern>/authentication/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>SpringExample</filter-name>
<url-pattern>/spring/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>GuiceApplication</filter-name>
<url-pattern>/guice/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>VelocityTemplateApplication</filter-name>
<url-pattern>/velocity/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>DatesApplication</filter-name>
<url-pattern>/dates/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<listener>