Author: julien(a)jboss.com
Date: 2007-02-12 17:15:50 -0500 (Mon, 12 Feb 2007)
New Revision: 6231
Modified:
docs/trunk/referenceGuide/en/modules/tutorials.xml
Log:
cosmetic : should not look like formatted by a monkey
Modified: docs/trunk/referenceGuide/en/modules/tutorials.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/tutorials.xml 2007-02-12 22:09:21 UTC (rev 6230)
+++ docs/trunk/referenceGuide/en/modules/tutorials.xml 2007-02-12 22:15:50 UTC (rev 6231)
@@ -112,9 +112,7 @@
you should have one java source file:
<emphasis>HelloWorldPortlet\src\main\org\jboss\portlet\hello\HelloWorldPortlet.java</emphasis>
, and it should contain the following:
- <programlisting>
- <![CDATA[
-package org.jboss.portlet.hello;
+ <programlisting><![CDATA[package org.jboss.portlet.hello;
import javax.portlet.GenericPortlet;
import javax.portlet.PortletException;
@@ -364,15 +362,13 @@
</listitem>
<listitem>
<para>
- <programlisting>
-
<![CDATA[<window-name>HelloWorldPortletWindow</window-name>]]></programlisting>
+
<programlisting><![CDATA[<window-name>HelloWorldPortletWindow</window-name>]]></programlisting>
Can be named anything.
</para>
</listitem>
<listitem>
<para>
- <programlisting>
-
<![CDATA[<instance-ref>HelloWorldPortletInstance</instance-ref>]]></programlisting>
+
<programlisting><![CDATA[<instance-ref>HelloWorldPortletInstance</instance-ref>]]></programlisting>
The value of
<emphasis>instance-ref</emphasis>
must match the value of
@@ -464,8 +460,7 @@
:
<programlisting><![CDATA[
18:25:56,366 INFO [Server] JBoss (MX MicroKernel) [4.0.3SP1 (build:
CVSTag=JBoss_4_0_3_SP1 date=200510231054)] Started in 1m:3s:688ms
-18:26:21,147 INFO [TomcatDeployer] deploy, ctxPath=/helloworldportlet,
warUrl=.../tmp/deploy/tmp35219helloworldportlet-exp.war/
- ]]></programlisting>
+18:26:21,147 INFO [TomcatDeployer] deploy, ctxPath=/helloworldportlet,
warUrl=.../tmp/deploy/tmp35219helloworldportlet-exp.war/]]></programlisting>
Pointing your browser to
<ulink
url="http://localhost:8080/portal/">http://localhost:8080/portal/</ulink>
, should yield a view of our HelloWorldPortlet:
@@ -520,9 +515,7 @@
you should have one java source file:
<emphasis>HelloWorldPortlet\src\main\org\jboss\portlet\hello\HelloWorldJSPPortlet.java</emphasis>
, and it should contain the following:
- <programlisting>
- <![CDATA[
-package org.jboss.portlet.hello;
+ <programlisting><![CDATA[package org.jboss.portlet.hello;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
@@ -583,13 +576,11 @@
<itemizedlist>
<listitem>
<para>
- <programlisting>
- <![CDATA[
- protected void doHelp
+ <programlisting><![CDATA[ protected void
doHelp(RenderRequest rRequest, RenderResponse rResponse) { ... }
- AND
+// And
- protected void doEdit]]>
+protected void doEdit(RenderRequest rRequest, RenderResponse rResponse) { ... } ]]>
</programlisting>
Support for these Modes must be declared in the portlet.xml. They
will be triggered when a user
clicks on the respective icons in the portlet window titlebar, or
through generated links within
@@ -606,8 +597,7 @@
// do something
aResponse.setRenderParameter("yourname", sYourname);
-}
- ]]></programlisting>
+}]]></programlisting>
This method will be triggered upon clicking on an ActionURL from
our view.jsp. It will retrieve
<emphasis>yourname</emphasis>
from the HTML form, and pass it along as a renderParameter to the
doView().
@@ -742,8 +732,7 @@
<itemizedlist>
<listitem>
<para>
- <programlisting>
- <![CDATA[<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>]]></programlisting>
+ <programlisting><![CDATA[<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>]]></programlisting>
Define the portlet taglib. You do not need to bundle the portlet
taglib, JBoss Portal will
handle that for you.
</para>
@@ -760,8 +749,7 @@
</listitem>
<listitem>
<para>
- <programlisting>
- <![CDATA[<form
action="<portlet:actionURL><portlet:param name="page"
value="mainview"/></portlet:actionURL>"
method="POST">]]></programlisting>
+ <programlisting><![CDATA[<form
action="<portlet:actionURL><portlet:param name="page"
value="mainview"/></portlet:actionURL>"
method="POST">]]></programlisting>
We create an HTML form, but generate the URL it will post to,
using the portlet tag library. In
this case, notice how we are creating an
<emphasis>actionURL</emphasis>
@@ -845,8 +833,7 @@
:
<programlisting><![CDATA[
15:54:34,234 INFO [Server] JBoss (MX MicroKernel) [4.0.4.CR2 (build:
CVSTag=JBoss_4_0_4_CR2 date=200603311500)] Started in 1m:9s:766ms
-15:55:04,062 INFO [TomcatDeployer] deploy, ctxPath=/helloworldjspportlet,
warUrl=.../tmp/deploy/tmp57782helloworldjspportlet-exp.war/
- ]]></programlisting>
+15:55:04,062 INFO [TomcatDeployer] deploy, ctxPath=/helloworldjspportlet,
warUrl=.../tmp/deploy/tmp57782helloworldjspportlet-exp.war/]]></programlisting>
Pointing your browser to
<ulink
url="http://localhost:8080/portal/">http://localhost:8080/portal/</ulink>
, should yield a view of our HelloWorldPortlet: