<?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 "../../User_Guide.ent">
        %BOOK_ENTITIES;
        ]>
<section id="sect-User_Guide-Manage_Portlets_and_Gadgets">
  <title>Manage Portlets and Gadgets</title>
  <!--
       <para>
       Portlets and gadgets are organized in different categories. Each category contains one or several portlets or gadgets. You can also mix portlets and gadgets into one category. By default all gadgets are placed in the <emphasis>Gadgets</emphasis> category.
     </para>    -->
  <section id="sect-User_Guide-Manage_Portlets_and_Gadgets-Import_Gadget_Portlet">
    <title>Import portlets and gadgets</title>
    <para>This feature enables you to import default portlets and gadgets into different categories as follows:</para>
    <note>
      <!--<title>Technical Information about the Portlet Import</title>-->
      <para>
        The Application Registry looks in all webapps of your application server for a file located at
        WEB-INF/portlet.xml and registers the portlets found there. When the user clicks on "Auto Import" the portlets
        of all webapps are imported. If there is a portlet.xml file in a webapp a new category is created whose name is
        the webapp war name (or the webapp folder name). All the portlets that are configured in the portlet.xml file
        are added to the new category.
      </para>
    </note>
    <procedure>
      <step>
        <para>Click
          <inlinemediaobject>
            <imageobject>
              <imagedata fileref="images/ImportApplicationsbutton.png" format="PNG" contentwidth="6mm"/>"
            </imageobject>
          </inlinemediaobject>
          at the right corner on the action bar.
        </para>
      </step>
      <step>
        <para>Click
          <guibutton>OK</guibutton>
          to accept importing portlets and gadgets automatically in the confirmation window.
        </para>
        <para>All portlets and gadgets of all categories will be imported and listed on the left pane.</para>
      </step>
      <!--
      <step>
        <para>
          In the <emphasis role="bold">Group</emphasis> menu, select <emphasis role="bold">Administration</emphasis> then <emphasis role="bold">Application Registry</emphasis>:
        </para>
        <mediaobject>
          <imageobject role="html">
            <imagedata fileref="images/Org1.png" format="PNG" align="center" scale="90" />
          </imageobject>
          <imageobject role="fo">
            <imagedata fileref="images/Org1.png" format="PNG" align="center"  scalefit="1" contentwidth="150mm" />
          </imageobject>
        </mediaobject>
      </step>
      <step>
        <para>
          Click <emphasis role="bold">Import Applications</emphasis> on the right hand side. A confirmation message should appear as such:
        </para>
        <mediaobject>
          <imageobject role="html">
            <imagedata fileref="images/local.png" format="PNG" align="center" scale="110" />
          </imageobject>
          <imageobject role="fo">
            <imagedata fileref="images/local.png" format="PNG" align="center" scalefit="1" contentwidth="110mm" />
          </imageobject>
        </mediaobject>
      </step> -->
    </procedure>
  </section>

  <section id="sect-User_Guide-Dashboard_Portlet-View_Information">
    <title>View/Edit detailed information of portlet/gadget</title>
    <para>To view detailed information of portlet/gadget, simply select one portlet/gadget in the left pane. The
      detailed information of that portlet will be shown on the right pane.
    </para>
    <mediaobject>
      <imageobject role="html">
        <imagedata fileref="images/InformationPortlet.png" format="PNG" align="center" scale="110"/>
      </imageobject>
      <imageobject role="fo">
        <imagedata fileref="images/InformationPortlet.png" format="PNG" align="center" scalefit="1"
                   contentwidth="110mm"/>
      </imageobject>
    </mediaobject>
    <variablelist>
      <varlistentry>
        <term>
          <emphasis role="bold">Left pane</emphasis>
        </term>
        <listitem>
          <para>
            All portlets and gadgets grouped by categories
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <emphasis role="bold">Right pane</emphasis>
        </term>
        <listitem>
          <para>
            shows detail information about a portlet: Name, Display name, Description and Portlet preferences.
          </para>
        </listitem>
      </varlistentry>
    </variablelist>
    <para>To edit a portlet, click
      <inlinemediaobject>
        <imageobject>
          <imagedata fileref="images/edit-icon.png" format="PNG" contentwidth="6mm"/>"
        </imageobject>
      </inlinemediaobject>
      on the top corner of right pane. The form to edit will appear:
    </para>
    <mediaobject>
      <imageobject role="html">
        <imagedata fileref="images/EditApplicationInformation.png" format="PNG" align="center" scale="110"/>
      </imageobject>
      <imageobject role="fo">
        <imagedata fileref="images/EditApplicationInformation.png" format="PNG" align="center" scalefit="1"
                   contentwidth="110mm"/>
      </imageobject>
    </mediaobject>
    <para>Make changes in fields, except <guilabel>Application Name</guilabel>.
    </para>
  </section>

  <section id="sect-User_Guide-Dashboard_Portlet-Display_Gadgets">
    <title>Display Gadgets</title>
    <para>
      You can change the number of columns available in the Dashboard Portlet.
    </para>
    <procedure>
      <step>
        <para>
          Click <emphasis role="bold">Site Editor</emphasis>, then select
          <emphasis role="bold">Edit Page</emphasis>
        </para>
      </step>
      <step>
        <para>
          Click
          <emphasis role="bold">Edit Portlet</emphasis>
          button (which is displayed a pencil icon when you mouse-over the portlet in edit mode). It will show a dialog
          to change the number of columns to display gadgets.
        </para>
        <mediaobject>
          <imageobject role="html">
            <imagedata fileref="images/Column.png" format="PNG" align="center" scale="110"/>
          </imageobject>
          <imageobject role="fo">
            <imagedata fileref="images/Column.png" format="PNG" align="center" scalefit="1" contentwidth="120mm"/>
          </imageobject>
        </mediaobject>
      </step>
      <step>
        <para>
          Change the number of columns and click the
          <emphasis role="bold">Save</emphasis>
          button to accept the changes.
        </para>
      </step>
    </procedure>

  </section>


  <section id="sect-User_Guide-Manage_Portlets_and_Gadgets-Set_Access_Permission_on_Portlets">
    <title>Set Access Permission on Portlets</title>

    <procedure>
      <step>
        <para>
          In the
          <emphasis role="bold">Group</emphasis>
          menu, select
          <emphasis role="bold">Administration</emphasis>
          and then <emphasis role="bold">Application Registry</emphasis>.
        </para>
        <mediaobject>
          <imageobject role="html">
            <imagedata fileref="images/PortletPermission.png" format="PNG" align="center" scale="110"/>
          </imageobject>
          <imageobject role="fo">
            <imagedata fileref="images/PortletPermission.png" format="PNG" align="center" scalefit="1"
                       contentwidth="160mm"/>
          </imageobject>
        </mediaobject>
      </step>
      <step>
        <para>
          Select a category in the Category pane that includes the portlet you want to set permissions on. All portlets
          of that category will be listed underneath.
        </para>
      </step>
      <step>
        <para>
          To set permission for a portlet:
        </para>
        <itemizedlist>
          <listitem>
            <para>
              Click the
              <emphasis role="bold">Add Permission</emphasis>
              button to add access permissions to more groups.
            </para>
            <mediaobject>
              <imageobject role="html">
                <imagedata fileref="images/AddPermission.png" format="PNG" align="center" scale="110"/>
              </imageobject>
              <imageobject role="fo">
                <imagedata fileref="images/AddPermission.png" format="PNG" align="center" scalefit="1"
                           contentwidth="150mm"/>
              </imageobject>
            </mediaobject>
          </listitem>
          <listitem>
            <para>
              Or check
              <emphasis role="bold">Make it public</emphasis>
              to allow everyone to access.
            </para>
          </listitem>
        </itemizedlist>
        <para>
          Whenever the user creates or modifies a page, he or she can only see and use gadgets/portlets that fulfill two
          conditions: the portlet is in a
          <emphasis role="bold">category</emphasis>
          which the user has access permission too and the user has access permission on the
          <emphasis role="bold">portlet</emphasis>
        </para>
      </step>
    </procedure>
  </section>

  <section id="sect-User_Guide-Manage_Portlets_and_Gadgets-Edit_Specific_Portlet">
    <title>Edit a specific portlet</title>
    <para>This section tells you how to access the edit mode of a portlet and edit it.</para>
    <procedure>
      <step>
        <para>Create or edit a page as stated in Section 4.1.3, Edit a portal. In this step, there will be a container
          that contains and arranges portlets as contents of that page. You can add a portlet to that page by dragging
          it from the left pane and dropping it into this container space.
        </para>
      </step>
      <step>
        <para>Open the form to edit a portlet by clicking
          <inlinemediaobject>
            <imageobject>
              <imagedata fileref="images/edit-icon1.png" format="PNG" contentwidth="6mm"/>"
            </imageobject>
          </inlinemediaobject>
          at the upper left corner of that portlet:
        </para>
        <mediaobject>
          <imageobject role="html">
            <imagedata fileref="images/editPortlet.png" format="PNG" align="center" scale="110"/>
          </imageobject>
          <imageobject role="fo">
            <imagedata fileref="images/editPortlet.png" format="PNG" align="center" scalefit="1" contentwidth="90mm"/>
          </imageobject>
        </mediaobject>
      </step>
      <step>
        <para>Enter new values that you want to edit in this form, then click
          <guibutton>Save</guibutton>
          to save new values:
        </para>
        <mediaobject>
          <imageobject role="html">
            <imagedata fileref="images/editPortlet1.png" format="PNG" align="center" scale="110"/>
          </imageobject>
          <imageobject role="fo">
            <imagedata fileref="images/editPortlet1.png" format="PNG" align="center" scalefit="1" contentwidth="90mm"/>
          </imageobject>
        </mediaobject>
        <para>Normally, a portlet has four tabs: Window Setting, Select Icon, Decoration Themes and Access Permission.
          In addition, some portlets may also have Edit Mode or Preferences. The administrator can change the interface
          of a portlet by changing values in the Edit Mode tab or in the Preferences Tab.
        </para>
        <para>The Portlet Setting tab includes:</para>
        <variablelist>
          <varlistentry>
            <term>Display Name</term>
            <listitem>
              <para>
                The display name of portlet.
              </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>Window Title</term>
            <listitem>
              <para>
                The window title with the length between 3 and 60 characters..
              </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>Width</term>
            <listitem>
              <para>
                The portlet's vertical size. The value of this field must be in numeric format.
              </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>Height</term>
            <listitem>
              <para>
                The portlet's horizontal size. The value of this field must be in numeric format.
              </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>Show Info Bar</term>
            <listitem>
              <para>
                The option enables the information bar to be shown or hidden.
              </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>Show Portlet Mode</term>
            <listitem>
              <para>
                The option enables the portlet mode to be shown or hidden.
              </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>Show Window State</term>
            <listitem>
              <para>
                The option enables the portlet's window state to be shown or not.
              </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>Description</term>
            <listitem>
              <para>
                The brief information about the portlet. The length must be between 0 and 255 characters.
              </para>
            </listitem>
          </varlistentry>
        </variablelist>
        <note>
          <para>If Show Info Bar is not checked, portlet mode and window state will not be displayed in that portlet.
          </para>
        </note>
        <para>The Select Icon tab enables you to select an icon for the portlet. By clicking Get Default, you do not
          have to choose any icon from the list, the suitable icon will be gotten automatically.
        </para>
        <mediaobject>
          <imageobject role="html">
            <imagedata fileref="images/selectIconTab.png" format="PNG" align="center" scale="110"/>
          </imageobject>
          <imageobject role="fo">
            <imagedata fileref="images/selectIconTab.png" format="PNG" align="center" scalefit="1"
                       contentwidth="150mm"/>
          </imageobject>
        </mediaobject>
        <para>The Decoration Themes tab enables you to select a theme for the portlet from the themes list. By clicking
          <guilabel>Get Default</guilabel>, you do not have to choose any theme, it will be automatically set.
        </para>
        <para>The Access Permission tab enables you to set the access permission on the portlet. The portlet can be made
          public to everyone or restricted to specific groups. See more details at <xref
                  linkend="sect-User_Guide-Manage_Permissions"/>.
        </para>
      </step>
    </procedure>
    <note>
      <para>Some portlets have Edit Mode and Preferences tabs.</para>
      <para>The
        <emphasis role="bold">Mode tab</emphasis>
        where administrator can define the interface details.
      </para>
    </note>
  </section>
  <section id="sect-User_Guide-Manage_Portlets_and_Gadgets-Add_a_Gadget">
    <title>Add a Gadget</title>
    <para>
      In the
      <emphasis role="bold">Group</emphasis>
      menu, select
      <emphasis role="bold">Administration</emphasis>
      then <emphasis role="bold">Application Registry</emphasis>. Click the
      <emphasis role="bold">Gadget</emphasis>
      icon.
    </para>
    <mediaobject>
      <imageobject role="html">
        <imagedata fileref="images/Gadgetnew.png" format="PNG" align="center" scale="110"/>
      </imageobject>
      <imageobject role="fo">
        <imagedata fileref="images/Gadgetnew.png" format="PNG" align="center" scalefit="1" contentwidth="150mm"/>
      </imageobject>
    </mediaobject>
    <para>
      You may add a remote gadget using its URL or create a brand-new one:
    </para>

    <procedure>
      <title>Add a remote Gadget</title>
      <step>
        <para>
          Click <emphasis role="bold">Add a remote gadget</emphasis>:
        </para>
        <mediaobject>
          <imageobject>
            <imagedata fileref="images/AddGadgetnew.png" format="PNG" align="center" width="444"/>
          </imageobject>
        </mediaobject>
      </step>
      <step>
        <para>
          Enter the URL of the remote gadget in the
          <emphasis role="bold">URL</emphasis>
          field.
        </para>
        <mediaobject>
          <imageobject role="html">
            <imagedata fileref="images/AddGadgetnewUrl.png" format="PNG" align="center" scale="110"/>
          </imageobject>
          <imageobject role="fo">
            <imagedata fileref="images/AddGadgetnewUrl.png" format="PNG" align="center" scalefit="1"
                       contentwidth="150mm"/>
          </imageobject>
        </mediaobject>
      </step>
      <step>
        <para>
          Click <emphasis role="bold">Add</emphasis>. The new remote gadget will be appear in gadget list on left pane of
          the Dashboard portlet.
        </para>
      </step>
    </procedure>
    <procedure>
      <title>Create a new Gadget</title>
      <step>
        <para>
          Click <emphasis role="bold">Create a new gadget</emphasis>:
        </para>
        <mediaobject>
          <imageobject role="html">
            <imagedata fileref="images/CreateGadget1.png" format="PNG" align="center" scale="110"/>
          </imageobject>
          <imageobject role="fo">
            <imagedata fileref="images/CreateGadget1.png" format="PNG" align="center" scalefit="1"
                       contentwidth="150mm"/>
          </imageobject>
        </mediaobject>
      </step>
      <step>
        <para>
          Populate the
          <literal>Source</literal>
          field with the XML code of the new gadget.
        </para>
      </step>
    </procedure>
    <para>
      You can edit or refresh a gadget using the icons in the top right of the
      <emphasis role="bold">Gadget Details</emphasis>
      pane.
    </para>
    <para>
      You can delete a local gadget using the trashcan icon to the right of the appropriate gadget in the gadget list.
    </para>
    <mediaobject>
      <imageobject>
        <imagedata fileref="images/ActionGadget.png" format="PNG" align="center" width="444"/>
      </imageobject>
    </mediaobject>
  </section>

  <section id="sect-User_Guide-Manage_Portlets_and_Gadgets-Add_a_new_Gadget_to_the_Dashboard_Portlet">
    <title>Add a new Gadget to the Dashboard Portlet</title>
    <para>
      See
      <xref linkend="sect-User_Guide-Dashboard_Portlet-Add_Gadgets"/>
      for instructions on how to add new gadgets to the dashboard.
    </para>
  </section>


  <section id="sect-User_Guide-Manage_Gadgets-Edit_a_Gadget">
    <title>Edit a Gadget</title>
    <para>
      Click the
      <emphasis role="bold">Edit Gadget</emphasis>
      icon located in the header of the
      <emphasis role="bold">Gadget Details</emphasis>
      page to display the following window:
    </para>
    <mediaobject>
      <imageobject>
        <imagedata fileref="images/Source.png" format="PNG" align="center" width="444"/>
      </imageobject>
    </mediaobject>
  </section>

  <!--Covered in section above SM
     <section id="sect-User_Guide-Manage_Gadgets-Refresh_a_Gadget">
       <title>Refresh a Gadget</title>
         <para>
           Click the <emphasis role="bold">Refresh information</emphasis> icon located in the header of the <emphasis role="bold">Gadget Details</emphasis> page to display the following window:
         </para>

     </section>

     <section id="sect-User_Guide-Manage_Gadgets-Delete_a_Gadget">
       <title>Delete a Gadget</title>

         <para>
           Click the trash can icon located next to the name of the gadget. An alert message should pop up asking for confirmation:
         </para>
         <mediaobject>
           <imageobject>
             <imagedata fileref="images/Delete.png" format="PNG" align="center" />
           </imageobject>
         </mediaobject>
     </section> -->

</section>




