Author: thomas.heute(a)jboss.com
Date: 2010-04-13 17:12:40 -0400 (Tue, 13 Apr 2010)
New Revision: 2610
Added:
portal/trunk/docs/reference-guide/en/images/AuthenticationAndIdentity/OrganizationServiceClassDiagram.png
portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity/OrganizationAPI.xml
Removed:
portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity/APIs.xml
portal/trunk/docs/reference-guide/en/modules/PortletDevelopment/AJAXFramework.xml
portal/trunk/docs/reference-guide/en/modules/PortletDevelopment/GroovyTemplates.xml
portal/trunk/docs/reference-guide/en/modules/PortletDevelopment/PortletLifecycle.xml
portal/trunk/docs/reference-guide/en/modules/PortletDevelopment/WebUI.xml
Modified:
portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity.xml
portal/trunk/docs/reference-guide/en/modules/PortalDevelopment/InternationalizationConfiguration.xml
portal/trunk/docs/reference-guide/en/modules/PortletDevelopment.xml
Log:
- Added class diagram for OrganizationService
- Remove WebUI chatpers
Added:
portal/trunk/docs/reference-guide/en/images/AuthenticationAndIdentity/OrganizationServiceClassDiagram.png
===================================================================
(Binary files differ)
Property changes on:
portal/trunk/docs/reference-guide/en/images/AuthenticationAndIdentity/OrganizationServiceClassDiagram.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity/APIs.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity/APIs.xml 2010-04-13
20:06:54 UTC (rev 2609)
+++
portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity/APIs.xml 2010-04-13
21:12:40 UTC (rev 2610)
@@ -1,64 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
-]>
-<section id="sect-Reference_Guide-APIs-Organization_API">
- <title>Organization API</title>
- <para>
- The
- <literal>exo.platform.services.organization</literal>
- package has five main components: user, user profile, group,
- membership type and membership.
- There is an additional component that serves as an entry point into
- Organization API -
- <literal>OrganizationService</literal>
- component,
- that provides handling functionality for the five components.
- </para>
- <para>
- The
- <literal>User</literal>
- component contains basic information about a user - such as
- username, password, first name, last name, and email. The
- <literal>User Profile</literal>
- component contains extra information about a user, such as user's
- personal information, and business information.
- You can also add additional information about a user if your application
- requires it.
- The
- <literal>Group</literal>
- component contains a group graph. The
- <literal>Membership Type</literal>
- component
- contains a list of predefined membership types.
- Finally, the
- <literal>Membership</literal>
- component connects a User, a Group and a Membership Type.
- </para>
- <para>
- A user can have one or more memberships within a group, for example:
- user A can have the 'member' and 'admin' memberships in group /user.
- A user belongs to a group if he has at least one membership in that
- group.
- </para>
- <para>
- Exposing the Organization API to developers the OrganizationService component
- provides developers with access
- to handler objects for managing each of the five components -
- UserHandler, UserProfileHandler, GroupHandler, MembershipTypeHandler,
- and MembershipHandler.
- </para>
- <para>
- The five central API components are really designed like persistent
- entities, and handlers are really specified like data access objects
- (DAO).
- </para>
- <para>
- Organization API simply describes a contract, meaning it is not a concrete
- implementation. The described components are interfaces,
- allowing for different concrete implementations. In practial terms that means,
- you can replace the existing implementation with a different one.
- </para>
-</section>
-
Copied:
portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity/OrganizationAPI.xml
(from rev 2605,
portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity/APIs.xml)
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity/OrganizationAPI.xml
(rev 0)
+++
portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity/OrganizationAPI.xml 2010-04-13
21:12:40 UTC (rev 2610)
@@ -0,0 +1,74 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
+<section id="sect-Reference_Guide-APIs-Organization_API">
+ <title>Organization API</title>
+ <para>
+ The
+ <literal>exo.platform.services.organization</literal>
+ package has five main components: user, user profile, group,
+ membership type and membership.
+ There is an additional component that serves as an entry point into
+ Organization API -
+ <literal>OrganizationService</literal>
+ component,
+ that provides handling functionality for the five components.
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata
fileref="images/AuthenticationAndIdentity/OrganizationServiceClassDiagram.png"
format="PNG" align="center"/>
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata
fileref="images/AuthenticationAndIdentity/OrganizationServiceClassDiagram.png"
scalefit="1" format="PNG" align="center"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>
+ The
+ <literal>User</literal>
+ component contains basic information about a user - such as
+ username, password, first name, last name, and email. The
+ <literal>User Profile</literal>
+ component contains extra information about a user, such as user's
+ personal information, and business information.
+ You can also add additional information about a user if your application
+ requires it.
+ The
+ <literal>Group</literal>
+ component contains a group graph. The
+ <literal>Membership Type</literal>
+ component
+ contains a list of predefined membership types.
+ Finally, the
+ <literal>Membership</literal>
+ component connects a User, a Group and a Membership Type.
+ </para>
+ <para>
+ A user can have one or more memberships within a group, for example:
+ user A can have the 'member' and 'admin' memberships in group /user.
+ A user belongs to a group if he has at least one membership in that
+ group.
+ </para>
+ <para>
+ Exposing the Organization API to developers the OrganizationService component
+ provides developers with access
+ to handler objects for managing each of the five components -
+ UserHandler, UserProfileHandler, GroupHandler, MembershipTypeHandler,
+ and MembershipHandler.
+ </para>
+ <para>
+ The five central API components are really designed like persistent
+ entities, and handlers are really specified like data access objects
+ (DAO).
+ </para>
+ <para>
+ Organization API simply describes a contract, meaning it is not a concrete
+ implementation. The described components are interfaces,
+ allowing for different concrete implementations. In practial terms that means,
+ you can replace the existing implementation with a different one.
+ </para>
+</section>
+
Modified: portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity.xml 2010-04-13
20:06:54 UTC (rev 2609)
+++ portal/trunk/docs/reference-guide/en/modules/AuthenticationAndIdentity.xml 2010-04-13
21:12:40 UTC (rev 2610)
@@ -12,7 +12,7 @@
<xi:include href="AuthenticationAndIdentity/SSO.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-->
<xi:include
href="AuthenticationAndIdentity/DataInjectorConfiguration.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="AuthenticationAndIdentity/OrganizationAPI.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="AuthenticationAndIdentity/AccessingUserProfile.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="AuthenticationAndIdentity/APIs.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
</chapter>
Modified:
portal/trunk/docs/reference-guide/en/modules/PortalDevelopment/InternationalizationConfiguration.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/PortalDevelopment/InternationalizationConfiguration.xml 2010-04-13
20:06:54 UTC (rev 2609)
+++
portal/trunk/docs/reference-guide/en/modules/PortalDevelopment/InternationalizationConfiguration.xml 2010-04-13
21:12:40 UTC (rev 2610)
@@ -295,35 +295,7 @@
javax.portlet.keywords=Breadcrumbs, Breadcrumb
</programlisting>
</section>
-
- <section id="sect-Reference_Guide-_Portlets_-Access">
- <title>Access</title>
- <para>
- These <emphasis>key</emphasis>s are used to display a property in the
user language.
- </para>
- <para>
- The following access method enables translation to the preferred language for the
connected user:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Groovy Template
-<programlisting>TODO
-</programlisting>
- </para>
- </listitem>
- <listitem>
- <para>
- Java
-<programlisting>WebuiRequestContext context =
WebuiRequestContext.getCurrentInstance() ;
-ResourceBundle res = context.getApplicationResourceBundle() ;
-String translatedString = res.getString(key);
-</programlisting>
- </para>
- </listitem>
- </itemizedlist>
- </section>
-
+
<section
id="sect-Reference_Guide-_Portlets_-Debugging_resource_bundle_usage">
<title>Debugging resource bundle usage</title>
<para>
Deleted:
portal/trunk/docs/reference-guide/en/modules/PortletDevelopment/AJAXFramework.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/PortletDevelopment/AJAXFramework.xml 2010-04-13
20:06:54 UTC (rev 2609)
+++
portal/trunk/docs/reference-guide/en/modules/PortletDevelopment/AJAXFramework.xml 2010-04-13
21:12:40 UTC (rev 2610)
@@ -1,510 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
-]>
-<section id="sect-Reference_Guide-AJAX_Framework">
- <title>AJAX Framework</title>
- <para>
- Ajax calls are easily managed in &PRODUCT;'s framework. Lines can be added
to the relevant template file and java class. A simple Ajax update of a component does not
require any JavaScript code to be written.
- </para>
- <section id="sect-Reference_Guide-AJAX_Framework-Portlet_Preparation">
- <title>Portlet Preparation</title>
- <para>
- &PRODUCT; portlets can use specific <literal>ActionListener</literal>s
to receive and process Ajax calls. To set a portlet up to recieve Ajax calls, follow this
procedure:
- </para>
- <procedure>
- <step>
- <para>
- Create an inner static class named with the following convention:
<parameter>action name</parameter> followed by
<literal>ActionListener</literal>.
- </para>
- <para>
- Example : <literal>ParentClass</literal> is the class being wrtitten
in.
- </para>
-
-<programlisting>static public class SaveActionListener extends
EventListener<ParentClass>
-</programlisting>
- </step>
- <step>
- <para>
- Declare this listener in the configuration of the portlet:
- </para>
-
-<programlisting>listeners = ParentClass.SaveActionListener.class
-</programlisting>
- </step>
- <step>
- <para>
- Add the correct annotation <literal>ComponentConfig</literal>,
<literal>EventConfig</literal>, etc.
- </para>
- <para>
- For example; the configuration below is for
<literal>UIAccountForm</literal>:
- </para>
-
-<programlisting role="JAVA">...
-@ComponentConfig(
- lifecycle = UIFormLifecycle.class,
- template = "system:/groovy/webui/form/UIFormTabPane.gtmpl",
- initParams = {
- @ParamConfig(
- name = "AccountTemplateConfigOption",
- value =
"app:/WEB-INF/conf/uiconf/account/webui/component/model/AccountTemplateConfigOption.groovy"
- ),
- @ParamConfig(
- name = "help.UIAccountFormQuickHelp",
- value =
"app:/WEB-INF/conf/uiconf/account/webui/component/model/UIAccountFormQuickHelp.xhtml"
- )
- },
- events = {
- @EventConfig(listeners = UIAccountForm.SaveActionListener.class ),
- @EventConfig(listeners = UIAccountForm.ResetActionListener.class, phase =
Phase.DECODE),
- @EventConfig(listeners = UIAccountForm.SearchUserActionListener.class, phase =
Phase.DECODE)
- }
-)
-...
-</programlisting>
- </step>
- <step>
- <para>
- Create an <literal>execute</literal> method inside this class:
- </para>
-
-<programlisting>public void execute(Event<ParentClass> event)
throws Exception
-</programlisting>
- <para>
- This method is called every time the listener gets an event from the client. Hence
you can process this event in it, using the even attribute. Use it to get parameters from
a form in your client, to modify the status of your portlet, etc.,
- </para>
- <para>
- Possible ways to use the event attribute :
- </para>
- <itemizedlist>
- <listitem>
-
-<programlisting role="XML">String value =
event.getRequestContext().getRequestParameter("name"); // to get a value
from a form
-</programlisting>
- </listitem>
- <listitem>
-
-<programlisting role="XML">ParentClass parent = event.getSource(); // to
get the parent object (the portlet that threw and caugth the event)
-</programlisting>
- </listitem>
- <listitem>
-
-<programlisting role="XML">UIMyComponent portal =
parent.getAncestorOfType(UIMyComponent.class); // to get any node in the hierarchy of
UIComponents
-</programlisting>
- </listitem>
- </itemizedlist>
- </step>
- <step>
- <para>
- If your action has to update an element on your client's interface, you must
call <emphasis role="bold">addUIComponentToUpdateByAjax()
</emphasis> at the end of the <literal>execute</literal> method:
- </para>
-
-<programlisting>event.getRequestContext().addUIComponentToUpdateByAjax(uicomponent);
-</programlisting>
- <para>
- The target component must be provided as parameter (the component that will be
updated). We will come back on this later.
- </para>
- </step>
- <step>
- <para>
- You must create one inner action listener class for each Ajax call you want to
handle on this portlet. All these classes must be declared in the configuration
annotations of the main class, otherwise you will get an error.
- </para>
- </step>
- <step>
- <para>
- Done. Your portlet is ready to accept Ajax calls from your client.
- </para>
- </step>
- </procedure>
-
- </section>
-
- <section id="sect-Reference_Guide-AJAX_Framework-AJAX_in_Groovy">
- <title>AJAX in Groovy</title>
- <para>
- Once the server is configured to receive Ajax calls, you must configure the client
interface to make these calls.
- </para>
- <procedure>
- <step>
- <para>
- Add the following code to the groovy template file associated with the appropriate
portlet class ( <literal>ParentClass</literal> here):
- </para>
-
-<programlisting>uicomponent.event("YourOperation");
-</programlisting>
- <para>
- <literal>YourOperation</literal> is the same as in the
<literal>ActionListener</literal> class (save in our example above).
- </para>
- </step>
- <step>
- <para>
- The event function will create an url starting with
<literal>javascript:</literal>. Make sure this code can be executed in the
environment where the portal is running.
- </para>
- </step>
- <step>
- <para>
- If your operation must update the content of a component, make sure that the target
component is well rendered. The following is recommended:
- </para>
-
-<programlisting>uicomponent.renderChild(UITargetComponent.class) ;
-</programlisting>
- </step>
- <step>
- <para>
- The <literal>uicomponent</literal> must be of the
<literal>UITargetComponent</literal> type as the component class;
-<programlisting>event.getRequestContext().addUIComponentToUpdateByAjax(uicomponent)
;
-</programlisting>
- will be updated when <literal>UITargetComponent</literal> is called.
- </para>
- </step>
- <step>
- <para>
- If this component is not rendered by default, set its
<literal>rendered</literal> attribute (in the constructor of the portlet) to
false when the portlet loads:
- </para>
-
-<programlisting>mycomponent.setRendered(false);
-</programlisting>
- </step>
- </procedure>
-
- </section>
-
- <section id="sect-Reference_Guide-AJAX_Framework-How_JavaScript_works">
- <title>How JavaScript works</title>
- <para>
- All javascript in &PRODUCT; is managed by the file
<filename>02eXoresources:javascript/eXo/portal/PortalHttpRequest.js</filename>.
- </para>
- <para>
- In this class, there are four functions/classes:
- </para>
- <formalpara
id="form-Reference_Guide-How_JavaScript_works-PortletResponse">
- <title>PortletResponse</title>
- <para>
- </para>
- </formalpara>
- <formalpara
id="form-Reference_Guide-How_JavaScript_works-PortalResponse">
- <title>PortalResponse</title>
- <para>
- </para>
- </formalpara>
- <formalpara
id="form-Reference_Guide-How_JavaScript_works-AjaxRequest">
- <title>AjaxRequest</title>
- <para>
- </para>
- </formalpara>
- <formalpara
id="form-Reference_Guide-How_JavaScript_works-HttpResponseHandler">
- <title>HttpResponseHandler</title>
- <para>
- </para>
- </formalpara>
- <para>
- and 6 functions:
- </para>
- <variablelist>
- <varlistentry>
- <term>ajaxGet(url, callback)</term>
- <listitem>
- <para>
- This is the main entry method for every Ajax calls to the portal It is simply a
dispatcher method that completes some <parameter>init</parameter> fields
before calling the <literal>doRequest()</literal> method.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ajaxPost(formElement, callback)</term>
- <listitem>
- <para>
- This method is called instead of an <literal>HTTP POST</literal> when,
in an AJAX case, some manipulations are needed. Once the content of the form is placed
into a string object, the call is delegated to the
<literal>doRequest()</literal> method
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>doRequest(method, url, queryString, callback)</term>
- <listitem>
- <para>
- The <literal>doRequest()</literal> method takes incoming request from
<literal>ajaxGet</literal> and <literal>ajaxPost</literal> calls.
The second argument is the URL to target on the server The third argument is the query
string object which is created out of a form element, this value is null except when there
is a POST request.
- <orderedlist>
- <listitem>
- <para>
- An <literal>AjaxRequest</literal> object is instantiated. It holds
the reference to the XHR method.
- </para>
- </listitem>
- <listitem>
- <para>
- An <literal>HttpResponseHandler</literal> object is instantiated and
its methods (<literal>ajaxResponse</literal>,
<literal>ajaxLoading</literal>, <literal>ajaxTimeout</literal>)
are associated with the one from the <literal>AjaxRequest</literal> and will
be called by the XHR during the process method.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ajaxAbort()</term>
- <listitem>
- <para>
- Cancels the current request.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ajaxAsyncGetRequest(url, async)</term>
- <listitem>
- <para>
- Allows to create and execute a sync or async GET request.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ajaxRedirect(url)</term>
- <listitem>
- <para>
- A simple javascript redirection with
<literal>window.location.href</literal> that are the entry points of these
classes. These functions need not be called explicitly, as the template file and the
portlet class manage everything.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
-
- <section id="sect-Reference_Guide-AJAX_Framework-PortletResponse">
- <title>PortletResponse</title>
- <para>
- This class doesn't contain any methods. On creation, it retrieves the response
elements from the xml returned by Ajax, and stores them in the corresponding attributes :
- </para>
- <variablelist>
- <varlistentry>
- <term>portletId</term>
- <listitem>
- <para>
- The component ID.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>portletTitle</term>
- <listitem>
- <para>
- The component title.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>portletMode</term>
- <listitem>
- <para>
- The mode the component runs in. The options are: View, Edit, Help or Config.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>portletState</term>
- <listitem>
- <para>
- The processing state of the component. The options are: Decode, Render.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>portletData</term>
- <listitem>
- <para>
- The updated data to put in the component.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>script</term>
- <listitem>
- <para>
- The javascript code to update the component.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>blocksToUpdate</term>
- <listitem>
- <para>
- An array containing the containers to update with this script.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- Attributes can be accessed by calling them from the
<literal>PortletResponse</literal> instance.
- </para>
- </section>
-
- <section id="sect-Reference_Guide-AJAX_Framework-PortalResponse">
- <title>PortalResponse</title>
- <para>
- This is an array of <literal>PortletResponse</literal>s
(<literal>portletResponses</literal>) and two other attributes:
- </para>
- <variablelist>
- <varlistentry>
- <term>data</term>
- <listitem>
- <para>
- Data to update.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>script</term>
- <listitem>
- <para>
- Javascript code to update.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
-
- <section id="sect-Reference_Guide-AJAX_Framework-AjaxRequest">
- <title>AjaxRequest</title>
- <para>
- By far the most important class of this file. It makes the
<literal>XMLHttpRequest</literal> object easier to use by wrapping it with
functions and attributes. You can find further documentation on this class <ulink
type="http"
url="http://www.ajaxtoolbox.com/request/documentation.php">h...;.
- </para>
- </section>
-
- <section id="sect-Reference_Guide-AJAX_Framework-HttpResponseHandler">
- <title>HttpResponseHandler</title>
- <para>
- This class provides methods to handle the Ajax response.
- </para>
- <variablelist>
- <varlistentry>
- <term>executeScript</term>
- <listitem>
- <para>
- Used to execute javascript code.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>updateBlocks</term>
- <listitem>
- <para>
- Updates <literal>html</literal> components.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ajaxTimeout</term>
- <listitem>
- <para>
- This function is called when the timeout of the ajax call exceeds its set limit.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ajaxResponse</term>
- <listitem>
- <para>
- This function creates a <literal>PortalResponse</literal> object from
the data in the Ajax request.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ajaxLoading</term>
- <listitem>
- <para>
- This function shows the loading pop-up and mask layer.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <formalpara
id="form-Reference_Guide-HttpResponseHandler-Portal_Ajax_Response_Data_Structure">
- <title>Portal Ajax Response Data Structure:</title>
- <para>
-
-<programlisting>{PortalResponse}
- |
- |--->{PortletResponse}
- |
- |--->{PortletResponse}
- | |-->{portletId}
- | |-->{portletTitle}
- | |-->{portletMode}
- | |-->{portletState}
- | |
- | |-->{Data}
- | | |
- | | |--->{BlockToUpdate}
- | | | |-->{blockId}
- | | | |-->{data}
- | | |
- | | |--->{BlockToUpdate}
- | |--->{Script}
- |
- |--->{Data}
- | |
- | |--->{BlockToUpdate}
- | | |-->{blockId}
- | | |-->{data}
- | |
- | |--->{BlockToUpdate}
- |--->{Script}
-</programlisting>
- </para>
- </formalpara>
- </section>
-
- <section
id="sect-Reference_Guide-AJAX_Framework-Manage_Several_Popups">
- <title>Manage Several Popups</title>
- <para>
- If there are several actions that need to appear in a pop-up, the following technique
can be used to manage the different pop-up windows:
- </para>
- <procedure>
- <step>
- <para>
- Create a <literal>UIPopupAction</literal> in the main portlet class:
- </para>
-
-<programlisting>addChild(UIPopupAction.class, null, null);
-</programlisting>
- </step>
- <step>
- <para>
- Render this action in your template file:
- </para>
-
-<programlisting>uicomponent.renderChild(UIPopupAction.class) ;
-</programlisting>
- <para>
- (This creates an empty container (pop-up) that will receive the new content by
Ajax)
- </para>
- </step>
- <step>
- <para>
- Put this component in your action listener class and update its content:
- </para>
-
-<programlisting>UIPopupAction uiPopupAction =
uiMainPortlet.getChild(UIPopupAction.class) ;
-uiPopupAction.activate(UIReferencesList.class, 600) ;
-</programlisting>
- <para>
- <literal>UIReferenceList</literal> is the component that will appear in
the pop-up. It does not have to declared in the main portlet class.
- </para>
- <para>
- The activate method creates the component and its rendering in the pop-up window.
- </para>
- </step>
- <step>
- <para>
- Allow this component to be updated by Ajax:
- </para>
-
-<programlisting>event.getRequestContext().addUIComponentToUpdateByAjax(uiPopupAction)
;
-</programlisting>
- </step>
- <step>
- <para>
- Add an action listener class (and repeat the steps above with the appropriate
component type) for each component required to appear in a pop-up window .
- </para>
- </step>
- </procedure>
-
- </section>
-
-</section>
-
-
Deleted:
portal/trunk/docs/reference-guide/en/modules/PortletDevelopment/GroovyTemplates.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/PortletDevelopment/GroovyTemplates.xml 2010-04-13
20:06:54 UTC (rev 2609)
+++
portal/trunk/docs/reference-guide/en/modules/PortletDevelopment/GroovyTemplates.xml 2010-04-13
21:12:40 UTC (rev 2610)
@@ -1,231 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
-]>
-<section id="sect-Reference_Guide-Groovy_Templates">
- <title>Groovy Templates</title>
- <para>
- In addition to the content in this chapter, refer also to <xref
linkend="sect-Reference_Guide-AJAX_Framework" /> in order to better
understand the communication between the Groovy Template and the portlet.
- </para>
- <section id="sect-Reference_Guide-Groovy_Templates-Basic_structure">
- <title>Basic structure</title>
- <para>
- The structure of a template is quite simple. It consists of only two elements:
- </para>
- <orderedlist>
- <listitem>
- <para>
- The HTML code and;
- </para>
- </listitem>
- <listitem>
- <para>
- zero or more groovy language code blocks, enclosed by <% ... %>
enclosures.
- </para>
- </listitem>
- </orderedlist>
- <para>
- The HTML code in the template doesn't have to contain the
<literal>html</literal>, or <literal>body</literal> tags. This
allows groovy templates for one component to also be rendered in another component.
- </para>
- <para>
- For example:
- </para>
-
-<programlisting role="HTML"><!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<%
- import org.exoplatform.webui.core.UIComponent;
- def currentPage = uicomponent.getCurrentPage();
- ...
-%>
- ...
- <div class="$uicomponent.skin"
id="UIPortalApplication">
- <%uicomponent.renderChildren();%>
- </div>
-</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Groovy_Templates-Groovy_language">
- <title>Groovy language</title>
- <para>
- Groovy is a scripting language for Java. Some usage examples are included in this
section, however further information is available at <ulink
url="http://groovy.codehaus.org/Documentation" /> .
- </para>
- <variablelist
id="vari-Reference_Guide-Groovy_language-Some_examples_of_Groovy">
- <title>Some examples of Groovy</title>
- <varlistentry>
- <term>Variables definition</term>
- <listitem>
- <para>
-
-<programlisting>int min = 1;
-def totalPage = uicomponent.getAvailablePage();
-String name = "uiPortlet";
-categories = uicomponent.getItemCategories();
-String columns = uicomponent.getColumns();
-</programlisting>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Other expressions</term>
- <listitem>
- <para>
-
-<programlisting>for(category in categories) { ... }
-for(i in min..max) { ... } // min and max are int variables
-println "</div>" ;
-println """
- <div class="Item">
- <div class="OverflowContainer">
-""";
-<%=uicomponent.getToolbarStyle();%> // <%= to avoid a call of
println method
-import org.exoplatform.portal.config.model.PageNode;
-</programlisting>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
-
- <section
id="sect-Reference_Guide-Groovy_Templates-Linking_a_portlet_with_a_template">
- <title>Linking a portlet with a template</title>
- <section
id="sect-Reference_Guide-Linking_a_portlet_with_a_template-Portlet_configuration">
- <title>Portlet configuration</title>
- <para>
- The configuration of a portlet is partly made with
<literal>ComponentConfig</literal> annotations (others are
<literal>ComponentConfigs</literal>,
<literal>EventConfig</literal>, etc).
- </para>
- <para>
- One of the parameters of this annotation is <literal>template</literal>.
This is where the path to the template file associated with this portlet is defined.
- </para>
- <para>
- To specify this parameter, add this statement to the configuration annotation.
- </para>
- <para>
- For example, in <emphasis
role="bold">src:/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/
</emphasis> is the <emphasis
role="bold">UIApplicationForm.java</emphasis> file:
- </para>
-
-<programlisting>@ComponentConfig(
- lifecycle = UIFormLifecycle.class,
- template = "system:/groovy/webui/form/UIFormWithTitle.gtmpl",
- events = {
- @EventConfig(listeners = UIApplicationForm.SaveActionListener.class),
- @EventConfig(phase = Phase.DECODE, listeners =
UIApplicationForm.CancelActionListener.class)
- }
-)
-</programlisting>
- <para>
- The path is in the "<literal>system</literal>" namespace.
This is a reference to the portal webapp.
- </para>
- <para>
- This webapp contains reusable groovy templates in the folder; <emphasis
role="bold">src:/web/portal/src/main/webapp/groovy/webui/form/
</emphasis>.
- </para>
- <para>
- Use the following steps to create a new template;
- </para>
- <procedure>
- <step>
- <para>
- Create a groovy file in the appropriate webbapp and refer to it.
- </para>
- </step>
- <step>
- <para>
- Use the namespace "app" for refering to the same webapp as the
component.
- </para>
- </step>
- <step>
- <para>
- &PRODUCT; stores the component templates in a folder that follows this
placement convention:
"<filename>/webapp/groovy/<literal>your_portlet_name</literal>/webui/component</filename>".
- </para>
- <para>
-
-<programlisting>template =
"app:/groovy/your_portlet_name/webui/component/your_component.gtmpl"
-</programlisting>
- </para>
- </step>
- <step>
- <para>
- Edit the template file according to the information in the <xref
linkend="sect-Reference_Guide-Linking_a_portlet_with_a_template-The_template_file"
/>.
- </para>
- </step>
- </procedure>
-
- </section>
-
- <section
id="sect-Reference_Guide-Linking_a_portlet_with_a_template-The_template_file">
- <title>The template file</title>
- <para>
- Component template files are composed in HTML code and groovy code blocks. There are
a few things more that you need to know to fully link your portlet with your template.
- </para>
- <para>
- To successfully link a portlet with a template, please ensure the following:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- If the template defines the UI of a component, use the java object variable
<literal>uicomponent</literal> to access this component instance.
- </para>
- <para>
- This should be the case in most instances, but it is recommended that the java
class inherits from <literal>UIComponent</literal> are checked before this
variable is used.
- </para>
- <para>
- Using the <literal>uicomponent</literal> variable, you can access all
the attributes and functions of a component to use them in your template.
- </para>
- <para>
- Take, for example <literal>UIPageIterator.gtmpl</literal>:
- </para>
-
-<programlisting><%
- def currentPage = uicomponent.getCurrentPage();
-%>
-...
-<a
href="<%=uicomponent.event("ShowPage","$currentPage")%>"
class="Icon LastTopPageIcon">
- <span></span>
-</a>
-</programlisting>
- <para>
- The following example shows how <literal>uicomponent</literal> can be
used to make Ajax calls using the <literal>event</literal> method. See
<xref linkend="sect-Reference_Guide-AJAX_Framework" /> for more details.
- </para>
- </listitem>
- <listitem>
- <para>
- Another variable available is <literal>ctx</literal>. This variable
gives access to the context in which the template is processed.
- </para>
- <para>
- Use this variable to retrieve elements such as; the request, the Javscript manager
or the resource resolver (<literal>ctx.appRes</literal>).
- </para>
- <para>
- Some usage examples are:
- </para>
-
-<programlisting><%
- def rcontext = ctx.getRequestContext() ;
-
context.getJavascriptManager().importJavascript('GateIn.webui.UIPopupWindow');
- ctx.appRes(popupId + ".title."+ title);
-%>
-</programlisting>
- </listitem>
- <listitem>
- <para>
- If the template defines the user interface of a component that includes a form use
an instance of <literal>UIForm</literal> in a variable named
<literal>uiform</literal>.
- </para>
- <para>
- The <literal>UIForm</literal> class provides the methods
<literal>begin()</literal> and <literal>end()</literal> which
write the HTML tags of the form.
- </para>
- <para>
- The form class must inherit from <literal>UIForm</literal>. In this
class add the input elements (fields, checkboxes, lists) which are required in the form.
- </para>
- <para>
- Render the input elements in the groovy template using
<literal>uiform.renderField(field)</literal>.
- </para>
- </listitem>
- </itemizedlist>
- </section>
-
- </section>
-
-</section>
-
-
Deleted:
portal/trunk/docs/reference-guide/en/modules/PortletDevelopment/PortletLifecycle.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/PortletDevelopment/PortletLifecycle.xml 2010-04-13
20:06:54 UTC (rev 2609)
+++
portal/trunk/docs/reference-guide/en/modules/PortletDevelopment/PortletLifecycle.xml 2010-04-13
21:12:40 UTC (rev 2610)
@@ -1,324 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
-]>
-<section id="sect-Reference_Guide-Portlet_Lifecycle">
- <title>Portlet Lifecycle</title>
- <para>
- This chapter does not to refer to the Portlet API specification lifecycle but focuses
on the &PRODUCT; UI framework.
- </para>
- <para>
- This web framework has been developed specifically for &PRODUCT; and, while it is
not necessary to use the native web framework to build portlets, all portlets packaged
with &PRODUCT; are developed using this framework.
- </para>
- <para>
- This consistency allows portlets to use several UI components that can be used in
different abstracted contexts (such as the portal itself or some portlets).
- </para>
- <note>
- <title>Recommended Reading</title>
- <para>
- This chapter is intended for advanced developers. It covers code implementation and
logic. It is not a tutorial on how to write portlets.
- </para>
- <para>
- Refer to <xref linkend="sect-Reference_Guide-Portal_Lifecycle" /> for
information on concepts that are similar and top hierarchy classes that are shared.
- </para>
- </note>
- <section id="sect-Reference_Guide-Portlet_Lifecycle-Portlet_init">
- <title>Portlet init</title>
- <para>
- The main entry point for configuring a portlet is in the <emphasis
role="bold">portlet.xml</emphasis> file located in the portlet
application WAR.
- </para>
- <para>
- Each portlet built using the &PRODUCT; web framework must reference the
<emphasis role="bold">PortletApplicationController</emphasis> .
- </para>
- <para>
- The portlet configuration (such as the root component) is defined in
<filename>configuration.xml</filename>. The path to this file is defined in
the init-param "<emphasis
role="bold">webui.configuration</emphasis>" of
<filename>portlet.xml</filename>.
- </para>
-
-<programlisting><portlet>
- <description xml:lang="EN">Content
Portlet</description>
- <portlet-name>ContentPortlet</portlet-name>
- <display-name xml:lang="EN">Content
Portlet</display-name>
-
<portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
-
- <init-param>
- <name>webui.configuration</name>
-
<value>/WEB-INF/conf/portlet/content/ContentPortlet/webui/configuration.xml</value>
- </init-param>
-</portlet>
-</programlisting>
- <para>
- The structure of the <filename>configuration.xml</filename> file is
exactly the same as the <filename>webui-configuration.xml</filename> which was
introduced in <xref linkend="sect-Reference_Guide-Portal_Lifecycle" />.
- </para>
- <para>
- In the case of the content portlet it is formatted as:
- </para>
-
-<programlisting><webui-configuration>
- <application>
-
<ui-component-root>org.exoplatform.content.webui.component.UIContentPortlet</ui-component-root>
-
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
- </application>
-</webui-configuration>
-</programlisting>
- <para>
- The <literal>PortletApplicationController</literal> class extends the
<literal>GenericPortlet</literal> class defined in the Portlet API
specification.
- </para>
- <para>
- All methods (like <literal>processAction()</literal> or
<literal>render()</literal>) are delegated to the
<literal>PortletApplication</literal>. The creation and caching inside the
<literal>WebController</literal> object is shown in the example below:
- </para>
-
-<programlisting>/**
- * try to obtain the PortletApplication from the WebAppController.
- *
- * If it does not exist a new PortletApplication object is created, init and cached in
the
- * controller
- */
-private PortletApplication getPortletApplication() throws Exception {
- PortalContainer container = PortalContainer.getInstance() ;
- WebAppController controller =
- (WebAppController)container.getComponentInstanceOfType(WebAppController.class) ;
- PortletApplication application = controller.getApplication(applicationId_) ;
- if(application == null) {
- application = new PortletApplication(getPortletConfig()) ;
- application.onInit() ;
- controller.addApplication(application) ;
- }
- return application ;
-}
-</programlisting>
- </section>
-
- <section
id="sect-Reference_Guide-Portlet_Lifecycle-Portlet_request_handler">
- <title>Portlet request handler</title>
- <para>
- When a portlet using the native web framework is deployed in &PRODUCT;, all
methods calls go through the <literal>PortletApplication</literal> object
which extends the <literal>WebuiApplication</literal>.
- </para>
- </section>
-
- <section
id="sect-Reference_Guide-Portlet_Lifecycle-ProcessAction_phase">
- <title>ProcessAction phase</title>
- <para>
- The code of the method in <literal>PortletApplication</literal> is
described below. The business logic is shown in the javadoc:
- </para>
-
-<programlisting>/**
- * The processAction() method is the one modelled according to the Portlet API
specification
- *
- * The process is quite simple and here are te different steps done in the method:
- *
- * 1) The current instance of the WebuiRequestContext (stored in a ThreadLocal in the
class) is referenced
- * 2) A new request context of type PortletRequestContext (which extends the class
WebuiRequestContext) is
- * created as a child of the current context instance
- * 3) The new context is place inside the ThreadLocal and hence overides its parent one
there,
- * only for the portlet request lifeciclye
- * 4) The method onStartRequest() is called in all the ApplicationLifecycle objects
referenced in the webui
- * configuration XML file
- * 5) The StateManager object (in case of portlet it is an object of type
ParentAppStateManager) is used to get the RootComponent
- * also referenced in the XML configuration file
- * 6) The methods processDecode(UIApplication, WebuiRequestContext) and
processAction(UIApplication, WebuiRequestContext)
- * are then called
- * 7) Finally, a flag, to tell that the processAction phase was done, in the context is
set to true and the parent
- * context is restored in the Threadlocal
- */
-public void processAction(ActionRequest req, ActionResponse res) throws Exception {
- WebuiRequestContext parentAppRequestContext = WebuiRequestContext.getCurrentInstance()
;
- PortletRequestContext context = createRequestContext(req, res, parentAppRequestContext)
;
- WebuiRequestContext.setCurrentInstance(context) ;
- try {
- for(ApplicationLifecycle lifecycle : getApplicationLifecycle()) {
- lifecycle.onStartRequest(this, context) ;
- }
- UIApplication uiApp = getStateManager().restoreUIRootComponent(context) ;
- context.setUIApplication(uiApp) ;
- processDecode(uiApp, context) ;
- if(!images/context.isResponseComplete() &&!images/
context.getProcessRender()) {
- processAction(uiApp, context) ;
- }
- } finally {
- context.setProcessAction(true) ;
- WebuiRequestContext.setCurrentInstance(parentAppRequestContext) ;
- }
-}
-</programlisting>
- <para>
- The <literal>PortletRequestContext</literal> extends the
<literal>WebuiRequestContext</literal> class and acts as a wrapper on all the
portlet request information:
- </para>
-
-<programlisting>/**
- * In this method we try to get the PortletRequestContext object from the attribute map
of the parent
- * WebuiRequestContext.
- *
- * If it is not cached then we create a new instance, if it is cached then we init it
with the correct
- * writer, request and response objects
- *
- * We finally cache it in the parent attribute map
- *
- */
-private PortletRequestContext createRequestContext(PortletRequest req, PortletResponse
res,
- WebuiRequestContext
parentAppRequestContext) throws IOException {
- String attributeName = getApplicationId() + "$PortletRequest" ;
- PortletRequestContext context =
- (PortletRequestContext) parentAppRequestContext.getAttribute(attributeName) ;
- Writer w = null ;
- if(res instanceof RenderResponse){
- RenderResponse renderRes = (RenderResponse)res;
- renderRes.setContentType("text/html; charset=UTF-8");
- w = renderRes.getWriter() ;
- }
- if(context!images/= null) {
- context.init(w, req, res) ;
- } else {
- context = new PortletRequestContext(this, w, req, res) ;
- parentAppRequestContext.setAttribute(attributeName, context) ;
- }
- context.setParentAppRequestContext(parentAppRequestContext) ;
- return context;
-}
-</programlisting>
- <para>
- In the <literal>PortletApplication</literal>, the line;
- </para>
-
-<programlisting>UIApplication uiApp =
getStateManager().restoreUIRootComponent(context);
-</programlisting>
- <para>
- asks the <literal>StateManager</literal> defined for the portlet to get
the UI root component. In the case of a portlet the root component must extend
<literal>UIPortletApplication</literal>.
- </para>
-
-<programlisting>public class ParentAppStateManager extends StateManager {
-
- /**
- * This method simply delegate the call to the same method of the parent
WebuiRequestContext
- */
- @SuppressWarnings("unchecked")
- public UIApplication restoreUIRootComponent(WebuiRequestContext context) throws
Exception {
- WebuiRequestContext pcontext = (WebuiRequestContext)
context.getParentAppRequestContext() ;
- return pcontext.getStateManager().restoreUIRootComponent(context) ;
- }
-</programlisting>
- <para>
- Hence this is the PortalStateManager that will also handle the extraction of the root
component.
- </para>
-
-<programlisting>public UIApplication restoreUIRootComponent(WebuiRequestContext
context) throws Exception {
- context.setStateManager(this) ;
- WebuiApplication app = (WebuiApplication)context.getApplication() ;
-
- /*
- * If the request context is of type PortletRequestContext, we extract the parent
context which will
- * allow to get access to the PortalApplicationState object thanks to the session id
used as the key for the
- * syncronised Map uiApplications
- */
- if(context instanceof PortletRequestContext) {
- WebuiRequestContext preqContext = (WebuiRequestContext)
context.getParentAppRequestContext() ;
- PortalApplicationState state = uiApplications.get(preqContext.getSessionId()) ;
- PortletRequestContext pcontext = (PortletRequestContext) context ;
- String key = pcontext.getApplication().getApplicationId() ;
- UIApplication uiApplication = state.get(key) ;
- if(uiApplication!images/= null) return uiApplication;
- synchronized(uiApplications) {
- ConfigurationManager cmanager = app.getConfigurationManager() ;
- String uirootClass = cmanager.getApplication().getUIRootComponent() ;
- Class type = Thread.currentThread().getContextClassLoader().loadClass(uirootClass)
;
- uiApplication = (UIApplication)app.createUIComponent(type, null, null, context) ;
- state.put(key, uiApplication) ;
- }
- return uiApplication ;
- }
-}
-</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Portlet_Lifecycle-Render_phase">
- <title>Render phase</title>
- <para>
- The render method business logic is quite similar to
<literal>processAction()</literal>.
- </para>
-
-<programlisting>/**
- * The render method business logic is quite similar to the processAction() one.
- *
- * 1) A PortletRequestContext object is created (or extracted from the cache if it
already exists)
- * and initialized
- * 2) The PortletRequestContext replaces the parent one in the WebuiRequestContext
ThreadLocal object
- * 3) If the portal has already called the portlet processAction() then the call to all
onStartRequest of
- * the ApplicationLifecycle has already been made, otherwise we call them
- * 4) The ParentStateManager is also used to get the UIApplication, as we have seen it
delegates the call
- * to the PortalStateManager which caches the UI component root associated with the
current application
- * 5) the processRender() method of the UIPortletApplucaton is called
- * 6) Finally, the method onEndRequest() is called on every ApplicationLifecycle
referenced in the portlet
- * configuration XML file and the parent WebuiRequestContext is restored
- *
- */
-public void render(RenderRequest req, RenderResponse res) throws Exception {
- WebuiRequestContext parentAppRequestContext = WebuiRequestContext.getCurrentInstance()
;
- PortletRequestContext context = createRequestContext(req, res, parentAppRequestContext)
;
- WebuiRequestContext.setCurrentInstance(context) ;
- try {
- if(!context.hasProcessAction()) {
- for(ApplicationLifecycle lifecycle : getApplicationLifecycle()) {
- lifecycle.onStartRequest(this, context) ;
- }
- }
- UIApplication uiApp = getStateManager().restoreUIRootComponent(context) ;
- context.setUIApplication(uiApp) ;
- if(!context.isResponseComplete()) {
- UIPortletApplication uiPortletApp = (UIPortletApplication)uiApp;
- uiPortletApp.processRender(this, context) ;
- }
- uiApp.setLastAccessApplication(System.currentTimeMillis()) ;
- } finally {
- try {
- for(ApplicationLifecycle lifecycle : getApplicationLifecycle()) {
- lifecycle.onEndRequest(this, context) ;
- }
- } catch (Exception exception){
- log.error("Error while trying to call onEndRequest of the portlet
ApplicationLifecycle",
- exception);
- }
- WebuiRequestContext.setCurrentInstance(parentAppRequestContext) ;
- }
-}
-</programlisting>
- <para>
- The following is the <literal>processRender()</literal> call made on the
<literal>UIPortletApplication</literal>:
- </para>
-
-<programlisting>/**
- * The default processRender for an UIPortletApplication handles two cases:
- *
- * A. Ajax is used
- * ----
- * If Ajax is used and that the entire portal should not be re rendered, then an AJAX
fragment is
- * generated with information such as the portlet id, the portlet title, the portlet
modes, the window
- * states as well as the HTML for the block to render
- *
- * B. A full render is made
- * ----
- * a simple call to the method super.processRender(context) which will delegate the
call to all the
- * Lifecycle components
- *
- */
-public void processRender(WebuiApplication app, WebuiRequestContext context) throws
Exception {
- WebuiRequestContext pContext =
(WebuiRequestContext)context.getParentAppRequestContext();
- if(context.useAjax() &&!images/pContext.getFullRender()) {
- Writer w = context.getWriter() ;
-
- Set<UIComponent> list = context.getUIComponentToUpdateByAjax() ;
- if(list!images/= null) {
- if(getUIPopupMessages().hasMessage())
context.addUIComponentToUpdateByAjax(getUIPopupMessages()) ;
- for(UIComponent uicomponent : list) {
- renderBlockToUpdate(uicomponent, context, w) ;
- }
- return ;
- }
- }
- super.processRender(context) ;
-}
-</programlisting>
- </section>
-
-</section>
-
-
Deleted: portal/trunk/docs/reference-guide/en/modules/PortletDevelopment/WebUI.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/PortletDevelopment/WebUI.xml 2010-04-13
20:06:54 UTC (rev 2609)
+++ portal/trunk/docs/reference-guide/en/modules/PortletDevelopment/WebUI.xml 2010-04-13
21:12:40 UTC (rev 2610)
@@ -1,70 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
-]>
-<section id="sect-Reference_Guide-Web_User_Interface_WebUI">
- <title>Web User Interface - WebUI</title>
- <para>
- WebUI is the name of &PRODUCT;'s webframework.
- </para>
- <para>
- Using a self-contained framework ensures that the portal's architecture does
not interfere with other web technologies deployed by the portlets.
- </para>
- <para>
- Using a particular technology raises potential difficulties for users with a differing
version (either newer or older) of the same technology.
- </para>
- <para>
- The WebUI framework is a component tree based framework. The key aspects of WebUI are
:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Events based flow.
- </para>
- </listitem>
- <listitem>
- <para>
- Components configuration by annotation
- </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Groovy_Templates" /> for
rendering
- </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-AJAX_Framework" /> support
- </para>
- </listitem>
- <listitem>
- <para>
- Portlet API friendly.
- </para>
- </listitem>
- </itemizedlist>
- <section
id="sect-Reference_Guide-Web_User_Interface_WebUI-Relevant_Sections">
- <title>Relevant Sections</title>
- <itemizedlist>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Portlet_Lifecycle" />:
&PRODUCT; portlets are built with WebUI
- </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Portlet_Lifecycle" />:
&PRODUCT; portal itself is a WebUI application
- </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Create_a_WebUI_Portlet" />:
Learn how to write your own app with WebUI
- </para>
- </listitem>
- </itemizedlist>
- </section>
-
-</section>
-
-
Modified: portal/trunk/docs/reference-guide/en/modules/PortletDevelopment.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/PortletDevelopment.xml 2010-04-13
20:06:54 UTC (rev 2609)
+++ portal/trunk/docs/reference-guide/en/modules/PortletDevelopment.xml 2010-04-13
21:12:40 UTC (rev 2610)
@@ -6,9 +6,6 @@
<chapter id="chap-Reference_Guide-Portlet_development">
<title>Portlet development</title>
- <xi:include href="PortletDevelopment/AJAXFramework.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="PortletDevelopment/GroovyTemplates.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="PortletDevelopment/PortletLifecycle.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="PortletDevelopment/Standard.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
</chapter>