Source Code Cross Referenced for HtmlInputSecret.java in  » EJB-Server-resin-3.1.5 » jsf » javax » faces » component » html » 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 » EJB Server resin 3.1.5 » jsf » javax.faces.component.html 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (c) 1998-2008 Caucho Technology -- all rights reserved
003:         *
004:         * This file is part of Resin(R) Open Source
005:         *
006:         * Each copy or derived work must preserve the copyright notice and this
007:         * notice unmodified.
008:         *
009:         * Resin Open Source is free software; you can redistribute it and/or modify
010:         * it under the terms of the GNU General Public License version 2
011:         * as published by the Free Software Foundation.
012:         *
013:         * Resin Open Source is distributed in the hope that it will be useful,
014:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
015:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
016:         * of NON-INFRINGEMENT.  See the GNU General Public License for more
017:         * details.
018:         *
019:         * You should have received a copy of the GNU General Public License
020:         * along with Resin Open Source; if not, write to the
021:         *
022:         *   Free Software Foundation, Inc.
023:         *   59 Temple Place, Suite 330
024:         *   Boston, MA 02111-1307  USA
025:         *
026:         * @author Scott Ferguson
027:         */
028:
029:        package javax.faces.component.html;
030:
031:        import java.util.*;
032:
033:        import javax.el.*;
034:
035:        import javax.faces.component.*;
036:        import javax.faces.context.*;
037:
038:        public class HtmlInputSecret extends UIInput {
039:            public static final String COMPONENT_TYPE = "javax.faces.HtmlInputSecret";
040:
041:            private static final HashMap<String, PropEnum> _propMap = new HashMap<String, PropEnum>();
042:
043:            private String _accesskey;
044:            private ValueExpression _accesskeyExpr;
045:
046:            private String _alt;
047:            private ValueExpression _altExpr;
048:
049:            private String _autocomplete;
050:            private ValueExpression _autocompleteExpr;
051:
052:            private String _dir;
053:            private ValueExpression _dirExpr;
054:
055:            private Boolean _disabled;
056:            private ValueExpression _disabledExpr;
057:
058:            private String _label;
059:            private ValueExpression _labelExpr;
060:
061:            private String _lang;
062:            private ValueExpression _langExpr;
063:
064:            private Integer _maxlength;
065:            private ValueExpression _maxlengthExpr;
066:
067:            private String _onblur;
068:            private ValueExpression _onblurExpr;
069:
070:            private String _onchange;
071:            private ValueExpression _onchangeExpr;
072:
073:            private String _onclick;
074:            private ValueExpression _onclickExpr;
075:
076:            private String _ondblclick;
077:            private ValueExpression _ondblclickExpr;
078:
079:            private String _onfocus;
080:            private ValueExpression _onfocusExpr;
081:
082:            private String _onkeydown;
083:            private ValueExpression _onkeydownExpr;
084:
085:            private String _onkeypress;
086:            private ValueExpression _onkeypressExpr;
087:
088:            private String _onkeyup;
089:            private ValueExpression _onkeyupExpr;
090:
091:            private String _onmousedown;
092:            private ValueExpression _onmousedownExpr;
093:
094:            private String _onmousemove;
095:            private ValueExpression _onmousemoveExpr;
096:
097:            private String _onmouseout;
098:            private ValueExpression _onmouseoutExpr;
099:
100:            private String _onmouseover;
101:            private ValueExpression _onmouseoverExpr;
102:
103:            private String _onmouseup;
104:            private ValueExpression _onmouseupExpr;
105:
106:            private String _onselect;
107:            private ValueExpression _onselectExpr;
108:
109:            private Boolean _readonly;
110:            private ValueExpression _readonlyExpr;
111:
112:            private Boolean _redisplay;
113:            private ValueExpression _redisplayExpr;
114:
115:            private Integer _size;
116:            private ValueExpression _sizeExpr;
117:
118:            private String _style;
119:            private ValueExpression _styleExpr;
120:
121:            private String _styleClass;
122:            private ValueExpression _styleClassExpr;
123:
124:            private String _tabindex;
125:            private ValueExpression _tabindexExpr;
126:
127:            private String _title;
128:            private ValueExpression _titleExpr;
129:
130:            public HtmlInputSecret() {
131:                setRendererType("javax.faces.Secret");
132:            }
133:
134:            //
135:            // properties
136:            //
137:
138:            public String getAccesskey() {
139:                if (_accesskey != null)
140:                    return _accesskey;
141:                else if (_accesskeyExpr != null)
142:                    return Util.evalString(_accesskeyExpr);
143:                else
144:                    return null;
145:            }
146:
147:            public void setAccesskey(String value) {
148:                _accesskey = value;
149:            }
150:
151:            public String getAlt() {
152:                if (_alt != null)
153:                    return _alt;
154:                else if (_altExpr != null)
155:                    return Util.evalString(_altExpr);
156:                else
157:                    return null;
158:            }
159:
160:            public void setAlt(String value) {
161:                _alt = value;
162:            }
163:
164:            public String getDir() {
165:                if (_dir != null)
166:                    return _dir;
167:                else if (_dirExpr != null)
168:                    return Util.evalString(_dirExpr);
169:                else
170:                    return null;
171:            }
172:
173:            public void setDir(String value) {
174:                _dir = value;
175:            }
176:
177:            public boolean isDisabled() {
178:                if (_disabled != null)
179:                    return _disabled;
180:                else if (_disabledExpr != null)
181:                    return Util.evalBoolean(_disabledExpr);
182:                else
183:                    return false;
184:            }
185:
186:            public void setDisabled(boolean value) {
187:                _disabled = value;
188:            }
189:
190:            public String getAutocomplete() {
191:                if (_autocomplete != null)
192:                    return _autocomplete;
193:                else if (_autocompleteExpr != null)
194:                    return Util.evalString(_autocompleteExpr);
195:                else
196:                    return null;
197:            }
198:
199:            public void setAutocomplete(String value) {
200:                _autocomplete = value;
201:            }
202:
203:            public String getLabel() {
204:                if (_label != null)
205:                    return _label;
206:                else if (_labelExpr != null)
207:                    return Util.evalString(_labelExpr);
208:                else
209:                    return null;
210:            }
211:
212:            public void setLabel(String value) {
213:                _label = value;
214:            }
215:
216:            public String getLang() {
217:                if (_lang != null)
218:                    return _lang;
219:                else if (_langExpr != null)
220:                    return Util.evalString(_langExpr);
221:                else
222:                    return null;
223:            }
224:
225:            public void setLang(String value) {
226:                _lang = value;
227:            }
228:
229:            public int getMaxlength() {
230:                if (_maxlength != null)
231:                    return _maxlength;
232:                else if (_maxlengthExpr != null)
233:                    return Util.evalInt(_maxlengthExpr);
234:                else
235:                    return Integer.MIN_VALUE;
236:            }
237:
238:            public void setMaxlength(int value) {
239:                _maxlength = value;
240:            }
241:
242:            public String getOnblur() {
243:                if (_onblur != null)
244:                    return _onblur;
245:                else if (_onblurExpr != null)
246:                    return Util.evalString(_onblurExpr);
247:                else
248:                    return null;
249:            }
250:
251:            public void setOnblur(String value) {
252:                _onblur = value;
253:            }
254:
255:            public String getOnchange() {
256:                if (_onchange != null)
257:                    return _onchange;
258:                else if (_onchangeExpr != null)
259:                    return Util.evalString(_onchangeExpr);
260:                else
261:                    return null;
262:            }
263:
264:            public void setOnchange(String value) {
265:                _onchange = value;
266:            }
267:
268:            public String getOnclick() {
269:                if (_onclick != null)
270:                    return _onclick;
271:                else if (_onclickExpr != null)
272:                    return Util.evalString(_onclickExpr);
273:                else
274:                    return null;
275:            }
276:
277:            public void setOnclick(String value) {
278:                _onclick = value;
279:            }
280:
281:            public String getOndblclick() {
282:                if (_ondblclick != null)
283:                    return _ondblclick;
284:                else if (_ondblclickExpr != null)
285:                    return Util.evalString(_ondblclickExpr);
286:                else
287:                    return null;
288:            }
289:
290:            public void setOndblclick(String value) {
291:                _ondblclick = value;
292:            }
293:
294:            public String getOnfocus() {
295:                if (_onfocus != null)
296:                    return _onfocus;
297:                else if (_onfocusExpr != null)
298:                    return Util.evalString(_onfocusExpr);
299:                else
300:                    return null;
301:            }
302:
303:            public void setOnfocus(String value) {
304:                _onfocus = value;
305:            }
306:
307:            public String getOnkeydown() {
308:                if (_onkeydown != null)
309:                    return _onkeydown;
310:                else if (_onkeydownExpr != null)
311:                    return Util.evalString(_onkeydownExpr);
312:                else
313:                    return null;
314:            }
315:
316:            public void setOnkeydown(String value) {
317:                _onkeydown = value;
318:            }
319:
320:            public String getOnkeypress() {
321:                if (_onkeypress != null)
322:                    return _onkeypress;
323:                else if (_onkeypressExpr != null)
324:                    return Util.evalString(_onkeypressExpr);
325:                else
326:                    return null;
327:            }
328:
329:            public void setOnkeypress(String value) {
330:                _onkeypress = value;
331:            }
332:
333:            public String getOnkeyup() {
334:                if (_onkeyup != null)
335:                    return _onkeyup;
336:                else if (_onkeyupExpr != null)
337:                    return Util.evalString(_onkeyupExpr);
338:                else
339:                    return null;
340:            }
341:
342:            public void setOnkeyup(String value) {
343:                _onkeyup = value;
344:            }
345:
346:            public String getOnmousedown() {
347:                if (_onmousedown != null)
348:                    return _onmousedown;
349:                else if (_onmousedownExpr != null)
350:                    return Util.evalString(_onmousedownExpr);
351:                else
352:                    return null;
353:            }
354:
355:            public void setOnmousedown(String value) {
356:                _onmousedown = value;
357:            }
358:
359:            public String getOnmousemove() {
360:                if (_onmousemove != null)
361:                    return _onmousemove;
362:                else if (_onmousemoveExpr != null)
363:                    return Util.evalString(_onmousemoveExpr);
364:                else
365:                    return null;
366:            }
367:
368:            public void setOnmousemove(String value) {
369:                _onmousemove = value;
370:            }
371:
372:            public String getOnmouseout() {
373:                if (_onmouseout != null)
374:                    return _onmouseout;
375:                else if (_onmouseoutExpr != null)
376:                    return Util.evalString(_onmouseoutExpr);
377:                else
378:                    return null;
379:            }
380:
381:            public void setOnmouseout(String value) {
382:                _onmouseout = value;
383:            }
384:
385:            public String getOnmouseover() {
386:                if (_onmouseover != null)
387:                    return _onmouseover;
388:                else if (_onmouseoverExpr != null)
389:                    return Util.evalString(_onmouseoverExpr);
390:                else
391:                    return null;
392:            }
393:
394:            public void setOnmouseover(String value) {
395:                _onmouseover = value;
396:            }
397:
398:            public String getOnmouseup() {
399:                if (_onmouseup != null)
400:                    return _onmouseup;
401:                else if (_onmouseupExpr != null)
402:                    return Util.evalString(_onmouseupExpr);
403:                else
404:                    return null;
405:            }
406:
407:            public void setOnmouseup(String value) {
408:                _onmouseup = value;
409:            }
410:
411:            public String getOnselect() {
412:                if (_onselect != null)
413:                    return _onselect;
414:                else if (_onselectExpr != null)
415:                    return Util.evalString(_onselectExpr);
416:                else
417:                    return null;
418:            }
419:
420:            public void setOnselect(String value) {
421:                _onselect = value;
422:            }
423:
424:            public boolean isReadonly() {
425:                if (_readonly != null)
426:                    return _readonly;
427:                else if (_readonlyExpr != null)
428:                    return Util.evalBoolean(_readonlyExpr);
429:                else
430:                    return false;
431:            }
432:
433:            public void setReadonly(boolean value) {
434:                _readonly = value;
435:            }
436:
437:            public boolean isRedisplay() {
438:                if (_redisplay != null)
439:                    return _redisplay;
440:                else if (_redisplayExpr != null)
441:                    return Util.evalBoolean(_redisplayExpr);
442:                else
443:                    return false;
444:            }
445:
446:            public void setRedisplay(boolean value) {
447:                _redisplay = value;
448:            }
449:
450:            public int getSize() {
451:                if (_size != null)
452:                    return _size;
453:                else if (_sizeExpr != null)
454:                    return Util.evalInt(_sizeExpr);
455:                else
456:                    return Integer.MIN_VALUE;
457:            }
458:
459:            public void setSize(int value) {
460:                _size = value;
461:            }
462:
463:            public String getStyle() {
464:                if (_style != null)
465:                    return _style;
466:                else if (_styleExpr != null)
467:                    return Util.evalString(_styleExpr);
468:                else
469:                    return null;
470:            }
471:
472:            public void setStyle(String value) {
473:                _style = value;
474:            }
475:
476:            public String getStyleClass() {
477:                if (_styleClass != null)
478:                    return _styleClass;
479:                else if (_styleClassExpr != null)
480:                    return Util.evalString(_styleClassExpr);
481:                else
482:                    return null;
483:            }
484:
485:            public void setStyleClass(String value) {
486:                _styleClass = value;
487:            }
488:
489:            public String getTabindex() {
490:                if (_tabindex != null)
491:                    return _tabindex;
492:                else if (_tabindexExpr != null)
493:                    return Util.evalString(_tabindexExpr);
494:                else
495:                    return null;
496:            }
497:
498:            public void setTabindex(String value) {
499:                _tabindex = value;
500:            }
501:
502:            public String getTitle() {
503:                if (_title != null)
504:                    return _title;
505:                else if (_titleExpr != null)
506:                    return Util.evalString(_titleExpr);
507:                else
508:                    return null;
509:            }
510:
511:            public void setTitle(String value) {
512:                _title = value;
513:            }
514:
515:            //
516:            // value expression override
517:            //
518:
519:            /**
520:             * Returns the value expression with the given name.
521:             */
522:            @Override
523:            public ValueExpression getValueExpression(String name) {
524:                PropEnum prop = _propMap.get(name);
525:
526:                if (prop != null) {
527:                    switch (prop) {
528:                    case ACCESSKEY:
529:                        return _accesskeyExpr;
530:                    case ALT:
531:                        return _altExpr;
532:                    case AUTOCOMPLETE:
533:                        return _autocompleteExpr;
534:                    case DIR:
535:                        return _dirExpr;
536:                    case DISABLED:
537:                        return _disabledExpr;
538:                    case LABEL:
539:                        return _labelExpr;
540:                    case LANG:
541:                        return _langExpr;
542:                    case MAXLENGTH:
543:                        return _maxlengthExpr;
544:                    case ONBLUR:
545:                        return _onblurExpr;
546:                    case ONCHANGE:
547:                        return _onchangeExpr;
548:                    case ONCLICK:
549:                        return _onclickExpr;
550:                    case ONDBLCLICK:
551:                        return _ondblclickExpr;
552:                    case ONFOCUS:
553:                        return _onfocusExpr;
554:                    case ONKEYDOWN:
555:                        return _onkeydownExpr;
556:                    case ONKEYPRESS:
557:                        return _onkeypressExpr;
558:                    case ONKEYUP:
559:                        return _onkeyupExpr;
560:                    case ONMOUSEDOWN:
561:                        return _onmousedownExpr;
562:                    case ONMOUSEMOVE:
563:                        return _onmousemoveExpr;
564:                    case ONMOUSEOUT:
565:                        return _onmouseoutExpr;
566:                    case ONMOUSEOVER:
567:                        return _onmouseoverExpr;
568:                    case ONMOUSEUP:
569:                        return _onmouseupExpr;
570:                    case ONSELECT:
571:                        return _onselectExpr;
572:                    case READONLY:
573:                        return _readonlyExpr;
574:                    case REDISPLAY:
575:                        return _redisplayExpr;
576:                    case SIZE:
577:                        return _sizeExpr;
578:                    case STYLE:
579:                        return _styleExpr;
580:                    case STYLE_CLASS:
581:                        return _styleClassExpr;
582:                    case TABINDEX:
583:                        return _tabindexExpr;
584:                    case TITLE:
585:                        return _titleExpr;
586:                    }
587:                }
588:
589:                return super .getValueExpression(name);
590:            }
591:
592:            /**
593:             * Sets the value expression with the given name.
594:             */
595:            @Override
596:            public void setValueExpression(String name, ValueExpression expr) {
597:                PropEnum prop = _propMap.get(name);
598:
599:                if (prop != null) {
600:                    switch (prop) {
601:                    case ACCESSKEY:
602:                        if (expr != null && expr.isLiteralText()) {
603:                            _accesskey = Util.evalString(expr);
604:                            return;
605:                        } else
606:                            _accesskeyExpr = expr;
607:                        break;
608:
609:                    case ALT:
610:                        if (expr != null && expr.isLiteralText()) {
611:                            _alt = Util.evalString(expr);
612:                            return;
613:                        } else
614:                            _altExpr = expr;
615:                        break;
616:
617:                    case AUTOCOMPLETE:
618:                        if (expr != null && expr.isLiteralText()) {
619:                            _autocomplete = Util.evalString(expr);
620:                            return;
621:                        } else
622:                            _autocompleteExpr = expr;
623:                        break;
624:
625:                    case DIR:
626:                        if (expr != null && expr.isLiteralText()) {
627:                            _dir = Util.evalString(expr);
628:                            return;
629:                        } else
630:                            _dirExpr = expr;
631:                        break;
632:
633:                    case DISABLED:
634:                        if (expr != null && expr.isLiteralText()) {
635:                            _disabled = Util.evalBoolean(expr);
636:                            return;
637:                        } else
638:                            _disabledExpr = expr;
639:                        break;
640:
641:                    case LABEL:
642:                        if (expr != null && expr.isLiteralText()) {
643:                            _label = Util.evalString(expr);
644:                            return;
645:                        } else
646:                            _labelExpr = expr;
647:                        break;
648:
649:                    case LANG:
650:                        if (expr != null && expr.isLiteralText()) {
651:                            _lang = Util.evalString(expr);
652:                            return;
653:                        } else
654:                            _langExpr = expr;
655:                        break;
656:
657:                    case MAXLENGTH:
658:                        if (expr != null && expr.isLiteralText()) {
659:                            _maxlength = Util.evalInt(expr);
660:                            return;
661:                        } else
662:                            _maxlengthExpr = expr;
663:                        break;
664:
665:                    case ONBLUR:
666:                        if (expr != null && expr.isLiteralText()) {
667:                            _onblur = Util.evalString(expr);
668:                            return;
669:                        } else
670:                            _onblurExpr = expr;
671:                        break;
672:
673:                    case ONCHANGE:
674:                        if (expr != null && expr.isLiteralText()) {
675:                            _onchange = Util.evalString(expr);
676:                            return;
677:                        } else
678:                            _onchangeExpr = expr;
679:                        break;
680:
681:                    case ONCLICK:
682:                        if (expr != null && expr.isLiteralText()) {
683:                            _onclick = Util.evalString(expr);
684:                            return;
685:                        } else
686:                            _onclickExpr = expr;
687:                        break;
688:
689:                    case ONDBLCLICK:
690:                        if (expr != null && expr.isLiteralText()) {
691:                            _ondblclick = Util.evalString(expr);
692:                            return;
693:                        } else
694:                            _ondblclickExpr = expr;
695:                        break;
696:
697:                    case ONFOCUS:
698:                        if (expr != null && expr.isLiteralText()) {
699:                            _onfocus = Util.evalString(expr);
700:                            return;
701:                        } else
702:                            _onfocusExpr = expr;
703:                        break;
704:
705:                    case ONKEYDOWN:
706:                        if (expr != null && expr.isLiteralText()) {
707:                            _onkeydown = Util.evalString(expr);
708:                            return;
709:                        } else
710:                            _onkeydownExpr = expr;
711:                        break;
712:
713:                    case ONKEYPRESS:
714:                        if (expr != null && expr.isLiteralText()) {
715:                            _onkeypress = Util.evalString(expr);
716:                            return;
717:                        } else
718:                            _onkeypressExpr = expr;
719:                        break;
720:
721:                    case ONKEYUP:
722:                        if (expr != null && expr.isLiteralText()) {
723:                            _onkeyup = Util.evalString(expr);
724:                            return;
725:                        } else
726:                            _onkeyupExpr = expr;
727:                        break;
728:
729:                    case ONMOUSEDOWN:
730:                        if (expr != null && expr.isLiteralText()) {
731:                            _onmousedown = Util.evalString(expr);
732:                            return;
733:                        } else
734:                            _onmousedownExpr = expr;
735:                        break;
736:
737:                    case ONMOUSEMOVE:
738:                        if (expr != null && expr.isLiteralText()) {
739:                            _onmousemove = Util.evalString(expr);
740:                            return;
741:                        } else
742:                            _onmousemoveExpr = expr;
743:                        break;
744:
745:                    case ONMOUSEOUT:
746:                        if (expr != null && expr.isLiteralText()) {
747:                            _onmouseout = Util.evalString(expr);
748:                            return;
749:                        } else
750:                            _onmouseoutExpr = expr;
751:                        break;
752:
753:                    case ONMOUSEOVER:
754:                        if (expr != null && expr.isLiteralText()) {
755:                            _onmouseover = Util.evalString(expr);
756:                            return;
757:                        } else
758:                            _onmouseoverExpr = expr;
759:                        break;
760:
761:                    case ONMOUSEUP:
762:                        if (expr != null && expr.isLiteralText()) {
763:                            _onmouseup = Util.evalString(expr);
764:                            return;
765:                        } else
766:                            _onmouseupExpr = expr;
767:                        break;
768:
769:                    case ONSELECT:
770:                        if (expr != null && expr.isLiteralText()) {
771:                            _onselect = Util.evalString(expr);
772:                            return;
773:                        } else
774:                            _onselectExpr = expr;
775:                        break;
776:
777:                    case READONLY:
778:                        if (expr != null && expr.isLiteralText()) {
779:                            _readonly = Util.evalBoolean(expr);
780:                            return;
781:                        } else
782:                            _readonlyExpr = expr;
783:                        break;
784:
785:                    case REDISPLAY:
786:                        if (expr != null && expr.isLiteralText()) {
787:                            _redisplay = Util.evalBoolean(expr);
788:                            return;
789:                        } else
790:                            _redisplayExpr = expr;
791:                        break;
792:
793:                    case SIZE:
794:                        if (expr != null && expr.isLiteralText()) {
795:                            _size = Util.evalInt(expr);
796:                            return;
797:                        } else
798:                            _sizeExpr = expr;
799:                        break;
800:
801:                    case STYLE:
802:                        if (expr != null && expr.isLiteralText()) {
803:                            _style = Util.evalString(expr);
804:                            return;
805:                        } else
806:                            _styleExpr = expr;
807:                        break;
808:
809:                    case STYLE_CLASS:
810:                        if (expr != null && expr.isLiteralText()) {
811:                            _styleClass = Util.evalString(expr);
812:                            return;
813:                        } else
814:                            _styleClassExpr = expr;
815:                        break;
816:
817:                    case TABINDEX:
818:                        if (expr != null && expr.isLiteralText()) {
819:                            _tabindex = Util.evalString(expr);
820:                            return;
821:                        } else
822:                            _tabindexExpr = expr;
823:                        break;
824:
825:                    case TITLE:
826:                        if (expr != null && expr.isLiteralText()) {
827:                            _title = Util.evalString(expr);
828:                            return;
829:                        } else
830:                            _titleExpr = expr;
831:                        break;
832:                    }
833:                }
834:
835:                super .setValueExpression(name, expr);
836:            }
837:
838:            //
839:            // state
840:            //
841:
842:            public Object saveState(FacesContext context) {
843:                Object parent = super .saveState(context);
844:
845:                return new Object[] { parent,
846:
847:                _accesskey, _alt, _autocomplete, _dir, _disabled, _label,
848:                        _lang, _maxlength,
849:
850:                        _onblur, _onchange, _onclick, _ondblclick, _onfocus,
851:
852:                        _onkeydown, _onkeypress, _onkeyup,
853:
854:                        _onmousedown, _onmousemove, _onmouseout, _onmouseover,
855:                        _onmouseup,
856:
857:                        _onselect,
858:
859:                        _readonly, _redisplay, _size, _style, _styleClass,
860:                        _tabindex, _title, };
861:            }
862:
863:            public void restoreState(FacesContext context, Object value) {
864:                Object[] state = (Object[]) value;
865:
866:                int i = 0;
867:
868:                if (state != null)
869:                    super .restoreState(context, state[i++]);
870:
871:                _accesskey = (String) state[i++];
872:                _alt = (String) state[i++];
873:                _autocomplete = (String) state[i++];
874:                _dir = (String) state[i++];
875:                _disabled = (Boolean) state[i++];
876:                _label = (String) state[i++];
877:                _lang = (String) state[i++];
878:                _maxlength = (Integer) state[i++];
879:                _onblur = (String) state[i++];
880:                _onchange = (String) state[i++];
881:                _onclick = (String) state[i++];
882:                _ondblclick = (String) state[i++];
883:                _onfocus = (String) state[i++];
884:                _onkeydown = (String) state[i++];
885:                _onkeypress = (String) state[i++];
886:                _onkeyup = (String) state[i++];
887:                _onmousedown = (String) state[i++];
888:                _onmousemove = (String) state[i++];
889:                _onmouseout = (String) state[i++];
890:                _onmouseover = (String) state[i++];
891:                _onmouseup = (String) state[i++];
892:                _onselect = (String) state[i++];
893:                _readonly = (Boolean) state[i++];
894:                _redisplay = (Boolean) state[i++];
895:                _size = (Integer) state[i++];
896:                _style = (String) state[i++];
897:                _styleClass = (String) state[i++];
898:                _tabindex = (String) state[i++];
899:                _title = (String) state[i++];
900:            }
901:
902:            //
903:            // utility
904:            //
905:
906:            private enum PropEnum {
907:                ACCESSKEY, ALT, AUTOCOMPLETE, DIR, DISABLED, LABEL, LANG, MAXLENGTH, ONBLUR, ONCHANGE, ONCLICK, ONDBLCLICK, ONFOCUS, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONSELECT, READONLY, REDISPLAY, SIZE, STYLE, STYLE_CLASS, TABINDEX, TITLE,
908:            }
909:
910:            static {
911:                _propMap.put("accesskey", PropEnum.ACCESSKEY);
912:                _propMap.put("alt", PropEnum.ALT);
913:                _propMap.put("autocomplete", PropEnum.AUTOCOMPLETE);
914:                _propMap.put("dir", PropEnum.DIR);
915:                _propMap.put("disabled", PropEnum.DISABLED);
916:                _propMap.put("label", PropEnum.LABEL);
917:                _propMap.put("lang", PropEnum.LANG);
918:                _propMap.put("maxlength", PropEnum.MAXLENGTH);
919:                _propMap.put("onblur", PropEnum.ONBLUR);
920:                _propMap.put("onchange", PropEnum.ONCHANGE);
921:                _propMap.put("onclick", PropEnum.ONCLICK);
922:                _propMap.put("ondblclick", PropEnum.ONDBLCLICK);
923:                _propMap.put("onfocus", PropEnum.ONFOCUS);
924:                _propMap.put("onkeydown", PropEnum.ONKEYDOWN);
925:                _propMap.put("onkeypress", PropEnum.ONKEYPRESS);
926:                _propMap.put("onkeyup", PropEnum.ONKEYUP);
927:                _propMap.put("onmousedown", PropEnum.ONMOUSEDOWN);
928:                _propMap.put("onmousemove", PropEnum.ONMOUSEMOVE);
929:                _propMap.put("onmouseover", PropEnum.ONMOUSEOVER);
930:                _propMap.put("onmouseout", PropEnum.ONMOUSEOUT);
931:                _propMap.put("onmouseup", PropEnum.ONMOUSEUP);
932:                _propMap.put("onselect", PropEnum.ONSELECT);
933:                _propMap.put("readonly", PropEnum.READONLY);
934:                _propMap.put("redisplay", PropEnum.REDISPLAY);
935:                _propMap.put("size", PropEnum.SIZE);
936:                _propMap.put("style", PropEnum.STYLE);
937:                _propMap.put("styleClass", PropEnum.STYLE_CLASS);
938:                _propMap.put("tabindex", PropEnum.TABINDEX);
939:                _propMap.put("title", PropEnum.TITLE);
940:            }
941:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.