Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
* or packager/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
/*
* JBoss, Home of Professional Open Source
* Copyright 2011, Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* 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.
*/
package javax.faces.component;
import java.util.Map;
import javax.el.MethodExpression;
import javax.faces.FacesException;
import javax.faces.application.NavigationHandler;
import javax.faces.context.FacesContext;
import javax.faces.context.FacesContextWrapper;
import javax.faces.el.MethodBinding;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ActionEvent;
import javax.faces.event.ActionListener;
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PreRenderViewEvent;
import javax.faces.view.ViewMetadata;
/**
*
UIViewAction represents
* a method invocation that occurs during the request processing
* lifecycle, usually in response to an initial request, as opposed to a
* postback.
*
*
The {@link javax.faces.view.ViewDeclarationLanguage}
* implementation must cause an instance of this component to be placed
* in the view for each occurrence of an <f:viewAction
* /> element placed inside of an <f:metadata
* /> element. The user must place <f:metadata
* /> as a direct child of the UIViewRoot.
*
Because this class implements {@link ActionSource2}, any actions
* that one would normally take on a component that implements
* ActionSource2, such as {@link UICommand}, are valid for
* instances of this class. Instances of this class participate in the
* regular JSF lifecycle, including on Ajax requests.
*
The purpose of this component is to provide a light-weight
* front-controller solution for executing code upon the loading of a
* JSF view to support the integration of system services, content
* retrieval, view management, and navigation. This functionality is
* especially useful for non-faces (initial) requests.
*
The most common use case for this component is to take actions
* necessary for a particular view, often with the help of one or more
* {@link UIViewParameter}s.
*
The {@link NavigationHandler} is consulted after the action is
* invoked to carry out the navigation case that matches the action
* signature and outcome. If a navigation case is matched that causes
* the new viewId to be different from the current viewId, the runtime
* must force a redirect to that matched navigation case with different
* viewId, regardless of whether or not the matched navigation case with
* different viewId called for a redirect. If the response is marked
* complete by the action, the lifecycle advances appropriately.
*
It's important to note that the full component tree is not built
* before the UIViewAction components are processed on an non-faces
* (initial) request. Rather, the component tree only contains the
* {@link ViewMetadata}, an important part of the optimization of this
* component and what sets it apart from a {@link PreRenderViewEvent}
* listener.
*
*
* @since 2.2
*/
public class UIViewAction extends UIComponentBase implements ActionSource2 {
// ------------------------------------------------------ Manifest Constants
/**
*
* The standard component type for this component.
*
*/
public static final String COMPONENT_TYPE = "javax.faces.ViewAction";
/**
*
* The standard component family for this component.
*
*/
public static final String COMPONENT_FAMILY = "javax.faces.ViewAction";
private static final String UIVIEWACTION_BROADCAST = "javax.faces.ViewAction.broadcast";
private static final String UIVIEWACTION_EVENT_COUNT = "javax.faces.ViewAction.eventCount";
/**
* Properties that are tracked by state saving.
*/
enum PropertyKeys {
onPostback, actionExpression, immediate, phase, renderedAttr("if");
private String name;
PropertyKeys() {
}
PropertyKeys(final String name) {
this.name = name;
}
@Override
public String toString() {
return name != null ? name : super.toString();
}
}
// ------------------------------------------------------------ Constructors
/**
*
* Create a new {@link UIViewAction} instance with default property values.
*