Author: david.borruat
Date: 2010-05-04 11:24:41 -0400 (Tue, 04 May 2010)
New Revision: 2975
Added:
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/java/org/jboss/portal/portlet/samples/JSPIPhoneMenuPortlet.java
Removed:
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java
Modified:
sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/pom.xml
sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/src/main/webapp/WEB-INF/portlet.xml
sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/src/main/webapp/jsp/welcome.jsp
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/pom.xml
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/webapp/WEB-INF/portlet.xml
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/webapp/jsp/welcome.jsp
Log:
iPhone portlets ready
Modified: sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/pom.xml
===================================================================
--- sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/pom.xml 2010-05-04
14:58:39 UTC (rev 2974)
+++ sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/pom.xml 2010-05-04
15:24:41 UTC (rev 2975)
@@ -13,10 +13,10 @@
</parent>
-->
<groupId>org.gatein.portal.examples.portlets</groupId>
- <artifactId>gatein-jsp-hellouser</artifactId>
+ <artifactId>gatein-jsp-iphonehelloworld</artifactId>
<version>3.0.0-unine-SNAPSHOT</version>
<packaging>war</packaging>
- <name>GateIn Portal Examples - JSP Hello User Portlet</name>
+ <name>GateIn Portal - JSP iPhone Hello World Portlet</name>
<build>
<plugins>
Modified:
sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/src/main/webapp/WEB-INF/portlet.xml
===================================================================
---
sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/src/main/webapp/WEB-INF/portlet.xml 2010-05-04
14:58:39 UTC (rev 2974)
+++
sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/src/main/webapp/WEB-INF/portlet.xml 2010-05-04
15:24:41 UTC (rev 2975)
@@ -5,8 +5,8 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2...
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
<portlet>
- <portlet-name>JSPHelloUserPortlet</portlet-name>
-
<portlet-class>org.jboss.portal.portlet.samples.JSPHelloUserPortlet</portlet-class>
+ <portlet-name>JSPIPhoneHelloWorldPortlet</portlet-name>
+
<portlet-class>org.jboss.portal.portlet.samples.JSPIPhoneHelloWorldPortlet</portlet-class>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
@@ -14,7 +14,7 @@
<portlet-mode>help</portlet-mode>
</supports>
<portlet-info>
- <title>JSP Hello User Portlet</title>
+ <title>JSP iPhone Hello World Portlet</title>
</portlet-info>
</portlet>
</portlet-app>
\ No newline at end of file
Modified:
sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/src/main/webapp/jsp/welcome.jsp
===================================================================
---
sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/src/main/webapp/jsp/welcome.jsp 2010-05-04
14:58:39 UTC (rev 2974)
+++
sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/src/main/webapp/jsp/welcome.jsp 2010-05-04
15:24:41 UTC (rev 2975)
@@ -1,37 +1,6 @@
<%@ taglib
uri="http://java.sun.com/portlet_2_0" prefix="portlet"
%>
-<div class="portlet-section-header">Welcome !</div>
-
-<br/>
-
<div class="portlet-font">
+Hello world portlet for iPhone !
+</div>
- Welcome on the JSP Hello User portlet,
-my name is JBoss Portal. What's yours ?</div>
-
-<br/>
-
-<div class="portlet-font">Method 1: We simply pass the parameter to the
render phase:<br/>
-<a href="<portlet:renderURL><portlet:param name="yourname"
value="John Doe"/></portlet:renderURL>">John
Doe</a></div>
-
-<br/>
-
-<div class="portlet-font">Method 2: We pass the parameter to the render
phase, using valid markup:
-Please check the source code to see the difference with Method 1.
-<portlet:renderURL var="myRenderURL">
- <portlet:param name="yourname" value='John Doe'/>
-</portlet:renderURL>
-<br/>
-<a href="<%= myRenderURL %>">John Doe</a></div>
-
-<br/>
-
-<div class="portlet-font">Method 3: We use a form:<br/>
-
-<portlet:actionURL var="myActionURL"/>
-<form action="<%= myActionURL %>" method="POST">
- <span class="portlet-form-field-label">Name:</span>
- <input class="portlet-form-input-field" type="text"
name="yourname"/>
- <input class="portlet-form-button" type="Submit"/>
-</form>
-</div>
\ No newline at end of file
Modified: sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/pom.xml
===================================================================
--- sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/pom.xml 2010-05-04 14:58:39
UTC (rev 2974)
+++ sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/pom.xml 2010-05-04 15:24:41
UTC (rev 2975)
@@ -13,10 +13,10 @@
</parent>
-->
<groupId>org.gatein.portal.examples.portlets</groupId>
- <artifactId>gatein-jsp-hellouser</artifactId>
+ <artifactId>gatein-jsp-iPhonemenu</artifactId>
<version>3.0.0-unine-SNAPSHOT</version>
<packaging>war</packaging>
- <name>GateIn Portal Examples - JSP Hello User Portlet</name>
+ <name>GateIn Portal - JSP iPhone Menu Portlet</name>
<build>
<plugins>
Deleted:
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java
===================================================================
---
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java 2010-05-04
14:58:39 UTC (rev 2974)
+++
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java 2010-05-04
15:24:41 UTC (rev 2975)
@@ -1,78 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.portlet.samples;
-
-import java.io.IOException;
-
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.GenericPortlet;
-import javax.portlet.PortletException;
-import javax.portlet.PortletRequestDispatcher;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.UnavailableException;
-
-public class JSPHelloUserPortlet extends GenericPortlet
-{
-
- public void doView(RenderRequest request, RenderResponse response) throws
PortletException, IOException
- {
- String sYourName = (String) request.getParameter("yourname");
- if (sYourName != null)
- {
- PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/jsp/hello.jsp");
- prd.include(request, response);
- }
- else
- {
- PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/jsp/welcome.jsp");
- prd.include(request, response);
- }
- }
-
- protected void doHelp(RenderRequest rRequest, RenderResponse rResponse) throws
PortletException, IOException,
- UnavailableException
- {
- rResponse.setContentType("text/html");
- PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/jsp/help.jsp");
- prd.include(rRequest, rResponse);
- }
-
- protected void doEdit(RenderRequest rRequest, RenderResponse rResponse) throws
PortletException, IOException,
- UnavailableException
- {
- rResponse.setContentType("text/html");
- PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/jsp/edit.jsp");
- prd.include(rRequest, rResponse);
- }
-
- public void processAction(ActionRequest aRequest, ActionResponse aResponse) throws
PortletException, IOException,
- UnavailableException
- {
- String sYourname = (String) aRequest.getParameter("yourname");
- aResponse.setRenderParameter("yourname", sYourname);
- }
-
-
-}
Copied:
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/java/org/jboss/portal/portlet/samples/JSPIPhoneMenuPortlet.java
(from rev 2974,
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java)
===================================================================
---
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/java/org/jboss/portal/portlet/samples/JSPIPhoneMenuPortlet.java
(rev 0)
+++
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/java/org/jboss/portal/portlet/samples/JSPIPhoneMenuPortlet.java 2010-05-04
15:24:41 UTC (rev 2975)
@@ -0,0 +1,78 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.samples;
+
+import java.io.IOException;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.UnavailableException;
+
+public class JSPIPhoneMenuPortlet extends GenericPortlet
+{
+
+ public void doView(RenderRequest request, RenderResponse response) throws
PortletException, IOException
+ {
+ String sYourName = (String) request.getParameter("yourname");
+ if (sYourName != null)
+ {
+ PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/jsp/hello.jsp");
+ prd.include(request, response);
+ }
+ else
+ {
+ PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/jsp/welcome.jsp");
+ prd.include(request, response);
+ }
+ }
+
+ protected void doHelp(RenderRequest rRequest, RenderResponse rResponse) throws
PortletException, IOException,
+ UnavailableException
+ {
+ rResponse.setContentType("text/html");
+ PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/jsp/help.jsp");
+ prd.include(rRequest, rResponse);
+ }
+
+ protected void doEdit(RenderRequest rRequest, RenderResponse rResponse) throws
PortletException, IOException,
+ UnavailableException
+ {
+ rResponse.setContentType("text/html");
+ PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/jsp/edit.jsp");
+ prd.include(rRequest, rResponse);
+ }
+
+ public void processAction(ActionRequest aRequest, ActionResponse aResponse) throws
PortletException, IOException,
+ UnavailableException
+ {
+ String sYourname = (String) aRequest.getParameter("yourname");
+ aResponse.setRenderParameter("yourname", sYourname);
+ }
+
+
+}
Modified:
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/webapp/WEB-INF/portlet.xml
===================================================================
---
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/webapp/WEB-INF/portlet.xml 2010-05-04
14:58:39 UTC (rev 2974)
+++
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/webapp/WEB-INF/portlet.xml 2010-05-04
15:24:41 UTC (rev 2975)
@@ -5,8 +5,8 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2...
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
<portlet>
- <portlet-name>JSPHelloUserPortlet</portlet-name>
-
<portlet-class>org.jboss.portal.portlet.samples.JSPHelloUserPortlet</portlet-class>
+ <portlet-name>JSPIPhoneMenuPortlet</portlet-name>
+
<portlet-class>org.jboss.portal.portlet.samples.JSPIPhoneMenuPortlet</portlet-class>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
@@ -14,7 +14,7 @@
<portlet-mode>help</portlet-mode>
</supports>
<portlet-info>
- <title>JSP Hello User Portlet</title>
+ <title>JSP iPhone Menu Portlet</title>
</portlet-info>
</portlet>
</portlet-app>
\ No newline at end of file
Modified:
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/webapp/jsp/welcome.jsp
===================================================================
---
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/webapp/jsp/welcome.jsp 2010-05-04
14:58:39 UTC (rev 2974)
+++
sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/webapp/jsp/welcome.jsp 2010-05-04
15:24:41 UTC (rev 2975)
@@ -1,37 +1,5 @@
<%@ taglib
uri="http://java.sun.com/portlet_2_0" prefix="portlet"
%>
-<div class="portlet-section-header">Welcome !</div>
-
-<br/>
-
<div class="portlet-font">
-
- Welcome on the JSP Hello User portlet,
-my name is JBoss Portal. What's yours ?</div>
-
-<br/>
-
-<div class="portlet-font">Method 1: We simply pass the parameter to the
render phase:<br/>
-<a href="<portlet:renderURL><portlet:param name="yourname"
value="John Doe"/></portlet:renderURL>">John
Doe</a></div>
-
-<br/>
-
-<div class="portlet-font">Method 2: We pass the parameter to the render
phase, using valid markup:
-Please check the source code to see the difference with Method 1.
-<portlet:renderURL var="myRenderURL">
- <portlet:param name="yourname" value='John Doe'/>
-</portlet:renderURL>
-<br/>
-<a href="<%= myRenderURL %>">John Doe</a></div>
-
-<br/>
-
-<div class="portlet-font">Method 3: We use a form:<br/>
-
-<portlet:actionURL var="myActionURL"/>
-<form action="<%= myActionURL %>" method="POST">
- <span class="portlet-form-field-label">Name:</span>
- <input class="portlet-form-input-field" type="text"
name="yourname"/>
- <input class="portlet-form-button" type="Submit"/>
-</form>
-</div>
\ No newline at end of file
+Menu portlet for iPhone.
+</div>