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