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:
042: package vehicleincidentreportapplication;
043:
044: import com.sun.rave.web.ui.appbase.AbstractPageBean;
045: import com.sun.webui.jsf.component.Body;
046: import com.sun.webui.jsf.component.Form;
047: import com.sun.webui.jsf.component.Head;
048: import com.sun.webui.jsf.component.Html;
049: import com.sun.webui.jsf.component.Link;
050: import com.sun.webui.jsf.component.Page;
051: import javax.faces.FacesException;
052: import javax.faces.component.html.HtmlPanelGrid;
053:
054: /**
055: * <p>Page bean that corresponds to a similarly named JSP page. This
056: * class contains component definitions (and initialization code) for
057: * all components that you have defined on this page, as well as
058: * lifecycle methods and event handlers where you may add behavior
059: * to respond to incoming events.</p>
060: */
061: public class Help extends AbstractPageBean {
062: // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
063: private int __placeholder;
064:
065: /**
066: * <p>Automatically managed component initialization. <strong>WARNING:</strong>
067: * This method is automatically generated, so any user-specified code inserted
068: * here is subject to being replaced.</p>
069: */
070: private void _init() throws Exception {
071: }
072:
073: private Page page1 = new Page();
074:
075: public Page getPage1() {
076: return page1;
077: }
078:
079: public void setPage1(Page p) {
080: this .page1 = p;
081: }
082:
083: private Html html1 = new Html();
084:
085: public Html getHtml1() {
086: return html1;
087: }
088:
089: public void setHtml1(Html h) {
090: this .html1 = h;
091: }
092:
093: private Head head1 = new Head();
094:
095: public Head getHead1() {
096: return head1;
097: }
098:
099: public void setHead1(Head h) {
100: this .head1 = h;
101: }
102:
103: private Link link1 = new Link();
104:
105: public Link getLink1() {
106: return link1;
107: }
108:
109: public void setLink1(Link l) {
110: this .link1 = l;
111: }
112:
113: private Body body1 = new Body();
114:
115: public Body getBody1() {
116: return body1;
117: }
118:
119: public void setBody1(Body b) {
120: this .body1 = b;
121: }
122:
123: private Form form1 = new Form();
124:
125: public Form getForm1() {
126: return form1;
127: }
128:
129: public void setForm1(Form f) {
130: this .form1 = f;
131: }
132:
133: private HtmlPanelGrid content = new HtmlPanelGrid();
134:
135: public HtmlPanelGrid getContent() {
136: return content;
137: }
138:
139: public void setContent(HtmlPanelGrid hpg) {
140: this .content = hpg;
141: }
142:
143: // </editor-fold>
144:
145: /**
146: * <p>Construct a new Page bean instance.</p>
147: */
148: public Help() {
149: }
150:
151: /**
152: * <p>Callback method that is called whenever a page is navigated to,
153: * either directly via a URL, or indirectly via page navigation.
154: * Customize this method to acquire resources that will be needed
155: * for event handlers and lifecycle methods, whether or not this
156: * page is performing post back processing.</p>
157: *
158: * <p>Note that, if the current request is a postback, the property
159: * values of the components do <strong>not</strong> represent any
160: * values submitted with this request. Instead, they represent the
161: * property values that were saved for this view when it was rendered.</p>
162: */
163: public void init() {
164: // Perform initializations inherited from our superclass
165: super .init();
166: // Perform application initialization that must complete
167: // *before* managed components are initialized
168: // TODO - add your own initialiation code here
169:
170: // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
171: // Initialize automatically managed components
172: // *Note* - this logic should NOT be modified
173: try {
174: _init();
175: } catch (Exception e) {
176: log("Help Initialization Failure", e);
177: throw e instanceof FacesException ? (FacesException) e
178: : new FacesException(e);
179: }
180:
181: // </editor-fold>
182: // Perform application initialization that must complete
183: // *after* managed components are initialized
184: // TODO - add your own initialization code here
185: }
186:
187: /**
188: * <p>Callback method that is called after the component tree has been
189: * restored, but before any event processing takes place. This method
190: * will <strong>only</strong> be called on a postback request that
191: * is processing a form submit. Customize this method to allocate
192: * resources that will be required in your event handlers.</p>
193: */
194: public void preprocess() {
195: }
196:
197: /**
198: * <p>Callback method that is called just before rendering takes place.
199: * This method will <strong>only</strong> be called for the page that
200: * will actually be rendered (and not, for example, on a page that
201: * handled a postback and then navigated to a different page). Customize
202: * this method to allocate resources that will be required for rendering
203: * this page.</p>
204: */
205: public void prerender() {
206: }
207:
208: /**
209: * <p>Callback method that is called after rendering is completed for
210: * this request, if <code>init()</code> was called (regardless of whether
211: * or not this was the page that was actually rendered). Customize this
212: * method to release resources acquired in the <code>init()</code>,
213: * <code>preprocess()</code>, or <code>prerender()</code> methods (or
214: * acquired during execution of an event handler).</p>
215: */
216: public void destroy() {
217: }
218:
219: /**
220: * <p>Return a reference to the scoped data bean.</p>
221: */
222: protected ApplicationBean1 getApplicationBean1() {
223: return (ApplicationBean1) getBean("ApplicationBean1");
224: }
225:
226: /**
227: * <p>Return a reference to the scoped data bean.</p>
228: */
229: protected SessionBean1 getSessionBean1() {
230: return (SessionBean1) getBean("SessionBean1");
231: }
232:
233: /**
234: * <p>Return a reference to the scoped data bean.</p>
235: */
236: protected RequestBean1 getRequestBean1() {
237: return (RequestBean1) getBean("RequestBean1");
238: }
239: }
|