Author: thomas.heute(a)jboss.com
Date: 2007-11-19 05:33:43 -0500 (Mon, 19 Nov 2007)
New Revision: 9022
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-weather-samples-war/images/weather_config1.png
branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-weather-samples-war/images/weather_config2.png
branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-weather-samples-war/images/weather_config3.png
branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-weather-samples-war/images/weather_config4.png
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/jsp/weather/help.jsp
Modified:
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/weather/WeatherPortlet.java
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/jsp/news/help.jsp
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/portlet.xml
Log:
Weather Help mode
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-weather-samples-war/images/weather_config1.png
===================================================================
(Binary files differ)
Property changes on:
branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-weather-samples-war/images/weather_config1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-weather-samples-war/images/weather_config2.png
===================================================================
(Binary files differ)
Property changes on:
branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-weather-samples-war/images/weather_config2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-weather-samples-war/images/weather_config3.png
===================================================================
(Binary files differ)
Property changes on:
branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-weather-samples-war/images/weather_config3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-weather-samples-war/images/weather_config4.png
===================================================================
(Binary files differ)
Property changes on:
branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-weather-samples-war/images/weather_config4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified:
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/weather/WeatherPortlet.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/weather/WeatherPortlet.java 2007-11-19
09:31:38 UTC (rev 9021)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/core/samples/weather/WeatherPortlet.java 2007-11-19
10:33:43 UTC (rev 9022)
@@ -62,6 +62,9 @@
/** Edit page */
private static final String JSP_EDIT = "/WEB-INF/jsp/weather/edit.jsp";
+ /** Help page */
+ private static final String JSP_HELP = "/WEB-INF/jsp/weather/help.jsp";
+
/** Default zip set in init param. */
private String DEFAULT_ZIP;
@@ -181,6 +184,13 @@
dispatcher.include(request, response);
}
+ protected void doHelp(RenderRequest request, RenderResponse response) throws
IOException, PortletException
+ {
+ response.setContentType("text/html");
+ PortletRequestDispatcher dispatcher =
getPortletContext().getRequestDispatcher(JSP_HELP);
+ dispatcher.include(request, response);
+ }
+
/**
* Process weather location edit and store in user preferences.
*
Modified:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/jsp/news/help.jsp
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/jsp/news/help.jsp 2007-11-19
09:31:38 UTC (rev 9021)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/jsp/news/help.jsp 2007-11-19
10:33:43 UTC (rev 9022)
@@ -30,7 +30,7 @@
<br/>
<div class="portlet-font">Description: The news Portlet retrieves an RSS
news feed from a URL and displays it as HTML to the user.</div>
<br/>
-<div class="portlet-font">To change the RSS feed source, simply <a
href="<portlet:renderURL portletMode='edit'/>">go to the edit
mode</a> and enter the URL of the new RSS feed source such as:
+<div class="portlet-font">To change the RSS feed source, simply go to the
edit mode after being logged-in and enter the URL of the new RSS feed source such as:
<font
style="font-style:italic">http://feeds.feedburner.com/JBossP...;.
The new RSS feed source will be stored and used each time the user will be
logged-in.</div>
<br/>
<div class="portlet-msg-info">This sample portlet is able to handle most
RSS 1.0 and RSS 2.0 feeds</div>
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/jsp/weather/help.jsp
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/jsp/weather/help.jsp
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/jsp/weather/help.jsp 2007-11-19
10:33:43 UTC (rev 9022)
@@ -0,0 +1,58 @@
+<%--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
+
+<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+
+<portlet:defineObjects/>
+
+<div class="portlet-font"
style="font-size:larger;font-weight:bold">Weather Portlet Help:</div>
+</div>
+<br/>
+<div class="portlet-font">Description: The weather portlet retrieves an
RSS weather feed, based on a key (Can be a US Postal Code), and displays it as HTML to the
user.</div>
+<br/>
+<div class="portlet-font">The user can change the weather forecast for
the location of his choice by going to the edit mode after being logged-in and entering
the key for that
+particular location.</div>
+<br/>
+<div class="portlet-font" style="font-size:larger">How to get
the key:</div>
+</div>
+<br/>
+<div class="portlet-font">For a location is the US, the key is simply the
zipcode. For a location outside the US you need to get the key by
+doing the following steps:
+ <ol>
+ <li>Go to <a href="http://weather.yahoo.com"
target="_blank">http://weather.yahoo.com</a></li>
+ <li>Enter your city name in the location field found on that page
+ <div style="text-align:center;margin-bottom:1em"><img
src="<%= renderRequest.getContextPath()
%>/images/weather_config1.png"/></div>
+ </li>
+ <li>Find your location on the list under the form and click on it (<font
style="font-style:italic">Neuchatel, NE CH</font>, in this case)
+ <div style="text-align:center;margin-bottom:1em"><img
src="<%= renderRequest.getContextPath()
%>/images/weather_config2.png"/></div>
+ </li>
+ <li>Copy the location digits from the address bar in your browser (<font
style="font-style:italic">SZXX0023</font> in this case)
+ <div style="text-align:center;margin-bottom:1em"><img
src="<%= renderRequest.getContextPath()
%>/images/weather_config3.png"/></div>
+ </li>
+ <li>Paste this key in the weather portlet edit form and press <font
style="font-style:italic">Submit</font>.
+ <div style="text-align:center;margin-bottom:1em"><img
src="<%= renderRequest.getContextPath()
%>/images/weather_config4.png"/></div>
+ </li>
+ </ol>
+</div>
+<br/>
+<div class="portlet-font"><a href="<portlet:renderURL
portletMode='view'/>">Back</a></div>
\ No newline at end of file
Modified:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/portlet.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/portlet.xml 2007-11-19
09:31:38 UTC (rev 9021)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/portlet.xml 2007-11-19
10:33:43 UTC (rev 9022)
@@ -49,6 +49,7 @@
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
<portlet-mode>EDIT</portlet-mode>
+ <portlet-mode>HELP</portlet-mode>
</supports>
<portlet-info>
<title>Weather Portlet</title>