| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Copyright 2006 The Apache Software Foundation |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <document> |
| <properties> |
| <title>InlineEditBox</title> |
| </properties> |
| <body> |
| |
| <section name="InlineEditBox"> |
| |
| <p> |
| Manages a single string value that can be edited "inline" in either text or textarea mode. |
| </p> |
| |
| <img src="../../images/ComponentReference/InlineEditBox.png" /> |
| |
| <img src="../../images/ComponentReference/InlineEditBox-editing.png" /> |
| |
| <section name="Parameters"> |
| <table> |
| <tr> |
| <th>Name</th> |
| <th>Type</th> |
| <th>Required</th> |
| <th>Default</th> |
| <th>Description</th> |
| </tr> |
| <tr> |
| <td>value</td> |
| <td>String</td> |
| <td>yes</td> |
| <td> </td> |
| <td> |
| The string property to manage. This will be dynamically updated with any changes made by |
| someone editing the value "inline" in the browser. |
| </td> |
| </tr> |
| <tr> |
| <td>listener</td> |
| <td> |
| <a href="../../apidocs/org/apache/tapestry/IActionListener.html"> |
| IActionListener |
| </a> |
| </td> |
| <td>no</td> |
| <td> </td> |
| <td> |
| Specifies an object that is notified when the inline change is made, which is |
| typically a listener method of its container (for example, listeners.<em>method</em>). |
| |
| <br /><br /> |
| <span class="warn"> |
| <strong>Warning:</strong> |
| <p> |
| Because of the way the client side control works for this widget you will <em>not</em> be able to make an |
| <code>updateComponents</code> call from your listener method when a change is made. |
| </p> |
| <p> |
| If you would like a slightly more flexible way to get notified of changes AND be able to update other components |
| asynchronously you should use an <code>@EventListener(events = "onSave", targets="projName")</code> annotation instead. |
| </p> |
| </span> |
| </td> |
| </tr> |
| <tr> |
| <td>parameters</td> |
| <td> |
| Object or |
| <br /> |
| |
| Object[] or |
| <br /> |
| List |
| </td> |
| <td>no</td> |
| <td> </td> |
| <td> |
| <p> |
| An array of objects to be encoded into the URL. These parameters |
| will be decoded when the inline change is triggered. |
| </p> |
| |
| <p> |
| In a web application built onto of Enterprise JavaBeans, the context |
| is often the primary key of some Entity bean; typically such keys |
| are Strings or Integers. |
| </p> |
| <p> |
| A listener method can retrieve the parameters three ways: |
| <br /> |
| parameters are declared in the method itself, e.g. - listenerMethod( |
| <em>parameters</em> |
| ) |
| <br /> |
| parameters are declared along with the IRequestCycle, e.g. - |
| listenerMethod(IRequestCycle cycle, |
| <em>parameters</em> |
| ) |
| |
| <br /> |
| or through the request cycle, e.g. - listenerMethod(IReuqestCycle |
| cycle), using IRequestCycle.getListenerParameters() |
| </p> |
| <p> |
| Prior to release 2.2, the parameters were always type String. They |
| may now be of any type; type will be maintained when the parameters |
| are later retrieved by a listener. See |
| <a href="../../apidocs/org/apache/tapestry/util/io/SqueezeAdaptor.html"> |
| SqueezeAdaptor |
| </a> |
| for more details. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td>stateful</td> |
| <td>boolean</td> |
| <td>no</td> |
| <td>true</td> |
| <td> |
| If true (the default), then the component requires an active (i.e., |
| non-new) HttpSession when triggered. Failing that, it throws a |
| <a href="../../apidocs/org/apache/tapestry/StaleLinkException.html"> |
| StaleLinkException |
| </a> |
| . If false, then no check is necessary. The latter works well with links |
| that encode all necessary state inside the URL itself. |
| </td> |
| </tr> |
| <tr> |
| <td>mode</td> |
| <td> |
| One of [text,textarea]. |
| </td> |
| <td>no</td> |
| <td>literal:text</td> |
| <td> |
| Defines the editing mode that will be displayed when editing the value. |
| </td> |
| </tr> |
| <tr> |
| <td>disabled</td> |
| <td>boolean</td> |
| <td>no</td> |
| <td>false</td> |
| <td> |
| Controls whether the component is active or not. A disabled |
| InlineEditBox that isn't currently being edited will simply not allow editing |
| when clicking on it. If the edit box is already being used when it is disable (like with |
| an ajax request update) the editable area will be "greyed" out using the native browser |
| controls for disabling form input. |
| </td> |
| </tr> |
| <tr> |
| <td>minWidth</td> |
| <td>int</td> |
| <td>no</td> |
| <td>100</td> |
| <td> |
| The minimum display width for the editable input/textarea control in "pixels". |
| </td> |
| </tr> |
| <tr> |
| <td>minHeight</td> |
| <td>int</td> |
| <td>no</td> |
| <td>200</td> |
| <td> |
| The minimum display height for the editable input/textarea control in "pixels". |
| </td> |
| </tr> |
| <tr> |
| <td>doFade</td> |
| <td>boolean</td> |
| <td>no</td> |
| <td>false</td> |
| <td> |
| Whether the animation transition from editing -> normal mode should be a fade. If |
| false (the default) - the animation sequence will be a simple highlight effect. |
| </td> |
| </tr> |
| </table> |
| |
| <p> |
| Body: |
| <strong>allowed</strong> |
| </p> |
| |
| <p> |
| Informal parameters: |
| <strong>allowed</strong> |
| </p> |
| |
| <p> |
| Reserved parameters: |
| <em>none</em> |
| </p> |
| |
| </section> |
| |
| <section name="Examples"> |
| TODO... |
| </section> |
| |
| </section> |
| |
| </body> |
| </document> |