Source Code Cross Referenced for FormBase.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:form</code> tag 
051:         * to create an HTML <code>&lt;form&gt;</code> element. The form can be submitted 
052:         * via a button or hyperlink control (in which case an <code>ActionEvent</code> 
053:         * will be generated on the server), or via client side scripting.</p> 
054:         * <p>The <code>virtualFormsConfig</code> attribute can be used to configure 
055:         * virtual forms. 
056:         *  A <i>virtual form</i> defines a group of input components 
057:         * (&quot;participants&quot;) and submission components (&quot;submitters&quot;) 
058:         * on a page, such that when the user interacts with one of the submitters, the participants 
059:         * are processed exclusively while the remaining inputs on the page are ignored.  
060:         *  An <i>input component</i> is any 
061:         *  component that implements <code>EditableValueHolder</code>. A 
062:         *  <i>submission component</i> 
063:         *  is any component that causes the web page to be submitted (such as a button, 
064:         *  hyperlink, or any input component that submits the page via the 
065:         *  <code>common_timeoutSubmitForm</code> scripting function). 
066:         * <i>Processing </i>an input means converting and validating it, firing 
067:         * any value change events associated with the input, and mapping the input onto 
068:         * its binding target (if the component is bound). Virtual forms provide an 
069:         * alternative to the <code>immediate</code> property. 
070:         * They are more powerful than <code>immediate</code> because they let you 
071:         * specify  multiple groups of inputs to be selectively processed (that is, you 
072:         * can specify  multiple virtual forms on a page). They are also easier to use 
073:         * than  <code>immediate</code> because they do not alter 
074:         * the JavaServer Faces lifecycle.</p>
075:         * <br> 
076:         * <h3>HTML Elements and Layout</h3> 
077:         * The rendered HTML page contains an 
078:         * HTML <code>&lt;form&gt;</code> tag and its associated 
079:         * attributes. The rendered 
080:         * form includes a hidden field for use in 
081:         * determining which form submitted the page.</p><br> 
082:         * <h3>Client Side Javascript Functions</h3> 
083:         * None. 
084:         * <br> 
085:         * <h3>Examples</h3> 
086:         * <h4>Example 1: Using a Form<br> 
087:         * </h4> 
088:         * <code>&lt;ui:page&gt;<br> 
089:         * &nbsp;&nbsp;&nbsp; &lt;ui:html&gt;<br> 
090:         * &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;ui:head id="head" 
091:         * title="Hyperlink Test Page" /&gt;<br>
092:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ui:body&gt;<br>
093:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
094:         * &lt;ui:form id="form1"&gt;<br>
095:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
096:         * &nbsp;&nbsp;&nbsp; &lt;ui:hyperlink&nbsp;
097:         * id="hyperlinkSubmitsPage"&nbsp; <br>
098:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
099:         * label="#{HyperlinkBean.label}" <br>
100:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
101:         * action="#{HyperlinkBean.determineWhatToDoFunction}" /&gt;<br>
102:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
103:         * &lt;/ui:form&gt;<br>
104:         * &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &lt;/ui:body&gt;<br>
105:         * &nbsp;&nbsp;&nbsp; &lt;/ui:html&gt;<br>
106:         * &lt;/ui:page&gt;</code><br>
107:         * <h4>Example 2: A Page with Three Virtual Forms<br>
108:         * </h4>
109:         * <code>&lt;ui:page&gt;<br>
110:         * &nbsp;&nbsp;&nbsp; &lt;ui:html&gt;<br>
111:         * &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;ui:head id="head" 
112:         * title="Shipping and Billing Information" /&gt;<br>
113:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ui:body&gt;<br>
114:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
115:         * &lt;ui:form id="form1" virtualFormsConfig="shipping | shippingAddressTextField 
116:         * | updateShippingButton , creditCard | creditCardDropDown | creditCardDropDown , 
117:         * billing | billingAddressTextfield creditCardDropDown | updateBillingButton"&gt; 
118:         * <br>
119:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
120:         * &nbsp;&nbsp;&nbsp; 
121:         * &lt;ui:label for="shippingAddressTextField" id="shippingAddressLabel" 
122:         * style="left: 48px; top: 48px; position: absolute" text="Shipping Address:"/&gt; 
123:         * <br>
124:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
125:         * &nbsp;&nbsp;&nbsp; 
126:         * &lt;ui:textField id="shippingAddressTextField" required="true" 
127:         * style="left: 48px; top: 72px; position: absolute"/&gt;
128:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
129:         * &nbsp;&nbsp;&nbsp; 
130:         * <br>
131:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
132:         * &nbsp;&nbsp;&nbsp; 
133:         * &lt;ui:button id="updateShippingButton" style="left: 48px; top: 120px; 
134:         * position: absolute" text="Update Shipping Address"/&gt;
135:         * <br>
136:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
137:         * &nbsp;&nbsp;&nbsp; 
138:         * &lt;ui:label id="creditCardLabel" for="creditCardDropDown" 
139:         * style="left: 48px; top: 192px; position: absolute" 
140:         * text="Credit Card to Use:"/&gt;
141:         * <br>
142:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
143:         * &nbsp;&nbsp;&nbsp; 
144:         * &lt;ui:dropDown id="creditCardDropDown" 
145:         * items="#{SessionBean1.creditCards}" style="left: 48px; top: 216px; 
146:         * position: absolute"/&gt;
147:         * <br>
148:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
149:         * &nbsp;&nbsp;&nbsp; 
150:         * &lt;ui:label id="billingAddressLabel" for="billingAddressTextfield" 
151:         * style="left: 48px; top: 264px; position: absolute" 
152:         * text="Credit Card Billing Address:"/&gt;
153:         * <br>
154:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
155:         * &nbsp;&nbsp;&nbsp; 
156:         * &lt;ui:textField id="billingAddressTextfield" required="true" 
157:         * style="left: 48px; top: 288px; position: absolute"/&gt;
158:         * <br>
159:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
160:         * &nbsp;&nbsp;&nbsp; 
161:         * &lt;ui:button id="updateBillingButton" style="left: 48px; top: 336px; 
162:         * position: absolute" text="Update Billing Address"/&gt;
163:         * <br>
164:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
165:         * &nbsp;&nbsp;&nbsp; 
166:         * &lt;ui:button id="updateAllButton" style="left: 48px; top: 432px; position: 
167:         * absolute" text="Update All Information"/&gt;
168:         * <br>
169:         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
170:         * &lt;/ui:form&gt;<br>
171:         * &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &lt;/ui:body&gt;<br>
172:         * &nbsp;&nbsp;&nbsp; &lt;/ui:html&gt;<br>
173:         * &lt;/ui:page&gt;</code><br>
174:         * <p>Auto-generated component class.
175:         * Do <strong>NOT</strong> modify; all changes
176:         * <strong>will</strong> be lost!</p>
177:         */
178:
179:        public abstract class FormBase extends javax.faces.component.UIForm {
180:
181:            /**
182:             * <p>Construct a new <code>FormBase</code>.</p>
183:             */
184:            public FormBase() {
185:                super ();
186:                setRendererType("com.sun.rave.web.ui.Form");
187:            }
188:
189:            /**
190:             * <p>Return the identifier of the component family to which this
191:             * component belongs.  This identifier, in conjunction with the value
192:             * of the <code>rendererType</code> property, may be used to select
193:             * the appropriate {@link Renderer} for this component instance.</p>
194:             */
195:            public String getFamily() {
196:                return "com.sun.rave.web.ui.Form";
197:            }
198:
199:            // autoComplete
200:            private boolean autoComplete = false;
201:            private boolean autoComplete_set = false;
202:
203:            /**
204:             * <p>Use this non-XHTML compliant boolean attribute to turn off autocompletion 
205:             *       feature of Internet Explorer and Firefox browsers. Set to "false" to
206:             *       turn off completion.  The default is "true".</p>
207:             */
208:            public boolean isAutoComplete() {
209:                if (this .autoComplete_set) {
210:                    return this .autoComplete;
211:                }
212:                ValueBinding _vb = getValueBinding("autoComplete");
213:                if (_vb != null) {
214:                    Object _result = _vb.getValue(getFacesContext());
215:                    if (_result == null) {
216:                        return false;
217:                    } else {
218:                        return ((Boolean) _result).booleanValue();
219:                    }
220:                }
221:                return true;
222:            }
223:
224:            /**
225:             * <p>Use this non-XHTML compliant boolean attribute to turn off autocompletion 
226:             *       feature of Internet Explorer and Firefox browsers. Set to "false" to
227:             *       turn off completion.  The default is "true".</p>
228:             * @see #isAutoComplete()
229:             */
230:            public void setAutoComplete(boolean autoComplete) {
231:                this .autoComplete = autoComplete;
232:                this .autoComplete_set = true;
233:            }
234:
235:            // enctype
236:            private String enctype = null;
237:
238:            /**
239:             * <p>Use this attribute to set the content-type of the HTTP request
240:             *       generated by this form. You do not normally need to set this
241:             *       attribute. Its default value is
242:             *       application/x-www-form-urlencoded. If there is an upload tag 
243:             *       inside the form, the upload tag will modify the form's enctype
244:             *       attribute to multipart/form-data.</p>
245:             */
246:            public String getEnctype() {
247:                if (this .enctype != null) {
248:                    return this .enctype;
249:                }
250:                ValueBinding _vb = getValueBinding("enctype");
251:                if (_vb != null) {
252:                    return (String) _vb.getValue(getFacesContext());
253:                }
254:                return "application/x-www-form-urlencoded";
255:            }
256:
257:            /**
258:             * <p>Use this attribute to set the content-type of the HTTP request
259:             *       generated by this form. You do not normally need to set this
260:             *       attribute. Its default value is
261:             *       application/x-www-form-urlencoded. If there is an upload tag 
262:             *       inside the form, the upload tag will modify the form's enctype
263:             *       attribute to multipart/form-data.</p>
264:             * @see #getEnctype()
265:             */
266:            public void setEnctype(String enctype) {
267:                this .enctype = enctype;
268:            }
269:
270:            // internalVirtualForms
271:            private com.sun.rave.web.ui.component.Form.VirtualFormDescriptor[] internalVirtualForms = null;
272:
273:            /**
274:             * <p>The virtual forms used "internally" by components (such as Table).
275:             *         Component authors can manipulate this set of virtual forms independent
276:             *         of the set exposed to developers. This set is only consulted after the
277:             *         set exposed to developers is consulted. A participating or submitting id
278:             *         can end in ":*" to indicate descendants. For example, table1:* can be
279:             *         used as a participating or submitting id to indicate all the descendants
280:             *         of table1.</p>
281:             */
282:            public com.sun.rave.web.ui.component.Form.VirtualFormDescriptor[] getInternalVirtualForms() {
283:                return this .internalVirtualForms;
284:            }
285:
286:            /**
287:             * <p>The virtual forms used "internally" by components (such as Table).
288:             *         Component authors can manipulate this set of virtual forms independent
289:             *         of the set exposed to developers. This set is only consulted after the
290:             *         set exposed to developers is consulted. A participating or submitting id
291:             *         can end in ":*" to indicate descendants. For example, table1:* can be
292:             *         used as a participating or submitting id to indicate all the descendants
293:             *         of table1.</p>
294:             * @see #getInternalVirtualForms()
295:             */
296:            public void setInternalVirtualForms(
297:                    com.sun.rave.web.ui.component.Form.VirtualFormDescriptor[] internalVirtualForms) {
298:                this .internalVirtualForms = internalVirtualForms;
299:            }
300:
301:            // onClick
302:            private String onClick = null;
303:
304:            /**
305:             * <p>Scripting code executed when a mouse click
306:             *     occurs over this component.</p>
307:             */
308:            public String getOnClick() {
309:                if (this .onClick != null) {
310:                    return this .onClick;
311:                }
312:                ValueBinding _vb = getValueBinding("onClick");
313:                if (_vb != null) {
314:                    return (String) _vb.getValue(getFacesContext());
315:                }
316:                return null;
317:            }
318:
319:            /**
320:             * <p>Scripting code executed when a mouse click
321:             *     occurs over this component.</p>
322:             * @see #getOnClick()
323:             */
324:            public void setOnClick(String onClick) {
325:                this .onClick = onClick;
326:            }
327:
328:            // onDblClick
329:            private String onDblClick = null;
330:
331:            /**
332:             * <p>Scripting code executed when a mouse double click
333:             *     occurs over this component.</p>
334:             */
335:            public String getOnDblClick() {
336:                if (this .onDblClick != null) {
337:                    return this .onDblClick;
338:                }
339:                ValueBinding _vb = getValueBinding("onDblClick");
340:                if (_vb != null) {
341:                    return (String) _vb.getValue(getFacesContext());
342:                }
343:                return null;
344:            }
345:
346:            /**
347:             * <p>Scripting code executed when a mouse double click
348:             *     occurs over this component.</p>
349:             * @see #getOnDblClick()
350:             */
351:            public void setOnDblClick(String onDblClick) {
352:                this .onDblClick = onDblClick;
353:            }
354:
355:            // onKeyDown
356:            private String onKeyDown = null;
357:
358:            /**
359:             * <p>Scripting code executed when the user presses down on a key while the
360:             *     component has focus.</p>
361:             */
362:            public String getOnKeyDown() {
363:                if (this .onKeyDown != null) {
364:                    return this .onKeyDown;
365:                }
366:                ValueBinding _vb = getValueBinding("onKeyDown");
367:                if (_vb != null) {
368:                    return (String) _vb.getValue(getFacesContext());
369:                }
370:                return null;
371:            }
372:
373:            /**
374:             * <p>Scripting code executed when the user presses down on a key while the
375:             *     component has focus.</p>
376:             * @see #getOnKeyDown()
377:             */
378:            public void setOnKeyDown(String onKeyDown) {
379:                this .onKeyDown = onKeyDown;
380:            }
381:
382:            // onKeyPress
383:            private String onKeyPress = null;
384:
385:            /**
386:             * <p>Scripting code executed when the user presses and releases a key while
387:             *     the component has focus.</p>
388:             */
389:            public String getOnKeyPress() {
390:                if (this .onKeyPress != null) {
391:                    return this .onKeyPress;
392:                }
393:                ValueBinding _vb = getValueBinding("onKeyPress");
394:                if (_vb != null) {
395:                    return (String) _vb.getValue(getFacesContext());
396:                }
397:                return null;
398:            }
399:
400:            /**
401:             * <p>Scripting code executed when the user presses and releases a key while
402:             *     the component has focus.</p>
403:             * @see #getOnKeyPress()
404:             */
405:            public void setOnKeyPress(String onKeyPress) {
406:                this .onKeyPress = onKeyPress;
407:            }
408:
409:            // onKeyUp
410:            private String onKeyUp = null;
411:
412:            /**
413:             * <p>Scripting code executed when the user releases a key while the
414:             *     component has focus.</p>
415:             */
416:            public String getOnKeyUp() {
417:                if (this .onKeyUp != null) {
418:                    return this .onKeyUp;
419:                }
420:                ValueBinding _vb = getValueBinding("onKeyUp");
421:                if (_vb != null) {
422:                    return (String) _vb.getValue(getFacesContext());
423:                }
424:                return null;
425:            }
426:
427:            /**
428:             * <p>Scripting code executed when the user releases a key while the
429:             *     component has focus.</p>
430:             * @see #getOnKeyUp()
431:             */
432:            public void setOnKeyUp(String onKeyUp) {
433:                this .onKeyUp = onKeyUp;
434:            }
435:
436:            // onMouseDown
437:            private String onMouseDown = null;
438:
439:            /**
440:             * <p>Scripting code executed when the user presses a mouse button while the
441:             *     mouse pointer is on the component.</p>
442:             */
443:            public String getOnMouseDown() {
444:                if (this .onMouseDown != null) {
445:                    return this .onMouseDown;
446:                }
447:                ValueBinding _vb = getValueBinding("onMouseDown");
448:                if (_vb != null) {
449:                    return (String) _vb.getValue(getFacesContext());
450:                }
451:                return null;
452:            }
453:
454:            /**
455:             * <p>Scripting code executed when the user presses a mouse button while the
456:             *     mouse pointer is on the component.</p>
457:             * @see #getOnMouseDown()
458:             */
459:            public void setOnMouseDown(String onMouseDown) {
460:                this .onMouseDown = onMouseDown;
461:            }
462:
463:            // onMouseMove
464:            private String onMouseMove = null;
465:
466:            /**
467:             * <p>Scripting code executed when the user moves the mouse pointer while
468:             *     over the component.</p>
469:             */
470:            public String getOnMouseMove() {
471:                if (this .onMouseMove != null) {
472:                    return this .onMouseMove;
473:                }
474:                ValueBinding _vb = getValueBinding("onMouseMove");
475:                if (_vb != null) {
476:                    return (String) _vb.getValue(getFacesContext());
477:                }
478:                return null;
479:            }
480:
481:            /**
482:             * <p>Scripting code executed when the user moves the mouse pointer while
483:             *     over the component.</p>
484:             * @see #getOnMouseMove()
485:             */
486:            public void setOnMouseMove(String onMouseMove) {
487:                this .onMouseMove = onMouseMove;
488:            }
489:
490:            // onMouseOut
491:            private String onMouseOut = null;
492:
493:            /**
494:             * <p>Scripting code executed when a mouse out movement
495:             *     occurs over this component.</p>
496:             */
497:            public String getOnMouseOut() {
498:                if (this .onMouseOut != null) {
499:                    return this .onMouseOut;
500:                }
501:                ValueBinding _vb = getValueBinding("onMouseOut");
502:                if (_vb != null) {
503:                    return (String) _vb.getValue(getFacesContext());
504:                }
505:                return null;
506:            }
507:
508:            /**
509:             * <p>Scripting code executed when a mouse out movement
510:             *     occurs over this component.</p>
511:             * @see #getOnMouseOut()
512:             */
513:            public void setOnMouseOut(String onMouseOut) {
514:                this .onMouseOut = onMouseOut;
515:            }
516:
517:            // onMouseOver
518:            private String onMouseOver = null;
519:
520:            /**
521:             * <p>Scripting code executed when the user moves the  mouse pointer into
522:             *     the boundary of this component.</p>
523:             */
524:            public String getOnMouseOver() {
525:                if (this .onMouseOver != null) {
526:                    return this .onMouseOver;
527:                }
528:                ValueBinding _vb = getValueBinding("onMouseOver");
529:                if (_vb != null) {
530:                    return (String) _vb.getValue(getFacesContext());
531:                }
532:                return null;
533:            }
534:
535:            /**
536:             * <p>Scripting code executed when the user moves the  mouse pointer into
537:             *     the boundary of this component.</p>
538:             * @see #getOnMouseOver()
539:             */
540:            public void setOnMouseOver(String onMouseOver) {
541:                this .onMouseOver = onMouseOver;
542:            }
543:
544:            // onMouseUp
545:            private String onMouseUp = null;
546:
547:            /**
548:             * <p>Scripting code executed when the user releases a mouse button while
549:             *     the mouse pointer is on the component.</p>
550:             */
551:            public String getOnMouseUp() {
552:                if (this .onMouseUp != null) {
553:                    return this .onMouseUp;
554:                }
555:                ValueBinding _vb = getValueBinding("onMouseUp");
556:                if (_vb != null) {
557:                    return (String) _vb.getValue(getFacesContext());
558:                }
559:                return null;
560:            }
561:
562:            /**
563:             * <p>Scripting code executed when the user releases a mouse button while
564:             *     the mouse pointer is on the component.</p>
565:             * @see #getOnMouseUp()
566:             */
567:            public void setOnMouseUp(String onMouseUp) {
568:                this .onMouseUp = onMouseUp;
569:            }
570:
571:            // onReset
572:            private String onReset = null;
573:
574:            /**
575:             * <p>Scripting code executed when this form is reset.</p>
576:             */
577:            public String getOnReset() {
578:                if (this .onReset != null) {
579:                    return this .onReset;
580:                }
581:                ValueBinding _vb = getValueBinding("onReset");
582:                if (_vb != null) {
583:                    return (String) _vb.getValue(getFacesContext());
584:                }
585:                return null;
586:            }
587:
588:            /**
589:             * <p>Scripting code executed when this form is reset.</p>
590:             * @see #getOnReset()
591:             */
592:            public void setOnReset(String onReset) {
593:                this .onReset = onReset;
594:            }
595:
596:            // onSubmit
597:            private String onSubmit = null;
598:
599:            /**
600:             * <p>Scripting code executed when this form is submitted.</p>
601:             */
602:            public String getOnSubmit() {
603:                if (this .onSubmit != null) {
604:                    return this .onSubmit;
605:                }
606:                ValueBinding _vb = getValueBinding("onSubmit");
607:                if (_vb != null) {
608:                    return (String) _vb.getValue(getFacesContext());
609:                }
610:                return null;
611:            }
612:
613:            /**
614:             * <p>Scripting code executed when this form is submitted.</p>
615:             * @see #getOnSubmit()
616:             */
617:            public void setOnSubmit(String onSubmit) {
618:                this .onSubmit = onSubmit;
619:            }
620:
621:            // style
622:            private String style = null;
623:
624:            /**
625:             * <p>CSS style(s) to be applied when this component is rendered.</p>
626:             */
627:            public String getStyle() {
628:                if (this .style != null) {
629:                    return this .style;
630:                }
631:                ValueBinding _vb = getValueBinding("style");
632:                if (_vb != null) {
633:                    return (String) _vb.getValue(getFacesContext());
634:                }
635:                return null;
636:            }
637:
638:            /**
639:             * <p>CSS style(s) to be applied when this component is rendered.</p>
640:             * @see #getStyle()
641:             */
642:            public void setStyle(String style) {
643:                this .style = style;
644:            }
645:
646:            // styleClass
647:            private String styleClass = null;
648:
649:            /**
650:             * <p>CSS style class(es) to be applied when this component is rendered.</p>
651:             */
652:            public String getStyleClass() {
653:                if (this .styleClass != null) {
654:                    return this .styleClass;
655:                }
656:                ValueBinding _vb = getValueBinding("styleClass");
657:                if (_vb != null) {
658:                    return (String) _vb.getValue(getFacesContext());
659:                }
660:                return null;
661:            }
662:
663:            /**
664:             * <p>CSS style class(es) to be applied when this component is rendered.</p>
665:             * @see #getStyleClass()
666:             */
667:            public void setStyleClass(String styleClass) {
668:                this .styleClass = styleClass;
669:            }
670:
671:            // target
672:            private String target = null;
673:
674:            /**
675:             * <p>The form's target window.</p>
676:             */
677:            public String getTarget() {
678:                if (this .target != null) {
679:                    return this .target;
680:                }
681:                ValueBinding _vb = getValueBinding("target");
682:                if (_vb != null) {
683:                    return (String) _vb.getValue(getFacesContext());
684:                }
685:                return null;
686:            }
687:
688:            /**
689:             * <p>The form's target window.</p>
690:             * @see #getTarget()
691:             */
692:            public void setTarget(String target) {
693:                this .target = target;
694:            }
695:
696:            // virtualForms
697:            private com.sun.rave.web.ui.component.Form.VirtualFormDescriptor[] virtualForms = null;
698:
699:            /**
700:             * <p>The virtual forms within this literal form, represented as an
701:             *         array of Form.VirtualFormDescriptor objects.  This property
702:             *         and the "virtualFormsConfig" property are automatically kept
703:             *         in-sync.</p>
704:             */
705:            public com.sun.rave.web.ui.component.Form.VirtualFormDescriptor[] getVirtualForms() {
706:                return this .virtualForms;
707:            }
708:
709:            /**
710:             * <p>The virtual forms within this literal form, represented as an
711:             *         array of Form.VirtualFormDescriptor objects.  This property
712:             *         and the "virtualFormsConfig" property are automatically kept
713:             *         in-sync.</p>
714:             * @see #getVirtualForms()
715:             */
716:            public void setVirtualForms(
717:                    com.sun.rave.web.ui.component.Form.VirtualFormDescriptor[] virtualForms) {
718:                this .virtualForms = virtualForms;
719:            }
720:
721:            // virtualFormsConfig
722:            private String virtualFormsConfig = null;
723:
724:            /**
725:             * <p>The configuration of the virtual forms within this literal form, represented as a String.
726:             *         Each virtual form is described by three parts, separated with pipe ("|") characters:
727:             *         the virtual form name, a space-separated list of component ids that participate in the 
728:             *         virtual form, and a space-separated list of component ids that submit the virtual form.
729:             *         Multiple such virtual form "descriptors" are separated by commas. The component ids may 
730:             *         be qualified (for instance, "table1:tableRowGroup1:tableColumn1:textField1").</p>
731:             */
732:            public String getVirtualFormsConfig() {
733:                return this .virtualFormsConfig;
734:            }
735:
736:            /**
737:             * <p>The configuration of the virtual forms within this literal form, represented as a String.
738:             *         Each virtual form is described by three parts, separated with pipe ("|") characters:
739:             *         the virtual form name, a space-separated list of component ids that participate in the 
740:             *         virtual form, and a space-separated list of component ids that submit the virtual form.
741:             *         Multiple such virtual form "descriptors" are separated by commas. The component ids may 
742:             *         be qualified (for instance, "table1:tableRowGroup1:tableColumn1:textField1").</p>
743:             * @see #getVirtualFormsConfig()
744:             */
745:            public void setVirtualFormsConfig(String virtualFormsConfig) {
746:                this .virtualFormsConfig = virtualFormsConfig;
747:            }
748:
749:            // visible
750:            private boolean visible = false;
751:            private boolean visible_set = false;
752:
753:            /**
754:             * <p>Use the visible attribute to indicate whether the component should be 
755:             *     viewable by the user in the rendered HTML page.</p>
756:             */
757:            public boolean isVisible() {
758:                if (this .visible_set) {
759:                    return this .visible;
760:                }
761:                ValueBinding _vb = getValueBinding("visible");
762:                if (_vb != null) {
763:                    Object _result = _vb.getValue(getFacesContext());
764:                    if (_result == null) {
765:                        return false;
766:                    } else {
767:                        return ((Boolean) _result).booleanValue();
768:                    }
769:                }
770:                return true;
771:            }
772:
773:            /**
774:             * <p>Use the visible attribute to indicate whether the component should be 
775:             *     viewable by the user in the rendered HTML page.</p>
776:             * @see #isVisible()
777:             */
778:            public void setVisible(boolean visible) {
779:                this .visible = visible;
780:                this .visible_set = true;
781:            }
782:
783:            /**
784:             * <p>Restore the state of this component.</p>
785:             */
786:            public void restoreState(FacesContext _context, Object _state) {
787:                Object _values[] = (Object[]) _state;
788:                super .restoreState(_context, _values[0]);
789:                this .autoComplete = ((Boolean) _values[1]).booleanValue();
790:                this .autoComplete_set = ((Boolean) _values[2]).booleanValue();
791:                this .enctype = (String) _values[3];
792:                this .internalVirtualForms = (com.sun.rave.web.ui.component.Form.VirtualFormDescriptor[]) _values[4];
793:                this .onClick = (String) _values[5];
794:                this .onDblClick = (String) _values[6];
795:                this .onKeyDown = (String) _values[7];
796:                this .onKeyPress = (String) _values[8];
797:                this .onKeyUp = (String) _values[9];
798:                this .onMouseDown = (String) _values[10];
799:                this .onMouseMove = (String) _values[11];
800:                this .onMouseOut = (String) _values[12];
801:                this .onMouseOver = (String) _values[13];
802:                this .onMouseUp = (String) _values[14];
803:                this .onReset = (String) _values[15];
804:                this .onSubmit = (String) _values[16];
805:                this .style = (String) _values[17];
806:                this .styleClass = (String) _values[18];
807:                this .target = (String) _values[19];
808:                this .virtualForms = (com.sun.rave.web.ui.component.Form.VirtualFormDescriptor[]) _values[20];
809:                this .virtualFormsConfig = (String) _values[21];
810:                this .visible = ((Boolean) _values[22]).booleanValue();
811:                this .visible_set = ((Boolean) _values[23]).booleanValue();
812:            }
813:
814:            /**
815:             * <p>Save the state of this component.</p>
816:             */
817:            public Object saveState(FacesContext _context) {
818:                Object _values[] = new Object[24];
819:                _values[0] = super .saveState(_context);
820:                _values[1] = this .autoComplete ? Boolean.TRUE : Boolean.FALSE;
821:                _values[2] = this .autoComplete_set ? Boolean.TRUE
822:                        : Boolean.FALSE;
823:                _values[3] = this .enctype;
824:                _values[4] = this .internalVirtualForms;
825:                _values[5] = this .onClick;
826:                _values[6] = this .onDblClick;
827:                _values[7] = this .onKeyDown;
828:                _values[8] = this .onKeyPress;
829:                _values[9] = this .onKeyUp;
830:                _values[10] = this .onMouseDown;
831:                _values[11] = this .onMouseMove;
832:                _values[12] = this .onMouseOut;
833:                _values[13] = this .onMouseOver;
834:                _values[14] = this .onMouseUp;
835:                _values[15] = this .onReset;
836:                _values[16] = this .onSubmit;
837:                _values[17] = this .style;
838:                _values[18] = this .styleClass;
839:                _values[19] = this .target;
840:                _values[20] = this .virtualForms;
841:                _values[21] = this .virtualFormsConfig;
842:                _values[22] = this .visible ? Boolean.TRUE : Boolean.FALSE;
843:                _values[23] = this.visible_set ? Boolean.TRUE : Boolean.FALSE;
844:                return _values;
845:            }
846:
847:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.