Skip to content

History

Revisions

  • Created PopupMenu 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    59095b0
  • Destroyed aaa (markdown)

    RomanPerin committed Aug 7, 2014
    949127d
  • Created aaa (markdown)

    RomanPerin committed Aug 7, 2014
    6aad12f
  • Created TreeTable 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    a7be572
  • Created ScrollPosition 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    7fc8603
  • Destroyed https: github.com TeamDev Ltd OpenFaces wiki (markdown)

    AlexanderLitus committed Aug 7, 2014
    7af76ab
  • Created Validation Framework 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    d421fe9
  • Created TwoListSelection 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    cd20b08
  • Created <div class="wiki-content" style="margin-right:10px;"> <p>The <cite>TagCloud</cite> component is used to display cloud of tags in several layout types.</p> <td class="confluenceTd" valign="top" width="40%"> <p><span class="error">Unable to render embedded object: File (tagCloud.png) not found.</span><br> <a href="http://www.openfaces.org/demo/tagcloud/" class="external-link" rel="nofollow">Online Demo</a> </p> <div> <ul> <li><a href="#TagCloud2.x%28Incomplete%29-KeyFeatures">Key Features</a></li> <li><a href="#TagCloud2.x%28Incomplete%29-SpecifyingtheContent">Specifying the Content</a></li> <ul> <li><a href="#TagCloud2.x%28Incomplete%29-Ordering">Ordering</a></li> <li><a href="#TagCloud2.x%28Incomplete%29-AjaxandServerSideEventListeners">Ajax and Server-Side Event Listeners</a></li> <li><a href="#TagCloud2.x%28Incomplete%29-ClientSideEvents">Client-Side Events</a></li> </ul> <li><a href="#TagCloud2.x%28Incomplete%29-Appearance">Appearance</a></li> <ul> <li><a href="#TagCloud2.x%28Incomplete%29-Layouts">Layouts</a></li> <ul> <li><a href="#TagCloud2.x%28Incomplete%29-Spherelayout">Sphere layout</a></li> </ul> <li><a href="#TagCloud2.x%28Incomplete%29-CustomizingStyles">Customizing Styles</a></li> </ul> </ul> </div> <h4><a name="TagCloud2.x%28Incomplete%29-KeyFeatures"></a>Key Features</h4> <ul> <li>Several types of layout</li> <li>Styling</li> <li>Ordering</li> <li>Collections and arrays support</li> </ul> <h4><a name="TagCloud2.x%28Incomplete%29-SpecifyingtheContent"></a>Specifying the Content</h4> <p>To add <cite>TagCloud</cite> component to the page, use the <u>&lt;o:tagCloud&gt;</u> tag. Then, set the source of items to required <b>items</b> attribute. As source of items you can use either a java collection or an array of objects of any type. Regardless of class which represents tag item, there are five properties of it, which you can set through the attributes:</p> <ul> <li>The <b>itemKey</b> attribute specifies unique identifier of the item.</li> <li>The <b>itemText</b> attribute specifies item's text. In addition, you are able use a converter for this attribute: just set one to the <b>converter</b> attribute. </li> <li>The <b>itemWeight</b> attribute specifies weight of tag.</li> <li>The <b>itemTitle</b> is rendered to the <b>title</b> attribute of html hyperlink.</li> <li>The <b>itemUrl</b> should contain only EL expression that return an url string for each item. It will be rendered as href attribute of hyperlink. </li> </ul> <p>Also, you can get access to the current item by request-scope variable, defined in <b>var</b> attribute.</p> <h5><a name="TagCloud2.x%28Incomplete%29-Ordering"></a>Ordering</h5> <p>The <cite>TagCloud</cite> supports 5 different types of items ordering. Order in which items are displayed, is specified by <b>order</b> attribute. Available orders are given in the table below:</p> <div class="table-wrap"> <table class="confluenceTable"> <tbody> <tr> <th class="confluenceTh"> Values</th> <th class="confluenceTh"> Description</th> </tr> <tr> <td class="confluenceTd"><i>"alphabetically"</i></td> <td class="confluenceTd"> It's default order.</td> </tr> <tr> <td class="confluenceTd"><i>"original"</i></td> <td class="confluenceTd"> In this case, component makes no ordering and display items as they are in the source. </td> </tr> <tr> <td class="confluenceTd"><i>"random"</i></td> <td class="confluenceTd"> The TagCloud will show items randomly.</td> </tr> <tr> <td class="confluenceTd"><i>"weight"</i> and <i>"weightRevers"</i></td> <td class="confluenceTd"> The TagCloud will sort items by weight ascending and descending.</td> </tr> </tbody> </table> </div> <h5><a name="TagCloud2.x%28Incomplete%29-AjaxandServerSideEventListeners"></a>Ajax and Server-Side Event Listeners</h5> <p>The TagCloud component allows you to trigger server-side actions with form submission or with Ajax (by click on tag item). Methods which will handle these actions should be specified in the <b>action</b> and/or <b>actionListener</b> attributes (to know the difference between these attributes, see the <cite><a href="/display/OF/Ajax+Framework+2.x" title="Ajax Framework 2.x">Ajax Framework</a></cite> documentation page). Naturally, these methods have access to the selected tag item as shown in an example below.</p> <p>You can turn on the Ajax mode and configure the TagCloud to reload the specified set of components instead of reloading the whole page by specifying its <b>render</b> attribute. This attribute is specified as a space-separated list of component Ids in the same way as the <b>render</b> attribute of the <cite><a href="/display/OF/Ajax+2.x" title="Ajax 2.x">Ajax</a></cite> component. Specifying this attribute will also make action and/or actionListener specified for the component to be executed during the Ajax request as well. If the Ajax mode is turned on it doesn't submit data for form's components for processing on the server by default, so if you'd like to include some particular components into the Ajax request, for their data to be available during action execution or be saved through bindings, you can specify the <b>exeucte</b> attribute. Like the <b>render</b> attribute, this attribute is specified as a space-delimited list of component Ids in the same way as for the Ajax component.</p> <p>Here is the simple example of described features:</p> <div class="code panel" style="border-width: 1px;"> <div class="codeContent panelContent"> <pre class="code-java">&lt;h:form id=<span class="code-quote">"formID"</span>&gt; &lt;h:outputText value=<span class="code-quote">"#{ExampleBean.choosenTag}"</span> id=<span class="code-quote">"choosenTagOutputText"</span>/&gt; &lt;o:tagCloud ... actionListener=<span class="code-quote">"#{ExampleBean.processAction}"</span> render=<span class="code-quote">"choosenTagOutputText"</span> ... /&gt; &lt;/h:form&gt; </pre> </div> </div> <div class="code panel" style="border-width: 1px;"> <div class="codeContent panelContent"> <pre class="code-java"><span class="code-keyword">public</span> void processAction(AjaxActionEvent event) { TagCloud cloud = (TagCloud) event.getComponent(); Map&lt;<span class="code-object">String</span>, <span class="code-object">Object</span>&gt; requestMap = FacesContext.getCurrentInstance().getExternalContext().getRequestMap(); <span class="code-comment">// Get the selected item </span> ExampleItemClass item = (ExampleItemClass) requestMap.get(cloud.getVar()); <span class="code-comment">// Set field that is defined as value of OutputText </span> <span class="code-keyword">this</span>.choosenTag = items.toString(); } </pre> </div> </div> <h5><a name="TagCloud2.x%28Incomplete%29-ClientSideEvents"></a>Client-Side Events</h5> <p>The <cite>TagCloud</cite> component supports a set of standard client-side events such as <b>onclick</b>, <b>ondblclick</b>, <b>onmousedown</b>, <b>onmouseover</b>, <b>onmouseup</b>, <b>onmouseout</b>, <b>onmousemove</b>, <b>oncontextmenu</b>. In addition, the <cite>TagCloud</cite> provides a component-specific <b>onitemclick</b> event which occurs when the user clicks on tag item.</p> <h4><a name="TagCloud2.x%28Incomplete%29-Appearance"></a>Appearance</h4> <p>By default, every tag item is rendered without its weight, however, you can customize this option with boolean <b>itemWeightVisible</b> attribute. Also, you can configure weight displaying format with the <b>itemWeightFormat</b> attribute, which accepts <u>java.text.DecimalFormat</u> String patterns.</p> <h5><a name="TagCloud2.x%28Incomplete%29-Layouts"></a>Layouts</h5> <p>The TagCloud component supports different layout types. Type of layout is specified by <b>layout</b> attribute that can take these values:</p> <div class="table-wrap"> <table class="confluenceTable"> <tbody> <tr> <th class="confluenceTh"> Values</th> <th class="confluenceTh"> Description</th> </tr> <tr> <td class="confluenceTd"><i>"rectangle"</i></td> <td class="confluenceTd"> In this case, cloud is rendered as rectangle of tag items. It's default layout. </td> </tr> <tr> <td class="confluenceTd"><i>"oval"</i></td> <td class="confluenceTd"> Cloud is rendered as oval.</td> </tr> <tr> <td class="confluenceTd"><i>"vertical"</i></td> <td class="confluenceTd"> Cloud is rendered as vertical stack of tag items.</td> </tr> <tr> <td class="confluenceTd"><i>"sphere"</i></td> <td class="confluenceTd"> Cloud is rendered as 3D sphere, where you can customize a couple of parameters. </td> </tr> </tbody> </table> </div> <h6><a name="TagCloud2.x%28Incomplete%29-Spherelayout"></a>Sphere layout</h6> <p>Here are description of configurable properties of "sphere" layout.</p> <div class="table-wrap"> <table class="confluenceTable"> <tbody> <tr> <th class="confluenceTh"> Attributes</th> <th class="confluenceTh"> Descriptions</th> </tr> <tr> <td class="confluenceTd"><b>rotationSpeed3D</b></td> <td class="confluenceTd"> Speed of sphere rotation degrees per second.</td> </tr> <tr> <td class="confluenceTd"><b>shadowScale3D</b></td> <td class="confluenceTd"> Coefficient of the text shadowing for the farthest sphere point. Value should lie in the interval from 0 to 1. In case of 1, the farthest item will have the same color as background, otherwise, if it's 1 then shadowing will be turned off. </td> </tr> <tr> <td class="confluenceTd"><b>stopRotationPeriod3D</b></td> <td class="confluenceTd"> Time in seconds between mouseout and rotation stop. Can be a fractional number. </td> </tr> </tbody> </table> </div> <h5><a name="TagCloud2.x%28Incomplete%29-CustomizingStyles"></a>Customizing Styles</h5> <p>With the <cite>TagCloud</cite> component, you can define styles for the entire component as well as for individual tag items. The style-related attributes are given in the tables below.</p> <p>Styles for the entire component:</p> <div class="table-wrap"> <table class="confluenceTable"> <tbody> <tr> <th class="confluenceTh"> Attributes</th> <th class="confluenceTh"> Description</th> </tr> <tr> <td class="confluenceTd"><b>style</b> and <b>styleClass</b></td> <td class="confluenceTd"> A style applied to the entire <cite>TagCloud</cite> component.</td> </tr> <tr> <td class="confluenceTd"><b>rolloverStyle</b> and <b>rolloverClass</b></td> <td class="confluenceTd"> A style applied to the <cite>TagCloud</cite> component in the rollover state.</td> </tr> <tr> <td class="confluenceTd"><b>minItemStyle</b></td> <td class="confluenceTd"> A style for the tag item with minimal weight.</td> </tr> <tr> <td class="confluenceTd"><b>maxItemStyle</b></td> <td class="confluenceTd"> A style for the tag item with maximal weight.</td> </tr> </tbody> </table> </div> <p>All item-specific styles can be specified as a value-binding expression that uses variable specified in the "var" attribute. Here they are:</p> <div class="table-wrap"> <table class="confluenceTable"> <tbody> <tr> <th class="confluenceTh"> Attributes</th> <th class="confluenceTh"> Description</th> </tr> <tr> <td class="confluenceTd"><b>itemStyle</b> and <b>itemClass</b></td> <td class="confluenceTd"> A style applied to individual tag.</td> </tr> <tr> <td class="confluenceTd"><b>itemRolloverStyle</b> and <b>itemRolloverClass</b></td> <td class="confluenceTd"> A style applied to individual tag in the rollover state.</td> </tr> <tr> <td class="confluenceTd"><b>itemTextStyle</b> and <b>itemTextClass</b></td> <td class="confluenceTd"> A style for the tag item when mouse is over.</td> </tr> <tr> <td class="confluenceTd"><b>itemWeightStyle</b> and <b>itemWeightClass</b></td> <td class="confluenceTd"> A CSS style class for item weight.</td> </tr> </tbody> </table> </div> </div> (markdown)

    AlexanderLitus committed Aug 7, 2014
    83d718f
  • Created https://github.com/TeamDev-Ltd/OpenFaces/wiki (markdown)

    AlexanderLitus committed Aug 7, 2014
    df71206
  • Created TagCloud 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    0447fcc
  • Created TabSet 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    ecfcf6d
  • Created TabbedPane 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    4734ab2
  • Created SuggestionField 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    26a00ca
  • Created Spinner 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    714079c
  • Created Slider 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    927392d
  • Created SelectOneRadio 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    6167b81
  • Created SelectOneMenu 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    1de45b5
  • Created SelectManyCheckbox 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    f8653ee
  • Created SelectBooleanCheckbox 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    5b4cc13
  • Created <div class="wiki-content" style="margin-right:10px;"> <!-- wiki content --> <p>TOCSTART</p> <div> <ul> <li><a href="#PopupLayer2.x-KeyFeatures">Key Features</a></li> <li><a href="#PopupLayer2.x-BasicConfiguration">Basic Configuration</a></li> <li><a href="#PopupLayer2.x-AutoHiding">Auto-Hiding</a></li> <li><a href="#PopupLayer2.x-PositioningonthePage">Positioning on the Page</a></li> <li><a href="#PopupLayer2.x-SpecifyingtheSize">Specifying the Size</a></li> <li><a href="#PopupLayer2.x-DefiningModality">Defining Modality</a></li> <li><a href="#PopupLayer2.x-DraggingSupport">Dragging Support</a></li> <li><a href="#PopupLayer2.x-CustomizingStyles">Customizing Styles</a></li> <li><a href="#PopupLayer2.x-ClientSideEvents">Client-Side Events</a></li> <li><a href="#PopupLayer2.x-ClientSideAPI">Client-Side API</a></li> </ul> </div> <p>TOCEND</p> <p>The <cite>PopupLayer</cite> component is a container for other JSF components that is displayed over the page contents. The size, placement, timeout value, and modality of the component can be easily customized. A convenient API lets you manage the display behavior of the <cite>PopupLayer</cite> component on the client side.</p> <p><span class="image-wrap" style=""><img src="/download/attachments/1703957/popupLayer.png?version=1&amp;modificationDate=1290511121607" style="border: 0px solid black"></span><br> <a href="http://www.openfaces.org/demo/popuplayer/" class="external-link" rel="nofollow">Online Demo</a> </p> <h4><a name="PopupLayer2.x-KeyFeatures"></a>Key Features</h4> <ul> <li><a href="#PopupLayer2.x-BasicConfiguration">Ability to embed JSF components</a></li> <li><a href="#PopupLayer2.x-SettingModality">Support for modality</a></li> <li><a href="#PopupLayer2.x-DraggingSupport">Dragging Support</a></li> <li><a href="#PopupLayer2.x-ClientSideAPI">Client-side API</a></li> <li><a href="#PopupLayer2.x-AutoHiding">Auto-hiding by timeout</a></li> <li><a href="#PopupLayer2.x-CustomizingStyles">Style customization</a></li> <li><a href="#PopupLayer2.x-ClientSideEvents">Standard and component-specific client-side events</a></li> </ul> <h4><a name="PopupLayer2.x-BasicConfiguration"></a>Basic Configuration</h4> <p>To add the <cite>PopupLayer</cite> component to a page, use the <u>&lt;o:popupLayer&gt;</u> tag. As a container, the <cite>PopupLayer</cite> lets you place any kind of JSF components inside it to build its content. The display behavior of the <cite>PopupLayer</cite> component can be managed in two ways:</p> <ul> <li>Showing and hiding the <cite>PopupLayer</cite> component without reloading the page using the <tt>show()</tt> and <tt>hide()</tt> JavaScript functions. </li> </ul> <p>In the following example, when a user clicks the button, a <cite>PopupLayer</cite> component is shown. It contains a text and a button, which hides the <cite>PopupLayer</cite> when clicked.</p> <div class="code panel" style="border-width: 1px;"> <div class="codeContent panelContent"> <pre class="code-java">&lt;h:form id=<span class="code-quote">"form1"</span>&gt; &lt;input type=<span class="code-quote">"button"</span> id=<span class="code-quote">"popupInvoker"</span> value=<span class="code-quote">"Show PopupLayer"</span> onclick=<span class="code-quote">"O$('form1:popupLayer1').show();"</span>/&gt; &lt;o:popupLayer id=<span class="code-quote">"popupLayer1"</span>&gt; &lt;f:verbatim&gt; Click here to hide <span class="code-keyword">this</span> PopupLayer:&lt;br/&gt; &lt;input type=<span class="code-quote">"button"</span> value=<span class="code-quote">"Hide"</span> onclick=<span class="code-quote">"O$('form1:popupLayer1').hide();"</span>/&gt; &lt;/f:verbatim&gt; &lt;/o:popupLayer&gt; &lt;/h:form&gt; </pre> </div> </div> <ul> <li>Showing and hiding the <cite>PopupLayer</cite> component using the <b>visible</b> server-only boolean attribute, which you can bind to a boolean property in the backing bean, like shown in the example below: <div class="code panel" style="border-width: 1px;"> <div class="codeContent panelContent"> <pre class="code-java">&lt;o:popupLayer id=<span class="code-quote">"popupLayer1"</span> visible=<span class="code-quote">"#{TestBean.popupLayerIsVisible}"</span>&gt; &lt;h:outputText value=<span class="code-quote">"Some text"</span>/&gt; &lt;/o:popupLayer&gt; </pre> </div> </div> </li> </ul> <h4><a name="PopupLayer2.x-AutoHiding"></a>Auto-Hiding</h4> <p>The <cite>PopupLayer</cite> component can be automatically hidden after a timeout. You can specify the timeout value in milliseconds in the <b>hidingTimeout</b> attribute. If the <b>hidingTimeout</b> attribute is <i>"0"</i> (default), the <cite>PopupLayer</cite> component will not be hidden automatically.</p> <p>The <cite>PopupLayer</cite> component can be automatically dismissed when the user clicks outside of the component. You can define this behavior by setting the <b>hideOnOuterClick</b> attribute to <i>"true"</i> (by default, it is <i>"false"</i>).</p> <p>In the example below, if the user doesn't click the <u><i>Hide</i></u>button, the <cite>PopupLayer</cite> is hidden in 10000 milliseconds (or 10 seconds).</p> <div class="code panel" style="border-width: 1px;"> <div class="codeContent panelContent"> <pre class="code-java">&lt;o:popupLayer id=<span class="code-quote">"popupLayer1"</span> hidingTimeout=<span class="code-quote">"10000"</span>&gt; &lt;f:verbatim&gt; Click here to hide <span class="code-keyword">this</span> PopupLayer:&lt;br/&gt; &lt;input type=<span class="code-quote">"button"</span> value=<span class="code-quote">"Hide"</span> onclick=<span class="code-quote">"O$('form1:popupLayer1').hide();"</span>/&gt; &lt;/f:verbatim&gt; &lt;/o:popupLayer&gt; </pre> </div> </div> <h4><a name="PopupLayer2.x-PositioningonthePage"></a>Positioning on the Page</h4> <p>By default, the <cite>PopupLayer</cite>'s position is not defined and it is displayed as any other DHTML element with the absolute position: its placement may depend on CSS styles applied to it and/or the position on the page.</p> <p>You can position the <cite>PopupLayer</cite> component explicitly by specifying its <b>left</b> and <b>top</b> attributes in pixels. These attributes define the <b>x</b> and <b>y</b> coordinates of the component's upper-left corner relative to the upper-left corner of the document or an absolutely positioned immediate container of the <cite>PopupLayer</cite> component. Note that the <b>left</b> and <b>top</b> attributes should indicate the number of pixels, without the postfix <i>"px"</i>, like shown in the following example:</p> <div class="code panel" style="border-width: 1px;"> <div class="codeContent panelContent"> <pre class="code-java">&lt;o:popupLayer id=<span class="code-quote">"popupLayer1"</span> left=<span class="code-quote">"300"</span> top=<span class="code-quote">"200"</span>&gt; &lt;f:verbatim&gt; Click here to hide <span class="code-keyword">this</span> PopupLayer:&lt;br/&gt; &lt;input type=<span class="code-quote">"button"</span> value=<span class="code-quote">"Hide"</span> onclick=<span class="code-quote">"O$('form1:popupLayer1').hide();"</span>/&gt; &lt;/f:verbatim&gt; &lt;/o:popupLayer&gt; </pre> </div> </div> <h4><a name="PopupLayer2.x-SpecifyingtheSize"></a>Specifying the Size</h4> <p>By default, the <cite>PopupLayer</cite> component is adjusted to accommodate its content. However, you can set fixed width and height in any units (px, mm, em, etc) by using the <b>width</b> and <b>height</b> attributes.</p> <p>The following example shows a fixed-sized <cite>PopupLayer</cite> component:</p> <div class="code panel" style="border-width: 1px;"> <div class="codeContent panelContent"> <pre class="code-java">&lt;o:popupLayer id=<span class="code-quote">"popupLayer1"</span> width=<span class="code-quote">"200px"</span> height=<span class="code-quote">"100px"</span>&gt; &lt;f:verbatim&gt; Click here to hide <span class="code-keyword">this</span> PopupLayer:&lt;br/&gt; &lt;input type=<span class="code-quote">"button"</span> value=<span class="code-quote">"Hide"</span> onclick=<span class="code-quote">"O$('form1:popupLayer1').hide();"</span>/&gt; &lt;/f:verbatim&gt; &lt;/o:popupLayer&gt; </pre> </div> </div> <h4><a name="PopupLayer2.x-DefiningModality"></a>Defining Modality</h4> <p>You can specify whether the <cite>PopupLayer</cite> component is shown in a modal state using the <b>modal</b> attribute (set to <i>"false"</i> by default). When a modal <cite>PopupLayer</cite> is displayed, all other components on the page are inaccessible until the <cite>PopupLayer</cite> component is hidden.</p> <p>You can apply a style to the visible part of the page which is not covered by a modal <cite>PopupLayer</cite> by using the <b>modalLayerStyle</b> and <b>modalLayerClass</b> attributes. Note that this style is applied <em>only</em> if the <b>modal</b> attribute is set to <i>"true"</i>. The following example shows a modal <cite>PopupLayer</cite>: </p> <div class="code panel" style="border-width: 1px;"> <div class="codeContent panelContent"> <pre class="code-java">&lt;o:popupLayer id=<span class="code-quote">"popupLayer1"</span> modal=<span class="code-quote">"<span class="code-keyword">true</span>"</span> modalLayerStyle=<span class="code-quote">"background-color:silver;"</span>&gt; &lt;f:verbatim&gt; Click here to hide <span class="code-keyword">this</span> PopupLayer:&lt;br/&gt; &lt;input type=<span class="code-quote">"button"</span> value=<span class="code-quote">"Hide"</span> onclick=<span class="code-quote">"O$('form1:popupLayer1').hide();"</span>/&gt; &lt;/f:verbatim&gt; &lt;/o:popupLayer&gt; </pre> </div> </div> <p>By default, the modal <cite>PopupLayer</cite> can can be closed by pressing the Esc key. This behavior can be turned off by setting the <b>hideOnEsc</b> attribute to <i>false</i>.</p> <p>Note that modality is provided by covering the page by a <u>&lt;div&gt;</u> element that is placed under a modal <cite>PopupLayer</cite>. By default, this &lt;div&gt; has the z-index equal to 300 and a modal <cite>PopupLayer</cite> has the z-index equal to 301. While this configuration works fine in the most cases, you can tune the z-indexes using the <b>style</b> and <b>modalLayerStyle</b> attributes, if needed.</p> <h4><a name="PopupLayer2.x-DraggingSupport"></a>Dragging Support</h4> <p>The <cite>PopupLayer</cite> component supports dragging. By default, the dragging feature is turned off. Turning this feature on by setting the <b>draggable</b> attribute to <i>"true"</i> allows the user to drag the <cite>PopupLayer</cite> component by its content area.</p> <p>The following example shows a draggable <cite>PopupLayer</cite> component:</p> <div class="code panel" style="border-width: 1px;"> <div class="codeContent panelContent"> <pre class="code-java">&lt;o:popupLayer id=<span class="code-quote">"popupLayer1"</span> left=<span class="code-quote">"300"</span> top=<span class="code-quote">"200"</span> draggable=<span class="code-quote">"<span class="code-keyword">true</span>"</span>&gt; &lt;f:verbatim&gt; Click here to hide <span class="code-keyword">this</span> PopupLayer:&lt;br/&gt; &lt;input type=<span class="code-quote">"button"</span> value=<span class="code-quote">"Hide"</span> onclick=<span class="code-quote">"O$('form1:popupLayer1').hide();"</span>/&gt; &lt;/f:verbatim&gt; &lt;/o:popupLayer&gt; </pre> </div> </div> <p>It is possible to restrict the area where the <cite>PopupLayer</cite> can be moved using the <b>containment</b> attribute. This attribute can take the following values:</p> <ul class="alternate" type="square"> <li><i>"document"</i> – doesn't allow to move the <cite>PopupLayer</cite> across document's boundaries;</li> <li><i>"viewport"</i> – doesn't allow to move the <cite>PopupLayer</cite> out of the current viewport (the currently visible portion of the document); </li> <li><i>"containingBlock"</i> – doesn't allow to move the <cite>PopupLayer</cite> out of its containing block (the nearest parent node which has its <tt>position</tt> CSS property equal to <tt>"absolute"</tt> or <tt>"relative"</tt>; </li> <li><i>"#clientSideId"</i>, where the clientSideId part is an arbitrary client-side element id – doesn't allow to move the <cite>PopupLayer</cite> out of the element with the specified id. </li> </ul> <h4><a name="PopupLayer2.x-CustomizingStyles"></a>Customizing Styles</h4> <p>You can customize a style for the <cite>PopupLayer</cite> component in the normal and rollover states using the <b>style</b> and <b>styleClass</b> and the <b>rolloverStyle</b> and <b>rolloverClass</b> attributes respectively.</p> <h4><a name="PopupLayer2.x-ClientSideEvents"></a>Client-Side Events</h4> <p>The <cite>PopupLayer</cite> component supports a set of standard client-side events such as <b>onclick</b>, <b>ondblclick</b>, <b>onmousedown</b>, <b>onmouseover</b>, <b>onmouseup</b>, <b>onmouseout</b>, <b>onmousemove</b>, <b>onkeydown</b>, <b>onkeypress</b>, <b>onkeyup</b>.</p> <blockquote> <img src="/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"> Note that the keyboard events such as <b>onkeydown</b>, <b>onkeypress</b>, and <b>onkeyup</b> are fired only if the <cite>PopupLayer</cite> component contains elements that provide these events, for example <cite>HTMLInputText</cite> . </blockquote> <p>In addition, it provides a number of component-specific client-side events:</p> <ul> <li><b>onshow</b> - Occurs when the <cite>PopupLayer</cite> component is displayed on the client side.</li> <li><b>onhide</b> - Occurs when the <cite>PopupLayer</cite> component is hidden on the client side.</li> <li><b>ondragstart</b> - Occurs when the user starts dragging the <cite>PopupLayer</cite> component.</li> <li><b>ondragend</b> - Occurs when user finishes dragging the <cite>PopupLayer</cite> component.</li> </ul> <h4><a name="PopupLayer2.x-ClientSideAPI"></a>Client-Side API</h4> <p>All client-side API methods are listed in the following table:</p> <div class="table-wrap"> <table class="confluenceTable"> <tbody> <tr> <th class="confluenceTh"> Method</th> <th class="confluenceTh"> Description</th> </tr> <tr> <td class="confluenceTd"><tt>show()</tt></td> <td class="confluenceTd"> Makes the <cite>PopupLayer</cite> component visible. This method is described in the <a href="#PopupLayer2.x-BasicConfiguration">Basic Configuration</a> section. </td> </tr> <tr> <td class="confluenceTd"><tt>showAtXY(x, y)</tt></td> <td class="confluenceTd"> Shows the <cite>PopupLayer</cite> component at the specified absolute <font color="orange">x</font> and <b>y</b> coordinates </td> </tr> <tr> <td class="confluenceTd"><tt>showCentered()</tt></td> <td class="confluenceTd"> Shows the <cite>PopupLayer</cite> component in the center of the browser window. </td> </tr> <tr> <td class="confluenceTd"><tt>hide()</tt></td> <td class="confluenceTd"> Hides the <cite>PopupLayer</cite> component.</td> </tr> <tr> <td class="confluenceTd"><tt>setLeft(x)</tt></td> <td class="confluenceTd"> Sets the x coordinate that will be used by the <tt>show()</tt> function.</td> </tr> <tr> <td class="confluenceTd"><tt>setTop(y)</tt></td> <td class="confluenceTd"> Sets the y coordinate that will be used by the <tt>show()</tt> function.</td> </tr> <tr> <td class="confluenceTd"><tt>isVisible()</tt></td> <td class="confluenceTd"> Returns <i>true</i> if the <cite>PopupLayer</cite> is visible.</td> </tr> <tr> <td class="confluenceTd"><tt>getLeft()</tt></td> <td class="confluenceTd"> Returns the <tt>x</tt> coordinate of the top-left corner of the <cite>PopupLayer</cite> in pixels. </td> </tr> <tr> <td class="confluenceTd"><tt>getTop()</tt></td> <td class="confluenceTd"> Returns the <tt>y</tt> coordinate of the top-left corner of the <cite>PopupLayer</cite> in pixels. </td> </tr> </tbody> </table> </div> </div> (markdown)

    AlexanderLitus committed Aug 7, 2014
    4591d04
  • Created PopupLayer 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    e1645e6
  • Created LoadBundle 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    2b7a811
  • Created LevelIndicator 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    e6bc639
  • Created LayeredPane 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    7a1e727
  • Created Installation and Configuration 3.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    e9807a3
  • Created Installation and Configuration 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    e421a97
  • Created InputTextarea 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    6344f3f
  • Created InputText 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    153a8c3
  • Created Window 2.x (markdown)

    AlexanderLitus committed Aug 7, 2014
    83a5927