Author: julien(a)jboss.com
Date: 2007-06-26 11:59:38 -0400 (Tue, 26 Jun 2007)
New Revision: 7554
Added:
trunk/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/jsp/
trunk/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/jsp/jsp/
trunk/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/jsp/jsp/view.jsp
trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/default-object.xml
trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/xsl/
trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/xsl/news/
trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/xsl/news/Rss1.xsl
trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/xsl/news/Rss2.xsl
trunk/core-samples/src/resources/portal-weather-samples-war/WEB-INF/default-object.xml
trunk/core-samples/src/resources/portal-weather-samples-war/WEB-INF/xsl/
trunk/core-samples/src/resources/portal-weather-samples-war/WEB-INF/xsl/weather/
trunk/core-samples/src/resources/portal-weather-samples-war/WEB-INF/xsl/weather/Rss.xsl
Removed:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/
trunk/core-samples/src/resources/portal-basic-samples-war/WEB-INF/jsp/info/view.jsp
trunk/core-samples/src/resources/portal-basic-samples-war/WEB-INF/xsl/news/Rss1.xsl
trunk/core-samples/src/resources/portal-basic-samples-war/WEB-INF/xsl/news/Rss2.xsl
Modified:
trunk/core-samples/build.xml
trunk/core-samples/src/main/org/jboss/portal/core/samples/jsp/JSPPortlet.java
trunk/core-samples/src/resources/portal-basic-samples-war/WEB-INF/default-object.xml
trunk/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/portlet.xml
trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/portlet.xml
trunk/core-samples/src/resources/portal-weather-samples-war/WEB-INF/portlet.xml
Log:
consolidate new samples structure
Modified: trunk/core-samples/build.xml
===================================================================
--- trunk/core-samples/build.xml 2007-06-26 15:28:42 UTC (rev 7553)
+++ trunk/core-samples/build.xml 2007-06-26 15:59:38 UTC (rev 7554)
@@ -193,28 +193,19 @@
<!-- portal-basic-samples-lib.jar -->
<jar jarfile="${build.lib}/portal-basic-samples-lib.jar">
- <fileset dir="${build.classes}"
includes="org/jboss/portal/core/portlet/basic/**">
+ <fileset dir="${build.classes}"
includes="org/jboss/portal/core/samples/basic/**">
</fileset>
</jar>
- <copy todir="${build.resources}/portal-basic-samples">
+ <copy todir="${build.resources}/portal-basic-samples.sar">
<fileset dir="${build.resources}/portal-basic-samples-sar"/>
</copy>
- <copy
todir="${build.resources}/portal-samples/portal-basic-samples.war">
+ <copy
todir="${build.resources}/portal-basic-samples.sar/portal-basic-samples.war">
<fileset dir="${source.bin}/portal-basic-samples-war"/>
<fileset dir="${build.resources}/portal-basic-samples-war"/>
</copy>
- <copy todir="${build.resources}/portal-basic-samples/lib">
+ <copy todir="${build.resources}/portal-basic-samples.sar/lib">
<fileset dir="${build.lib}"
includes="portal-basic-samples-lib.jar"/>
</copy>
- <copy todir="${build.resources}/portal-basic-samples.sar">
- <fileset dir="${build.resources}/portal-basic-samples"
excludes="**/*.xml"/>
- </copy>
- <copy todir="${build.resources}/portal-basic-samples.sar">
- <filterset>
- <filtersfile file="../build/etc/single.properties"/>
- </filterset>
- <fileset dir="${build.resources}/portal-basic-samples"
includes="**/*.xml"/>
- </copy>
<!-- portal-jsp-samples.war -->
<copy todir="${build.resources}/portal-jsp-samples.war">
Modified: trunk/core-samples/src/main/org/jboss/portal/core/samples/jsp/JSPPortlet.java
===================================================================
---
trunk/core-samples/src/main/org/jboss/portal/core/samples/jsp/JSPPortlet.java 2007-06-26
15:28:42 UTC (rev 7553)
+++
trunk/core-samples/src/main/org/jboss/portal/core/samples/jsp/JSPPortlet.java 2007-06-26
15:59:38 UTC (rev 7554)
@@ -33,7 +33,7 @@
*/
public class JSPPortlet extends GenericPortlet
{
- private static final String JSP_PATH = "/WEB-INF/jsp/info";
+ private static final String JSP_PATH = "/WEB-INF/jsp/jsp";
protected void doView(RenderRequest rRequest, RenderResponse rResponse) throws
PortletException, IOException, UnavailableException
{
Modified:
trunk/core-samples/src/resources/portal-basic-samples-war/WEB-INF/default-object.xml
===================================================================
---
trunk/core-samples/src/resources/portal-basic-samples-war/WEB-INF/default-object.xml 2007-06-26
15:28:42 UTC (rev 7553)
+++
trunk/core-samples/src/resources/portal-basic-samples-war/WEB-INF/default-object.xml 2007-06-26
15:59:38 UTC (rev 7554)
@@ -31,37 +31,6 @@
<parent-ref>default</parent-ref>
<if-exists>keep</if-exists>
<page>
- <page-name>News</page-name>
- <properties>
- <property>
- <name>order</name>
- <value>3</value>
- </property>
- </properties>
- <window>
- <window-name>WeatherPortletWindow</window-name>
- <instance-ref>WeatherPortletInstance</instance-ref>
- <region>left</region>
- <height>0</height>
- </window>
- <window>
- <window-name>NewsPortletWindow</window-name>
- <instance-ref>NewsPortletInstance</instance-ref>
- <region>center</region>
- <height>0</height>
- </window>
- <window>
- <window-name>NewsPortletWindow2</window-name>
- <instance-ref>NewsPortletInstance2</instance-ref>
- <region>center</region>
- <height>1</height>
- </window>
- </page>
- </deployment>
- <deployment>
- <parent-ref>default</parent-ref>
- <if-exists>keep</if-exists>
- <page>
<page-name>Test</page-name>
<properties>
<property>
Deleted:
trunk/core-samples/src/resources/portal-basic-samples-war/WEB-INF/jsp/info/view.jsp
===================================================================
---
trunk/core-samples/src/resources/portal-basic-samples-war/WEB-INF/jsp/info/view.jsp 2007-06-26
15:28:42 UTC (rev 7553)
+++
trunk/core-samples/src/resources/portal-basic-samples-war/WEB-INF/jsp/info/view.jsp 2007-06-26
15:59:38 UTC (rev 7554)
@@ -1,63 +0,0 @@
-<%@ page import="org.jboss.portal.server.PortalConstants" %>
-<%--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-~ 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"
%>
-<%@ page isELIgnored="false" %>
-
-<portlet:defineObjects/>
-
-<table border="0" cellspacing="2" cellpadding="2">
- <tr>
- <td align="center"><a
href="http://portal.demo.jboss.com" target="_blank"><img
- src="<%= renderRequest.getContextPath() %>/images/dodemo.gif"
border="0"
- alt="Try the latest release of JBoss Portal, live and
online."></a>
- <a
href="http://labs.jboss.com/portal/jbossportal/download/index.html&q...
target="_blank"><img
- src="<%= renderRequest.getContextPath()
%>/images/getcode.gif" border="0"
- alt="Download JBoss Portal and have it up and running in
minutes."></a>
- <a href="http://www.portletswap.com"
target="_blank"><img
- src="<%= renderRequest.getContextPath()
%>/images/accessorize.gif" border="0"
- alt="Download portlets and layouts for your new JBoss Portal
installation."></a></td>
- </tr>
- <tr>
- <td></td>
- </tr>
- <tr>
- <td class="portlet-section-alternate">
- <font class="portlet-font">This is a basic installation of
<b><%= PortalConstants.VERSION %></b>. You may
- log in at any time, using the <i>Login</i> link at the top-right
of this page, with the following
- credentials:</font>
- </td>
- </tr>
- <tr>
- <td class="portlet-section-alternate" align="center">
- <b>user/user</b> or <b>admin/admin</b>
- </td>
- </tr>
- <tr>
- <td align="center">
- If you are in need of guidance with regards to navigating, configuring, or
operating the portal, please view
- our <a
href="http://labs.jboss.com/portal/jbossportal/docs/index.html"
target="_blank">online documentation</a>.
- </td>
- </tr>
-</table>
Deleted:
trunk/core-samples/src/resources/portal-basic-samples-war/WEB-INF/xsl/news/Rss1.xsl
===================================================================
---
trunk/core-samples/src/resources/portal-basic-samples-war/WEB-INF/xsl/news/Rss1.xsl 2007-06-26
15:28:42 UTC (rev 7553)
+++
trunk/core-samples/src/resources/portal-basic-samples-war/WEB-INF/xsl/news/Rss1.xsl 2007-06-26
15:59:38 UTC (rev 7554)
@@ -1,54 +0,0 @@
-<?xml version="1.0"?>
-
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ 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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<xsl:stylesheet
-
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
-
- <xsl:output method="html"/>
-
- <xsl:template match="/">
- <TABLE WIDTH="100%" BORDER="0" CELLPADDING="2"
CELLSPACING="0">
- <xsl:apply-templates/>
- </TABLE>
- </xsl:template>
-
- <xsl:template match="item">
- <TR>
- <TD>
- -
- <A TARGET="_popup" STYLE="text-decoration: none;">
- <xsl:attribute name="HREF">
- <xsl:value-of select="link"/>
- </xsl:attribute>
- <xsl:value-of select="title"/>
- </A>
- </TD>
- </TR>
- <xsl:apply-templates/>
- </xsl:template>
-
- <xsl:template match="text()"/>
-</xsl:stylesheet>
\ No newline at end of file
Deleted:
trunk/core-samples/src/resources/portal-basic-samples-war/WEB-INF/xsl/news/Rss2.xsl
===================================================================
---
trunk/core-samples/src/resources/portal-basic-samples-war/WEB-INF/xsl/news/Rss2.xsl 2007-06-26
15:28:42 UTC (rev 7553)
+++
trunk/core-samples/src/resources/portal-basic-samples-war/WEB-INF/xsl/news/Rss2.xsl 2007-06-26
15:59:38 UTC (rev 7554)
@@ -1,46 +0,0 @@
-<?xml version="1.0" ?>
-<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
- <xsl:output method="xml" omit-xml-declaration="yes"
indent="yes"/>
-
- <xsl:variable name="link-path">
- <xsl:value-of select="rss/channel/link"/>
- </xsl:variable>
-
- <xsl:template match="/">
- <div style="font-size: 1.5em;"
class="portlet-section-header">
- <a href="{$link-path}" target="_blank">
- <xsl:value-of select="rss/channel/title"/> - <xsl:value-of
select="rss/channel/description"/>
- </a>
- </div>
- <ul>
- <xsl:for-each select="rss/channel/item">
- <xsl:variable name="this-link">
- <xsl:value-of select="link"/>
- </xsl:variable>
- <li>
- <div class="portlet-section-subheader">
- <a href="{$this-link}" target="_blank">
- <xsl:value-of select="title"/>
- </a>
- </div>
- <div class="portlet-font-dim">
- <xsl:if test="string(author)">
- <xsl:value-of select="author"/>
- </xsl:if>
- <xsl:if test="string(author) and string(pubDate)">
-  - 
- </xsl:if>
- <xsl:if test="string(pubDate)">
- <xsl:value-of select="pubDate"/>
- </xsl:if>
- </div>
- </li>
- <!-- <xsl:value-of select="description"
disable-output-escaping="yes"/>
- <br/>-->
- </xsl:for-each>
- </ul>
- <br/>
- <br/>
- <xsl:value-of select="rss/channel/copyright"/>
- </xsl:template>
-</xsl:stylesheet>
Added: trunk/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/jsp/jsp/view.jsp
===================================================================
--- trunk/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/jsp/jsp/view.jsp
(rev 0)
+++
trunk/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/jsp/jsp/view.jsp 2007-06-26
15:59:38 UTC (rev 7554)
@@ -0,0 +1,63 @@
+<%@ page import="org.jboss.portal.server.PortalConstants" %>
+<%--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~ 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"
%>
+<%@ page isELIgnored="false" %>
+
+<portlet:defineObjects/>
+
+<table border="0" cellspacing="2" cellpadding="2">
+ <tr>
+ <td align="center"><a
href="http://portal.demo.jboss.com" target="_blank"><img
+ src="<%= renderRequest.getContextPath() %>/images/dodemo.gif"
border="0"
+ alt="Try the latest release of JBoss Portal, live and
online."></a>
+ <a
href="http://labs.jboss.com/portal/jbossportal/download/index.html&q...
target="_blank"><img
+ src="<%= renderRequest.getContextPath()
%>/images/getcode.gif" border="0"
+ alt="Download JBoss Portal and have it up and running in
minutes."></a>
+ <a href="http://www.portletswap.com"
target="_blank"><img
+ src="<%= renderRequest.getContextPath()
%>/images/accessorize.gif" border="0"
+ alt="Download portlets and layouts for your new JBoss Portal
installation."></a></td>
+ </tr>
+ <tr>
+ <td></td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate">
+ <font class="portlet-font">This is a basic installation of
<b><%= PortalConstants.VERSION %></b>. You may
+ log in at any time, using the <i>Login</i> link at the top-right
of this page, with the following
+ credentials:</font>
+ </td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate" align="center">
+ <b>user/user</b> or <b>admin/admin</b>
+ </td>
+ </tr>
+ <tr>
+ <td align="center">
+ If you are in need of guidance with regards to navigating, configuring, or
operating the portal, please view
+ our <a
href="http://labs.jboss.com/portal/jbossportal/docs/index.html"
target="_blank">online documentation</a>.
+ </td>
+ </tr>
+</table>
Modified: trunk/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/portlet.xml
===================================================================
--- trunk/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/portlet.xml 2007-06-26
15:28:42 UTC (rev 7553)
+++ trunk/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/portlet.xml 2007-06-26
15:59:38 UTC (rev 7554)
@@ -31,7 +31,7 @@
<description>Simple JSP portlet</description>
<portlet-name>JSPPortlet</portlet-name>
<display-name>JSP Portlet</display-name>
-
<portlet-class>org.jboss.samples.portlet.jsp.JSPPortlet</portlet-class>
+
<portlet-class>org.jboss.portal.core.samples.jsp.JSPPortlet</portlet-class>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
Added:
trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/default-object.xml
===================================================================
--- trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/default-object.xml
(rev 0)
+++
trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/default-object.xml 2007-06-26
15:59:38 UTC (rev 7554)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE deployments PUBLIC
+ "-//JBoss Portal//DTD Portal Object 2.6//EN"
+ "http://www.jboss.org/portal/dtd/portal-object_2_6.dtd">
+
+<deployments>
+ <deployment>
+ <parent-ref>default</parent-ref>
+ <if-exists>keep</if-exists>
+ <page>
+ <page-name>News</page-name>
+ <properties>
+ <property>
+ <name>order</name>
+ <value>3</value>
+ </property>
+ </properties>
+ <window>
+ <window-name>NewsPortletWindow</window-name>
+ <instance-ref>NewsPortletInstance</instance-ref>
+ <region>center</region>
+ <height>1</height>
+ </window>
+ <window>
+ <window-name>NewsPortletWindow2</window-name>
+ <instance-ref>NewsPortletInstance2</instance-ref>
+ <region>center</region>
+ <height>2</height>
+ </window>
+ </page>
+ </deployment>
+</deployments>
Modified: trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/portlet.xml
===================================================================
---
trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/portlet.xml 2007-06-26
15:28:42 UTC (rev 7553)
+++
trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/portlet.xml 2007-06-26
15:59:38 UTC (rev 7554)
@@ -31,7 +31,7 @@
<description>Portlet aggregating news from different
feeds</description>
<portlet-name>NewsPortlet</portlet-name>
<display-name>News Portlet</display-name>
-
<portlet-class>org.jboss.samples.portlet.news.NewsPortlet</portlet-class>
+
<portlet-class>org.jboss.portal.core.samples.news.NewsPortlet</portlet-class>
<init-param>
<name>RSS1_XSL</name>
<value>/WEB-INF/Rss1.xsl</value>
Added: trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/xsl/news/Rss1.xsl
===================================================================
--- trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/xsl/news/Rss1.xsl
(rev 0)
+++
trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/xsl/news/Rss1.xsl 2007-06-26
15:59:38 UTC (rev 7554)
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<xsl:stylesheet
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+ <xsl:output method="html"/>
+
+ <xsl:template match="/">
+ <TABLE WIDTH="100%" BORDER="0" CELLPADDING="2"
CELLSPACING="0">
+ <xsl:apply-templates/>
+ </TABLE>
+ </xsl:template>
+
+ <xsl:template match="item">
+ <TR>
+ <TD>
+ -
+ <A TARGET="_popup" STYLE="text-decoration: none;">
+ <xsl:attribute name="HREF">
+ <xsl:value-of select="link"/>
+ </xsl:attribute>
+ <xsl:value-of select="title"/>
+ </A>
+ </TD>
+ </TR>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="text()"/>
+</xsl:stylesheet>
\ No newline at end of file
Added: trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/xsl/news/Rss2.xsl
===================================================================
--- trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/xsl/news/Rss2.xsl
(rev 0)
+++
trunk/core-samples/src/resources/portal-news-samples-war/WEB-INF/xsl/news/Rss2.xsl 2007-06-26
15:59:38 UTC (rev 7554)
@@ -0,0 +1,46 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
+ <xsl:output method="xml" omit-xml-declaration="yes"
indent="yes"/>
+
+ <xsl:variable name="link-path">
+ <xsl:value-of select="rss/channel/link"/>
+ </xsl:variable>
+
+ <xsl:template match="/">
+ <div style="font-size: 1.5em;"
class="portlet-section-header">
+ <a href="{$link-path}" target="_blank">
+ <xsl:value-of select="rss/channel/title"/> - <xsl:value-of
select="rss/channel/description"/>
+ </a>
+ </div>
+ <ul>
+ <xsl:for-each select="rss/channel/item">
+ <xsl:variable name="this-link">
+ <xsl:value-of select="link"/>
+ </xsl:variable>
+ <li>
+ <div class="portlet-section-subheader">
+ <a href="{$this-link}" target="_blank">
+ <xsl:value-of select="title"/>
+ </a>
+ </div>
+ <div class="portlet-font-dim">
+ <xsl:if test="string(author)">
+ <xsl:value-of select="author"/>
+ </xsl:if>
+ <xsl:if test="string(author) and string(pubDate)">
+  - 
+ </xsl:if>
+ <xsl:if test="string(pubDate)">
+ <xsl:value-of select="pubDate"/>
+ </xsl:if>
+ </div>
+ </li>
+ <!-- <xsl:value-of select="description"
disable-output-escaping="yes"/>
+ <br/>-->
+ </xsl:for-each>
+ </ul>
+ <br/>
+ <br/>
+ <xsl:value-of select="rss/channel/copyright"/>
+ </xsl:template>
+</xsl:stylesheet>
Added:
trunk/core-samples/src/resources/portal-weather-samples-war/WEB-INF/default-object.xml
===================================================================
---
trunk/core-samples/src/resources/portal-weather-samples-war/WEB-INF/default-object.xml
(rev 0)
+++
trunk/core-samples/src/resources/portal-weather-samples-war/WEB-INF/default-object.xml 2007-06-26
15:59:38 UTC (rev 7554)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE deployments PUBLIC
+ "-//JBoss Portal//DTD Portal Object 2.6//EN"
+ "http://www.jboss.org/portal/dtd/portal-object_2_6.dtd">
+
+<deployments>
+ <deployment>
+ <parent-ref>default</parent-ref>
+ <if-exists>keep</if-exists>
+ <page>
+ <page-name>Weather</page-name>
+ <properties>
+ <property>
+ <name>order</name>
+ <value>3</value>
+ </property>
+ </properties>
+ <window>
+ <window-name>WeatherPortletWindow</window-name>
+ <instance-ref>WeatherPortletInstance</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ </page>
+ </deployment>
+</deployments>
Modified: trunk/core-samples/src/resources/portal-weather-samples-war/WEB-INF/portlet.xml
===================================================================
---
trunk/core-samples/src/resources/portal-weather-samples-war/WEB-INF/portlet.xml 2007-06-26
15:28:42 UTC (rev 7553)
+++
trunk/core-samples/src/resources/portal-weather-samples-war/WEB-INF/portlet.xml 2007-06-26
15:59:38 UTC (rev 7554)
@@ -31,7 +31,7 @@
<description>Portlet providing weather forecast</description>
<portlet-name>WeatherPortlet</portlet-name>
<display-name>Weather Portlet</display-name>
-
<portlet-class>org.jboss.samples.portlet.weather.WeatherPortlet</portlet-class>
+
<portlet-class>org.jboss.portal.core.samples.weather.WeatherPortlet</portlet-class>
<init-param>
<name>default_zipcode</name>
<value>33145</value>
Added:
trunk/core-samples/src/resources/portal-weather-samples-war/WEB-INF/xsl/weather/Rss.xsl
===================================================================
---
trunk/core-samples/src/resources/portal-weather-samples-war/WEB-INF/xsl/weather/Rss.xsl
(rev 0)
+++
trunk/core-samples/src/resources/portal-weather-samples-war/WEB-INF/xsl/weather/Rss.xsl 2007-06-26
15:59:38 UTC (rev 7554)
@@ -0,0 +1,100 @@
+<?xml version="1.0" ?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
+ <xsl:output method="xml" omit-xml-declaration="yes"
indent="yes"/>
+ <xsl:variable
name="image-path">http://us.i1.yimg.com/us.yimg.com/i/us/we/...
+ <xsl:variable name="link-path">
+ <xsl:value-of select="rss/channel/link"/>
+ </xsl:variable>
+ <xsl:template match="/">
+ <br/>
+ <div align="center">
+ <font>
+ <b>
+ <xsl:for-each select="rss/channel/location">
+ <xsl:value-of select="@city"/>, <xsl:value-of
select="@region"/>, <xsl:value-of
+ select="@country"/>
+ </xsl:for-each>
+ </b>
+ </font>
+ <br/>
+ <br/>
+ <table width="130" border="0">
+ <tr>
+ <xsl:for-each select="rss/channel/item/condition">
+ <td>
+ <table border="0" height="130">
+ <tr>
+ <td class="portlet-section-header"
align="center">Currently</td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate"
align="center" valign="top">
+ <img src="{$image-path}/{(a)code}.gif"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate"
align="center" valign="top">
+ <xsl:value-of select="@text"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate"
align="center" valign="top">
+ <xsl:value-of select="@temp"/>F</td>
+ </tr>
+ </table>
+ </td>
+ </xsl:for-each>
+ <xsl:for-each select="rss/channel/item/forecast">
+ <td>
+ <table border="0" height="130">
+ <tr>
+ <td class="portlet-section-header"
align="center" valign="top">
+ <xsl:value-of select="@day"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate"
align="center" valign="top">
+ <img src="{$image-path}/{(a)code}.gif"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate"
align="center" valign="top">
+ <xsl:value-of select="@text"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate"
align="center" valign="top">
+ <xsl:value-of
select="@low"/>F/<xsl:value-of select="@high"/>F</td>
+ </tr>
+ </table>
+ </td>
+ </xsl:for-each>
+ </tr>
+ </table>
+ <br/>
+ <a href="{$link-path}" target="_blank">Complete
Forecast</a>
+ </div>
+ </xsl:template>
+</xsl:stylesheet>