From do-not-reply at jboss.org Tue May 4 11:24:43 2010 Content-Type: multipart/mixed; boundary="===============6740083147942124305==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: gatein-commits at lists.jboss.org Subject: [gatein-commits] gatein SVN: r2975 - in sandbox/mobile_delivery/trunk/examples/portlets: iPhonehelloworld/src/main/webapp/WEB-INF and 5 other directories. Date: Tue, 04 May 2010 11:24:43 -0400 Message-ID: <201005041524.o44FOhfD012224@svn01.web.mwc.hst.phx2.redhat.com> --===============6740083147942124305== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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/mai= n/webapp/WEB-INF/portlet.xml sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/src/mai= n/webapp/jsp/welcome.jsp sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/pom.xml sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/weba= pp/WEB-INF/portlet.xml sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/weba= pp/jsp/welcome.jsp Log: iPhone portlets ready Modified: sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/= pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/pom.xm= l 2010-05-04 14:58:39 UTC (rev 2974) +++ sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/pom.xm= l 2010-05-04 15:24:41 UTC (rev 2975) @@ -13,10 +13,10 @@ --> org.gatein.portal.examples.portlets - gatein-jsp-hellouser + gatein-jsp-iphonehelloworld 3.0.0-unine-SNAPSHOT war - GateIn Portal Examples - JSP Hello User Portlet + GateIn Portal - JSP iPhone Hello World Portlet = Modified: sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/= src/main/webapp/WEB-INF/portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/src/ma= in/webapp/WEB-INF/portlet.xml 2010-05-04 14:58:39 UTC (rev 2974) +++ sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/src/ma= in/webapp/WEB-INF/portlet.xml 2010-05-04 15:24:41 UTC (rev 2975) @@ -5,8 +5,8 @@ xsi:schemaLocation=3D"http://java.sun.com/xml/ns/portlet/portlet-app_2_= 0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"> - JSPHelloUserPortlet - org.jboss.portal.portlet.samples.JSPHelloUserPortlet<= /portlet-class> + JSPIPhoneHelloWorldPortlet + org.jboss.portal.portlet.samples.JSPIPhoneHelloWorldP= ortlet text/html view @@ -14,7 +14,7 @@ help - JSP Hello User Portlet + JSP iPhone Hello World Portlet \ No newline at end of file Modified: sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/= src/main/webapp/jsp/welcome.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/src/ma= in/webapp/jsp/welcome.jsp 2010-05-04 14:58:39 UTC (rev 2974) +++ sandbox/mobile_delivery/trunk/examples/portlets/iPhonehelloworld/src/ma= in/webapp/jsp/welcome.jsp 2010-05-04 15:24:41 UTC (rev 2975) @@ -1,37 +1,6 @@ <%@ taglib uri=3D"http://java.sun.com/portlet_2_0" prefix=3D"portlet" %> = -
Welcome !
- -
-
+Hello world portlet for iPhone ! +
= - Welcome on the JSP Hello User portlet, -my name is JBoss Portal. What's yours ? - -
- -
Method 1: We simply pass the parameter to the = render phase:
-">John Doe
- -
- -
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. - - - -
-">John Doe
- -
- -
Method 3: We use a form:
- - -
" method=3D"POST"> - Name: - - -
-
\ No newline at end of file Modified: sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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 @@ --> org.gatein.portal.examples.portlets - gatein-jsp-hellouser + gatein-jsp-iPhonemenu 3.0.0-unine-SNAPSHOT war - GateIn Portal Examples - JSP Hello User Portlet + GateIn Portal - JSP iPhone Menu Portlet = Deleted: sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/mai= n/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/jav= a/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java 2010-05-04 14:5= 8:39 UTC (rev 2974) +++ sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/jav= a/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java 2010-05-04 15:2= 4: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) thro= ws PortletException, IOException - { - String sYourName =3D (String) request.getParameter("yourname"); - if (sYourName !=3D null) - { - PortletRequestDispatcher prd =3D getPortletContext().getRequestDi= spatcher("/jsp/hello.jsp"); - prd.include(request, response); - } - else - { - PortletRequestDispatcher prd =3D getPortletContext().getRequestDi= spatcher("/jsp/welcome.jsp"); - prd.include(request, response); - } - } - - protected void doHelp(RenderRequest rRequest, RenderResponse rResponse)= throws PortletException, IOException, - UnavailableException - { - rResponse.setContentType("text/html"); - PortletRequestDispatcher prd =3D getPortletContext().getRequestDispa= tcher("/jsp/help.jsp"); - prd.include(rRequest, rResponse); - } - - protected void doEdit(RenderRequest rRequest, RenderResponse rResponse)= throws PortletException, IOException, - UnavailableException - { - rResponse.setContentType("text/html"); - PortletRequestDispatcher prd =3D getPortletContext().getRequestDispa= tcher("/jsp/edit.jsp"); - prd.include(rRequest, rResponse); - } - - public void processAction(ActionRequest aRequest, ActionResponse aRespo= nse) throws PortletException, IOException, - UnavailableException - { - String sYourname =3D (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/j= ava/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/jav= a/org/jboss/portal/portlet/samples/JSPIPhoneMenuPortlet.java = (rev 0) +++ sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/jav= a/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) thro= ws PortletException, IOException + { + String sYourName =3D (String) request.getParameter("yourname"); + if (sYourName !=3D null) + { + PortletRequestDispatcher prd =3D getPortletContext().getRequestDi= spatcher("/jsp/hello.jsp"); + prd.include(request, response); + } + else + { + PortletRequestDispatcher prd =3D getPortletContext().getRequestDi= spatcher("/jsp/welcome.jsp"); + prd.include(request, response); + } + } + + protected void doHelp(RenderRequest rRequest, RenderResponse rResponse)= throws PortletException, IOException, + UnavailableException + { + rResponse.setContentType("text/html"); + PortletRequestDispatcher prd =3D getPortletContext().getRequestDispa= tcher("/jsp/help.jsp"); + prd.include(rRequest, rResponse); + } + + protected void doEdit(RenderRequest rRequest, RenderResponse rResponse)= throws PortletException, IOException, + UnavailableException + { + rResponse.setContentType("text/html"); + PortletRequestDispatcher prd =3D getPortletContext().getRequestDispa= tcher("/jsp/edit.jsp"); + prd.include(rRequest, rResponse); + } + + public void processAction(ActionRequest aRequest, ActionResponse aRespo= nse) throws PortletException, IOException, + UnavailableException + { + String sYourname =3D (String) aRequest.getParameter("yourname"); + aResponse.setRenderParameter("yourname", sYourname); + } + + +} Modified: sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/ma= in/webapp/WEB-INF/portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/web= app/WEB-INF/portlet.xml 2010-05-04 14:58:39 UTC (rev 2974) +++ sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/web= app/WEB-INF/portlet.xml 2010-05-04 15:24:41 UTC (rev 2975) @@ -5,8 +5,8 @@ xsi:schemaLocation=3D"http://java.sun.com/xml/ns/portlet/portlet-app_2_= 0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"> - JSPHelloUserPortlet - org.jboss.portal.portlet.samples.JSPHelloUserPortlet<= /portlet-class> + JSPIPhoneMenuPortlet + org.jboss.portal.portlet.samples.JSPIPhoneMenuPortlet= text/html view @@ -14,7 +14,7 @@ help - JSP Hello User Portlet + JSP iPhone Menu Portlet \ No newline at end of file Modified: sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/ma= in/webapp/jsp/welcome.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/web= app/jsp/welcome.jsp 2010-05-04 14:58:39 UTC (rev 2974) +++ sandbox/mobile_delivery/trunk/examples/portlets/iPhonemenu/src/main/web= app/jsp/welcome.jsp 2010-05-04 15:24:41 UTC (rev 2975) @@ -1,37 +1,5 @@ <%@ taglib uri=3D"http://java.sun.com/portlet_2_0" prefix=3D"portlet" %> = -
Welcome !
- -
-
- - Welcome on the JSP Hello User portlet, -my name is JBoss Portal. What's yours ?
- -
- -
Method 1: We simply pass the parameter to the = render phase:
-">John Doe
- -
- -
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. - - - -
-">John Doe
- -
- -
Method 3: We use a form:
- - -
" method=3D"POST"> - Name: - - -
-
\ No newline at end of file +Menu portlet for iPhone. + --===============6740083147942124305==--