Author: smumford
Date: 2010-02-02 18:36:41 -0500 (Tue, 02 Feb 2010)
New Revision: 1501
Modified:
portal/trunk/docs/reference-guide/en/modules/portlets/AJAX_in_GateIn_Framework.xml
portal/trunk/docs/reference-guide/en/modules/portlets/Groovy_Templates.xml
portal/trunk/docs/reference-guide/en/modules/portlets/WebUI.xml
Log:
edits to Chatper 4
Modified:
portal/trunk/docs/reference-guide/en/modules/portlets/AJAX_in_GateIn_Framework.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/portlets/AJAX_in_GateIn_Framework.xml 2010-02-02
12:25:53 UTC (rev 1500)
+++
portal/trunk/docs/reference-guide/en/modules/portlets/AJAX_in_GateIn_Framework.xml 2010-02-02
23:36:41 UTC (rev 1501)
@@ -3,39 +3,45 @@
<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
%BOOK_ENTITIES;
]>
-<section id="sect-Reference_Guide-AJAX_in_GateIn_Framework">
- <title>AJAX in GateIn Framework</title>
- <section id="sect-Reference_Guide-AJAX_in_GateIn_Framework-Overview">
- <title>Overview</title>
+<section id="sect-Reference_Guide-AJAX_Framework">
+ <title>AJAX Framework</title>
<para>
- It is very easy to create and manage Ajax calls in our framework. Just a few lines to
write in your template file and your java class. For simple Ajax update of a component,
you don't even have to write any line of JavaScript.
+ 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>
- <section
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-Portlet_Preparation">
+ <section id="sect-Reference_Guide-AJAX_Framework-Portlet_Preparation">
<title>Portlet Preparation</title>
<para>
- Our portlets can use specific <literal>ActionListener</literal> s to
receive and process Ajax calls. To do that, you must create an inner static class named
following this convention : action name followed by ActionListener
- </para>
- <para>
- Example : <literal>ParentClass</literal> is the class in which you are
writing.
- </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>
- <para>
- Don't forget to declare this listener in the configuration of your portlet, like
this :
- </para>
-
+ </step>
+ <step>
+ <para>
+ Declare this listener in the configuration of the portlet:
+ </para>
+
<programlisting>listeners = ParentClass.SaveActionListener.class
</programlisting>
- <para>
- along with the correct annotation <literal>ComponentConfig</literal> ,
<literal>EventConfig</literal> , etc.,
- </para>
- <para>
- For example, the configuration for <literal>UIAccountForm</literal> :
- </para>
-
+ </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,
@@ -58,296 +64,354 @@
)
...
</programlisting>
- <para>
- Inside this class, you will have to create an <literal>execute</literal>
method like this :
- </para>
-
+ </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>
+
+ <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>
+ </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>
+ </listitem>
+ <listitem>
<programlisting role="XML">UIMyComponent portal =
parent.getAncestorOfType(UIMyComponent.class); // to get any node in the hierarchy of
UIComponents
</programlisting>
- </listitem>
- </itemizedlist>
- <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>
-
+ </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>
- <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>
- <para>
- Done. Your portlet is ready to accept Ajax calls from your client.
- </para>
+ <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_in_GateIn_Framework-AJAX_in_the_Groovy_template">
- <title>AJAX in the Groovy template</title>
+ <section id="sect-Reference_Guide-AJAX_Framework-AJAX_in_Groovy">
+ <title>AJAX in Groovy</title>
<para>
- Your server being configured to receive Ajax calls, you must configure the client
interface to make these calls.
+ Once the server is configured to receive Ajax calls, you must configure the client
interface to make these calls.
</para>
- <para>
- In the groovy template file associated with your portlet class (
<literal>ParentClass</literal> here), you just have to add :
- </para>
-
-<programlisting>uicomponent.event("YourOperation"); // YourOperation is
the same as in the ActionListener class (Save in our example above)
+ <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>
- in a groovy code block. The event function will create an url starting with
<literal>javascript:</literal> so you have to make sure this code can be
executed in your environment.
- </para>
- <para>
- If your operation must update the content of a component, you have to make sure that
the target component is well rendered. Basically, just type this :
- </para>
-
+ <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>
- <para>
- in a groovy code block. <literal>UITargetComponent</literal> is the class
of the component that will be updated when
- </para>
-
+ </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>
- is called. Hence, <literal>uicomponent</literal> must be of type
<literal>UITargetComponent</literal> . If this component is not rendered by
default, when the portlet loads, don't forget to set its
<literal>rendered</literal> attribute to false :
+ All javascript in &PRODUCT; is managed by the file
<filename>02eXoresources:javascript/eXo/portal/PortalHttpRequest.js</filename>.
</para>
-
-<programlisting>mycomponent.setRendered(false);
-</programlisting>
<para>
- in the constructor of your portlet.
+ In this class, there are four functions/classes:
</para>
+ <formalpara>
+ <title>PortletResponse</title>
+ <para></para>
+ </formalpara>
+ <formalpara>
+ <title>PortalResponse</title>
+ <para></para>
+ </formalpara>
+ <formalpara>
+ <title>AjaxRequest</title>
+ <para></para>
+ </formalpara>
+ <formalpara>
+ <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_in_GateIn_Framework-How_JavaScript_works">
- <title>How JavaScript works</title>
+ <section id="sect-Reference_Guide-AJAX_Framework-PortletResponse">
+ <title>PortletResponse</title>
<para>
- All the javascript is managed by the file
<filename>02eXoresources:javascript/eXo/portal/PortalHttpRequest.js</filename>
in the portal project.
+ 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>
- <para>
- In this class, you will find 4 functions/classes (detailed below):
- <itemizedlist>
+ <variablelist>
+ <varlistentry>
+ <term>portletId</term>
<listitem>
<para>
- PortletResponse
+ The component ID.
</para>
</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>portletTitle</term>
<listitem>
<para>
- PortalResponse
+ The component title.
</para>
</listitem>
- <listitem>
- <para>
- AjaxRequest
- </para>
- </listitem>
- <listitem>
- <para>
- HttpResponseHandler
- </para>
- </listitem>
- </itemizedlist>
- </para>
+ </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>
- and 6 functions:
+ Attributes can be accessed by calling them from the
<literal>PortletResponse</literal> instance.
</para>
- <itemizedlist>
- <listitem>
- <para>
- ajaxGet(url, callback)
- </para>
- <para>
- This is the main entry method for every Ajax calls to the GateIn Portal It is simply
a dispatcher method that fills some init fields before calling the doRequest() method
- </para>
- </listitem>
- <listitem>
- <para>
- ajaxPost(formElement, callback) // Calls doRequest with an url in POST mode
- </para>
- <para>
- This method is called when a HTTP POST should be done but in an AJAX case some
maniputalions are needed. Once the content of the form is placed into a string object, the
call is delegated to the doRequest() method
- </para>
- </listitem>
- <listitem>
- <para>
- doRequest(method, url, queryString, callback)
- </para>
- <para>
- The doRequest() method takes incoming request from GET and POST 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 not null only when there is a POST
request.
- <orderedlist>
- <listitem>
- <para>
- An AjaxRequest object is instanciated, it holds the reference to the XHR method
- </para>
- </listitem>
- <listitem>
- <para>
- An HttpResponseHandler object is instantiated and its methods like ajaxResponse,
ajaxLoading, ajaxTimeout are associated with the one from the AjaxRequest and will be
called by the XHR during the process method
- </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- ajaxAbort()
- </para>
- <para>
- Cancels the current request
- </para>
- </listitem>
- <listitem>
- <para>
- ajaxAsyncGetRequest(url, async)
- </para>
- <para>
- Allows to create and execute a sync or async GET request
- </para>
- </listitem>
- <listitem>
- <para>
- ajaxRedirect(url)
- </para>
- <para>
- A simple javascript redirection with window.location.href that are the entry points
of these classes. You shouldn't have to call explicitly these functions, since the
template file and the portlet class manage everything.
- </para>
- </listitem>
- </itemizedlist>
</section>
- <section
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-PortletResponse">
- <title>PortletResponse</title>
- <para>
- This class doesn't contain any method. On creation, it just gets the response
elements from the xml returned by Ajax, and store them in the corresponding attributes :
- </para>
- <itemizedlist>
- <listitem>
- <para>
- portletId
- </para>
- </listitem>
- <listitem>
- <para>
- portletTitle
- </para>
- </listitem>
- <listitem>
- <para>
- portletMode // View, Edit, Help or Config
- </para>
- </listitem>
- <listitem>
- <para>
- portletState // Decode, Render
- </para>
- </listitem>
- <listitem>
- <para>
- portletData // The updated data to put in the component
- </para>
- </listitem>
- <listitem>
- <para>
- script //The javascript code to update the component
- </para>
- </listitem>
- <listitem>
- <para>
- blocksToUpdate // An array containing the containers to update with this script
- </para>
- </listitem>
- </itemizedlist>
- <para>
- You can access these attributes just by calling them from your
<literal>PortletResponse</literal> instance.
- </para>
- </section>
-
- <section
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-PortalResponse">
+ <section id="sect-Reference_Guide-AJAX_Framework-PortalResponse">
<title>PortalResponse</title>
<para>
- Contains an array of <literal>PortletResponse</literal> s (
<literal>portletResponses</literal> ) and two other attributes :
+ This is an array of <literal>PortletResponse</literal>s
(<literal>portletResponses</literal>) and two other attributes:
</para>
- <itemizedlist>
+ <variablelist>
+ <varlistentry>
+ <term>data</term>
<listitem>
<para>
- data // Data to update
+ Data to update.
</para>
</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>script</term>
<listitem>
<para>
- script // Javascript code to update
+ Javascript code to update.
</para>
</listitem>
- </itemizedlist>
+ </varlistentry>
+ </variablelist>
</section>
- <section
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-AjaxRequest">
+ <section id="sect-Reference_Guide-AJAX_Framework-AjaxRequest">
<title>AjaxRequest</title>
<para>
- By far the most important class of this file. Wraps the XMLHttpRequest object with
some functions and attributes, to make it easier to use. You can find the complete
documentation here :
http://www.ajaxtoolbox.com/request/documentation.php
+ 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_in_GateIn_Framework-HttpResponseHandler">
+ <section id="sect-Reference_Guide-AJAX_Framework-HttpResponseHandler">
<title>HttpResponseHandler</title>
<para>
This class provides methods to handle the Ajax response.
</para>
- <itemizedlist>
+ <variablelist>
+ <varlistentry>
+ <term>executeScript</term>
<listitem>
<para>
- executeScript // execute some javascript
+ Used to execute javascript code.
</para>
</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>updateBlocks</term>
<listitem>
<para>
- updateBlocks // update some html components
+ Updates <literal>html</literal> components.
</para>
</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>ajaxTimeout</term>
<listitem>
<para>
- ajaxTimeout // a function called when the timeout of the ajax call exceeds. Just
cancel the request
+ This function is called when the timeout of the ajax call exceeds its set limit.
</para>
</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>ajaxResponse</term>
<listitem>
<para>
- ajaxResponse // creates a PortalResponse object from the data from the Ajax request
+ This function creates a <literal>PortalResponse</literal> object from
the data in the Ajax request.
</para>
</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>ajaxLoading</term>
<listitem>
<para>
- ajaxLoading // shows the loading popup and mask layer
+ This function shows the loading pop-up and mask layer.
</para>
</listitem>
- </itemizedlist>
- </section>
-
- <section
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-Portal_Ajax_Response_Data_Structure">
- <title>Portal Ajax Response Data Structure</title>
-
+ </varlistentry>
+ </variablelist>
+
+ <formalpara>
+ <title>Portal Ajax Response Data Structure:</title>
+ <para>
<programlisting>{PortalResponse}
|
|--->{PortletResponse}
@@ -376,47 +440,61 @@
| |--->{BlockToUpdate}
|--->{Script}
</programlisting>
+ </para>
+ </formalpara>
</section>
- <section
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-Manage_Several_Popups">
+ <section
id="sect-Reference_Guide-AJAX_Framework-Manage_Several_Popups">
<title>Manage Several Popups</title>
<para>
- If you have several actions that need to appear in a popup, you can use this technique
to manage the different popup windows easily:
+ 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>
- <para>
- Create a <literal>UIPopupAction</literal> in your main portlet class:
- </para>
-
+ <procedure>
+ <step>
+ <para>
+ Create a <literal>UIPopupAction</literal> in the main portlet class:
+ </para>
<programlisting>addChild(UIPopupAction.class, null, null);
</programlisting>
- <para>
- and render it in your template file:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Render this action in your template file:
+ </para>
<programlisting>uicomponent.renderChild(UIPopupAction.class) ;
</programlisting>
- <para>
- By default, this just create an empty container (popup) that will receive the new
content by Ajax.
- </para>
- <para>
- Get this component in your action listener class, and update its content:
- </para>
-
+
+ <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>
- UIReferenceList is the component that will appear in the popup. You don't have to
declare it in the main portlet class. The activate method takes care of the creation of
the component, and its rendering in the popup window. See the javadoc for more information
on this class.
- </para>
- <para>
- Make this component updatable by Ajax:
- </para>
-
+ <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>
- <para>
- For each component that you want that component to appear in a popup window, add a
action listener class and repeat the steps above with the appropriate component type.
- </para>
+ </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>
Modified: portal/trunk/docs/reference-guide/en/modules/portlets/Groovy_Templates.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/portlets/Groovy_Templates.xml 2010-02-02
12:25:53 UTC (rev 1500)
+++ portal/trunk/docs/reference-guide/en/modules/portlets/Groovy_Templates.xml 2010-02-02
23:36:41 UTC (rev 1501)
@@ -11,7 +11,7 @@
This article gives a glance at the Groovy language, and explains how to configure the
portlet and and the groovy template.
</para>
<para>
- It's recommended to read also <xref
linkend="sect-Reference_Guide-AJAX_in_GateIn_Framework" /> in order to
understand better the communication between the Groovy Template and the portlet.
+ It's recommended to read also <xref
linkend="sect-Reference_Guide-AJAX_Framework" /> in order to understand
better the communication between the Groovy Template and the portlet.
</para>
</section>
@@ -140,7 +140,7 @@
</a>
</programlisting>
<para>
- This example shows that <literal>uicomponent</literal> can be used to
make Ajax calls, thanks to the <literal>event</literal> method. See <xref
linkend="sect-Reference_Guide-AJAX_in_GateIn_Framework" /> for more details.
+ This example shows that <literal>uicomponent</literal> can be used to
make Ajax calls, thanks to the <literal>event</literal> method. See <xref
linkend="sect-Reference_Guide-AJAX_Framework" /> for more details.
</para>
<para>
Another variable that you can use is <literal>ctx</literal>. It gives
access to the context in which the template is processed. Hence, you can get some elements
like the request, the Javscript manager, or the resource resolver (ctx.appRes). Examples
:
Modified: portal/trunk/docs/reference-guide/en/modules/portlets/WebUI.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/portlets/WebUI.xml 2010-02-02 12:25:53
UTC (rev 1500)
+++ portal/trunk/docs/reference-guide/en/modules/portlets/WebUI.xml 2010-02-02 23:36:41
UTC (rev 1501)
@@ -6,7 +6,13 @@
<section id="sect-Reference_Guide-Web_User_Interface_WebUI">
<title>Web User Interface - WebUI</title>
<para>
- WebUI is the name of GateIn's own webframework. GateIn Portal is built with it and
also many applications available in the GateIn platform suites. Using its own framework
means that the way the portal is build will not interfere with any web technology used by
the portlet deployed. Using a particular technology would have make it more difficult for
a user to use a different version (newer or older) of the same technology. If one choose
to create WebUI portlets, here is some documentation. In general we recommend to use JSF
as the framework of choice to develop new portlets.
+ 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
:
@@ -14,7 +20,7 @@
<itemizedlist>
<listitem>
<para>
- Events based flow
+ Events based flow.
</para>
</listitem>
<listitem>
@@ -29,31 +35,31 @@
</listitem>
<listitem>
<para>
- <xref linkend="sect-Reference_Guide-AJAX_in_GateIn_Framework" />
support
+ <xref linkend="sect-Reference_Guide-AJAX_Framework" /> support
</para>
</listitem>
<listitem>
<para>
- Portlet API friendly
+ Portlet API friendly.
</para>
</listitem>
</itemizedlist>
- <section id="sect-Reference_Guide-Web_User_Interface_WebUI-Resources">
- <title>Resources</title>
+ <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" /> : GateIn
portlets are built with WebUI
+ <xref linkend="sect-Reference_Guide-Portlet_Lifecycle" />:
&PRODUCT; portlets are built with WebUI
</para>
</listitem>
<listitem>
<para>
- <xref linkend="sect-Reference_Guide-Portlet_Lifecycle" /> : GateIn
portal itself is a WebUI application
+ <xref linkend="sect-Reference_Guide-Portlet_Lifecycle" />:
&PRODUCT; portal itself is a WebUI application
</para>
</listitem>
<listitem>
<para>
- How-to: <xref linkend="sect-Reference_Guide-Create_a_WebUI_Portlet"
/> : Learn how to write your own app with WebUI
+ <xref linkend="sect-Reference_Guide-Create_a_WebUI_Portlet" />:
Learn how to write your own app with WebUI
</para>
</listitem>
</itemizedlist>