Source Code Cross Referenced for OrderableListBase.java in  » IDE-Netbeans » visualweb.api.designer » com » sun » rave » web » ui » component » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » visualweb.api.designer » com.sun.rave.web.ui.component 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003:         *
004:         * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005:         *
006:         * The contents of this file are subject to the terms of either the GNU
007:         * General Public License Version 2 only ("GPL") or the Common
008:         * Development and Distribution License("CDDL") (collectively, the
009:         * "License"). You may not use this file except in compliance with the
010:         * License. You can obtain a copy of the License at
011:         * http://www.netbeans.org/cddl-gplv2.html
012:         * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013:         * specific language governing permissions and limitations under the
014:         * License.  When distributing the software, include this License Header
015:         * Notice in each file and include the License file at
016:         * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
017:         * particular file as subject to the "Classpath" exception as provided
018:         * by Sun in the GPL Version 2 section of the License file that
019:         * accompanied this code. If applicable, add the following below the
020:         * License Header, with the fields enclosed by brackets [] replaced by
021:         * your own identifying information:
022:         * "Portions Copyrighted [year] [name of copyright owner]"
023:         *
024:         * Contributor(s):
025:         *
026:         * The Original Software is NetBeans. The Initial Developer of the Original
027:         * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028:         * Microsystems, Inc. All Rights Reserved.
029:         *
030:         * If you wish your version of this file to be governed by only the CDDL
031:         * or only the GPL Version 2, indicate your decision by adding
032:         * "[Contributor] elects to include this software in this distribution
033:         * under the [CDDL or GPL Version 2] license." If you do not indicate a
034:         * single choice of license, a recipient has the option to distribute
035:         * your version of this file under either the CDDL, the GPL Version 2 or
036:         * to extend the choice of license to its licensees as provided above.
037:         * However, if you add GPL Version 2 code and therefore, elected the GPL
038:         * Version 2 license, then the option applies only if the new code is
039:         * made subject to such option by the copyright holder.
040:         */
041:        package com.sun.rave.web.ui.component;
042:
043:        import java.io.IOException;
044:        import javax.faces.component.UIComponent;
045:        import javax.faces.context.FacesContext;
046:        import javax.faces.el.MethodBinding;
047:        import javax.faces.el.ValueBinding;
048:
049:        /**
050:         * <p> Use the <code>ui:orderableList</code> tag to create a list with
051:         *     buttons that allow the items on the list to be reordered.</p> 
052:         * 
053:         *     <h3>HTML Elements and Layout</h3>
054:         * 
055:         * <p>The textField component renders an XHTML fragment consisting of a
056:         * <code>select</code>element representing a list, an <code>input
057:         * type="hidden"</code> element which represents the current order of the
058:         * list items, two or four <code>input type="submit"</code> elements for the
059:         * buttons, and a <code>label</code> element for the label. The buttons are
060:         * organized using a <code>table</code>, and the whole component is laid
061:         * out using <code>div</code>s.  </p>
062:         * 
063:         *     <h3>Configuring the <code>ui:orderableList</code> Tag</h3>
064:         * 
065:         * 
066:         *     <p>Use the <code>list</code> attribute to associate the component
067:         *     with a set of orderable items. The value of the list attribute
068:         *     must be a JavaServer Faces EL expression that evaluates to an
069:         *     array of Objects or to a <code>java.util.List</code>.</p>
070:         * 
071:         *     <p>To allow users to select more than one item to move at a time, 
072:         *     set <code>multiple</code> to true. To display buttons which moves
073:         *     the selected items to the top and bottom of the list, set 
074:         *     <code>moveTopBottom</code> to true.</code> 
075:         * 
076:         *     <p>To specify a label for the component, use the
077:         *     <code>label</code> attribute, or specify a label facet. To place
078:         *     the label above the component, set <code>labelOnTop</code> to
079:         *     true.</p> 
080:         * 
081:         *     <h3>Facets</h3>
082:         * 
083:         *     <ul>
084:         *     <li><code>label</code>: use this facet to specify a custom 
085:         *     component for the label.</li>
086:         *     <li><code>readOnly</code>: use this facet to specify a custom 
087:         *     component for displaying the value of this component when it is
088:         *     marked as readonly. The default is a
089:         *     <code>ui:staticText</code>. </li>
090:         *      <li><code>moveUpButton</code>: use this facet to specify a custom 
091:         *     component for the button that moves items up one step.</li>
092:         *      <li><code>moveDownButton</code>: use this facet to specify a custom 
093:         *     component for the button that moves items down one step.</li>
094:         *      <li><code>moveTopButton</code>: use this facet to specify a custom 
095:         *     component for the button that moves items to the top.</li>
096:         *      <li><code>moveBottomButton</code>: use this facet to specify a custom 
097:         *     component for the button that moves items to the bottom.</li>
098:         *     </ul>
099:         * 
100:         *     <h3>Client-side JavaScript functions</h3>
101:         * 
102:         * 
103:         *     <p>The functions below must be invoked on the JavaScript object
104:         *     that corresponds to the orderableList. The name of this object is
105:         *     <code>OrderableList_</code><em>id</em> where <em>id</em> is the
106:         *     DOM ID of the OrderableList component (the id of the outermost
107:         *     <code>div</code> with the colons replaced by underscores,
108:         *     e.g. <code>OrderableList_form_taskOrder</code>.</p> 
109:         *  </p>
110:         *     <table cellpadding="2" cellspacing="2" border="1" 
111:         *            style="text-align: left; width: 100%;">
112:         *     <tbody>
113:         *     <tr>
114:         *     <td style="vertical-align">
115:         *     <code><em>object</em>.updateValue()</code>
116:         *     </td>
117:         *     <td style="vertical-align: top">
118:         *     Use this method to update the hidden field which represents the
119:         *     component value in any JavaScript function that changes the order
120:         *     of the items on the list. 
121:         *     </td>
122:         *     </tr>
123:         *     <tr>
124:         *     <td style="vertical-align">
125:         *     <code><em>object</em>.moveUp()</code>
126:         *     </td>
127:         *     <td style="vertical-align: top">
128:         *     Moves the selected items up one step and updates the component
129:         *     value. 
130:         *     </td>
131:         *     </tr>
132:         *     <tr>
133:         *     <td style="vertical-align">
134:         *     <code><em>object</em>.moveDown()</code>
135:         *     </td>
136:         *     <td style="vertical-align: top">
137:         *     Moves the selected items down one step and updates the component
138:         *     value. 
139:         *     </td>
140:         *     </tr>
141:         *     <tr>
142:         *     <td style="vertical-align">
143:         *     <code><em>object</em>.moveTop()</code>
144:         *     </td>
145:         *     <td style="vertical-align: top">
146:         *     Moves the selected items to the top of the list and updates the
147:         *     component value. 
148:         *     </td>
149:         *     </tr>
150:         *     <tr>
151:         *     <td style="vertical-align">
152:         *     <code><em>object</em>.moveBottom()</code>
153:         *     </td>
154:         *     <td style="vertical-align: top">
155:         *     Moves the selected items to the bottom of the list and updates the
156:         *     component value. 
157:         *     </td>
158:         *     </tr>
159:         * 
160:         *     <tr>
161:         *     <td style="vertical-align">
162:         *     <code><em>object</em>.updateButtons()</code>
163:         *     </td>
164:         *     <td style="vertical-align: top">
165:         *     Use this method to update which buttons are selected in any
166:         *     JavaScript method that programmatically selects elements on the
167:         *     list. 
168:         *     </td>
169:         *     </tr>
170:         *   </tbody>
171:         * </table>
172:         * 
173:         *     <h3>Example</h3>
174:         * <h4>Example 1: OrderableList with Move to Top and Move to Bottom
175:         *     Buttons</h4> 
176:         * 
177:         * <p>This example uses a backing bean called
178:         *     <code>AutomatedTasks</code> with a property <code>taskList</code>
179:         *     which represents a list of tasks.  Users are allowed to 
180:         *     select more than one task to move. Buttons to move the items to
181:         *     the top and to the bottom are shown in addition to the default
182:         *     move up and move down buttons. </p> 
183:         * 
184:         * <pre>
185:         *     &lt;ui:orderableList id="taskOrder"
186:         *                       list="#{AutomatedTasks.taskList}"
187:         *                       label="Task execution order: "
188:         *                       multiple="true"
189:         *                       moveTopBottom="true"/&gt;
190:         * 
191:         * </pre>
192:         * 
193:         * <h4>Example 1: OrderableList with Move to Top and Move to Bottom
194:         *     Buttons</h4> 
195:         * 
196:         * <p>This example uses a backing bean called <code>Volunteers</code> and
197:         *     a property <code>rotationOrder</code> which is an ordered list of
198:         *     objects representing individual persons. A converter is used to
199:         *     derive a string representation of the person. Only the default 
200:         *     move up and move down buttons are shown. </p> 
201:         * 
202:         * <pre>
203:         *     &lt;ui:orderableList id="callUpOrder"
204:         *                       list="#{Volunteers.rotationOrder}"
205:         *                       label="Call Up Order:" &gt;
206:         *         &lt;f:converter converterId="org.example.Person"/&gt;
207:         *     &lt;ui:orderableList&gt;
208:         * </pre>
209:         * <p>Auto-generated component class.
210:         * Do <strong>NOT</strong> modify; all changes
211:         * <strong>will</strong> be lost!</p>
212:         */
213:
214:        public abstract class OrderableListBase extends
215:                javax.faces.component.UIInput {
216:
217:            /**
218:             * <p>Construct a new <code>OrderableListBase</code>.</p>
219:             */
220:            public OrderableListBase() {
221:                super ();
222:                setRendererType("com.sun.rave.web.ui.OrderableList");
223:            }
224:
225:            /**
226:             * <p>Return the identifier of the component family to which this
227:             * component belongs.  This identifier, in conjunction with the value
228:             * of the <code>rendererType</code> property, may be used to select
229:             * the appropriate {@link Renderer} for this component instance.</p>
230:             */
231:            public String getFamily() {
232:                return "com.sun.rave.web.ui.OrderableList";
233:            }
234:
235:            /**
236:             * <p>Return the <code>ValueBinding</code> stored for the
237:             * specified name (if any), respecting any property aliases.</p>
238:             *
239:             * @param name Name of value binding to retrieve
240:             */
241:            public ValueBinding getValueBinding(String name) {
242:                if (name.equals("list")) {
243:                    return super .getValueBinding("value");
244:                }
245:                return super .getValueBinding(name);
246:            }
247:
248:            /**
249:             * <p>Set the <code>ValueBinding</code> stored for the
250:             * specified name (if any), respecting any property
251:             * aliases.</p>
252:             *
253:             * @param name    Name of value binding to set
254:             * @param binding ValueBinding to set, or null to remove
255:             */
256:            public void setValueBinding(String name, ValueBinding binding) {
257:                if (name.equals("list")) {
258:                    super .setValueBinding("value", binding);
259:                    return;
260:                }
261:                super .setValueBinding(name, binding);
262:            }
263:
264:            // disabled
265:            private boolean disabled = false;
266:            private boolean disabled_set = false;
267:
268:            /**
269:             * <p>Flag indicating that activation of this component by the user is not currently permitted.</p>
270:             */
271:            public boolean isDisabled() {
272:                if (this .disabled_set) {
273:                    return this .disabled;
274:                }
275:                ValueBinding _vb = getValueBinding("disabled");
276:                if (_vb != null) {
277:                    Object _result = _vb.getValue(getFacesContext());
278:                    if (_result == null) {
279:                        return false;
280:                    } else {
281:                        return ((Boolean) _result).booleanValue();
282:                    }
283:                }
284:                return false;
285:            }
286:
287:            /**
288:             * <p>Flag indicating that activation of this component by the user is not currently permitted.</p>
289:             * @see #isDisabled()
290:             */
291:            public void setDisabled(boolean disabled) {
292:                this .disabled = disabled;
293:                this .disabled_set = true;
294:            }
295:
296:            // label
297:            private String label = null;
298:
299:            /**
300:             * <p>If set, a label is rendered adjacent to the component with the
301:             *         value of this attribute as the label text.</p>
302:             */
303:            public String getLabel() {
304:                if (this .label != null) {
305:                    return this .label;
306:                }
307:                ValueBinding _vb = getValueBinding("label");
308:                if (_vb != null) {
309:                    return (String) _vb.getValue(getFacesContext());
310:                }
311:                return null;
312:            }
313:
314:            /**
315:             * <p>If set, a label is rendered adjacent to the component with the
316:             *         value of this attribute as the label text.</p>
317:             * @see #getLabel()
318:             */
319:            public void setLabel(String label) {
320:                this .label = label;
321:            }
322:
323:            // labelLevel
324:            private int labelLevel = Integer.MIN_VALUE;
325:            private boolean labelLevel_set = false;
326:
327:            /**
328:             * <p>Sets the style level for the generated labels. Valid values
329:             * 	are 1 (largest), 2 and 3 (smallest). The default value is 2.</p>
330:             */
331:            public int getLabelLevel() {
332:                if (this .labelLevel_set) {
333:                    return this .labelLevel;
334:                }
335:                ValueBinding _vb = getValueBinding("labelLevel");
336:                if (_vb != null) {
337:                    Object _result = _vb.getValue(getFacesContext());
338:                    if (_result == null) {
339:                        return Integer.MIN_VALUE;
340:                    } else {
341:                        return ((Integer) _result).intValue();
342:                    }
343:                }
344:                return 2;
345:            }
346:
347:            /**
348:             * <p>Sets the style level for the generated labels. Valid values
349:             * 	are 1 (largest), 2 and 3 (smallest). The default value is 2.</p>
350:             * @see #getLabelLevel()
351:             */
352:            public void setLabelLevel(int labelLevel) {
353:                this .labelLevel = labelLevel;
354:                this .labelLevel_set = true;
355:            }
356:
357:            // labelOnTop
358:            private boolean labelOnTop = false;
359:            private boolean labelOnTop_set = false;
360:
361:            /**
362:             * <p>If this attribute is true, the label is rendered above the
363:             *       component. If it is false, the label is rendered next to the
364:             *       component. The default is false.</p>
365:             */
366:            public boolean isLabelOnTop() {
367:                if (this .labelOnTop_set) {
368:                    return this .labelOnTop;
369:                }
370:                ValueBinding _vb = getValueBinding("labelOnTop");
371:                if (_vb != null) {
372:                    Object _result = _vb.getValue(getFacesContext());
373:                    if (_result == null) {
374:                        return false;
375:                    } else {
376:                        return ((Boolean) _result).booleanValue();
377:                    }
378:                }
379:                return false;
380:            }
381:
382:            /**
383:             * <p>If this attribute is true, the label is rendered above the
384:             *       component. If it is false, the label is rendered next to the
385:             *       component. The default is false.</p>
386:             * @see #isLabelOnTop()
387:             */
388:            public void setLabelOnTop(boolean labelOnTop) {
389:                this .labelOnTop = labelOnTop;
390:                this .labelOnTop_set = true;
391:            }
392:
393:            // list
394:            /**
395:             * <p>
396:             *       The object that represents the list. It must be a JavaServer
397:             *       Faces EL expression that evaluates to an array of Objects or to
398:             *       a <code>java.util.List</code>.</p>
399:             */
400:            public Object getList() {
401:                return getValue();
402:            }
403:
404:            /**
405:             * <p>
406:             *       The object that represents the list. It must be a JavaServer
407:             *       Faces EL expression that evaluates to an array of Objects or to
408:             *       a <code>java.util.List</code>.</p>
409:             * @see #getList()
410:             */
411:            public void setList(Object list) {
412:                setValue(list);
413:            }
414:
415:            // moveTopBottom
416:            private boolean moveTopBottom = false;
417:            private boolean moveTopBottom_set = false;
418:
419:            /**
420:             * <p>If this attribute is true, the Move to Top and Move to Bottom
421:             *       buttons are shown. The default is false.</p>
422:             */
423:            public boolean isMoveTopBottom() {
424:                if (this .moveTopBottom_set) {
425:                    return this .moveTopBottom;
426:                }
427:                ValueBinding _vb = getValueBinding("moveTopBottom");
428:                if (_vb != null) {
429:                    Object _result = _vb.getValue(getFacesContext());
430:                    if (_result == null) {
431:                        return false;
432:                    } else {
433:                        return ((Boolean) _result).booleanValue();
434:                    }
435:                }
436:                return false;
437:            }
438:
439:            /**
440:             * <p>If this attribute is true, the Move to Top and Move to Bottom
441:             *       buttons are shown. The default is false.</p>
442:             * @see #isMoveTopBottom()
443:             */
444:            public void setMoveTopBottom(boolean moveTopBottom) {
445:                this .moveTopBottom = moveTopBottom;
446:                this .moveTopBottom_set = true;
447:            }
448:
449:            // multiple
450:            private boolean multiple = false;
451:            private boolean multiple_set = false;
452:
453:            /**
454:             * <p>Flag indicating that the application user may make select
455:             * 	more than one option from the listbox .</p>
456:             */
457:            public boolean isMultiple() {
458:                if (this .multiple_set) {
459:                    return this .multiple;
460:                }
461:                ValueBinding _vb = getValueBinding("multiple");
462:                if (_vb != null) {
463:                    Object _result = _vb.getValue(getFacesContext());
464:                    if (_result == null) {
465:                        return false;
466:                    } else {
467:                        return ((Boolean) _result).booleanValue();
468:                    }
469:                }
470:                return false;
471:            }
472:
473:            /**
474:             * <p>Flag indicating that the application user may make select
475:             * 	more than one option from the listbox .</p>
476:             * @see #isMultiple()
477:             */
478:            public void setMultiple(boolean multiple) {
479:                this .multiple = multiple;
480:                this .multiple_set = true;
481:            }
482:
483:            // readOnly
484:            private boolean readOnly = false;
485:            private boolean readOnly_set = false;
486:
487:            /**
488:             * <p>If this attribute is set to true, the value of the component is
489:             *       rendered as text, preceded by the label if one was defined.</p>
490:             */
491:            public boolean isReadOnly() {
492:                if (this .readOnly_set) {
493:                    return this .readOnly;
494:                }
495:                ValueBinding _vb = getValueBinding("readOnly");
496:                if (_vb != null) {
497:                    Object _result = _vb.getValue(getFacesContext());
498:                    if (_result == null) {
499:                        return false;
500:                    } else {
501:                        return ((Boolean) _result).booleanValue();
502:                    }
503:                }
504:                return false;
505:            }
506:
507:            /**
508:             * <p>If this attribute is set to true, the value of the component is
509:             *       rendered as text, preceded by the label if one was defined.</p>
510:             * @see #isReadOnly()
511:             */
512:            public void setReadOnly(boolean readOnly) {
513:                this .readOnly = readOnly;
514:                this .readOnly_set = true;
515:            }
516:
517:            // rows
518:            private int rows = Integer.MIN_VALUE;
519:            private boolean rows_set = false;
520:
521:            /**
522:             * <p>The number of items to display. The default value is 6.</p>
523:             */
524:            public int getRows() {
525:                if (this .rows_set) {
526:                    return this .rows;
527:                }
528:                ValueBinding _vb = getValueBinding("rows");
529:                if (_vb != null) {
530:                    Object _result = _vb.getValue(getFacesContext());
531:                    if (_result == null) {
532:                        return Integer.MIN_VALUE;
533:                    } else {
534:                        return ((Integer) _result).intValue();
535:                    }
536:                }
537:                return 12;
538:            }
539:
540:            /**
541:             * <p>The number of items to display. The default value is 6.</p>
542:             * @see #getRows()
543:             */
544:            public void setRows(int rows) {
545:                this .rows = rows;
546:                this .rows_set = true;
547:            }
548:
549:            // style
550:            private String style = null;
551:
552:            /**
553:             * <p>CSS style(s) to be applied when this component is rendered.</p>
554:             */
555:            public String getStyle() {
556:                if (this .style != null) {
557:                    return this .style;
558:                }
559:                ValueBinding _vb = getValueBinding("style");
560:                if (_vb != null) {
561:                    return (String) _vb.getValue(getFacesContext());
562:                }
563:                return null;
564:            }
565:
566:            /**
567:             * <p>CSS style(s) to be applied when this component is rendered.</p>
568:             * @see #getStyle()
569:             */
570:            public void setStyle(String style) {
571:                this .style = style;
572:            }
573:
574:            // styleClass
575:            private String styleClass = null;
576:
577:            /**
578:             * <p>CSS style class(es) to be applied when this component is rendered.</p>
579:             */
580:            public String getStyleClass() {
581:                if (this .styleClass != null) {
582:                    return this .styleClass;
583:                }
584:                ValueBinding _vb = getValueBinding("styleClass");
585:                if (_vb != null) {
586:                    return (String) _vb.getValue(getFacesContext());
587:                }
588:                return null;
589:            }
590:
591:            /**
592:             * <p>CSS style class(es) to be applied when this component is rendered.</p>
593:             * @see #getStyleClass()
594:             */
595:            public void setStyleClass(String styleClass) {
596:                this .styleClass = styleClass;
597:            }
598:
599:            // tabIndex
600:            private int tabIndex = Integer.MIN_VALUE;
601:            private boolean tabIndex_set = false;
602:
603:            /**
604:             * <p>Position of this element in the tabbing order for the current
605:             *       document. The tabbing order determines the sequence in which
606:             *       elements receive focus when the tab key is pressed. The tabIndex
607:             *       value must be an integer between 0 and 32767.</p>
608:             */
609:            public int getTabIndex() {
610:                if (this .tabIndex_set) {
611:                    return this .tabIndex;
612:                }
613:                ValueBinding _vb = getValueBinding("tabIndex");
614:                if (_vb != null) {
615:                    Object _result = _vb.getValue(getFacesContext());
616:                    if (_result == null) {
617:                        return Integer.MIN_VALUE;
618:                    } else {
619:                        return ((Integer) _result).intValue();
620:                    }
621:                }
622:                return Integer.MIN_VALUE;
623:            }
624:
625:            /**
626:             * <p>Position of this element in the tabbing order for the current
627:             *       document. The tabbing order determines the sequence in which
628:             *       elements receive focus when the tab key is pressed. The tabIndex
629:             *       value must be an integer between 0 and 32767.</p>
630:             * @see #getTabIndex()
631:             */
632:            public void setTabIndex(int tabIndex) {
633:                this .tabIndex = tabIndex;
634:                this .tabIndex_set = true;
635:            }
636:
637:            // toolTip
638:            private String toolTip = null;
639:
640:            /**
641:             * <p>Display the text as a tooltip for this component</p>
642:             */
643:            public String getToolTip() {
644:                if (this .toolTip != null) {
645:                    return this .toolTip;
646:                }
647:                ValueBinding _vb = getValueBinding("toolTip");
648:                if (_vb != null) {
649:                    return (String) _vb.getValue(getFacesContext());
650:                }
651:                return null;
652:            }
653:
654:            /**
655:             * <p>Display the text as a tooltip for this component</p>
656:             * @see #getToolTip()
657:             */
658:            public void setToolTip(String toolTip) {
659:                this .toolTip = toolTip;
660:            }
661:
662:            // visible
663:            private boolean visible = false;
664:            private boolean visible_set = false;
665:
666:            /**
667:             * <p>Use the visible attribute to indicate whether the component should be
668:             *     viewable by the user in the rendered HTML page. If set to false, the
669:             *     HTML code for the component is present in the page, but the component
670:             *     is hidden with style attributes. By default, visible is set to true, so
671:             *     HTML for the component HTML is included and visible to the user. If the
672:             *     component is not visible, it can still be processed on subsequent form
673:             *     submissions because the HTML is present.</p>
674:             */
675:            public boolean isVisible() {
676:                if (this .visible_set) {
677:                    return this .visible;
678:                }
679:                ValueBinding _vb = getValueBinding("visible");
680:                if (_vb != null) {
681:                    Object _result = _vb.getValue(getFacesContext());
682:                    if (_result == null) {
683:                        return false;
684:                    } else {
685:                        return ((Boolean) _result).booleanValue();
686:                    }
687:                }
688:                return true;
689:            }
690:
691:            /**
692:             * <p>Use the visible attribute to indicate whether the component should be
693:             *     viewable by the user in the rendered HTML page. If set to false, the
694:             *     HTML code for the component is present in the page, but the component
695:             *     is hidden with style attributes. By default, visible is set to true, so
696:             *     HTML for the component HTML is included and visible to the user. If the
697:             *     component is not visible, it can still be processed on subsequent form
698:             *     submissions because the HTML is present.</p>
699:             * @see #isVisible()
700:             */
701:            public void setVisible(boolean visible) {
702:                this .visible = visible;
703:                this .visible_set = true;
704:            }
705:
706:            /**
707:             * <p>Restore the state of this component.</p>
708:             */
709:            public void restoreState(FacesContext _context, Object _state) {
710:                Object _values[] = (Object[]) _state;
711:                super .restoreState(_context, _values[0]);
712:                this .disabled = ((Boolean) _values[1]).booleanValue();
713:                this .disabled_set = ((Boolean) _values[2]).booleanValue();
714:                this .label = (String) _values[3];
715:                this .labelLevel = ((Integer) _values[4]).intValue();
716:                this .labelLevel_set = ((Boolean) _values[5]).booleanValue();
717:                this .labelOnTop = ((Boolean) _values[6]).booleanValue();
718:                this .labelOnTop_set = ((Boolean) _values[7]).booleanValue();
719:                this .moveTopBottom = ((Boolean) _values[8]).booleanValue();
720:                this .moveTopBottom_set = ((Boolean) _values[9]).booleanValue();
721:                this .multiple = ((Boolean) _values[10]).booleanValue();
722:                this .multiple_set = ((Boolean) _values[11]).booleanValue();
723:                this .readOnly = ((Boolean) _values[12]).booleanValue();
724:                this .readOnly_set = ((Boolean) _values[13]).booleanValue();
725:                this .rows = ((Integer) _values[14]).intValue();
726:                this .rows_set = ((Boolean) _values[15]).booleanValue();
727:                this .style = (String) _values[16];
728:                this .styleClass = (String) _values[17];
729:                this .tabIndex = ((Integer) _values[18]).intValue();
730:                this .tabIndex_set = ((Boolean) _values[19]).booleanValue();
731:                this .toolTip = (String) _values[20];
732:                this .visible = ((Boolean) _values[21]).booleanValue();
733:                this .visible_set = ((Boolean) _values[22]).booleanValue();
734:            }
735:
736:            /**
737:             * <p>Save the state of this component.</p>
738:             */
739:            public Object saveState(FacesContext _context) {
740:                Object _values[] = new Object[23];
741:                _values[0] = super .saveState(_context);
742:                _values[1] = this .disabled ? Boolean.TRUE : Boolean.FALSE;
743:                _values[2] = this .disabled_set ? Boolean.TRUE : Boolean.FALSE;
744:                _values[3] = this .label;
745:                _values[4] = new Integer(this .labelLevel);
746:                _values[5] = this .labelLevel_set ? Boolean.TRUE : Boolean.FALSE;
747:                _values[6] = this .labelOnTop ? Boolean.TRUE : Boolean.FALSE;
748:                _values[7] = this .labelOnTop_set ? Boolean.TRUE : Boolean.FALSE;
749:                _values[8] = this .moveTopBottom ? Boolean.TRUE : Boolean.FALSE;
750:                _values[9] = this .moveTopBottom_set ? Boolean.TRUE
751:                        : Boolean.FALSE;
752:                _values[10] = this .multiple ? Boolean.TRUE : Boolean.FALSE;
753:                _values[11] = this .multiple_set ? Boolean.TRUE : Boolean.FALSE;
754:                _values[12] = this .readOnly ? Boolean.TRUE : Boolean.FALSE;
755:                _values[13] = this .readOnly_set ? Boolean.TRUE : Boolean.FALSE;
756:                _values[14] = new Integer(this .rows);
757:                _values[15] = this .rows_set ? Boolean.TRUE : Boolean.FALSE;
758:                _values[16] = this .style;
759:                _values[17] = this .styleClass;
760:                _values[18] = new Integer(this .tabIndex);
761:                _values[19] = this .tabIndex_set ? Boolean.TRUE : Boolean.FALSE;
762:                _values[20] = this .toolTip;
763:                _values[21] = this .visible ? Boolean.TRUE : Boolean.FALSE;
764:                _values[22] = this.visible_set ? Boolean.TRUE : Boolean.FALSE;
765:                return _values;
766:            }
767:
768:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.