/* * � Copyright IBM Corp. 2011, 2014 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Generated file. * * Empty.java */ package xsp.pages.pregenerated; import javax.faces.component.UIComponent; import javax.faces.component.UIViewRoot; import javax.faces.context.FacesContext; import com.ibm.xsp.page.compiled.AbstractCompiledPage; import com.ibm.xsp.page.compiled.AbstractCompiledPageDispatcher; import com.ibm.xsp.page.compiled.NoSuchComponentException; import com.ibm.xsp.page.compiled.PageExpressionEvaluator; import com.ibm.xsp.test.framework.TestProject; @SuppressWarnings("all") public class Empty extends AbstractCompiledPageDispatcher{ protected AbstractCompiledPage createPage(int pageIndex) { return new EmptyPage(); } public static class EmptyPage extends AbstractCompiledPage { private static final ComponentInfo[] s_infos = new ComponentInfo[]{ ComponentInfo.EMPTY_NORMAL, // 0 view }; public EmptyPage() { super(0, s_infos ); } public int getComponentForId(String id) throws NoSuchComponentException { return -1; } public UIComponent createComponent(int id, FacesContext context, UIComponent parent, PageExpressionEvaluator evaluator) throws NoSuchComponentException { switch (id) { case 0: return createView(context, parent, evaluator); } throw new NoSuchComponentException(id); } private UIComponent createView(FacesContext context, UIComponent parent, PageExpressionEvaluator evaluator) { UIViewRoot result = TestProject.createViewRootObject(context); initViewRoot(result); return result; } } }