Source Code Cross Referenced for FieldBase.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:         * Represents an input field whose content will be included
051:         *       when the surrounding form is submitted.
052:         * <p>Auto-generated component class.
053:         * Do <strong>NOT</strong> modify; all changes
054:         * <strong>will</strong> be lost!</p>
055:         */
056:
057:        public abstract class FieldBase extends
058:                com.sun.rave.web.ui.component.HiddenField {
059:
060:            /**
061:             * <p>Construct a new <code>FieldBase</code>.</p>
062:             */
063:            public FieldBase() {
064:                super ();
065:                setRendererType("com.sun.rave.web.ui.Field");
066:            }
067:
068:            /**
069:             * <p>Return the identifier of the component family to which this
070:             * component belongs.  This identifier, in conjunction with the value
071:             * of the <code>rendererType</code> property, may be used to select
072:             * the appropriate {@link Renderer} for this component instance.</p>
073:             */
074:            public String getFamily() {
075:                return "com.sun.rave.web.ui.Field";
076:            }
077:
078:            /**
079:             * <p>Return the <code>ValueBinding</code> stored for the
080:             * specified name (if any), respecting any property aliases.</p>
081:             *
082:             * @param name Name of value binding to retrieve
083:             */
084:            public ValueBinding getValueBinding(String name) {
085:                if (name.equals("text")) {
086:                    return super .getValueBinding("value");
087:                }
088:                return super .getValueBinding(name);
089:            }
090:
091:            /**
092:             * <p>Set the <code>ValueBinding</code> stored for the
093:             * specified name (if any), respecting any property
094:             * aliases.</p>
095:             *
096:             * @param name    Name of value binding to set
097:             * @param binding ValueBinding to set, or null to remove
098:             */
099:            public void setValueBinding(String name, ValueBinding binding) {
100:                if (name.equals("text")) {
101:                    super .setValueBinding("value", binding);
102:                    return;
103:                }
104:                super .setValueBinding(name, binding);
105:            }
106:
107:            // columns
108:            private int columns = Integer.MIN_VALUE;
109:            private boolean columns_set = false;
110:
111:            /**
112:             * <p>Number of character columns used to render this field.</p>
113:             */
114:            public int getColumns() {
115:                if (this .columns_set) {
116:                    return this .columns;
117:                }
118:                ValueBinding _vb = getValueBinding("columns");
119:                if (_vb != null) {
120:                    Object _result = _vb.getValue(getFacesContext());
121:                    if (_result == null) {
122:                        return Integer.MIN_VALUE;
123:                    } else {
124:                        return ((Integer) _result).intValue();
125:                    }
126:                }
127:                return 20;
128:            }
129:
130:            /**
131:             * <p>Number of character columns used to render this field.</p>
132:             * @see #getColumns()
133:             */
134:            public void setColumns(int columns) {
135:                this .columns = columns;
136:                this .columns_set = true;
137:            }
138:
139:            // disabled
140:            private boolean disabled = false;
141:            private boolean disabled_set = false;
142:
143:            /**
144:             * <p>Flag indicating that the user is not permitted to activate this
145:             *         component, and that the component's value will not be submitted with the
146:             *         form.</p>
147:             */
148:            public boolean isDisabled() {
149:                if (this .disabled_set) {
150:                    return this .disabled;
151:                }
152:                ValueBinding _vb = getValueBinding("disabled");
153:                if (_vb != null) {
154:                    Object _result = _vb.getValue(getFacesContext());
155:                    if (_result == null) {
156:                        return false;
157:                    } else {
158:                        return ((Boolean) _result).booleanValue();
159:                    }
160:                }
161:                return false;
162:            }
163:
164:            /**
165:             * <p>Flag indicating that the user is not permitted to activate this
166:             *         component, and that the component's value will not be submitted with the
167:             *         form.</p>
168:             * @see #isDisabled()
169:             */
170:            public void setDisabled(boolean disabled) {
171:                this .disabled = disabled;
172:                this .disabled_set = true;
173:            }
174:
175:            // label
176:            private String label = null;
177:
178:            /**
179:             * <p>If set, a label is rendered adjacent to the component with the
180:             *         value of this attribute as the label text.</p>
181:             */
182:            public String getLabel() {
183:                if (this .label != null) {
184:                    return this .label;
185:                }
186:                ValueBinding _vb = getValueBinding("label");
187:                if (_vb != null) {
188:                    return (String) _vb.getValue(getFacesContext());
189:                }
190:                return null;
191:            }
192:
193:            /**
194:             * <p>If set, a label is rendered adjacent to the component with the
195:             *         value of this attribute as the label text.</p>
196:             * @see #getLabel()
197:             */
198:            public void setLabel(String label) {
199:                this .label = label;
200:            }
201:
202:            // labelLevel
203:            private int labelLevel = Integer.MIN_VALUE;
204:            private boolean labelLevel_set = false;
205:
206:            /**
207:             * <p>Sets the style level for the generated label, provided the
208:             *         label attribute has been set. Valid values are 1 (largest), 2 and
209:             *         3 (smallest). The default value is 2.</p>
210:             */
211:            public int getLabelLevel() {
212:                if (this .labelLevel_set) {
213:                    return this .labelLevel;
214:                }
215:                ValueBinding _vb = getValueBinding("labelLevel");
216:                if (_vb != null) {
217:                    Object _result = _vb.getValue(getFacesContext());
218:                    if (_result == null) {
219:                        return Integer.MIN_VALUE;
220:                    } else {
221:                        return ((Integer) _result).intValue();
222:                    }
223:                }
224:                return 2;
225:            }
226:
227:            /**
228:             * <p>Sets the style level for the generated label, provided the
229:             *         label attribute has been set. Valid values are 1 (largest), 2 and
230:             *         3 (smallest). The default value is 2.</p>
231:             * @see #getLabelLevel()
232:             */
233:            public void setLabelLevel(int labelLevel) {
234:                this .labelLevel = labelLevel;
235:                this .labelLevel_set = true;
236:            }
237:
238:            // maxLength
239:            private int maxLength = Integer.MIN_VALUE;
240:            private boolean maxLength_set = false;
241:
242:            /**
243:             * <p>The maximum number of characters that can be entered for this field.</p>
244:             */
245:            public int getMaxLength() {
246:                if (this .maxLength_set) {
247:                    return this .maxLength;
248:                }
249:                ValueBinding _vb = getValueBinding("maxLength");
250:                if (_vb != null) {
251:                    Object _result = _vb.getValue(getFacesContext());
252:                    if (_result == null) {
253:                        return Integer.MIN_VALUE;
254:                    } else {
255:                        return ((Integer) _result).intValue();
256:                    }
257:                }
258:                return Integer.MIN_VALUE;
259:            }
260:
261:            /**
262:             * <p>The maximum number of characters that can be entered for this field.</p>
263:             * @see #getMaxLength()
264:             */
265:            public void setMaxLength(int maxLength) {
266:                this .maxLength = maxLength;
267:                this .maxLength_set = true;
268:            }
269:
270:            // onBlur
271:            private String onBlur = null;
272:
273:            /**
274:             * <p>Scripting code executed when this element loses focus.</p>
275:             */
276:            public String getOnBlur() {
277:                if (this .onBlur != null) {
278:                    return this .onBlur;
279:                }
280:                ValueBinding _vb = getValueBinding("onBlur");
281:                if (_vb != null) {
282:                    return (String) _vb.getValue(getFacesContext());
283:                }
284:                return null;
285:            }
286:
287:            /**
288:             * <p>Scripting code executed when this element loses focus.</p>
289:             * @see #getOnBlur()
290:             */
291:            public void setOnBlur(String onBlur) {
292:                this .onBlur = onBlur;
293:            }
294:
295:            // onChange
296:            private String onChange = null;
297:
298:            /**
299:             * <p>Scripting code executed when the element
300:             *     value of this component is changed.</p>
301:             */
302:            public String getOnChange() {
303:                if (this .onChange != null) {
304:                    return this .onChange;
305:                }
306:                ValueBinding _vb = getValueBinding("onChange");
307:                if (_vb != null) {
308:                    return (String) _vb.getValue(getFacesContext());
309:                }
310:                return null;
311:            }
312:
313:            /**
314:             * <p>Scripting code executed when the element
315:             *     value of this component is changed.</p>
316:             * @see #getOnChange()
317:             */
318:            public void setOnChange(String onChange) {
319:                this .onChange = onChange;
320:            }
321:
322:            // onClick
323:            private String onClick = null;
324:
325:            /**
326:             * <p>Scripting code executed when a mouse click
327:             *     occurs over this component.</p>
328:             */
329:            public String getOnClick() {
330:                if (this .onClick != null) {
331:                    return this .onClick;
332:                }
333:                ValueBinding _vb = getValueBinding("onClick");
334:                if (_vb != null) {
335:                    return (String) _vb.getValue(getFacesContext());
336:                }
337:                return null;
338:            }
339:
340:            /**
341:             * <p>Scripting code executed when a mouse click
342:             *     occurs over this component.</p>
343:             * @see #getOnClick()
344:             */
345:            public void setOnClick(String onClick) {
346:                this .onClick = onClick;
347:            }
348:
349:            // onDblClick
350:            private String onDblClick = null;
351:
352:            /**
353:             * <p>Scripting code executed when a mouse double click
354:             *     occurs over this component.</p>
355:             */
356:            public String getOnDblClick() {
357:                if (this .onDblClick != null) {
358:                    return this .onDblClick;
359:                }
360:                ValueBinding _vb = getValueBinding("onDblClick");
361:                if (_vb != null) {
362:                    return (String) _vb.getValue(getFacesContext());
363:                }
364:                return null;
365:            }
366:
367:            /**
368:             * <p>Scripting code executed when a mouse double click
369:             *     occurs over this component.</p>
370:             * @see #getOnDblClick()
371:             */
372:            public void setOnDblClick(String onDblClick) {
373:                this .onDblClick = onDblClick;
374:            }
375:
376:            // onFocus
377:            private String onFocus = null;
378:
379:            /**
380:             * <p>Scripting code executed when this component  receives focus. An
381:             *     element receives focus when the user selects the element by pressing
382:             *     the tab key or clicking the mouse.</p>
383:             */
384:            public String getOnFocus() {
385:                if (this .onFocus != null) {
386:                    return this .onFocus;
387:                }
388:                ValueBinding _vb = getValueBinding("onFocus");
389:                if (_vb != null) {
390:                    return (String) _vb.getValue(getFacesContext());
391:                }
392:                return null;
393:            }
394:
395:            /**
396:             * <p>Scripting code executed when this component  receives focus. An
397:             *     element receives focus when the user selects the element by pressing
398:             *     the tab key or clicking the mouse.</p>
399:             * @see #getOnFocus()
400:             */
401:            public void setOnFocus(String onFocus) {
402:                this .onFocus = onFocus;
403:            }
404:
405:            // onKeyDown
406:            private String onKeyDown = null;
407:
408:            /**
409:             * <p>Scripting code executed when the user presses down on a key while the
410:             *     component has focus.</p>
411:             */
412:            public String getOnKeyDown() {
413:                if (this .onKeyDown != null) {
414:                    return this .onKeyDown;
415:                }
416:                ValueBinding _vb = getValueBinding("onKeyDown");
417:                if (_vb != null) {
418:                    return (String) _vb.getValue(getFacesContext());
419:                }
420:                return null;
421:            }
422:
423:            /**
424:             * <p>Scripting code executed when the user presses down on a key while the
425:             *     component has focus.</p>
426:             * @see #getOnKeyDown()
427:             */
428:            public void setOnKeyDown(String onKeyDown) {
429:                this .onKeyDown = onKeyDown;
430:            }
431:
432:            // onKeyPress
433:            private String onKeyPress = null;
434:
435:            /**
436:             * <p>Scripting code executed when the user presses and releases a key while
437:             *     the component has focus.</p>
438:             */
439:            public String getOnKeyPress() {
440:                if (this .onKeyPress != null) {
441:                    return this .onKeyPress;
442:                }
443:                ValueBinding _vb = getValueBinding("onKeyPress");
444:                if (_vb != null) {
445:                    return (String) _vb.getValue(getFacesContext());
446:                }
447:                return null;
448:            }
449:
450:            /**
451:             * <p>Scripting code executed when the user presses and releases a key while
452:             *     the component has focus.</p>
453:             * @see #getOnKeyPress()
454:             */
455:            public void setOnKeyPress(String onKeyPress) {
456:                this .onKeyPress = onKeyPress;
457:            }
458:
459:            // onKeyUp
460:            private String onKeyUp = null;
461:
462:            /**
463:             * <p>Scripting code executed when the user releases a key while the
464:             *     component has focus.</p>
465:             */
466:            public String getOnKeyUp() {
467:                if (this .onKeyUp != null) {
468:                    return this .onKeyUp;
469:                }
470:                ValueBinding _vb = getValueBinding("onKeyUp");
471:                if (_vb != null) {
472:                    return (String) _vb.getValue(getFacesContext());
473:                }
474:                return null;
475:            }
476:
477:            /**
478:             * <p>Scripting code executed when the user releases a key while the
479:             *     component has focus.</p>
480:             * @see #getOnKeyUp()
481:             */
482:            public void setOnKeyUp(String onKeyUp) {
483:                this .onKeyUp = onKeyUp;
484:            }
485:
486:            // onMouseDown
487:            private String onMouseDown = null;
488:
489:            /**
490:             * <p>Scripting code executed when the user presses a mouse button while the
491:             *     mouse pointer is on the component.</p>
492:             */
493:            public String getOnMouseDown() {
494:                if (this .onMouseDown != null) {
495:                    return this .onMouseDown;
496:                }
497:                ValueBinding _vb = getValueBinding("onMouseDown");
498:                if (_vb != null) {
499:                    return (String) _vb.getValue(getFacesContext());
500:                }
501:                return null;
502:            }
503:
504:            /**
505:             * <p>Scripting code executed when the user presses a mouse button while the
506:             *     mouse pointer is on the component.</p>
507:             * @see #getOnMouseDown()
508:             */
509:            public void setOnMouseDown(String onMouseDown) {
510:                this .onMouseDown = onMouseDown;
511:            }
512:
513:            // onMouseMove
514:            private String onMouseMove = null;
515:
516:            /**
517:             * <p>Scripting code executed when the user moves the mouse pointer while
518:             *     over the component.</p>
519:             */
520:            public String getOnMouseMove() {
521:                if (this .onMouseMove != null) {
522:                    return this .onMouseMove;
523:                }
524:                ValueBinding _vb = getValueBinding("onMouseMove");
525:                if (_vb != null) {
526:                    return (String) _vb.getValue(getFacesContext());
527:                }
528:                return null;
529:            }
530:
531:            /**
532:             * <p>Scripting code executed when the user moves the mouse pointer while
533:             *     over the component.</p>
534:             * @see #getOnMouseMove()
535:             */
536:            public void setOnMouseMove(String onMouseMove) {
537:                this .onMouseMove = onMouseMove;
538:            }
539:
540:            // onMouseOut
541:            private String onMouseOut = null;
542:
543:            /**
544:             * <p>Scripting code executed when a mouse out movement
545:             *     occurs over this component.</p>
546:             */
547:            public String getOnMouseOut() {
548:                if (this .onMouseOut != null) {
549:                    return this .onMouseOut;
550:                }
551:                ValueBinding _vb = getValueBinding("onMouseOut");
552:                if (_vb != null) {
553:                    return (String) _vb.getValue(getFacesContext());
554:                }
555:                return null;
556:            }
557:
558:            /**
559:             * <p>Scripting code executed when a mouse out movement
560:             *     occurs over this component.</p>
561:             * @see #getOnMouseOut()
562:             */
563:            public void setOnMouseOut(String onMouseOut) {
564:                this .onMouseOut = onMouseOut;
565:            }
566:
567:            // onMouseOver
568:            private String onMouseOver = null;
569:
570:            /**
571:             * <p>Scripting code executed when the user moves the  mouse pointer into
572:             *     the boundary of this component.</p>
573:             */
574:            public String getOnMouseOver() {
575:                if (this .onMouseOver != null) {
576:                    return this .onMouseOver;
577:                }
578:                ValueBinding _vb = getValueBinding("onMouseOver");
579:                if (_vb != null) {
580:                    return (String) _vb.getValue(getFacesContext());
581:                }
582:                return null;
583:            }
584:
585:            /**
586:             * <p>Scripting code executed when the user moves the  mouse pointer into
587:             *     the boundary of this component.</p>
588:             * @see #getOnMouseOver()
589:             */
590:            public void setOnMouseOver(String onMouseOver) {
591:                this .onMouseOver = onMouseOver;
592:            }
593:
594:            // onMouseUp
595:            private String onMouseUp = null;
596:
597:            /**
598:             * <p>Scripting code executed when the user releases a mouse button while
599:             *     the mouse pointer is on the component.</p>
600:             */
601:            public String getOnMouseUp() {
602:                if (this .onMouseUp != null) {
603:                    return this .onMouseUp;
604:                }
605:                ValueBinding _vb = getValueBinding("onMouseUp");
606:                if (_vb != null) {
607:                    return (String) _vb.getValue(getFacesContext());
608:                }
609:                return null;
610:            }
611:
612:            /**
613:             * <p>Scripting code executed when the user releases a mouse button while
614:             *     the mouse pointer is on the component.</p>
615:             * @see #getOnMouseUp()
616:             */
617:            public void setOnMouseUp(String onMouseUp) {
618:                this .onMouseUp = onMouseUp;
619:            }
620:
621:            // onSelect
622:            private String onSelect = null;
623:
624:            /**
625:             * <p>Scripting code executed when some text in this
626:             *     component value is selected.</p>
627:             */
628:            public String getOnSelect() {
629:                if (this .onSelect != null) {
630:                    return this .onSelect;
631:                }
632:                ValueBinding _vb = getValueBinding("onSelect");
633:                if (_vb != null) {
634:                    return (String) _vb.getValue(getFacesContext());
635:                }
636:                return null;
637:            }
638:
639:            /**
640:             * <p>Scripting code executed when some text in this
641:             *     component value is selected.</p>
642:             * @see #getOnSelect()
643:             */
644:            public void setOnSelect(String onSelect) {
645:                this .onSelect = onSelect;
646:            }
647:
648:            // readOnly
649:            private boolean readOnly = false;
650:            private boolean readOnly_set = false;
651:
652:            /**
653:             * <p>Flag indicating that modification of this component by the
654:             *         user is not currently permitted, but that it will be
655:             *         included when the form is submitted.</p>
656:             */
657:            public boolean isReadOnly() {
658:                if (this .readOnly_set) {
659:                    return this .readOnly;
660:                }
661:                ValueBinding _vb = getValueBinding("readOnly");
662:                if (_vb != null) {
663:                    Object _result = _vb.getValue(getFacesContext());
664:                    if (_result == null) {
665:                        return false;
666:                    } else {
667:                        return ((Boolean) _result).booleanValue();
668:                    }
669:                }
670:                return false;
671:            }
672:
673:            /**
674:             * <p>Flag indicating that modification of this component by the
675:             *         user is not currently permitted, but that it will be
676:             *         included when the form is submitted.</p>
677:             * @see #isReadOnly()
678:             */
679:            public void setReadOnly(boolean readOnly) {
680:                this .readOnly = readOnly;
681:                this .readOnly_set = true;
682:            }
683:
684:            // style
685:            private String style = null;
686:
687:            /**
688:             * <p>CSS style(s) to be applied when this component is rendered.</p>
689:             */
690:            public String getStyle() {
691:                if (this .style != null) {
692:                    return this .style;
693:                }
694:                ValueBinding _vb = getValueBinding("style");
695:                if (_vb != null) {
696:                    return (String) _vb.getValue(getFacesContext());
697:                }
698:                return null;
699:            }
700:
701:            /**
702:             * <p>CSS style(s) to be applied when this component is rendered.</p>
703:             * @see #getStyle()
704:             */
705:            public void setStyle(String style) {
706:                this .style = style;
707:            }
708:
709:            // styleClass
710:            private String styleClass = null;
711:
712:            /**
713:             * <p>CSS style class(es) to be applied when this component is rendered.</p>
714:             */
715:            public String getStyleClass() {
716:                if (this .styleClass != null) {
717:                    return this .styleClass;
718:                }
719:                ValueBinding _vb = getValueBinding("styleClass");
720:                if (_vb != null) {
721:                    return (String) _vb.getValue(getFacesContext());
722:                }
723:                return null;
724:            }
725:
726:            /**
727:             * <p>CSS style class(es) to be applied when this component is rendered.</p>
728:             * @see #getStyleClass()
729:             */
730:            public void setStyleClass(String styleClass) {
731:                this .styleClass = styleClass;
732:            }
733:
734:            // tabIndex
735:            private int tabIndex = Integer.MIN_VALUE;
736:            private boolean tabIndex_set = false;
737:
738:            /**
739:             * <p>The position of this component in the tabbing order sequence</p>
740:             */
741:            public int getTabIndex() {
742:                if (this .tabIndex_set) {
743:                    return this .tabIndex;
744:                }
745:                ValueBinding _vb = getValueBinding("tabIndex");
746:                if (_vb != null) {
747:                    Object _result = _vb.getValue(getFacesContext());
748:                    if (_result == null) {
749:                        return Integer.MIN_VALUE;
750:                    } else {
751:                        return ((Integer) _result).intValue();
752:                    }
753:                }
754:                return Integer.MIN_VALUE;
755:            }
756:
757:            /**
758:             * <p>The position of this component in the tabbing order sequence</p>
759:             * @see #getTabIndex()
760:             */
761:            public void setTabIndex(int tabIndex) {
762:                this .tabIndex = tabIndex;
763:                this .tabIndex_set = true;
764:            }
765:
766:            // text
767:            /**
768:             * <p>Literal value to be rendered in this input field.
769:             *         If this property is specified by a value binding
770:             *         expression, the corresponding value will be updated
771:             *         if validation succeeds.</p>
772:             */
773:            public Object getText() {
774:                return getValue();
775:            }
776:
777:            /**
778:             * <p>Literal value to be rendered in this input field.
779:             *         If this property is specified by a value binding
780:             *         expression, the corresponding value will be updated
781:             *         if validation succeeds.</p>
782:             * @see #getText()
783:             */
784:            public void setText(Object text) {
785:                setValue(text);
786:            }
787:
788:            // toolTip
789:            private String toolTip = null;
790:
791:            /**
792:             * <p>Display the text as a tooltip for this component</p>
793:             */
794:            public String getToolTip() {
795:                if (this .toolTip != null) {
796:                    return this .toolTip;
797:                }
798:                ValueBinding _vb = getValueBinding("toolTip");
799:                if (_vb != null) {
800:                    return (String) _vb.getValue(getFacesContext());
801:                }
802:                return null;
803:            }
804:
805:            /**
806:             * <p>Display the text as a tooltip for this component</p>
807:             * @see #getToolTip()
808:             */
809:            public void setToolTip(String toolTip) {
810:                this .toolTip = toolTip;
811:            }
812:
813:            // trim
814:            private boolean trim = false;
815:            private boolean trim_set = false;
816:
817:            /**
818:             * <p>Flag indicating that any leading and trailing blanks will be
819:             *         trimmed prior to conversion to the destination data type.
820:             *         Default value is true.</p>
821:             */
822:            public boolean isTrim() {
823:                if (this .trim_set) {
824:                    return this .trim;
825:                }
826:                ValueBinding _vb = getValueBinding("trim");
827:                if (_vb != null) {
828:                    Object _result = _vb.getValue(getFacesContext());
829:                    if (_result == null) {
830:                        return false;
831:                    } else {
832:                        return ((Boolean) _result).booleanValue();
833:                    }
834:                }
835:                return true;
836:            }
837:
838:            /**
839:             * <p>Flag indicating that any leading and trailing blanks will be
840:             *         trimmed prior to conversion to the destination data type.
841:             *         Default value is true.</p>
842:             * @see #isTrim()
843:             */
844:            public void setTrim(boolean trim) {
845:                this .trim = trim;
846:                this .trim_set = true;
847:            }
848:
849:            // visible
850:            private boolean visible = false;
851:            private boolean visible_set = false;
852:
853:            /**
854:             * <p>Use the visible attribute to indicate whether the component should be 
855:             *     viewable by the user in the rendered HTML page.</p>
856:             */
857:            public boolean isVisible() {
858:                if (this .visible_set) {
859:                    return this .visible;
860:                }
861:                ValueBinding _vb = getValueBinding("visible");
862:                if (_vb != null) {
863:                    Object _result = _vb.getValue(getFacesContext());
864:                    if (_result == null) {
865:                        return false;
866:                    } else {
867:                        return ((Boolean) _result).booleanValue();
868:                    }
869:                }
870:                return true;
871:            }
872:
873:            /**
874:             * <p>Use the visible attribute to indicate whether the component should be 
875:             *     viewable by the user in the rendered HTML page.</p>
876:             * @see #isVisible()
877:             */
878:            public void setVisible(boolean visible) {
879:                this .visible = visible;
880:                this .visible_set = true;
881:            }
882:
883:            /**
884:             * <p>Restore the state of this component.</p>
885:             */
886:            public void restoreState(FacesContext _context, Object _state) {
887:                Object _values[] = (Object[]) _state;
888:                super .restoreState(_context, _values[0]);
889:                this .columns = ((Integer) _values[1]).intValue();
890:                this .columns_set = ((Boolean) _values[2]).booleanValue();
891:                this .disabled = ((Boolean) _values[3]).booleanValue();
892:                this .disabled_set = ((Boolean) _values[4]).booleanValue();
893:                this .label = (String) _values[5];
894:                this .labelLevel = ((Integer) _values[6]).intValue();
895:                this .labelLevel_set = ((Boolean) _values[7]).booleanValue();
896:                this .maxLength = ((Integer) _values[8]).intValue();
897:                this .maxLength_set = ((Boolean) _values[9]).booleanValue();
898:                this .onBlur = (String) _values[10];
899:                this .onChange = (String) _values[11];
900:                this .onClick = (String) _values[12];
901:                this .onDblClick = (String) _values[13];
902:                this .onFocus = (String) _values[14];
903:                this .onKeyDown = (String) _values[15];
904:                this .onKeyPress = (String) _values[16];
905:                this .onKeyUp = (String) _values[17];
906:                this .onMouseDown = (String) _values[18];
907:                this .onMouseMove = (String) _values[19];
908:                this .onMouseOut = (String) _values[20];
909:                this .onMouseOver = (String) _values[21];
910:                this .onMouseUp = (String) _values[22];
911:                this .onSelect = (String) _values[23];
912:                this .readOnly = ((Boolean) _values[24]).booleanValue();
913:                this .readOnly_set = ((Boolean) _values[25]).booleanValue();
914:                this .style = (String) _values[26];
915:                this .styleClass = (String) _values[27];
916:                this .tabIndex = ((Integer) _values[28]).intValue();
917:                this .tabIndex_set = ((Boolean) _values[29]).booleanValue();
918:                this .toolTip = (String) _values[30];
919:                this .trim = ((Boolean) _values[31]).booleanValue();
920:                this .trim_set = ((Boolean) _values[32]).booleanValue();
921:                this .visible = ((Boolean) _values[33]).booleanValue();
922:                this .visible_set = ((Boolean) _values[34]).booleanValue();
923:            }
924:
925:            /**
926:             * <p>Save the state of this component.</p>
927:             */
928:            public Object saveState(FacesContext _context) {
929:                Object _values[] = new Object[35];
930:                _values[0] = super .saveState(_context);
931:                _values[1] = new Integer(this .columns);
932:                _values[2] = this .columns_set ? Boolean.TRUE : Boolean.FALSE;
933:                _values[3] = this .disabled ? Boolean.TRUE : Boolean.FALSE;
934:                _values[4] = this .disabled_set ? Boolean.TRUE : Boolean.FALSE;
935:                _values[5] = this .label;
936:                _values[6] = new Integer(this .labelLevel);
937:                _values[7] = this .labelLevel_set ? Boolean.TRUE : Boolean.FALSE;
938:                _values[8] = new Integer(this .maxLength);
939:                _values[9] = this .maxLength_set ? Boolean.TRUE : Boolean.FALSE;
940:                _values[10] = this .onBlur;
941:                _values[11] = this .onChange;
942:                _values[12] = this .onClick;
943:                _values[13] = this .onDblClick;
944:                _values[14] = this .onFocus;
945:                _values[15] = this .onKeyDown;
946:                _values[16] = this .onKeyPress;
947:                _values[17] = this .onKeyUp;
948:                _values[18] = this .onMouseDown;
949:                _values[19] = this .onMouseMove;
950:                _values[20] = this .onMouseOut;
951:                _values[21] = this .onMouseOver;
952:                _values[22] = this .onMouseUp;
953:                _values[23] = this .onSelect;
954:                _values[24] = this .readOnly ? Boolean.TRUE : Boolean.FALSE;
955:                _values[25] = this .readOnly_set ? Boolean.TRUE : Boolean.FALSE;
956:                _values[26] = this .style;
957:                _values[27] = this .styleClass;
958:                _values[28] = new Integer(this .tabIndex);
959:                _values[29] = this .tabIndex_set ? Boolean.TRUE : Boolean.FALSE;
960:                _values[30] = this .toolTip;
961:                _values[31] = this .trim ? Boolean.TRUE : Boolean.FALSE;
962:                _values[32] = this .trim_set ? Boolean.TRUE : Boolean.FALSE;
963:                _values[33] = this .visible ? Boolean.TRUE : Boolean.FALSE;
964:                _values[34] = this.visible_set ? Boolean.TRUE : Boolean.FALSE;
965:                return _values;
966:            }
967:
968:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.