Author: mmcallis
Date: 2008-07-13 21:20:40 -0400 (Sun, 13 Jul 2008)
New Revision: 11429
Modified:
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/xmldescriptors.xml
Log:
6.1.1. The JBoss Portlet DTD
- moving content out of variablelist: makes
docbook valid and code highlighting available.
Modified:
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/xmldescriptors.xml
===================================================================
---
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/xmldescriptors.xml 2008-07-14
00:57:06 UTC (rev 11428)
+++
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/xmldescriptors.xml 2008-07-14
01:20:40 UTC (rev 11429)
@@ -71,25 +71,19 @@
<para>
The following items refer to elements found in the JBoss Portlet DTD,
<filename>$JBOSS_HOME/server/<replaceable>configuration</replaceable>/deploy/jboss-portal.sar/dtd/jboss-portlet_<replaceable>version_number</replaceable>.dtd</filename>:
</para>
- <para>
- <variablelist>
- <varlistentry><term><programlisting><![CDATA[
+<programlisting><![CDATA[
<!ELEMENT portlet-app (remotable?,portlet*,service*)>]]>
-</programlisting></term>
-<listitem>
+</programlisting>
<para>
Use the <computeroutput><remotable></computeroutput> element
to configure the default behavior of portlets with respect to WSRP exposure: if no value
is given, the value is either the value globally defined at the portlet application level,
or <computeroutput>false</computeroutput>. Accepted values are
<computeroutput>true</computeroutput> and
<computeroutput>false</computeroutput>.
</para>
<para>
You can configure specific settings of the portlet container for each portlet defined
in the <filename>WEB-INF/portlet.xml</filename> file. Use the
<computeroutput><service></computeroutput> element to inject
services into the portlet context of applications.
</para>
-</listitem>
-</varlistentry>
-<varlistentry><term><programlisting><![CDATA[
+<programlisting><![CDATA[
<!ELEMENT portlet (portlet-name,remotable?,ajax?,session-config?,transaction?,
header-content?,portlet-info?)>]]>
-</programlisting></term>
-<listitem>
+</programlisting>
<para>
Additional configuration of the portlet. The
<computeroutput><portlet-name></computeroutput> element defines
the portlet name. It must match a portlet defined in the
<filename>WEB-INF/portlet.xml</filename> file for that application.
</para>
@@ -103,7 +97,7 @@
<para>
The following is an example section from a
<filename>WEB-INF/portlet.xml</filename> file, which uses the
<computeroutput><portlet-name></computeroutput>,
<computeroutput><remotable></computeroutput>, and
<computeroutput><trans-attribute></computeroutput> elements:
</para>
- <programlisting><![CDATA[
+<programlisting role="XML"><![CDATA[
<portlet>
<portlet-name>MyPortlet</portlet-name>
<remotable>true</remotable>
@@ -121,164 +115,125 @@
<para>
Accepted values are <computeroutput>true</computeroutput> and
<computeroutput>false</computeroutput>.
</para>
-</listitem>
-</varlistentry>
-<varlistentry><term><programlisting><![CDATA[
+<programlisting><![CDATA[
<!ELEMENT ajax (partial-refresh)>]]>
-</programlisting></term>
-<listitem>
+</programlisting>
<para>
Use the <computeroutput>ajax</computeroutput> element to configure the
Asynchronous JavaScript and XML (AJAX) capabilities of the portlet.
</para>
- <programlisting><![CDATA[
+<programlisting><![CDATA[
<!ELEMENT partial-refresh (#PCDATA)>]]>
</programlisting>
<para>
If a portlet uses the <computeroutput>true</computeroutput> value for the
<computeroutput><partial-refresh></computeroutput> element, the
portal uses partial-page refreshing and only renders that portlet. If the
<computeroutput><partial-refresh></computeroutput> element uses
a <computeroutput>false</computeroutput> value, the portal uses a full-page
refresh when the portlet is refreshed.
</para>
-</listitem>
-</varlistentry>
-<varlistentry><term><programlisting><![CDATA[
+<programlisting><![CDATA[
<!ELEMENT session-config (distributed)>]]>
-</programlisting></term>
-<listitem>
+</programlisting>
<para>
The <computeroutput><session-config></computeroutput> element
configures the portlet session for the portlet. The
<computeroutput><distributed></computeroutput> element instructs
the container to distribute the session attributes using portal session replication. This
only applies to local portlets, not remote portlets.
</para>
<para>
The following is an example of the
<computeroutput><session-config></computeroutput> and
<computeroutput><distributed></computeroutput> elements:
</para>
- <programlisting><![CDATA[
+<programlisting role="XML"><![CDATA[
<session-config>
<distributed>true</distributed>
</session-config>]]>
</programlisting>
- <programlisting><![CDATA[
+<programlisting><![CDATA[
<!ELEMENT distributed (#PCDATA)>]]>
</programlisting>
<para>
Accepted values are <computeroutput>true</computeroutput> and
<computeroutput>false</computeroutput>. The default value is
<computeroutput>false</computeroutput>.
</para>
-</listitem>
-</varlistentry>
-<varlistentry><term><programlisting><![CDATA[
+<programlisting><![CDATA[
<!ELEMENT transaction (trans-attribute)>]]>
-</programlisting></term>
-<listitem>
+</programlisting>
<para>
The <computeroutput><transaction></computeroutput> element
defines how the portlet behaves with regards to the transactional context. The
<computeroutput><trans-attribute></computeroutput> element
specifies the behavior of the portlet when it is invoked at runtime, with respect to the
transactional context. Depending on how the portlet is invoked, a transaction may or may
not exist before the portlet is invoked. The portal transaction is usually present in the
local context.
</para>
<para>
The following is an example of the
<computeroutput><transaction></computeroutput> and
<computeroutput><trans-attribute></computeroutput> elements:
</para>
- <para>
-<programlisting><![CDATA[
+<programlisting role="XML"><![CDATA[
<transaction>
<trans-attribute>Required</transaction>
<transaction>]]>
</programlisting>
- </para>
- <para>
<programlisting><![CDATA[
<!ELEMENT trans-attribute (#PCDATA)>]]>
</programlisting>
- </para>
<para>
The default value is <computeroutput>NotSupported</computeroutput>, which
means that the portal transaction is suspended for the duration of the portlet's
invocation. Accepted values are <computeroutput>Required</computeroutput>,
<computeroutput>Mandatory</computeroutput>,
<computeroutput>Never</computeroutput>,
<computeroutput>Supports</computeroutput>,
<computeroutput>NotSupported</computeroutput>, and
<computeroutput>RequiresNew</computeroutput>.
</para>
-</listitem>
-</varlistentry>
-<varlistentry><term><programlisting><![CDATA[
+<programlisting><![CDATA[
<!ELEMENT header-content (link|script|meta)*>]]>
-</programlisting></term>
-<listitem>
+</programlisting>
<para>
Specify the content to be included in the portal aggregated page when the portlet is
present on that page. This setting only applies when the portlet is used in the local
mode.
</para>
- <para>
<programlisting><![CDATA[
<!ELEMENT link EMPTY>]]>
</programlisting>
- </para>
<para>
No content is allowed inside a link element.
</para>
- <para>
<programlisting><![CDATA[
<!ELEMENT script (#PCDATA)>]]>
</programlisting>
- </para>
<para>
Use the <computeroutput><script></computeroutput> element for
inline script definitions.
</para>
- <para>
<programlisting><![CDATA[
<!ELEMENT meta EMPTY>]]>
</programlisting>
- </para>
<para>
No content is allowed for the
<computeroutput><meta></computeroutput> element.
</para>
-</listitem>
-</varlistentry>
-<varlistentry><term><programlisting><![CDATA[
+<programlisting><![CDATA[
<!ELEMENT service (service-name,service-class,service-ref)>]]>
-</programlisting></term>
-<listitem>
+</programlisting>
<para>
Declare a service that will be injected by the portlet container as an attribute of the
portlet context.
</para>
<para>
The following is an example of the
<computeroutput><service></computeroutput> element:
</para>
- <para>
-<programlisting><![CDATA[
+<programlisting role="XML"><![CDATA[
<service>
<service-name>UserModule</service-name>
<service-class>org.jboss.portal.identity.UserModule</service-class>
<service-ref>:service=Module,type=User</service-ref>
</service>]]>
</programlisting>
- </para>
<para>
To use an injected service in a portlet, perform a lookup of the
<computeroutput><service-name></computeroutput>, for example,
using the <computeroutput>init()</computeroutput> lifecycle method:
</para>
- <para>
-<programlisting><![CDATA[
+<programlisting role="JAVA"><![CDATA[
public void init()
{
UserModule userModule =
(UserModule)getPortletContext().getAttribute("UserModule");
}]]>
</programlisting>
- </para>
- <para>
<programlisting><![CDATA[
<!ELEMENT service-name (#PCDATA)>]]>
</programlisting>
- </para>
<para>
The <computeroutput><service-name></computeroutput> element
defines the name that binds the service as a portlet context attribute.
</para>
- <para>
<programlisting><![CDATA[
<!ELEMENT service-class (#PCDATA)>]]>
</programlisting>
- </para>
<para>
The <computeroutput><service-class></computeroutput> element
defines the fully qualified name of the interface that the service implements.
</para>
- <para>
<programlisting><![CDATA[
<!ELEMENT service-ref (#PCDATA)>]]>
</programlisting>
- </para>
<para>
The <computeroutput><service-ref></computeroutput> element
defines the reference to the service. In the JMX Microkernel environment, this consist of
the JMX name of the service MBean. For an MBean reference, if the domain is left out, the
current domain of the portal is used.
</para>
-</listitem>
-</varlistentry>
-</variablelist>
-</para>
</sect2>
<sect2>
<title>The JBoss Portlet Instance DTD</title>