diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57ae23945e..0c2c7433dd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,14 +13,29 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - java: [ '11' ] + java: [ '17' ] os: [ubuntu-latest] steps: - name: Checkout Sources - uses: actions/checkout@v1 + uses: actions/checkout@v4 + with: + submodules: 'true' + - name: Checkout API + uses: actions/checkout@v4 + with: + repository: jakartaee/faces + ref: '5.0' + path: './faces' - name: Setup Java uses: actions/setup-java@v1 with: java-version: ${{ matrix.java }} + - name: Setup Maven Action + uses: s4u/setup-maven-action@v1.12.0 + with: + checkout-fetch-depth: 0 + java-version: 17 + java-distribution: temurin + maven-version: 3.9.6 - name: Build with Maven - run: mvn --no-transfer-progress install -Pstaging + run: mvn --no-transfer-progress install -Pstaging -Papi diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..16e1537e7c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "faces"] + path = faces + url = https://github.com/jakartaee/faces.git + branch = 5.0 diff --git a/README.md b/README.md index b3854c0a63..f24aa9179c 100644 --- a/README.md +++ b/README.md @@ -14,25 +14,28 @@ [//]: # " SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 " --> -# Mojarra 4.0 +# Mojarra 5.0 -Eclipse's implementation of the Jakarta Faces 4.0 specification +Eclipse's implementation of the Jakarta Faces 5.0 specification -For Mojarra / JSF 2.3 please have a look at https://github.com/eclipse-ee4j/mojarra/blob/2.3/README.md. -For Mojarra / JSF 3.0 please have a look at https://github.com/eclipse-ee4j/mojarra/blob/3.0/README.md. +* Mojarra 5.0 - this branch, under development +* [Mojarra 4.1](https://github.com/eclipse-ee4j/mojarra/blob/4.1/README.md) - stable release +* [Mojarra 4.0](https://github.com/eclipse-ee4j/mojarra/blob/4.0/README.md) - stable release +* [Mojarra 3.0](https://github.com/eclipse-ee4j/mojarra/blob/3.0/README.md) - legacy release +* [Mojarra 2.3](https://github.com/eclipse-ee4j/mojarra/blob/2.3/README.md) - legacy release -## Minimum Requirements +For support on Mojarra 2.3 and earlier please contact your vendor for support (RedHat, IBM, +Oracle, Omnifish, Payara, etceteras) -- Java 11 -- Jakarta Servlet 6.0 -- Jakarta Expression Language 5.0 -- CDI 4.0 -- Jakarta Standard Tag Library 2.0 -- Jakarta Web Socket 2.0 (optional, only when `` is used) -- Jakarta JSON Processing 2.0 (optional, only when `` is used) -- Jakarta Validation 3.0 (optional, only when `` or `` is used) +## Minimum Requirements -CDI is explicitly required because since Jakarta Faces 2.3 the `javax.faces.bean.*` annotations such as `@ManagedBean` are deprecated, and in 4.0 these have been removed. Several implicit Jakarta Expression Language objects are produced via CDI producers, and `` manages the Jakarta WebSocket sessions and events via CDI. +- Java 17 +- Jakarta Servlet 6.1 +- Jakarta Expression Language 6.0 +- Jakarta CDI 4.1 +- Jakarta Web Socket 2.2 (optional, only when `` is used) +- Jakarta JSON Processing 2.1 (optional, only when `` is used) +- Jakarta Validation 3.1 (optional, only when `` or `` is used) ## Installation @@ -52,12 +55,11 @@ In case you're manually carrying around JARs: Add below JARs to `/WEB-INF/lib`: - - [`jakarta.faces.4.0.x.jar`][9] - - [`weld-servlet-shaded-4.0.0.Final.jar`][10] - - [`jstl-2.0.jar`][11] - - [`jakarta.json-api-2.0.jar`][12] (optional, only when `` is used) - - [`jakarta.json-2.0.jar`][12a] (optional, only when `` is used) - - [`validation-api-3.0.0.Final.jar`][13] (optional, only when `` is used) + - [`jakarta.faces.4.1.x.jar`][9] + - [`weld-servlet-shaded-4.1.0.Final.jar`][10] + - [`jakarta.json-api-2.1.0.jar`][12] (optional, only when `` is used) + - [`jakarta.json-2.1.0.jar`][12a] (optional, only when `` is used) + - [`jakarta.validation-api-3.1.0.jar`][13] (optional, only when `` is used) - [`hibernate-validator-8.0.x.Final.jar`][14] (optional, only when `` is used) Substitute `x` with latest version number available. @@ -72,7 +74,7 @@ In case you're using Maven, you can find below the necessary coordinates: jakarta.platform jakarta.jakartaee-api - 10.0.0 + 11.0.0 provided ``` @@ -90,17 +92,12 @@ In case of WildFly/JBoss EAP, [you need to manually package `jsf-api.jar` and `j org.jboss.weld.servlet weld-servlet-shaded - 4.0.0.Final - - - jakarta.servlet.jsp.jstl - jakarta.servlet.jsp.jstl-api - 2.0.0 + 4.1.0.Final org.glassfish jakarta.json - 2.0.0 + 2.1.0 org.hibernate.validator @@ -228,9 +225,9 @@ Finally create a [Facelets][20] file `/hello.xhtml` as below: Start the server and open it by `http://localhost:8080/contextname/hello.xhtml`. -## Activating CDI in Jakarta Faces 4.0 +## Activating CDI in Jakarta Faces 4.1 -CDI is activated by default in Jakarta Faces 4.0 and can´t be deactivated. +CDI is activated by default in Jakarta Faces 4.1 and can´t be deactivated. It´s not required anymore to add `@FacesConfig` to a CDI managed bean to accomplish this. As of Jakarta Faces 4.0 `@FacesConfig` still removes the need to explicitly add a `FacesServlet` entry to `web.xml`. @@ -238,10 +235,25 @@ As of Jakarta Faces 4.0 `@FacesConfig` still removes the need to explicitly add In case you want to checkout this repository and manually build from source yourself (if necessary after editing source code), here are the instructions: +### Jakarta Faces.Next + +1. Make sure that you have JDK 17, Ant and Maven installed. +2. Checkout branch [`master`][28]. +3. Run the following commands from the root directory of the project: + + ```bash + # under the root dir of project + mvn clean install + ``` + +4. The binary is now available as `impl/target/jakarta.faces-4.x.x-SNAPSHOT.jar`. + + + ### Jakarta Faces 4.0 1. Make sure that you have JDK 11, Ant and Maven installed. -2. Checkout branch [`master`][28]. +2. Checkout branch [`4.0`][31]. 3. Run the following commands from the root directory of the project: ```bash @@ -287,6 +299,11 @@ In case you want to checkout to edit the source code of Mojarra with full IDE su ### Eclipse +#### Jakarta Faces 4.0 + +1. Checkout branch [`4.0`][29] using File -> import -> Git +2. Right click the Mojarra project after checkout, choose Configure -> Convert to Maven Project + #### Jakarta Faces 3.0 1. Checkout branch [`3.0`][29] using File -> import -> Git @@ -358,3 +375,4 @@ mvn versions:set -DgroupId=* -DartifactId=* -DoldVersion=* -DgenerateBackupPoms= [28]: https://github.com/eclipse-ee4j/mojarra [29]: https://github.com/eclipse-ee4j/mojarra/tree/3.0 [30]: https://github.com/eclipse-ee4j/mojarra/tree/2.3 + [31]: https://github.com/eclipse-ee4j/mojarra/tree/4.0 diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000..08d380f249 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,39 @@ +# Releasing a new Mojarra version + +In below example we assume 4.0.3. + +1. Check beforehand that this version does NOT exist in [staging](https://jakarta.oss.sonatype.org/content/repositories/staging/org/glassfish/jakarta.faces/) else bump the version +2. Go to [Mojarra CI](https://ci.eclipse.org/mojarra/) +3. [Log in](https://ci.eclipse.org/mojarra/login?from=%2Fmojarra%2F) +4. Open [1_mojarra_build_and_stage](https://ci.eclipse.org/mojarra/job/1_mojarra-build-and-stage/) +5. Click [Build with parameters](https://ci.eclipse.org/mojarra/job/1_mojarra-build-and-stage/build) in menu + - `BRANCH` = `4.0` + - `RELEASE_VERSION` = `4.0.3` + - `JDK` = `JDK11` + - click [Build] button +6. Wait for it to finish successfully +7. Drill down into this build e.g. [build 106](https://ci.eclipse.org/mojarra/job/1_mojarra-build-and-stage/106) +8. Click [Console Output](https://ci.eclipse.org/mojarra/job/1_mojarra-build-and-stage/106/console) in menu +9. Ctrl+F 'orgglassfish', to find release ID, e.g. `Created staging repository with ID "orgglassfish-1273"`, remember this for `STAGING_RELEASE_ID` in a later step +10. Verify that it's present in [staging](https://jakarta.oss.sonatype.org/content/repositories/staging/org/glassfish/jakarta.faces/) +11. Verify that a new [4.0.3](https://github.com/eclipse-ee4j/mojarra/branches/active) branch is created +12. Verify that a new [4.0.3-RELEASE](https://github.com/eclipse-ee4j/mojarra/tags) tag is created +13. Open [2_mojarra-run-tck-against-staged-build_4_0](https://ci.eclipse.org/mojarra/job/2_mojarra-run-tck-against-staged-build_4_0) (there are separate ones for 2.3 and 3.0) +14. Click [Build with parameters](https://ci.eclipse.org/mojarra/job/2_mojarra-run-tck-against-staged-build_4_0/build) in menu + - `IMPL_SOURCE` = `STAGE` + - `IMPL_VERSION` = `4.0.3` + - `IMPL_BRANCH` = `4.0` + - click [Build] button +15. Wait for it to finish successfully +16. Open [3_mojarra-staging-to-release](https://ci.eclipse.org/mojarra/job/3_mojarra-staging-to-release/) +17. Click [Build with parameters](https://ci.eclipse.org/mojarra/job/3_mojarra-staging-to-release/build) in menu + - `STAGING_RELEASE_ID` = `orgglassfish-1273` + - click [Build] button +18. Wait for it to finish successfully +19. Verify that it's present in [Maven Central](https://repo1.maven.org/maven2/org/glassfish/jakarta.faces/) (might take up to a hour) +20. If everything is OK, then merge 4.0.3 branch into 4.0 via a PR +21. Delete the 4.0.3 branch after merge +22. Manage the [milestones](https://github.com/eclipse-ee4j/mojarra/milestones) page + - make sure all issues/PRs are linked to proper milestone + - close the milestones which were just released + - create new milestones for next releases diff --git a/action/faces-config.NavData b/action/faces-config.NavData deleted file mode 100644 index 298bfc50a8..0000000000 --- a/action/faces-config.NavData +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/action/pom.xml b/action/pom.xml deleted file mode 100644 index 4af7dc0eda..0000000000 --- a/action/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - 4.0.0 - - - org.glassfish - mojarra-parent - 4.0.9-SNAPSHOT - - - org.eclipse.mojarra - mojarra-action - jar - - Mojarra ${project.version} - Action - - - - jakarta.enterprise - jakarta.enterprise.cdi-api - 4.0.0 - provided - - - jakarta.servlet - jakarta.servlet-api - 6.0.0 - provided - - - org.glassfish - jakarta.faces - ${project.version} - provided - - - org.eclipse.mojarra - mojarra-cdi - ${project.version} - runtime - - - diff --git a/action/src/main/java/org/eclipse/mojarra/action/ActionHeaderParameter.java b/action/src/main/java/org/eclipse/mojarra/action/ActionHeaderParameter.java deleted file mode 100644 index e2da56637f..0000000000 --- a/action/src/main/java/org/eclipse/mojarra/action/ActionHeaderParameter.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.action; - -import java.lang.annotation.Documented; -import static java.lang.annotation.ElementType.PARAMETER; -import java.lang.annotation.Retention; -import static java.lang.annotation.RetentionPolicy.RUNTIME; -import java.lang.annotation.Target; - -/** - * The ActionHeaderParameter annotation. - */ -@Documented -@Target(value = {PARAMETER}) -@Retention(value = RUNTIME) -public @interface ActionHeaderParameter { - - /** - * Stores the name. - * - * @return the name. - */ - public String value() default ""; -} diff --git a/action/src/main/java/org/eclipse/mojarra/action/ActionInitializer.java b/action/src/main/java/org/eclipse/mojarra/action/ActionInitializer.java deleted file mode 100644 index 1a4724968f..0000000000 --- a/action/src/main/java/org/eclipse/mojarra/action/ActionInitializer.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.action; - -import java.util.Set; -import jakarta.faces.webapp.FacesServlet; -import jakarta.servlet.ServletContainerInitializer; -import jakarta.servlet.ServletContext; -import jakarta.servlet.ServletException; -import jakarta.servlet.ServletRegistration.Dynamic; - -/** - * The ServletContainerInitializer that automatically registers the Faces Action - * Servlet and the '/action/*' mapping if the Action Servlet has not - * already been registered. - */ -public class ActionInitializer implements ServletContainerInitializer { - - /** - * On startup. - * - * @param classes the classes. - * @param servletContext the servlet context. - * @throws ServletException when a Servlet error occurs. - */ - @Override - public void onStartup(Set> classes, ServletContext servletContext) - throws ServletException { - if (servletContext.getServletRegistration("Faces Action Servlet") == null) { - Dynamic dynamic = servletContext.addServlet("Faces Action Servlet", FacesServlet.class.getName()); - dynamic.addMapping("/action/*"); - dynamic.setInitParameter("jakarta.faces.LIFECYCLE_ID", ActionLifecycle.class.getName()); - } - } -} diff --git a/action/src/main/java/org/eclipse/mojarra/action/ActionLifecycle.java b/action/src/main/java/org/eclipse/mojarra/action/ActionLifecycle.java deleted file mode 100644 index dec7dfd5ec..0000000000 --- a/action/src/main/java/org/eclipse/mojarra/action/ActionLifecycle.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.action; - -import java.io.IOException; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.faces.FacesException; -import jakarta.faces.context.FacesContext; -import jakarta.faces.event.PhaseListener; -import jakarta.faces.lifecycle.Lifecycle; -import jakarta.inject.Inject; -import jakarta.inject.Named; - -/** - * The ActionLifecycle. - */ -@ApplicationScoped -@Named("org.eclipse.mojarra.action.ActionLifecycle") -public class ActionLifecycle extends Lifecycle { - - /** - * Stores the action mapping matcher. - */ - @Inject - private ActionMappingMatcher actionMappingMatcher; - - /** - * Stores the action method executor. - */ - @Inject - private ActionMethodExecutor actionMethodExecutor; - - /** - * Stores the action response handler. - */ - @Inject - private ActionResponseHandler actionResponseHandler; - - /** - * Constructor. - */ - public ActionLifecycle() { - } - - /** - * Add a phase listener. - * - *

- * This is ignored by the ActionLifecycle. - * - * @param phaseListener the phase listener. - */ - @Override - public void addPhaseListener(PhaseListener phaseListener) { - } - - /** - * Perform the execute part of ActionLifecycle. - * - * @param facesContext the Faces context. - * @throws FacesException when a serious error occurs. - */ - @Override - public void execute(FacesContext facesContext) throws FacesException { - ActionMappingMatch match = actionMappingMatcher.match(facesContext); - if (match != null) { - actionMethodExecutor.execute(facesContext, match); - } else { - try { - facesContext.getExternalContext().responseSendError(404, "Unable to match action"); - facesContext.responseComplete(); - } catch (IOException ioe) { - throw new FacesException(ioe); - } - } - } - - /** - * Get the phase listeners. - * - *

- * As phase listeners are ignored by the Action lifecycle this will always - * return a zero length array. - * - * @return the empty array of phase listeners. - */ - @Override - public PhaseListener[] getPhaseListeners() { - return new PhaseListener[0]; - } - - /** - * Remove a phase listener. - * - *

- * This is ignored by the Action lifecycle. - * - * @param phaseListener the phase listener. - */ - @Override - public void removePhaseListener(PhaseListener phaseListener) { - } - - /** - * Perform the render part of the Action lifecycle. - * - * @param facesContext the Faces context. - * @throws FacesException when a serious error occurs. - */ - @Override - public void render(FacesContext facesContext) throws FacesException { - if (!facesContext.getResponseComplete()) { - actionResponseHandler.respond(facesContext); - } - } -} diff --git a/action/src/main/java/org/eclipse/mojarra/action/ActionMapping.java b/action/src/main/java/org/eclipse/mojarra/action/ActionMapping.java deleted file mode 100644 index 6a8eee78f7..0000000000 --- a/action/src/main/java/org/eclipse/mojarra/action/ActionMapping.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.action; - -import java.lang.annotation.Documented; -import static java.lang.annotation.ElementType.METHOD; -import java.lang.annotation.Retention; -import static java.lang.annotation.RetentionPolicy.RUNTIME; -import java.lang.annotation.Target; - -/** - * The action mapping. - * - *

- * The syntax of the action mapping is the same as url-pattern in web.xml. - */ -@Documented -@Target(value = {METHOD}) -@Retention(value = RUNTIME) -public @interface ActionMapping { - - /** - * Get the mapping. - * ˆ - * @return the mapping. - */ - String value() default "/*"; -} diff --git a/action/src/main/java/org/eclipse/mojarra/action/ActionMappingMatch.java b/action/src/main/java/org/eclipse/mojarra/action/ActionMappingMatch.java deleted file mode 100644 index 9f97f0ede3..0000000000 --- a/action/src/main/java/org/eclipse/mojarra/action/ActionMappingMatch.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.action; - -import java.lang.reflect.Method; -import jakarta.enterprise.inject.spi.Bean; - -/** - * The ActionMappingMatch class. - */ -public class ActionMappingMatch { - - /** - * Stores the action mapping. - */ - private String actionMapping; - - /** - * Stores the mapping type. - */ - private ActionMappingType mappingType; - - /** - * Stores the bean. - */ - private Bean bean; - - /** - * Stores the method. - */ - private Method method; - - /** - * Stores the path info. - */ - private String pathInfo; - - /** - * Get the action mapping. - * - * @return the action mapping. - */ - public String getActionMapping() { - return actionMapping; - } - - /** - * Get the bean. - * - * @return the bean. - */ - public Bean getBean() { - return bean; - } - - /** - * Get the length. - * - * @return the length. - */ - public int getLength() { - return actionMapping.length(); - } - - /** - * Get the mapping type. - * - * @return the mapping type. - */ - public ActionMappingType getMappingType() { - return mappingType; - } - - /** - * Get the method. - * - * @return the method. - */ - public Method getMethod() { - return method; - } - - /** - * Get the path info. - * - * @return the path info. - */ - public String getPathInfo() { - return pathInfo; - } - - /** - * Set the action mapping. - * - * @param actionMApping the action mapping. - */ - public void setActionMapping(String actionMApping) { - this.actionMapping = actionMApping; - } - - /** - * Set the bean. - * - * @param bean the bean. - */ - public void setBean(Bean bean) { - this.bean = bean; - } - - /** - * Set the mapping type. - * - * @param mappingType the mapping type. - */ - public void setMappingType(ActionMappingType mappingType) { - this.mappingType = mappingType; - } - - /** - * Set the method. - * - * @param method the method. - */ - public void setMethod(Method method) { - this.method = method; - } - - /** - * Set the path info. - * - * @param pathInfo the path info. - */ - public void setPathInfo(String pathInfo) { - this.pathInfo = pathInfo; - } -} diff --git a/action/src/main/java/org/eclipse/mojarra/action/ActionMappingMatcher.java b/action/src/main/java/org/eclipse/mojarra/action/ActionMappingMatcher.java deleted file mode 100644 index 9718ec610d..0000000000 --- a/action/src/main/java/org/eclipse/mojarra/action/ActionMappingMatcher.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.action; - -import jakarta.faces.context.FacesContext; - -/** - * The ActionMappingMatcher API. - */ -public interface ActionMappingMatcher { - - /** - * Match request to an action mapping. - * - * @param facesContext the Faces context. - * @return the action mapping match, or null if not found. - */ - public ActionMappingMatch match(FacesContext facesContext); -} diff --git a/action/src/main/java/org/eclipse/mojarra/action/ActionMappingParameter.java b/action/src/main/java/org/eclipse/mojarra/action/ActionMappingParameter.java deleted file mode 100644 index a7a29fe431..0000000000 --- a/action/src/main/java/org/eclipse/mojarra/action/ActionMappingParameter.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.action; - -import java.lang.annotation.Documented; -import static java.lang.annotation.ElementType.PARAMETER; -import java.lang.annotation.Retention; -import static java.lang.annotation.RetentionPolicy.RUNTIME; -import java.lang.annotation.Target; - -/** - * The ActionMappingParameter annotation. - */ -@Documented -@Target(value = {PARAMETER}) -@Retention(value = RUNTIME) -public @interface ActionMappingParameter { - - /** - * Stores the name (a.k.a capturing group). - * - * @return the name (a.k.a capturing group). - */ - public String value() default ""; -} diff --git a/action/src/main/java/org/eclipse/mojarra/action/ActionMappingType.java b/action/src/main/java/org/eclipse/mojarra/action/ActionMappingType.java deleted file mode 100644 index 1e7baad9f3..0000000000 --- a/action/src/main/java/org/eclipse/mojarra/action/ActionMappingType.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.action; - -/** - * The ActionMappingType enum. - */ -public enum ActionMappingType { - /* - * An exact match. - */ - EXACT, - /* - * A prefix match. - */ - PREFIX, - /* - * An extension match. - */ - EXTENSION, - /* - * A regular expression match. - */ - REGEX -} diff --git a/action/src/main/java/org/eclipse/mojarra/action/ActionMethodExecutor.java b/action/src/main/java/org/eclipse/mojarra/action/ActionMethodExecutor.java deleted file mode 100644 index e1762d0bef..0000000000 --- a/action/src/main/java/org/eclipse/mojarra/action/ActionMethodExecutor.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.action; - -import jakarta.faces.context.FacesContext; - -/** - * The ActionMethodExecutor API. - */ -public interface ActionMethodExecutor { - - /** - * Execute the method. - * - * @param facesContext the Faces context. - * @param actionMappingMatch the action mapping match. - */ - public void execute(FacesContext facesContext, ActionMappingMatch actionMappingMatch); -} diff --git a/action/src/main/java/org/eclipse/mojarra/action/ActionParameterProducer.java b/action/src/main/java/org/eclipse/mojarra/action/ActionParameterProducer.java deleted file mode 100644 index 0df68c1cdf..0000000000 --- a/action/src/main/java/org/eclipse/mojarra/action/ActionParameterProducer.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.action; - -import java.lang.annotation.Annotation; -import jakarta.faces.context.FacesContext; - -/** - * The ActionParameterProducer API. - */ -public interface ActionParameterProducer { - - /** - * Produce an instance for the given type. - * - * @param facesContext the Faces context. - * @param actionMappingMatch the Action mapping match. - * @param parameterType the type. - * @param parameterAnnotations the parameter annotations. - * @return the instance. - */ - public Object produce( - FacesContext facesContext, - ActionMappingMatch actionMappingMatch, - Class parameterType, - Annotation[] parameterAnnotations); -} diff --git a/action/src/main/java/org/eclipse/mojarra/action/ActionPathParameter.java b/action/src/main/java/org/eclipse/mojarra/action/ActionPathParameter.java deleted file mode 100644 index a8338d9b27..0000000000 --- a/action/src/main/java/org/eclipse/mojarra/action/ActionPathParameter.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.action; - -import java.lang.annotation.Documented; -import static java.lang.annotation.ElementType.PARAMETER; -import java.lang.annotation.Retention; -import static java.lang.annotation.RetentionPolicy.RUNTIME; -import java.lang.annotation.Target; - -/** - * The ActionPathParameter annotation. - */ -@Documented -@Target(value = {PARAMETER}) -@Retention(value = RUNTIME) -public @interface ActionPathParameter { - - /** - * Stores the name (a.k.a capturing group). - * - * @return the name (a.k.a capturing group). - */ - public String value() default ""; -} diff --git a/action/src/main/java/org/eclipse/mojarra/action/ActionQueryParameter.java b/action/src/main/java/org/eclipse/mojarra/action/ActionQueryParameter.java deleted file mode 100644 index aa0859f3bc..0000000000 --- a/action/src/main/java/org/eclipse/mojarra/action/ActionQueryParameter.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.action; - -import java.lang.annotation.Documented; -import static java.lang.annotation.ElementType.PARAMETER; -import java.lang.annotation.Retention; -import static java.lang.annotation.RetentionPolicy.RUNTIME; -import java.lang.annotation.Target; - -/** - * The ActionQueryParameter annotation. - */ -@Documented -@Target(value = {PARAMETER}) -@Retention(value = RUNTIME) -public @interface ActionQueryParameter { - - /** - * Stores the name. - * - * @return the name. - */ - public String value() default ""; -} diff --git a/action/src/main/java/org/eclipse/mojarra/action/ActionResponseHandler.java b/action/src/main/java/org/eclipse/mojarra/action/ActionResponseHandler.java deleted file mode 100644 index 2cd7c69a5f..0000000000 --- a/action/src/main/java/org/eclipse/mojarra/action/ActionResponseHandler.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.action; - -import jakarta.faces.FacesException; -import jakarta.faces.context.FacesContext; - -/** - * The ActionResponseHandler API. - */ -public interface ActionResponseHandler { - - /** - * Respond back to the browser. - * - * @param facesContext the Faces context. - * @throws FacesException when a serious error occurs. - */ - public void respond(FacesContext facesContext) throws FacesException; -} diff --git a/action/src/main/java/org/eclipse/mojarra/action/DefaultActionMappingMatcher.java b/action/src/main/java/org/eclipse/mojarra/action/DefaultActionMappingMatcher.java deleted file mode 100644 index e02ef9ea4b..0000000000 --- a/action/src/main/java/org/eclipse/mojarra/action/DefaultActionMappingMatcher.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.action; - -import java.util.Iterator; -import java.util.Set; -import java.util.regex.Pattern; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.enterprise.inject.Any; -import jakarta.enterprise.inject.spi.AnnotatedMethod; -import jakarta.enterprise.inject.spi.AnnotatedType; -import jakarta.enterprise.inject.spi.Bean; -import jakarta.enterprise.inject.spi.CDI; -import jakarta.faces.context.FacesContext; - -/** - * The default ActionMappingMatcher. - */ -@ApplicationScoped -public class DefaultActionMappingMatcher implements ActionMappingMatcher { - - /** - * Find the action mapping for the given bean. - * - * @param facesContext the Faces context. - * @param bean the bean. - * @return the action mapping match, or null if not found. - */ - private ActionMappingMatch determineActionMappingMatch(FacesContext facesContext, Bean bean) { - ActionMappingMatch result = null; - Class clazz = bean.getBeanClass(); - AnnotatedType annotatedType = CDI.current().getBeanManager().createAnnotatedType(clazz); - Set annotatedMethodSet = annotatedType.getMethods(); - for (AnnotatedMethod method : annotatedMethodSet) { - if (method.isAnnotationPresent(ActionMapping.class)) { - ActionMapping requestMapping = method.getAnnotation(ActionMapping.class); - String mapping = requestMapping.value(); - String pathInfo = facesContext.getExternalContext().getRequestPathInfo(); - if (pathInfo != null) { - if (pathInfo.equals(mapping)) { - result = new ActionMappingMatch(); - result.setBean(bean); - result.setMethod(method.getJavaMember()); - result.setActionMapping(mapping); - result.setMappingType(ActionMappingType.EXACT); - result.setPathInfo(pathInfo); - break; - } else if (mapping.endsWith("*")) { - mapping = mapping.substring(0, mapping.length() - 1); - if (pathInfo.startsWith(mapping)) { - if (result == null) { - result = new ActionMappingMatch(); - result.setBean(bean); - result.setMethod(method.getJavaMember()); - result.setActionMapping(mapping); - result.setMappingType(ActionMappingType.PREFIX); - result.setPathInfo(pathInfo); - } else if (mapping.length() > result.getLength()) { - result.setBean(bean); - result.setMethod(method.getJavaMember()); - result.setActionMapping(mapping); - result.setMappingType(ActionMappingType.PREFIX); - result.setPathInfo(pathInfo); - } - } - } else if (mapping.startsWith("*")) { - mapping = mapping.substring(1); - if (pathInfo.endsWith(mapping)) { - result = new ActionMappingMatch(); - result.setBean(bean); - result.setMethod(method.getJavaMember()); - result.setActionMapping(mapping); - result.setMappingType(ActionMappingType.EXTENSION); - result.setPathInfo(pathInfo); - break; - } - } else if (mapping.startsWith("regex:")) { - mapping = mapping.substring("regex:".length()); - if (Pattern.matches(mapping, pathInfo)) { - result = new ActionMappingMatch(); - result.setBean(bean); - result.setMethod(method.getJavaMember()); - result.setActionMapping(mapping); - result.setMappingType(ActionMappingType.REGEX); - result.setPathInfo(pathInfo); - break; - } - } - } - } - if (result != null - && (result.getMappingType().equals(ActionMappingType.EXACT) - || (result.getMappingType().equals(ActionMappingType.EXTENSION)))) { - break; - } - } - return result; - } - - /** - * Get the beans. - * - * @return the beans. - */ - private Iterator> getBeans() { - Set> beans = CDI.current().getBeanManager().getBeans( - Object.class, Any.Literal.INSTANCE); - return beans.iterator(); - } - - /** - * Match the request to an action mapping. - * - * @param facesContext the Faces context. - * @return the action mapping match. - */ - @Override - public ActionMappingMatch match(FacesContext facesContext) { - ActionMappingMatch match = null; - Iterator> beans = getBeans(); - while (beans.hasNext()) { - Bean bean = beans.next(); - ActionMappingMatch candidate = determineActionMappingMatch(facesContext, bean); - if (match == null) { - match = candidate; - } else if (candidate != null && candidate.getLength() > match.getLength()) { - match = candidate; - } - } - return match; - } -} diff --git a/action/src/main/java/org/eclipse/mojarra/action/DefaultActionMethodExecutor.java b/action/src/main/java/org/eclipse/mojarra/action/DefaultActionMethodExecutor.java deleted file mode 100644 index 13113b7002..0000000000 --- a/action/src/main/java/org/eclipse/mojarra/action/DefaultActionMethodExecutor.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.action; - -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.enterprise.inject.Any; -import jakarta.enterprise.inject.Instance; -import jakarta.enterprise.inject.spi.CDI; -import jakarta.faces.FacesException; -import jakarta.faces.component.UIViewRoot; -import jakarta.faces.context.FacesContext; -import jakarta.inject.Inject; - -/** - * The default ActionMethodExecutor. - */ -@ApplicationScoped -public class DefaultActionMethodExecutor implements ActionMethodExecutor { - - /** - * Stores the ActionParameterProducer. - */ - @Inject - private ActionParameterProducer actionParameterProducer; - - /** - * Execute the method. - * - * @param facesContext the Faces context. - * @param actionMappingMatch the action mapping match. - */ - @Override - public void execute(FacesContext facesContext, ActionMappingMatch actionMappingMatch) { - Instance instance = CDI.current().select( - actionMappingMatch.getBean().getBeanClass(), Any.Literal.INSTANCE); - String viewId; - try { - Object[] parameters = new Object[actionMappingMatch.getMethod().getParameterCount()]; - if (parameters.length > 0) { - for(int i=0; i parameterType, - Annotation[] parameterAnnotations) { - - ActionHeaderParameter header = getActionHeaderParameterAnnotation(parameterAnnotations); - if (header != null) { - return facesContext.getExternalContext().getRequestHeaderMap().get(header.value()); - } - - ActionPathParameter path = getActionPathParameterAnnotation(parameterAnnotations); - if (path != null) { - Pattern pattern = Pattern.compile(actionMappingMatch.getActionMapping()); - Matcher matcher = pattern.matcher(actionMappingMatch.getPathInfo()); - if (matcher.matches()) { - return matcher.group(path.value()); - } else { - throw new FacesException("Unable to match @ActionPathParameter: " + path.value()); - } - } - - ActionQueryParameter query = getActionQueryParameterAnnotation(parameterAnnotations); - if (query != null) { - return facesContext.getExternalContext().getRequestParameterMap().get(query.value()); - } - - return CDI.current().select(parameterType, Any.Literal.INSTANCE).get(); - } - - /** - * Get the @ActionHeaderParameter annotation (if present). - * - * @return the @ActionQueryParameter annotation, or null if not present. - */ - private ActionHeaderParameter getActionHeaderParameterAnnotation(Annotation[] annotations) { - ActionHeaderParameter result = null; - if (annotations != null && annotations.length > 0) { - for (Annotation annotation : annotations) { - if (annotation instanceof ActionHeaderParameter) { - result = (ActionHeaderParameter) annotation; - break; - } - } - } - return result; - } - - /** - * Get the @ActionPathParameter annotation (if present). - * - * @return the @RestPathParameter annotation, or null if not present. - */ - private ActionPathParameter getActionPathParameterAnnotation(Annotation[] annotations) { - ActionPathParameter result = null; - if (annotations != null && annotations.length > 0) { - for (Annotation annotation : annotations) { - if (annotation instanceof ActionPathParameter) { - result = (ActionPathParameter) annotation; - break; - } - } - } - return result; - } - - /** - * Get the @ActionQueryParameter annotation (if present). - * - * @return the @ActionQueryParameter annotation, or null if not present. - */ - private ActionQueryParameter getActionQueryParameterAnnotation(Annotation[] annotations) { - ActionQueryParameter result = null; - if (annotations != null && annotations.length > 0) { - for (Annotation annotation : annotations) { - if (annotation instanceof ActionQueryParameter) { - result = (ActionQueryParameter) annotation; - break; - } - } - } - return result; - } -} diff --git a/action/src/main/java/org/eclipse/mojarra/action/DefaultActionResponseHandler.java b/action/src/main/java/org/eclipse/mojarra/action/DefaultActionResponseHandler.java deleted file mode 100644 index a9c31f017f..0000000000 --- a/action/src/main/java/org/eclipse/mojarra/action/DefaultActionResponseHandler.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.action; - -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.faces.FacesException; -import jakarta.faces.FactoryFinder; -import jakarta.faces.context.FacesContext; -import jakarta.faces.lifecycle.Lifecycle; -import jakarta.faces.lifecycle.LifecycleFactory; - -/** - * The default ActionResponseHandler. - */ -@ApplicationScoped -public class DefaultActionResponseHandler implements ActionResponseHandler { - - /** - * Stores the default lifecycle. - */ - private Lifecycle defaultLifecycle; - - /** - * Get the default lifecycle. - * - *

- * FIXME - This method lazily gets the default Lifecycle as FactoryFinder is - * not properly re-entrant. We should be able to initialize the - * defaultLifecycle variable in the constructor of this class. - *

- * - * @return the default lifecycle. - */ - private synchronized Lifecycle getDefaultLifecycle() { - if (defaultLifecycle == null) { - LifecycleFactory lifecycleFactory = (LifecycleFactory) FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY); - defaultLifecycle = lifecycleFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE); - } - return defaultLifecycle; - } - - /** - * Response to the browser. - * - * @param facesContext the Faces context. - * @throws FacesException when a serious error occurs. - */ - @Override - public void respond(FacesContext facesContext) throws FacesException { - getDefaultLifecycle().render(facesContext); - } -} diff --git a/action/src/main/resources/META-INF/beans.xml b/action/src/main/resources/META-INF/beans.xml deleted file mode 100644 index 16e3e16ee7..0000000000 --- a/action/src/main/resources/META-INF/beans.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/action/src/main/resources/META-INF/faces-config.xml b/action/src/main/resources/META-INF/faces-config.xml deleted file mode 100644 index 728c76d0bf..0000000000 --- a/action/src/main/resources/META-INF/faces-config.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/action/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer b/action/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer deleted file mode 100644 index 4a0582c992..0000000000 --- a/action/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.mojarra.action.ActionInitializer diff --git a/cdi/pom.xml b/cdi/pom.xml deleted file mode 100644 index 8cf5c9df33..0000000000 --- a/cdi/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - 4.0.0 - - - org.glassfish - mojarra-parent - 4.0.9-SNAPSHOT - - - org.eclipse.mojarra - mojarra-cdi - jar - - Mojarra ${project.version} - CDI - - - - jakarta.enterprise - jakarta.enterprise.cdi-api - 4.0.0 - provided - - - org.glassfish - jakarta.faces - ${project.version} - provided - - - diff --git a/cdi/src/main/java/org/eclipse/mojarra/cdi/CdiLifecycleFactory.java b/cdi/src/main/java/org/eclipse/mojarra/cdi/CdiLifecycleFactory.java deleted file mode 100644 index 63280c0613..0000000000 --- a/cdi/src/main/java/org/eclipse/mojarra/cdi/CdiLifecycleFactory.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.cdi; - -import jakarta.enterprise.inject.literal.NamedLiteral; -import jakarta.enterprise.inject.spi.AnnotatedType; -import jakarta.enterprise.inject.spi.Bean; -import jakarta.enterprise.inject.spi.BeanManager; -import jakarta.enterprise.inject.spi.CDI; -import jakarta.faces.lifecycle.Lifecycle; -import jakarta.faces.lifecycle.LifecycleFactory; -import jakarta.inject.Named; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.Set; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -/** - * The CDI LifecycleFactory. - * - *

- * This factory makes it possible for your CDI implementation to determine - * which Lifecycle to use when a Lifecycle is requested. - * - * @since 4.0 - */ -public class CdiLifecycleFactory extends LifecycleFactory { - - /** - * Constructor. - * - * @param wrapped the wrapped LifecycleFactory. - */ - public CdiLifecycleFactory(LifecycleFactory wrapped) { - super(wrapped); - } - - @Override - public void addLifecycle(String lifecycleId, Lifecycle lifecycle) { - // because we are using CDI to manage our lifecycles this is a no-op. - } - - @Override - public Lifecycle getLifecycle(String lifecycleId) { - Lifecycle result = null; - if (lifecycleId.equals(LifecycleFactory.DEFAULT_LIFECYCLE)) { - result = getWrapped().getLifecycle(lifecycleId); - } else { - BeanManager beanManager = getBeanManager(); - AnnotatedType type = beanManager.createAnnotatedType(Lifecycle.class); - Set> beans = beanManager.getBeans(type.getBaseType(), NamedLiteral.of(lifecycleId)); - Iterator> iterator = beans.iterator(); - while (iterator.hasNext()) { - Bean bean = iterator.next(); - Named named = bean.getBeanClass().getAnnotation(Named.class); - if (named.value().equals(lifecycleId)) { - result = (Lifecycle) CDI.current().select(named).get(); - break; - } - } - } - return result; - } - - /** - * Get the bean manager, either from 'java:comp/BeanManager' or - * 'java:comp/env/BeanManager'. - * - * @return the bean manager. - */ - private BeanManager getBeanManager() { - BeanManager beanManager = null; - try { - InitialContext initialContext = new InitialContext(); - beanManager = (BeanManager) initialContext.lookup("java:comp/BeanManager"); - } catch (NamingException ne) { - } - if (beanManager == null) { - try { - InitialContext initialContext = new InitialContext(); - beanManager = (BeanManager) initialContext.lookup("java:comp/env/BeanManager"); - } catch (NamingException ne) { - } - } - return beanManager; - } - - @Override - public Iterator getLifecycleIds() { - ArrayList lifecycleIds = new ArrayList<>(); - getWrapped().getLifecycleIds().forEachRemaining(lifecycleIds::add); - BeanManager beanManager = getBeanManager(); - AnnotatedType type = beanManager.createAnnotatedType(Lifecycle.class); - Set> beans = beanManager.getBeans(type.getBaseType()); - Iterator> iterator = beans.iterator(); - while (iterator.hasNext()) { - Bean bean = iterator.next(); - if (bean.getBeanClass().isAnnotationPresent(Named.class)) { - Named named = bean.getBeanClass().getAnnotation(Named.class); - lifecycleIds.add(named.value()); - } - } - return lifecycleIds.iterator(); - } -} diff --git a/cdi/src/main/java/org/eclipse/mojarra/cdi/CdiRenderKitFactory.java b/cdi/src/main/java/org/eclipse/mojarra/cdi/CdiRenderKitFactory.java deleted file mode 100644 index c39d573f88..0000000000 --- a/cdi/src/main/java/org/eclipse/mojarra/cdi/CdiRenderKitFactory.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.cdi; - -import jakarta.enterprise.inject.literal.NamedLiteral; -import jakarta.enterprise.inject.spi.AnnotatedType; -import jakarta.enterprise.inject.spi.Bean; -import jakarta.enterprise.inject.spi.BeanManager; -import jakarta.enterprise.inject.spi.CDI; -import jakarta.faces.context.FacesContext; -import jakarta.faces.render.RenderKit; -import jakarta.faces.render.RenderKitFactory; -import jakarta.inject.Named; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.Set; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -/** - * The CDI RenderKitFactory. - * - *

- * This factory makes it possible for your CDI implementation to determine - * which RenderKit to use when a RenderKit is requested. - * - * @since 4.0 - */ -public class CdiRenderKitFactory extends RenderKitFactory { - - /** - * Stores the BeanManager. - */ - public BeanManager beanManager; - - /** - * Constructor. - */ - public CdiRenderKitFactory() { - } - - /** - * Constructor. - * - * @param wrapped the wrapped RenderKitFactory. - */ - public CdiRenderKitFactory(RenderKitFactory wrapped) { - super(wrapped); - try { - InitialContext initialContext = new InitialContext(); - beanManager = (BeanManager) initialContext.lookup("java:comp/BeanManager"); - } catch (NamingException ne) { - } - if (beanManager == null) { - try { - InitialContext initialContext = new InitialContext(); - beanManager = (BeanManager) initialContext.lookup("java:comp/env/BeanManager"); - } catch (NamingException ne) { - } - } - } - - @Override - public void addRenderKit(String renderKitId, RenderKit renderKit) { - // because we are using CDI to manage our render-kits this is a no-op. - } - - @Override - public RenderKit getRenderKit(FacesContext facesContext, String renderKitId) { - RenderKit result = null; - if (renderKitId.equals(RenderKitFactory.HTML_BASIC_RENDER_KIT)) { - result = getWrapped().getRenderKit(facesContext, renderKitId); - } else { - AnnotatedType type = beanManager.createAnnotatedType(RenderKit.class); - Set> beans = beanManager.getBeans(type.getBaseType(), NamedLiteral.of(renderKitId)); - Iterator> iterator = beans.iterator(); - while (iterator.hasNext()) { - Bean bean = iterator.next(); - Named named = bean.getBeanClass().getAnnotation(Named.class); - if (named.value().equals(renderKitId)) { - result = (RenderKit) CDI.current().select(named).get(); - break; - } - } - } - return result; - } - - @Override - public Iterator getRenderKitIds() { - ArrayList renderKitIds = new ArrayList<>(); - getWrapped().getRenderKitIds().forEachRemaining(renderKitIds::add); - AnnotatedType type = beanManager.createAnnotatedType(RenderKit.class); - Set> beans = beanManager.getBeans(type.getBaseType()); - Iterator> iterator = beans.iterator(); - while (iterator.hasNext()) { - Bean bean = iterator.next(); - if (bean.getBeanClass().isAnnotationPresent(Named.class)) { - Named named = bean.getBeanClass().getAnnotation(Named.class); - renderKitIds.add(named.value()); - } - } - return renderKitIds.iterator(); - } -} diff --git a/cdi/src/main/resources/META-INF/beans.xml b/cdi/src/main/resources/META-INF/beans.xml deleted file mode 100644 index d620baae68..0000000000 --- a/cdi/src/main/resources/META-INF/beans.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/cdi/src/main/resources/META-INF/faces-config.xml b/cdi/src/main/resources/META-INF/faces-config.xml deleted file mode 100644 index 189ff1fca5..0000000000 --- a/cdi/src/main/resources/META-INF/faces-config.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - org.eclipse.mojarra.cdi.CdiLifecycleFactory - - diff --git a/faces b/faces new file mode 160000 index 0000000000..da51542ec2 --- /dev/null +++ b/faces @@ -0,0 +1 @@ +Subproject commit da51542ec25dac448045112d6b67df1d38ac558a diff --git a/impl/pom.xml b/impl/pom.xml index 54e0caf3e0..e0dca82803 100644 --- a/impl/pom.xml +++ b/impl/pom.xml @@ -1,7 +1,7 @@ + + jakarta.faces + jakarta.faces-api + ${project.version} + + jakarta.servlet jakarta.servlet-api - 6.0.0 + 6.1.0 provided jakarta.websocket jakarta.websocket-api - 2.1.0 + 2.2.0 provided jakarta.websocket jakarta.websocket-client-api - 2.1.0 + 2.2.0 provided jakarta.el jakarta.el-api - 5.0.0 + 6.0.0 provided jakarta.enterprise jakarta.enterprise.cdi-api - 4.0.0 + 4.1.0 + provided + + + + jakarta.enterprise + jakarta.enterprise.cdi-el-api + 4.1.0 provided jakarta.validation jakarta.validation-api - 3.0.1 + 3.1.0 provided @@ -95,7 +106,7 @@ jakarta.transaction jakarta.transaction-api - 2.0.1-RC1 + 2.0.1 provided true @@ -103,7 +114,7 @@ jakarta.json jakarta.json-api - 2.1.0 + 2.1.3 provided true @@ -111,7 +122,7 @@ jakarta.ejb jakarta.ejb-api - 4.0.0 + 4.0.1 provided true @@ -119,7 +130,7 @@ jakarta.persistence jakarta.persistence-api - 3.1.0 + 3.2.0 provided true @@ -127,7 +138,7 @@ jakarta.xml.ws jakarta.xml.ws-api - 4.0.0 + 4.0.2 provided true @@ -135,7 +146,7 @@ jakarta.annotation jakarta.annotation-api - 2.1.0 + 3.0.0 @@ -144,7 +155,7 @@ org.glassfish.expressly expressly - 5.0.0-M1 + 6.0.0-M1 test @@ -177,9 +188,9 @@ - org.hibernate + org.hibernate.validator hibernate-validator - 8.0.0.Final + 8.0.1.Final test @@ -207,65 +218,36 @@ - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - net.alchim31.maven - yuicompressor-maven-plugin - [1.5,) - - compress - - - - - false - - - - - - - - + - net.alchim31.maven - yuicompressor-maven-plugin - 1.5.1 + com.github.blutorange + closure-compiler-maven-plugin + 2.30.0 + minify-faces-js generate-sources - compress + minify - true - true - - - - ${project.basedir}/src/main/resources/META-INF/resources/jakarta.faces/faces-uncompressed.js - - ${project.build.directory}/generated-resources/yui/faces.js - - + UTF-8 + + ${project.basedir}/src/main/resources/META-INF/resources/ + ${project.build.directory}/generated-resources/minified/META-INF/resources/ + jakarta.faces + jakarta.faces - *.js + faces-uncompressed.js - ${project.build.directory}/generated-resources/yui - ${project.build.directory}/generated-resources/yui/META-INF/resources/jakarta.faces/ + #{path}/faces.js + true + NO_TRANSPILE @@ -276,7 +258,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.3.0 + 3.5.0 generate-resources @@ -287,7 +269,7 @@ - ${project.build.directory}/generated-resources/yui + ${project.build.directory}/generated-resources/minified @@ -296,9 +278,8 @@ - org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M5 + 3.2.5 false --add-opens java.base/java.lang=ALL-UNNAMED @@ -310,8 +291,7 @@ org.apache.felix maven-bundle-plugin - 5.1.4 - true + 5.1.9 bundle-manifest @@ -326,10 +306,10 @@ org.glassfish.jakarta.faces ${project.version} Mojarra Faces Implementation ${project.version} - Eclipse Faces Implementation (jakarta.faces/4.0) ${project.version} + Eclipse Faces Implementation (jakarta.faces/4.1) ${project.version} Jakarta Faces - 4.0 + 4.1 Mojarra ${project.version} @@ -386,15 +366,15 @@ resolution:=optional;cardinality:=multiple, osgi.extender;filter:="(osgi.extender=osgi.serviceloader.processor)";resolution:=optional + <_noimportjava>true + <_runee>JavaSE-17 - org.apache.maven.plugins maven-jar-plugin - 3.2.2 ${project.build.outputDirectory}/META-INF/MANIFEST.MF @@ -408,9 +388,7 @@ - org.apache.maven.plugins maven-source-plugin - 3.2.1 attach-sources @@ -425,9 +403,7 @@ Create Javadoc for API jar --> - org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 attach-javadocs diff --git a/impl/src/main/java/com/sun/faces/application/ActionListenerImpl.java b/impl/src/main/java/com/sun/faces/application/ActionListenerImpl.java index 45a9fa707d..8a4f7cb82d 100644 --- a/impl/src/main/java/com/sun/faces/application/ActionListenerImpl.java +++ b/impl/src/main/java/com/sun/faces/application/ActionListenerImpl.java @@ -28,7 +28,6 @@ import jakarta.faces.FacesException; import jakarta.faces.application.NavigationHandler; import jakarta.faces.component.ActionSource; -import jakarta.faces.component.ActionSource2; import jakarta.faces.component.UIComponent; import jakarta.faces.context.FacesContext; import jakarta.faces.event.ActionEvent; @@ -57,7 +56,7 @@ public void processAction(ActionEvent event) { UIComponent source = event.getComponent(); FacesContext context = event.getFacesContext(); - MethodExpression expression = ((ActionSource2) source).getActionExpression(); + MethodExpression expression = ((ActionSource) source).getActionExpression(); invokeNavigationHandling(context, source, expression, getNavigationOutcome(context, expression)); @@ -78,7 +77,7 @@ private String getNavigationOutcome(FacesContext context, MethodExpression expre return invokeResult.toString(); } catch (ELException | NullPointerException e) { - LOGGER.log(FINE, e, () -> e.getMessage()); + LOGGER.log(FINE, e, e::getMessage); throw new FacesException(expression.getExpressionString() + ": " + e.getMessage(), e); } diff --git a/impl/src/main/java/com/sun/faces/application/ApplicationAssociate.java b/impl/src/main/java/com/sun/faces/application/ApplicationAssociate.java index 761b51a466..b5d6b3a6ac 100644 --- a/impl/src/main/java/com/sun/faces/application/ApplicationAssociate.java +++ b/impl/src/main/java/com/sun/faces/application/ApplicationAssociate.java @@ -18,10 +18,6 @@ import static com.sun.faces.RIConstants.FACES_CONFIG_VERSION; import static com.sun.faces.RIConstants.FACES_PREFIX; -import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.AutomaticExtensionlessMapping; -import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.FaceletsSkipComments; -import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.FaceletsDecorators; -import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.FaceletsDefaultRefreshPeriod; import static com.sun.faces.el.ELUtils.buildFacesResolver; import static com.sun.faces.el.FacesCompositeELResolver.ELResolverChainType.Faces; import static com.sun.faces.facelets.util.ReflectionUtil.forName; @@ -29,13 +25,10 @@ import static com.sun.faces.util.MessageUtils.getExceptionMessageString; import static com.sun.faces.util.Util.getFacesConfigXmlVersion; import static com.sun.faces.util.Util.getFacesServletRegistration; -import static com.sun.faces.util.Util.split; import static jakarta.faces.FactoryFinder.FACELET_CACHE_FACTORY; import static jakarta.faces.FactoryFinder.FLOW_HANDLER_FACTORY; import static jakarta.faces.application.ProjectStage.Development; -import static jakarta.faces.application.ProjectStage.Production; import static jakarta.faces.application.ViewVisitOption.RETURN_AS_MINIMAL_IMPLICIT_OUTCOME; -import static java.lang.Long.parseLong; import static java.util.Collections.emptyList; import static java.util.Collections.emptyMap; import static java.util.logging.Level.FINE; @@ -61,7 +54,6 @@ import com.sun.faces.application.resource.ResourceManager; import com.sun.faces.component.search.SearchExpressionHandlerImpl; import com.sun.faces.config.ConfigManager; -import com.sun.faces.config.WebConfiguration; import com.sun.faces.el.DemuxCompositeELResolver; import com.sun.faces.facelets.compiler.Compiler; import com.sun.faces.facelets.compiler.SAXCompiler; @@ -85,6 +77,7 @@ import jakarta.el.ExpressionFactory; import jakarta.faces.FacesException; import jakarta.faces.FactoryFinder; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.application.Application; import jakarta.faces.application.NavigationCase; import jakarta.faces.application.ViewHandler; @@ -119,14 +112,14 @@ public class ApplicationAssociate { private final static String FacesComponentJcpNamespace = "http://xmlns.jcp.org/jsf/component"; - private ApplicationImpl applicationImpl; + private final ApplicationImpl applicationImpl; /** * Overall Map containing from-view-id key and Set of NavigationCase objects for * that key; The from-view-id strings in this map will be stored as specified in the configuration file - * some of them will have a trailing asterisk "*" signifying wild card, and some may be specified as an asterisk "*". */ - private Map> navigationMap; + private final Map> navigationMap; /* * The FacesComponentTagLibrary uses the information in this map to help it fabricate tag handlers for components @@ -139,43 +132,36 @@ public class ApplicationAssociate { private static final String ASSOCIATE_KEY = RIConstants.FACES_PREFIX + "ApplicationAssociate"; - private static ThreadLocal instance = new ThreadLocal<>() { - @Override - protected ApplicationAssociate initialValue() { - return null; - } - }; + private static final ThreadLocal instance = ThreadLocal.withInitial(() -> null); private List elResolversFromFacesConfig; private ExpressionFactory expressionFactory; - private InjectionProvider injectionProvider; + private final InjectionProvider injectionProvider; private ResourceCache resourceCache; private String contextName; private boolean requestServiced; private boolean errorPagePresent; - private AnnotationManager annotationManager; - private boolean devModeEnabled; + private final AnnotationManager annotationManager; + private final boolean devModeEnabled; private Compiler compiler; private DefaultFaceletFactory faceletFactory; private ResourceManager resourceManager; - private ApplicationStateInfo applicationStateInfo; + private final ApplicationStateInfo applicationStateInfo; - private PropertyEditorHelper propertyEditorHelper; + private final PropertyEditorHelper propertyEditorHelper; - private NamedEventManager namedEventManager; - - private WebConfiguration webConfig; + private final NamedEventManager namedEventManager; private FlowHandler flowHandler; private SearchExpressionHandler searchExpressionHandler; - private Map definingDocumentIdsToTruncatedJarUrls; + private final Map definingDocumentIdsToTruncatedJarUrls; - private long timeOfInstantiation; + private final long timeOfInstantiation; private Map> resourceLibraryContracts; @@ -249,7 +235,6 @@ public ApplicationAssociate(ApplicationImpl appImpl) { navigationMap = new ConcurrentHashMap<>(); injectionProvider = (InjectionProvider) facesContext.getAttributes().get(ConfigManager.INJECTION_PROVIDER_KEY); - webConfig = WebConfiguration.getInstance(externalContext); annotationManager = new AnnotationManager(); @@ -317,7 +302,7 @@ public void processEvent(SystemEvent event) { String facesConfigVersion = getFacesConfigXmlVersion(context); context.getExternalContext().getApplicationMap().put(FACES_CONFIG_VERSION, facesConfigVersion); - if (webConfig.isOptionEnabled(AutomaticExtensionlessMapping)) { + if (ContextParam.AUTOMATIC_EXTENSIONLESS_MAPPING.isSet(context)) { getFacesServletRegistration(context) .ifPresent(registration -> viewHandler.getViews(context, "/", RETURN_AS_MINIMAL_IMPLICIT_OUTCOME) @@ -335,9 +320,8 @@ public void initializeFacelets() { FacesContext ctx = FacesContext.getCurrentInstance(); - Map appMap = ctx.getExternalContext().getApplicationMap(); - compiler = createCompiler(appMap, webConfig); - faceletFactory = createFaceletFactory(ctx, compiler, webConfig); + compiler = createCompiler(ctx); + faceletFactory = createFaceletFactory(ctx, compiler); } public long getTimeOfInstantiation() { @@ -636,20 +620,10 @@ public void relateUrlToDefiningDocumentInJar(URL url, String definingDocumentId) definingDocumentIdsToTruncatedJarUrls.put(definingDocumentId, candidate); } - protected DefaultFaceletFactory createFaceletFactory(FacesContext context, Compiler compiler, WebConfiguration webConfig) { + protected DefaultFaceletFactory createFaceletFactory(FacesContext context, Compiler compiler) { // refresh period - boolean isProduction = applicationImpl.getProjectStage() == Production; - String refreshPeriod; - if (webConfig.isSet(FaceletsDefaultRefreshPeriod)) { - refreshPeriod = webConfig.getOptionValue(FaceletsDefaultRefreshPeriod); - } else if (isProduction) { - refreshPeriod = "-1"; - } else { - refreshPeriod = FaceletsDefaultRefreshPeriod.getDefaultValue(); - } - - long period = parseLong(refreshPeriod); + int period = ContextParam.FACELETS_REFRESH_PERIOD.getValue(context); // resource resolver DefaultResourceResolver resolver = new DefaultResourceResolver(applicationImpl.getResourceHandler()); @@ -663,35 +637,33 @@ protected DefaultFaceletFactory createFaceletFactory(FacesContext context, Compi return toReturn; } - protected Compiler createCompiler(Map appMap, WebConfiguration webConfig) { + protected Compiler createCompiler(FacesContext context) { Compiler newCompiler = new SAXCompiler(); - loadDecorators(appMap, newCompiler); + loadDecorators(context, newCompiler); // Skip params? - newCompiler.setTrimmingComments(webConfig.isOptionEnabled(FaceletsSkipComments)); + newCompiler.setTrimmingComments(ContextParam.FACELETS_SKIP_COMMENTS.isSet(context)); addTagLibraries(newCompiler); return newCompiler; } - protected void loadDecorators(Map appMap, Compiler newCompiler) { - String decoratorsParamValue = webConfig.getOptionValue(FaceletsDecorators); + protected void loadDecorators(FacesContext context, Compiler newCompiler) { + String[] decorators = ContextParam.FACELETS_DECORATORS.getValue(context); - if (decoratorsParamValue != null) { - for (String decorator : split(appMap, decoratorsParamValue.trim(), ";")) { - try { - newCompiler - .addTagDecorator((TagDecorator) forName(decorator).getDeclaredConstructor().newInstance()); + for (String decorator : decorators) { + try { + newCompiler + .addTagDecorator((TagDecorator) forName(decorator).getDeclaredConstructor().newInstance()); - if (LOGGER.isLoggable(FINE)) { - LOGGER.log(FINE, "Successfully Loaded Decorator: {0}", decorator); - } - } catch (ReflectiveOperationException | IllegalArgumentException | SecurityException e) { - if (LOGGER.isLoggable(SEVERE)) { - LOGGER.log(SEVERE, "Error Loading Decorator: " + decorator, e); - } + if (LOGGER.isLoggable(FINE)) { + LOGGER.log(FINE, "Successfully Loaded Decorator: {0}", decorator); + } + } catch (ReflectiveOperationException | IllegalArgumentException | SecurityException e) { + if (LOGGER.isLoggable(SEVERE)) { + LOGGER.log(SEVERE, "Error Loading Decorator: " + decorator, e); } } } diff --git a/impl/src/main/java/com/sun/faces/application/ApplicationStateInfo.java b/impl/src/main/java/com/sun/faces/application/ApplicationStateInfo.java index b34e108231..5a8a590629 100644 --- a/impl/src/main/java/com/sun/faces/application/ApplicationStateInfo.java +++ b/impl/src/main/java/com/sun/faces/application/ApplicationStateInfo.java @@ -23,8 +23,12 @@ import java.util.HashSet; import java.util.Set; +import java.util.logging.Logger; import com.sun.faces.config.WebConfiguration; +import com.sun.faces.util.FacesLogger; + +import jakarta.faces.application.StateManager; /** * This class maintains per-application information pertaining to partail or full state saving as a whole or partial @@ -32,7 +36,9 @@ */ public class ApplicationStateInfo { - private boolean partialStateSaving; + private static final Logger LOGGER = FacesLogger.APPLICATION.getLogger(); + + private final boolean partialStateSaving; private Set fullStateViewIds; // ------------------------------------------------------------ Constructors @@ -47,6 +53,10 @@ public ApplicationStateInfo() { fullStateViewIds = new HashSet<>(viewIds.length, 1.0f); fullStateViewIds.addAll(asList(viewIds)); } + else { + LOGGER.warning("The configuration '" + StateManager.PARTIAL_STATE_SAVING_PARAM_NAME + + "' is deprecated as of Faces 4.1 and should not longer be used."); + } } diff --git a/impl/src/main/java/com/sun/faces/application/ByteArrayWebOutputStream.java b/impl/src/main/java/com/sun/faces/application/ByteArrayWebOutputStream.java index 739834efb5..87bdc36ebe 100644 --- a/impl/src/main/java/com/sun/faces/application/ByteArrayWebOutputStream.java +++ b/impl/src/main/java/com/sun/faces/application/ByteArrayWebOutputStream.java @@ -45,7 +45,7 @@ class ByteArrayWebOutputStream extends ServletOutputStream { // Log instance for this class private static final Logger LOGGER = FacesLogger.APPLICATION.getLogger(); - private DirectByteArrayOutputStream baos; + private final DirectByteArrayOutputStream baos; private boolean committed; public ByteArrayWebOutputStream() { diff --git a/impl/src/main/java/com/sun/faces/application/ConverterPropertyEditorFactory.java b/impl/src/main/java/com/sun/faces/application/ConverterPropertyEditorFactory.java index 9f9d08b41d..373a6ed9e5 100644 --- a/impl/src/main/java/com/sun/faces/application/ConverterPropertyEditorFactory.java +++ b/impl/src/main/java/com/sun/faces/application/ConverterPropertyEditorFactory.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -25,8 +26,6 @@ import java.io.IOException; import java.io.InputStream; import java.lang.ref.WeakReference; -import java.security.AccessController; -import java.security.PrivilegedAction; import java.util.HashMap; import java.util.Map; import java.util.TreeSet; @@ -116,7 +115,7 @@ public int compareTo(Utf8InfoReplacement rhs) { // The source template class on which to base the definition of the new // PropertyEditor classes. - private Class templateClass; + private final Class templateClass; // The bytes that define the source template class. private byte[] templateBytes; // The constant_pool_count from the template class bytecodes. @@ -339,7 +338,7 @@ private byte[] replaceInTemplate(Utf8InfoReplacement... replacements) { */ public byte[] generateClassBytesFor(String newClassName, String targetClassName) { return replaceInTemplate(new Utf8InfoReplacement(classNameConstant, newClassName), - new Utf8InfoReplacement(classNameRefConstant, new StringBuilder(32).append('L').append(newClassName).append(';').toString()), + new Utf8InfoReplacement(classNameRefConstant, 'L' + newClassName + ';'), new Utf8InfoReplacement(targetClassConstant, targetClassName)); } } @@ -359,9 +358,9 @@ public byte[] generateClassBytesFor(String newClassName, String targetClassName) */ private class DisposableClassLoader extends ClassLoader { // The class loader which loaded the target class. - private ClassLoader targetLoader; + private final ClassLoader targetLoader; // The class loader which loaded the base class - private ClassLoader myLoader; + private final ClassLoader myLoader; public DisposableClassLoader(ClassLoader targetLoader) { super(targetLoader); @@ -437,7 +436,7 @@ protected Class findClass(String className) throws ClassNotFoundException { private static final Pattern MultipleUnderscorePattern = Pattern.compile("_(_+)"); private static ConverterPropertyEditorFactory defaultInstance; // Template information extracted from the source template class. - private ClassTemplateInfo templateInfo; + private final ClassTemplateInfo templateInfo; // Cache of DisposableClassLoaders keyed on the class loader of the target. private Map> classLoaderCache; @@ -507,14 +506,10 @@ public Class definePropertyEditorClassFor DisposableClassLoader loader; WeakReference loaderRef = classLoaderCache.get(targetClass.getClassLoader()); if (loaderRef == null || (loader = loaderRef.get()) == null) { - loader = (DisposableClassLoader) AccessController.doPrivileged((PrivilegedAction) () -> new DisposableClassLoader(targetClass.getClassLoader())); - - if (loader == null) { - return null; - } - + loader = new DisposableClassLoader(targetClass.getClassLoader()); classLoaderCache.put(targetClass.getClassLoader(), new WeakReference<>(loader)); } + return (Class) loader.loadClass(className); } catch (ClassNotFoundException e) { if (LOGGER.isLoggable(WARNING)) { diff --git a/impl/src/main/java/com/sun/faces/application/JavaFlowLoaderHelper.java b/impl/src/main/java/com/sun/faces/application/JavaFlowLoaderHelper.java index 99d95114de..051c06dc88 100644 --- a/impl/src/main/java/com/sun/faces/application/JavaFlowLoaderHelper.java +++ b/impl/src/main/java/com/sun/faces/application/JavaFlowLoaderHelper.java @@ -16,7 +16,6 @@ package com.sun.faces.application; -import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.ClientWindowMode; import static com.sun.faces.util.Util.getCdiBeanManager; import static java.util.logging.Level.SEVERE; import static java.util.logging.Level.WARNING; @@ -32,12 +31,13 @@ import jakarta.enterprise.inject.spi.BeanManager; import jakarta.enterprise.inject.spi.Producer; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.context.FacesContext; import jakarta.faces.flow.Flow; import jakarta.faces.flow.FlowHandler; import jakarta.faces.flow.builder.FlowDefinition; -class JavaFlowLoaderHelper { +public class JavaFlowLoaderHelper { private static final Logger LOGGER = FacesLogger.APPLICATION.getLogger(); @@ -70,24 +70,26 @@ synchronized void loadFlows(FacesContext context, FlowHandler flowHandler) throw } } - private void enableClientWindowModeIfNecessary(FacesContext context) { - WebConfiguration config = WebConfiguration.getInstance(context.getExternalContext()); - - String optionValue = config.getOptionValue(ClientWindowMode); + public static void enableClientWindowModeIfNecessary(FacesContext context) { + String optionValue = ContextParam.CLIENT_WINDOW_MODE.getValue(context); boolean clientWindowNeedsEnabling = false; if ("none".equals(optionValue)) { clientWindowNeedsEnabling = true; LOGGER.log(WARNING, "{0} was set to none, but Faces Flows requires {0} is enabled. Setting to ''url''.", - new Object[] { ClientWindowMode.getQualifiedName() }); + new Object[] { ContextParam.CLIENT_WINDOW_MODE.getName() }); } else if (optionValue == null) { clientWindowNeedsEnabling = true; } if (clientWindowNeedsEnabling) { - config.setOptionValue(ClientWindowMode, "url"); + context.getExternalContext().getApplicationMap().put(JavaFlowLoaderHelper.class.getName(), Boolean.TRUE); } } + + public static boolean isClientWindowModeForciblyEnabled(FacesContext context) { + return context.getExternalContext().getApplicationMap().get(JavaFlowLoaderHelper.class.getName()) == Boolean.TRUE; + } } diff --git a/impl/src/main/java/com/sun/faces/application/NamedEventManager.java b/impl/src/main/java/com/sun/faces/application/NamedEventManager.java index 1dea5a5230..7d28fdef9d 100644 --- a/impl/src/main/java/com/sun/faces/application/NamedEventManager.java +++ b/impl/src/main/java/com/sun/faces/application/NamedEventManager.java @@ -38,8 +38,8 @@ */ public class NamedEventManager { - private Map> namedEvents = new ConcurrentHashMap<>(); - private Map>> duplicateNames = new ConcurrentHashMap<>(); + private final Map> namedEvents = new ConcurrentHashMap<>(); + private final Map>> duplicateNames = new ConcurrentHashMap<>(); public NamedEventManager() { namedEvents.put("jakarta.faces.event.PreRenderComponent", PreRenderComponentEvent.class); @@ -81,12 +81,8 @@ public Class getNamedEvent(String name) { public void addDuplicateName(String name, Class event) { Class registeredEvent = namedEvents.remove(name); - Set> events = duplicateNames.get(name); + Set> events = duplicateNames.computeIfAbsent(name, k -> new HashSet<>()); - if (events == null) { - events = new HashSet<>(); - duplicateNames.put(name, events); - } events.add(event); if (registeredEvent != null) { diff --git a/impl/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java b/impl/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java index 106ae7f8ad..2eb54c03e5 100644 --- a/impl/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java +++ b/impl/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java @@ -23,7 +23,6 @@ import static jakarta.faces.flow.FlowHandler.FLOW_ID_REQUEST_PARAM_NAME; import static jakarta.faces.flow.FlowHandler.NULL_FLOW; import static jakarta.faces.flow.FlowHandler.TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME; -import static java.util.Arrays.asList; import static java.util.logging.Level.FINE; import java.util.AbstractCollection; @@ -58,9 +57,9 @@ import jakarta.el.MethodExpression; import jakarta.el.ValueExpression; import jakarta.faces.FacesException; -import jakarta.faces.application.ConfigurableNavigationHandler; import jakarta.faces.application.FacesMessage; import jakarta.faces.application.NavigationCase; +import jakarta.faces.application.NavigationHandler; import jakarta.faces.application.ViewHandler; import jakarta.faces.component.UIViewRoot; import jakarta.faces.context.ExternalContext; @@ -84,7 +83,7 @@ * 7.4.2 of the specification for more details. PENDING: Make independent of ApplicationAssociate. */ -public class NavigationHandlerImpl extends ConfigurableNavigationHandler { +public class NavigationHandlerImpl extends NavigationHandler { // Private Constants private static final String RESET_FLOW_HANDLER_STATE_KEY = NavigationHandlerImpl.class.getName() + "_RESET_FLOW_HANDLER_STATE_KEY"; @@ -143,10 +142,8 @@ public NavigationHandlerImpl() { } - // ------------------------------ Methods from ConfigurableNavigationHandler - /** - * @see jakarta.faces.application.ConfigurableNavigationHandler#getNavigationCase(jakarta.faces.context.FacesContext, + * @see jakarta.faces.application.NavigationHandler#getNavigationCase(jakarta.faces.context.FacesContext, * String, String) */ @Override @@ -173,7 +170,7 @@ public NavigationCase getNavigationCase(FacesContext context, String fromAction, } /** - * @see jakarta.faces.application.ConfigurableNavigationHandler#getNavigationCases() + * @see jakarta.faces.application.NavigationHandler#getNavigationCases() */ @Override public Map> getNavigationCases() { @@ -256,8 +253,8 @@ public void handleNavigation(FacesContext context, String fromAction, String out // If we are exiting all flows if (caseStruct.newFlow == null) { // NOPMD - parameters.put(TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME, asList(NULL_FLOW)); - parameters.put(FLOW_ID_REQUEST_PARAM_NAME, asList("")); + parameters.put(TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME, List.of(NULL_FLOW)); + parameters.put(FLOW_ID_REQUEST_PARAM_NAME, List.of("")); FlowHandler flowHandler = context.getApplication().getFlowHandler(); if (flowHandler instanceof FlowHandlerImpl) { @@ -272,10 +269,10 @@ public void handleNavigation(FacesContext context, String fromAction, String out if (!parameters.containsKey(TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME) || !parameters.containsKey(FLOW_ID_REQUEST_PARAM_NAME)) { // Overwrite both of them. - List toFlowDocumentIdParam = asList(caseStruct.navCase.getToFlowDocumentId()); + List toFlowDocumentIdParam = Collections.singletonList(caseStruct.navCase.getToFlowDocumentId()); parameters.put(TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME, toFlowDocumentIdParam); - List flowIdParam = asList(caseStruct.newFlow.getId()); + List flowIdParam = Collections.singletonList(caseStruct.newFlow.getId()); parameters.put(FLOW_ID_REQUEST_PARAM_NAME, flowIdParam); } } @@ -866,8 +863,8 @@ private CaseStruct findImplicitMatch(FacesContext context, String viewId, String Map appMap = context.getExternalContext().getApplicationMap(); String[] queryElements = Util.split(appMap, queryString, "&|&"); - for (int i = 0, len = queryElements.length; i < len; i++) { - String[] elements = Util.split(appMap, queryElements[i], "=", 2); + for (String queryElement : queryElements) { + String[] elements = Util.split(appMap, queryElement, "=", 2); if (elements.length == 2) { String rightHandSide = elements[1]; String sanitized = null != rightHandSide && 2 < rightHandSide.length() ? rightHandSide.trim() : ""; @@ -877,19 +874,13 @@ private CaseStruct findImplicitMatch(FacesContext context, String viewId, String } rightHandSide = ""; } + if (parameters == null) { - parameters = new LinkedHashMap<>(len / 2, 1.0f); - List values = new ArrayList<>(2); - values.add(rightHandSide); - parameters.put(elements[0], values); - } else { - List values = parameters.get(elements[0]); - if (values == null) { - values = new ArrayList<>(2); - parameters.put(elements[0], values); - } - values.add(rightHandSide); + parameters = new LinkedHashMap<>(queryElements.length / 2, 1.0f); } + + parameters.computeIfAbsent(elements[0], k -> new ArrayList<>(2)) + .add(rightHandSide); } } } @@ -1278,7 +1269,7 @@ private CaseStruct findViewNodeMatch(FacesContext context, String fromAction, St Flow currentFlow = flowHandler.getCurrentFlow(context); if (null != currentFlow) { FlowNode node = currentFlow.getNode(outcome); - if (null != node && node instanceof ViewNode) { + if (node instanceof ViewNode) { result = synthesizeCaseStruct(context, currentFlow, fromAction, outcome); } } @@ -1418,8 +1409,8 @@ private static final class NavigationInfo { private static final class NavigationMap extends AbstractMap> { - private HashMap> mapToLookForNavCase = new HashMap<>(); - private TreeSet wildcardMatchList = new TreeSet<>((fromViewId1, fromViewId2) -> -fromViewId1.compareTo(fromViewId2)); + private final HashMap> mapToLookForNavCase = new HashMap<>(); + private final TreeSet wildcardMatchList = new TreeSet<>((fromViewId1, fromViewId2) -> -fromViewId1.compareTo(fromViewId2)); // ---------------------------------------------------- Methods from Map @@ -1472,11 +1463,11 @@ public void putAll(Map> m) { @Override public Set keySet() { - return new AbstractSet() { + return new AbstractSet<>() { @Override public Iterator iterator() { - return new Iterator() { + return new Iterator<>() { Iterator>> i = entrySet().iterator(); @@ -1506,11 +1497,11 @@ public int size() { @Override public Collection> values() { - return new AbstractCollection>() { + return new AbstractCollection<>() { @Override public Iterator> iterator() { - return new Iterator>() { + return new Iterator<>() { Iterator>> i = entrySet().iterator(); @@ -1540,12 +1531,12 @@ public int size() { @Override public Set>> entrySet() { - return new AbstractSet>>() { + return new AbstractSet<>() { @Override public Iterator>> iterator() { - return new Iterator>>() { + return new Iterator<>() { Iterator>> i = mapToLookForNavCase.entrySet().iterator(); diff --git a/impl/src/main/java/com/sun/faces/application/ResolversRegistry.java b/impl/src/main/java/com/sun/faces/application/ResolversRegistry.java index d50bfbe8c7..603d93cbd0 100644 --- a/impl/src/main/java/com/sun/faces/application/ResolversRegistry.java +++ b/impl/src/main/java/com/sun/faces/application/ResolversRegistry.java @@ -25,10 +25,16 @@ import jakarta.el.BeanELResolver; import jakarta.el.ListELResolver; import jakarta.el.MapELResolver; +import jakarta.el.OptionalELResolver; +import jakarta.el.RecordELResolver; import jakarta.el.ResourceBundleELResolver; +import jakarta.el.StaticFieldELResolver; public class ResolversRegistry { public final BeanELResolver BEAN_RESOLVER = new BeanELResolver(); + public final OptionalELResolver OPTIONAL_RESOLVER = new OptionalELResolver(); + public final RecordELResolver RECORD_RESOLVER = new RecordELResolver(); + public final StaticFieldELResolver STATIC_FIELD_RESOLVER = new StaticFieldELResolver(); public final ArrayELResolver ARRAY_RESOLVER = new ArrayELResolver(); public final FacesResourceBundleELResolver FACES_BUNDLE_RESOLVER = new FacesResourceBundleELResolver(); public final FlashELResolver FLASH_RESOLVER = new FlashELResolver(); diff --git a/impl/src/main/java/com/sun/faces/application/ValidateComponentNesting.java b/impl/src/main/java/com/sun/faces/application/ValidateComponentNesting.java index cb0f18db05..e4d864576f 100644 --- a/impl/src/main/java/com/sun/faces/application/ValidateComponentNesting.java +++ b/impl/src/main/java/com/sun/faces/application/ValidateComponentNesting.java @@ -23,7 +23,6 @@ import jakarta.faces.application.FacesMessage; import jakarta.faces.application.ProjectStage; import jakarta.faces.component.ActionSource; -import jakarta.faces.component.ActionSource2; import jakarta.faces.component.EditableValueHolder; import jakarta.faces.component.UIComponent; import jakarta.faces.component.UIForm; @@ -41,8 +40,8 @@ /** *

- * ValidateFormComponentNesting performs component tree validation to assure {@link ActionSource} , - * {@link ActionSource2} and {@link EditableValueHolder} components are placed inside a form. + * ValidateFormComponentNesting performs component tree validation to assure {@link ActionSource} + * and {@link EditableValueHolder} components are placed inside a form. * ValidateFormComponentNesting is installed automatically if {@link ProjectStage#Development} is active. *

* @@ -94,12 +93,12 @@ public VisitResult visit(VisitContext context, UIComponent target) { addOmittedMessage(context.getFacesContext(), target.getClientId(context.getFacesContext()), MessageUtils.MISSING_METADATA_ERROR); reportedOmittedMetadataOnce = true; - } else if (target instanceof EditableValueHolder || target instanceof ActionSource || target instanceof ActionSource2) { + } else if (target instanceof EditableValueHolder || target instanceof ActionSource) { if (reportedOmittedFormOnce) { // report first detected problem only, then stop tree walk result = VisitResult.COMPLETE; } - // if we find ActionSource, ActionSource2 or EditableValueHolder, that component + // if we find ActionSource or EditableValueHolder, that component // must be outside of a form add warning message addOmittedMessage(context.getFacesContext(), target.getClientId(context.getFacesContext()), MessageUtils.MISSING_FORM_ERROR); reportedOmittedFormOnce = true; diff --git a/impl/src/main/java/com/sun/faces/application/WebPrintWriter.java b/impl/src/main/java/com/sun/faces/application/WebPrintWriter.java index 46753ab080..634bf21d24 100644 --- a/impl/src/main/java/com/sun/faces/application/WebPrintWriter.java +++ b/impl/src/main/java/com/sun/faces/application/WebPrintWriter.java @@ -55,7 +55,7 @@ public NoOpWriter() { } @Override - public void write(char cbuf[], int off, int len) throws IOException { + public void write(char[] cbuf, int off, int len) throws IOException { // no-op } @@ -75,7 +75,7 @@ public void write(int c) throws IOException { } @Override - public void write(char cbuf[]) throws IOException { + public void write(char[] cbuf) throws IOException { // no-op } diff --git a/impl/src/main/java/com/sun/faces/application/WebappLifecycleListener.java b/impl/src/main/java/com/sun/faces/application/WebappLifecycleListener.java index f85da517f9..f1c5db813b 100644 --- a/impl/src/main/java/com/sun/faces/application/WebappLifecycleListener.java +++ b/impl/src/main/java/com/sun/faces/application/WebappLifecycleListener.java @@ -56,7 +56,7 @@ public class WebappLifecycleListener { private ServletContext servletContext; private ApplicationAssociate applicationAssociate; - private Set activeSessions = ConcurrentHashMap.newKeySet(); + private final Set activeSessions = ConcurrentHashMap.newKeySet(); // ------------------------------------------------------------ Constructors @@ -79,11 +79,9 @@ public WebappLifecycleListener(ServletContext servletContext) { public void requestInitialized(ServletRequestEvent event) { FacesContext facesContext = FacesContext.getCurrentInstance(); if (facesContext instanceof InitFacesContext) { + // NOTE: this should never happen. We should probably log a WARN line for diagnostic? InitFacesContext initFacesContext = (InitFacesContext) facesContext; - initFacesContext.releaseCurrentInstance(); - // Bug 20458755 Clean up the entry for the InitContext corresponding - // to this ServletContext - initFacesContext.removeServletContextEntryForInitContext(); + initFacesContext.release(); } ApplicationAssociate.setCurrentInstance(getAssociate()); } diff --git a/impl/src/main/java/com/sun/faces/application/annotation/AnnotationManager.java b/impl/src/main/java/com/sun/faces/application/annotation/AnnotationManager.java index c53bb58f1f..cbd0a78ed6 100644 --- a/impl/src/main/java/com/sun/faces/application/annotation/AnnotationManager.java +++ b/impl/src/main/java/com/sun/faces/application/annotation/AnnotationManager.java @@ -102,7 +102,7 @@ private enum ProcessingTarget { Renderer(RENDERER_SCANNERS), SystemEvent(EVENTS_SCANNERS); - private Scanner[] scanners; + private final Scanner[] scanners; ProcessingTarget(Scanner[] scanners) { this.scanners = scanners; @@ -113,7 +113,7 @@ private enum ProcessingTarget { /** * The backing cache for all annotation metadata. */ - private ConcurrentMap, Future, RuntimeAnnotationHandler>>> cache; + private final ConcurrentMap, Future, RuntimeAnnotationHandler>>> cache; // ------------------------------------------------------------ Constructors @@ -317,8 +317,8 @@ private static final class ProcessAnnotationsTask implements Callable, RuntimeAnnotationHandler> EMPTY = Collections.EMPTY_MAP; - private Class clazz; - private Scanner[] scanners; + private final Class clazz; + private final Scanner[] scanners; // -------------------------------------------------------- Constructors diff --git a/impl/src/main/java/com/sun/faces/application/annotation/BehaviorConfigHandler.java b/impl/src/main/java/com/sun/faces/application/annotation/BehaviorConfigHandler.java index 4875d2c2d1..d0595ce301 100644 --- a/impl/src/main/java/com/sun/faces/application/annotation/BehaviorConfigHandler.java +++ b/impl/src/main/java/com/sun/faces/application/annotation/BehaviorConfigHandler.java @@ -17,10 +17,9 @@ package com.sun.faces.application.annotation; import java.lang.annotation.Annotation; -import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; import jakarta.faces.application.Application; @@ -34,12 +33,7 @@ */ public class BehaviorConfigHandler implements ConfigAnnotationHandler { - private static final Collection> HANDLES; - static { - Collection> handles = new ArrayList<>(1); - handles.add(FacesBehavior.class); - HANDLES = Collections.unmodifiableCollection(handles); - } + private static final Collection> HANDLES = List.of(FacesBehavior.class); private Map behaviors; diff --git a/impl/src/main/java/com/sun/faces/application/annotation/ComponentConfigHandler.java b/impl/src/main/java/com/sun/faces/application/annotation/ComponentConfigHandler.java index ccd15e8686..f12cb546e1 100644 --- a/impl/src/main/java/com/sun/faces/application/annotation/ComponentConfigHandler.java +++ b/impl/src/main/java/com/sun/faces/application/annotation/ComponentConfigHandler.java @@ -17,10 +17,9 @@ package com.sun.faces.application.annotation; import java.lang.annotation.Annotation; -import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; import com.sun.faces.application.ApplicationAssociate; @@ -36,12 +35,7 @@ */ public class ComponentConfigHandler implements ConfigAnnotationHandler { - private static final Collection> HANDLES; - static { - Collection> handles = new ArrayList<>(1); - handles.add(FacesComponent.class); - HANDLES = Collections.unmodifiableCollection(handles); - } + private static final Collection> HANDLES = List.of(FacesComponent.class); // key: componentId private Map components; diff --git a/impl/src/main/java/com/sun/faces/application/annotation/DelegatedWebServiceRefScanner.java b/impl/src/main/java/com/sun/faces/application/annotation/DelegatedWebServiceRefScanner.java deleted file mode 100644 index 1eaa6b10ee..0000000000 --- a/impl/src/main/java/com/sun/faces/application/annotation/DelegatedWebServiceRefScanner.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.faces.application.annotation; - -import java.lang.annotation.Annotation; - -/** - * Scanner implementation responsible for {@link WebServiceRef} annotations. - * - *

- * Note this will delegate down to the WebServiceRefScanner so we can fail gracefully when JavaEE is not available. - *

- */ -class DelegatedWebServiceRefScanner implements Scanner { - - private Scanner delegate; - - public DelegatedWebServiceRefScanner() { - try { - delegate = new WebServiceRefScanner(); - } catch (Throwable throwable) { - throwable.printStackTrace(System.err); - } - } - - /** - * Delegate to the actual WebServiceRef scanner. - * - * @return the annotation. - */ - @Override - public Class getAnnotation() { - if (delegate != null) { - return delegate.getAnnotation(); - } - return null; - } - - /** - * Delegate to the actual EBJ scanner. - * - * @param clazz the class. - * @return the runtime annotation handler. - */ - @Override - public RuntimeAnnotationHandler scan(Class clazz) { - if (delegate != null) { - return delegate.scan(clazz); - } - return null; - } -} diff --git a/impl/src/main/java/com/sun/faces/application/annotation/EJBHandler.java b/impl/src/main/java/com/sun/faces/application/annotation/EJBHandler.java index 56092138d0..37c534fe96 100644 --- a/impl/src/main/java/com/sun/faces/application/annotation/EJBHandler.java +++ b/impl/src/main/java/com/sun/faces/application/annotation/EJBHandler.java @@ -28,10 +28,10 @@ class EJBHandler extends JndiHandler implements RuntimeAnnotationHandler { private static final String JAVA_MODULE = "java:module/"; - private Field[] fields; - private EJB[] fieldAnnotations; - private Method[] methods; - private EJB[] methodAnnotations; + private final Field[] fields; + private final EJB[] fieldAnnotations; + private final Method[] methods; + private final EJB[] methodAnnotations; public EJBHandler(Field[] fields, EJB[] fieldAnnotations, Method[] methods, EJB[] methodAnnotations) { this.fields = fields; diff --git a/impl/src/main/java/com/sun/faces/application/annotation/FacesComponentUsage.java b/impl/src/main/java/com/sun/faces/application/annotation/FacesComponentUsage.java index 8cd651863b..22caec5b3e 100644 --- a/impl/src/main/java/com/sun/faces/application/annotation/FacesComponentUsage.java +++ b/impl/src/main/java/com/sun/faces/application/annotation/FacesComponentUsage.java @@ -19,8 +19,8 @@ import jakarta.faces.component.FacesComponent; public class FacesComponentUsage { - private Class target; - private FacesComponent annotation; + private final Class target; + private final FacesComponent annotation; public FacesComponentUsage(Class target, FacesComponent annotation) { this.target = target; diff --git a/impl/src/main/java/com/sun/faces/application/annotation/ListenerForHandler.java b/impl/src/main/java/com/sun/faces/application/annotation/ListenerForHandler.java index 84d70cd670..927febf17d 100644 --- a/impl/src/main/java/com/sun/faces/application/annotation/ListenerForHandler.java +++ b/impl/src/main/java/com/sun/faces/application/annotation/ListenerForHandler.java @@ -28,7 +28,7 @@ */ class ListenerForHandler implements RuntimeAnnotationHandler { - private ListenerFor[] listenersFor; + private final ListenerFor[] listenersFor; // ------------------------------------------------------------ Constructors @@ -57,18 +57,18 @@ public void apply(FacesContext ctx, Object... params) { } if (listener instanceof ComponentSystemEventListener) { - for (int i = 0, len = listenersFor.length; i < len; i++) { - target.subscribeToEvent(listenersFor[i].systemEventClass(), (ComponentSystemEventListener) listener); + for (ListenerFor listenerFor : listenersFor) { + target.subscribeToEvent(listenerFor.systemEventClass(), (ComponentSystemEventListener) listener); } } else if (listener instanceof SystemEventListener) { Class sourceClassValue = null; Application app = ctx.getApplication(); - for (int i = 0, len = listenersFor.length; i < len; i++) { - sourceClassValue = listenersFor[i].sourceClass(); + for (ListenerFor listenerFor : listenersFor) { + sourceClassValue = listenerFor.sourceClass(); if (sourceClassValue == Void.class) { - app.subscribeToEvent(listenersFor[i].systemEventClass(), (SystemEventListener) listener); + app.subscribeToEvent(listenerFor.systemEventClass(), (SystemEventListener) listener); } else { - app.subscribeToEvent(listenersFor[i].systemEventClass(), listenersFor[i].sourceClass(), (SystemEventListener) listener); + app.subscribeToEvent(listenerFor.systemEventClass(), listenerFor.sourceClass(), (SystemEventListener) listener); } } diff --git a/impl/src/main/java/com/sun/faces/application/annotation/NamedEventConfigHandler.java b/impl/src/main/java/com/sun/faces/application/annotation/NamedEventConfigHandler.java index b720bdf102..1aeb223fbb 100644 --- a/impl/src/main/java/com/sun/faces/application/annotation/NamedEventConfigHandler.java +++ b/impl/src/main/java/com/sun/faces/application/annotation/NamedEventConfigHandler.java @@ -17,10 +17,9 @@ package com.sun.faces.application.annotation; import java.lang.annotation.Annotation; -import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; import com.sun.faces.application.ApplicationAssociate; @@ -43,14 +42,9 @@ */ public class NamedEventConfigHandler implements ConfigAnnotationHandler { - private Map, Annotation> namedEvents; - private static final Collection> HANDLES; + private static final Collection> HANDLES = List.of(NamedEvent.class); - static { - Collection> handles = new ArrayList<>(2); - handles.add(NamedEvent.class); - HANDLES = Collections.unmodifiableCollection(handles); - } + private Map, Annotation> namedEvents; @Override public Collection> getHandledAnnotations() { @@ -88,12 +82,13 @@ private void process(NamedEventManager nem, Class annotatedClass, Annotation name = name.substring(0, index); } - name = annotatedClass.getPackage().getName() + ("." + name.charAt(0)).toLowerCase() + name.substring(1); + name = annotatedClass.getPackage().getName() + '.' + Character.toLowerCase(name.charAt(0)) + name.substring(1); + nem.addNamedEvent(name, (Class) annotatedClass); String shortName = ((NamedEvent) annotation).shortName(); - if (!"".equals(shortName)) { + if ( !shortName.isEmpty() ) { if (nem.isDuplicateNamedEvent(shortName)) { nem.addDuplicateName(shortName, (Class) annotatedClass); } else { diff --git a/impl/src/main/java/com/sun/faces/application/annotation/PersistenceContextHandler.java b/impl/src/main/java/com/sun/faces/application/annotation/PersistenceContextHandler.java index 069efaab2a..bfd9af4710 100644 --- a/impl/src/main/java/com/sun/faces/application/annotation/PersistenceContextHandler.java +++ b/impl/src/main/java/com/sun/faces/application/annotation/PersistenceContextHandler.java @@ -27,10 +27,10 @@ */ class PersistenceContextHandler extends JndiHandler implements RuntimeAnnotationHandler { - private Method[] methods; - private PersistenceContext[] methodAnnotations; - private Field[] fields; - private PersistenceContext[] fieldAnnotations; + private final Method[] methods; + private final PersistenceContext[] methodAnnotations; + private final Field[] fields; + private final PersistenceContext[] fieldAnnotations; public PersistenceContextHandler(Method[] methods, PersistenceContext[] methodAnnotations, Field[] fields, PersistenceContext[] fieldAnnotations) { this.methods = methods; diff --git a/impl/src/main/java/com/sun/faces/application/annotation/PersistenceUnitHandler.java b/impl/src/main/java/com/sun/faces/application/annotation/PersistenceUnitHandler.java index 573ae3d954..644d82f4d6 100644 --- a/impl/src/main/java/com/sun/faces/application/annotation/PersistenceUnitHandler.java +++ b/impl/src/main/java/com/sun/faces/application/annotation/PersistenceUnitHandler.java @@ -27,10 +27,10 @@ */ class PersistenceUnitHandler extends JndiHandler implements RuntimeAnnotationHandler { - private Method[] methods; - private PersistenceUnit[] methodAnnotations; - private Field[] fields; - private PersistenceUnit[] fieldAnnotations; + private final Method[] methods; + private final PersistenceUnit[] methodAnnotations; + private final Field[] fields; + private final PersistenceUnit[] fieldAnnotations; public PersistenceUnitHandler(Method[] methods, PersistenceUnit[] methodAnnotations, Field[] fields, PersistenceUnit[] fieldAnnotations) { this.methods = methods; diff --git a/impl/src/main/java/com/sun/faces/application/annotation/RenderKitConfigHandler.java b/impl/src/main/java/com/sun/faces/application/annotation/RenderKitConfigHandler.java index 236ce5f59d..995e857f8a 100644 --- a/impl/src/main/java/com/sun/faces/application/annotation/RenderKitConfigHandler.java +++ b/impl/src/main/java/com/sun/faces/application/annotation/RenderKitConfigHandler.java @@ -17,10 +17,9 @@ package com.sun.faces.application.annotation; import java.lang.annotation.Annotation; -import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; import jakarta.faces.FacesException; @@ -40,14 +39,8 @@ */ public class RenderKitConfigHandler implements ConfigAnnotationHandler { - private static final Collection> HANDLES; - - static { - Collection> handles = new ArrayList<>(2); - handles.add(FacesRenderer.class); - handles.add(FacesBehaviorRenderer.class); - HANDLES = Collections.unmodifiableCollection(handles); - } + private static final Collection> HANDLES = List.of( + FacesRenderer.class,FacesBehaviorRenderer.class); Map, Annotation> annotatedRenderers; diff --git a/impl/src/main/java/com/sun/faces/application/annotation/ResourceDependencyHandler.java b/impl/src/main/java/com/sun/faces/application/annotation/ResourceDependencyHandler.java index 3a62d9941f..e1c3d56628 100644 --- a/impl/src/main/java/com/sun/faces/application/annotation/ResourceDependencyHandler.java +++ b/impl/src/main/java/com/sun/faces/application/annotation/ResourceDependencyHandler.java @@ -35,8 +35,8 @@ */ class ResourceDependencyHandler implements RuntimeAnnotationHandler { - private ResourceDependency[] dependencies; - private Map expressionsMap; + private final ResourceDependency[] dependencies; + private final Map expressionsMap; // ------------------------------------------------------------ Constructors diff --git a/impl/src/main/java/com/sun/faces/application/annotation/ResourceHandler.java b/impl/src/main/java/com/sun/faces/application/annotation/ResourceHandler.java index f0863ec6c2..9335013380 100644 --- a/impl/src/main/java/com/sun/faces/application/annotation/ResourceHandler.java +++ b/impl/src/main/java/com/sun/faces/application/annotation/ResourceHandler.java @@ -27,10 +27,10 @@ */ class ResourceHandler extends JndiHandler { - private Field[] fields; - private Resource[] fieldAnnotations; - private Method[] methods; - private Resource[] methodAnnotations; + private final Field[] fields; + private final Resource[] fieldAnnotations; + private final Method[] methods; + private final Resource[] methodAnnotations; public ResourceHandler(Field[] fields, Resource[] fieldAnnotations, Method[] methods, Resource[] methodAnnotations) { this.fields = fields; diff --git a/impl/src/main/java/com/sun/faces/application/annotation/ValidatorConfigHandler.java b/impl/src/main/java/com/sun/faces/application/annotation/ValidatorConfigHandler.java index 4f4275f2f0..d13a5064cc 100644 --- a/impl/src/main/java/com/sun/faces/application/annotation/ValidatorConfigHandler.java +++ b/impl/src/main/java/com/sun/faces/application/annotation/ValidatorConfigHandler.java @@ -17,10 +17,9 @@ package com.sun.faces.application.annotation; import java.lang.annotation.Annotation; -import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; import jakarta.faces.application.Application; @@ -34,12 +33,7 @@ */ public class ValidatorConfigHandler implements ConfigAnnotationHandler { - private static final Collection> HANDLES; - static { - Collection> handles = new ArrayList<>(1); - handles.add(FacesValidator.class); - HANDLES = Collections.unmodifiableCollection(handles); - } + private static final Collection> HANDLES = List.of(FacesValidator.class); private Map validators; diff --git a/impl/src/main/java/com/sun/faces/application/annotation/WebServiceRefHandler.java b/impl/src/main/java/com/sun/faces/application/annotation/WebServiceRefHandler.java deleted file mode 100644 index ea8b6cef04..0000000000 --- a/impl/src/main/java/com/sun/faces/application/annotation/WebServiceRefHandler.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.faces.application.annotation; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; - -import jakarta.faces.context.FacesContext; -import jakarta.xml.ws.WebServiceRef; - -/** - * {@link RuntimeAnnotationHandler} responsible for processing {@link WebServiceRef} annotations. - */ -class WebServiceRefHandler extends JndiHandler implements RuntimeAnnotationHandler { - - private Field[] fields; - private WebServiceRef[] fieldAnnotations; - private Method[] methods; - private WebServiceRef[] methodAnnotations; - - public WebServiceRefHandler(Field[] fields, WebServiceRef[] fieldAnnotations, Method[] methods, WebServiceRef[] methodAnnotations) { - this.fields = fields; - this.fieldAnnotations = fieldAnnotations; - this.methods = methods; - this.methodAnnotations = methodAnnotations; - } - - @SuppressWarnings({ "UnusedDeclaration" }) - @Override - public void apply(FacesContext ctx, Object... params) { - Object object = params[0]; - for (int i = 0; i < fields.length; i++) { - applyToField(ctx, fields[0], fieldAnnotations[0], object); - } - - for (int i = 0; i < methods.length; i++) { - applyToMethod(ctx, methods[i], methodAnnotations[i], object); - } - } - - private void applyToField(FacesContext facesContext, Field field, WebServiceRef ref, Object instance) { - Object value = null; - /* - * if (ref.lookup() != null && !"".equals(ref.lookup().trim())) { value = lookup(facesContext, ref.lookup()); } else - */ - if (ref.name() != null && !"".equals(ref.name().trim())) { - value = lookup(facesContext, JAVA_COMP_ENV + ref.name()); - } else { - value = lookup(facesContext, field.getName()); - } - setField(facesContext, field, instance, value); - } - - private void applyToMethod(FacesContext facesContext, Method method, WebServiceRef ref, Object instance) { - if (method.getName().startsWith("set")) { - Object value = null; - /* - * if (ref.lookup() != null && !"".equals(ref.lookup().trim())) { value = lookup(facesContext, ref.lookup()); } else - */ - if (ref.name() != null && !"".equals(ref.name().trim())) { - value = lookup(facesContext, JAVA_COMP_ENV + ref.name()); - } - invokeMethod(facesContext, method, instance, value); - } - } -} diff --git a/impl/src/main/java/com/sun/faces/application/annotation/WebServiceRefScanner.java b/impl/src/main/java/com/sun/faces/application/annotation/WebServiceRefScanner.java deleted file mode 100644 index d8414963b6..0000000000 --- a/impl/src/main/java/com/sun/faces/application/annotation/WebServiceRefScanner.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.faces.application.annotation; - -import java.lang.annotation.Annotation; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.util.ArrayList; - -import com.sun.faces.util.Util; - -import jakarta.xml.ws.WebServiceRef; - -/** - * Scanner implementation responsible for {@link WebServiceRef} annotations. - */ -class WebServiceRefScanner implements Scanner { - - /** - * Get the annotation we handle. - * - * @return the annotation we handle. - */ - @Override - public Class getAnnotation() { - return WebServiceRef.class; - } - - /** - * Scan the specified class for the given annotation. - * - * @param clazz the class. - * @return the runtime annotation handler. - * @todo Make sure we get all the fields, handle method and class based injection, handle WebServiceRefs. - */ - @Override - public RuntimeAnnotationHandler scan(Class clazz) { - Util.notNull("clazz", clazz); - WebServiceRefHandler handler = null; - - ArrayList classAnnotations = new ArrayList<>(); - WebServiceRef classAnnotation = clazz.getAnnotation(WebServiceRef.class); - if (classAnnotation != null) { - classAnnotations.add(classAnnotation); - } - ArrayList fieldAnnotations = new ArrayList<>(); - ArrayList fields = new ArrayList<>(); - - for (Field field : clazz.getDeclaredFields()) { - WebServiceRef fieldAnnotation = field.getAnnotation(WebServiceRef.class); - if (fieldAnnotation != null) { - fieldAnnotations.add(fieldAnnotation); - fields.add(field); - } - } - - ArrayList methodAnnotations = new ArrayList<>(); - ArrayList methods = new ArrayList<>(); - for (Method method : clazz.getDeclaredMethods()) { - WebServiceRef methodAnnotation = method.getAnnotation(WebServiceRef.class); - if (methodAnnotation != null) { - methodAnnotations.add(methodAnnotation); - methods.add(method); - } - } - - if (!classAnnotations.isEmpty() || !fieldAnnotations.isEmpty()) { - handler = new WebServiceRefHandler(fields.toArray(new Field[0]), fieldAnnotations.toArray(new WebServiceRef[0]), - methods.toArray(new Method[0]), methodAnnotations.toArray(new WebServiceRef[0])); - } - return handler; - } -} diff --git a/impl/src/main/java/com/sun/faces/application/applicationimpl/Events.java b/impl/src/main/java/com/sun/faces/application/applicationimpl/Events.java index 5dbe1c4346..a7cd0c5642 100644 --- a/impl/src/main/java/com/sun/faces/application/applicationimpl/Events.java +++ b/impl/src/main/java/com/sun/faces/application/applicationimpl/Events.java @@ -63,7 +63,7 @@ public class Events { * on a per-FacesContext, per-SystemEvent.class type basis. */ - private ReentrantLisneterInvocationGuard listenerInvocationGuard = new ReentrantLisneterInvocationGuard(); + private final ReentrantLisneterInvocationGuard listenerInvocationGuard = new ReentrantLisneterInvocationGuard(); /* * @see jakarta.faces.application.Application#publishEvent(FacesContext, Class, Class, Object) @@ -259,7 +259,7 @@ private SystemEvent processListenersAccountingForAdds(List // if original differs from copy, make a new copy. // The new copy consists of the original list - processed - SystemEventListener listenersCopy[] = new SystemEventListener[listeners.size()]; + SystemEventListener[] listenersCopy = new SystemEventListener[listeners.size()]; int i = 0; for (i = 0; i < listenersCopy.length; i++) { listenersCopy[i] = listeners.get(i); @@ -298,7 +298,7 @@ private SystemEvent processListenersAccountingForAdds(List } - private boolean originalDiffersFromCopy(Collection original, SystemEventListener copy[]) { + private boolean originalDiffersFromCopy(Collection original, SystemEventListener[] copy) { boolean foundDifference = false; int i = 0, originalLen = original.size(), copyLen = copy.length; diff --git a/impl/src/main/java/com/sun/faces/application/applicationimpl/ExpressionLanguage.java b/impl/src/main/java/com/sun/faces/application/applicationimpl/ExpressionLanguage.java index f24a728b15..272e2a2239 100644 --- a/impl/src/main/java/com/sun/faces/application/applicationimpl/ExpressionLanguage.java +++ b/impl/src/main/java/com/sun/faces/application/applicationimpl/ExpressionLanguage.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -20,19 +21,17 @@ import static com.sun.faces.util.MessageUtils.getExceptionMessageString; import static com.sun.faces.util.Util.getCdiBeanManager; -import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; - import com.sun.faces.application.ApplicationAssociate; import com.sun.faces.el.FacesCompositeELResolver; - import jakarta.el.CompositeELResolver; import jakarta.el.ELContextListener; import jakarta.el.ELException; import jakarta.el.ELResolver; import jakarta.el.ExpressionFactory; -import jakarta.enterprise.inject.spi.BeanManager; +import jakarta.enterprise.inject.spi.el.ELAwareBeanManager; import jakarta.faces.context.FacesContext; +import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; public class ExpressionLanguage { @@ -40,8 +39,8 @@ public class ExpressionLanguage { private final ApplicationAssociate associate; - private List elContextListeners; - private CompositeELResolver elResolvers; + private final List elContextListeners; + private final CompositeELResolver elResolvers; private volatile FacesCompositeELResolver compositeELResolver; public ExpressionLanguage(ApplicationAssociate applicationAssociate) { @@ -103,7 +102,7 @@ public void addELResolver(ELResolver resolver) { } FacesContext facesContext = FacesContext.getCurrentInstance(); - BeanManager cdiBeanManager = getCdiBeanManager(facesContext); + ELAwareBeanManager cdiBeanManager = getCdiBeanManager(facesContext); if (!resolver.equals(cdiBeanManager.getELResolver())) { elResolvers.add(resolver); diff --git a/impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java b/impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java index ef1256c981..764de44f6e 100644 --- a/impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java +++ b/impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java @@ -17,7 +17,6 @@ package com.sun.faces.application.applicationimpl; import static com.sun.faces.application.ApplicationImpl.THIS_LIBRARY; -import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.DateTimeConverterUsesSystemTimezone; import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.RegisterConverterPropertyEditors; import static com.sun.faces.util.Util.isEmpty; import static com.sun.faces.util.Util.loadClass; @@ -51,6 +50,7 @@ import java.util.Map; import java.util.Set; import java.util.TimeZone; +import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Level; import java.util.logging.Logger; @@ -59,13 +59,24 @@ import jakarta.el.ValueExpression; import jakarta.enterprise.inject.spi.BeanManager; import jakarta.faces.FacesException; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.application.Application; import jakarta.faces.application.Resource; import jakarta.faces.component.UIComponent; import jakarta.faces.component.behavior.Behavior; import jakarta.faces.context.FacesContext; +import jakarta.faces.convert.BooleanConverter; +import jakarta.faces.convert.ByteConverter; +import jakarta.faces.convert.CharacterConverter; import jakarta.faces.convert.Converter; import jakarta.faces.convert.DateTimeConverter; +import jakarta.faces.convert.DoubleConverter; +import jakarta.faces.convert.EnumConverter; +import jakarta.faces.convert.FloatConverter; +import jakarta.faces.convert.IntegerConverter; +import jakarta.faces.convert.LongConverter; +import jakarta.faces.convert.ShortConverter; +import jakarta.faces.convert.UUIDConverter; import jakarta.faces.render.RenderKit; import jakarta.faces.render.Renderer; import jakarta.faces.validator.Validator; @@ -95,14 +106,16 @@ public class InstanceFactory { private static final Map, String> STANDARD_TYPE_TO_CONV_ID_MAP = new HashMap<>(16, 1.0f); static { - STANDARD_CONV_ID_TO_TYPE_MAP.put("jakarta.faces.Byte", new Class[] { Byte.TYPE, Byte.class }); - STANDARD_CONV_ID_TO_TYPE_MAP.put("jakarta.faces.Boolean", new Class[] { Boolean.TYPE, Boolean.class }); - STANDARD_CONV_ID_TO_TYPE_MAP.put("jakarta.faces.Character", new Class[] { Character.TYPE, Character.class }); - STANDARD_CONV_ID_TO_TYPE_MAP.put("jakarta.faces.Short", new Class[] { Short.TYPE, Short.class }); - STANDARD_CONV_ID_TO_TYPE_MAP.put("jakarta.faces.Integer", new Class[] { Integer.TYPE, Integer.class }); - STANDARD_CONV_ID_TO_TYPE_MAP.put("jakarta.faces.Long", new Class[] { Long.TYPE, Long.class }); - STANDARD_CONV_ID_TO_TYPE_MAP.put("jakarta.faces.Float", new Class[] { Float.TYPE, Float.class }); - STANDARD_CONV_ID_TO_TYPE_MAP.put("jakarta.faces.Double", new Class[] { Double.TYPE, Double.class }); + STANDARD_CONV_ID_TO_TYPE_MAP.put(ByteConverter.CONVERTER_ID, new Class[] { Byte.TYPE, Byte.class }); + STANDARD_CONV_ID_TO_TYPE_MAP.put(BooleanConverter.CONVERTER_ID, new Class[] { Boolean.TYPE, Boolean.class }); + STANDARD_CONV_ID_TO_TYPE_MAP.put(CharacterConverter.CONVERTER_ID, new Class[] { Character.TYPE, Character.class }); + STANDARD_CONV_ID_TO_TYPE_MAP.put(ShortConverter.CONVERTER_ID, new Class[] { Short.TYPE, Short.class }); + STANDARD_CONV_ID_TO_TYPE_MAP.put(IntegerConverter.CONVERTER_ID, new Class[] { Integer.TYPE, Integer.class }); + STANDARD_CONV_ID_TO_TYPE_MAP.put(LongConverter.CONVERTER_ID, new Class[] { Long.TYPE, Long.class }); + STANDARD_CONV_ID_TO_TYPE_MAP.put(FloatConverter.CONVERTER_ID, new Class[] { Float.TYPE, Float.class }); + STANDARD_CONV_ID_TO_TYPE_MAP.put(DoubleConverter.CONVERTER_ID, new Class[] { Double.TYPE, Double.class }); + STANDARD_CONV_ID_TO_TYPE_MAP.put(EnumConverter.CONVERTER_ID, new Class[] { Enum.class }); + STANDARD_CONV_ID_TO_TYPE_MAP.put(UUIDConverter.CONVERTER_ID, new Class[] { UUID.class }); for (Map.Entry[]> entry : STANDARD_CONV_ID_TO_TYPE_MAP.entrySet()) { Class[] types = entry.getValue(); String key = entry.getKey(); @@ -113,11 +126,11 @@ public class InstanceFactory { } private final String[] STANDARD_BY_TYPE_CONVERTER_CLASSES = { "java.math.BigDecimal", "java.lang.Boolean", "java.lang.Byte", "java.lang.Character", - "java.lang.Double", "java.lang.Float", "java.lang.Integer", "java.lang.Long", "java.lang.Short", "java.lang.Enum" }; + "java.lang.Double", "java.lang.Float", "java.lang.Integer", "java.lang.Long", "java.lang.Short", "java.lang.Enum", "java.util.UUID" }; - private Map, Object> converterTypeMap; - private boolean registerPropertyEditors; - private boolean passDefaultTimeZone; + private final Map, Object> converterTypeMap; + private final boolean registerPropertyEditors; + private final boolean passDefaultTimeZone; private TimeZone systemTimeZone; @@ -128,12 +141,12 @@ private static final class ComponentResourceClassNotFound { // These four maps store store "identifier" | "class name" // mappings. // - private ViewMemberInstanceFactoryMetadataMap componentMap; - private ViewMemberInstanceFactoryMetadataMap behaviorMap; - private ViewMemberInstanceFactoryMetadataMap converterIdMap; - private ViewMemberInstanceFactoryMetadataMap validatorMap; + private final ViewMemberInstanceFactoryMetadataMap componentMap; + private final ViewMemberInstanceFactoryMetadataMap behaviorMap; + private final ViewMemberInstanceFactoryMetadataMap converterIdMap; + private final ViewMemberInstanceFactoryMetadataMap validatorMap; - private Set defaultValidatorIds; + private final Set defaultValidatorIds; private volatile Map defaultValidatorInfo; private final ApplicationAssociate associate; @@ -153,10 +166,11 @@ public InstanceFactory(ApplicationAssociate applicationAssociate) { defaultValidatorIds = new LinkedHashSet<>(); behaviorMap = new ViewMemberInstanceFactoryMetadataMap<>(new ConcurrentHashMap<>()); - WebConfiguration webConfig = WebConfiguration.getInstance(FacesContext.getCurrentInstance().getExternalContext()); + FacesContext context = FacesContext.getCurrentInstance(); + WebConfiguration webConfig = WebConfiguration.getInstance(context.getExternalContext()); registerPropertyEditors = webConfig.isOptionEnabled(RegisterConverterPropertyEditors); - passDefaultTimeZone = webConfig.isOptionEnabled(DateTimeConverterUsesSystemTimezone); + passDefaultTimeZone = ContextParam.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE.getValue(context); if (passDefaultTimeZone) { systemTimeZone = TimeZone.getDefault(); } diff --git a/impl/src/main/java/com/sun/faces/application/applicationimpl/SearchExpression.java b/impl/src/main/java/com/sun/faces/application/applicationimpl/SearchExpression.java index b0dd0829cc..417c497139 100644 --- a/impl/src/main/java/com/sun/faces/application/applicationimpl/SearchExpression.java +++ b/impl/src/main/java/com/sun/faces/application/applicationimpl/SearchExpression.java @@ -49,7 +49,7 @@ public class SearchExpression { private final ApplicationAssociate associate; - private CompositeSearchKeywordResolver searchKeywordResolvers; + private final CompositeSearchKeywordResolver searchKeywordResolvers; public SearchExpression(ApplicationAssociate applicationAssociate) { associate = applicationAssociate; diff --git a/impl/src/main/java/com/sun/faces/application/applicationimpl/Stage.java b/impl/src/main/java/com/sun/faces/application/applicationimpl/Stage.java index 8859d0a9ab..2a51e45cb8 100644 --- a/impl/src/main/java/com/sun/faces/application/applicationimpl/Stage.java +++ b/impl/src/main/java/com/sun/faces/application/applicationimpl/Stage.java @@ -16,11 +16,8 @@ package com.sun.faces.application.applicationimpl; -import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.JakartaFacesProjectStage; import static jakarta.faces.application.ProjectStage.Development; -import static jakarta.faces.application.ProjectStage.Production; import static java.util.logging.Level.FINE; -import static java.util.logging.Level.INFO; import java.util.logging.Logger; @@ -28,6 +25,7 @@ import com.sun.faces.config.WebConfiguration; import com.sun.faces.util.FacesLogger; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.application.Application; import jakarta.faces.application.ProjectStage; import jakarta.faces.context.FacesContext; @@ -45,9 +43,7 @@ public class Stage { public ProjectStage getProjectStage(Application application) { if (projectStage == null) { - String value = fetchProjectStageFromConfig(); - - setProjectStageFromValue(value, Production); + projectStage = fetchProjectStageFromConfig(); if (projectStage == Development) { application.subscribeToEvent(PostAddToViewEvent.class, new ValidateComponentNesting()); @@ -59,38 +55,24 @@ public ProjectStage getProjectStage(Application application) { // ----------------------------------------------------------- Private methods - private String fetchProjectStageFromConfig() { - WebConfiguration webConfig = WebConfiguration.getInstance(FacesContext.getCurrentInstance().getExternalContext()); + private ProjectStage fetchProjectStageFromConfig() { + FacesContext context = FacesContext.getCurrentInstance(); + WebConfiguration webConfig = WebConfiguration.getInstance(context.getExternalContext()); String value = webConfig.getEnvironmentEntry(WebConfiguration.WebEnvironmentEntry.ProjectStage); if (value != null) { + projectStage = ProjectStage.valueOf(value); if (LOGGER.isLoggable(FINE)) { LOGGER.log(FINE, "ProjectStage configured via JNDI: {0}", value); } } else { - value = webConfig.getOptionValue(JakartaFacesProjectStage); - if (value != null && LOGGER.isLoggable(FINE)) { + projectStage = ContextParam.PROJECT_STAGE.getValue(context); + if (LOGGER.isLoggable(FINE)) { LOGGER.log(FINE, "ProjectStage configured via servlet context init parameter: {0}", value); } } - return value; - } - - private void setProjectStageFromValue(String value, ProjectStage defaultStage) { - if (value != null) { - try { - projectStage = ProjectStage.valueOf(value); - } catch (IllegalArgumentException iae) { - if (LOGGER.isLoggable(INFO)) { - LOGGER.log(INFO, "Unable to discern ProjectStage for value {0}.", value); - } - } - } - - if (projectStage == null) { - projectStage = defaultStage; - } + return projectStage; } } diff --git a/impl/src/main/java/com/sun/faces/application/applicationimpl/events/ComponentSystemEventHelper.java b/impl/src/main/java/com/sun/faces/application/applicationimpl/events/ComponentSystemEventHelper.java index 46fe5f1ad9..60c79da794 100644 --- a/impl/src/main/java/com/sun/faces/application/applicationimpl/events/ComponentSystemEventHelper.java +++ b/impl/src/main/java/com/sun/faces/application/applicationimpl/events/ComponentSystemEventHelper.java @@ -26,7 +26,7 @@ */ public class ComponentSystemEventHelper { - private Cache, Cache, EventInfo>> sourceCache; + private final Cache, Cache, EventInfo>> sourceCache; // -------------------------------------------------------- Constructors diff --git a/impl/src/main/java/com/sun/faces/application/applicationimpl/events/EventInfo.java b/impl/src/main/java/com/sun/faces/application/applicationimpl/events/EventInfo.java index 856ee0445a..4ca48d548f 100644 --- a/impl/src/main/java/com/sun/faces/application/applicationimpl/events/EventInfo.java +++ b/impl/src/main/java/com/sun/faces/application/applicationimpl/events/EventInfo.java @@ -39,11 +39,11 @@ public class EventInfo { private static final Logger LOGGER = FacesLogger.APPLICATION.getLogger(); - private Class systemEvent; - private Class sourceClass; - private Set listeners; + private final Class systemEvent; + private final Class sourceClass; + private final Set listeners; private Constructor eventConstructor; - private Map, Constructor> constructorMap; + private final Map, Constructor> constructorMap; // -------------------------------------------------------- Constructors diff --git a/impl/src/main/java/com/sun/faces/application/applicationimpl/events/SystemEventHelper.java b/impl/src/main/java/com/sun/faces/application/applicationimpl/events/SystemEventHelper.java index aa57ca4849..95bdc187e5 100644 --- a/impl/src/main/java/com/sun/faces/application/applicationimpl/events/SystemEventHelper.java +++ b/impl/src/main/java/com/sun/faces/application/applicationimpl/events/SystemEventHelper.java @@ -31,7 +31,7 @@ public class SystemEventHelper { public SystemEventHelper() { - systemEventInfoCache = new Cache<>(arg -> new SystemEventInfo(arg)); + systemEventInfoCache = new Cache<>(SystemEventInfo::new); } diff --git a/impl/src/main/java/com/sun/faces/application/applicationimpl/events/SystemEventInfo.java b/impl/src/main/java/com/sun/faces/application/applicationimpl/events/SystemEventInfo.java index 23a1a832a8..75833aca33 100644 --- a/impl/src/main/java/com/sun/faces/application/applicationimpl/events/SystemEventInfo.java +++ b/impl/src/main/java/com/sun/faces/application/applicationimpl/events/SystemEventInfo.java @@ -29,7 +29,7 @@ public class SystemEventInfo { private Class systemEvent; - private Cache, EventInfo> cache = new Cache<>(arg -> new EventInfo(systemEvent, arg)); + private final Cache, EventInfo> cache = new Cache<>(arg -> new EventInfo(systemEvent, arg)); // -------------------------------------------------------- Constructors diff --git a/impl/src/main/java/com/sun/faces/application/resource/ClasspathResourceHelper.java b/impl/src/main/java/com/sun/faces/application/resource/ClasspathResourceHelper.java index 543838c487..08a239a590 100644 --- a/impl/src/main/java/com/sun/faces/application/resource/ClasspathResourceHelper.java +++ b/impl/src/main/java/com/sun/faces/application/resource/ClasspathResourceHelper.java @@ -16,9 +16,9 @@ package com.sun.faces.application.resource; -import static com.sun.faces.config.WebConfiguration.META_INF_CONTRACTS_DIR; import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.CacheResourceModificationTimestamp; import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.EnableMissingResourceLibraryDetection; +import static com.sun.faces.config.WebConfiguration.META_INF_CONTRACTS_DIR; import static jakarta.faces.application.ProjectStage.Development; import java.io.IOException; @@ -27,7 +27,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.Locale; import com.sun.faces.config.WebConfiguration; import com.sun.faces.util.Util; @@ -47,9 +46,9 @@ public class ClasspathResourceHelper extends ResourceHelper { private static final String BASE_RESOURCE_PATH = "META-INF/resources"; - private boolean cacheTimestamp; + private final boolean cacheTimestamp; private volatile ZipDirectoryEntryScanner libraryScanner; - private boolean enableMissingResourceLibraryDetection; + private final boolean enableMissingResourceLibraryDetection; // ------------------------------------------------------------ Constructors diff --git a/impl/src/main/java/com/sun/faces/application/resource/FaceletLibraryInfo.java b/impl/src/main/java/com/sun/faces/application/resource/FaceletLibraryInfo.java index d3b2e07cad..6dfcca7a08 100644 --- a/impl/src/main/java/com/sun/faces/application/resource/FaceletLibraryInfo.java +++ b/impl/src/main/java/com/sun/faces/application/resource/FaceletLibraryInfo.java @@ -20,7 +20,7 @@ public class FaceletLibraryInfo extends LibraryInfo { - private URL url; + private final URL url; public FaceletLibraryInfo(String name, VersionInfo version, String localePrefix, String contract, ResourceHelper helper, URL url) { super(name, version, localePrefix, contract, helper); diff --git a/impl/src/main/java/com/sun/faces/application/resource/FaceletResourceInfo.java b/impl/src/main/java/com/sun/faces/application/resource/FaceletResourceInfo.java index 5da7671b5b..63cea6acb9 100644 --- a/impl/src/main/java/com/sun/faces/application/resource/FaceletResourceInfo.java +++ b/impl/src/main/java/com/sun/faces/application/resource/FaceletResourceInfo.java @@ -25,7 +25,7 @@ public class FaceletResourceInfo extends ResourceInfo { this.url = url; } - private URL url; + private final URL url; public URL getUrl() { return url; diff --git a/impl/src/main/java/com/sun/faces/application/resource/FaceletWebappResourceHelper.java b/impl/src/main/java/com/sun/faces/application/resource/FaceletWebappResourceHelper.java index 33f708b208..b86b8ab123 100644 --- a/impl/src/main/java/com/sun/faces/application/resource/FaceletWebappResourceHelper.java +++ b/impl/src/main/java/com/sun/faces/application/resource/FaceletWebappResourceHelper.java @@ -18,7 +18,7 @@ import static com.sun.faces.RIConstants.FLOW_IN_JAR_PREFIX; import static com.sun.faces.config.WebConfiguration.META_INF_CONTRACTS_DIR; -import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.FaceletsSuffix; +import static com.sun.faces.util.Util.ensureLeadingSlash; import static jakarta.faces.application.ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY; import static java.util.Spliterator.DISTINCT; import static java.util.Spliterators.spliteratorUnknownSize; @@ -35,11 +35,11 @@ import java.util.stream.Stream; import com.sun.faces.application.ApplicationAssociate; -import com.sun.faces.config.WebConfiguration; import com.sun.faces.util.Util; import jakarta.enterprise.inject.Any; import jakarta.faces.FacesException; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.annotation.View; import jakarta.faces.application.ResourceVisitOption; import jakarta.faces.context.ExternalContext; @@ -55,8 +55,8 @@ public class FaceletWebappResourceHelper extends ResourceHelper { public FaceletWebappResourceHelper(WebappResourceHelper webappResourceHelper) { this.webappResourceHelper = webappResourceHelper; - WebConfiguration webConfig = WebConfiguration.getInstance(); - configuredExtensions = webConfig.getOptionValue(FaceletsSuffix, " "); + FacesContext context = FacesContext.getCurrentInstance(); + configuredExtensions = new String[] { ContextParam.FACELETS_SUFFIX.getValue(context) }; } @Override diff --git a/impl/src/main/java/com/sun/faces/application/resource/LibraryInfo.java b/impl/src/main/java/com/sun/faces/application/resource/LibraryInfo.java index 5f4a54e291..7f42eafded 100644 --- a/impl/src/main/java/com/sun/faces/application/resource/LibraryInfo.java +++ b/impl/src/main/java/com/sun/faces/application/resource/LibraryInfo.java @@ -24,11 +24,11 @@ */ public class LibraryInfo { - private String name; - private VersionInfo version; + private final String name; + private final VersionInfo version; private String localePrefix; private String contract; - private ResourceHelper helper; + private final ResourceHelper helper; private String path; private String nonLocalizedPath; diff --git a/impl/src/main/java/com/sun/faces/application/resource/Resource.java b/impl/src/main/java/com/sun/faces/application/resource/Resource.java index cb3cb8d22f..aa264ca473 100644 --- a/impl/src/main/java/com/sun/faces/application/resource/Resource.java +++ b/impl/src/main/java/com/sun/faces/application/resource/Resource.java @@ -42,7 +42,7 @@ */ public final class Resource { - protected final static Logger LOGGER = FacesLogger.FACELETS_FACTORY.getLogger(); + private static final Logger LOGGER = FacesLogger.FACELETS_FACTORY.getLogger(); /** * Get an URL of an internal resource. diff --git a/impl/src/main/java/com/sun/faces/application/resource/ResourceCache.java b/impl/src/main/java/com/sun/faces/application/resource/ResourceCache.java index c722cbb5e0..6e2cffe3d1 100644 --- a/impl/src/main/java/com/sun/faces/application/resource/ResourceCache.java +++ b/impl/src/main/java/com/sun/faces/application/resource/ResourceCache.java @@ -153,7 +153,7 @@ private static String getServletContextIdentifier(ServletContext context) { private static final class ResourceInfoCheckPeriodProxy { - private ResourceInfo resourceInfo; + private final ResourceInfo resourceInfo; private Long checkTime; // -------------------------------------------------------- Constructors diff --git a/impl/src/main/java/com/sun/faces/application/resource/ResourceHandlerImpl.java b/impl/src/main/java/com/sun/faces/application/resource/ResourceHandlerImpl.java index a26ab77331..31c2c94d3f 100644 --- a/impl/src/main/java/com/sun/faces/application/resource/ResourceHandlerImpl.java +++ b/impl/src/main/java/com/sun/faces/application/resource/ResourceHandlerImpl.java @@ -18,7 +18,6 @@ import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.DefaultResourceMaxAge; import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.ResourceBufferSize; -import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.ResourceExcludes; import static com.sun.faces.util.RequestStateManager.RESOURCE_REQUEST; import static com.sun.faces.util.Util.getFacesMapping; import static com.sun.faces.util.Util.notNegative; @@ -51,8 +50,8 @@ import com.sun.faces.config.WebConfiguration; import com.sun.faces.util.FacesLogger; import com.sun.faces.util.RequestStateManager; -import com.sun.faces.util.Util; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.application.Resource; import jakarta.faces.application.ResourceHandler; import jakarta.faces.application.ResourceVisitOption; @@ -71,7 +70,7 @@ public class ResourceHandlerImpl extends ResourceHandler { List excludePatterns; private long creationTime; private long maxAge; - private WebConfiguration webconfig; + private final WebConfiguration webconfig; // ------------------------------------------------------------ Constructors @@ -81,9 +80,10 @@ public class ResourceHandlerImpl extends ResourceHandler { public ResourceHandlerImpl() { creationTime = System.currentTimeMillis(); webconfig = WebConfiguration.getInstance(); - ExternalContext extContext = FacesContext.getCurrentInstance().getExternalContext(); + FacesContext context = FacesContext.getCurrentInstance(); + ExternalContext extContext = context.getExternalContext(); manager = ApplicationAssociate.getInstance(extContext).getResourceManager(); - initExclusions(extContext.getApplicationMap()); + initExclusions(context); initMaxAge(); } @@ -204,7 +204,7 @@ public boolean libraryExists(String libraryName) { @Override public boolean isResourceRequest(FacesContext context) { - Boolean isResourceRequest = (Boolean) RequestStateManager.get(context, RESOURCE_REQUEST); + Boolean isResourceRequest = RequestStateManager.get(context, RESOURCE_REQUEST); if (isResourceRequest == null) { String resourceId = normalizeResourceRequest(context); isResourceRequest = resourceId != null ? resourceId.startsWith(RESOURCE_IDENTIFIER) : FALSE; @@ -221,9 +221,9 @@ public String getRendererTypeForResourceName(String resourceName) { String contentType = getContentType(FacesContext.getCurrentInstance(), resourceName); if (null != contentType) { contentType = contentType.toLowerCase(); - if (-1 != contentType.indexOf("javascript")) { + if (contentType.contains("javascript")) { rendererType = "jakarta.faces.resource.Script"; - } else if (-1 != contentType.indexOf("css")) { + } else if (contentType.contains("css")) { rendererType = "jakarta.faces.resource.Stylesheet"; } } @@ -559,9 +559,8 @@ private boolean isExcluded(String resourceId) { *
    * will be used. */ - private void initExclusions(Map appMap) { - String excludesParam = webconfig.getOptionValue(ResourceExcludes); - String[] patterns = Util.split(appMap, excludesParam, " "); + private void initExclusions(FacesContext context) { + String[] patterns = ContextParam.RESOURCE_EXCLUDES.getValue(context); excludePatterns = new ArrayList<>(patterns.length); for (String pattern : patterns) { diff --git a/impl/src/main/java/com/sun/faces/application/resource/ResourceHelper.java b/impl/src/main/java/com/sun/faces/application/resource/ResourceHelper.java index 7c84420def..669c7c590d 100644 --- a/impl/src/main/java/com/sun/faces/application/resource/ResourceHelper.java +++ b/impl/src/main/java/com/sun/faces/application/resource/ResourceHelper.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -56,9 +57,7 @@ import jakarta.servlet.http.HttpServletResponse; /** - *

    * Implementations of this class contain the knowledge for finding and serving web application resources. - *

    * * @since 2.0 */ @@ -533,12 +532,12 @@ private VersionInfo getVersion(String pathElement, boolean isResource) { private static final class ELEvaluatingInputStream extends InputStream { // Premature optimization is the root of all evil. Blah blah. - private List buf = new ArrayList<>(1024); + private final List buf = new ArrayList<>(1024); private boolean failedExpressionTest = false; private boolean writingExpression = false; - private InputStream inner; - private ClientResourceInfo info; - private FacesContext ctx; + private final InputStream inner; + private final ClientResourceInfo info; + private final FacesContext ctx; private boolean expressionEvaluated; private boolean endOfStreamReached; @@ -632,7 +631,7 @@ private void readExpressionIntoBufferAndEvaluateIntoBuffer() throws IOException * a String, turn the String into a ValueExpression, evaluate it, store the toString() of it in expressionResult; */ private void evaluateExpressionIntoBuffer() { - char chars[] = new char[buf.size()]; + char[] chars = new char[buf.size()]; for (int i = 0, len = buf.size(); i < len; i++) { chars[i] = (char) (int) buf.get(i); } diff --git a/impl/src/main/java/com/sun/faces/application/resource/ResourceImpl.java b/impl/src/main/java/com/sun/faces/application/resource/ResourceImpl.java index fcf7ac9cc3..32339807ba 100644 --- a/impl/src/main/java/com/sun/faces/application/resource/ResourceImpl.java +++ b/impl/src/main/java/com/sun/faces/application/resource/ResourceImpl.java @@ -401,9 +401,7 @@ private long getIfModifiedHeader(ExternalContext extcontext) { if (LOGGER.isLoggable(Level.WARNING)) { LOGGER.log(Level.WARNING, "faces.application.resource.invalid_if_modified_since_header", new Object[] { extcontext.getRequestHeaderMap().get(IF_MODIFIED_SINCE) }); - if (ex != null) { - LOGGER.log(Level.WARNING, "", ex); - } + LOGGER.log(Level.WARNING, "", ex); } return -1; } diff --git a/impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java b/impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java index 2d3b3ea631..8daeffae5d 100644 --- a/impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java +++ b/impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java @@ -62,22 +62,22 @@ public class ResourceManager { /** * {@link ResourceHelper} used for looking up webapp-based resources. */ - private WebappResourceHelper webappResourceHelper = new WebappResourceHelper(); + private final WebappResourceHelper webappResourceHelper = new WebappResourceHelper(); /** * {@link ResourceHelper} used for looking up webapp-based facelets resources. */ - private FaceletWebappResourceHelper faceletWebappResourceHelper = new FaceletWebappResourceHelper(webappResourceHelper); + private final FaceletWebappResourceHelper faceletWebappResourceHelper = new FaceletWebappResourceHelper(webappResourceHelper); /** * {@link ResourceHelper} used for looking up classpath-based resources. */ - private ClasspathResourceHelper classpathResourceHelper = new ClasspathResourceHelper(); + private final ClasspathResourceHelper classpathResourceHelper = new ClasspathResourceHelper(); /** * Cache for storing {@link ResourceInfo} instances to reduce the cost of the resource lookups. */ - private ResourceCache cache; + private final ResourceCache cache; /** * Patterns used to find {@link ResourceInfo} instances that may have their content compressed. @@ -88,7 +88,7 @@ public class ResourceManager { * This lock is used to ensure the lookup of compressable {@link ResourceInfo} instances are atomic to prevent theading * issues when writing the compressed content during a lookup. */ - private ReentrantLock lock = new ReentrantLock(); + private final ReentrantLock lock = new ReentrantLock(); // ------------------------------------------------------------ Constructors diff --git a/impl/src/main/java/com/sun/faces/application/resource/ResourcePathsIterator.java b/impl/src/main/java/com/sun/faces/application/resource/ResourcePathsIterator.java index 7a40f7fafa..9e393224ad 100644 --- a/impl/src/main/java/com/sun/faces/application/resource/ResourcePathsIterator.java +++ b/impl/src/main/java/com/sun/faces/application/resource/ResourcePathsIterator.java @@ -64,7 +64,10 @@ public String next() { } private void visit(String resourcePath) { - stack.addAll(externalContext.getResourcePaths(resourcePath)); + java.util.Set set = externalContext.getResourcePaths(resourcePath); + if(set != null) { + stack.addAll(set); + } } private void tryTake() { diff --git a/impl/src/main/java/com/sun/faces/application/resource/VersionInfo.java b/impl/src/main/java/com/sun/faces/application/resource/VersionInfo.java index 818f2e8e7f..9985a0a940 100644 --- a/impl/src/main/java/com/sun/faces/application/resource/VersionInfo.java +++ b/impl/src/main/java/com/sun/faces/application/resource/VersionInfo.java @@ -19,10 +19,10 @@ /** * Metadata pertaining to versions. */ -public class VersionInfo implements Comparable { +public class VersionInfo implements Comparable { - private String version; - private String extension; + private final String version; + private final String extension; // ------------------------------------------------------------ Constructors @@ -75,7 +75,7 @@ public int hashCode() { @Override public boolean equals(Object obj) { - if (obj == null || !(obj instanceof VersionInfo)) { + if (!(obj instanceof VersionInfo)) { return false; } if (this == obj) { @@ -96,9 +96,8 @@ public boolean equals(Object obj) { // ------------------------------------------------- Methods from Comparable @Override - public int compareTo(Object o) { - assert o instanceof VersionInfo; - VersionInfo c = (VersionInfo) o; - return version.compareTo(c.version); + public int compareTo(VersionInfo versionInfo) { + assert versionInfo != null; + return version.compareTo(versionInfo.version); } } diff --git a/impl/src/main/java/com/sun/faces/application/resource/WebappResourceHelper.java b/impl/src/main/java/com/sun/faces/application/resource/WebappResourceHelper.java index 6a4374e6ee..965cb61c0e 100644 --- a/impl/src/main/java/com/sun/faces/application/resource/WebappResourceHelper.java +++ b/impl/src/main/java/com/sun/faces/application/resource/WebappResourceHelper.java @@ -34,6 +34,7 @@ import com.sun.faces.util.FacesLogger; import jakarta.faces.FacesException; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.application.ProjectStage; import jakarta.faces.component.UIViewRoot; import jakarta.faces.context.FacesContext; @@ -54,16 +55,17 @@ public class WebappResourceHelper extends ResourceHelper { private final String BASE_CONTRACTS_PATH; - private boolean cacheTimestamp; + private final boolean cacheTimestamp; // ------------------------------------------------------------ Constructors public WebappResourceHelper() { WebConfiguration webconfig = WebConfiguration.getInstance(); + FacesContext context = FacesContext.getCurrentInstance(); cacheTimestamp = webconfig.isOptionEnabled(CacheResourceModificationTimestamp); - BASE_RESOURCE_PATH = ensureLeadingSlash(webconfig.getOptionValue(WebConfiguration.WebContextInitParameter.WebAppResourcesDirectory)); - BASE_CONTRACTS_PATH = ensureLeadingSlash(webconfig.getOptionValue(WebConfiguration.WebContextInitParameter.WebAppContractsDirectory)); + BASE_RESOURCE_PATH = ensureLeadingSlash(ContextParam.WEBAPP_RESOURCES_DIRECTORY.getValue(context)); + BASE_CONTRACTS_PATH = ensureLeadingSlash(ContextParam.WEBAPP_CONTRACTS_DIRECTORY.getValue(context)); } @@ -162,7 +164,7 @@ public LibraryInfo findLibrary(String libraryName, String localePrefix, String c Set resourcePaths = ctx.getExternalContext().getResourcePaths(path); // it could be possible that there exists an empty directory // that is representing the library, but if it's empty, treat it - // as non-existant and return null. + // as non-existent and return null. if (resourcePaths != null && !resourcePaths.isEmpty()) { VersionInfo version = getVersion(resourcePaths, false); return new LibraryInfo(libraryName, version, localePrefix, contract, this); diff --git a/impl/src/main/java/com/sun/faces/application/view/FaceletFullStateManagementStrategy.java b/impl/src/main/java/com/sun/faces/application/view/FaceletFullStateManagementStrategy.java index 4b50125348..a928e66a16 100644 --- a/impl/src/main/java/com/sun/faces/application/view/FaceletFullStateManagementStrategy.java +++ b/impl/src/main/java/com/sun/faces/application/view/FaceletFullStateManagementStrategy.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -586,7 +587,7 @@ private Object saveComponentState(FacesContext context) { Object stateObj; if (!component.isTransient()) { if (stateContext.componentAddedDynamically(component)) { - component.getAttributes().put(DYNAMIC_COMPONENT, new Integer(getProperChildIndex(component))); + component.getAttributes().put(DYNAMIC_COMPONENT, getProperChildIndex(component)); stateObj = new StateHolderSaver(finalContext, component); } else { stateObj = component.saveState(finalContext); @@ -841,7 +842,7 @@ public int getParent() { private int getProperChildIndex(UIComponent component) { int result = -1; - if (component.getParent().getChildren().indexOf(component) != -1) { + if (component.getParent().getChildren().contains(component)) { UIComponent parent = component.getParent(); int index = 0; Iterator iterator = parent.getChildren().iterator(); diff --git a/impl/src/main/java/com/sun/faces/application/view/FaceletViewHandlingStrategy.java b/impl/src/main/java/com/sun/faces/application/view/FaceletViewHandlingStrategy.java index f4f390fc4c..5d24cd0556 100644 --- a/impl/src/main/java/com/sun/faces/application/view/FaceletViewHandlingStrategy.java +++ b/impl/src/main/java/com/sun/faces/application/view/FaceletViewHandlingStrategy.java @@ -19,9 +19,6 @@ import static com.sun.faces.RIConstants.DYNAMIC_COMPONENT; import static com.sun.faces.RIConstants.FACELETS_ENCODING_KEY; import static com.sun.faces.RIConstants.FLOW_DEFINITION_ID_SUFFIX; -import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.FaceletsBufferSize; -import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.FaceletsViewMappings; -import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.StateSavingMethod; import static com.sun.faces.context.StateContext.getStateContext; import static com.sun.faces.facelets.tag.ui.UIDebug.debugRequest; import static com.sun.faces.renderkit.RenderKitUtils.getResponseStateManager; @@ -37,12 +34,10 @@ import static com.sun.faces.util.Util.saveDOCTYPEToFacesContextAttributes; import static com.sun.faces.util.Util.saveXMLDECLToFacesContextAttributes; import static com.sun.faces.util.Util.setViewPopulated; -import static com.sun.faces.util.Util.split; import static jakarta.faces.FactoryFinder.VIEW_DECLARATION_LANGUAGE_FACTORY; import static jakarta.faces.application.ProjectStage.Development; import static jakarta.faces.application.Resource.COMPONENT_RESOURCE_KEY; import static jakarta.faces.application.StateManager.IS_BUILDING_INITIAL_STATE; -import static jakarta.faces.application.StateManager.STATE_SAVING_METHOD_SERVER; import static jakarta.faces.application.ViewHandler.DEFAULT_FACELETS_SUFFIX; import static jakarta.faces.application.ViewVisitOption.RETURN_AS_MINIMAL_IMPLICIT_OUTCOME; import static jakarta.faces.component.UIComponent.BEANINFO_KEY; @@ -79,7 +74,6 @@ import java.util.stream.Stream; import com.sun.faces.application.ApplicationAssociate; -import com.sun.faces.config.WebConfiguration; import com.sun.faces.context.StateContext; import com.sun.faces.facelets.compiler.FaceletDoctype; import com.sun.faces.facelets.el.ContextualCompositeMethodExpression; @@ -105,10 +99,12 @@ import jakarta.el.VariableMapper; import jakarta.faces.FacesException; import jakarta.faces.FactoryFinder; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.application.Resource; +import jakarta.faces.application.StateManager.StateSavingMethod; import jakarta.faces.application.ViewHandler; import jakarta.faces.application.ViewVisitOption; -import jakarta.faces.component.ActionSource2; +import jakarta.faces.component.ActionSource; import jakarta.faces.component.Doctype; import jakarta.faces.component.EditableValueHolder; import jakarta.faces.component.UIComponent; @@ -127,8 +123,8 @@ import jakarta.faces.event.ValueChangeEvent; import jakarta.faces.render.RenderKit; import jakarta.faces.validator.MethodExpressionValidator; -import jakarta.faces.view.ActionSource2AttachedObjectHandler; -import jakarta.faces.view.ActionSource2AttachedObjectTarget; +import jakarta.faces.view.ActionSourceAttachedObjectHandler; +import jakarta.faces.view.ActionSourceAttachedObjectTarget; import jakarta.faces.view.AttachedObjectHandler; import jakarta.faces.view.AttachedObjectTarget; import jakarta.faces.view.BehaviorHolderAttachedObjectHandler; @@ -167,7 +163,7 @@ public class FaceletViewHandlingStrategy extends ViewHandlingStrategy { public static final String RESOURCE_LIBRARY_CONTRACT_DATA_STRUCTURE_KEY = FaceletViewHandlingStrategy.class.getName() + ".RESOURCE_LIBRARY_CONTRACT_DATA_STRUCTURE"; - private MethodRetargetHandlerManager retargetHandlerManager = new MethodRetargetHandlerManager(); + private final MethodRetargetHandlerManager retargetHandlerManager = new MethodRetargetHandlerManager(); private int responseBufferSize; @@ -411,7 +407,7 @@ public void renderView(FacesContext ctx, UIViewRoot viewToRender) throws IOExcep } // If the buffer size is -1, use the default buffer size - final int bufferSize = responseBufferSize != -1 ? responseBufferSize : Integer.parseInt(FaceletsBufferSize.getDefaultValue()); + final int bufferSize = responseBufferSize != -1 ? responseBufferSize : ViewHandler.FACELETS_BUFFER_SIZE_DEFAULT_VALUE; stateWriter = new WriteBehindStateWriter(extContext.getResponseOutputWriter(), ctx, bufferSize); ResponseWriter writer = origWriter.cloneWithWriter(stateWriter); @@ -573,7 +569,7 @@ public void retargetAttachedObjects(FacesContext context, UIComponent topLevelCo curTargetName = curTarget.getName(); targetComponents = curTarget.getTargets(topLevelComponent); - if (curHandler instanceof ActionSource2AttachedObjectHandler && curTarget instanceof ActionSource2AttachedObjectTarget) { + if (curHandler instanceof ActionSourceAttachedObjectHandler && curTarget instanceof ActionSourceAttachedObjectTarget) { if (forAttributeValue.equals(curTargetName)) { for (UIComponent curTargetComponent : targetComponents) { retargetHandler(context, curHandler, curTargetComponent); @@ -777,8 +773,8 @@ public Stream getViews(FacesContext context, String path, int maxDepth, * @return true if assuming a default configuration and the view ID's extension in {@link ViewHandler#FACELETS_SUFFIX_PARAM_NAME} * Otherwise try to match the view ID based on the configured extensions and prefixes in {@link ViewHandler#FACELETS_VIEW_MAPPINGS_PARAM_NAME} * - * @see com.sun.faces.config.WebConfiguration.WebContextInitParameter#FaceletsSuffix - * @see com.sun.faces.config.WebConfiguration.WebContextInitParameter#FaceletsViewMappings + * @see ContextParam#FACELETS_SUFFIX + * @see ContextParam#FACELETS_VIEW_MAPPINGS */ @Override public boolean handlesViewId(String viewId) { @@ -818,11 +814,7 @@ protected void initialize() { return FaceletViewHandlingStrategy.this.createComponentMetadata(context, ccResource); }); - try { - responseBufferSize = Integer.parseInt(webConfig.getOptionValue(FaceletsBufferSize)); - } catch (NumberFormatException nfe) { - responseBufferSize = Integer.parseInt(FaceletsBufferSize.getDefaultValue()); - } + responseBufferSize = ContextParam.FACELETS_BUFFER_SIZE.getValue(FacesContext.getCurrentInstance()); LOGGER.fine("Initialization Successful"); @@ -849,12 +841,9 @@ protected void initialize() { * Initialize mappings, during the first request. */ protected void initializeMappings() { - String viewMappings = webConfig.getOptionValue(FaceletsViewMappings); - if (viewMappings != null && viewMappings.length() > 0) { - Map appMap = FacesContext.getCurrentInstance().getExternalContext().getApplicationMap(); - - String[] mappingsArray = split(appMap, viewMappings, ";"); - + FacesContext context = FacesContext.getCurrentInstance(); + String[] mappingsArray = ContextParam.FACELETS_VIEW_MAPPINGS.getValue(context); + if (mappingsArray.length > 0) { List extensionsList = new ArrayList<>(mappingsArray.length); List prefixesList = new ArrayList<>(mappingsArray.length); @@ -942,7 +931,7 @@ protected void handleRenderException(FacesContext context, Exception e) throws I if (LOGGER.isLoggable(FINE)) { UIViewRoot root = context.getViewRoot(); - StringBuffer sb = new StringBuffer(64); + StringBuilder sb = new StringBuilder(64); sb.append("Error Rendering View"); if (root != null) { sb.append('['); @@ -1420,7 +1409,7 @@ public void retarget(FacesContext ctx, CompCompInterfaceMethodMetadata metadata, String expr = sourceValue instanceof ValueExpression ? ((ValueExpression) sourceValue).getExpressionString() : sourceValue.toString(); ExpressionFactory f = ctx.getApplication().getExpressionFactory(); MethodExpression me = f.createMethodExpression(ctx.getELContext(), expr, Object.class, NO_ARGS); - ((ActionSource2) target).setActionExpression( + ((ActionSource) target).setActionExpression( new ContextualCompositeMethodExpression(sourceValue instanceof ValueExpression ? (ValueExpression) sourceValue : null, me)); } @@ -1450,7 +1439,7 @@ public void retarget(FacesContext ctx, CompCompInterfaceMethodMetadata metadata, MethodExpression me = f.createMethodExpression(ctx.getELContext(), ve.getExpressionString(), Void.TYPE, ACTION_LISTENER_ARGS); MethodExpression noArg = f.createMethodExpression(ctx.getELContext(), ve.getExpressionString(), Void.TYPE, NO_ARGS); - ((ActionSource2) target).addActionListener(new MethodExpressionActionListener(new ContextualCompositeMethodExpression(ve, me), + ((ActionSource) target).addActionListener(new MethodExpressionActionListener(new ContextualCompositeMethodExpression(ve, me), new ContextualCompositeMethodExpression(ve, noArg))); } @@ -1814,7 +1803,7 @@ private void reapplyDynamicRemove(FacesContext context, ComponentStruct struct) * @return true if we are, false otherwise. */ private boolean isServerStateSaving() { - if (STATE_SAVING_METHOD_SERVER.equals(webConfig.getOptionValue(StateSavingMethod))) { + if (StateSavingMethod.SERVER == ContextParam.STATE_SAVING_METHOD.getValue(FacesContext.getCurrentInstance())) { return true; } @@ -1851,22 +1840,18 @@ private DefaultFaceletFactory getFaceletFactory() { } private boolean isMatchedWithFaceletsSuffix(String viewId) { - String[] defaultsuffixes = webConfig.getOptionValue(WebConfiguration.WebContextInitParameter.FaceletsSuffix, " "); - for (String suffix : defaultsuffixes) { - if (viewId.endsWith(suffix)) { - return true; - } + String suffix = ContextParam.FACELETS_SUFFIX.getValue(FacesContext.getCurrentInstance()); + if (viewId.endsWith(suffix)) { + return true; } return false; } private String getMatchedWithFaceletsSuffix(String viewId) { - String[] defaultsuffixes = webConfig.getOptionValue(WebConfiguration.WebContextInitParameter.FaceletsSuffix, " "); - for (String suffix : defaultsuffixes) { - if (viewId.endsWith(suffix)) { - return suffix; - } + String suffix = ContextParam.FACELETS_SUFFIX.getValue(FacesContext.getCurrentInstance()); + if (viewId.endsWith(suffix)) { + return suffix; } return null; diff --git a/impl/src/main/java/com/sun/faces/application/view/FormOmittedChecker.java b/impl/src/main/java/com/sun/faces/application/view/FormOmittedChecker.java index 2463b52c39..2fae8d54da 100644 --- a/impl/src/main/java/com/sun/faces/application/view/FormOmittedChecker.java +++ b/impl/src/main/java/com/sun/faces/application/view/FormOmittedChecker.java @@ -26,7 +26,6 @@ import jakarta.faces.application.FacesMessage; import jakarta.faces.component.ActionSource; -import jakarta.faces.component.ActionSource2; import jakarta.faces.component.EditableValueHolder; import jakarta.faces.component.UIComponent; import jakarta.faces.component.UIForm; @@ -100,7 +99,7 @@ private static boolean isForm(UIComponent component) { * @return true if the component is in need of a form, false otherwise. */ private static boolean isInNeedOfForm(UIComponent component) { - return component instanceof ActionSource || component instanceof ActionSource2 || component instanceof EditableValueHolder; + return component instanceof ActionSource || component instanceof EditableValueHolder; } /** diff --git a/impl/src/main/java/com/sun/faces/application/view/MultiViewHandler.java b/impl/src/main/java/com/sun/faces/application/view/MultiViewHandler.java index 89f34122ca..439265168d 100644 --- a/impl/src/main/java/com/sun/faces/application/view/MultiViewHandler.java +++ b/impl/src/main/java/com/sun/faces/application/view/MultiViewHandler.java @@ -34,6 +34,7 @@ import static jakarta.servlet.http.MappingMatch.EXACT; import static jakarta.servlet.http.MappingMatch.EXTENSION; import static jakarta.servlet.http.MappingMatch.PATH; +import static java.util.Arrays.asList; import static java.util.Collections.unmodifiableSet; import static java.util.Objects.requireNonNull; import static java.util.logging.Level.SEVERE; @@ -56,12 +57,12 @@ import java.util.logging.Logger; import java.util.stream.Stream; -import com.sun.faces.config.WebConfiguration; import com.sun.faces.util.FacesLogger; import com.sun.faces.util.Util; import jakarta.faces.FacesException; import jakarta.faces.FactoryFinder; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.application.ViewHandler; import jakarta.faces.application.ViewVisitOption; import jakarta.faces.component.UIViewParameter; @@ -82,17 +83,16 @@ public class MultiViewHandler extends ViewHandler { // Log instance for this class private static final Logger LOGGER = FacesLogger.APPLICATION.getLogger(); - private List configuredExtensions; - private Set protectedViews; + private final List configuredExtensions; + private final Set protectedViews; - private ViewDeclarationLanguageFactory vdlFactory; + private final ViewDeclarationLanguageFactory vdlFactory; // ------------------------------------------------------------ Constructors public MultiViewHandler() { - WebConfiguration config = WebConfiguration.getInstance(); - - configuredExtensions = config.getConfiguredExtensions(); + String faceletsSuffix = ContextParam.FACELETS_SUFFIX.getValue(FacesContext.getCurrentInstance()); + configuredExtensions = asList(faceletsSuffix); vdlFactory = (ViewDeclarationLanguageFactory) FactoryFinder.getFactory(VIEW_DECLARATION_LANGUAGE_FACTORY); protectedViews = new CopyOnWriteArraySet<>(); } @@ -562,11 +562,7 @@ protected void addViewParameters(FacesContext ctx, String viewId, Map existing = existingParameters.get(viewParam.getName()); - if (existing == null) { - existing = new ArrayList<>(4); - existingParameters.put(viewParam.getName(), existing); - } + List existing = existingParameters.computeIfAbsent(viewParam.getName(), k -> new ArrayList<>(4)); existing.add(value); } } diff --git a/impl/src/main/java/com/sun/faces/application/view/ViewMetadataImpl.java b/impl/src/main/java/com/sun/faces/application/view/ViewMetadataImpl.java index 999d513360..1f9f06d034 100644 --- a/impl/src/main/java/com/sun/faces/application/view/ViewMetadataImpl.java +++ b/impl/src/main/java/com/sun/faces/application/view/ViewMetadataImpl.java @@ -47,7 +47,7 @@ */ public class ViewMetadataImpl extends ViewMetadata { - private String viewId; + private final String viewId; private DefaultFaceletFactory faceletFactory; // ---------------------------------------------------------------------------------------------------- Constructors diff --git a/impl/src/main/java/com/sun/faces/application/view/ViewScopeManager.java b/impl/src/main/java/com/sun/faces/application/view/ViewScopeManager.java index e43d03d757..cbeb3446b0 100644 --- a/impl/src/main/java/com/sun/faces/application/view/ViewScopeManager.java +++ b/impl/src/main/java/com/sun/faces/application/view/ViewScopeManager.java @@ -76,9 +76,9 @@ public class ViewScopeManager implements HttpSessionListener, ViewMapListener { /** * Stores the CDI context manager. */ - private ViewScopeContextManager contextManager; + private final ViewScopeContextManager contextManager; - private boolean distributable; + private final boolean distributable; private Integer numberOfActiveViewMapsInWebXml; diff --git a/impl/src/main/java/com/sun/faces/application/view/WriteBehindStateWriter.java b/impl/src/main/java/com/sun/faces/application/view/WriteBehindStateWriter.java index 8423dd268c..25bc11c203 100644 --- a/impl/src/main/java/com/sun/faces/application/view/WriteBehindStateWriter.java +++ b/impl/src/main/java/com/sun/faces/application/view/WriteBehindStateWriter.java @@ -43,12 +43,12 @@ final class WriteBehindStateWriter extends Writer { private static final ThreadLocal CUR_WRITER = new ThreadLocal<>(); private Writer out; - private Writer orig; + private final Writer orig; private FastStringWriter fWriter; private boolean stateWritten; - private int bufSize; - private char[] buf; - private FacesContext context; + private final int bufSize; + private final char[] buf; + private final FacesContext context; private Object state; // -------------------------------------------------------- Constructors @@ -87,7 +87,7 @@ public void write(int c) throws IOException { * @see Writer#write(char[]) */ @Override - public void write(char cbuf[]) throws IOException { + public void write(char[] cbuf) throws IOException { out.write(cbuf); } @@ -117,7 +117,7 @@ public void write(String str, int off, int len) throws IOException { * @see Writer#write(char[], int, int) */ @Override - public void write(char cbuf[], int off, int len) throws IOException { + public void write(char[] cbuf, int off, int len) throws IOException { out.write(cbuf, off, len); } @@ -207,7 +207,7 @@ public void flushToWriter() throws IOException { int len = tildeIdx - pos; orig.write(buf, 0, len); // Now check to see if the state saving string is - // at the begining of pos, if so, write our + // at the beginning of pos, if so, write our // state out. if (builder.indexOf(RIConstants.SAVESTATE_FIELD_MARKER, pos) == tildeIdx) { // buf is effectively zero'd out at this point diff --git a/impl/src/main/java/com/sun/faces/cdi/CdiExtension.java b/impl/src/main/java/com/sun/faces/cdi/CdiExtension.java index a228870ce2..39236adca8 100644 --- a/impl/src/main/java/com/sun/faces/cdi/CdiExtension.java +++ b/impl/src/main/java/com/sun/faces/cdi/CdiExtension.java @@ -76,7 +76,7 @@ public class CdiExtension implements Extension { /** * Map of {@code @ManagedProperty} target types */ - private Set managedPropertyTargetTypes = new HashSet<>(); + private final Set managedPropertyTargetTypes = new HashSet<>(); /** * Stores the logger. @@ -184,6 +184,7 @@ public void afterBeanDiscovery(@Observes AfterBeanDiscovery afterBeanDiscovery, afterBeanDiscovery.addBean(new CompositeComponentProducer(beanManager)); afterBeanDiscovery.addBean(new ComponentProducer(beanManager)); afterBeanDiscovery.addBean(new FlashProducer(beanManager)); + afterBeanDiscovery.addBean(new FlowProducer(beanManager)); afterBeanDiscovery.addBean(new FlowMapProducer(beanManager)); afterBeanDiscovery.addBean(new HeaderMapProducer(beanManager)); afterBeanDiscovery.addBean(new HeaderValuesMapProducer(beanManager)); diff --git a/impl/src/main/java/com/sun/faces/cdi/CdiUtils.java b/impl/src/main/java/com/sun/faces/cdi/CdiUtils.java index a6e12a9046..d82e3bc460 100644 --- a/impl/src/main/java/com/sun/faces/cdi/CdiUtils.java +++ b/impl/src/main/java/com/sun/faces/cdi/CdiUtils.java @@ -261,10 +261,7 @@ private static String getBeanName(Bean bean) { String className = bean.getBeanClass().getSimpleName(); - return new StringBuilder() - .append(Character.toLowerCase(className.charAt(0))) - .append(className.substring(1)) - .toString(); + return Character.toLowerCase(className.charAt(0)) + className.substring(1); } /** diff --git a/impl/src/main/java/com/sun/faces/cdi/FlowProducer.java b/impl/src/main/java/com/sun/faces/cdi/FlowProducer.java new file mode 100644 index 0000000000..323feb96ed --- /dev/null +++ b/impl/src/main/java/com/sun/faces/cdi/FlowProducer.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.faces.cdi; + +import jakarta.enterprise.context.RequestScoped; +import jakarta.enterprise.inject.spi.BeanManager; +import jakarta.faces.context.FacesContext; +import jakarta.faces.flow.Flow; +import jakarta.faces.flow.FlowHandler; + +/** + *

    + * {@code FlowProducer} is the CDI producer that allows injection of the {@link Flow} using {@code @Inject}. + *

    + * + * @since 4.1 + * @see FlowHandler#getCurrentFlow() + */ +public class FlowProducer extends CdiProducer { + + private static final long serialVersionUID = 1L; + + public FlowProducer(BeanManager beanManager) { + super.name("flow").scope(RequestScoped.class).beanClass(beanManager, Flow.class).types(Flow.class) + .create(e -> FacesContext.getCurrentInstance().getApplication().getFlowHandler().getCurrentFlow()); + } + +} diff --git a/impl/src/main/java/com/sun/faces/cdi/clientwindow/ClientWindowScopeContext.java b/impl/src/main/java/com/sun/faces/cdi/clientwindow/ClientWindowScopeContext.java index 3f1611891b..f428677057 100644 --- a/impl/src/main/java/com/sun/faces/cdi/clientwindow/ClientWindowScopeContext.java +++ b/impl/src/main/java/com/sun/faces/cdi/clientwindow/ClientWindowScopeContext.java @@ -15,6 +15,13 @@ */ package com.sun.faces.cdi.clientwindow; +import static java.util.logging.Level.FINEST; +import static java.util.logging.Level.SEVERE; + +import java.io.Serializable; +import java.lang.annotation.Annotation; +import java.util.logging.Logger; + import jakarta.enterprise.context.ContextNotActiveException; import jakarta.enterprise.context.spi.Context; import jakarta.enterprise.context.spi.Contextual; @@ -23,13 +30,6 @@ import jakarta.faces.context.FacesContext; import jakarta.faces.lifecycle.ClientWindowScoped; -import java.io.Serializable; -import java.lang.annotation.Annotation; -import java.util.logging.Logger; - -import static java.util.logging.Level.FINEST; -import static java.util.logging.Level.SEVERE; - /** * The CDI context for CDI ClientWindowScoped beans. */ diff --git a/impl/src/main/java/com/sun/faces/cdi/clientwindow/ClientWindowScopeContextManager.java b/impl/src/main/java/com/sun/faces/cdi/clientwindow/ClientWindowScopeContextManager.java index 6f6d234681..4498624a65 100644 --- a/impl/src/main/java/com/sun/faces/cdi/clientwindow/ClientWindowScopeContextManager.java +++ b/impl/src/main/java/com/sun/faces/cdi/clientwindow/ClientWindowScopeContextManager.java @@ -18,14 +18,12 @@ package com.sun.faces.cdi.clientwindow; import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.EnableDistributable; -import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.NumberOfClientWindows; import static com.sun.faces.context.SessionMap.getMutex; import static java.util.logging.Level.FINEST; import java.util.Collections; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Level; import java.util.logging.Logger; import com.sun.faces.config.WebConfiguration; @@ -35,6 +33,7 @@ import jakarta.enterprise.context.spi.Contextual; import jakarta.enterprise.context.spi.CreationalContext; import jakarta.enterprise.inject.spi.PassivationCapable; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.context.ExternalContext; import jakarta.faces.context.FacesContext; import jakarta.servlet.http.HttpSession; @@ -144,19 +143,7 @@ private Map getContextMap(FacesContext f String clientWindowId = getCurrentClientWindowId(facesContext); if (clientWindowScopeContexts == null && create) { - Integer numberOfClientWindows = null; - - try { - numberOfClientWindows = Integer.parseInt(WebConfiguration.getInstance(externalContext).getOptionValue(NumberOfClientWindows)); - } catch (NumberFormatException nfe) { - if (LOGGER.isLoggable(Level.WARNING)) { - LOGGER.log(Level.WARNING, "Unable to set number of client windows. Defaulting to {0}", NumberOfClientWindows.getDefaultValue()); - } - } - - if (numberOfClientWindows == null) { - numberOfClientWindows = Integer.valueOf(NumberOfClientWindows.getDefaultValue()); - } + int numberOfClientWindows = ContextParam.NUMBER_OF_CLIENT_WINDOWS.getValue(facesContext); synchronized (getMutex(session)) { sessionMap.put(CLIENT_WINDOW_CONTEXTS, Collections.synchronizedMap(new LRUMap(numberOfClientWindows))); diff --git a/impl/src/main/java/com/sun/faces/cdi/clientwindow/ClientWindowScopeExtension.java b/impl/src/main/java/com/sun/faces/cdi/clientwindow/ClientWindowScopeExtension.java index 864e85107b..3f235287c6 100644 --- a/impl/src/main/java/com/sun/faces/cdi/clientwindow/ClientWindowScopeExtension.java +++ b/impl/src/main/java/com/sun/faces/cdi/clientwindow/ClientWindowScopeExtension.java @@ -15,14 +15,19 @@ */ package com.sun.faces.cdi.clientwindow; -import com.sun.faces.util.FacesLogger; -import jakarta.enterprise.event.Observes; -import jakarta.enterprise.inject.spi.*; -import jakarta.faces.lifecycle.ClientWindowScoped; +import static com.sun.faces.cdi.CdiUtils.addAnnotatedTypes; import java.util.logging.Logger; -import static com.sun.faces.cdi.CdiUtils.addAnnotatedTypes; +import com.sun.faces.util.FacesLogger; + +import jakarta.enterprise.event.Observes; +import jakarta.enterprise.inject.spi.AfterBeanDiscovery; +import jakarta.enterprise.inject.spi.BeanManager; +import jakarta.enterprise.inject.spi.BeforeBeanDiscovery; +import jakarta.enterprise.inject.spi.Extension; +import jakarta.enterprise.inject.spi.ProcessBean; +import jakarta.faces.lifecycle.ClientWindowScoped; public class ClientWindowScopeExtension implements Extension { diff --git a/impl/src/main/java/com/sun/faces/cdi/clientwindow/ClientWindowScopeManager.java b/impl/src/main/java/com/sun/faces/cdi/clientwindow/ClientWindowScopeManager.java index 1e70b97bea..61af6a3ad5 100644 --- a/impl/src/main/java/com/sun/faces/cdi/clientwindow/ClientWindowScopeManager.java +++ b/impl/src/main/java/com/sun/faces/cdi/clientwindow/ClientWindowScopeManager.java @@ -16,13 +16,13 @@ package com.sun.faces.cdi.clientwindow; -import jakarta.faces.context.FacesContext; -import jakarta.servlet.http.HttpSessionEvent; -import jakarta.servlet.http.HttpSessionListener; +import static java.util.logging.Level.FINEST; import java.util.logging.Logger; -import static java.util.logging.Level.*; +import jakarta.faces.context.FacesContext; +import jakarta.servlet.http.HttpSessionEvent; +import jakarta.servlet.http.HttpSessionListener; /** * The manager that deals with non-CDI and CDI ClientWindowScoped beans. diff --git a/impl/src/main/java/com/sun/faces/component/CompositeComponentStackManager.java b/impl/src/main/java/com/sun/faces/component/CompositeComponentStackManager.java index 203382e111..08cd96a9c6 100644 --- a/impl/src/main/java/com/sun/faces/component/CompositeComponentStackManager.java +++ b/impl/src/main/java/com/sun/faces/component/CompositeComponentStackManager.java @@ -52,8 +52,8 @@ public enum StackType { TreeCreation, Evaluation } - private StackHandler treeCreation = new TreeCreationStackHandler(); - private StackHandler runtime = new RuntimeStackHandler(); + private final StackHandler treeCreation = new TreeCreationStackHandler(); + private final StackHandler runtime = new RuntimeStackHandler(); // ------------------------------------------------------------ Constructors @@ -281,7 +281,7 @@ private final class RuntimeStackHandler extends BaseStackHandler { @Override public void delete() { - Stack s = getStack(false); + Stack s = getStack(false); if (s != null) { s.clear(); } @@ -291,7 +291,7 @@ public void delete() { @Override public void pop() { - Stack s = getStack(false); + Stack s = getStack(false); if (s != null && !s.isEmpty()) { s.pop(); } @@ -371,7 +371,7 @@ private final class TreeCreationStackHandler extends BaseStackHandler { @Override public void pop() { - Stack s = getStack(false); + Stack s = getStack(false); if (s != null && !stack.isEmpty()) { stack.pop(); if (stack.isEmpty()) { diff --git a/impl/src/main/java/com/sun/faces/component/PassthroughElement.java b/impl/src/main/java/com/sun/faces/component/PassthroughElement.java index 98ef132021..c6662d36b5 100644 --- a/impl/src/main/java/com/sun/faces/component/PassthroughElement.java +++ b/impl/src/main/java/com/sun/faces/component/PassthroughElement.java @@ -16,14 +16,15 @@ package com.sun.faces.component; +import static jakarta.faces.component.html.HtmlEvents.getHtmlBodyElementEventNames; + import java.util.ArrayList; -import java.util.Arrays; import java.util.Collection; -import java.util.Collections; import java.util.List; import jakarta.el.ValueExpression; import jakarta.faces.component.behavior.ClientBehaviorHolder; +import jakarta.faces.component.html.HtmlEvents.HtmlDocumentElementEvent; /** *

    @@ -357,17 +358,14 @@ public void setStyleClass(java.lang.String styleClass) { getStateHelper().put(PropertyKeys.styleClass, styleClass); } - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection( - Arrays.asList("click", "dblclick", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup")); - @Override public Collection getEventNames() { - return EVENT_NAMES; + return getHtmlBodyElementEventNames(getFacesContext()); } @Override public String getDefaultEventName() { - return "click"; + return HtmlDocumentElementEvent.click.name(); } // TODO The same as jakarta.faces.component.html.HtmlComponentUtils#handleAttribute @@ -376,7 +374,7 @@ private void handleAttribute(String name, Object value) { List setAttributes = (List) getAttributes().get("jakarta.faces.component.UIComponentBase.attributesThatAreSet"); if (setAttributes == null) { String cname = this.getClass().getName(); - if (cname != null && cname.startsWith(OPTIMIZED_PACKAGE)) { + if (cname.startsWith(OPTIMIZED_PACKAGE)) { setAttributes = new ArrayList<>(6); getAttributes().put("jakarta.faces.component.UIComponentBase.attributesThatAreSet", setAttributes); } diff --git a/impl/src/main/java/com/sun/faces/component/search/CompositeSearchKeywordResolver.java b/impl/src/main/java/com/sun/faces/component/search/CompositeSearchKeywordResolver.java index 9f8deb680f..c1c86e2a13 100644 --- a/impl/src/main/java/com/sun/faces/component/search/CompositeSearchKeywordResolver.java +++ b/impl/src/main/java/com/sun/faces/component/search/CompositeSearchKeywordResolver.java @@ -46,8 +46,7 @@ public void add(SearchKeywordResolver searchKeywordResolver) { public void resolve(SearchKeywordContext context, UIComponent current, String keyword) { context.setKeywordResolved(false); - for (int i = 0; i < resolvers.size(); i++) { - SearchKeywordResolver resolver = resolvers.get(i); + for (SearchKeywordResolver resolver : resolvers) { if (resolver.isResolverForKeyword(context.getSearchExpressionContext(), keyword)) { resolver.resolve(context, current, keyword); if (context.isKeywordResolved()) { @@ -59,8 +58,7 @@ public void resolve(SearchKeywordContext context, UIComponent current, String ke @Override public boolean isResolverForKeyword(SearchExpressionContext searchExpressionContext, String keyword) { - for (int i = 0; i < resolvers.size(); i++) { - SearchKeywordResolver resolver = resolvers.get(i); + for (SearchKeywordResolver resolver : resolvers) { if (resolver.isResolverForKeyword(searchExpressionContext, keyword)) { return true; } @@ -71,8 +69,7 @@ public boolean isResolverForKeyword(SearchExpressionContext searchExpressionCont @Override public boolean isPassthrough(SearchExpressionContext searchExpressionContext, String keyword) { - for (int i = 0; i < resolvers.size(); i++) { - SearchKeywordResolver resolver = resolvers.get(i); + for (SearchKeywordResolver resolver : resolvers) { if (resolver.isResolverForKeyword(searchExpressionContext, keyword)) { return resolver.isPassthrough(searchExpressionContext, keyword); } @@ -83,8 +80,7 @@ public boolean isPassthrough(SearchExpressionContext searchExpressionContext, St @Override public boolean isLeaf(SearchExpressionContext searchExpressionContext, String keyword) { - for (int i = 0; i < resolvers.size(); i++) { - SearchKeywordResolver resolver = resolvers.get(i); + for (SearchKeywordResolver resolver : resolvers) { if (resolver.isResolverForKeyword(searchExpressionContext, keyword)) { return resolver.isLeaf(searchExpressionContext, keyword); } diff --git a/impl/src/main/java/com/sun/faces/component/search/SearchExpressionHandlerImpl.java b/impl/src/main/java/com/sun/faces/component/search/SearchExpressionHandlerImpl.java index f12fb58297..e701e0e793 100644 --- a/impl/src/main/java/com/sun/faces/component/search/SearchExpressionHandlerImpl.java +++ b/impl/src/main/java/com/sun/faces/component/search/SearchExpressionHandlerImpl.java @@ -34,10 +34,8 @@ public class SearchExpressionHandlerImpl extends SearchExpressionHandler { protected void addHint(SearchExpressionContext searchExpressionContext, SearchExpressionHint hint) { - // It is a Set already - if (!searchExpressionContext.getExpressionHints().contains(hint)) { - searchExpressionContext.getExpressionHints().add(hint); - } + // It is a Set already, it will add only if just not contains the hint + searchExpressionContext.getExpressionHints().add(hint); } @Override diff --git a/impl/src/main/java/com/sun/faces/component/validator/ComponentValidators.java b/impl/src/main/java/com/sun/faces/component/validator/ComponentValidators.java index dc897b7186..25b7c19aea 100644 --- a/impl/src/main/java/com/sun/faces/component/validator/ComponentValidators.java +++ b/impl/src/main/java/com/sun/faces/component/validator/ComponentValidators.java @@ -138,18 +138,14 @@ public void addValidators(FacesContext ctx, EditableValueHolder editableValueHol Set keySet = defaultValidatorInfo.keySet(); List validatorIds = new ArrayList<>(keySet.size()); - for (String key : keySet) { - validatorIds.add(key); - } + validatorIds.addAll(keySet); Set disabledIds = (Set) RequestStateManager.remove(ctx, RequestStateManager.DISABLED_VALIDATORS); int count = validatorStack.size(); for (int i = count - 1; i >= 0; i--) { ValidatorInfo info = validatorStack.get(i); if (!info.isEnabled() || disabledIds != null && disabledIds.contains(info.getValidatorId())) { - if (validatorIds.contains(info.getValidatorId())) { - validatorIds.remove(info.getValidatorId()); - } + validatorIds.remove(info.getValidatorId()); } else { if (!validatorIds.contains(info.getValidatorId())) { validatorIds.add(info.getValidatorId()); @@ -209,11 +205,11 @@ private static void addValidatorsToComponent(FacesContext ctx, Collection defaultValidatorInfo = application.getDefaultValidatorInfo(); - Validator[] validators = editableValueHolder.getValidators(); + Validator[] validators = editableValueHolder.getValidators(); // check to make sure that Validator instances haven't already // been added. for (Map.Entry defaultValidator : defaultValidatorInfo.entrySet()) { - for (Validator validator : validators) { + for (Validator validator : validators) { if (defaultValidator.getValue().equals(validator.getClass().getName())) { validatorIds.remove(defaultValidator.getKey()); break; @@ -224,7 +220,7 @@ private static void addValidatorsToComponent(FacesContext ctx, Collection v = application.createValidator(id); // work backwards up the stack of ValidatorInfo to find the // nearest matching ValidatorInfo to apply attributes if (validatorStack != null) { @@ -248,10 +244,10 @@ private static void addValidatorsToComponent(FacesContext ctx, Collection hints; + private final Set hints; } diff --git a/impl/src/main/java/com/sun/faces/component/visit/PartialVisitContext.java b/impl/src/main/java/com/sun/faces/component/visit/PartialVisitContext.java index ff6e7d9386..4aaf92fe92 100644 --- a/impl/src/main/java/com/sun/faces/component/visit/PartialVisitContext.java +++ b/impl/src/main/java/com/sun/faces/component/visit/PartialVisitContext.java @@ -230,7 +230,7 @@ private void initializeCollections(Collection clientIds) { // Initialize ids collection ids = new HashSet<>(); - // Intialize subtreeClientIds collection + // Initialize subtreeClientIds collection subtreeClientIds = new HashMap<>(); // Initialize the clientIds collection. Note that we proxy @@ -265,8 +265,8 @@ private String getVisitId(UIComponent component) { return clientIds.contains(clientId) ? clientId : null; } - // Converts an client id into a plain old id by ripping - // out the trailing id segmetn. + // Converts a client id into a plain old id by ripping + // out the trailing id segment. private String getIdFromClientId(String clientId) { FacesContext facesContext = getFacesContext(); char separator = UINamingContainer.getSeparatorChar(facesContext); @@ -309,12 +309,7 @@ private void addSubtreeClientId(String clientId) { // NamingContainer client id. If not, create the // Collection for this NamingContainer client id and // stash it away in our map - Collection c = subtreeClientIds.get(namingContainerClientId); - - if (c == null) { - c = new ArrayList<>(); - subtreeClientIds.put(namingContainerClientId, c); - } + Collection c = subtreeClientIds.computeIfAbsent(namingContainerClientId, k -> new ArrayList<>()); // Stash away the client id c.add(clientId); @@ -373,7 +368,7 @@ public boolean add(E o) { return added; } - private Collection wrapped; + private final Collection wrapped; } // Little proxy iterator implementation used by CollectionProxy @@ -405,7 +400,7 @@ public void remove() { wrapped.remove(); } - private Iterator wrapped; + private final Iterator wrapped; private E current = null; } @@ -426,8 +421,8 @@ public void remove() { private Map> subtreeClientIds; // The FacesContext for this request - private FacesContext facesContext; + private final FacesContext facesContext; // Our visit hints - private Set hints; + private final Set hints; } diff --git a/impl/src/main/java/com/sun/faces/config/ConfigManager.java b/impl/src/main/java/com/sun/faces/config/ConfigManager.java index 99591b0bb5..5e1a2ef4bb 100644 --- a/impl/src/main/java/com/sun/faces/config/ConfigManager.java +++ b/impl/src/main/java/com/sun/faces/config/ConfigManager.java @@ -128,10 +128,9 @@ public class ConfigManager { * when the application is destroyed. *

    */ - private List initializedContexts = new CopyOnWriteArrayList<>(); + private final List initializedContexts = new CopyOnWriteArrayList<>(); - private final List configProcessors = unmodifiableList( - asList( + private final List configProcessors = List.of( new FactoryConfigProcessor(), new LifecycleConfigProcessor(), new ApplicationConfigProcessor(), @@ -144,7 +143,7 @@ public class ConfigManager { new FacesConfigExtensionProcessor(), new ProtectedViewsConfigProcessor(), new FacesFlowDefinitionConfigProcessor(), - new ResourceLibraryContractsConfigProcessor())); + new ResourceLibraryContractsConfigProcessor()); /** *

    @@ -152,8 +151,8 @@ public class ConfigManager { * Mojarra, and two other providers to satisfy the requirements of the specification. *

    */ - private final List facesConfigProviders = unmodifiableList( - asList(new MetaInfFacesConfigResourceProvider(), new WebAppFlowConfigResourceProvider(), new WebFacesConfigResourceProvider())); + private final List facesConfigProviders = List.of( + new MetaInfFacesConfigResourceProvider(), new WebAppFlowConfigResourceProvider(), new WebFacesConfigResourceProvider()); /** *

    @@ -161,8 +160,8 @@ public class ConfigManager { * Mojarra, and one other providers to satisfy the requirements of the specification. *

    */ - private final List facesletsTagLibConfigProviders = unmodifiableList( - asList(new MetaInfFaceletTaglibraryConfigProvider(), new WebFaceletTaglibResourceProvider())); + private final List facesletsTagLibConfigProviders = List.of( + new MetaInfFaceletTaglibraryConfigProvider(), new WebFaceletTaglibResourceProvider()); /** *

    @@ -224,7 +223,7 @@ public void initialize(ServletContext servletContext, InitFacesContext facesCont if (!hasBeenInitialized(servletContext)) { initializedContexts.add(servletContext); - initializeConfigProcessers(servletContext, facesContext); + initializeConfigProcessors(servletContext, facesContext); ExecutorService executor = null; try { @@ -299,6 +298,7 @@ public void initialize(ServletContext servletContext, InitFacesContext facesCont } finally { if (currentThreadId != parentThreadId) { Thread.currentThread().setContextClassLoader(null); + initFacesContext.releaseCurrentInstance(); if (parentWebContext != null) { threadContext.clearChildContext(); } @@ -394,7 +394,7 @@ private List getConfigurationResourceProviders(Li return unmodifiableList(providers); } - private void initializeConfigProcessers(ServletContext servletContext, FacesContext facesContext) { + private void initializeConfigProcessors(ServletContext servletContext, FacesContext facesContext) { configProcessors.stream().parallel().forEach(e -> e.initializeClassMetadataMap(servletContext, facesContext)); } @@ -403,7 +403,7 @@ private List getConfigPopulators() { configPopulators.add(new MojarraRuntimePopulator()); - ServiceLoader.load(ApplicationConfigurationPopulator.class).forEach(e -> configPopulators.add(e)); + ServiceLoader.load(ApplicationConfigurationPopulator.class).forEach(configPopulators::add); return configPopulators; } @@ -413,10 +413,10 @@ private List getConfigPopulators() { * instance. */ void publishPostConfigEvent() { - FacesContext facesContext = FacesContext.getCurrentInstance(); + InitFacesContext facesContext = (InitFacesContext) FacesContext.getCurrentInstance(); Application application = facesContext.getApplication(); - if (((InitFacesContext) facesContext).getELContext() == null) { + if ( facesContext.getELContext() == null) { ELContext elContext = new ELContextImpl(facesContext); ELContextListener[] listeners = application.getELContextListeners(); @@ -427,7 +427,7 @@ void publishPostConfigEvent() { } } - ((InitFacesContext) facesContext).setELContext(elContext); + facesContext.setELContext(elContext); } application.publishEvent(facesContext, PostConstructApplicationEvent.class, Application.class, application); @@ -477,7 +477,7 @@ private void releaseFactories() { * @param servletContext the ServletContext for the application that needs to be removed */ public void destroy(ServletContext servletContext, FacesContext facesContext) { - configProcessors.stream().forEach(e -> e.destroy(servletContext, facesContext)); + configProcessors.forEach( processor -> processor.destroy(servletContext, facesContext) ); initializedContexts.remove(servletContext); } diff --git a/impl/src/main/java/com/sun/faces/config/ConfigureListener.java b/impl/src/main/java/com/sun/faces/config/ConfigureListener.java index 12661b51f3..8122611911 100644 --- a/impl/src/main/java/com/sun/faces/config/ConfigureListener.java +++ b/impl/src/main/java/com/sun/faces/config/ConfigureListener.java @@ -20,13 +20,10 @@ import static com.sun.faces.RIConstants.ERROR_PAGE_PRESENT_KEY_NAME; import static com.sun.faces.RIConstants.FACES_SERVLET_MAPPINGS; import static com.sun.faces.RIConstants.FACES_SERVLET_REGISTRATION; -import static com.sun.faces.config.InitFacesContext.getInitContextServletContextMap; import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.EnableLazyBeanValidation; import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.EnableThreading; -import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.EnableWebsocketEndpoint; import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.ForceLoadFacesConfigFiles; import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.VerifyFacesConfigObjects; -import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.JakartaFacesProjectStage; import static com.sun.faces.context.SessionMap.createMutex; import static com.sun.faces.context.SessionMap.removeMutex; import static com.sun.faces.push.WebsocketEndpoint.URI_TEMPLATE; @@ -49,7 +46,6 @@ import java.util.Enumeration; import java.util.Iterator; import java.util.List; -import java.util.Map.Entry; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.logging.Logger; @@ -75,7 +71,9 @@ import jakarta.el.ELManager; import jakarta.faces.FactoryFinder; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.application.Application; +import jakarta.faces.application.ProjectStage; import jakarta.faces.context.FacesContext; import jakarta.faces.event.PreDestroyApplicationEvent; import jakarta.servlet.ServletContext; @@ -143,7 +141,7 @@ public void contextInitialized(ServletContextEvent servletContextEvent) { WebConfiguration.clear(servletContext); configManager.destroy(servletContext, initFacesContext); ConfigManager.removeInstance(servletContext); - InitFacesContext.cleanupInitMaps(servletContext); + initFacesContext.release(); return; } @@ -217,7 +215,7 @@ public void contextInitialized(ServletContextEvent servletContextEvent) { // Register websocket endpoint if explicitly enabled. // Note: websocket channel filter is registered in FacesInitializer. - if (webConfig.isOptionEnabled(EnableWebsocketEndpoint)) { + if (ContextParam.ENABLE_WEBSOCKET_ENDPOINT.isSet(initFacesContext)) { ServerContainer serverContainer = (ServerContainer) servletContext.getAttribute(ServerContainer.class.getName()); if (serverContainer == null) { @@ -274,11 +272,11 @@ public void contextDestroyed(ServletContextEvent sce) { InitFacesContext initContext = null; try { - initContext = getInitFacesContext(context); - if (initContext == null) { - initContext = new InitFacesContext(context); + FacesContext facesContext = FacesContext.getCurrentInstance(); + if (facesContext instanceof InitFacesContext) { + initContext = (InitFacesContext) facesContext; } else { - InitFacesContext.getThreadInitContextMap().put(Thread.currentThread(), initContext); + initContext = new InitFacesContext(context); } if (webAppListener != null) { @@ -325,7 +323,9 @@ public void contextDestroyed(ServletContextEvent sce) { FactoryFinder.releaseFactories(); ReflectionUtils.clearCache(Thread.currentThread().getContextClassLoader()); WebConfiguration.clear(context); - InitFacesContext.cleanupInitMaps(context); + if (initContext != null) { + initContext.release(); + } } } @@ -399,7 +399,7 @@ private void initConfigMonitoring(ServletContext context) { private boolean isDevModeEnabled() { // interrogate the init parameter directly vs looking up the application - return "Development".equals(webConfig.getOptionValue(JakartaFacesProjectStage)); + return ContextParam.PROJECT_STAGE.getValue(FacesContext.getCurrentInstance()) == ProjectStage.Development; } /** @@ -484,16 +484,6 @@ private void reload(ServletContext servletContext) { LOGGER.log(INFO, () -> format("Reload complete. ({0})", servletContext.getContextPath())); } - private InitFacesContext getInitFacesContext(ServletContext context) { - for (Entry entry : getInitContextServletContextMap().entrySet()) { - if (context == entry.getValue()) { - return entry.getKey(); - } - } - - return null; - } - // ----------------------------------------------------------- Inner classes @@ -697,7 +687,7 @@ public void endElement(String uri, String localName, String qName) throws SAXExc private class WebConfigResourceMonitor implements Runnable { private List monitors; - private ServletContext servletContext; + private final ServletContext servletContext; // -------------------------------------------------------- Constructors @@ -712,7 +702,7 @@ public WebConfigResourceMonitor(ServletContext servletContext, Collection u monitors.add(new Monitor(uri)); } catch (IOException ioe) { LOGGER.log(SEVERE, () -> "Unable to setup resource monitor for " + uri.toString() + ". Resource will not be monitored for changes."); - LOGGER.log(FINE, ioe, () -> ioe.toString()); + LOGGER.log(FINE, ioe, ioe::toString); } } @@ -753,7 +743,7 @@ public void run() { private class Monitor { - private URI uri; + private final URI uri; private long timestamp = -1; // ---------------------------------------------------- Constructors diff --git a/impl/src/main/java/com/sun/faces/config/FaceletsConfiguration.java b/impl/src/main/java/com/sun/faces/config/FaceletsConfiguration.java index bd7b289636..ddb6fc793a 100644 --- a/impl/src/main/java/com/sun/faces/config/FaceletsConfiguration.java +++ b/impl/src/main/java/com/sun/faces/config/FaceletsConfiguration.java @@ -36,11 +36,11 @@ public class FaceletsConfiguration { // private static final String CONSUME_COMMENTS_ATTRIBUTE_NAME = "com.sun.faces.config.ConsumeComments"; - private static Pattern EXTENSION_PATTERN = Pattern.compile("\\.[^/]+$"); + private static final Pattern EXTENSION_PATTERN = Pattern.compile("\\.[^/]+$"); - private WebConfiguration config; + private final WebConfiguration config; - private Map faceletsProcessingMappings; + private final Map faceletsProcessingMappings; public FaceletsConfiguration(WebConfiguration config) { this.config = config; diff --git a/impl/src/main/java/com/sun/faces/config/FacesInitializer.java b/impl/src/main/java/com/sun/faces/config/FacesInitializer.java index c01c0aa277..342e65e144 100644 --- a/impl/src/main/java/com/sun/faces/config/FacesInitializer.java +++ b/impl/src/main/java/com/sun/faces/config/FacesInitializer.java @@ -21,7 +21,6 @@ import static com.sun.faces.RIConstants.FACES_SERVLET_MAPPINGS; import static com.sun.faces.RIConstants.FACES_SERVLET_REGISTRATION; import static com.sun.faces.util.Util.isEmpty; -import static java.lang.Boolean.parseBoolean; import static java.util.logging.Level.WARNING; import java.util.HashSet; @@ -33,11 +32,13 @@ import jakarta.enterprise.inject.spi.BeanManager; import jakarta.faces.annotation.FacesConfig; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.application.ResourceDependencies; import jakarta.faces.application.ResourceDependency; import jakarta.faces.component.FacesComponent; import jakarta.faces.component.UIComponent; import jakarta.faces.component.behavior.FacesBehavior; +import jakarta.faces.context.FacesContext; import jakarta.faces.convert.Converter; import jakarta.faces.convert.FacesConverter; import jakarta.faces.event.ListenerFor; @@ -51,7 +52,6 @@ import jakarta.faces.model.DataModel; import jakarta.faces.model.FacesDataModel; import jakarta.faces.push.Push; -import jakarta.faces.push.PushContext; import jakarta.faces.render.FacesBehaviorRenderer; import jakarta.faces.render.FacesRenderer; import jakarta.faces.render.Renderer; @@ -115,21 +115,17 @@ public void onStartup(Set> classes, ServletContext servletContext) thro try { if (appHasFacesContent) { // Only look at mapping concerns if there is Faces content - handleMappingConcerns(servletContext); + handleMappingConcerns(servletContext, initFacesContext); } // Other concerns also handled if there is an existing Faces Servlet mapping handleCdiConcerns(servletContext); - handleWebSocketConcerns(servletContext); + handleWebSocketConcerns(servletContext, initFacesContext); // The Configure listener will do the bulk of initializing (configuring) Faces in a later phase. servletContext.addListener(ConfigureListener.class); } finally { - // Bug 20458755: The InitFacesContext was not being cleaned up, resulting in - // a partially constructed FacesContext being made available - // to other code that re-uses this Thread at init time. - initFacesContext.releaseCurrentInstance(); initFacesContext.release(); } } else { @@ -190,7 +186,7 @@ private static ServletRegistration getExistingFacesServletRegistration(ServletCo return null; } - private static void handleMappingConcerns(ServletContext servletContext) throws ServletException { + private static void handleMappingConcerns(ServletContext servletContext, FacesContext facesContext) throws ServletException { ServletRegistration existingFacesServletRegistration = getExistingFacesServletRegistration(servletContext); if (existingFacesServletRegistration != null) { @@ -201,7 +197,7 @@ private static void handleMappingConcerns(ServletContext servletContext) throws ServletRegistration newFacesServletRegistration = servletContext.addServlet(FacesServlet.class.getSimpleName(), FACES_SERVLET_CLASS_NAME); - if (parseBoolean(servletContext.getInitParameter(FacesServlet.DISABLE_FACESSERVLET_TO_XHTML_PARAM_NAME))) { + if (ContextParam.DISABLE_FACESSERVLET_TO_XHTML.isSet(facesContext)) { newFacesServletRegistration.addMapping(FACES_SERVLET_MAPPINGS_WITHOUT_XHTML); } else { @@ -247,13 +243,13 @@ private static void handleCdiConcerns(ServletContext context) throws ServletExce } } - private static void handleWebSocketConcerns(ServletContext context) throws ServletException { + private static void handleWebSocketConcerns(ServletContext context, FacesContext facesContext) throws ServletException { if (context.getAttribute(ServerContainer.class.getName()) != null) { // Already initialized return; } - if (!parseBoolean(context.getInitParameter(PushContext.ENABLE_WEBSOCKET_ENDPOINT_PARAM_NAME))) { + if (!ContextParam.ENABLE_WEBSOCKET_ENDPOINT.isSet(facesContext)) { // Register websocket endpoint is not enabled return; } diff --git a/impl/src/main/java/com/sun/faces/config/InitFacesContext.java b/impl/src/main/java/com/sun/faces/config/InitFacesContext.java index 0de180d621..3204781a68 100644 --- a/impl/src/main/java/com/sun/faces/config/InitFacesContext.java +++ b/impl/src/main/java/com/sun/faces/config/InitFacesContext.java @@ -18,22 +18,15 @@ import static com.sun.faces.RIConstants.FACES_PREFIX; -import java.lang.reflect.Field; -import java.util.ArrayList; import java.util.HashMap; import java.util.Locale; import java.util.Map; -import java.util.Map.Entry; -import java.util.logging.Level; -import java.util.logging.Logger; import com.sun.faces.RIConstants; import com.sun.faces.config.initfacescontext.NoOpELContext; import com.sun.faces.config.initfacescontext.NoOpFacesContext; import com.sun.faces.config.initfacescontext.ServletContextAdapter; -import com.sun.faces.context.ApplicationMap; import com.sun.faces.context.ExceptionHandlerImpl; -import com.sun.faces.util.FacesLogger; import com.sun.faces.util.Util; import jakarta.el.ELContext; @@ -44,7 +37,6 @@ import jakarta.faces.component.UIViewRoot; import jakarta.faces.context.ExceptionHandler; import jakarta.faces.context.ExternalContext; -import jakarta.faces.context.FacesContext; import jakarta.servlet.ServletContext; /** @@ -53,7 +45,6 @@ */ public class InitFacesContext extends NoOpFacesContext { - private static Logger LOGGER = FacesLogger.CONFIG.getLogger(); private static final String INIT_FACES_CONTEXT_ATTR_NAME = RIConstants.FACES_PREFIX + "InitFacesContext"; private ServletContextAdapter servletContextAdapter; @@ -65,10 +56,7 @@ public class InitFacesContext extends NoOpFacesContext { public InitFacesContext(ServletContext servletContext) { servletContextAdapter = new ServletContextAdapter(servletContext); servletContext.setAttribute(INIT_FACES_CONTEXT_ATTR_NAME, this); - InitFacesContext.cleanupInitMaps(servletContext); - - addServletContextEntryForInitContext(servletContext); - addInitContextEntryForCurrentThread(); + setCurrentInstance(this); } @Override @@ -127,14 +115,9 @@ public boolean isProjectStage(ProjectStage stage) { @Override public void release() { - setCurrentInstance(null); + releaseCurrentInstance(); if (servletContextAdapter != null) { - Map applicationMap = servletContextAdapter.getApplicationMap(); - if (applicationMap instanceof ApplicationMap) { - if (((ApplicationMap) applicationMap).getContext() != null) { - applicationMap.remove(INIT_FACES_CONTEXT_ATTR_NAME); - } - } + ((ServletContext) servletContextAdapter.getContext()).removeAttribute(INIT_FACES_CONTEXT_ATTR_NAME); servletContextAdapter.release(); } @@ -155,92 +138,13 @@ public void release() { } public void releaseCurrentInstance() { - removeInitContextEntryForCurrentThread(); setCurrentInstance(null); } - public void addInitContextEntryForCurrentThread() { - getThreadInitContextMap().put(Thread.currentThread(), this); - } - - public void removeInitContextEntryForCurrentThread() { - getThreadInitContextMap().remove(Thread.currentThread()); - } - - public void addServletContextEntryForInitContext(ServletContext servletContext) { - getInitContextServletContextMap().put(this, servletContext); - } - - public void removeServletContextEntryForInitContext() { - getInitContextServletContextMap().remove(this); - } - - /** - * Clean up entries from the threadInitContext and initContextServletContext maps using a ServletContext. First remove - * entry(s) with matching ServletContext from initContextServletContext map. Then remove entries from threadInitContext - * map where the entry value(s) match the initFacesContext (associated with the ServletContext). - * - * @param servletContext the involved servlet context - */ - public static void cleanupInitMaps(ServletContext servletContext) { - - Map facesContext2ServletContext = getInitContextServletContextMap(); - Map thread2FacesContext = getThreadInitContextMap(); - - // First remove entry(s) with matching ServletContext from the initContextServletContext map. - - for (Entry facesContext2ServletContextEntry : new ArrayList<>(facesContext2ServletContext.entrySet())) { - - if (facesContext2ServletContextEntry.getValue() == servletContext) { - - facesContext2ServletContext.remove(facesContext2ServletContextEntry.getKey()); - - // Then remove entries from the threadInitContext map where the entry value(s) match the initFacesContext - // (associated with the ServletContext). - - for (Entry thread2FacesContextEntry : new ArrayList<>(thread2FacesContext.entrySet())) { - - if (thread2FacesContextEntry.getValue() == facesContext2ServletContextEntry.getKey()) { - thread2FacesContext.remove(thread2FacesContextEntry.getKey()); - } - - } - } - } - } - - @SuppressWarnings("unchecked") - static Map getThreadInitContextMap() { - try { - Field threadMap = FacesContext.class.getDeclaredField("threadInitContext"); - threadMap.setAccessible(true); - - return (Map) threadMap.get(null); - } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { - LOGGER.log(Level.FINEST, "Unable to get (thread, init context) map", e); - } - - return null; - } - - @SuppressWarnings("unchecked") - static Map getInitContextServletContextMap() { - try { - Field initContextMap = FacesContext.class.getDeclaredField("initContextServletContext"); - initContextMap.setAccessible(true); - - return (Map) initContextMap.get(null); - } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { - LOGGER.log(Level.FINEST, "Unable to get (init context, servlet context) map", e); - } - - return null; - } - public static InitFacesContext getInstance(ServletContext servletContext) { InitFacesContext result = (InitFacesContext) servletContext.getAttribute(INIT_FACES_CONTEXT_ATTR_NAME); if (result != null) { - result.addInitContextEntryForCurrentThread(); + setCurrentInstance(result); } return result; diff --git a/impl/src/main/java/com/sun/faces/config/Verifier.java b/impl/src/main/java/com/sun/faces/config/Verifier.java index dc35d7a28c..a652dce125 100644 --- a/impl/src/main/java/com/sun/faces/config/Verifier.java +++ b/impl/src/main/java/com/sun/faces/config/Verifier.java @@ -46,7 +46,7 @@ public enum ObjectType { /** * Container for any messages that may be queued. */ - private List messages; + private final List messages; // ------------------------------------------------------- Constructors diff --git a/impl/src/main/java/com/sun/faces/config/WebConfiguration.java b/impl/src/main/java/com/sun/faces/config/WebConfiguration.java index e1fea6239a..7a91fdffe3 100644 --- a/impl/src/main/java/com/sun/faces/config/WebConfiguration.java +++ b/impl/src/main/java/com/sun/faces/config/WebConfiguration.java @@ -17,9 +17,7 @@ package com.sun.faces.config; -import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.FaceletsSuffix; import static com.sun.faces.util.Util.split; -import static java.util.Arrays.asList; import static java.util.Collections.emptyMap; import static java.util.logging.Level.FINE; import static java.util.regex.Pattern.CASE_INSENSITIVE; @@ -33,7 +31,6 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; -import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -46,32 +43,23 @@ import javax.naming.InitialContext; import javax.naming.NamingException; -import com.sun.faces.application.ApplicationAssociate; -import com.sun.faces.application.view.FaceletViewHandlingStrategy; -import com.sun.faces.facelets.util.Classpath; -import com.sun.faces.lifecycle.HttpMethodRestrictionsPhaseListener; -import com.sun.faces.util.FacesLogger; -import com.sun.faces.util.Util; - import jakarta.faces.FactoryFinder; -import jakarta.faces.application.ProjectStage; import jakarta.faces.application.ResourceHandler; import jakarta.faces.application.StateManager; -import jakarta.faces.application.ViewHandler; -import jakarta.faces.component.UIInput; -import jakarta.faces.component.UIViewRoot; import jakarta.faces.context.ExternalContext; import jakarta.faces.context.FacesContext; -import jakarta.faces.convert.Converter; import jakarta.faces.event.PhaseListener; -import jakarta.faces.lifecycle.ClientWindow; import jakarta.faces.lifecycle.Lifecycle; import jakarta.faces.lifecycle.LifecycleFactory; -import jakarta.faces.push.PushContext; -import jakarta.faces.validator.BeanValidator; -import jakarta.faces.webapp.FacesServlet; import jakarta.servlet.ServletContext; +import com.sun.faces.application.ApplicationAssociate; +import com.sun.faces.application.view.FaceletViewHandlingStrategy; +import com.sun.faces.facelets.util.Classpath; +import com.sun.faces.lifecycle.HttpMethodRestrictionsPhaseListener; +import com.sun.faces.util.FacesLogger; +import com.sun.faces.util.Util; + /** * Class Documentation */ @@ -86,7 +74,7 @@ public class WebConfiguration { // Key under which we store our WebConfiguration instance. private static final String WEB_CONFIG_KEY = "com.sun.faces.config.WebConfiguration"; - public static final String META_INF_CONTRACTS_DIR = "META-INF" + WebContextInitParameter.WebAppContractsDirectory.getDefaultValue(); + public static final String META_INF_CONTRACTS_DIR = "META-INF" + ResourceHandler.WEBAPP_CONTRACTS_DIRECTORY_DEFAULT_VALUE; private static final int META_INF_CONTRACTS_DIR_LEN = META_INF_CONTRACTS_DIR.length(); @@ -95,26 +83,26 @@ public class WebConfiguration { // Logging level. Defaults to FINE private Level loggingLevel = Level.FINE; - private Map booleanContextParameters = new EnumMap<>(BooleanWebContextInitParameter.class); + private final Map booleanContextParameters = new EnumMap<>(BooleanWebContextInitParameter.class); - private Map contextParameters = new EnumMap<>(WebContextInitParameter.class); + private final Map contextParameters = new EnumMap<>(WebContextInitParameter.class); - private Map> facesConfigParameters = new EnumMap<>(WebContextInitParameter.class); + private final Map> facesConfigParameters = new EnumMap<>(WebContextInitParameter.class); - private Map envEntries = new EnumMap<>(WebEnvironmentEntry.class); + private final Map envEntries = new EnumMap<>(WebEnvironmentEntry.class); - private Map cachedListParams; + private final Map cachedListParams = new HashMap<>(); - private Set setParams = new HashSet<>(); + private final Set setParams = new HashSet<>(); - private ServletContext servletContext; + private final ServletContext servletContext; private ArrayList deferredLoggingActions; private FaceletsConfiguration faceletsConfig; private boolean hasFlows; - + private String specificationVersion; // ------------------------------------------------------------ Constructors @@ -131,12 +119,6 @@ private WebConfiguration(ServletContext servletContext) { processJndiEntries(contextName); } - // build the cache of list type params - cachedListParams = new HashMap<>(3); - getOptionValue(WebContextInitParameter.ResourceExcludes, " "); - getOptionValue(WebContextInitParameter.FaceletsViewMappings, ";"); - getOptionValue(WebContextInitParameter.FaceletsSuffix, " "); - specificationVersion = getClass().getPackage().getSpecificationVersion(); } @@ -323,24 +305,13 @@ public void overrideContextInitParameter(BooleanWebContextInitParameter param, b return; } - boolean oldVal = booleanContextParameters.put(param, value); + boolean oldVal = Boolean.TRUE.equals(booleanContextParameters.put(param, value)); if (LOGGER.isLoggable(FINE) && oldVal != value) { LOGGER.log(FINE, "Overriding init parameter {0}. Changing from {1} to {2}.", new Object[] { param.getQualifiedName(), oldVal, value }); } } - /** - * @return the facelet suffixes. - */ - public List getConfiguredExtensions() { - String[] faceletsSuffix = getOptionValue(FaceletsSuffix, " "); - - Set deduplicatedFaceletsSuffixes = new LinkedHashSet<>(asList(faceletsSuffix)); - - return new ArrayList<>(deduplicatedFaceletsSuffixes); - } - public void overrideContextInitParameter(WebContextInitParameter param, String value) { if (param == null || value == null || value.length() == 0) { return; @@ -470,8 +441,7 @@ private void discoverResourceLibraryContracts() { } } } else { - contractsToExpose = new ArrayList<>(); - contractsToExpose.addAll(foundContracts); + contractsToExpose = new ArrayList<>(foundContracts); contractMappings.put("*", contractsToExpose); } extContex.getApplicationMap().put(FaceletViewHandlingStrategy.RESOURCE_LIBRARY_CONTRACT_DATA_STRUCTURE_KEY, contractMappings); @@ -521,7 +491,7 @@ private boolean isValueValid(BooleanWebContextInitParameter param, String value) */ private void processBooleanParameters(ServletContext servletContext, String contextName) { - // process boolean contxt parameters + // process boolean context parameters for (BooleanWebContextInitParameter param : BooleanWebContextInitParameter.values()) { String strValue = servletContext.getInitParameter(param.getQualifiedName()); boolean value; @@ -542,7 +512,7 @@ private void processBooleanParameters(ServletContext servletContext, String cont if (alternate != null) { if (isValueValid(param, strValue)) { - value = Boolean.valueOf(strValue); + value = Boolean.parseBoolean(strValue); } else { value = param.getDefaultValue(); } @@ -563,7 +533,7 @@ private void processBooleanParameters(ServletContext servletContext, String cont value = param.getDefaultValue(); } else { if (isValueValid(param, strValue)) { - value = Boolean.valueOf(strValue); + value = Boolean.parseBoolean(strValue); } else { value = param.getDefaultValue(); } @@ -594,8 +564,8 @@ private void processBooleanParameters(ServletContext servletContext, String cont * @param servletContext the ServletContext of interest */ private void initSetList(ServletContext servletContext) { - for (Enumeration e = servletContext.getInitParameterNames(); e.hasMoreElements();) { - String name = e.nextElement().toString(); + for (Enumeration e = servletContext.getInitParameterNames(); e.hasMoreElements();) { + String name = e.nextElement(); if (name.startsWith("com.sun.faces") || name.startsWith("jakarta.faces")) { setParams.add(name); } @@ -685,9 +655,9 @@ private void processJndiEntries(String contextName) { initialContext = new InitialContext(); } catch (NoClassDefFoundError nde) { // On google app engine InitialContext is forbidden to use and GAE throws NoClassDefFoundError - LOGGER.log(FINE, nde, () -> nde.toString()); + LOGGER.log(FINE, nde, nde::toString); } catch (NamingException ne) { - LOGGER.log(Level.WARNING, ne, () -> ne.toString()); + LOGGER.log(Level.WARNING, ne, ne::toString); } if (initialContext != null) { @@ -699,7 +669,7 @@ private void processJndiEntries(String contextName) { try { value = (String) initialContext.lookup(entryName); } catch (NamingException root) { - LOGGER.log(Level.FINE, () -> root.toString()); + LOGGER.log(Level.FINE, root::toString); } if (value != null) { @@ -749,13 +719,6 @@ public enum WebContextInitParameter { // if a parameter is to be deprecated, then the Deprecated enum element *must* appear after the one that is taking // its place. The reporting logic depends on this. - StateSavingMethod(StateManager.STATE_SAVING_METHOD_PARAM_NAME, "server"), - FaceletsSuffix(ViewHandler.FACELETS_SUFFIX_PARAM_NAME, ViewHandler.DEFAULT_FACELETS_SUFFIX), - JakartaFacesConfigFiles(FacesServlet.CONFIG_FILES_ATTR, ""), - JakartaFacesProjectStage(ProjectStage.PROJECT_STAGE_PARAM_NAME, "Production"), - AlternateLifecycleId(FacesServlet.LIFECYCLE_ID_ATTR, ""), - ResourceExcludes(ResourceHandler.RESOURCE_EXCLUDES_PARAM_NAME, ResourceHandler.RESOURCE_EXCLUDES_DEFAULT_VALUE), - NumberOfClientWindows(ClientWindow.NUMBER_OF_CLIENT_WINDOWS_PARAM_NAME, "10"), NumberOfViews("com.sun.faces.numberOfViewsInSession", "15"), NumberOfLogicalViews("com.sun.faces.numberOfLogicalViews", "15"), NumberOfActiveViewMaps("com.sun.faces.numberOfActiveViewMaps", "25"), @@ -764,7 +727,6 @@ public enum WebContextInitParameter { NumberOfFlashesBetweenFlashReapings("com.sun.faces.numberOfFlashesBetweenFlashReapings", "5000"), InjectionProviderClass("com.sun.faces.injectionProvider", ""), SerializationProviderClass("com.sun.faces.serializationProvider", ""), - FaceletsBufferSize(ViewHandler.FACELETS_BUFFER_SIZE_PARAM_NAME, "1024"), ClientStateWriteBufferSize("com.sun.faces.clientStateWriteBufferSize", "8192"), ResourceBufferSize("com.sun.faces.resourceBufferSize", "2048"), ClientStateTimeout("com.sun.faces.clientStateTimeout", ""), @@ -772,25 +734,17 @@ public enum WebContextInitParameter { ResourceUpdateCheckPeriod("com.sun.faces.resourceUpdateCheckPeriod", "5"), // in minutes CompressableMimeTypes("com.sun.faces.compressableMimeTypes", ""), DisableUnicodeEscaping("com.sun.faces.disableUnicodeEscaping", "auto"), - FaceletsDefaultRefreshPeriod(ViewHandler.FACELETS_REFRESH_PERIOD_PARAM_NAME, "2"), - FaceletsViewMappings(ViewHandler.FACELETS_VIEW_MAPPINGS_PARAM_NAME, ""), - FaceletsLibraries(ViewHandler.FACELETS_LIBRARIES_PARAM_NAME, ""), - FaceletsDecorators(ViewHandler.FACELETS_DECORATORS_PARAM_NAME, ""), DuplicateJARPattern("com.sun.faces.duplicateJARPattern", ""), - ValidateEmptyFields(UIInput.VALIDATE_EMPTY_FIELDS_PARAM_NAME, "auto"), FullStateSavingViewIds(StateManager.FULL_STATE_SAVING_VIEW_IDS_PARAM_NAME, ""), AnnotationScanPackages("com.sun.faces.annotationScanPackages", ""), FaceletsProcessingFileExtensionProcessAs("", ""), - ClientWindowMode(ClientWindow.CLIENT_WINDOW_MODE_PARAM_NAME, "none"), - WebAppResourcesDirectory(ResourceHandler.WEBAPP_RESOURCES_DIRECTORY_PARAM_NAME, "/resources"), - WebAppContractsDirectory(ResourceHandler.WEBAPP_CONTRACTS_DIRECTORY_PARAM_NAME, "/contracts"), ; - private String defaultValue; - private String qualifiedName; - private WebContextInitParameter alternate; - private boolean deprecated; - private DeprecationLoggingStrategy loggingStrategy; + private final String defaultValue; + private final String qualifiedName; + private final WebContextInitParameter alternate; + private final boolean deprecated; + private final DeprecationLoggingStrategy loggingStrategy; // ---------------------------------------------------------- Public Methods @@ -849,14 +803,11 @@ public enum BooleanWebContextInitParameter { // *must* appear after the one that is taking // its place. The reporting logic depends on this - AlwaysPerformValidationWhenRequiredTrue(UIInput.ALWAYS_PERFORM_VALIDATION_WHEN_REQUIRED_IS_TRUE, false), DisplayConfiguration("com.sun.faces.displayConfiguration", false), ValidateFacesConfigFiles("com.sun.faces.validateXml", false), VerifyFacesConfigObjects("com.sun.faces.verifyObjects", false), ForceLoadFacesConfigFiles("com.sun.faces.forceLoadConfiguration", false), DisableClientStateEncryption("com.sun.faces.disableClientStateEncryption", false), - DisableFacesServletAutomaticMapping(FacesServlet.DISABLE_FACESSERVLET_TO_XHTML_PARAM_NAME, false), - AutomaticExtensionlessMapping(FacesServlet.AUTOMATIC_EXTENSIONLESS_MAPPING_PARAM_NAME, false), EnableClientStateDebugging("com.sun.faces.enableClientStateDebugging", false), PreferXHTMLContentType("com.sun.faces.preferXHTML", false), CompressViewState("com.sun.faces.compressViewState", true), @@ -864,38 +815,30 @@ public enum BooleanWebContextInitParameter { EnableScriptInAttributeValue("com.sun.faces.enableScriptsInAttributeValues", true), WriteStateAtFormEnd("com.sun.faces.writeStateAtFormEnd", true), EnableLazyBeanValidation("com.sun.faces.enableLazyBeanValidation", true), - SerializeServerState(StateManager.SERIALIZE_SERVER_STATE_PARAM_NAME, false), EnableViewStateIdRendering("com.sun.faces.enableViewStateIdRendering", true), RegisterConverterPropertyEditors("com.sun.faces.registerConverterPropertyEditors", false), - DisableDefaultBeanValidator(BeanValidator.DISABLE_DEFAULT_BEAN_VALIDATOR_PARAM_NAME, false), - DateTimeConverterUsesSystemTimezone(Converter.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME, false), EnableHttpMethodRestrictionPhaseListener("com.sun.faces.ENABLE_HTTP_METHOD_RESTRICTION_PHASE_LISTENER", false), - FaceletsSkipComments(ViewHandler.FACELETS_SKIP_COMMENTS_PARAM_NAME, false), PartialStateSaving(StateManager.PARTIAL_STATE_SAVING_PARAM_NAME, true), GenerateUniqueServerStateIds("com.sun.faces.generateUniqueServerStateIds", true), - InterpretEmptyStringSubmittedValuesAsNull(UIInput.EMPTY_STRING_AS_NULL_PARAM_NAME, false), - AutoCompleteOffOnViewState("com.sun.faces.autoCompleteOffOnViewState", true), + AutoCompleteOffOnViewState("com.sun.faces.autoCompleteOffOnViewState", false), EnableThreading("com.sun.faces.enableThreading", false), AllowTextChildren("com.sun.faces.allowTextChildren", false), CacheResourceModificationTimestamp("com.sun.faces.cacheResourceModificationTimestamp", false), - EnableDistributable("com.sun.faces.enableDistributable", false), + EnableDistributable("com.sun.faces.enableDistributable", false), // NOTE: this is indeed implicitly set to true when web.xml distributable is also set, see ConfigureListener. EnableMissingResourceLibraryDetection("com.sun.faces.enableMissingResourceLibraryDetection", false), DisableIdUniquenessCheck("com.sun.faces.disableIdUniquenessCheck", false), EnableTransitionTimeNoOpFlash("com.sun.faces.enableTransitionTimeNoOpFlash", false), ForceAlwaysWriteFlashCookie("com.sun.faces.forceAlwaysWriteFlashCookie", false), - ViewRootPhaseListenerQueuesException(UIViewRoot.VIEWROOT_PHASE_LISTENER_QUEUES_EXCEPTIONS_PARAM_NAME, false), - EnableValidateWholeBean(BeanValidator.ENABLE_VALIDATE_WHOLE_BEAN_PARAM_NAME, false), - EnableWebsocketEndpoint(PushContext.ENABLE_WEBSOCKET_ENDPOINT_PARAM_NAME, false), DisallowDoctypeDecl("com.sun.faces.disallowDoctypeDecl", false), UseFaceletsID("com.sun.faces.useFaceletsID",false), ; - private BooleanWebContextInitParameter alternate; + private final BooleanWebContextInitParameter alternate; - private String qualifiedName; - private boolean defaultValue; - private boolean deprecated; - private DeprecationLoggingStrategy loggingStrategy; + private final String qualifiedName; + private final boolean defaultValue; + private final boolean deprecated; + private final DeprecationLoggingStrategy loggingStrategy; // ---------------------------------------------------------- Public Methods @@ -954,7 +897,7 @@ public enum WebEnvironmentEntry { ProjectStage(jakarta.faces.application.ProjectStage.PROJECT_STAGE_JNDI_NAME); private static final String JNDI_PREFIX = "java:comp/env/"; - private String qualifiedName; + private final String qualifiedName; // ---------------------------------------------------------- Public Methods @@ -1019,10 +962,10 @@ private interface DeferredLoggingAction { private class DeferredParameterLoggingAction implements DeferredLoggingAction { - private WebContextInitParameter parameter; - private Level loggingLevel; - private String logKey; - private Object[] params; + private final WebContextInitParameter parameter; + private final Level loggingLevel; + private final String logKey; + private final Object[] params; DeferredParameterLoggingAction(WebContextInitParameter parameter, Level loggingLevel, String logKey, Object[] params) { @@ -1049,10 +992,10 @@ public void log() { private class DeferredBooleanParameterLoggingAction implements DeferredLoggingAction { - private BooleanWebContextInitParameter parameter; - private Level loggingLevel; - private String logKey; - private Object[] params; + private final BooleanWebContextInitParameter parameter; + private final Level loggingLevel; + private final String logKey; + private final Object[] params; DeferredBooleanParameterLoggingAction(BooleanWebContextInitParameter parameter, Level loggingLevel, String logKey, Object[] params) { this.parameter = parameter; diff --git a/impl/src/main/java/com/sun/faces/config/configpopulator/MojarraRuntimePopulator.java b/impl/src/main/java/com/sun/faces/config/configpopulator/MojarraRuntimePopulator.java index 2e57f29900..1047d29fd2 100644 --- a/impl/src/main/java/com/sun/faces/config/configpopulator/MojarraRuntimePopulator.java +++ b/impl/src/main/java/com/sun/faces/config/configpopulator/MojarraRuntimePopulator.java @@ -1,10 +1,11 @@ package com.sun.faces.config.configpopulator; +import jakarta.faces.application.ApplicationConfigurationPopulator; +import jakarta.faces.convert.EnumConverter; + import org.w3c.dom.Document; import org.w3c.dom.Element; -import jakarta.faces.application.ApplicationConfigurationPopulator; - public final class MojarraRuntimePopulator extends ApplicationConfigurationPopulator { @Override public void populateApplicationConfiguration(Document toPopulate) { @@ -12,6 +13,11 @@ public void populateApplicationConfiguration(Document toPopulate) { Element faces_configElement = toPopulate.getDocumentElement(); { Element factoryElement = toPopulate.createElementNS(ns, "factory"); + { + Element faces_servlet_factoryElement = toPopulate.createElementNS(ns, "faces-servlet-factory"); + faces_servlet_factoryElement.appendChild(toPopulate.createTextNode("com.sun.faces.webapp.FacesServletFactoryImpl")); + factoryElement.appendChild(faces_servlet_factoryElement); + } { Element application_factoryElement = toPopulate.createElementNS(ns, "application-factory"); application_factoryElement.appendChild(toPopulate.createTextNode("com.sun.faces.application.ApplicationFactoryImpl")); @@ -331,6 +337,20 @@ public void populateApplicationConfiguration(Document toPopulate) { } faces_configElement.appendChild(converterElement); } + { + Element converterElement = toPopulate.createElementNS(ns, "converter"); + { + Element converter_idElement = toPopulate.createElementNS(ns, "converter-id"); + converter_idElement.appendChild(toPopulate.createTextNode(EnumConverter.CONVERTER_ID)); + converterElement.appendChild(converter_idElement); + } + { + Element converter_classElement = toPopulate.createElementNS(ns, "converter-class"); + converter_classElement.appendChild(toPopulate.createTextNode(EnumConverter.class.getName())); + converterElement.appendChild(converter_classElement); + } + faces_configElement.appendChild(converterElement); + } { Element converterElement = toPopulate.createElementNS(ns, "converter"); { @@ -485,6 +505,20 @@ public void populateApplicationConfiguration(Document toPopulate) { } faces_configElement.appendChild(converterElement); } + { + Element converterElement = toPopulate.createElementNS(ns, "converter"); + { + Element converter_for_classElement = toPopulate.createElementNS(ns, "converter-for-class"); + converter_for_classElement.appendChild(toPopulate.createTextNode("java.util.UUID")); + converterElement.appendChild(converter_for_classElement); + } + { + Element converter_classElement = toPopulate.createElementNS(ns, "converter-class"); + converter_classElement.appendChild(toPopulate.createTextNode("jakarta.faces.convert.UUIDConverter")); + converterElement.appendChild(converter_classElement); + } + faces_configElement.appendChild(converterElement); + } { Element lifecycleElement = toPopulate.createElementNS(ns, "lifecycle"); { diff --git a/impl/src/main/java/com/sun/faces/config/configprovider/BaseWebConfigResourceProvider.java b/impl/src/main/java/com/sun/faces/config/configprovider/BaseWebConfigResourceProvider.java index 3d11fb7eda..c434c6b232 100644 --- a/impl/src/main/java/com/sun/faces/config/configprovider/BaseWebConfigResourceProvider.java +++ b/impl/src/main/java/com/sun/faces/config/configprovider/BaseWebConfigResourceProvider.java @@ -16,8 +16,6 @@ package com.sun.faces.config.configprovider; -import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.JakartaFacesConfigFiles; -import static com.sun.faces.util.Util.split; import static java.util.Arrays.binarySearch; import static java.util.logging.Level.WARNING; @@ -30,12 +28,12 @@ import java.util.Set; import java.util.logging.Logger; -import com.sun.faces.config.WebConfiguration; -import com.sun.faces.config.WebConfiguration.WebContextInitParameter; import com.sun.faces.spi.ConfigurationResourceProvider; import com.sun.faces.util.FacesLogger; import jakarta.faces.FacesException; +import jakarta.faces.annotation.FacesConfig.ContextParam; +import jakarta.faces.context.FacesContext; import jakarta.servlet.ServletContext; /** @@ -50,24 +48,19 @@ public abstract class BaseWebConfigResourceProvider implements ConfigurationReso @Override public Collection getResources(ServletContext context) { - WebConfiguration webConfig = WebConfiguration.getInstance(context); - String paths = webConfig.getOptionValue(getParameter()); + String[] paths = getParameter().getValue(FacesContext.getCurrentInstance()); Set urls = new LinkedHashSet<>(6); - if (paths != null) { - for (String token : split(context, paths.trim(), getSeparatorRegex())) { - String path = token.trim(); - if (!isExcluded(path) && path.length() != 0) { - URI u = getContextURLForPath(context, path); - if (u != null) { - urls.add(u); - } else { - if (LOGGER.isLoggable(WARNING)) { - LOGGER.log(WARNING, "faces.config.web_resource_not_found", new Object[] { path, JakartaFacesConfigFiles.getQualifiedName() }); - } + for (String path : paths) { + if (!isExcluded(path) && path.length() != 0) { + URI u = getContextURLForPath(context, path); + if (u != null) { + urls.add(u); + } else { + if (LOGGER.isLoggable(WARNING)) { + LOGGER.log(WARNING, "faces.config.web_resource_not_found", new Object[] { path, getParameter().getName() }); } } - } } @@ -76,7 +69,7 @@ public Collection getResources(ServletContext context) { // ------------------------------------------------------- Protected Methods - protected abstract WebContextInitParameter getParameter(); + protected abstract ContextParam getParameter(); protected abstract String[] getExcludedResources(); @@ -86,7 +79,7 @@ protected URI getContextURLForPath(ServletContext context, String path) { try { URL url = context.getResource(path); if (url != null) { - return new URI(url.toExternalForm().replaceAll(" ", "%20")); + return new URI(url.toExternalForm().replace(" ", "%20")); } } catch (MalformedURLException | URISyntaxException mue) { throw new FacesException(mue); diff --git a/impl/src/main/java/com/sun/faces/config/configprovider/MetaInfFaceletTaglibraryConfigProvider.java b/impl/src/main/java/com/sun/faces/config/configprovider/MetaInfFaceletTaglibraryConfigProvider.java index 2900ef7e95..96bf5c7282 100644 --- a/impl/src/main/java/com/sun/faces/config/configprovider/MetaInfFaceletTaglibraryConfigProvider.java +++ b/impl/src/main/java/com/sun/faces/config/configprovider/MetaInfFaceletTaglibraryConfigProvider.java @@ -64,7 +64,7 @@ public Collection getResources(ServletContext context) { } return resourceURLs.stream() - .map(url -> transformToURI(url)) + .map( url -> transformToURI(url) ) .collect(toList()); } catch (IOException ioe) { @@ -74,9 +74,9 @@ public Collection getResources(ServletContext context) { // --------------------------------------------------------- Private Methods - private URI transformToURI(URL url) { + private static URI transformToURI(URL url) { try { - return new URI(url.toExternalForm().replaceAll(" ", "%20")); + return new URI(url.toExternalForm().replace(" ", "%20")); } catch (URISyntaxException ex) { throw new FacesException(ex); } diff --git a/impl/src/main/java/com/sun/faces/config/configprovider/MetaInfFacesConfigResourceProvider.java b/impl/src/main/java/com/sun/faces/config/configprovider/MetaInfFacesConfigResourceProvider.java index 40501e2257..11d1b45ea6 100644 --- a/impl/src/main/java/com/sun/faces/config/configprovider/MetaInfFacesConfigResourceProvider.java +++ b/impl/src/main/java/com/sun/faces/config/configprovider/MetaInfFacesConfigResourceProvider.java @@ -98,11 +98,7 @@ public Collection getResources(ServletContext context) { } } - Set uris = sortedJarMap.get(jarName); - if (uris == null) { - uris = new HashSet<>(); - sortedJarMap.put(jarName, uris); - } + Set uris = sortedJarMap.computeIfAbsent(jarName, k -> new HashSet<>()); uris.add(uri); } else { unsortedResourceList.add(0, uri); @@ -131,23 +127,23 @@ private Collection loadURLs(ServletContext context) throws IOException { try { for (Enumeration e = Util.getCurrentLoader(this).getResources(META_INF_RESOURCES); e.hasMoreElements();) { String urlString = e.nextElement().toExternalForm(); - urlString = urlString.replaceAll(" ", "%20"); + urlString = urlString.replace(" ", "%20"); urls.add(new URI(urlString)); } URL[] urlArray = Classpath.search("META-INF/", FACES_CONFIG_EXTENSION); for (URL cur : urlArray) { String urlString = cur.toExternalForm(); - urlString = urlString.replaceAll(" ", "%20"); + urlString = urlString.replace(" ", "%20"); urls.add(new URI(urlString)); } // special case for finding taglib files in WEB-INF/classes/META-INF - Set paths = context.getResourcePaths(WEB_INF_CLASSES); + Set paths = context.getResourcePaths(WEB_INF_CLASSES); if (paths != null) { for (Object path : paths) { String p = path.toString(); if (p.endsWith(FACES_CONFIG_EXTENSION)) { String urlString = context.getResource(p).toExternalForm(); - urlString = urlString.replaceAll(" ", "%20"); + urlString = urlString.replace(" ", "%20"); urls.add(new URI(urlString)); } } diff --git a/impl/src/main/java/com/sun/faces/config/configprovider/WebAppFlowConfigResourceProvider.java b/impl/src/main/java/com/sun/faces/config/configprovider/WebAppFlowConfigResourceProvider.java index 8a6a6c349d..1c5d9864bd 100644 --- a/impl/src/main/java/com/sun/faces/config/configprovider/WebAppFlowConfigResourceProvider.java +++ b/impl/src/main/java/com/sun/faces/config/configprovider/WebAppFlowConfigResourceProvider.java @@ -74,7 +74,7 @@ public Collection getResources(ServletContext context) { } } - return null == list ? Collections.EMPTY_LIST : list; + return null == list ? Collections.emptyList() : list; } diff --git a/impl/src/main/java/com/sun/faces/config/configprovider/WebFaceletTaglibResourceProvider.java b/impl/src/main/java/com/sun/faces/config/configprovider/WebFaceletTaglibResourceProvider.java index 9e5356ee23..0604cb02af 100644 --- a/impl/src/main/java/com/sun/faces/config/configprovider/WebFaceletTaglibResourceProvider.java +++ b/impl/src/main/java/com/sun/faces/config/configprovider/WebFaceletTaglibResourceProvider.java @@ -16,9 +16,7 @@ package com.sun.faces.config.configprovider; -import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.FaceletsLibraries; - -import com.sun.faces.config.WebConfiguration.WebContextInitParameter; +import jakarta.faces.annotation.FacesConfig.ContextParam; /** * @@ -31,8 +29,8 @@ public class WebFaceletTaglibResourceProvider extends BaseWebConfigResourceProvi // ------------------------------ Methods from BaseWebConfigResourceProvider @Override - protected WebContextInitParameter getParameter() { - return FaceletsLibraries; + protected ContextParam getParameter() { + return ContextParam.FACELETS_LIBRARIES; } @Override diff --git a/impl/src/main/java/com/sun/faces/config/configprovider/WebFacesConfigResourceProvider.java b/impl/src/main/java/com/sun/faces/config/configprovider/WebFacesConfigResourceProvider.java index d14cdef62c..f699a22380 100644 --- a/impl/src/main/java/com/sun/faces/config/configprovider/WebFacesConfigResourceProvider.java +++ b/impl/src/main/java/com/sun/faces/config/configprovider/WebFacesConfigResourceProvider.java @@ -16,13 +16,10 @@ package com.sun.faces.config.configprovider; -import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.JakartaFacesConfigFiles; - import java.net.URI; import java.util.Collection; -import com.sun.faces.config.WebConfiguration.WebContextInitParameter; - +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.servlet.ServletContext; /** @@ -66,8 +63,8 @@ public Collection getResources(ServletContext context) { // ------------------------------ Methods from BaseWebConfigResourceProvider @Override - protected WebContextInitParameter getParameter() { - return JakartaFacesConfigFiles; + protected ContextParam getParameter() { + return ContextParam.CONFIG_FILES; } @Override diff --git a/impl/src/main/java/com/sun/faces/config/initfacescontext/NoOpFacesContext.java b/impl/src/main/java/com/sun/faces/config/initfacescontext/NoOpFacesContext.java index 01e7ca954c..5ba821e307 100644 --- a/impl/src/main/java/com/sun/faces/config/initfacescontext/NoOpFacesContext.java +++ b/impl/src/main/java/com/sun/faces/config/initfacescontext/NoOpFacesContext.java @@ -16,6 +16,7 @@ package com.sun.faces.config.initfacescontext; +import static java.util.Collections.emptyIterator; import static java.util.Collections.emptyList; import java.util.Iterator; @@ -38,8 +39,7 @@ public Lifecycle getLifecycle() { @Override public Iterator getClientIdsWithMessages() { - List list = emptyList(); - return list.iterator(); + return emptyIterator(); } @Override @@ -49,8 +49,7 @@ public FacesMessage.Severity getMaximumSeverity() { @Override public Iterator getMessages() { - List list = emptyList(); - return list.iterator(); + return emptyIterator(); } @Override diff --git a/impl/src/main/java/com/sun/faces/config/initfacescontext/ServletContextAdapter.java b/impl/src/main/java/com/sun/faces/config/initfacescontext/ServletContextAdapter.java index b8bd6de4b9..cd9ecbec13 100644 --- a/impl/src/main/java/com/sun/faces/config/initfacescontext/ServletContextAdapter.java +++ b/impl/src/main/java/com/sun/faces/config/initfacescontext/ServletContextAdapter.java @@ -18,15 +18,14 @@ import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.EnableTransitionTimeNoOpFlash; import static java.lang.Boolean.parseBoolean; +import static java.util.Collections.emptyIterator; import static java.util.Collections.emptyMap; -import static java.util.Collections.unmodifiableMap; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; import java.net.URL; -import java.util.Collections; import java.util.Iterator; import java.util.Locale; import java.util.Map; @@ -165,17 +164,17 @@ public String getRequestContextPath() { @Override public Map getRequestCookieMap() { - return unmodifiableMap(emptyMap()); + return emptyMap(); } @Override public Map getRequestHeaderMap() { - return unmodifiableMap(emptyMap()); + return emptyMap(); } @Override public Map getRequestHeaderValuesMap() { - return unmodifiableMap(emptyMap()); + return emptyMap(); } @Override @@ -195,17 +194,17 @@ public Map getRequestMap() { @Override public Map getRequestParameterMap() { - return unmodifiableMap(emptyMap()); + return emptyMap(); } @Override public Iterator getRequestParameterNames() { - return Collections.emptyList().iterator(); + return emptyIterator(); } @Override public Map getRequestParameterValuesMap() { - return unmodifiableMap(emptyMap()); + return emptyMap(); } @Override diff --git a/impl/src/main/java/com/sun/faces/config/manager/DbfFactory.java b/impl/src/main/java/com/sun/faces/config/manager/DbfFactory.java index 4e9011d019..fd9348a0b5 100644 --- a/impl/src/main/java/com/sun/faces/config/manager/DbfFactory.java +++ b/impl/src/main/java/com/sun/faces/config/manager/DbfFactory.java @@ -129,7 +129,7 @@ public FacesEntityResolver() { try { schemaUrl = schemaFile.toURI().toURL(); } catch (MalformedURLException mue) { - LOGGER.log(SEVERE, mue, () -> mue.toString()); + LOGGER.log(SEVERE, mue, mue::toString); } if (schemaUrl == null) { @@ -353,7 +353,7 @@ private static Map getSchemaMap(ServletContext servletConte if (schemaMap == null) { synchronized (servletContext) { - schemaMap = synchronizedMap(new EnumMap(FacesSchema.class)); + schemaMap = synchronizedMap(new EnumMap<>(FacesSchema.class)); servletContext.setAttribute(SCHEMA_MAP, schemaMap); } } diff --git a/impl/src/main/java/com/sun/faces/config/manager/FacesConfigInfo.java b/impl/src/main/java/com/sun/faces/config/manager/FacesConfigInfo.java index 8686434fe3..2ecf003df3 100644 --- a/impl/src/main/java/com/sun/faces/config/manager/FacesConfigInfo.java +++ b/impl/src/main/java/com/sun/faces/config/manager/FacesConfigInfo.java @@ -48,8 +48,8 @@ public class FacesConfigInfo { private static final String OTHERS = "others"; private double version = 2.0; - private boolean isWebInfFacesConfig; - private boolean metadataComplete; + private final boolean isWebInfFacesConfig; + private final boolean metadataComplete; private List absoluteOrdering; // -------------------------------------------------------- Constructors @@ -141,7 +141,7 @@ private boolean isMetadataComplete(Document document) { if (isVersionGreaterOrEqual(2.0)) { String metadataComplete = document.getDocumentElement().getAttributeNS(document.getNamespaceURI(), "metadata-complete"); - return metadataComplete != null ? Boolean.valueOf(metadataComplete) : false; + return Boolean.parseBoolean(metadataComplete); } // not a 2.0 application, so annotation processing will not occur diff --git a/impl/src/main/java/com/sun/faces/config/manager/FacesSchema.java b/impl/src/main/java/com/sun/faces/config/manager/FacesSchema.java index fe3ff0ab59..88e518ae44 100644 --- a/impl/src/main/java/com/sun/faces/config/manager/FacesSchema.java +++ b/impl/src/main/java/com/sun/faces/config/manager/FacesSchema.java @@ -30,6 +30,8 @@ import static com.sun.faces.config.manager.FacesSchema.Schemas.FACES_3_0_XSD_FILE; import static com.sun.faces.config.manager.FacesSchema.Schemas.FACES_4_0_XSD; import static com.sun.faces.config.manager.FacesSchema.Schemas.FACES_4_0_XSD_FILE; +import static com.sun.faces.config.manager.FacesSchema.Schemas.FACES_4_1_XSD; +import static com.sun.faces.config.manager.FacesSchema.Schemas.FACES_4_1_XSD_FILE; import static com.sun.faces.config.manager.FacesSchema.Schemas.FACES_CONFIG_1_X_DEFAULT_NS; import static com.sun.faces.config.manager.FacesSchema.Schemas.JAKARTAEE_SCHEMA_DEFAULT_NS; import static com.sun.faces.config.manager.FacesSchema.Schemas.JAVAEE_SCHEMA_DEFAULT_NS; @@ -63,13 +65,15 @@ public enum FacesSchema { FACES_23(FACES_2_3_XSD, FACES_2_3_XSD_FILE), FACES_30(FACES_3_0_XSD, FACES_3_0_XSD_FILE), FACES_40(FACES_4_0_XSD, FACES_4_0_XSD_FILE), + FACES_41(FACES_4_1_XSD, FACES_4_1_XSD_FILE), // taglib.xml FACELET_TAGLIB_20(Schemas.FACELET_TAGLIB_2_0_XSD, Schemas.FACELET_TAGLIB_2_0_XSD_FILE), FACELET_TAGLIB_22(Schemas.FACELET_TAGLIB_2_2_XSD, Schemas.FACELET_TAGLIB_2_2_XSD_FILE), FACELET_TAGLIB_23(Schemas.FACELET_TAGLIB_2_3_XSD, Schemas.FACELET_TAGLIB_2_3_XSD_FILE), FACELET_TAGLIB_30(Schemas.FACELET_TAGLIB_3_0_XSD, Schemas.FACELET_TAGLIB_3_0_XSD_FILE), - FACELET_TAGLIB_40(Schemas.FACELET_TAGLIB_4_0_XSD, Schemas.FACELET_TAGLIB_4_0_XSD_FILE); + FACELET_TAGLIB_40(Schemas.FACELET_TAGLIB_4_0_XSD, Schemas.FACELET_TAGLIB_4_0_XSD_FILE), + FACELET_TAGLIB_41(Schemas.FACELET_TAGLIB_4_1_XSD, Schemas.FACELET_TAGLIB_4_1_XSD_FILE); /** * Constants for individual schema files @@ -90,6 +94,7 @@ public static class Schemas { public static final String FACELET_TAGLIB_2_3_XSD = "/com/sun/faces/web-facelettaglibrary_2_3.xsd"; public static final String FACELET_TAGLIB_3_0_XSD = "/com/sun/faces/web-facelettaglibrary_3_0.xsd"; public static final String FACELET_TAGLIB_4_0_XSD = "/com/sun/faces/web-facelettaglibrary_4_0.xsd"; + public static final String FACELET_TAGLIB_4_1_XSD = "/com/sun/faces/web-facelettaglibrary_4_1.xsd"; public static final String FACES_1_2_XSD = "/com/sun/faces/web-facesconfig_1_2.xsd"; public static final String FACES_1_1_XSD = "/com/sun/faces/web-facesconfig_1_1.xsd"; @@ -99,12 +104,14 @@ public static class Schemas { public static final String FACES_2_3_XSD = "/com/sun/faces/web-facesconfig_2_3.xsd"; public static final String FACES_3_0_XSD = "/com/sun/faces/web-facesconfig_3_0.xsd"; public static final String FACES_4_0_XSD = "/com/sun/faces/web-facesconfig_4_0.xsd"; + public static final String FACES_4_1_XSD = "/com/sun/faces/web-facesconfig_4_1.xsd"; public static final String FACELET_TAGLIB_2_0_XSD_FILE = AS_SCHEMA_DIR + "web-facelettaglibrary_2_0.xsd"; public static final String FACELET_TAGLIB_2_2_XSD_FILE = AS_SCHEMA_DIR + "web-facelettaglibrary_2_2.xsd"; public static final String FACELET_TAGLIB_2_3_XSD_FILE = AS_SCHEMA_DIR + "web-facelettaglibrary_2_3.xsd"; public static final String FACELET_TAGLIB_3_0_XSD_FILE = AS_SCHEMA_DIR + "web-facelettaglibrary_3_0.xsd"; public static final String FACELET_TAGLIB_4_0_XSD_FILE = AS_SCHEMA_DIR + "web-facelettaglibrary_4_0.xsd"; + public static final String FACELET_TAGLIB_4_1_XSD_FILE = AS_SCHEMA_DIR + "web-facelettaglibrary_4_1.xsd"; // #### faces-config.xml XSDs within GlassFish @@ -115,6 +122,7 @@ public static class Schemas { public static final String FACES_2_3_XSD_FILE = AS_SCHEMA_DIR + "web-facesconfig_2_3.xsd"; public static final String FACES_3_0_XSD_FILE = AS_SCHEMA_DIR + "web-facesconfig_3_0.xsd"; public static final String FACES_4_0_XSD_FILE = AS_SCHEMA_DIR + "web-facesconfig_4_0.xsd"; + public static final String FACES_4_1_XSD_FILE = AS_SCHEMA_DIR + "web-facesconfig_4_1.xsd"; /** * Contains associations between grammar name and the physical resource. @@ -160,6 +168,11 @@ public static class Schemas { FACES_4_0_XSD, FACES_4_0_XSD_FILE }, + { + "web-facesconfig_4_1.xsd", + FACES_4_1_XSD, + FACES_4_1_XSD_FILE + }, { "facelet-taglib_1_0.dtd", "/com/sun/faces/facelet-taglib_1_0.dtd", @@ -190,6 +203,11 @@ public static class Schemas { FACELET_TAGLIB_4_0_XSD, FACELET_TAGLIB_4_0_XSD_FILE }, + { + "web-facelettaglibrary_4_1.xsd", + FACELET_TAGLIB_4_1_XSD, + FACELET_TAGLIB_4_1_XSD_FILE + }, { "web-facesconfig_1_2.xsd", FACES_1_2_XSD, @@ -230,6 +248,11 @@ public static class Schemas { "/com/sun/faces/jakartaee_10.xsd", AS_SCHEMA_DIR + "jakartaee_10.xsd" }, + { + "jakartaee_11.xsd", + "/com/sun/faces/jakartaee_11.xsd", + AS_SCHEMA_DIR + "jakartaee_11.xsd" + }, { "javaee_web_services_client_1_2.xsd", "/com/sun/faces/javaee_web_services_client_1_2.xsd", @@ -293,6 +316,12 @@ public static FacesSchema fromDocumentId(String documentNS, String version, Stri switch (documentNS) { case JAKARTAEE_SCHEMA_DEFAULT_NS: { switch (version) { + case "4.1": + if ("facelet-taglib".equals(localName)) { + return FACELET_TAGLIB_41; + } else { + return FACES_41; + } case "4.0": if ("facelet-taglib".equals(localName)) { return FACELET_TAGLIB_40; diff --git a/impl/src/main/java/com/sun/faces/config/manager/documents/DocumentOrderingWrapper.java b/impl/src/main/java/com/sun/faces/config/manager/documents/DocumentOrderingWrapper.java index e76202de62..517ec59319 100644 --- a/impl/src/main/java/com/sun/faces/config/manager/documents/DocumentOrderingWrapper.java +++ b/impl/src/main/java/com/sun/faces/config/manager/documents/DocumentOrderingWrapper.java @@ -54,7 +54,7 @@ public class DocumentOrderingWrapper { /** * {@link Comparator} implementation to aid in sorting faces-config documents. */ - private static Comparator COMPARATOR = new DocumentOrderingComparator(); + private static final Comparator COMPARATOR = new DocumentOrderingComparator(); /** * This is the limit on the number of attempts made to sort the documents. Any attempt to exceed this limit will result @@ -105,7 +105,7 @@ public class DocumentOrderingWrapper { /** * The wrapped Document. */ - private DocumentInfo documentInfo; + private final DocumentInfo documentInfo; /** * The wrapped Document's ID. @@ -229,8 +229,7 @@ public String toString() { */ public static DocumentOrderingWrapper[] sort(DocumentOrderingWrapper[] documents, List absoluteOrder) { - List sourceList = new CopyOnWriteArrayList<>(); - sourceList.addAll(Arrays.asList(documents)); + List sourceList = new CopyOnWriteArrayList<>(Arrays.asList(documents)); List targetList = new ArrayList<>(); for (String name : absoluteOrder) { @@ -362,8 +361,8 @@ public static boolean done(DocumentOrderingWrapper[] documents, LinkedList getIds(DocumentOrderingWrapper[] documents) { LinkedList ids = new LinkedList<>(); - for (int i = 0; i < documents.length; i++) { - ids.add(documents[i].getDocumentId()); + for (DocumentOrderingWrapper document : documents) { + ids.add(document.getDocumentId()); } return ids; } @@ -377,11 +376,11 @@ public static int innerSort(DocumentOrderingWrapper[] documents) { numberOfPasses++; if (numberOfPasses == MAX_SORT_PASSED) { if (LOGGER.isLoggable(Level.SEVERE)) { - String msg = "Exceeded maximum number of attempts to sort the application's faces-config documents.\nDocument Info\n=================="; + StringBuilder msg = new StringBuilder("Exceeded maximum number of attempts to sort the application's faces-config documents.\nDocument Info\n=================="); for (DocumentOrderingWrapper w : documents) { - msg += " " + w.toString() + '\n'; + msg.append(" ").append(w.toString()).append('\n'); } - LOGGER.severe(msg); + LOGGER.severe(msg.toString()); } throw new ConfigurationException("Exceeded maximum number of attempts to sort the faces-config documents."); } @@ -447,8 +446,7 @@ private static void enhanceOrderingData(DocumentOrderingWrapper[] wrappers) thro if (OTHERS_KEY.equals(id)) { continue; } - for (int ii = 0; ii < wrappers.length; ii++) { - DocumentOrderingWrapper other = wrappers[ii]; + for (DocumentOrderingWrapper other : wrappers) { if (id.equals(other.id)) { String[] afterIds = other.getAfterIds(); if (Arrays.binarySearch(afterIds, w.id) < 0) { @@ -463,8 +461,7 @@ private static void enhanceOrderingData(DocumentOrderingWrapper[] wrappers) thro if (otherBeforeIds.length > 0) { String[] currentBeforeIds = w.getBeforeIds(); - Set newBeforeIds = new HashSet<>(); - newBeforeIds.addAll(Arrays.asList(currentBeforeIds)); + Set newBeforeIds = new HashSet<>(Arrays.asList(currentBeforeIds)); for (String bid : otherBeforeIds) { if (OTHERS_KEY.equals(bid)) { continue; @@ -488,8 +485,7 @@ private static void enhanceOrderingData(DocumentOrderingWrapper[] wrappers) thro if (OTHERS_KEY.equals(id)) { continue; } - for (int ii = 0; ii < wrappers.length; ii++) { - DocumentOrderingWrapper other = wrappers[ii]; + for (DocumentOrderingWrapper other : wrappers) { if (id.equals(other.id)) { String[] beforeIds = other.getBeforeIds(); if (Arrays.binarySearch(beforeIds, w.id) < 0) { @@ -502,8 +498,7 @@ private static void enhanceOrderingData(DocumentOrderingWrapper[] wrappers) thro String[] otherAfterIds = other.getAfterIds(); if (otherAfterIds.length > 0) { String[] currentAfterIds = w.getAfterIds(); - Set newAfterIds = new HashSet<>(); - newAfterIds.addAll(Arrays.asList(currentAfterIds)); + Set newAfterIds = new HashSet<>(Arrays.asList(currentAfterIds)); for (String bid : otherAfterIds) { if (OTHERS_KEY.equals(bid)) { continue; diff --git a/impl/src/main/java/com/sun/faces/config/manager/spi/AnnotationScanner.java b/impl/src/main/java/com/sun/faces/config/manager/spi/AnnotationScanner.java index 80ebe79b38..247a999da1 100644 --- a/impl/src/main/java/com/sun/faces/config/manager/spi/AnnotationScanner.java +++ b/impl/src/main/java/com/sun/faces/config/manager/spi/AnnotationScanner.java @@ -17,8 +17,6 @@ package com.sun.faces.config.manager.spi; import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.AnnotationScanPackages; -import static java.util.Arrays.asList; -import static java.util.Collections.unmodifiableSet; import static java.util.logging.Level.WARNING; import java.lang.annotation.Annotation; @@ -65,7 +63,7 @@ public abstract class AnnotationScanner extends AnnotationProvider { private static final Logger LOGGER = FacesLogger.CONFIG.getLogger(); private static final String WILDCARD = "*"; - protected static final Set FACES_ANNOTATIONS = unmodifiableSet(new HashSet<>(asList( + protected static final Set FACES_ANNOTATIONS = Set.of( "Ljakarta/faces/component/FacesComponent;", "Ljakarta/faces/convert/FacesConverter;", "Ljakarta/faces/validator/FacesValidator;", "Ljakarta/faces/render/FacesRenderer;", "Ljakarta/faces/event/NamedEvent;", "Ljakarta/faces/component/behavior/FacesBehavior;", @@ -74,13 +72,13 @@ public abstract class AnnotationScanner extends AnnotationProvider { "jakarta.faces.component.FacesComponent", "jakarta.faces.convert.FacesConverter", "jakarta.faces.validator.FacesValidator", "jakarta.faces.render.FacesRenderer", "jakarta.faces.event.NamedEvent", "jakarta.faces.component.behavior.FacesBehavior", - "jakarta.faces.render.FacesBehaviorRenderer"))); + "jakarta.faces.render.FacesBehaviorRenderer"); - protected static final Set> FACES_ANNOTATION_TYPE = unmodifiableSet(new HashSet<>(asList( + protected static final Set> FACES_ANNOTATION_TYPE = Set.of( FacesComponent.class, FacesConverter.class, FacesValidator.class, FacesRenderer.class, NamedEvent.class, FacesBehavior.class, - FacesBehaviorRenderer.class))); + FacesBehaviorRenderer.class); private boolean isAnnotationScanPackagesSet; private String[] webInfClassesPackages; @@ -207,11 +205,7 @@ protected Map, Set>> processClassList(Set annoType = annotation.annotationType(); if (FACES_ANNOTATION_TYPE.contains(annoType)) { - Set> classes = annotatedClasses.get(annoType); - if (classes == null) { - classes = new HashSet<>(); - annotatedClasses.put(annoType, classes); - } + Set> classes = annotatedClasses.computeIfAbsent(annoType, k -> new HashSet<>()); classes.add(clazz); } } @@ -230,7 +224,7 @@ protected Map, Set>> processClassList(Set, Set>>emptyMap(); + return annotatedClasses != null ? annotatedClasses : Collections.emptyMap(); } protected boolean isAnnotationScanPackagesSet() { diff --git a/impl/src/main/java/com/sun/faces/config/manager/tasks/FindAnnotatedConfigClasses.java b/impl/src/main/java/com/sun/faces/config/manager/tasks/FindAnnotatedConfigClasses.java index 4e5bde7527..4cc1a34d23 100644 --- a/impl/src/main/java/com/sun/faces/config/manager/tasks/FindAnnotatedConfigClasses.java +++ b/impl/src/main/java/com/sun/faces/config/manager/tasks/FindAnnotatedConfigClasses.java @@ -39,10 +39,10 @@ */ public class FindAnnotatedConfigClasses implements Callable, Set>>> { - private InitFacesContext facesContext; - private AnnotationProvider provider; - private ProvideMetadataToAnnotationScanTask metadataGetter; - private Set> annotatedSet; + private final InitFacesContext facesContext; + private final AnnotationProvider provider; + private final ProvideMetadataToAnnotationScanTask metadataGetter; + private final Set> annotatedSet; // -------------------------------------------------------- Constructors @@ -64,8 +64,6 @@ public Map, Set>> call() throws Exception { t.startTiming(); } - // We are executing on a different thread. - facesContext.addInitContextEntryForCurrentThread(); Set scanUris = null; com.sun.faces.spi.AnnotationScanner annotationScanner = metadataGetter.getAnnotationScanner(); diff --git a/impl/src/main/java/com/sun/faces/config/manager/tasks/FindConfigResourceURIsTask.java b/impl/src/main/java/com/sun/faces/config/manager/tasks/FindConfigResourceURIsTask.java index 270578ad9b..1ebacdf514 100644 --- a/impl/src/main/java/com/sun/faces/config/manager/tasks/FindConfigResourceURIsTask.java +++ b/impl/src/main/java/com/sun/faces/config/manager/tasks/FindConfigResourceURIsTask.java @@ -37,8 +37,8 @@ */ public class FindConfigResourceURIsTask implements Callable> { - private ConfigurationResourceProvider provider; - private ServletContext servletContext; + private final ConfigurationResourceProvider provider; + private final ServletContext servletContext; // -------------------------------------------------------- Constructors @@ -63,7 +63,7 @@ public FindConfigResourceURIsTask(ConfigurationResourceProvider provider, Servle @SuppressWarnings("unchecked") @Override public Collection call() throws Exception { - Collection untypedCollection = provider.getResources(servletContext); + Collection untypedCollection = provider.getResources(servletContext); Iterator untypedCollectionIterator = untypedCollection.iterator(); Collection result = emptyList(); @@ -80,7 +80,7 @@ public Collection call() throws Exception { result.add(new URI(((URL) cur).toExternalForm())); } } else { - result = (Collection) untypedCollection; + result = untypedCollection; } } diff --git a/impl/src/main/java/com/sun/faces/config/manager/tasks/ParseConfigResourceToDOMTask.java b/impl/src/main/java/com/sun/faces/config/manager/tasks/ParseConfigResourceToDOMTask.java index 80d9fd9aac..741a69264f 100644 --- a/impl/src/main/java/com/sun/faces/config/manager/tasks/ParseConfigResourceToDOMTask.java +++ b/impl/src/main/java/com/sun/faces/config/manager/tasks/ParseConfigResourceToDOMTask.java @@ -89,10 +89,10 @@ public class ParseConfigResourceToDOMTask implements Callable { */ private static final String FACES_TO_1_1_PRIVATE_XSL = "/com/sun/faces/faces1_0-1_1toSchema.xsl"; - private ServletContext servletContext; - private URI documentURI; + private final ServletContext servletContext; + private final URI documentURI; private DocumentBuilderFactory factory; - private boolean validating; + private final boolean validating; diff --git a/impl/src/main/java/com/sun/faces/config/processor/AbstractConfigProcessor.java b/impl/src/main/java/com/sun/faces/config/processor/AbstractConfigProcessor.java index 37503a0c5a..135a915305 100644 --- a/impl/src/main/java/com/sun/faces/config/processor/AbstractConfigProcessor.java +++ b/impl/src/main/java/com/sun/faces/config/processor/AbstractConfigProcessor.java @@ -18,7 +18,6 @@ import static com.sun.faces.application.ApplicationResourceBundle.DEFAULT_KEY; import static com.sun.faces.config.ConfigManager.INJECTION_PROVIDER_KEY; -import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.JakartaFacesProjectStage; import static com.sun.faces.util.ReflectionUtils.lookupConstructor; import static jakarta.faces.FactoryFinder.APPLICATION_FACTORY; import static jakarta.faces.application.ProjectStage.Development; @@ -53,6 +52,7 @@ import jakarta.faces.FacesException; import jakarta.faces.FactoryFinder; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.application.Application; import jakarta.faces.application.ApplicationFactory; import jakarta.faces.application.ProjectStage; @@ -138,8 +138,7 @@ protected Map getTextMap(List list) { if (list != null && !list.isEmpty()) { int len = list.size(); HashMap names = new HashMap<>(len, 1.0f); - for (int i = 0; i < len; i++) { - Node node = list.get(i); + for (Node node : list) { String textValue = getNodeText(node); if (textValue != null) { if (node.hasAttributes()) { @@ -325,16 +324,6 @@ private ProjectStage getProjectStage(ServletContext sc, FacesContext facesContex if (LOGGER.isLoggable(FINE)) { LOGGER.log(FINE, "ProjectStage configured via JNDI: {0}", value); } - } else { - value = webConfig.getOptionValue(JakartaFacesProjectStage); - if (value != null) { - if (LOGGER.isLoggable(FINE)) { - LOGGER.log(FINE, "ProjectStage configured via servlet context init parameter: {0}", value); - } - } - } - - if (value != null) { try { projectStage = ProjectStage.valueOf(value); } catch (IllegalArgumentException iae) { @@ -342,6 +331,13 @@ private ProjectStage getProjectStage(ServletContext sc, FacesContext facesContex LOGGER.log(INFO, "Unable to discern ProjectStage for value {0}.", value); } } + } else { + projectStage = ContextParam.PROJECT_STAGE.getValue(facesContext); + if (projectStage != null) { + if (LOGGER.isLoggable(FINE)) { + LOGGER.log(FINE, "ProjectStage configured via servlet context init parameter: {0}", value); + } + } } if (projectStage == null) { diff --git a/impl/src/main/java/com/sun/faces/config/processor/ApplicationConfigProcessor.java b/impl/src/main/java/com/sun/faces/config/processor/ApplicationConfigProcessor.java index 7fe54ab229..8960587cb1 100644 --- a/impl/src/main/java/com/sun/faces/config/processor/ApplicationConfigProcessor.java +++ b/impl/src/main/java/com/sun/faces/config/processor/ApplicationConfigProcessor.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2024 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -47,13 +48,13 @@ import com.sun.faces.application.ApplicationAssociate; import com.sun.faces.application.ApplicationResourceBundle; import com.sun.faces.config.ConfigurationException; -import com.sun.faces.config.WebConfiguration; import com.sun.faces.config.manager.documents.DocumentInfo; import com.sun.faces.util.FacesLogger; import com.sun.faces.util.Util; import jakarta.el.ELResolver; import jakarta.faces.FacesException; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.application.Application; import jakarta.faces.application.ConfigurableNavigationHandler; import jakarta.faces.application.NavigationHandler; @@ -333,15 +334,14 @@ private void destroyInstances(ServletContext sc, FacesContext facesContext, List /** * If defaultValidatorIds is null, then no <default-validators> element appeared in any configuration file. In - * that case, add jakarta.faces.Bean if Bean Validation is available. If the <default-validators> appeared at + * that case, add jakarta.faces.Bean if Jakarta Validation is available. If the <default-validators> appeared at * least once, don't add the default (and empty <default-validator> element disabled default validators) */ private void registerDefaultValidatorIds(FacesContext facesContext, Application application, LinkedHashSet defaultValidatorIds) { if (defaultValidatorIds == null) { defaultValidatorIds = new LinkedHashSet<>(); if (isBeanValidatorAvailable(facesContext)) { - WebConfiguration webConfig = WebConfiguration.getInstance(); - if (!webConfig.isOptionEnabled(WebConfiguration.BooleanWebContextInitParameter.DisableDefaultBeanValidator)) { + if (!ContextParam.DISABLE_DEFAULT_BEAN_VALIDATOR.isSet(facesContext)) { defaultValidatorIds.add(BeanValidator.VALIDATOR_ID); } } @@ -378,9 +378,9 @@ static boolean isBeanValidatorAvailable(FacesContext facesContext) { } catch (NoClassDefFoundError nde) { // On google app engine InitialContext is forbidden to use and GAE throws // NoClassDefFoundError - LOGGER.log(FINE, nde, () -> nde.toString()); + LOGGER.log(FINE, nde, nde::toString); } catch (NamingException ne) { - LOGGER.log(WARNING, ne, () -> ne.toString()); + LOGGER.log(WARNING, ne, ne::toString); } try { @@ -390,22 +390,19 @@ static boolean isBeanValidatorAvailable(FacesContext facesContext) { result = true; } } catch (NamingException root) { - LOGGER.fine(() -> "Could not build a default Bean Validator factory: " + root.getMessage()); + LOGGER.fine(() -> "Could not build a default Jakarta Validation ValidatorFactory: " + root.getMessage()); } if (!result) { - try { - ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); - factory.getValidator(); - appMap.put(BeanValidator.VALIDATOR_FACTORY_KEY, factory); - result = true; - } catch (Throwable throwable) { - } + ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); + factory.getValidator(); + appMap.put(BeanValidator.VALIDATOR_FACTORY_KEY, factory); + result = true; } } } catch (Throwable t) { // CNFE or ValidationException or any other - LOGGER.fine("Unable to load Beans Validation"); + LOGGER.fine("Unable to load Jakarta Validation"); } appMap.put(beansValidationAvailabilityCacheKey, result); diff --git a/impl/src/main/java/com/sun/faces/config/processor/BehaviorConfigProcessor.java b/impl/src/main/java/com/sun/faces/config/processor/BehaviorConfigProcessor.java index 682ad40c18..e918cfa01c 100644 --- a/impl/src/main/java/com/sun/faces/config/processor/BehaviorConfigProcessor.java +++ b/impl/src/main/java/com/sun/faces/config/processor/BehaviorConfigProcessor.java @@ -78,11 +78,11 @@ public void process(ServletContext sc, FacesContext facesContext, DocumentInfo[] // via config files take precedence processAnnotations(facesContext, FacesBehavior.class); - for (int i = 0; i < documentInfos.length; i++) { + for (DocumentInfo documentInfo : documentInfos) { if (LOGGER.isLoggable(FINE)) { - LOGGER.log(FINE, format("Processing behavior elements for document: ''{0}''", documentInfos[i].getSourceURI())); + LOGGER.log(FINE, format("Processing behavior elements for document: ''{0}''", documentInfo.getSourceURI())); } - Document document = documentInfos[i].getDocument(); + Document document = documentInfo.getDocument(); String namespace = document.getDocumentElement().getNamespaceURI(); NodeList behaviors = document.getDocumentElement().getElementsByTagNameNS(namespace, BEHAVIOR); if (behaviors != null && behaviors.getLength() > 0) { diff --git a/impl/src/main/java/com/sun/faces/config/processor/ComponentConfigProcessor.java b/impl/src/main/java/com/sun/faces/config/processor/ComponentConfigProcessor.java index b78dfb547b..fd6bb21a9c 100644 --- a/impl/src/main/java/com/sun/faces/config/processor/ComponentConfigProcessor.java +++ b/impl/src/main/java/com/sun/faces/config/processor/ComponentConfigProcessor.java @@ -78,12 +78,12 @@ public void process(ServletContext sc, FacesContext facesContext, DocumentInfo[] // via config files take precedence processAnnotations(facesContext, FacesComponent.class); - for (int i = 0; i < documentInfos.length; i++) { + for (DocumentInfo documentInfo : documentInfos) { if (LOGGER.isLoggable(FINE)) { - LOGGER.log(FINE, format("Processing component elements for document: ''{0}''", documentInfos[i].getSourceURI())); + LOGGER.log(FINE, format("Processing component elements for document: ''{0}''", documentInfo.getSourceURI())); } - Document document = documentInfos[i].getDocument(); + Document document = documentInfo.getDocument(); String namespace = document.getDocumentElement().getNamespaceURI(); NodeList components = document.getDocumentElement().getElementsByTagNameNS(namespace, COMPONENT); if (components != null && components.getLength() > 0) { diff --git a/impl/src/main/java/com/sun/faces/config/processor/ConverterConfigProcessor.java b/impl/src/main/java/com/sun/faces/config/processor/ConverterConfigProcessor.java index 35db5cf7bd..ec5cf41817 100644 --- a/impl/src/main/java/com/sun/faces/config/processor/ConverterConfigProcessor.java +++ b/impl/src/main/java/com/sun/faces/config/processor/ConverterConfigProcessor.java @@ -76,11 +76,11 @@ public void process(ServletContext sc, FacesContext facesContext, DocumentInfo[] // via config files take precedence processAnnotations(facesContext, FacesConverter.class); - for (int i = 0; i < documentInfos.length; i++) { + for (DocumentInfo documentInfo : documentInfos) { if (LOGGER.isLoggable(FINE)) { - LOGGER.log(FINE, format("Processing converter elements for document: ''{0}''", documentInfos[i].getSourceURI())); + LOGGER.log(FINE, format("Processing converter elements for document: ''{0}''", documentInfo.getSourceURI())); } - Document document = documentInfos[i].getDocument(); + Document document = documentInfo.getDocument(); String namespace = document.getDocumentElement().getNamespaceURI(); NodeList nodes = document.getDocumentElement().getElementsByTagNameNS(namespace, CONVERTER); if (nodes != null && nodes.getLength() > 0) { diff --git a/impl/src/main/java/com/sun/faces/config/processor/FacesConfigExtensionProcessor.java b/impl/src/main/java/com/sun/faces/config/processor/FacesConfigExtensionProcessor.java index aeaf312fbe..7357d877ae 100644 --- a/impl/src/main/java/com/sun/faces/config/processor/FacesConfigExtensionProcessor.java +++ b/impl/src/main/java/com/sun/faces/config/processor/FacesConfigExtensionProcessor.java @@ -75,17 +75,17 @@ public FacesConfigExtensionProcessor() { @Override public void process(ServletContext sc, FacesContext facesContext, DocumentInfo[] documentInfos) throws Exception { - for (int i = 0; i < documentInfos.length; i++) { + for (DocumentInfo documentInfo : documentInfos) { if (LOGGER.isLoggable(FINE)) { - LOGGER.log(FINE, format("Processing faces-config-extension elements for document: ''{0}''", documentInfos[i].getSourceURI())); + LOGGER.log(FINE, format("Processing faces-config-extension elements for document: ''{0}''", documentInfo.getSourceURI())); } - Document document = documentInfos[i].getDocument(); + Document document = documentInfo.getDocument(); String namespace = document.getDocumentElement().getNamespaceURI(); NodeList facesConfigExtensions = document.getDocumentElement().getElementsByTagNameNS(namespace, FACES_CONFIG_EXTENSION); if (facesConfigExtensions != null && facesConfigExtensions.getLength() > 0) { - processFacesConfigExtensions(facesConfigExtensions, namespace, documentInfos[i]); + processFacesConfigExtensions(facesConfigExtensions, namespace, documentInfo); } } diff --git a/impl/src/main/java/com/sun/faces/config/processor/FacesConfigNamespaceContext.java b/impl/src/main/java/com/sun/faces/config/processor/FacesConfigNamespaceContext.java index 634b00303d..091bcea2c5 100644 --- a/impl/src/main/java/com/sun/faces/config/processor/FacesConfigNamespaceContext.java +++ b/impl/src/main/java/com/sun/faces/config/processor/FacesConfigNamespaceContext.java @@ -23,7 +23,7 @@ class FacesConfigNamespaceContext implements NamespaceContext { - private String defaultNamespace = null; + private final String defaultNamespace; FacesConfigNamespaceContext() { this.defaultNamespace = "https://jakarta.ee/xml/ns/jakartaee"; @@ -45,7 +45,7 @@ public String getPrefix(String namespaceURI) { @Override public Iterator getPrefixes(String namespaceURI) { - return Collections.emptyList().iterator(); + return Collections.emptyIterator(); } } diff --git a/impl/src/main/java/com/sun/faces/config/processor/FacesFlowDefinitionConfigProcessor.java b/impl/src/main/java/com/sun/faces/config/processor/FacesFlowDefinitionConfigProcessor.java index 3ac07b6f51..2aca9b68bc 100644 --- a/impl/src/main/java/com/sun/faces/config/processor/FacesFlowDefinitionConfigProcessor.java +++ b/impl/src/main/java/com/sun/faces/config/processor/FacesFlowDefinitionConfigProcessor.java @@ -47,6 +47,7 @@ import com.sun.faces.RIConstants; import com.sun.faces.application.ApplicationAssociate; +import com.sun.faces.application.JavaFlowLoaderHelper; import com.sun.faces.config.WebConfiguration; import com.sun.faces.config.manager.documents.DocumentInfo; import com.sun.faces.facelets.util.ReflectionUtil; @@ -161,12 +162,12 @@ public void process(ServletContext sc, FacesContext facesContext, DocumentInfo[] WebConfiguration config = WebConfiguration.getInstance(sc); - for (int i = 0; i < documentInfos.length; i++) { - URI definingDocumentURI = documentInfos[i].getSourceURI(); + for (DocumentInfo documentInfo : documentInfos) { + URI definingDocumentURI = documentInfo.getSourceURI(); if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, MessageFormat.format("Processing factory elements for document: ''{0}''", definingDocumentURI)); } - Document document = documentInfos[i].getDocument(); + Document document = documentInfo.getDocument(); String namespace = document.getDocumentElement().getNamespaceURI(); NodeList flowDefinitions = document.getDocumentElement().getElementsByTagNameNS(namespace, FACES_FLOW_DEFINITION); if (flowDefinitions != null && flowDefinitions.getLength() > 0) { @@ -177,19 +178,7 @@ public void process(ServletContext sc, FacesContext facesContext, DocumentInfo[] } if (config.isHasFlows()) { - String optionValue = config.getOptionValue(WebConfiguration.WebContextInitParameter.ClientWindowMode); - boolean clientWindowNeedsEnabling = false; - if ("none".equals(optionValue)) { - clientWindowNeedsEnabling = true; - String featureName = WebConfiguration.WebContextInitParameter.ClientWindowMode.getQualifiedName(); - LOGGER.log(Level.WARNING, "{0} was set to none, but Faces Flows requires {0} is enabled. Setting to ''url''.", new Object[] { featureName }); - } else if (null == optionValue) { - clientWindowNeedsEnabling = true; - } - if (clientWindowNeedsEnabling) { - config.setOptionValue(WebConfiguration.WebContextInitParameter.ClientWindowMode, "url"); - } - + JavaFlowLoaderHelper.enableClientWindowModeIfNecessary(facesContext); facesContext.getApplication().subscribeToEvent(PostConstructApplicationEvent.class, Application.class, new PerformDeferredFlowProcessing()); } @@ -208,7 +197,7 @@ private void saveFlowDefinition(FacesContext context, URI definingDocumentURI, D private List getSavedFlowDefinitions(FacesContext context) { Map appMap = context.getExternalContext().getApplicationMap(); List def = (List) appMap.get(flowDefinitionListKey); - return null != def ? def : Collections.EMPTY_LIST; + return null != def ? def : Collections.emptyList(); } private void clearSavedFlowDefinitions(FacesContext context) { diff --git a/impl/src/main/java/com/sun/faces/config/processor/FactoryConfigProcessor.java b/impl/src/main/java/com/sun/faces/config/processor/FactoryConfigProcessor.java index e8d9f3068b..e2f420465d 100644 --- a/impl/src/main/java/com/sun/faces/config/processor/FactoryConfigProcessor.java +++ b/impl/src/main/java/com/sun/faces/config/processor/FactoryConfigProcessor.java @@ -28,6 +28,10 @@ import java.util.logging.Level; import java.util.logging.Logger; +import jakarta.faces.FactoryFinder; +import jakarta.faces.context.FacesContext; +import jakarta.servlet.ServletContext; + import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -35,15 +39,10 @@ import com.sun.faces.application.InjectionApplicationFactory; import com.sun.faces.config.ConfigurationException; -import com.sun.faces.config.InitFacesContext; import com.sun.faces.config.manager.documents.DocumentInfo; import com.sun.faces.context.InjectionFacesContextFactory; import com.sun.faces.util.FacesLogger; -import jakarta.faces.FactoryFinder; -import jakarta.faces.context.FacesContext; -import jakarta.servlet.ServletContext; - /** *

    * This ConfigProcessor handles all elements defined under /faces-config/factory. @@ -58,6 +57,11 @@ public class FactoryConfigProcessor extends AbstractConfigProcessor { */ private static final String FACTORY = "factory"; + /** + * faces-config/factory/faces-servlet-factory + */ + private static final String FACES_SERVLET_FACTORY = "faces-servlet-factory"; + /** * /faces-config/factory/application-factory */ @@ -136,7 +140,7 @@ public class FactoryConfigProcessor extends AbstractConfigProcessor { /** * Array of Factory names for post-configuration validation. */ - private final List factoryNames = asList(FactoryFinder.APPLICATION_FACTORY, FactoryFinder.CLIENT_WINDOW_FACTORY, + private final List factoryNames = asList(FactoryFinder.FACES_SERVLET_FACTORY, FactoryFinder.APPLICATION_FACTORY, FactoryFinder.CLIENT_WINDOW_FACTORY, FactoryFinder.EXCEPTION_HANDLER_FACTORY, FactoryFinder.EXTERNAL_CONTEXT_FACTORY, FactoryFinder.FACES_CONTEXT_FACTORY, FactoryFinder.FLASH_FACTORY, FactoryFinder.LIFECYCLE_FACTORY, FactoryFinder.VIEW_DECLARATION_LANGUAGE_FACTORY, FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY, FactoryFinder.RENDER_KIT_FACTORY, FactoryFinder.VISIT_CONTEXT_FACTORY, FactoryFinder.FACELET_CACHE_FACTORY, @@ -167,12 +171,12 @@ public void process(ServletContext servletContext, FacesContext facesContext, Do // for this application AtomicInteger applicationFactoryCount = new AtomicInteger(0); - for (int i = 0; i < documentInfos.length; i++) { + for (DocumentInfo documentInfo : documentInfos) { if (LOGGER.isLoggable(FINE)) { - LOGGER.log(FINE, format("Processing factory elements for document: ''{0}''", documentInfos[i].getSourceURI())); + LOGGER.log(FINE, format("Processing factory elements for document: ''{0}''", documentInfo.getSourceURI())); } - Document document = documentInfos[i].getDocument(); + Document document = documentInfo.getDocument(); String namespace = document.getDocumentElement().getNamespaceURI(); NodeList factories = document.getDocumentElement().getElementsByTagNameNS(namespace, FACTORY); if (factories != null && factories.getLength() > 0) { @@ -205,8 +209,11 @@ private void processFactories(NodeList factories, String namespace, AtomicIntege for (int c = 0, csize = children.getLength(); c < csize; c++) { Node childNode = children.item(c); switch (childNode.getLocalName()) { + case FACES_SERVLET_FACTORY: + setFactory(FactoryFinder.FACES_SERVLET_FACTORY, getNodeText(childNode)); + break; case APPLICATION_FACTORY: - int cnt = appCount.incrementAndGet(); + appCount.incrementAndGet(); setFactory(FactoryFinder.APPLICATION_FACTORY, getNodeText(childNode)); break; case EXCEPTION_HANDLER_FACTORY: @@ -280,7 +287,6 @@ private void verifyFactoriesExist(ServletContext servletContext) { factoryNames.stream().forEach(e -> { Thread.currentThread().setContextClassLoader(contextClassLoader); - InitFacesContext.getInstance(servletContext); try { FactoryFinder.getFactory(e); diff --git a/impl/src/main/java/com/sun/faces/config/processor/LifecycleConfigProcessor.java b/impl/src/main/java/com/sun/faces/config/processor/LifecycleConfigProcessor.java index 939a4a49fe..fbb3157b21 100644 --- a/impl/src/main/java/com/sun/faces/config/processor/LifecycleConfigProcessor.java +++ b/impl/src/main/java/com/sun/faces/config/processor/LifecycleConfigProcessor.java @@ -61,7 +61,7 @@ public class LifecycleConfigProcessor extends AbstractConfigProcessor { *

    */ private static final String PHASE_LISTENER = "phase-listener"; - private List appPhaseListeners; + private final List appPhaseListeners; public LifecycleConfigProcessor() { appPhaseListeners = new CopyOnWriteArrayList<>(); @@ -73,12 +73,12 @@ public LifecycleConfigProcessor() { public void process(ServletContext servletContext, FacesContext facesContext, DocumentInfo[] documentInfos) throws Exception { LifecycleFactory factory = (LifecycleFactory) FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY); - for (int i = 0; i < documentInfos.length; i++) { + for (DocumentInfo documentInfo : documentInfos) { if (LOGGER.isLoggable(FINE)) { - LOGGER.log(FINE, format("Processing lifecycle elements for document: ''{0}''", documentInfos[i].getSourceURI())); + LOGGER.log(FINE, format("Processing lifecycle elements for document: ''{0}''", documentInfo.getSourceURI())); } - Document document = documentInfos[i].getDocument(); + Document document = documentInfo.getDocument(); String namespace = document.getDocumentElement().getNamespaceURI(); NodeList lifecycles = document.getElementsByTagNameNS(namespace, LIFECYCLE); diff --git a/impl/src/main/java/com/sun/faces/config/processor/NavigationConfigProcessor.java b/impl/src/main/java/com/sun/faces/config/processor/NavigationConfigProcessor.java index 634be011d8..2ea23153dd 100644 --- a/impl/src/main/java/com/sun/faces/config/processor/NavigationConfigProcessor.java +++ b/impl/src/main/java/com/sun/faces/config/processor/NavigationConfigProcessor.java @@ -39,7 +39,6 @@ import com.sun.faces.config.manager.documents.DocumentInfo; import com.sun.faces.util.FacesLogger; -import jakarta.faces.application.ConfigurableNavigationHandler; import jakarta.faces.application.NavigationCase; import jakarta.faces.application.NavigationHandler; import jakarta.faces.context.FacesContext; @@ -301,23 +300,12 @@ private void addNavigationCasesForRule(String fromViewId, List navigationC LOGGER.log(Level.FINE, MessageFormat.format("Adding NavigationCase: {0}", cnc.toString())); } - // if the top-level NavigationHandler is an instance of - // ConfigurableNavigationHandler, add the NavigationCases to - // that instance as well as adding them to the application associate. + // Add the NavigationCases to the top level NavigationHandler + // as well as adding them to the application associate. // We have to add them to the ApplicationAssociate in the case // where the top-level NavigationHandler may be custom and delegates - // to the default NavigationHandler implementation. In 1.2, they - // could be guaranteed that the default implementation had all - // defined navigation mappings. - if (navHandler instanceof ConfigurableNavigationHandler) { - ConfigurableNavigationHandler cnav = (ConfigurableNavigationHandler) navHandler; - Set cases = cnav.getNavigationCases().get(fromViewId); - if (cases == null) { - cases = new LinkedHashSet<>(); - cnav.getNavigationCases().put(fromViewId, cases); - } - cases.add(cnc); - } + // to the default NavigationHandler implementation. + navHandler.getNavigationCases().computeIfAbsent(fromViewId, k -> new LinkedHashSet<>()).add(cnc); associate.addNavigationCase(cnc); } @@ -396,7 +384,7 @@ private Map> processParameters(NodeList children) { private boolean isIncludeViewParams(Node n) { - return Boolean.valueOf(getNodeText(n.getAttributes().getNamedItem(INCLUDE_VIEW_PARAMS_ATTRIBUTE))); + return Boolean.parseBoolean(getNodeText(n.getAttributes().getNamedItem(INCLUDE_VIEW_PARAMS_ATTRIBUTE))); } diff --git a/impl/src/main/java/com/sun/faces/config/processor/ProtectedViewsConfigProcessor.java b/impl/src/main/java/com/sun/faces/config/processor/ProtectedViewsConfigProcessor.java index ca14ad327d..ff9ed6261d 100644 --- a/impl/src/main/java/com/sun/faces/config/processor/ProtectedViewsConfigProcessor.java +++ b/impl/src/main/java/com/sun/faces/config/processor/ProtectedViewsConfigProcessor.java @@ -64,17 +64,17 @@ public ProtectedViewsConfigProcessor() { @Override public void process(ServletContext servletContext, FacesContext facesContext, DocumentInfo[] documentInfos) throws Exception { - for (int i = 0; i < documentInfos.length; i++) { + for (DocumentInfo documentInfo : documentInfos) { if (LOGGER.isLoggable(FINE)) { - LOGGER.log(FINE, format("Processing protected-views element for document: ''{0}''", documentInfos[i].getSourceURI())); + LOGGER.log(FINE, format("Processing protected-views element for document: ''{0}''", documentInfo.getSourceURI())); } - Document document = documentInfos[i].getDocument(); + Document document = documentInfo.getDocument(); String namespace = document.getDocumentElement().getNamespaceURI(); NodeList protectedViews = document.getDocumentElement().getElementsByTagNameNS(namespace, PROTECTED_VIEWS); if (protectedViews != null && protectedViews.getLength() > 0) { - processProtectedViews(facesContext, protectedViews, namespace, documentInfos[i]); + processProtectedViews(facesContext, protectedViews, namespace, documentInfo); } } diff --git a/impl/src/main/java/com/sun/faces/config/processor/RenderKitConfigProcessor.java b/impl/src/main/java/com/sun/faces/config/processor/RenderKitConfigProcessor.java index 7202be07ed..d74daa5e68 100644 --- a/impl/src/main/java/com/sun/faces/config/processor/RenderKitConfigProcessor.java +++ b/impl/src/main/java/com/sun/faces/config/processor/RenderKitConfigProcessor.java @@ -132,12 +132,12 @@ public void process(ServletContext servletContext, FacesContext facesContext, Do Map>> behaviorRenderers = new LinkedHashMap<>(); RenderKitFactory renderKitFactory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY); - for (int i = 0; i < documentInfos.length; i++) { + for (DocumentInfo documentInfo : documentInfos) { if (LOGGER.isLoggable(FINE)) { - LOGGER.log(FINE, format("Processing render-kit elements for document: ''{0}''", documentInfos[i].getSourceURI())); + LOGGER.log(FINE, format("Processing render-kit elements for document: ''{0}''", documentInfo.getSourceURI())); } - Document document = documentInfos[i].getDocument(); + Document document = documentInfo.getDocument(); String namespace = document.getDocumentElement().getNamespaceURI(); NodeList renderkits = document.getDocumentElement().getElementsByTagNameNS(namespace, RENDERKIT); diff --git a/impl/src/main/java/com/sun/faces/config/processor/ResourceLibraryContractsConfigProcessor.java b/impl/src/main/java/com/sun/faces/config/processor/ResourceLibraryContractsConfigProcessor.java index 20fb25cfde..949e93c570 100644 --- a/impl/src/main/java/com/sun/faces/config/processor/ResourceLibraryContractsConfigProcessor.java +++ b/impl/src/main/java/com/sun/faces/config/processor/ResourceLibraryContractsConfigProcessor.java @@ -70,12 +70,12 @@ public ResourceLibraryContractsConfigProcessor() { public void process(ServletContext servletContext, FacesContext facesContext, DocumentInfo[] documentInfos) throws Exception { HashMap> map = new HashMap<>(); - for (int i = 0; i < documentInfos.length; i++) { + for (DocumentInfo documentInfo : documentInfos) { if (LOGGER.isLoggable(FINE)) { - LOGGER.log(FINE, MessageFormat.format("Processing factory elements for document: ''{0}''", documentInfos[i].getSourceURI())); + LOGGER.log(FINE, MessageFormat.format("Processing factory elements for document: ''{0}''", documentInfo.getSourceURI())); } - Document document = documentInfos[i].getDocument(); + Document document = documentInfo.getDocument(); String namespace = document.getDocumentElement().getNamespaceURI(); NodeList resourceLibraryContracts = document.getDocumentElement().getElementsByTagNameNS(namespace, RESOURCE_LIBRARY_CONTRACTS); if (resourceLibraryContracts != null && resourceLibraryContracts.getLength() > 0) { @@ -125,20 +125,18 @@ private void processResourceLibraryContracts(NodeList resourceLibraryContracts, if (contracts != null && contracts.getLength() > 0) { for (int j = 0; j < contracts.getLength(); j++) { String[] contractStrings = contracts.item(j).getNodeValue().trim().split(","); - for (int k = 0; k < contractStrings.length; k++) { - if (!list.contains(contractStrings[k])) { + for (String contractString : contractStrings) { + if (!list.contains(contractString)) { if (LOGGER.isLoggable(INFO)) { - LOGGER.log(INFO, "Added contract: {0} for url-pattern: {1}", - new Object[] { contractStrings[k], urlPattern }); + LOGGER.log(INFO, "Added contract: {0} for url-pattern: {1}", new Object[]{contractString, urlPattern}); } - list.add(contractStrings[k]); + list.add(contractString); } else { /* * We found the contract again in the list for the specified url-pattern. */ if (LOGGER.isLoggable(INFO)) { - LOGGER.log(INFO, "Duplicate contract: {0} found for url-pattern: {1}", - new Object[] { contractStrings[k], urlPattern }); + LOGGER.log(INFO, "Duplicate contract: {0} found for url-pattern: {1}", new Object[]{contractString, urlPattern}); } } } diff --git a/impl/src/main/java/com/sun/faces/config/processor/ValidatorConfigProcessor.java b/impl/src/main/java/com/sun/faces/config/processor/ValidatorConfigProcessor.java index ce82134089..17e679e0fa 100644 --- a/impl/src/main/java/com/sun/faces/config/processor/ValidatorConfigProcessor.java +++ b/impl/src/main/java/com/sun/faces/config/processor/ValidatorConfigProcessor.java @@ -81,12 +81,12 @@ public void process(ServletContext servletContext, FacesContext facesContext, Do // via config files take precedence processAnnotations(facesContext, FacesValidator.class); - for (int i = 0; i < documentInfos.length; i++) { + for (DocumentInfo documentInfo : documentInfos) { if (LOGGER.isLoggable(FINE)) { - LOGGER.log(FINE, format("Processing validator elements for document: ''{0}''", documentInfos[i].getSourceURI())); + LOGGER.log(FINE, format("Processing validator elements for document: ''{0}''", documentInfo.getSourceURI())); } - Document document = documentInfos[i].getDocument(); + Document document = documentInfo.getDocument(); String namespace = document.getDocumentElement().getNamespaceURI(); NodeList validators = document.getDocumentElement().getElementsByTagNameNS(namespace, VALIDATOR); diff --git a/impl/src/main/java/com/sun/faces/context/AjaxNoAjaxExceptionHandler.java b/impl/src/main/java/com/sun/faces/context/AjaxNoAjaxExceptionHandler.java index c397d3a113..b1690966ac 100644 --- a/impl/src/main/java/com/sun/faces/context/AjaxNoAjaxExceptionHandler.java +++ b/impl/src/main/java/com/sun/faces/context/AjaxNoAjaxExceptionHandler.java @@ -22,7 +22,7 @@ public class AjaxNoAjaxExceptionHandler extends ExceptionHandlerWrapper { - private AjaxExceptionHandlerImpl ajaxExceptionHandlerImpl; + private final AjaxExceptionHandlerImpl ajaxExceptionHandlerImpl; public AjaxNoAjaxExceptionHandler(AjaxExceptionHandlerImpl ajaxExceptionHandlerImpl, ExceptionHandlerImpl exceptionHandlerImpl) { super(exceptionHandlerImpl); diff --git a/impl/src/main/java/com/sun/faces/context/ApplicationMap.java b/impl/src/main/java/com/sun/faces/context/ApplicationMap.java index aa18cc0ecb..c6b29c1c94 100644 --- a/impl/src/main/java/com/sun/faces/context/ApplicationMap.java +++ b/impl/src/main/java/com/sun/faces/context/ApplicationMap.java @@ -45,18 +45,16 @@ public Object getContext() { @Override public void clear() { - for (Enumeration e = servletContext.getAttributeNames(); e.hasMoreElements();) { - servletContext.removeAttribute((String) e.nextElement()); + for (Enumeration e = servletContext.getAttributeNames(); e.hasMoreElements();) { + servletContext.removeAttribute(e.nextElement()); } } // Supported by maps if overridden @Override - public void putAll(Map t) { - for (Iterator i = t.entrySet().iterator(); i.hasNext();) { - Map.Entry entry = (Map.Entry) i.next(); - servletContext.setAttribute((String) entry.getKey(), entry.getValue()); - } + public void putAll(Map map) { + Util.notNull("map", map); + map.forEach( (key, value) -> servletContext.setAttribute((String) key, value)); } @Override @@ -91,14 +89,14 @@ public boolean containsKey(Object key) { @Override public boolean equals(Object obj) { - return !(obj == null || !(obj instanceof ApplicationMap)) && super.equals(obj); + return obj instanceof ApplicationMap && super.equals(obj); } @Override public int hashCode() { int hashCode = 7 * servletContext.hashCode(); - for (Iterator i = entrySet().iterator(); i.hasNext();) { - hashCode += i.next().hashCode(); + for (Map.Entry entry : entrySet()) { + hashCode += entry.hashCode(); } return hashCode; } diff --git a/impl/src/main/java/com/sun/faces/context/BaseContextMap.java b/impl/src/main/java/com/sun/faces/context/BaseContextMap.java index 972ffce797..83cdd106a1 100644 --- a/impl/src/main/java/com/sun/faces/context/BaseContextMap.java +++ b/impl/src/main/java/com/sun/faces/context/BaseContextMap.java @@ -23,6 +23,7 @@ import java.util.Enumeration; import java.util.Iterator; import java.util.Map; +import java.util.Objects; import java.util.Set; /** @@ -113,7 +114,7 @@ protected boolean removeValue(Object value) { // ----------------------------------------------------------- Inner Classes - abstract class BaseSet extends AbstractSet { + abstract static class BaseSet extends AbstractSet { @Override public int size() { @@ -163,7 +164,7 @@ class ValueCollection extends AbstractCollection { @Override public int size() { int size = 0; - for (Iterator i = iterator(); i.hasNext(); size++) { + for (Iterator i = iterator(); i.hasNext(); size++) { i.next(); } return size; @@ -180,7 +181,7 @@ public boolean remove(Object o) { } } - abstract class BaseIterator implements Iterator { + abstract static class BaseIterator implements Iterator { protected Enumeration e; protected String currentKey; @@ -304,20 +305,16 @@ public int hashCode() { @Override public boolean equals(Object obj) { - if (obj == null || !(obj instanceof Map.Entry)) { + if ( !(obj instanceof Map.Entry) ) { return false; } - Map.Entry input = (Map.Entry) obj; - Object inputKey = input.getKey(); - Object inputValue = input.getValue(); + Map.Entry input = (Map.Entry) obj; + Object key = input.getKey(); + Object value = input.getValue(); - if (inputKey == key || inputKey != null && inputKey.equals(key)) { - if (inputValue == value || inputValue != null && inputValue.equals(value)) { - return true; - } - } - return false; + return Objects.equals(key, this.key) && + Objects.equals(value, this.value); } } diff --git a/impl/src/main/java/com/sun/faces/context/ContextParam.java b/impl/src/main/java/com/sun/faces/context/ContextParam.java index e4cd1830f8..d921da4206 100644 --- a/impl/src/main/java/com/sun/faces/context/ContextParam.java +++ b/impl/src/main/java/com/sun/faces/context/ContextParam.java @@ -16,8 +16,6 @@ package com.sun.faces.context; -import jakarta.faces.push.PushContext; - /** * The enumeration of all our context-param entries. */ @@ -30,11 +28,7 @@ public enum ContextParam { /** * Send the "X-Powered-By" header. */ - SendPoweredByHeader("com.sun.faces.sendPoweredByHeader", Boolean.class, false), - /** - * The websocket endpoint port (default 0 means the code will take the port from the request) - */ - WebsocketEndpointPort(PushContext.WEBSOCKET_ENDPOINT_PORT_PARAM_NAME, Integer.class, 0); + SendPoweredByHeader("com.sun.faces.sendPoweredByHeader", Boolean.class, false); /** * Stores the default value. diff --git a/impl/src/main/java/com/sun/faces/context/ExceptionHandlerImpl.java b/impl/src/main/java/com/sun/faces/context/ExceptionHandlerImpl.java index 708ef57385..551c6b9961 100644 --- a/impl/src/main/java/com/sun/faces/context/ExceptionHandlerImpl.java +++ b/impl/src/main/java/com/sun/faces/context/ExceptionHandlerImpl.java @@ -56,7 +56,7 @@ public class ExceptionHandlerImpl extends ExceptionHandler { private LinkedList unhandledExceptions; private LinkedList handledExceptions; private ExceptionQueuedEvent handled; - private boolean errorPagePresent; + private final boolean errorPagePresent; // ------------------------------------------------------------ Constructors @@ -209,7 +209,7 @@ private void throwIt(FacesContext ctx, FacesException fe) { LOGGER.log(Level.INFO, "Exception when handling error trying to reset the response.", wrapped); } } - if (null != wrapped && wrapped instanceof FacesFileNotFoundException) { + if (wrapped instanceof FacesFileNotFoundException) { extContext.setResponseStatus(404); } else { extContext.setResponseStatus(500); @@ -225,7 +225,7 @@ private void throwIt(FacesContext ctx, FacesException fe) { if (isDevelopment) { // store the view root where the exception occurred into the // request scope so that the error page can display that component - // tree and not the one rendering the errorpage + // tree and not the one rendering the error page ctx.getExternalContext().getRequestMap().put("com.sun.faces.error.view", ctx.getViewRoot()); } throw fe; diff --git a/impl/src/main/java/com/sun/faces/context/ExternalContextImpl.java b/impl/src/main/java/com/sun/faces/context/ExternalContextImpl.java index d75b6f2032..ac57327bca 100644 --- a/impl/src/main/java/com/sun/faces/context/ExternalContextImpl.java +++ b/impl/src/main/java/com/sun/faces/context/ExternalContextImpl.java @@ -19,8 +19,8 @@ import static com.sun.faces.RIConstants.PUSH_RESOURCE_URLS_KEY_NAME; import static com.sun.faces.context.ContextParam.SendPoweredByHeader; -import static com.sun.faces.util.MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID; -import static com.sun.faces.util.MessageUtils.getExceptionMessageString; +import static com.sun.faces.context.UrlBuilder.PROTOCOL_SEPARATOR; +import static com.sun.faces.context.UrlBuilder.WEBSOCKET_PROTOCOL; import static com.sun.faces.util.Util.isEmpty; import java.io.IOException; @@ -31,8 +31,6 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.Collections; -import java.util.Enumeration; -import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; @@ -44,6 +42,7 @@ import jakarta.faces.FacesException; import jakarta.faces.FactoryFinder; +import jakarta.faces.annotation.FacesConfig; import jakarta.faces.application.ProjectStage; import jakarta.faces.context.ExternalContext; import jakarta.faces.context.FacesContext; @@ -69,6 +68,7 @@ import com.sun.faces.context.flash.ELFlash; import com.sun.faces.renderkit.html_basic.ScriptRenderer; import com.sun.faces.renderkit.html_basic.StylesheetRenderer; +import com.sun.faces.util.CollectionsUtils; import com.sun.faces.util.FacesLogger; import com.sun.faces.util.MessageUtils; import com.sun.faces.util.TypedCollections; @@ -82,9 +82,9 @@ public class ExternalContextImpl extends ExternalContext { private static final Logger LOGGER = FacesLogger.CONTEXT.getLogger(); - private ServletContext servletContext = null; - private ServletRequest request = null; - private ServletResponse response = null; + private ServletContext servletContext; + private ServletRequest request; + private ServletResponse response; private ClientWindow clientWindow = null; private Map applicationMap = null; @@ -96,9 +96,9 @@ public class ExternalContextImpl extends ExternalContext { private Map requestHeaderValuesMap = null; private Map cookieMap = null; private Map initParameterMap = null; - private Map fallbackContentTypeMap = null; + private Flash flash; - private boolean distributable; + private final boolean distributable; private enum PREDEFINED_COOKIE_PROPERTIES { domain, maxAge, path, secure, httpOnly, attribute; @@ -113,7 +113,13 @@ static PREDEFINED_COOKIE_PROPERTIES of(String key) { } } - static final Class theUnmodifiableMapClass = Collections.unmodifiableMap(new HashMap<>()).getClass(); + // we want exactly the UnmodifiableMap.class (which is private) so do not remove the call to Collections.unmodifiableMap(...) + static final Class theUnmodifiableMapClass = Collections.unmodifiableMap(Collections.emptyMap()).getClass(); + + private static final Map fallbackContentTypeMap = Map.of( + "js", ScriptRenderer.DEFAULT_CONTENT_TYPE, + "css", StylesheetRenderer.DEFAULT_CONTENT_TYPE, + "properties", "text/plain"); // ------------------------------------------------------------ Constructors @@ -141,11 +147,6 @@ public ExternalContextImpl(ServletContext sc, ServletRequest request, ServletRes distributable = ContextParamUtils.getValue(servletContext, ContextParam.EnableDistributable, Boolean.class); - fallbackContentTypeMap = new HashMap<>(3, 1.0f); - fallbackContentTypeMap.put("js", ScriptRenderer.DEFAULT_CONTENT_TYPE); - fallbackContentTypeMap.put("css", StylesheetRenderer.DEFAULT_CONTENT_TYPE); - fallbackContentTypeMap.put("properties", "text/plain"); - } // -------------------------------------------- Methods from ExternalContext @@ -160,10 +161,9 @@ public Object getSession(boolean create) { @Override public String getSessionId(boolean create) { - HttpSession session = null; String id = null; - session = (HttpSession) getSession(create); + final HttpSession session = (HttpSession) getSession(create); if (session != null) { id = session.getId(); } @@ -204,7 +204,6 @@ public void setRequest(Object request) { this.request = (ServletRequest) request; requestHeaderMap = null; requestHeaderValuesMap = null; - requestHeaderValuesMap = null; requestMap = null; requestParameterMap = null; requestParameterValuesMap = null; @@ -368,24 +367,7 @@ public Map getRequestParameterValuesMap() { */ @Override public Iterator getRequestParameterNames() { - final Enumeration namEnum = request.getParameterNames(); - - return new Iterator() { - @Override - public boolean hasNext() { - return namEnum.hasMoreElements(); - } - - @Override - public String next() { - return (String) namEnum.nextElement(); - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - }; + return CollectionsUtils.unmodifiableIterator( request.getParameterNames() ); } /** @@ -401,7 +383,7 @@ public Locale getRequestLocale() { */ @Override public Iterator getRequestLocales() { - return new LocalesIterator(request.getLocales()); + return CollectionsUtils.unmodifiableIterator(request.getLocales()); } /** @@ -541,12 +523,11 @@ public String encodeActionURL(String url) { if (null != cw) { appendClientWindow = cw.isClientWindowRenderModeEnabled(context); } - if (appendClientWindow && -1 == url.indexOf(ResponseStateManager.CLIENT_WINDOW_URL_PARAM)) { + if (appendClientWindow && !url.contains(ResponseStateManager.CLIENT_WINDOW_URL_PARAM)) { if (null != cw) { String clientWindowId = cw.getId(); StringBuilder builder = new StringBuilder(url); - int q = url.indexOf(UrlBuilder.QUERY_STRING_SEPARATOR); - if (-1 == q) { + if ( !url.contains(UrlBuilder.QUERY_STRING_SEPARATOR) ) { builder.append(UrlBuilder.QUERY_STRING_SEPARATOR); } else { builder.append(UrlBuilder.PARAMETER_PAIR_SEPARATOR); @@ -572,9 +553,7 @@ public String encodeActionURL(String url) { */ @Override public String encodeResourceURL(String url) { - if (url == null) { - throw new NullPointerException(getExceptionMessageString(NULL_PARAMETERS_ERROR_MESSAGE_ID, "url")); - } + Util.notNull("url", url); String encodedURL = ((HttpServletResponse) response).encodeURL(url); pushIfPossibleAndNecessary(encodedURL); @@ -587,23 +566,29 @@ public String encodeResourceURL(String url) { */ @Override public String encodeWebsocketURL(String url) { - if (url == null) { - throw new NullPointerException(getExceptionMessageString(NULL_PARAMETERS_ERROR_MESSAGE_ID, "url")); - } + Util.notNull("url", url); HttpServletRequest request = (HttpServletRequest) getRequest(); - int port = ContextParamUtils.getValue(servletContext, ContextParam.WebsocketEndpointPort, Integer.class); + int port = FacesConfig.ContextParam.WEBSOCKET_ENDPOINT_PORT.getValue(FacesContext.getCurrentInstance()); try { - URL requestURL = new URL(request.getRequestURL().toString()); + final URL requestURL = new URL(request.getRequestURL().toString()); if (port <= 0) { port = requestURL.getPort(); } - String websocketURL = new URL(requestURL.getProtocol(), requestURL.getHost(), port, url).toExternalForm(); - return encodeResourceURL(websocketURL.replaceFirst("http", "ws")); - } catch (MalformedURLException e) { + final String fixedPortRequestURL = new URL(requestURL.getProtocol(), requestURL.getHost(), port, url).toExternalForm(); + + // the index after http or https ... + int protocolEndIndex = fixedPortRequestURL.indexOf(PROTOCOL_SEPARATOR); + + // ws://[...] + final String websocketURL = WEBSOCKET_PROTOCOL + fixedPortRequestURL.substring(protocolEndIndex); + + return encodeResourceURL( websocketURL ); + } + catch (MalformedURLException e) { return url; } } @@ -715,12 +700,10 @@ public String getMimeType(String file) { mimeType = getFallbackMimeType(file); } - FacesContext ctx = FacesContext.getCurrentInstance(); - if (mimeType == null && LOGGER.isLoggable(Level.WARNING) && ctx.isProjectStage(ProjectStage.Development)) { + if (mimeType == null && LOGGER.isLoggable(Level.WARNING) && FacesContext.getCurrentInstance().isProjectStage(ProjectStage.Development)) { LOGGER.log(Level.WARNING, "faces.externalcontext.no.mime.type.found", new Object[] { file }); } return mimeType; - } /** @@ -933,6 +916,14 @@ public void setResponseContentLength(int length) { response.setContentLength(length); } + /** + * @see jakarta.faces.context.ExternalContext#setResponseContentLengthLong(long) + */ + @Override + public void setResponseContentLengthLong(long length) { + response.setContentLengthLong(length); + } + /** * @see jakarta.faces.context.ExternalContext#setSessionMaxInactiveInterval(int) */ @@ -968,7 +959,7 @@ public int getSessionMaxInactiveInterval() { */ @Override public boolean isSecure() { - return ((HttpServletRequest) request).isSecure(); + return request.isSecure(); } @Override @@ -1028,7 +1019,7 @@ public void release() { requestHeaderValuesMap = null; cookieMap = null; initParameterMap = null; - fallbackContentTypeMap = null; + flash = null; } @@ -1080,48 +1071,12 @@ private void doLastPhaseActions(FacesContext context, boolean outgoingResponseIs // --------------------------------------------------------- Private Methods - public String getFallbackMimeType(String file) { - - if (file == null || file.length() == 0) { - return null; - } - int idx = file.lastIndexOf('.'); - if (idx == -1) { - return null; - } - String extension = file.substring(idx + 1); - if (extension.length() == 0) { - return null; - } - return fallbackContentTypeMap.get(extension); - + private static String getFallbackMimeType(String file) { + final String extension = Util.fileExtension(file); + return extension != null ? fallbackContentTypeMap.get(extension) : null; } // ----------------------------------------------------------- Inner Classes - private static class LocalesIterator implements Iterator { - - public LocalesIterator(Enumeration locales) { - this.locales = locales; - } - - private Enumeration locales; - - @Override - public boolean hasNext() { - return locales.hasMoreElements(); - } - - @Override - public Locale next() { - return (Locale) locales.nextElement(); - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - } } diff --git a/impl/src/main/java/com/sun/faces/context/FacesContextFactoryImpl.java b/impl/src/main/java/com/sun/faces/context/FacesContextFactoryImpl.java index c4aff33cf5..7bb42ed560 100644 --- a/impl/src/main/java/com/sun/faces/context/FacesContextFactoryImpl.java +++ b/impl/src/main/java/com/sun/faces/context/FacesContextFactoryImpl.java @@ -16,11 +16,8 @@ package com.sun.faces.context; -import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.AlwaysPerformValidationWhenRequiredTrue; -import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.EnableValidateWholeBean; import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.ForceAlwaysWriteFlashCookie; import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.PartialStateSaving; -import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.ViewRootPhaseListenerQueuesException; import java.util.Map; @@ -30,7 +27,7 @@ import jakarta.faces.FacesException; import jakarta.faces.FactoryFinder; -import jakarta.faces.component.UIInput; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.context.ExceptionHandlerFactory; import jakarta.faces.context.ExternalContext; import jakarta.faces.context.ExternalContextFactory; @@ -81,17 +78,13 @@ private void savePerRequestInitParams(FacesContext context, WebConfiguration web ExternalContext extContext = context.getExternalContext(); Map appMap = extContext.getApplicationMap(); Map attrs = context.getAttributes(); - attrs.put(UIInput.ALWAYS_PERFORM_VALIDATION_WHEN_REQUIRED_IS_TRUE, - webConfig.isOptionEnabled(AlwaysPerformValidationWhenRequiredTrue) ? Boolean.TRUE : Boolean.FALSE); + attrs.put(ContextParam.ALWAYS_PERFORM_VALIDATION_WHEN_REQUIRED_IS_TRUE.getName(), ContextParam.ALWAYS_PERFORM_VALIDATION_WHEN_REQUIRED_IS_TRUE.getValue(context)); attrs.put(PartialStateSaving, webConfig.isOptionEnabled(PartialStateSaving) ? Boolean.TRUE : Boolean.FALSE); attrs.put(ForceAlwaysWriteFlashCookie, webConfig.isOptionEnabled(ForceAlwaysWriteFlashCookie) ? Boolean.TRUE : Boolean.FALSE); - // We must use getQualifiedName here because the consumer is in faces-api - // and thus cannot import the enum. - attrs.put(ViewRootPhaseListenerQueuesException.getQualifiedName(), - webConfig.isOptionEnabled(ViewRootPhaseListenerQueuesException) ? Boolean.TRUE : Boolean.FALSE); - attrs.put(EnableValidateWholeBean.getQualifiedName(), webConfig.isOptionEnabled(EnableValidateWholeBean) ? Boolean.TRUE : Boolean.FALSE); + attrs.put(ContextParam.VIEWROOT_PHASE_LISTENER_QUEUES_EXCEPTIONS.getName(), ContextParam.VIEWROOT_PHASE_LISTENER_QUEUES_EXCEPTIONS.getValue(context)); + attrs.put(ContextParam.ENABLE_VALIDATE_WHOLE_BEAN.getName(), ContextParam.ENABLE_VALIDATE_WHOLE_BEAN.getValue(context)); - String facesConfigVersion = "" + appMap.get(RIConstants.FACES_CONFIG_VERSION); + String facesConfigVersion = String.valueOf(appMap.get(RIConstants.FACES_CONFIG_VERSION)); attrs.put(RIConstants.FACES_CONFIG_VERSION, facesConfigVersion); } diff --git a/impl/src/main/java/com/sun/faces/context/FacesContextImpl.java b/impl/src/main/java/com/sun/faces/context/FacesContextImpl.java index 5ba2728ef7..fc50209ade 100644 --- a/impl/src/main/java/com/sun/faces/context/FacesContextImpl.java +++ b/impl/src/main/java/com/sun/faces/context/FacesContextImpl.java @@ -253,7 +253,7 @@ public ELContext getELContext() { @Override public Iterator getClientIdsWithMessages() { assertNotReleased(); - return componentMessageLists == null ? Collections.emptyList().iterator() : componentMessageLists.keySet().iterator(); + return componentMessageLists == null ? Collections.emptyIterator() : componentMessageLists.keySet().iterator(); } /** @@ -321,15 +321,13 @@ public List getMessageList(String clientId) { public Iterator getMessages() { assertNotReleased(); if (null == componentMessageLists) { - List emptyList = Collections.emptyList(); - return emptyList.iterator(); + return Collections.emptyIterator(); } if (componentMessageLists.size() > 0) { return new ComponentMessagesIterator(componentMessageLists); } else { - List emptyList = Collections.emptyList(); - return emptyList.iterator(); + return Collections.emptyIterator(); } } @@ -343,14 +341,12 @@ public Iterator getMessages(String clientId) { // If no messages have been enqueued at all, // return an empty List Iterator if (null == componentMessageLists) { - List emptyList = Collections.emptyList(); - return emptyList.iterator(); + return Collections.emptyIterator(); } List list = componentMessageLists.get(clientId); if (list == null) { - List emptyList = Collections.emptyList(); - return emptyList.iterator(); + return Collections.emptyIterator(); } return list.iterator(); } @@ -475,12 +471,8 @@ public void addMessage(String clientId, FacesMessage message) { } // Add this message to our internal queue - List list = componentMessageLists.get(clientId); - if (list == null) { - list = new ArrayList<>(); - componentMessageLists.put(clientId, list); - } - list.add(message); + componentMessageLists.computeIfAbsent(clientId, k -> new ArrayList<>()).add(message); + if (LOGGER.isLoggable(Level.FINE)) { LOGGER.fine("Adding Message[sourceId=" + (clientId != null ? clientId : "<>") + ",summary=" + message.getSummary() + ")"); } @@ -660,11 +652,11 @@ private void assertNotReleased() { private static final class ComponentMessagesIterator implements Iterator { - private Map> messages; + private final Map> messages; private int outerIndex = -1; - private int messagesSize; + private final int messagesSize; private Iterator inner; - private Iterator keys; + private final Iterator keys; // ------------------------------------------------------- Constructors diff --git a/impl/src/main/java/com/sun/faces/context/InitParameterMap.java b/impl/src/main/java/com/sun/faces/context/InitParameterMap.java index 860527d90f..7c41a21cd6 100644 --- a/impl/src/main/java/com/sun/faces/context/InitParameterMap.java +++ b/impl/src/main/java/com/sun/faces/context/InitParameterMap.java @@ -76,8 +76,8 @@ public boolean equals(Object obj) { @Override public int hashCode() { int hashCode = 7 * servletContext.hashCode(); - for (Iterator i = entrySet().iterator(); i.hasNext();) { - hashCode += i.next().hashCode(); + for (Map.Entry stringStringEntry : entrySet()) { + hashCode += stringStringEntry.hashCode(); } return hashCode; } diff --git a/impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java b/impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java index 4c3fa7ff37..02aec7c08f 100644 --- a/impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java +++ b/impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java @@ -70,9 +70,7 @@ public class PartialViewContextImpl extends PartialViewContext { // Log instance for this class - private static Logger LOGGER = FacesLogger.CONTEXT.getLogger(); - - private static final Set SKIP_UNRENDERED_HINT = EnumSet.of(SKIP_UNRENDERED); + private static final Logger LOGGER = FacesLogger.CONTEXT.getLogger(); private static final Set SKIP_UNRENDERED_AND_EXECUTE_LIFECYCLE_HINTS = EnumSet.of(SKIP_UNRENDERED, EXECUTE_LIFECYCLE); @@ -171,7 +169,7 @@ public void setRenderAll(boolean renderAll) { @Override public boolean isResetValues() { Object value = PARTIAL_RESET_VALUES_PARAM.getValue(ctx); - return null != value && "true".equals(value) ? true : false; + return Boolean.TRUE.toString().equals(value); } @Override @@ -293,7 +291,7 @@ public void processPartial(PhaseId phaseId) { writer.startDocument(); if (isResetValues()) { - resetValues(viewRoot, myRenderIds, ctx); + viewRoot.resetValues(ctx, myRenderIds, SKIP_UNRENDERED); } if (isRenderAll()) { @@ -389,7 +387,8 @@ private void processComponents(UIComponent component, PhaseId phaseId, Collectio // process. Create our (partial) VisitContext and the // VisitCallback that will be invoked for each component that // is visited. - VisitContext visitContext = createPartialVisitContext(context, phaseClientIds, true); + VisitContextFactory visitContextFactory = (VisitContextFactory) FactoryFinder.getFactory(VISIT_CONTEXT_FACTORY); + VisitContext visitContext = visitContextFactory.getVisitContext(context, phaseClientIds, SKIP_UNRENDERED_AND_EXECUTE_LIFECYCLE_HINTS); PhaseAwareVisitCallback visitCallback = new PhaseAwareVisitCallback(ctx, phaseId); component.visitTree(visitContext, visitCallback); @@ -406,34 +405,6 @@ private void processComponents(UIComponent component, PhaseId phaseId, Collectio } } - private static VisitContext createPartialVisitContext(FacesContext context, Collection clientIds, boolean executeLifecycle) { - - // Note that we use the SKIP_UNRENDERED hint as - // we only want to visit the rendered subtree. - Set hints = executeLifecycle ? SKIP_UNRENDERED_AND_EXECUTE_LIFECYCLE_HINTS : SKIP_UNRENDERED_HINT; - VisitContextFactory visitContextFactory = (VisitContextFactory) FactoryFinder.getFactory(VISIT_CONTEXT_FACTORY); - return visitContextFactory.getVisitContext(context, clientIds, hints); - } - - private static void resetValues(UIComponent component, Collection clientIds, FacesContext context) { - - // NOTE: this is indeed a copy of the one in UIViewRoot#resetValues(). - // The difference is that we want to be able to control the visit hints. - // This isn't possible via the UIViewRoot#resetValues() API in its current form. - component.visitTree(createPartialVisitContext(context, clientIds, false), new DoResetValues()); - } - - private static class DoResetValues implements VisitCallback { - - @Override - public VisitResult visit(VisitContext context, UIComponent target) { - if (target instanceof EditableValueHolder) { - ((EditableValueHolder) target).resetValue(); - } - return VisitResult.ACCEPT; - } - } - /** * Unwraps {@link PartialVisitContext} from a chain of {@link VisitContextWrapper}s. * @@ -594,8 +565,8 @@ private void assertNotReleased() { private static class PhaseAwareVisitCallback implements VisitCallback { - private PhaseId curPhase; - private FacesContext ctx; + private final PhaseId curPhase; + private final FacesContext ctx; private PhaseAwareVisitCallback(FacesContext ctx, PhaseId curPhase) { this.ctx = ctx; @@ -650,7 +621,7 @@ public VisitResult visit(VisitContext context, UIComponent comp) { private static final class DelayedInitPartialResponseWriter extends PartialResponseWriter { private ResponseWriter writer; - private PartialViewContextImpl ctx; + private final PartialViewContextImpl ctx; // -------------------------------------------------------- Constructors diff --git a/impl/src/main/java/com/sun/faces/context/RequestCookieMap.java b/impl/src/main/java/com/sun/faces/context/RequestCookieMap.java index b8ef82ec05..545fffd24f 100644 --- a/impl/src/main/java/com/sun/faces/context/RequestCookieMap.java +++ b/impl/src/main/java/com/sun/faces/context/RequestCookieMap.java @@ -88,8 +88,8 @@ public boolean equals(Object obj) { @Override public int hashCode() { int hashCode = 7 * request.hashCode(); - for (Iterator i = entrySet().iterator(); i.hasNext();) { - hashCode += i.next().hashCode(); + for (Map.Entry stringObjectEntry : entrySet()) { + hashCode += stringObjectEntry.hashCode(); } return hashCode; } diff --git a/impl/src/main/java/com/sun/faces/context/RequestHeaderMap.java b/impl/src/main/java/com/sun/faces/context/RequestHeaderMap.java index 14c2b2aa79..19323e63da 100644 --- a/impl/src/main/java/com/sun/faces/context/RequestHeaderMap.java +++ b/impl/src/main/java/com/sun/faces/context/RequestHeaderMap.java @@ -76,8 +76,8 @@ public boolean equals(Object obj) { @Override public int hashCode() { int hashCode = 7 * request.hashCode(); - for (Iterator i = entrySet().iterator(); i.hasNext();) { - hashCode += i.next().hashCode(); + for (Map.Entry entry : entrySet()) { + hashCode += entry.hashCode(); } return hashCode; } diff --git a/impl/src/main/java/com/sun/faces/context/RequestHeaderValuesMap.java b/impl/src/main/java/com/sun/faces/context/RequestHeaderValuesMap.java index 99013b46ed..bb5b9507c1 100644 --- a/impl/src/main/java/com/sun/faces/context/RequestHeaderValuesMap.java +++ b/impl/src/main/java/com/sun/faces/context/RequestHeaderValuesMap.java @@ -54,9 +54,9 @@ public String[] get(Object key) { Util.notNull("key", key); List valuesList = new ArrayList<>(); - Enumeration valuesEnum = request.getHeaders(key.toString()); + Enumeration valuesEnum = request.getHeaders(key.toString()); while (valuesEnum.hasMoreElements()) { - valuesList.add((String) valuesEnum.nextElement()); + valuesList.add(valuesEnum.nextElement()); } return valuesList.toArray(new String[valuesList.size()]); diff --git a/impl/src/main/java/com/sun/faces/context/RequestMap.java b/impl/src/main/java/com/sun/faces/context/RequestMap.java index 9a91d96091..920c545fdd 100644 --- a/impl/src/main/java/com/sun/faces/context/RequestMap.java +++ b/impl/src/main/java/com/sun/faces/context/RequestMap.java @@ -41,8 +41,8 @@ public RequestMap(ServletRequest request) { @Override public void clear() { - for (Enumeration e = request.getAttributeNames(); e.hasMoreElements();) { - request.removeAttribute((String) e.nextElement()); + for (Enumeration e = request.getAttributeNames(); e.hasMoreElements();) { + request.removeAttribute(e.nextElement()); } } @@ -87,14 +87,14 @@ public boolean containsKey(Object key) { @Override public boolean equals(Object obj) { - return !(obj == null || !(obj instanceof RequestMap)) && super.equals(obj); + return obj instanceof RequestMap && super.equals(obj); } @Override public int hashCode() { int hashCode = 7 * request.hashCode(); - for (Iterator i = entrySet().iterator(); i.hasNext();) { - hashCode += i.next().hashCode(); + for (Map.Entry stringObjectEntry : entrySet()) { + hashCode += stringObjectEntry.hashCode(); } return hashCode; } diff --git a/impl/src/main/java/com/sun/faces/context/RequestParameterMap.java b/impl/src/main/java/com/sun/faces/context/RequestParameterMap.java index 309a10cc94..6000c855ed 100644 --- a/impl/src/main/java/com/sun/faces/context/RequestParameterMap.java +++ b/impl/src/main/java/com/sun/faces/context/RequestParameterMap.java @@ -107,8 +107,8 @@ public boolean equals(Object obj) { @Override public int hashCode() { int hashCode = 7 * request.hashCode(); - for (Iterator i = entrySet().iterator(); i.hasNext();) { - hashCode += i.next().hashCode(); + for (Map.Entry stringStringEntry : entrySet()) { + hashCode += stringStringEntry.hashCode(); } return hashCode; } diff --git a/impl/src/main/java/com/sun/faces/context/SessionMap.java b/impl/src/main/java/com/sun/faces/context/SessionMap.java index b7c1ab7b74..54ea23ec4a 100644 --- a/impl/src/main/java/com/sun/faces/context/SessionMap.java +++ b/impl/src/main/java/com/sun/faces/context/SessionMap.java @@ -57,8 +57,8 @@ public SessionMap(HttpServletRequest request, ProjectStage stage) { public void clear() { HttpSession session = getSession(false); if (session != null) { - for (Enumeration e = session.getAttributeNames(); e.hasMoreElements();) { - String name = (String) e.nextElement(); + for (Enumeration e = session.getAttributeNames(); e.hasMoreElements();) { + String name = e.nextElement(); session.removeAttribute(name); } } @@ -136,7 +136,7 @@ public boolean containsKey(Object key) { @Override public boolean equals(Object obj) { - return !(obj == null || !(obj instanceof SessionMap)) && super.equals(obj); + return obj instanceof SessionMap && super.equals(obj); } @Override @@ -144,8 +144,8 @@ public int hashCode() { HttpSession session = getSession(false); int hashCode = 7 * (session != null ? session.hashCode() : super.hashCode()); if (session != null) { - for (Iterator i = entrySet().iterator(); i.hasNext();) { - hashCode += i.next().hashCode(); + for (Map.Entry stringObjectEntry : entrySet()) { + hashCode += stringObjectEntry.hashCode(); } } return hashCode; @@ -159,8 +159,7 @@ protected Iterator> getEntryIterator() { if (session != null) { return new EntryIterator(session.getAttributeNames()); } else { - Map empty = Collections.emptyMap(); - return empty.entrySet().iterator(); + return Collections.emptyIterator(); } } @@ -170,8 +169,7 @@ protected Iterator getKeyIterator() { if (session != null) { return new KeyIterator(session.getAttributeNames()); } else { - Map empty = Collections.emptyMap(); - return empty.keySet().iterator(); + return Collections.emptyIterator(); } } @@ -181,8 +179,7 @@ protected Iterator getValueIterator() { if (session != null) { return new ValueIterator(session.getAttributeNames()); } else { - Map empty = Collections.emptyMap(); - return empty.values().iterator(); + return Collections.emptyIterator(); } } diff --git a/impl/src/main/java/com/sun/faces/context/StringArrayValuesMap.java b/impl/src/main/java/com/sun/faces/context/StringArrayValuesMap.java index 07293ff87d..5401eafd8e 100644 --- a/impl/src/main/java/com/sun/faces/context/StringArrayValuesMap.java +++ b/impl/src/main/java/com/sun/faces/context/StringArrayValuesMap.java @@ -36,11 +36,11 @@ public boolean containsValue(Object value) { return false; } - Set entrySet = entrySet(); - for (Object anEntrySet : entrySet) { - Map.Entry entry = (Map.Entry) anEntrySet; + Set> entrySet = entrySet(); + for (Map.Entry entry : entrySet) { + // values will be arrays - if (Arrays.equals((Object[]) value, (Object[]) entry.getValue())) { + if (Arrays.equals((Object[]) value, entry.getValue())) { return true; } } @@ -89,10 +89,9 @@ public int hashCode() { protected int hashCode(Object someObject) { int hashCode = 7 * someObject.hashCode(); - for (Object o : entrySet()) { - Map.Entry entry = (Map.Entry) o; + for (Map.Entry entry : entrySet()) { hashCode += entry.getKey().hashCode(); - hashCode += Arrays.hashCode((Object[]) entry.getValue()); + hashCode += Arrays.hashCode(entry.getValue()); } return hashCode; } diff --git a/impl/src/main/java/com/sun/faces/context/UrlBuilder.java b/impl/src/main/java/com/sun/faces/context/UrlBuilder.java index e593f78d2e..a7d62cb1f7 100644 --- a/impl/src/main/java/com/sun/faces/context/UrlBuilder.java +++ b/impl/src/main/java/com/sun/faces/context/UrlBuilder.java @@ -18,11 +18,9 @@ import static com.sun.faces.RIConstants.CHAR_ENCODING; -import java.io.UnsupportedEncodingException; import java.net.URLEncoder; +import java.nio.charset.Charset; import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -48,18 +46,20 @@ */ class UrlBuilder { public static final String QUERY_STRING_SEPARATOR = "?"; + public static final char QUERY_STRING_SEPARATOR_CHAR = QUERY_STRING_SEPARATOR.charAt(0); public static final String PARAMETER_PAIR_SEPARATOR = "&"; public static final String PARAMETER_NAME_VALUE_SEPARATOR = "="; public static final String FRAGMENT_SEPARATOR = "#"; + public static final char FRAGMENT_SEPARATOR_CHAR = FRAGMENT_SEPARATOR.charAt(0); + public static final String WEBSOCKET_PROTOCOL = "ws"; + public static final String PROTOCOL_SEPARATOR = "://"; - private static final List NULL_LIST = Arrays.asList((String) null); - - private StringBuilder url; + private final StringBuilder url; private String path; private String queryString; private String fragment; private Map> parameters; - private String encoding; + private final Charset encoding; // ------------------------------------------------------------ Constructors @@ -69,7 +69,7 @@ public UrlBuilder(String url, String encoding) { } this.url = new StringBuilder(url.length() * 2); extractSegments(url); - this.encoding = encoding; + this.encoding = encoding != null ? Charset.forName(encoding) : null; // PERF TL lookup per-instance } @@ -80,7 +80,7 @@ public UrlBuilder(String url) { // ---------------------------------------------------------- Public Methods public UrlBuilder addParameters(String name, List values) { - if (name == null || name.trim().length() == 0) { + if ( name == null || name.isBlank() ) { throw new IllegalArgumentException("Parameter name cannot be empty"); } addValuesToParameter(name.trim(), values, true); @@ -95,8 +95,7 @@ public UrlBuilder addParameters(Map> params) { throw new IllegalArgumentException("Parameter name cannot be empty"); } List values = entry.getValue(); - List retValues = values; - addValuesToParameter(entry.getKey().trim(), retValues, true); + addValuesToParameter(entry.getKey().trim(), values, true); } } @@ -188,7 +187,7 @@ protected void appendQueryString() { nextSeparatorChar = QUERY_STRING_SEPARATOR; } else { nextSeparatorChar = PARAMETER_PAIR_SEPARATOR; - url.append(QUERY_STRING_SEPARATOR).append(queryString); + url.append(QUERY_STRING_SEPARATOR_CHAR).append(queryString); } for (Map.Entry> param : parameters.entrySet()) { @@ -241,14 +240,14 @@ protected void appendFragment() { } protected void extractSegments(String url) { - int fragmentIndex = url.indexOf(FRAGMENT_SEPARATOR); + int fragmentIndex = url.indexOf(FRAGMENT_SEPARATOR_CHAR); if (fragmentIndex != -1) { fragment = url.substring(fragmentIndex + 1); cleanFragment(); url = url.substring(0, fragmentIndex); } - int queryStringIndex = url.indexOf(QUERY_STRING_SEPARATOR); + int queryStringIndex = url.indexOf(QUERY_STRING_SEPARATOR_CHAR); if (queryStringIndex != -1) { queryString = url.substring(queryStringIndex + 1); cleanQueryString(); @@ -269,19 +268,11 @@ protected void addValueToParameter(String name, String value, boolean replace) { protected void addValuesToParameter(String name, List valuesRef, boolean replace) { List values = new ArrayList<>(); if (valuesRef != null) { - for (Iterator it = valuesRef.iterator(); it.hasNext();) { - String string = it.next(); - if (encoding != null) { - try { - values.add(URLEncoder.encode(string, encoding)); - } catch (UnsupportedEncodingException ex) { - throw new RuntimeException(ex); - } - } else { - values.add(string); + for (String string : valuesRef) { + if (string != null) { + values.add(encoding != null ? URLEncoder.encode(string, encoding) : string); } } - values.removeAll(NULL_LIST); } if (parameters == null) { @@ -291,12 +282,11 @@ protected void addValuesToParameter(String name, List valuesRef, boolean if (replace) { parameters.put(name, values); } else { - List currentValues = parameters.get(name); - if (currentValues == null) { - currentValues = new ArrayList<>(1); - parameters.put(name, currentValues); - } - currentValues.addAll(values); + List oldValues = parameters.get(name); + // add if exists + if ( oldValues != null ) oldValues.addAll(values); + // put old+new or put only new values + parameters.put( name , oldValues != null ? oldValues : values ); } } @@ -304,32 +294,27 @@ protected void addValuesToParameter(String name, List valuesRef, boolean private void cleanFragment() { if (fragment != null) { - String f = fragment; - f = f.trim(); - if (f.startsWith(FRAGMENT_SEPARATOR)) { + // trim + String f = fragment.trim(); + // remove '#' + if ( f.charAt(0) == FRAGMENT_SEPARATOR_CHAR ) { f = f.substring(1); } - - if (f.length() == 0) { - f = null; - } - - fragment = f; + // null if empty + fragment = f.isEmpty() ? null : f; } } private void cleanQueryString() { if (queryString != null) { - String q = queryString; - q = q.trim(); - if (q.startsWith(QUERY_STRING_SEPARATOR)) { + // trim + String q = queryString.trim(); + // remove '?' + if ( q.charAt(0) == QUERY_STRING_SEPARATOR_CHAR ) { q = q.substring(1); } - - if (q.length() == 0) { - q = null; - } - queryString = q; + // null if empty + queryString = q.isEmpty() ? null : q; } } diff --git a/impl/src/main/java/com/sun/faces/context/flash/ELFlash.java b/impl/src/main/java/com/sun/faces/context/flash/ELFlash.java index cb16c895d7..715d07d1d0 100644 --- a/impl/src/main/java/com/sun/faces/context/flash/ELFlash.java +++ b/impl/src/main/java/com/sun/faces/context/flash/ELFlash.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -96,7 +97,8 @@ public class ELFlash extends Flash { - // + private static final String ELEMENT_TYPE_MISMATCH = "element-type-mismatch"; + private static final Logger LOGGER = FacesLogger.FLASH.getLogger(); /** *

    @@ -116,15 +118,8 @@ public class ELFlash extends Flash { private final boolean distributable; - private ByteArrayGuardAESCTR guard; - - // - - // + private final ByteArrayGuardAESCTR guard; - private static final String ELEMENT_TYPE_MISMATCH = "element-type-mismatch"; - - private static final Logger LOGGER = FacesLogger.FLASH.getLogger(); /** *

    @@ -204,10 +199,6 @@ private enum CONSTANTS { } - // - - // - /** Creates a new instance of ELFlash */ private ELFlash(ExternalContext extContext) { flashInnerMap = new ConcurrentHashMap<>(); @@ -315,7 +306,7 @@ public boolean isKeepMessages() { @Override public void setKeepMessages(boolean newValue) { - loggingGetPhaseMapForWriting(false).put(CONSTANTS.KeepAllMessagesAttributeName.toString(), Boolean.valueOf(newValue)); + loggingGetPhaseMapForWriting(false).put(CONSTANTS.KeepAllMessagesAttributeName.toString(), newValue); } @@ -340,11 +331,6 @@ public boolean isRedirect() { public void setRedirect(boolean newValue) { } - // - - // - - @SuppressWarnings(ELEMENT_TYPE_MISMATCH) @Override public Object get(Object key) { Object result = null; @@ -418,7 +404,6 @@ public Object put(String key, Object value) { return result; } - @SuppressWarnings(ELEMENT_TYPE_MISMATCH) @Override public Object remove(Object key) { Object result = null; @@ -430,7 +415,6 @@ public Object remove(Object key) { return result; } - @SuppressWarnings(ELEMENT_TYPE_MISMATCH) @Override public boolean containsKey(Object key) { boolean result = false; @@ -442,46 +426,29 @@ public boolean containsKey(Object key) { @Override public boolean containsValue(Object value) { - boolean result = false; - - result = getPhaseMapForReading().containsValue(value); - - return result; + return getPhaseMapForReading().containsValue(value); } @Override public void putAll(Map t) { - getPhaseMapForWriting().putAll(t); - } @Override public Collection values() { - Collection result = null; - - result = getPhaseMapForReading().values(); - - return result; + return getPhaseMapForReading().values(); } @Override public int size() { - int result = 0; - - result = getPhaseMapForReading().size(); - - return result; + return getPhaseMapForReading().size(); } @Override public void clear() { - getPhaseMapForWriting().clear(); - } - @SuppressWarnings({ "CloneDoesntCallSuperClone" }) @Override protected Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException(); @@ -519,10 +486,6 @@ public Set keySet() { return result; } - // - - // - @Override public void keep(String key) { FacesContext context = FacesContext.getCurrentInstance(); @@ -677,10 +640,6 @@ public void doLastPhaseActions(FacesContext context, boolean outgoingResponseIsR } - // - - // - void setFlashInnerMap(Map> flashInnerMap) { this.flashInnerMap = flashInnerMap; } @@ -988,12 +947,9 @@ private void setCookie(FacesContext context, PreviousNextFlashInfoManager flashM flashManager.expirePrevious(); } } else { - Map properties = new HashMap(); + Map properties = new HashMap<>(); Object val; - if (null != (val = toSet.getComment())) { - properties.put("comment", val); - } if (null != (val = toSet.getDomain())) { properties.put("domain", val); } @@ -1022,13 +978,10 @@ private void removeCookie(ExternalContext extContext, Cookie toRemove) { if (extContext.isResponseCommitted()) { return; } - Map properties = new HashMap(); + Map properties = new HashMap<>(); Object val; toRemove.setMaxAge(0); - if (null != (val = toRemove.getComment())) { - properties.put("comment", val); - } if (null != (val = toRemove.getDomain())) { properties.put("domain", val); } @@ -1049,10 +1002,6 @@ private void removeCookie(ExternalContext extContext, Cookie toRemove) { } - // - - // - private enum LifetimeMarker { // these must be unique @@ -1586,6 +1535,4 @@ void setFlashMap(Map flashMap) { } - // - } diff --git a/impl/src/main/java/com/sun/faces/context/flash/FlashELResolver.java b/impl/src/main/java/com/sun/faces/context/flash/FlashELResolver.java index 4a0fa63c4c..80ca4dffa0 100644 --- a/impl/src/main/java/com/sun/faces/context/flash/FlashELResolver.java +++ b/impl/src/main/java/com/sun/faces/context/flash/FlashELResolver.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -16,11 +17,6 @@ package com.sun.faces.context.flash; -import java.beans.FeatureDescriptor; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.Map; - import jakarta.el.ELContext; import jakarta.el.ELResolver; import jakarta.el.PropertyNotFoundException; @@ -30,6 +26,7 @@ import jakarta.faces.context.FacesContext; import jakarta.faces.context.Flash; import jakarta.faces.context.FlashFactory; +import java.util.Map; /** *

    @@ -37,18 +34,18 @@ * "flash" concept in Ruby on * Rails. *

    - * + * *

    * The feature is exposed to users via a custom ELResolver which introduces a new implicit object, * flash. The flash functions as Map and can be used in getValue( ) or * setValue( * ) expressions. *

    - * + * *

    * Usage *

    - * + * *

    * Consider three Faces views: viewA, viewB, and viewC. The user first views viewA, then clicks a button and is shown * viewB, where she clicks a button and is shown viewC. If values are stored into the flash during the rendering or @@ -56,18 +53,18 @@ * rendering or postback phases of viewC. In other words, values stored into the flash on "this" request are accessible * for the "next" request, but not thereafter. *

    - * + * *

    * There are three ways to access the flash. *

    - * + * *
      *
    1. * Using an Expression Language Expression, such as using #{flash.foo} as the value of an attribute in a page. *
    2. *
    3. * Using the EL API, such as: - * + * *

      * * FacesContext context = FacesContext.getCurrentInstance(); @@ -77,13 +74,13 @@ * flashExpression.setValue(context.getELContext(), "Foo's new value"); * *

      - * + * *
    4. *
    5. *

      * Using getting the {@link ELFlash} directly, such as: *

      - * + * *

      * * Map<String,Object> flash = ELFlash.getFlash(); @@ -92,48 +89,48 @@ *

      *
    6. *
    - * + * *

    * The main entry point to this feature is the first one. This library includes a simple custom tag, jsfExt:set, that evaluates an expression and sets its value into * another expression. jsfExt:set can be used to store values into the flash from JSP pages, like this: *

    - * + * *

    * <jsfExt:set var="#{flash.foo}" value="fooValue" * /> *

    - * + * *

    * or this: *

    - * + * *

    * <jsfExt:set var="#{flash.keep.bar}" value="#{user.name}" * /> *

    - * + * *

    * or even this: *

    - * + * *

    * * <jsfExt:set var="#{flash.now.baz}" value="#{cookie.userCookie}" /> - * + * * <h:outputText value="#{flash.now.baz}" /> - * + * * *

    - * + * *

    * Related Classes *

    - * + * *

    * The complete list of classes that make up this feature is *

    - * + * *
      *
    • FlashELResolver
    • *
    • {@link ELFlash}
    • @@ -258,7 +255,7 @@ public Class getType(ELContext elContext, Object base, Object property) { * and a property value equal to the literal string "flash". This is because set operations normally go * through the MapELResolver via the ELFlash Map. *

      - * + * *

      * In other words, do not call this method directly to set a value into the flash! The only way to access the flash is * via the EL API. @@ -295,7 +292,6 @@ public void setValue(ELContext elContext, Object base, Object property, Object v * @throws PropertyNotFoundException if base is null and property is * null. */ - @Override public boolean isReadOnly(ELContext elContext, Object base, Object property) { if (base != null) { @@ -314,49 +310,11 @@ public boolean isReadOnly(ELContext elContext, Object base, Object property) { return false; } - /** - *

      - * Returns an iterator of FeatureDescriptors for the current contents of the flash. - *

      - */ - - @Override - public Iterator getFeatureDescriptors(ELContext elContext, Object base) { - if (null != base) { - return null; - } - Iterator result = null; - Map flash; - FacesContext facesContext = (FacesContext) elContext.getContext(FacesContext.class); - ExternalContext extCtx = facesContext.getExternalContext(); - - // noinspection unchecked - if (null != (flash = extCtx.getFlash())) { - Iterator> iter = flash.entrySet().iterator(); - Map.Entry cur; - ArrayList fds; - FeatureDescriptor fd; - if (iter.hasNext()) { - fds = new ArrayList<>(flash.size()); - while (iter.hasNext()) { - cur = iter.next(); - fd = new FeatureDescriptor(); - fd.setName(cur.getKey()); - fds.add(fd); - } - result = fds.iterator(); - } - } - - return result; - } - /** *

      * If base is non-null and is the literal string "flash", return Object.class. *

      */ - @Override public Class getCommonPropertyType(ELContext context, Object base) { Class result = null; @@ -365,6 +323,7 @@ public Class getCommonPropertyType(ELContext context, Object base) { result = Object.class; } } + return result; } diff --git a/impl/src/main/java/com/sun/faces/el/ChainTypeCompositeELResolver.java b/impl/src/main/java/com/sun/faces/el/ChainTypeCompositeELResolver.java index a2edc0d022..667c574907 100644 --- a/impl/src/main/java/com/sun/faces/el/ChainTypeCompositeELResolver.java +++ b/impl/src/main/java/com/sun/faces/el/ChainTypeCompositeELResolver.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -16,16 +17,12 @@ package com.sun.faces.el; -import java.beans.FeatureDescriptor; -import java.util.Iterator; -import java.util.Map; - import com.sun.faces.util.RequestStateManager; - import jakarta.el.ELContext; import jakarta.el.ELException; import jakarta.el.ELResolver; import jakarta.faces.context.FacesContext; +import java.util.Map; /** * Maintains an ordered composite list of child ELResolver for Faces. @@ -126,23 +123,6 @@ public boolean isReadOnly(ELContext context, Object base, Object property) throw return result; } - @Override - public Iterator getFeatureDescriptors(ELContext context, Object base) { - FacesContext ctx = getFacesContext(context); - Iterator result = null; - if (ctx != null) { - Map stateMap = RequestStateManager.getStateMap(ctx); - - stateMap.put(RequestStateManager.EL_RESOLVER_CHAIN_TYPE_NAME, _chainType); - try { - result = _wrapped.getFeatureDescriptors(context, base); - } finally { - stateMap.remove(RequestStateManager.EL_RESOLVER_CHAIN_TYPE_NAME); - } - } - return result; - } - @Override public ELResolverChainType getChainType() { return _chainType; diff --git a/impl/src/main/java/com/sun/faces/el/CompositeComponentAttributesELResolver.java b/impl/src/main/java/com/sun/faces/el/CompositeComponentAttributesELResolver.java index 6609db3803..6bf7c2c7ee 100644 --- a/impl/src/main/java/com/sun/faces/el/CompositeComponentAttributesELResolver.java +++ b/impl/src/main/java/com/sun/faces/el/CompositeComponentAttributesELResolver.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -20,17 +21,7 @@ import static com.sun.faces.component.CompositeComponentStackManager.StackType.TreeCreation; import static com.sun.faces.util.Util.notNull; -import java.beans.BeanInfo; -import java.beans.FeatureDescriptor; -import java.beans.PropertyDescriptor; -import java.util.Collection; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; - import com.sun.faces.component.CompositeComponentStackManager; - import jakarta.el.ELContext; import jakarta.el.ELResolver; import jakarta.el.MethodExpression; @@ -38,6 +29,12 @@ import jakarta.faces.component.UIComponent; import jakarta.faces.context.FacesContext; import jakarta.faces.el.CompositeComponentExpressionHolder; +import java.beans.BeanInfo; +import java.beans.PropertyDescriptor; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; /** *

      @@ -89,7 +86,7 @@ public Object getValue(ELContext context, Object base, Object property) { notNull("context", context); - if (base != null && base instanceof UIComponent && UIComponent.isCompositeComponent((UIComponent) base) && property != null) { + if (base instanceof UIComponent && UIComponent.isCompositeComponent((UIComponent) base) && property != null) { String propertyName = property.toString(); if (COMPOSITE_COMPONENT_ATTRIBUTES_NAME.equals(propertyName)) { @@ -196,21 +193,6 @@ public boolean isReadOnly(ELContext context, Object base, Object property) { } - /** - *

      - * This ELResolver currently returns no feature descriptors as we have no way to effectively iterate over - * the UIComponent attributes Map. - *

      - * - * @see jakarta.el.ELResolver#getFeatureDescriptors(jakarta.el.ELContext, Object) - */ - @Override - public Iterator getFeatureDescriptors(ELContext context, Object base) { - notNull("context", context); - return null; - - } - /** *

      * attrs is considered a String property. @@ -258,7 +240,7 @@ public Map getEvalMapFor(UIComponent c, FacesContext ctx) { ((ExpressionEvalMap) evalMap).updateFacesContext(ctx); } } - + return evalMap; } @@ -271,11 +253,11 @@ public Map getEvalMapFor(UIComponent c, FacesContext ctx) { */ private static final class ExpressionEvalMap implements Map, CompositeComponentExpressionHolder { - private Map attributesMap; + private final Map attributesMap; private PropertyDescriptor[] declaredAttributes; private Map declaredDefaultValues; private FacesContext ctx; - private UIComponent cc; + private final UIComponent cc; // -------------------------------------------------------- Constructors @@ -335,7 +317,7 @@ public Object get(Object key) { return ((ValueExpression) v).getValue(ctx.getELContext()); } } - if (v != null && v instanceof MethodExpression) { + if (v instanceof MethodExpression) { return v; } return v; @@ -343,7 +325,7 @@ public Object get(Object key) { @Override public Object put(String key, Object value) { - // Unlinke AttributesMap.get() which will obtain a value from + // Unlike AttributesMap.get() which will obtain a value from // a ValueExpression, AttributesMap.put(), when passed a value, // will never call ValueExpression.setValue(), so we have to take // matters into our own hands... diff --git a/impl/src/main/java/com/sun/faces/el/DemuxCompositeELResolver.java b/impl/src/main/java/com/sun/faces/el/DemuxCompositeELResolver.java index 8cb89c2d36..33740c4ebf 100644 --- a/impl/src/main/java/com/sun/faces/el/DemuxCompositeELResolver.java +++ b/impl/src/main/java/com/sun/faces/el/DemuxCompositeELResolver.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -16,10 +17,6 @@ package com.sun.faces.el; -import java.beans.FeatureDescriptor; -import java.util.Iterator; -import java.util.NoSuchElementException; - import jakarta.el.ELContext; import jakarta.el.ELException; import jakarta.el.ELResolver; @@ -252,81 +249,6 @@ public boolean isReadOnly(ELContext context, Object base, Object property) throw return _isReadOnly(resolverCount, resolvers, context, base, property); } - @Override - public Iterator getFeatureDescriptors(ELContext context, Object base) { - return new DescriptorIterator(context, base, _allELResolvers, _allELResolverCount); - } - - private final static class DescriptorIterator implements Iterator { - // snapshot the ELResolver array to avoid using a non-static inner class that needs to - // make function calls - public DescriptorIterator(ELContext context, Object base, ELResolver[] resolvers, int resolverCount) { - _context = context; - _base = base; - _resolvers = resolvers; - _resolverCount = resolverCount; - } - - @Override - public boolean hasNext() { - do { - // A null return does *not* mean hasNext() should return false. - Iterator currIterator = _getCurrIterator(); - - if (null != currIterator) { - if (currIterator.hasNext()) { - return true; - } else { - _currIterator = null; - _currResolverIndex++; - } - } else { - if (_currResolverIndex < _resolverCount) { - continue; - } else { - return false; - } - } - - } while (true); - } - - private Iterator _getCurrIterator() { - Iterator currIterator = _currIterator; - - if (currIterator == null) { - if (_currResolverIndex < _resolverCount) { - currIterator = _resolvers[_currResolverIndex].getFeatureDescriptors(_context, _base); - _currResolverIndex++; - _currIterator = currIterator; - } - } - - return currIterator; - } - - @Override - public FeatureDescriptor next() { - if (hasNext()) { - return _getCurrIterator().next(); - } else { - throw new NoSuchElementException(); - } - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - private final ELContext _context; - private final Object _base; - private final ELResolver[] _resolvers; - private final int _resolverCount; - private int _currResolverIndex; - private Iterator _currIterator; - } - @Override public Class getCommonPropertyType(ELContext context, Object base) { return null; diff --git a/impl/src/main/java/com/sun/faces/el/ELContextImpl.java b/impl/src/main/java/com/sun/faces/el/ELContextImpl.java index 723c75b779..84e4c5d47b 100644 --- a/impl/src/main/java/com/sun/faces/el/ELContextImpl.java +++ b/impl/src/main/java/com/sun/faces/el/ELContextImpl.java @@ -43,7 +43,7 @@ public class ELContextImpl extends ELContext { private FunctionMapper functionMapper = new NoopFunctionMapper(); private VariableMapper variableMapper; - private ELResolver resolver; + private final ELResolver resolver; // ------------------------------------------------------------ Constructors @@ -66,7 +66,7 @@ public ELContextImpl(FacesContext facesContext) { putContext(ExpressionFactory.class, expressionFactory); } - if (facesContext instanceof InitFacesContext == false) { + if (!(facesContext instanceof InitFacesContext)) { UIViewRoot root = facesContext.getViewRoot(); if (root != null) { setLocale(root.getLocale()); @@ -104,7 +104,7 @@ public void setFunctionMapper(FunctionMapper functionMapper) { private static class VariableMapperImpl extends VariableMapper { - private Map variables; + private final Map variables; public VariableMapperImpl() { variables = new HashMap<>(); diff --git a/impl/src/main/java/com/sun/faces/el/ELContextListenerImpl.java b/impl/src/main/java/com/sun/faces/el/ELContextListenerImpl.java index cec107e9b6..bd210c956a 100644 --- a/impl/src/main/java/com/sun/faces/el/ELContextListenerImpl.java +++ b/impl/src/main/java/com/sun/faces/el/ELContextListenerImpl.java @@ -53,8 +53,7 @@ public void contextCreated(ELContextEvent ece) { if (listeners == null) { return; } - for (int i = 0; i < listeners.length; ++i) { - ELContextListener elcl = listeners[i]; + for (ELContextListener elcl : listeners) { elcl.contextCreated(new ELContextEvent(source)); } } diff --git a/impl/src/main/java/com/sun/faces/el/ELUtils.java b/impl/src/main/java/com/sun/faces/el/ELUtils.java index d48b905ceb..dc43b804c0 100644 --- a/impl/src/main/java/com/sun/faces/el/ELUtils.java +++ b/impl/src/main/java/com/sun/faces/el/ELUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, 2024 Contributors to Eclipse Foundation. + * Copyright (c) 2024 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -16,66 +16,66 @@ */ package com.sun.faces.el; -import static com.sun.faces.RIConstants.EMPTY_CLASS_ARGS; -import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.InterpretEmptyStringSubmittedValuesAsNull; import static com.sun.faces.util.MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID; import static com.sun.faces.util.MessageUtils.getExceptionMessageString; -import static com.sun.faces.util.ReflectionUtils.lookupMethod; -import static com.sun.faces.util.ReflectionUtils.newInstance; import static com.sun.faces.util.Util.getCdiBeanManager; - -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.regex.Pattern; +import static com.sun.faces.util.Util.isEmpty; +import static java.lang.Boolean.FALSE; import com.sun.faces.application.ApplicationAssociate; import com.sun.faces.application.ResolversRegistry; -import com.sun.faces.config.WebConfiguration; +import com.sun.faces.util.Cache; +import com.sun.faces.util.LRUCache; import jakarta.el.CompositeELResolver; import jakarta.el.ELContext; import jakarta.el.ELResolver; import jakarta.el.ExpressionFactory; import jakarta.el.ValueExpression; -import jakarta.enterprise.inject.spi.BeanManager; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.context.ExternalContext; import jakarta.faces.context.FacesContext; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; /** * Utility class for EL related methods. */ public class ELUtils { - /** - * Private cache for storing evaluation results for composite components checks. - */ - private static final HashMap compositeComponentEvaluationCache = new HashMap<>(); - /** * The maximum size of the compositeComponentEvaluationCache. */ private static final int compositeComponentEvaluationCacheMaxSize = 1000; /** - * FIFO queue, holding access information about the compositeComponentEvaluationCache. + * Helps to determine if a EL expression represents a composite component EL expression. */ - private static final LinkedList evaluationCacheFifoQueue = new LinkedList<>(); + private static final Pattern COMPOSITE_COMPONENT_EXPRESSION = Pattern.compile(".(?:[ ]+|[\\[{,(])cc[.].+[}]"); - /** - * Class member, indicating a positive evaluation result. - */ - private static final Boolean IS_COMPOSITE_COMPONENT = Boolean.TRUE; + // do not use this Matcher, it's only for the Cache Factory + private static final Matcher COMPOSITE_COMPONENT_EXPRESSION_MATCHER = COMPOSITE_COMPONENT_EXPRESSION.matcher(""); /** - * Class member, indicating a negative evaluation result. + * Cache.Factory that initialize an element inside the LRUCache evaluating a Matcher against the input. + * We should be able to share a Matcher because the Factory it's executed atomically + * and this Matcher is used only here */ - private static final Boolean IS_NOT_A_COMPOSITE_COMPONENT = Boolean.FALSE; + private static final Cache.Factory isCompositeExpressionInit = new Cache.Factory<>() { + + // it would be safer to declare the shared Matcher here, but it requires Java 16+ ... Faces 5.0 ? + // private static final Matcher COMPOSITE_COMPONENT_EXPRESSION_MATCHER = COMPOSITE_COMPONENT_EXPRESSION.matcher(""); + + @Override + public Boolean newInstance(String expression) { + return expression == null ? FALSE : COMPOSITE_COMPONENT_EXPRESSION_MATCHER.reset(expression).find(); + } + }; /** - * Helps to determine if a EL expression represents a composite component EL expression. + * Private cache for storing evaluation results for composite components checks. */ - private static final Pattern COMPOSITE_COMPONENT_EXPRESSION = Pattern.compile(".(?:[ ]+|[\\[{,(])cc[.].+[}]"); + private static final LRUCache compositeComponentEvaluationCache = new LRUCache<>(isCompositeExpressionInit, compositeComponentEvaluationCacheMaxSize); /** * Used to determine if EL method arguments are being passed to a composite component lookup expression. @@ -107,23 +107,7 @@ private ELUtils() { // ---------------------------------------------------------- Public Methods public static boolean isCompositeComponentExpr(String expression) { - Boolean evaluationResult = compositeComponentEvaluationCache.get(expression); - - if (evaluationResult != null) { - // fast path - this expression has already been evaluated, therefore return its evaluation result - return evaluationResult.booleanValue(); - } - - // TODO we should be trying to re-use the Matcher by calling - // m.reset(expression); - boolean returnValue = COMPOSITE_COMPONENT_EXPRESSION - .matcher(expression) - .find(); - - // remember the evaluation result for this expression - rememberEvaluationResult(expression, returnValue); - - return returnValue; + return compositeComponentEvaluationCache.get(expression); } public static boolean isCompositeComponentMethodExprLookup(String expression) { @@ -132,6 +116,8 @@ public static boolean isCompositeComponentMethodExprLookup(String expression) { public static boolean isCompositeComponentLookupWithArgs(String expression) { // TODO we should be trying to re-use the Matcher by calling + // pizzi80: not sure because it will require a synchronized block if this method + // is called by multiple threads // m.reset(expression); return COMPOSITE_COMPONENT_LOOKUP_WITH_ARGS.matcher(expression).find(); } @@ -147,62 +133,38 @@ public static boolean isCompositeComponentLookupWithArgs(String expression) { public static void buildFacesResolver(FacesCompositeELResolver composite, ApplicationAssociate associate) { checkNotNull(composite, associate); addCDIELResolver(composite); + ResolversRegistry elRegistry = associate.getGlobalResolversRegistry(); composite.add(elRegistry.FLASH_RESOLVER); composite.addPropertyELResolver(elRegistry.COMPOSITE_COMPONENT_ATTRIBUTES_EL_RESOLVER); addELResolvers(composite, associate.getELResolversFromFacesConfig()); composite.add(associate.getApplicationELResolvers()); - if (WebConfiguration.getInstance().isOptionEnabled(InterpretEmptyStringSubmittedValuesAsNull)) { + if (ContextParam.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL.isSet(FacesContext.getCurrentInstance())) { composite.addPropertyELResolver(elRegistry.EMPTY_STRING_TO_NULL_RESOLVER); } composite.addPropertyELResolver(elRegistry.RESOURCE_RESOLVER); composite.addPropertyELResolver(elRegistry.BUNDLE_RESOLVER); + composite.addRootELResolver(elRegistry.FACES_BUNDLE_RESOLVER); - addEL3_0_Resolvers(composite, associate); - composite.addPropertyELResolver(elRegistry.MAP_RESOLVER); - composite.addPropertyELResolver(elRegistry.LIST_RESOLVER); - composite.addPropertyELResolver(elRegistry.ARRAY_RESOLVER); - composite.addPropertyELResolver(elRegistry.BEAN_RESOLVER); - composite.addRootELResolver(elRegistry.SCOPED_RESOLVER); - } - private static void checkNotNull(FacesCompositeELResolver composite, ApplicationAssociate associate) { - if (associate == null) { - throw new NullPointerException(getExceptionMessageString(NULL_PARAMETERS_ERROR_MESSAGE_ID, "associate")); + // Not sure when/why this would ever be null, but Thomas Hoffman believes it can be null. + ELResolver streamELResolver = associate.getExpressionFactory().getStreamELResolver(); + if (streamELResolver != null) { + composite.addRootELResolver(streamELResolver); } - if (composite == null) { - throw new NullPointerException(getExceptionMessageString(NULL_PARAMETERS_ERROR_MESSAGE_ID, "composite")); - } - } - - private static void addCDIELResolver(FacesCompositeELResolver composite) { - FacesContext facesContext = FacesContext.getCurrentInstance(); - BeanManager beanManager = getCdiBeanManager(facesContext); - composite.add(beanManager.getELResolver()); - } + composite.addRootELResolver(elRegistry.STATIC_FIELD_RESOLVER); - private static void addEL3_0_Resolvers(FacesCompositeELResolver composite, ApplicationAssociate associate) { - ExpressionFactory expressionFactory = associate.getExpressionFactory(); - - Method getStreamELResolverMethod = lookupMethod(ExpressionFactory.class, "getStreamELResolver", EMPTY_CLASS_ARGS); - - if (getStreamELResolverMethod != null) { - try { - ELResolver streamELResolver = (ELResolver) getStreamELResolverMethod.invoke(expressionFactory, (Object[]) null); - if (streamELResolver != null) { - composite.addRootELResolver(streamELResolver); + composite.addPropertyELResolver(elRegistry.MAP_RESOLVER); + composite.addPropertyELResolver(elRegistry.LIST_RESOLVER); + composite.addPropertyELResolver(elRegistry.ARRAY_RESOLVER); + composite.addPropertyELResolver(elRegistry.OPTIONAL_RESOLVER); + composite.addPropertyELResolver(elRegistry.RECORD_RESOLVER); + composite.addPropertyELResolver(elRegistry.BEAN_RESOLVER); - // Assume that if we have getStreamELResolver, then we must have - // jakarta.el.staticFieldELResolver - composite.addRootELResolver((ELResolver) newInstance("jakarta.el.StaticFieldELResolver")); - } - } catch (IllegalArgumentException | ReflectiveOperationException | SecurityException t) { - // This is normal on containers that do not have these ELResolvers - } - } + composite.addRootELResolver(elRegistry.SCOPED_RESOLVER); } public static Object evaluateValueExpression(ValueExpression expression, ELContext elContext) { @@ -233,35 +195,8 @@ public static Object coerce(Object value, Class toType) { } - // --------------------------------------------------------- Private Methods - /** - * Adds the specified expression with its evaluation result isCompositeComponent to the compositeComponentEvaluationCache, - * taking into account the maximum cache size. - */ - private static void rememberEvaluationResult(String expression, boolean isCompositeComponent) { - synchronized (compositeComponentEvaluationCache) { - if (compositeComponentEvaluationCache.size() >= compositeComponentEvaluationCacheMaxSize) { - // obtain the oldest cached element - String oldestExpression = evaluationCacheFifoQueue.removeFirst(); - - // remove the mapping for this element - compositeComponentEvaluationCache.remove(oldestExpression); - } - - // add the mapping to the cache - if (isCompositeComponent) { - compositeComponentEvaluationCache.put(expression, IS_COMPOSITE_COMPONENT); - } else { - compositeComponentEvaluationCache.put(expression, IS_NOT_A_COMPOSITE_COMPONENT); - } - - // remember the sequence of the hash map "put" operations - evaluationCacheFifoQueue.add(expression); - } - } - /** *

      * Add the ELResolvers from the provided list to the target CompositeELResolver. @@ -271,14 +206,28 @@ private static void rememberEvaluationResult(String expression, boolean isCompos * @param resolvers a List of ELResolvers */ private static void addELResolvers(CompositeELResolver target, List resolvers) { - if (resolvers != null && !resolvers.isEmpty()) { + if (!isEmpty(resolvers)) { for (ELResolver resolver : resolvers) { target.add(resolver); } } + } + private static void addCDIELResolver(FacesCompositeELResolver composite) { + composite.add(getCdiBeanManager(FacesContext.getCurrentInstance()).getELResolver()); } + private static void checkNotNull(FacesCompositeELResolver composite, ApplicationAssociate associate) { + if (associate == null) { + throw new NullPointerException(getExceptionMessageString(NULL_PARAMETERS_ERROR_MESSAGE_ID, "associate")); + } + + if (composite == null) { + throw new NullPointerException(getExceptionMessageString(NULL_PARAMETERS_ERROR_MESSAGE_ID, "composite")); + } + } + + /* * First look in the ApplicationAssociate. If that fails, return null; * @@ -288,12 +237,12 @@ public static ExpressionFactory getDefaultExpressionFactory(FacesContext facesCo return null; } - ExternalContext extContext = facesContext.getExternalContext(); - if (extContext == null) { + ExternalContext externalContext = facesContext.getExternalContext(); + if (externalContext == null) { return null; } - return getDefaultExpressionFactory(ApplicationAssociate.getInstance(extContext), facesContext); + return getDefaultExpressionFactory(ApplicationAssociate.getInstance(externalContext), facesContext); } public static ExpressionFactory getDefaultExpressionFactory(ApplicationAssociate associate, FacesContext facesContext) { @@ -303,4 +252,5 @@ public static ExpressionFactory getDefaultExpressionFactory(ApplicationAssociate return associate.getExpressionFactory(); } + } diff --git a/impl/src/main/java/com/sun/faces/el/EmptyStringToNullELResolver.java b/impl/src/main/java/com/sun/faces/el/EmptyStringToNullELResolver.java index 7812aa94b4..0a9eae078c 100644 --- a/impl/src/main/java/com/sun/faces/el/EmptyStringToNullELResolver.java +++ b/impl/src/main/java/com/sun/faces/el/EmptyStringToNullELResolver.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -16,9 +17,6 @@ package com.sun.faces.el; -import java.beans.FeatureDescriptor; -import java.util.Iterator; - import jakarta.el.ELContext; import jakarta.el.ELResolver; @@ -39,11 +37,6 @@ public T convertToType(ELContext context, Object value, Class targetType) return (T) value; } - @Override - public Iterator getFeatureDescriptors(ELContext context, Object base) { - return null; - } - @Override public Class getType(ELContext context, Object base, Object property) { return null; diff --git a/impl/src/main/java/com/sun/faces/el/FacesResourceBundleELResolver.java b/impl/src/main/java/com/sun/faces/el/FacesResourceBundleELResolver.java index b87b00bbcc..3a96cc0225 100644 --- a/impl/src/main/java/com/sun/faces/el/FacesResourceBundleELResolver.java +++ b/impl/src/main/java/com/sun/faces/el/FacesResourceBundleELResolver.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -133,38 +134,6 @@ public boolean isReadOnly(ELContext context, Object base, Object property) throw return false; } - @Override - public Iterator getFeatureDescriptors(ELContext context, Object base) { - - if (base != null) { - return null; - } - - ArrayList list = new ArrayList<>(); - - FacesContext facesContext = (FacesContext) context.getContext(FacesContext.class); - ApplicationAssociate associate = ApplicationAssociate.getCurrentInstance(); - Map rbMap = associate.getResourceBundles(); - if (rbMap == null) { - return list.iterator(); - } - // iterate over the list of managed beans - for (Iterator> i = rbMap.entrySet().iterator(); i.hasNext();) { - Map.Entry entry = i.next(); - String var = entry.getKey(); - ApplicationResourceBundle bundle = entry.getValue(); - if (bundle != null) { - Locale curLocale = Util.getLocaleFromContextOrSystem(facesContext); - - String description = bundle.getDescription(curLocale); - String displayName = bundle.getDisplayName(curLocale); - - list.add(Util.getFeatureDescriptor(var, displayName, description, false, false, true, ResourceBundle.class, Boolean.TRUE)); - } - } - return list.iterator(); - } - @Override public Class getCommonPropertyType(ELContext context, Object base) { if (base != null) { diff --git a/impl/src/main/java/com/sun/faces/el/ResourceELResolver.java b/impl/src/main/java/com/sun/faces/el/ResourceELResolver.java index 084180ce04..405adf7b8e 100644 --- a/impl/src/main/java/com/sun/faces/el/ResourceELResolver.java +++ b/impl/src/main/java/com/sun/faces/el/ResourceELResolver.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -16,13 +17,8 @@ package com.sun.faces.el; -import java.beans.FeatureDescriptor; -import java.util.Iterator; -import java.util.Map; - import com.sun.faces.util.MessageUtils; import com.sun.faces.util.Util; - import jakarta.el.ELContext; import jakarta.el.ELException; import jakarta.el.ELResolver; @@ -32,6 +28,7 @@ import jakarta.faces.component.UIComponent; import jakarta.faces.context.ExternalContext; import jakarta.faces.context.FacesContext; +import java.util.Map; /** * ELResolver to resolve expressions like the following: @@ -151,33 +148,19 @@ public boolean isReadOnly(ELContext context, Object base, Object property) { return false; } - /** - * @return null - there is no way to query the ResourceManager for all known resources - */ - @Override - public Iterator getFeatureDescriptors(ELContext context, Object base) { - - return null; - - } - /** * @return String.class - getType() expects String properties */ @Override public Class getCommonPropertyType(ELContext context, Object base) { - return String.class; - } // --------------------------------------------------------- Private Methods private boolean isPropertyValid(String property) { - int idx = property.indexOf(':'); return property.indexOf(':', idx + 1) == -1; - } } diff --git a/impl/src/main/java/com/sun/faces/el/ScopedAttributeELResolver.java b/impl/src/main/java/com/sun/faces/el/ScopedAttributeELResolver.java index 83ff7a0d8c..2c93d29382 100644 --- a/impl/src/main/java/com/sun/faces/el/ScopedAttributeELResolver.java +++ b/impl/src/main/java/com/sun/faces/el/ScopedAttributeELResolver.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -17,17 +18,8 @@ package com.sun.faces.el; import static com.sun.faces.util.MessageUtils.getExceptionMessageString; -import static com.sun.faces.util.Util.getFeatureDescriptor; - -import java.beans.FeatureDescriptor; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; import com.sun.faces.util.MessageUtils; - import jakarta.el.ELContext; import jakarta.el.ELException; import jakarta.el.ELResolver; @@ -35,6 +27,7 @@ import jakarta.faces.component.UIViewRoot; import jakarta.faces.context.ExternalContext; import jakarta.faces.context.FacesContext; +import java.util.Map; public class ScopedAttributeELResolver extends ELResolver { @@ -151,54 +144,6 @@ public boolean isReadOnly(ELContext context, Object base, Object property) throw return false; } - @Override - public Iterator getFeatureDescriptors(ELContext context, Object base) { - ArrayList list = new ArrayList<>(); - - FacesContext facesContext = (FacesContext) context.getContext(FacesContext.class); - ExternalContext externalContext = facesContext.getExternalContext(); - - // add attributes in request scope. - Set> attrs = externalContext.getRequestMap().entrySet(); - for (Entry entry : attrs) { - String attrName = entry.getKey(); - Object attrValue = entry.getValue(); - list.add(getFeatureDescriptor(attrName, attrName, "request scope attribute", false, false, true, attrValue.getClass(), Boolean.TRUE)); - } - - // add attributes in view scope. - UIViewRoot root = facesContext.getViewRoot(); - if (root != null) { - Map viewMap = root.getViewMap(false); - if (viewMap != null && viewMap.size() != 0) { - attrs = viewMap.entrySet(); - for (Entry entry : attrs) { - String attrName = entry.getKey(); - Object attrValue = entry.getValue(); - list.add(getFeatureDescriptor(attrName, attrName, "view scope attribute", false, false, true, attrValue.getClass(), Boolean.TRUE)); - } - } - } - - // add attributes in session scope. - attrs = externalContext.getSessionMap().entrySet(); - for (Entry entry : attrs) { - String attrName = entry.getKey(); - Object attrValue = entry.getValue(); - list.add(getFeatureDescriptor(attrName, attrName, "session scope attribute", false, false, true, attrValue.getClass(), Boolean.TRUE)); - } - - // add attributes in application scope. - attrs = externalContext.getApplicationMap().entrySet(); - for (Entry entry : attrs) { - String attrName = entry.getKey(); - Object attrValue = entry.getValue(); - list.add(getFeatureDescriptor(attrName, attrName, "application scope attribute", false, false, true, attrValue.getClass(), Boolean.TRUE)); - } - - return list.iterator(); - } - @Override public Class getCommonPropertyType(ELContext context, Object base) { if (base != null) { diff --git a/impl/src/main/java/com/sun/faces/ext/component/MessageFactory.java b/impl/src/main/java/com/sun/faces/ext/component/MessageFactory.java index 14f5b20b8d..8c760b8cb1 100644 --- a/impl/src/main/java/com/sun/faces/ext/component/MessageFactory.java +++ b/impl/src/main/java/com/sun/faces/ext/component/MessageFactory.java @@ -255,7 +255,7 @@ private String getFormattedString(String msgtext, Object[] params) { if (params == null || msgtext == null) { return msgtext; } - StringBuffer b = new StringBuffer(100); + StringBuilder b = new StringBuilder(100); MessageFormat mf = new MessageFormat(msgtext); if (locale != null) { mf.setLocale(locale); diff --git a/impl/src/main/java/com/sun/faces/facelets/compiler/CompilationMessageHolder.java b/impl/src/main/java/com/sun/faces/facelets/compiler/CompilationMessageHolder.java index d9bd72485c..594d45e6f1 100644 --- a/impl/src/main/java/com/sun/faces/facelets/compiler/CompilationMessageHolder.java +++ b/impl/src/main/java/com/sun/faces/facelets/compiler/CompilationMessageHolder.java @@ -26,8 +26,6 @@ * to store compilation messages for later use. During page compilation, * if any messages need to be shown to the user, they will be * added using this interface. If, during page execution, - * the messages turn out not to be needed, as is the case with - * a foreign xml element nested within a element, * this interface can be used to remove the messages. * * Currently the messages are keyed by namespace prefix. @@ -42,8 +40,6 @@ public interface CompilationMessageHolder { List getNamespacePrefixMessages(FacesContext context, String prefix); - void removeNamespacePrefixMessages(String prefix); - void processCompilationMessages(FacesContext context); } diff --git a/impl/src/main/java/com/sun/faces/facelets/compiler/CompilationMessageHolderImpl.java b/impl/src/main/java/com/sun/faces/facelets/compiler/CompilationMessageHolderImpl.java index 998b5972ec..8736067faa 100644 --- a/impl/src/main/java/com/sun/faces/facelets/compiler/CompilationMessageHolderImpl.java +++ b/impl/src/main/java/com/sun/faces/facelets/compiler/CompilationMessageHolderImpl.java @@ -64,12 +64,6 @@ public void processCompilationMessages(FacesContext context) { } } - @Override - public void removeNamespacePrefixMessages(String prefix) { - Map> map = getMessageListMap(); - map.remove(prefix); - } - @Override public CompilationManager getCurrentCompositeComponentCompilationManager() { return compilationManager; diff --git a/impl/src/main/java/com/sun/faces/facelets/compiler/SAXCompiler.java b/impl/src/main/java/com/sun/faces/facelets/compiler/SAXCompiler.java index 7c69a67751..30f54f7b43 100644 --- a/impl/src/main/java/com/sun/faces/facelets/compiler/SAXCompiler.java +++ b/impl/src/main/java/com/sun/faces/facelets/compiler/SAXCompiler.java @@ -244,9 +244,7 @@ public void processingInstruction(String target, String data) throws SAXExceptio boolean processAsXhtml = unit.getWebConfiguration().getFaceletsConfiguration().isProcessCurrentDocumentAsFaceletsXhtml(alias); if (processAsXhtml) { - StringBuffer sb = new StringBuffer(64); - sb.append("\n"); - unit.writeInstruction(sb.toString()); + unit.writeInstruction("\n"); } } } diff --git a/impl/src/main/java/com/sun/faces/facelets/compiler/TextUnit.java b/impl/src/main/java/com/sun/faces/facelets/compiler/TextUnit.java index 54a277ed08..be3dc2a295 100644 --- a/impl/src/main/java/com/sun/faces/facelets/compiler/TextUnit.java +++ b/impl/src/main/java/com/sun/faces/facelets/compiler/TextUnit.java @@ -40,9 +40,9 @@ final class TextUnit extends CompilationUnit { private final StringBuffer textBuffer; - private final List instructionBuffer; + private final List instructionBuffer; - private final Stack tags; + private final Stack tags; private final List children; @@ -57,9 +57,9 @@ public TextUnit(String alias, String id) { this.id = id; buffer = new StringBuffer(); textBuffer = new StringBuffer(); - instructionBuffer = new ArrayList(); - tags = new Stack(); - children = new ArrayList(); + instructionBuffer = new ArrayList<>(); + tags = new Stack<>(); + children = new ArrayList<>(); startTagOpen = false; } @@ -141,7 +141,7 @@ public void writeComment(String text) { addInstruction(new CommentInstruction(el)); } - buffer.append(""); + buffer.append(""); } public void startTag(Tag tag) { @@ -159,19 +159,17 @@ public void startTag(Tag tag) { addInstruction(new StartElementInstruction(tag.getQName())); TagAttribute[] attrs = tag.getAttributes().getAll(); - if (attrs.length > 0) { - for (int i = 0; i < attrs.length; i++) { - String qname = attrs[i].getQName(); - String value = attrs[i].getValue(); - buffer.append(' ').append(qname).append("=\"").append(value).append("\""); - - ELText txt = ELText.parse(value); - if (txt != null) { - if (txt.isLiteral()) { - addInstruction(new LiteralAttributeInstruction(qname, txt.toString())); - } else { - addInstruction(new AttributeInstruction(alias, qname, txt)); - } + for (TagAttribute attr : attrs) { + String qname = attr.getQName(); + String value = attr.getValue(); + buffer.append(' ').append(qname).append("=\"").append(value).append("\""); + + ELText txt = ELText.parse(value); + if (txt != null) { + if (txt.isLiteral()) { + addInstruction(new LiteralAttributeInstruction(qname, txt.toString())); + } else { + addInstruction(new AttributeInstruction(alias, qname, txt)); } } } @@ -182,7 +180,7 @@ public void startTag(Tag tag) { private void finishStartTag() { if (tags.size() > 0 && startTagOpen) { - buffer.append(">"); + buffer.append('>'); startTagOpen = false; } } @@ -225,7 +223,7 @@ protected void flushBufferToConfig(boolean child) { } ELText txt = ELText.parse(s); if (txt != null) { - Instruction[] instructions = (Instruction[]) instructionBuffer.toArray(new Instruction[size]); + Instruction[] instructions = instructionBuffer.toArray(new Instruction[size]); children.add(new UIInstructionHandler(alias, id, instructions, txt)); instructionBuffer.clear(); } @@ -285,7 +283,7 @@ private static String trimRight(String s) { if (Character.isWhitespace(s.charAt(i))) { i--; } else { - return s; + return s.substring(0,i+1); } } return ""; @@ -295,4 +293,6 @@ private static String trimRight(String s) { public String toString() { return "TextUnit[" + children.size() + "]"; } + + } diff --git a/impl/src/main/java/com/sun/faces/facelets/component/UIRepeat.java b/impl/src/main/java/com/sun/faces/facelets/component/UIRepeat.java index 99f5456749..ee234d0e55 100644 --- a/impl/src/main/java/com/sun/faces/facelets/component/UIRepeat.java +++ b/impl/src/main/java/com/sun/faces/facelets/component/UIRepeat.java @@ -17,6 +17,11 @@ package com.sun.faces.facelets.component; import static com.sun.faces.cdi.CdiUtils.createDataModel; +import static com.sun.faces.facelets.tag.faces.ComponentSupport.restoreFullDescendantComponentDeltaStates; +import static com.sun.faces.facelets.tag.faces.ComponentSupport.restoreFullDescendantComponentStates; +import static com.sun.faces.facelets.tag.faces.ComponentSupport.restoreTransientDescendantComponentStates; +import static com.sun.faces.facelets.tag.faces.ComponentSupport.saveDescendantComponentStates; +import static com.sun.faces.facelets.tag.faces.ComponentSupport.saveDescendantInitialComponentStates; import static com.sun.faces.renderkit.RenderKitUtils.PredefinedPostbackParameter.BEHAVIOR_SOURCE_PARAM; import static com.sun.faces.util.Util.isNestedInIterator; @@ -36,9 +41,11 @@ import jakarta.faces.FacesException; import jakarta.faces.application.Application; import jakarta.faces.application.FacesMessage; +import jakarta.faces.application.StateManager; import jakarta.faces.component.ContextCallback; import jakarta.faces.component.EditableValueHolder; import jakarta.faces.component.UIComponent; +import jakarta.faces.component.UIForm; import jakarta.faces.component.UINamingContainer; import jakarta.faces.component.visit.VisitCallback; import jakarta.faces.component.visit.VisitContext; @@ -85,8 +92,14 @@ public class UIRepeat extends UINamingContainer { private Integer begin; private Integer end; private Integer step; + private Integer offset; private Integer size; + private Boolean rowStatePreserved; + private Object initialDescendantFullComponentState = null; + private Map preservedRowStates = new HashMap<>(); + private Map transientRowStates = new HashMap<>(); + public UIRepeat() { setRendererType("facelets.ui.Repeat"); } @@ -131,13 +144,13 @@ public Integer getSize() { } public void setOffset(Integer offset) { - begin = offset; + this.offset = offset; } public Integer getOffset() { - if (begin != null) { - return begin; + if (offset != null) { + return offset; } ValueExpression ve = getValueExpression("offset"); if (ve != null) { @@ -181,6 +194,45 @@ public Integer getStep() { } + /** + *

      + * Boolean flag directing how the per-row component state of {@link EditableValueHolder} children should be handled across requests on the same view. + * If set to {@code true}, then state for {@link EditableValueHolder} components in each row will not be discarded before a new row is rendered. + * If not specified, the default value is {@code false}. + *

      + *

      + * This attribute should be set only when the current repeat component contains {@link UIForm} children which in turn contains {@link EditableValueHolder} children. + * This will only work reliably when the data model of the current repeat component does not change across requests on the same view by e.g. sorting, adding or removing rows. + * The alternative is to use c:forEach instead. + *

      + * + * @param rowStatePreserved Whether to preserve row state while rendering + * @since 4.1 + */ + public void setRowStatePreserved(boolean rowStatePreserved) { + this.rowStatePreserved = rowStatePreserved; + } + + /** + *

      + * Returns whether row state is preserved as per {@link #setRowStatePreserved(boolean)}. + *

      + * + * @return Whether row state is preserved. + * @since 4.1 + */ + public boolean isRowStatePreserved() { + + if (rowStatePreserved != null) { + return rowStatePreserved; + } + ValueExpression ve = getValueExpression("rowStatePreserved"); + if (ve != null) { + return (Boolean) ve.getValue(getFacesContext().getELContext()); + } + return false; + } + public String getVar() { return var; } @@ -211,7 +263,30 @@ private void setDataModel(DataModel model) { private DataModel getDataModel() { if (model == null) { Object val = getValue(); + + if (val != null) { + if (getBegin() != null) { + throw new FacesException("UIRepeat: when 'value' attribute is set, you need 'offset' attribute instead of 'begin' attribute"); + } + if (getEnd() != null) { + throw new FacesException("UIRepeat: when 'value' attribute is set, you need 'size' attribute instead of 'end' attribute"); + } + if (getOffset() != null && getOffset() < 0) { + throw new FacesException("UIRepeat: 'offset' attribute may not be less than 0"); + } + if (getStep() != null && getStep() < 1) { + throw new FacesException("UIRepeat: 'step' attribute may not be less than 1"); + } + } + if (val == null) { + if (getOffset() != null) { + throw new FacesException("UIRepeat: when 'value' attribute is not set, you need 'begin' attribute instead of 'offset' attribute"); + } + if (getSize() != null) { + throw new FacesException("UIRepeat: when 'value' attribute is not set, you need 'end' attribute instead of 'size' attribute"); + } + if (originalBegin == null) { originalBegin = getBegin(); } @@ -222,15 +297,11 @@ private DataModel getDataModel() { Integer begin = originalBegin; Integer end = originalEnd; - if (end == null) { - if (begin == null) { - model = EMPTY_MODEL; - } else { - throw new IllegalArgumentException("end"); - } + if (begin == null && end == null) { + model = EMPTY_MODEL; } else { int b = begin == null ? 0 : begin; - int e = end; + int e = end == null ? 0 : end; int d = b < e ? 1 : b > e ? -1 : 0; int s = Math.abs(e - b) + 1; Integer[] array = new Integer[s]; @@ -453,6 +524,73 @@ private boolean hasErrorMessages(FacesContext context) { } private void setIndex(FacesContext ctx, int index) { + if (isRowStatePreserved()) { + setRowIndexWithRowStatePreserved(ctx, index); + } else { + setRowIndexWithoutRowStatePreserved(ctx, index); + } + } + + private void setRowIndexWithRowStatePreserved(FacesContext ctx, int index) { + if (index < -1) { + throw new IllegalArgumentException("index is less than -1"); + } + + if (this.index == index) { + return; + } + + if (initialDescendantFullComponentState != null) { + // Just save the row + Map sm = saveDescendantComponentStates(ctx, null, getChildren().iterator(), UIComponent::saveState, false); + if (sm != null && !sm.isEmpty()) { + preservedRowStates.put(getContainerClientId(ctx), sm); + } + if (this.index != -1) { + sm = saveDescendantComponentStates(ctx, null, getChildren().iterator(), UIComponent::saveTransientState, false); + transientRowStates.put(getContainerClientId(ctx), sm); + } + } + + // Update to the new row index + this.index = index; + DataModel localModel = getDataModel(); + localModel.setRowIndex(index); + + // if rowIndex is -1, clear the cache + if (this.index == -1) { + setDataModel(null); + } + + // Clear or expose the current row data as a request scope attribute + if (this.index != -1 && var != null && localModel.isRowAvailable()) { + Map attrs = ctx.getExternalContext().getRequestMap(); + attrs.put(var, localModel.getRowData()); + } + + if (initialDescendantFullComponentState != null) { + Object rowState = preservedRowStates.get(getContainerClientId(ctx)); + if (rowState == null) { + // Restore as original + restoreFullDescendantComponentStates(ctx, getChildren().iterator(), initialDescendantFullComponentState, false); + } else { + // Restore first original and then delta + restoreFullDescendantComponentDeltaStates(ctx, getChildren().iterator(), rowState, initialDescendantFullComponentState, false); + } + if (this.index == -1) { + restoreTransientDescendantComponentStates(ctx, getChildren().iterator(), null, false); + } else { + rowState = transientRowStates.get(getContainerClientId(ctx)); + if (rowState == null) { + restoreTransientDescendantComponentStates(ctx, getChildren().iterator(), null, false); + } else { + restoreTransientDescendantComponentStates(ctx, getChildren().iterator(), (Map) rowState, false); + } + } + } + } + + private void setRowIndexWithoutRowStatePreserved(FacesContext ctx, int index) { DataModel localModel = getDataModel(); @@ -524,7 +662,7 @@ public void process(FacesContext faces, PhaseId phase) { Integer size = getSize(); if (null != size) { - end = size; + end = (begin != null ? begin : 0) + size; } // grab renderer @@ -540,7 +678,7 @@ public void process(FacesContext faces, PhaseId phase) { int s = step != null ? step : 1; validateIterationControlValues(rowCount, i, e); if (null != size && size > 0) { - e = size - 1; + e = e - 1; } setIndex(faces, i); @@ -646,7 +784,7 @@ public boolean visitTree(VisitContext context, VisitCallback callback) { int oldIndex = -1; if (visitRows) { oldIndex = index; - captureOrigValue(facesContext); + captureOrigValue(facesContext); setIndex(facesContext, -1); } @@ -736,13 +874,13 @@ private void validateIterationControlValues(int rowCount, int begin, int end) { } // PENDING i18n if (begin > rowCount) { - throw new FacesException("Iteration start index is greater than the number of available rows."); + throw new FacesException("UIRepeat: 'offset' attribute may not be greater than the number of available rows"); } if (begin > end) { - throw new FacesException("Iteration start index is greater than the end index."); + throw new FacesException("UIRepeat: 'size' attribute may not be less than 0"); } if (end > rowCount) { - throw new FacesException("Iteration end index is greater than the number of available rows."); + throw new FacesException("UIRepeat: " + (getOffset() != null ? "'offset' plus " : "") + "'size' attribute may not be greater than the number of available rows"); } } @@ -986,6 +1124,30 @@ public void queueEvent(FacesEvent event) { super.queueEvent(new IndexedEvent(this, event, index)); } + /** + *

      + * Override the base class method to take special action if the method is being invoked when + * {@link StateManager#IS_BUILDING_INITIAL_STATE} is true and the rowStatePreserved + * property for this instance is true. + *

      + *

      + * The additional action taken is to traverse the descendents and save their state without regard to any particular row + * value. + *

      + * + * @since 4.1 + */ + + @Override + public void markInitialState() { + if (isRowStatePreserved()) { + if (getFacesContext().getAttributes().containsKey(StateManager.IS_BUILDING_INITIAL_STATE)) { + initialDescendantFullComponentState = saveDescendantInitialComponentStates(getFacesContext(), getChildren().iterator(), false); + } + } + super.markInitialState(); + } + @Override public void restoreState(FacesContext faces, Object object) { if (faces == null) { @@ -1006,6 +1168,7 @@ public void restoreState(FacesContext faces, Object object) { value = state[7]; originalBegin = (Integer) state[8]; originalEnd = (Integer) state[9]; + preservedRowStates = (Map) state[10]; } @Override @@ -1015,7 +1178,7 @@ public Object saveState(FacesContext faces) { if (faces == null) { throw new NullPointerException(); } - Object[] state = new Object[10]; + Object[] state = new Object[11]; state[0] = super.saveState(faces); state[1] = childState; state[2] = begin; @@ -1026,6 +1189,7 @@ public Object saveState(FacesContext faces) { state[7] = value; state[8] = originalBegin; state[9] = originalEnd; + state[10] = preservedRowStates; return state; } diff --git a/impl/src/main/java/com/sun/faces/facelets/el/DefaultFunctionMapper.java b/impl/src/main/java/com/sun/faces/facelets/el/DefaultFunctionMapper.java index 61ab2e9e8f..bb4e3fa490 100644 --- a/impl/src/main/java/com/sun/faces/facelets/el/DefaultFunctionMapper.java +++ b/impl/src/main/java/com/sun/faces/facelets/el/DefaultFunctionMapper.java @@ -51,7 +51,7 @@ public final class DefaultFunctionMapper extends FunctionMapper implements Exter @Override public Method resolveFunction(String prefix, String localName) { if (functions != null) { - Function f = (Function) functions.get(prefix + ":" + localName); + Function f = (Function) functions.get(prefix + ':' + localName); return f.getMethod(); } return null; @@ -63,7 +63,7 @@ public void addFunction(String prefix, String localName, Method m) { } Function f = new Function(prefix, localName, m); synchronized (this) { - functions.put(prefix + ":" + localName, f); + functions.put(prefix + ':' + localName, f); } } @@ -89,7 +89,7 @@ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundExcept @Override public String toString() { - StringBuffer sb = new StringBuffer(128); + StringBuilder sb = new StringBuilder(128); sb.append("FunctionMapper[\n"); for (Iterator itr = functions.values().iterator(); itr.hasNext();) { sb.append(itr.next()).append('\n'); @@ -215,7 +215,7 @@ public int hashCode() { @Override public String toString() { - StringBuffer sb = new StringBuffer(32); + StringBuilder sb = new StringBuilder(32); sb.append("Function["); if (prefix != null) { sb.append(prefix).append(':'); diff --git a/impl/src/main/java/com/sun/faces/facelets/el/ELText.java b/impl/src/main/java/com/sun/faces/facelets/el/ELText.java index d5eb54c1b6..ed944249f5 100644 --- a/impl/src/main/java/com/sun/faces/facelets/el/ELText.java +++ b/impl/src/main/java/com/sun/faces/facelets/el/ELText.java @@ -122,9 +122,9 @@ public void writeText(ResponseWriter out, ELContext ctx) throws ELException, IOE @Override public String toString(ELContext ctx) { - StringBuffer sb = new StringBuffer(); - for (int i = 0; i < txt.length; i++) { - sb.append(txt[i].toString(ctx)); + StringBuilder sb = new StringBuilder(); + for (ELText elText : txt) { + sb.append(elText.toString(ctx)); } return sb.toString(); } @@ -136,9 +136,9 @@ public String toString(ELContext ctx) { @Override public String toString() { - StringBuffer sb = new StringBuffer(); - for (int i = 0; i < txt.length; i++) { - sb.append(txt[i].toString()); + StringBuilder sb = new StringBuilder(); + for (ELText elText : txt) { + sb.append(elText.toString()); } return sb.toString(); } @@ -324,7 +324,7 @@ public static ELText parse(ExpressionFactory fact, ELContext ctx, String in, Str boolean esc = false; int vlen = 0; - StringBuffer buff = new StringBuffer(128); + StringBuilder buff = new StringBuilder(128); List text = new ArrayList<>(); ELText t = null; ValueExpression ve = null; diff --git a/impl/src/main/java/com/sun/faces/facelets/el/VariableMapperWrapper.java b/impl/src/main/java/com/sun/faces/facelets/el/VariableMapperWrapper.java index 57a06d2195..6e46aa3cf2 100644 --- a/impl/src/main/java/com/sun/faces/facelets/el/VariableMapperWrapper.java +++ b/impl/src/main/java/com/sun/faces/facelets/el/VariableMapperWrapper.java @@ -35,7 +35,7 @@ public class VariableMapperWrapper extends VariableMapper { private final VariableMapper target; - private Map vars; + private Map vars; /** * @param orig the original variable mapper to be wrapped @@ -46,22 +46,18 @@ public VariableMapperWrapper(VariableMapper orig) { } /** - * First tries to resolve agains the inner Map, then the wrapped ValueExpression. + * First tries to resolve against the inner Map, then the wrapped ValueExpression. * * @see jakarta.el.VariableMapper#resolveVariable(java.lang.String) */ @Override public ValueExpression resolveVariable(String variable) { - ValueExpression ve = null; try { - if (vars != null) { - ve = (ValueExpression) vars.get(variable); - } - if (ve == null) { - return target.resolveVariable(variable); - } - return ve; - } catch (StackOverflowError e) { + // note that vars may contain null values so we can't use vars.getOrDefault + final ValueExpression ve = (vars != null ? vars.get(variable) : null); + return ve != null ? ve : target.resolveVariable(variable); + } + catch (StackOverflowError e) { throw new ELException("Could not Resolve Variable [Overflow]: " + variable, e); } } @@ -74,8 +70,8 @@ public ValueExpression resolveVariable(String variable) { @Override public ValueExpression setVariable(String variable, ValueExpression expression) { if (vars == null) { - vars = new HashMap(); + vars = new HashMap<>(); } - return (ValueExpression) vars.put(variable, expression); + return vars.put(variable, expression); } } diff --git a/impl/src/main/java/com/sun/faces/facelets/impl/FaceletCacheFactoryImpl.java b/impl/src/main/java/com/sun/faces/facelets/impl/FaceletCacheFactoryImpl.java index ceac74dacc..5475257c4a 100644 --- a/impl/src/main/java/com/sun/faces/facelets/impl/FaceletCacheFactoryImpl.java +++ b/impl/src/main/java/com/sun/faces/facelets/impl/FaceletCacheFactoryImpl.java @@ -16,8 +16,8 @@ package com.sun.faces.facelets.impl; -import com.sun.faces.config.WebConfiguration; - +import jakarta.faces.annotation.FacesConfig.ContextParam; +import jakarta.faces.context.FacesContext; import jakarta.faces.view.facelets.FaceletCache; import jakarta.faces.view.facelets.FaceletCacheFactory; @@ -32,9 +32,7 @@ public FaceletCacheFactoryImpl() { @Override public FaceletCache getFaceletCache() { - WebConfiguration webConfig = WebConfiguration.getInstance(); - String refreshPeriod = webConfig.getOptionValue(WebConfiguration.WebContextInitParameter.FaceletsDefaultRefreshPeriod); - long period = Long.parseLong(refreshPeriod) * 1000; + int period = ContextParam.FACELETS_REFRESH_PERIOD.getValue(FacesContext.getCurrentInstance()); FaceletCache result = new DefaultFaceletCache(period); return result; diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/AbstractTagLibrary.java b/impl/src/main/java/com/sun/faces/facelets/tag/AbstractTagLibrary.java index c923d8e04a..739cbbd7bb 100644 --- a/impl/src/main/java/com/sun/faces/facelets/tag/AbstractTagLibrary.java +++ b/impl/src/main/java/com/sun/faces/facelets/tag/AbstractTagLibrary.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -571,6 +572,7 @@ protected final void addValidator(String name, String validatorId, Class type) { /** *

      + * Adds a named behavior *

      * * @param name diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/TagAttributesImpl.java b/impl/src/main/java/com/sun/faces/facelets/tag/TagAttributesImpl.java index 062b0f34f1..add154f862 100644 --- a/impl/src/main/java/com/sun/faces/facelets/tag/TagAttributesImpl.java +++ b/impl/src/main/java/com/sun/faces/facelets/tag/TagAttributesImpl.java @@ -170,9 +170,9 @@ public void setTag(Tag tag) { */ @Override public String toString() { - StringBuffer sb = new StringBuffer(); - for (int i = 0; i < attrs.length; i++) { - sb.append(attrs[i]); + StringBuilder sb = new StringBuilder(); + for (TagAttribute attr : attrs) { + sb.append(attr); sb.append(' '); } if (sb.length() > 1) { diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/composite/ActionSource2AttachedObjectTargetHandler.java b/impl/src/main/java/com/sun/faces/facelets/tag/composite/ActionSourceAttachedObjectTargetHandler.java similarity index 80% rename from impl/src/main/java/com/sun/faces/facelets/tag/composite/ActionSource2AttachedObjectTargetHandler.java rename to impl/src/main/java/com/sun/faces/facelets/tag/composite/ActionSourceAttachedObjectTargetHandler.java index 4ee79eb8a6..cb36bb0f7d 100644 --- a/impl/src/main/java/com/sun/faces/facelets/tag/composite/ActionSource2AttachedObjectTargetHandler.java +++ b/impl/src/main/java/com/sun/faces/facelets/tag/composite/ActionSourceAttachedObjectTargetHandler.java @@ -18,15 +18,15 @@ import jakarta.faces.view.facelets.TagConfig; -public class ActionSource2AttachedObjectTargetHandler extends AttachedObjectTargetHandler { +public class ActionSourceAttachedObjectTargetHandler extends AttachedObjectTargetHandler { - public ActionSource2AttachedObjectTargetHandler(TagConfig config) { + public ActionSourceAttachedObjectTargetHandler(TagConfig config) { super(config); } @Override AttachedObjectTargetImpl newAttachedObjectTargetImpl() { - return new ActionSource2AttachedObjectTargetImpl(); + return new ActionSourceAttachedObjectTargetImpl(); } } diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/composite/ActionSource2AttachedObjectTargetImpl.java b/impl/src/main/java/com/sun/faces/facelets/tag/composite/ActionSourceAttachedObjectTargetImpl.java similarity index 79% rename from impl/src/main/java/com/sun/faces/facelets/tag/composite/ActionSource2AttachedObjectTargetImpl.java rename to impl/src/main/java/com/sun/faces/facelets/tag/composite/ActionSourceAttachedObjectTargetImpl.java index ff211962fd..d58dd6d19a 100644 --- a/impl/src/main/java/com/sun/faces/facelets/tag/composite/ActionSource2AttachedObjectTargetImpl.java +++ b/impl/src/main/java/com/sun/faces/facelets/tag/composite/ActionSourceAttachedObjectTargetImpl.java @@ -16,8 +16,8 @@ package com.sun.faces.facelets.tag.composite; -import jakarta.faces.view.ActionSource2AttachedObjectTarget; +import jakarta.faces.view.ActionSourceAttachedObjectTarget; -public class ActionSource2AttachedObjectTargetImpl extends AttachedObjectTargetImpl implements ActionSource2AttachedObjectTarget { +public class ActionSourceAttachedObjectTargetImpl extends AttachedObjectTargetImpl implements ActionSourceAttachedObjectTarget { } diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/composite/CompositeLibrary.java b/impl/src/main/java/com/sun/faces/facelets/tag/composite/CompositeLibrary.java index 5a8ea63721..e8b8520b1e 100644 --- a/impl/src/main/java/com/sun/faces/facelets/tag/composite/CompositeLibrary.java +++ b/impl/src/main/java/com/sun/faces/facelets/tag/composite/CompositeLibrary.java @@ -43,9 +43,8 @@ public CompositeLibrary(String namespace) { // Things that go insead of the interface section addTagHandler("attribute", AttributeHandler.class); - addTagHandler("extension", ExtensionHandler.class); addTagHandler("editableValueHolder", EditableValueHolderAttachedObjectTargetHandler.class); - addTagHandler("actionSource", ActionSource2AttachedObjectTargetHandler.class); + addTagHandler("actionSource", ActionSourceAttachedObjectTargetHandler.class); addTagHandler("valueHolder", ValueHolderAttachedObjectTargetHandler.class); addTagHandler("clientBehavior", BehaviorHolderAttachedObjectTargetHandler.class); addTagHandler("facet", DeclareFacetHandler.class); diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/composite/ExtensionHandler.java b/impl/src/main/java/com/sun/faces/facelets/tag/composite/ExtensionHandler.java deleted file mode 100644 index 30eb6388d1..0000000000 --- a/impl/src/main/java/com/sun/faces/facelets/tag/composite/ExtensionHandler.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.faces.facelets.tag.composite; - -import java.io.IOException; - -import com.sun.faces.facelets.compiler.CompilationMessageHolder; -import com.sun.faces.facelets.compiler.EncodingHandler; - -import jakarta.faces.component.UIComponent; -import jakarta.faces.view.facelets.FaceletContext; -import jakarta.faces.view.facelets.TagConfig; -import jakarta.faces.view.facelets.TagHandler; - -public class ExtensionHandler extends TagHandler { - - public ExtensionHandler(TagConfig tagConfig) { - super(tagConfig); - } - - @Override - public void apply(FaceletContext ctx, UIComponent parent) throws IOException { - // extract a prefix from the child content - if (null != nextHandler) { - String content = nextHandler.toString().trim(); - if (content.startsWith("<")) { - int i; - if (-1 != (i = content.indexOf(":"))) { - content = content.substring(1, i); - CompilationMessageHolder messageHolder = EncodingHandler.getCompilationMessageHolder(ctx); - // remove any compilation messages pertaining to this prefix - if (null != messageHolder) { - messageHolder.removeNamespacePrefixMessages(content); - } - } - } - } - - } - -} diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/composite/InterfaceHandler.java b/impl/src/main/java/com/sun/faces/facelets/tag/composite/InterfaceHandler.java index 52cb6c9d6f..1721a49b84 100644 --- a/impl/src/main/java/com/sun/faces/facelets/tag/composite/InterfaceHandler.java +++ b/impl/src/main/java/com/sun/faces/facelets/tag/composite/InterfaceHandler.java @@ -90,7 +90,7 @@ private void validateComponent(FacesContext context, UIComponent ccParent) throw String key; Object requiredValue; boolean found = false, required = false; - StringBuffer buf = null; + StringBuilder buf = null; String attrMessage = "", facetMessage = ""; // Traverse the attributes of this component @@ -121,10 +121,10 @@ private void validateComponent(FacesContext context, UIComponent ccParent) throw } if (!found) { if (null == buf) { - buf = new StringBuffer(); + buf = new StringBuilder(); buf.append(key); } else { - buf.append(", " + key); + buf.append(", ").append(key); } } } @@ -152,10 +152,10 @@ private void validateComponent(FacesContext context, UIComponent ccParent) throw key = cur.getName(); if (!cc.getFacets().containsKey(key)) { if (null == buf) { - buf = new StringBuffer(); + buf = new StringBuilder(); buf.append(key); } else { - buf.append(", " + key); + buf.append(", ").append(key); } } } diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/faces/ActionSourceRule.java b/impl/src/main/java/com/sun/faces/facelets/tag/faces/ActionSourceRule.java index 5295c5f85f..22cb269068 100644 --- a/impl/src/main/java/com/sun/faces/facelets/tag/faces/ActionSourceRule.java +++ b/impl/src/main/java/com/sun/faces/facelets/tag/faces/ActionSourceRule.java @@ -20,7 +20,6 @@ import jakarta.el.ExpressionFactory; import jakarta.el.MethodExpression; import jakarta.faces.component.ActionSource; -import jakarta.faces.component.ActionSource2; import jakarta.faces.event.ActionEvent; import jakarta.faces.event.MethodExpressionActionListener; import jakarta.faces.view.facelets.FaceletContext; @@ -51,7 +50,7 @@ public ActionMapper2(TagAttribute attr) { @Override public void applyMetadata(FaceletContext ctx, Object instance) { - ((ActionSource2) instance).setActionExpression(attr.getMethodExpression(ctx, Object.class, ActionSourceRule.ACTION_SIG)); + ((ActionSource) instance).setActionExpression(attr.getMethodExpression(ctx, Object.class, ActionSourceRule.ACTION_SIG)); } } @@ -74,7 +73,7 @@ public void applyMetadata(FaceletContext ctx, Object instance) { MethodExpression methodExpressionZeroArg = expressionFactory.createMethodExpression(ctx, methodExpressionOneArg.getExpressionString(), Void.class, ActionSourceRule.ACTION_LISTENER_ZEROARG_SIG); - ((ActionSource2) instance).addActionListener(new MethodExpressionActionListener(methodExpressionOneArg, methodExpressionZeroArg)); + ((ActionSource) instance).addActionListener(new MethodExpressionActionListener(methodExpressionOneArg, methodExpressionZeroArg)); } diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/faces/ComponentSupport.java b/impl/src/main/java/com/sun/faces/facelets/tag/faces/ComponentSupport.java index 72efd27838..6c4f74719f 100644 --- a/impl/src/main/java/com/sun/faces/facelets/tag/faces/ComponentSupport.java +++ b/impl/src/main/java/com/sun/faces/facelets/tag/faces/ComponentSupport.java @@ -20,6 +20,7 @@ import java.io.IOException; import java.util.ArrayList; +import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -27,6 +28,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Set; +import java.util.function.BiFunction; import com.sun.faces.RIConstants; import com.sun.faces.context.StateContext; @@ -218,7 +220,7 @@ public static UIComponent findUIInstructionChildByTagId(FacesContext context, UI private static boolean isPartialStateSaving(FacesContext context) { return context.getAttributes().get(PartialStateSaving) == Boolean.TRUE; } - + /** * By TagId, find Child * @@ -254,7 +256,7 @@ private static UIComponent findChildByTagIdFullStateSaving(FacesContext context, if (id.equals(cid)) { return c; } - } + } } if (0 < parent.getFacetCount()) { components = new ArrayList<>(); @@ -637,6 +639,163 @@ public static void copyPassthroughAttributes(FaceletContext ctx, UIComponent c, } } + public static Collection saveDescendantInitialComponentStates(FacesContext facesContext, Iterator childIterator, boolean saveChildFacets) { + Collection childStates = null; + while (childIterator.hasNext()) { + if (childStates == null) { + childStates = new ArrayList<>(); + } + + UIComponent child = childIterator.next(); + if (!child.isTransient()) { + // Add an entry to the collection, being an array of two + // elements. The first element is the state of the children + // of this component; the second is the state of the current + // child itself. + + Iterator childsIterator; + if (saveChildFacets) { + childsIterator = child.getFacetsAndChildren(); + } else { + childsIterator = child.getChildren().iterator(); + } + Object descendantState = saveDescendantInitialComponentStates(facesContext, childsIterator, true); + Object state = child.saveState(facesContext); + childStates.add(new Object[] { state, descendantState }); + } + } + return childStates; + } + + public static Map saveDescendantComponentStates(FacesContext facesContext, Map stateMap, Iterator childIterator, BiFunction stateSaver, boolean saveChildFacets) { + while (childIterator.hasNext()) { + UIComponent child = childIterator.next(); + if (!child.isTransient()) { + Iterator childsIterator; + if (saveChildFacets) { + childsIterator = child.getFacetsAndChildren(); + } else { + childsIterator = child.getChildren().iterator(); + } + stateMap = saveDescendantComponentStates(facesContext, stateMap, childsIterator, stateSaver, true); + Object state = stateSaver.apply(child, facesContext); + if (state != null) { + if (stateMap == null) { + stateMap = new HashMap<>(); + } + stateMap.put(child.getClientId(facesContext), state); + } + } + } + return stateMap; + } + + public static void restoreFullDescendantComponentStates(FacesContext facesContext, Iterator childIterator, Object state, boolean restoreChildFacets) { + Iterator descendantStateIterator = null; + while (childIterator.hasNext()) { + if (descendantStateIterator == null && state != null) { + descendantStateIterator = ((Collection) state).iterator(); + } + UIComponent component = childIterator.next(); + + // reset the client id (see spec 3.1.6) + component.setId(component.getId()); + if (!component.isTransient()) { + Object childState = null; + Object descendantState = null; + if (descendantStateIterator != null && descendantStateIterator.hasNext()) { + Object[] object = descendantStateIterator.next(); + childState = object[0]; + descendantState = object[1]; + } + + component.clearInitialState(); + component.restoreState(facesContext, childState); + component.markInitialState(); + + Iterator childsIterator; + if (restoreChildFacets) { + childsIterator = component.getFacetsAndChildren(); + } else { + childsIterator = component.getChildren().iterator(); + } + restoreFullDescendantComponentStates(facesContext, childsIterator, descendantState, true); + } + } + } + + public static void restoreFullDescendantComponentDeltaStates(FacesContext facesContext, Iterator childIterator, Object state, Object initialState, boolean restoreChildFacets) { + Map descendantStateIterator = null; + Iterator descendantFullStateIterator = null; + while (childIterator.hasNext()) { + if (descendantStateIterator == null && state != null) { + descendantStateIterator = (Map) state; + } + if (descendantFullStateIterator == null && initialState != null) { + descendantFullStateIterator = ((Collection) initialState).iterator(); + } + UIComponent component = childIterator.next(); + + // reset the client id (see spec 3.1.6) + component.setId(component.getId()); + if (!component.isTransient()) { + Object childInitialState = null; + Object descendantInitialState = null; + Object childState = null; + if (descendantStateIterator != null && descendantStateIterator.containsKey(component.getClientId(facesContext))) { + // Object[] object = (Object[]) descendantStateIterator.get(component.getClientId(facesContext)); + // childState = object[0]; + childState = descendantStateIterator.get(component.getClientId(facesContext)); + } + if (descendantFullStateIterator != null && descendantFullStateIterator.hasNext()) { + Object[] object = descendantFullStateIterator.next(); + childInitialState = object[0]; + descendantInitialState = object[1]; + } + + component.clearInitialState(); + if (childInitialState != null) { + component.restoreState(facesContext, childInitialState); + component.markInitialState(); + component.restoreState(facesContext, childState); + } else { + component.restoreState(facesContext, childState); + component.markInitialState(); + } + + Iterator childsIterator; + if (restoreChildFacets) { + childsIterator = component.getFacetsAndChildren(); + } else { + childsIterator = component.getChildren().iterator(); + } + restoreFullDescendantComponentDeltaStates(facesContext, childsIterator, state, descendantInitialState, true); + } + } + } + + public static void restoreTransientDescendantComponentStates(FacesContext facesContext, Iterator childIterator, Map state, boolean restoreChildFacets) { + while (childIterator.hasNext()) { + UIComponent component = childIterator.next(); + + // reset the client id (see spec 3.1.6) + component.setId(component.getId()); + if (!component.isTransient()) { + component.restoreTransientState(facesContext, state == null ? null : state.get(component.getClientId(facesContext))); + + Iterator childsIterator; + if (restoreChildFacets) { + childsIterator = component.getFacetsAndChildren(); + } else { + childsIterator = component.getChildren().iterator(); + } + restoreTransientDescendantComponentStates(facesContext, childsIterator, state, true); + } + } + + } + + // --------------------------------------------------------- private classes // private static UIViewRoot getViewRoot(FacesContext ctx, UIComponent parent) { diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/ActionListenerHandler.java b/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/ActionListenerHandler.java index cef4edc904..0a97475171 100644 --- a/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/ActionListenerHandler.java +++ b/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/ActionListenerHandler.java @@ -27,7 +27,7 @@ import jakarta.faces.event.AbortProcessingException; import jakarta.faces.event.ActionEvent; import jakarta.faces.event.ActionListener; -import jakarta.faces.view.ActionSource2AttachedObjectHandler; +import jakarta.faces.view.ActionSourceAttachedObjectHandler; import jakarta.faces.view.facelets.FaceletContext; import jakarta.faces.view.facelets.TagAttribute; import jakarta.faces.view.facelets.TagAttributeException; @@ -43,7 +43,7 @@ * @see jakarta.faces.event.ActionListener * @see jakarta.faces.component.ActionSource */ -public final class ActionListenerHandler extends ActionListenerHandlerBase implements ActionSource2AttachedObjectHandler { +public final class ActionListenerHandler extends ActionListenerHandlerBase implements ActionSourceAttachedObjectHandler { private final static class LazyActionListener implements ActionListener, Serializable { diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/ActionListenerHandlerBase.java b/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/ActionListenerHandlerBase.java index 22a7fea456..7e87c7157e 100644 --- a/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/ActionListenerHandlerBase.java +++ b/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/ActionListenerHandlerBase.java @@ -25,7 +25,7 @@ import jakarta.faces.component.ActionSource; import jakarta.faces.component.UIComponent; import jakarta.faces.context.FacesContext; -import jakarta.faces.view.ActionSource2AttachedObjectHandler; +import jakarta.faces.view.ActionSourceAttachedObjectHandler; import jakarta.faces.view.facelets.ComponentHandler; import jakarta.faces.view.facelets.FaceletContext; import jakarta.faces.view.facelets.TagAttribute; @@ -42,7 +42,7 @@ * @see jakarta.faces.event.ActionListener * @see jakarta.faces.component.ActionSource */ -public abstract class ActionListenerHandlerBase extends TagHandlerImpl implements ActionSource2AttachedObjectHandler { +public abstract class ActionListenerHandlerBase extends TagHandlerImpl implements ActionSourceAttachedObjectHandler { /** * @param config diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/AjaxHandler.java b/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/AjaxHandler.java index a7d3422f37..a44a676dd8 100644 --- a/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/AjaxHandler.java +++ b/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/AjaxHandler.java @@ -36,6 +36,7 @@ import jakarta.faces.component.UIComponent; import jakarta.faces.component.behavior.AjaxBehavior; import jakarta.faces.component.behavior.ClientBehaviorHolder; +import jakarta.faces.component.html.HtmlEvents; import jakarta.faces.context.FacesContext; import jakarta.faces.event.AbortProcessingException; import jakarta.faces.event.AjaxBehaviorEvent; @@ -352,7 +353,9 @@ private String getUnsupportedEventMessage(String eventName, Collection e } } - builder.append("."); + builder.append(". In case you wish to add new ones, then you can specify them" + + " as space-separated value of context-param with name " + + HtmlEvents.ADDITIONAL_HTML_EVENT_NAMES_PARAM_NAME); return builder.toString(); } diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/ResetValuesHandler.java b/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/ResetValuesHandler.java index c710452106..79d854fd54 100644 --- a/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/ResetValuesHandler.java +++ b/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/ResetValuesHandler.java @@ -31,12 +31,12 @@ import jakarta.faces.event.AbortProcessingException; import jakarta.faces.event.ActionEvent; import jakarta.faces.event.ActionListener; -import jakarta.faces.view.ActionSource2AttachedObjectHandler; +import jakarta.faces.view.ActionSourceAttachedObjectHandler; import jakarta.faces.view.facelets.FaceletContext; import jakarta.faces.view.facelets.TagAttribute; import jakarta.faces.view.facelets.TagConfig; -public final class ResetValuesHandler extends ActionListenerHandlerBase implements ActionSource2AttachedObjectHandler { +public final class ResetValuesHandler extends ActionListenerHandlerBase implements ActionSourceAttachedObjectHandler { private final TagAttribute render; diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/SetPropertyActionListenerHandler.java b/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/SetPropertyActionListenerHandler.java index ccfa161c6d..bccf2d8df9 100644 --- a/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/SetPropertyActionListenerHandler.java +++ b/impl/src/main/java/com/sun/faces/facelets/tag/faces/core/SetPropertyActionListenerHandler.java @@ -32,14 +32,14 @@ import jakarta.faces.event.AbortProcessingException; import jakarta.faces.event.ActionEvent; import jakarta.faces.event.ActionListener; -import jakarta.faces.view.ActionSource2AttachedObjectHandler; +import jakarta.faces.view.ActionSourceAttachedObjectHandler; import jakarta.faces.view.facelets.ComponentHandler; import jakarta.faces.view.facelets.FaceletContext; import jakarta.faces.view.facelets.TagAttribute; import jakarta.faces.view.facelets.TagConfig; import jakarta.faces.view.facelets.TagException; -public class SetPropertyActionListenerHandler extends TagHandlerImpl implements ActionSource2AttachedObjectHandler { +public class SetPropertyActionListenerHandler extends TagHandlerImpl implements ActionSourceAttachedObjectHandler { private final TagAttribute value; private final TagAttribute target; diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/ui/CompositionHandler.java b/impl/src/main/java/com/sun/faces/facelets/tag/ui/CompositionHandler.java index cf004f77a4..09a6f73323 100644 --- a/impl/src/main/java/com/sun/faces/facelets/tag/ui/CompositionHandler.java +++ b/impl/src/main/java/com/sun/faces/facelets/tag/ui/CompositionHandler.java @@ -32,6 +32,7 @@ import com.sun.faces.util.FacesLogger; import jakarta.el.VariableMapper; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.component.UIComponent; import jakarta.faces.context.FacesContext; import jakarta.faces.view.facelets.FaceletContext; diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/ui/DecorateHandler.java b/impl/src/main/java/com/sun/faces/facelets/tag/ui/DecorateHandler.java index 7af0fbf184..41996a3ea0 100644 --- a/impl/src/main/java/com/sun/faces/facelets/tag/ui/DecorateHandler.java +++ b/impl/src/main/java/com/sun/faces/facelets/tag/ui/DecorateHandler.java @@ -32,6 +32,7 @@ import com.sun.faces.util.FacesLogger; import jakarta.el.VariableMapper; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.component.UIComponent; import jakarta.faces.view.facelets.FaceletContext; import jakarta.faces.view.facelets.TagAttribute; diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/ui/IncludeHandler.java b/impl/src/main/java/com/sun/faces/facelets/tag/ui/IncludeHandler.java index 0704901d5d..b7e1ea912a 100644 --- a/impl/src/main/java/com/sun/faces/facelets/tag/ui/IncludeHandler.java +++ b/impl/src/main/java/com/sun/faces/facelets/tag/ui/IncludeHandler.java @@ -25,6 +25,7 @@ import com.sun.faces.util.FacesLogger; import jakarta.el.VariableMapper; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.component.UIComponent; import jakarta.faces.view.facelets.FaceletContext; import jakarta.faces.view.facelets.TagAttribute; diff --git a/impl/src/main/java/com/sun/faces/facelets/tag/ui/UIDebug.java b/impl/src/main/java/com/sun/faces/facelets/tag/ui/UIDebug.java index 5a5d436f16..ef7c9ee36b 100644 --- a/impl/src/main/java/com/sun/faces/facelets/tag/ui/UIDebug.java +++ b/impl/src/main/java/com/sun/faces/facelets/tag/ui/UIDebug.java @@ -80,7 +80,7 @@ public void encodeBegin(FacesContext facesContext) throws IOException { pushComponentToEL(facesContext, this); String actionId = facesContext.getApplication().getViewHandler().getActionURL(facesContext, facesContext.getViewRoot().getViewId()); - StringBuffer sb = new StringBuffer(512); + StringBuilder sb = new StringBuilder(512); sb.append("//[] e = new Enumeration[] { cl.getResources(prefix), cl.getResources(prefix + "MANIFEST.MF") }; + Set all = new LinkedHashSet<>(); URL url; URLConnection conn; JarFile jarFile; - for (int i = 0, s = e.length; i < s; ++i) { - while (e[i].hasMoreElements()) { - url = (URL) e[i].nextElement(); + for (Enumeration enumeration : e) { + while (enumeration.hasMoreElements()) { + url = enumeration.nextElement(); // Defensive programming. Due to issue 13045 this collection // can contain URLs that have their spaces incorrectly escaped // by having %20 replaced with %2520. This quick conditional // check catches this particular case and averts it. String str = url.getPath(); - if (-1 != str.indexOf("%2520")) { + if (str.contains("%2520")) { str = url.toExternalForm(); str = str.replace("%2520", "%20"); url = new URL(str); @@ -95,11 +95,11 @@ public static URL[] search(ClassLoader cl, String prefix, String suffix, SearchA } } } - URL[] urlArray = (URL[]) all.toArray(new URL[all.size()]); + URL[] urlArray = all.toArray(new URL[all.size()]); return urlArray; } - private static boolean searchDir(Set result, File file, String suffix) throws IOException { + private static boolean searchDir(Set result, File file, String suffix) throws IOException { if (file.exists() && file.isDirectory()) { File[] fc = file.listFiles(); String path; @@ -110,13 +110,13 @@ private static boolean searchDir(Set result, File file, String suffix) throws IO return false; } - for (int i = 0; i < fc.length; i++) { - path = fc[i].getAbsolutePath(); - if (fc[i].isDirectory()) { - searchDir(result, fc[i], suffix); + for (File value : fc) { + path = value.getAbsolutePath(); + if (value.isDirectory()) { + searchDir(result, value, suffix); } else if (path.endsWith(suffix)) { // result.add(new URL("file:/" + path)); - result.add(fc[i].toURL()); + result.add(value.toURL()); } } return true; @@ -134,7 +134,7 @@ private static boolean searchDir(Set result, File file, String suffix) throws IO * * @throws IOException for any error */ - private static void searchFromURL(Set result, String prefix, String suffix, URL url) throws IOException { + private static void searchFromURL(Set result, String prefix, String suffix, URL url) throws IOException { boolean done = false; InputStream is = getInputStream(url); if (is != null) { @@ -185,9 +185,9 @@ private static void searchFromURL(Set result, String prefix, String suffix, URL * @return joined tokens */ private static String join(String[] tokens, boolean excludeLast) { - StringBuffer join = new StringBuffer(); + StringBuilder join = new StringBuilder(); for (int i = 0; i < tokens.length - (excludeLast ? 1 : 0); i++) { - join.append(tokens[i]).append("/"); + join.append(tokens[i]).append('/'); } return join.toString(); } @@ -261,19 +261,19 @@ static JarFile getAlternativeJarFile(String urlFile) throws IOException { return null; } - private static void searchJar(ClassLoader cl, Set result, JarFile file, String prefix, String suffix, SearchAdvice advice) throws IOException { - Enumeration e = file.entries(); + private static void searchJar(ClassLoader cl, Set result, JarFile file, String prefix, String suffix, SearchAdvice advice) throws IOException { + Enumeration e = file.entries(); JarEntry entry; String name; while (e.hasMoreElements()) { try { - entry = (JarEntry) e.nextElement(); + entry = e.nextElement(); } catch (Throwable t) { continue; } name = entry.getName(); if (name.startsWith(prefix) && name.endsWith(suffix)) { - Enumeration e2 = cl.getResources(name); + Enumeration e2 = cl.getResources(name); while (e2.hasMoreElements()) { result.add(e2.nextElement()); if (advice == SearchAdvice.FirstMatchOnly) { diff --git a/impl/src/main/java/com/sun/faces/facelets/util/DevTools.java b/impl/src/main/java/com/sun/faces/facelets/util/DevTools.java index fcf00999b9..662f19625b 100644 --- a/impl/src/main/java/com/sun/faces/facelets/util/DevTools.java +++ b/impl/src/main/java/com/sun/faces/facelets/util/DevTools.java @@ -127,7 +127,7 @@ public static void writeMessage(Writer writer, Throwable e) throws IOException { if (e != null) { String msg = e.getMessage(); if (msg != null) { - writer.write(msg.replaceAll("<", TS)); + writer.write(msg.replace("<", TS)); } else { writer.write(e.getClass().getName()); } @@ -142,7 +142,7 @@ public static void writeException(Writer writer, Throwable e) throws IOException PrintWriter pstr = new PrintWriter(str); e.printStackTrace(pstr); pstr.close(); - writer.write(str.toString().replaceAll("<", TS)); + writer.write(str.toString().replace("<", TS)); } } @@ -317,9 +317,9 @@ private static void writeVariables(Writer writer, Map vars, String ca String key = entry.getKey(); if (key.indexOf('.') == -1) { writer.write(""); - writer.write(key.replaceAll("<", TS)); + writer.write(key.replace("<", TS)); writer.write(""); - writer.write(entry.getValue() == null ? "null" : entry.getValue().toString().replaceAll("<", TS)); + writer.write(entry.getValue() == null ? "null" : entry.getValue().toString().replace("<", TS)); writer.write(""); written = true; } @@ -368,7 +368,7 @@ private static void writeAttributes(Writer writer, UIComponent c) { } else { str = v.toString(); } - writer.write(str.replaceAll("<", TS)); + writer.write(str.replace("<", TS)); writer.write("\""); } } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException | IOException e) { @@ -392,7 +392,7 @@ private static void writeAttributes(Writer writer, UIComponent c) { private static void writeStart(Writer writer, UIComponent c, boolean children) throws IOException { if (isText(c)) { String str = c.toString().trim(); - writer.write(str.replaceAll("<", TS)); + writer.write(str.replace("<", TS)); } else { writer.write(TS); writer.write(getName(c)); diff --git a/impl/src/main/java/com/sun/faces/facelets/util/ReflectionUtil.java b/impl/src/main/java/com/sun/faces/facelets/util/ReflectionUtil.java index fc207039d2..ceb6cba5e5 100644 --- a/impl/src/main/java/com/sun/faces/facelets/util/ReflectionUtil.java +++ b/impl/src/main/java/com/sun/faces/facelets/util/ReflectionUtil.java @@ -146,11 +146,11 @@ public static String[] toTypeNameArray(Class[] c) { // return null; // } - protected static final String paramString(Class[] types) { + protected static String paramString(Class[] types) { if (types != null) { - StringBuffer sb = new StringBuffer(); - for (int i = 0; i < types.length; i++) { - sb.append(types[i].getName()).append(", "); + StringBuilder sb = new StringBuilder(); + for (Class type : types) { + sb.append(type.getName()).append(", "); } if (sb.length() > 2) { sb.setLength(sb.length() - 2); diff --git a/impl/src/main/java/com/sun/faces/flow/FlowHandlerImpl.java b/impl/src/main/java/com/sun/faces/flow/FlowHandlerImpl.java index 717f9c8369..8a040dfc98 100644 --- a/impl/src/main/java/com/sun/faces/flow/FlowHandlerImpl.java +++ b/impl/src/main/java/com/sun/faces/flow/FlowHandlerImpl.java @@ -32,7 +32,6 @@ import jakarta.el.ELContext; import jakarta.el.MethodExpression; import jakarta.el.ValueExpression; -import jakarta.faces.application.ConfigurableNavigationHandler; import jakarta.faces.application.NavigationHandler; import jakarta.faces.context.ExternalContext; import jakarta.faces.context.FacesContext; @@ -113,10 +112,7 @@ public void addFlow(FacesContext context, Flow toAdd) { } flowsWithId.add(toAdd); - NavigationHandler navigationHandler = context.getApplication().getNavigationHandler(); - if (navigationHandler instanceof ConfigurableNavigationHandler) { - ((ConfigurableNavigationHandler) navigationHandler).inspectFlow(context, toAdd); - } + context.getApplication().getNavigationHandler().inspectFlow(context, toAdd); flowFeatureIsEnabled = true; } diff --git a/impl/src/main/java/com/sun/faces/lifecycle/ClientWindowFactoryImpl.java b/impl/src/main/java/com/sun/faces/lifecycle/ClientWindowFactoryImpl.java index 20d099e0f6..96954b56e3 100644 --- a/impl/src/main/java/com/sun/faces/lifecycle/ClientWindowFactoryImpl.java +++ b/impl/src/main/java/com/sun/faces/lifecycle/ClientWindowFactoryImpl.java @@ -16,10 +16,10 @@ package com.sun.faces.lifecycle; -import com.sun.faces.config.WebConfiguration; +import com.sun.faces.application.JavaFlowLoaderHelper; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.application.Application; -import jakarta.faces.context.ExternalContext; import jakarta.faces.context.FacesContext; import jakarta.faces.event.AbortProcessingException; import jakarta.faces.event.PostConstructApplicationEvent; @@ -31,7 +31,6 @@ public class ClientWindowFactoryImpl extends ClientWindowFactory { private boolean isClientWindowEnabled = false; - private WebConfiguration config = null; public ClientWindowFactoryImpl() { super(null); @@ -60,11 +59,8 @@ public void processEvent(SystemEvent event) throws AbortProcessingException { private void postConstructApplicationInitialization() { FacesContext context = FacesContext.getCurrentInstance(); - ExternalContext extContext = context.getExternalContext(); - config = WebConfiguration.getInstance(extContext); - String optionValue = config.getOptionValue(WebConfiguration.WebContextInitParameter.ClientWindowMode); - - isClientWindowEnabled = null != optionValue && "url".equals(optionValue); + String optionValue = ContextParam.CLIENT_WINDOW_MODE.getValue(context); + isClientWindowEnabled = "url".equals(optionValue) || JavaFlowLoaderHelper.isClientWindowModeForciblyEnabled(context); } @Override diff --git a/impl/src/main/java/com/sun/faces/lifecycle/Phase.java b/impl/src/main/java/com/sun/faces/lifecycle/Phase.java index 07c6133b98..7f273f9552 100644 --- a/impl/src/main/java/com/sun/faces/lifecycle/Phase.java +++ b/impl/src/main/java/com/sun/faces/lifecycle/Phase.java @@ -16,16 +16,18 @@ package com.sun.faces.lifecycle; +import static com.sun.faces.util.Util.getCdiBeanManager; + +import java.lang.annotation.Annotation; import java.util.ListIterator; import java.util.logging.Level; import java.util.logging.Logger; -import com.sun.faces.util.FacesLogger; -import com.sun.faces.util.Timer; - import jakarta.faces.FacesException; import jakarta.faces.context.FacesContext; import jakarta.faces.context.Flash; +import jakarta.faces.event.AfterPhase; +import jakarta.faces.event.BeforePhase; import jakarta.faces.event.ExceptionQueuedEvent; import jakarta.faces.event.ExceptionQueuedEventContext; import jakarta.faces.event.PhaseEvent; @@ -33,6 +35,9 @@ import jakarta.faces.event.PhaseListener; import jakarta.faces.lifecycle.Lifecycle; +import com.sun.faces.util.FacesLogger; +import com.sun.faces.util.Timer; + /** *

      * A Phase is a single step in the processing of a Jakarta Faces request throughout its entire @@ -141,6 +146,7 @@ protected void handleAfterPhase(FacesContext context, ListIterator Flash unavailable"); } } + while (listenersIterator.hasPrevious()) { PhaseListener listener = listenersIterator.previous(); if (getId().equals(listener.getPhaseId()) || PhaseId.ANY_PHASE.equals(listener.getPhaseId())) { @@ -148,11 +154,16 @@ protected void handleAfterPhase(FacesContext context, ListIterator Flash unavailable"); } } + + if (event.getPhaseId() != PhaseId.ANY_PHASE) { + fireCdiPhaseEvent(context, event, BeforePhase.Literal.INSTANCE); + } + + fireCdiPhaseEvent(context, event, BeforePhase.Literal.of(event.getPhaseId())); + while (listenersIterator.hasNext()) { PhaseListener listener = listenersIterator.next(); if (getId().equals(listener.getPhaseId()) || PhaseId.ANY_PHASE.equals(listener.getPhaseId())) { @@ -189,6 +207,10 @@ protected void handleBeforePhase(FacesContext context, ListIterator ATTRIBUTE_LOOKUP = CollectionsUtils.map() + private static final Map ATTRIBUTE_LOOKUP = CollectionsUtils.map() .add(Key.COMMANDBUTTON, ar(attr("accesskey"), attr("dir"), attr("lang"), attr("onblur", "blur"), attr("onchange", "change"), attr("ondblclick", "dblclick"), attr("onfocus", "focus"), attr("onkeydown", "keydown"), attr("onkeypress", "keypress"), attr("onkeyup", "keyup"), diff --git a/impl/src/main/java/com/sun/faces/renderkit/ClientSideStateHelper.java b/impl/src/main/java/com/sun/faces/renderkit/ClientSideStateHelper.java index 5dcf8f7f67..5b5fc9da23 100644 --- a/impl/src/main/java/com/sun/faces/renderkit/ClientSideStateHelper.java +++ b/impl/src/main/java/com/sun/faces/renderkit/ClientSideStateHelper.java @@ -31,6 +31,7 @@ import java.io.InvalidClassException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.io.OptionalDataException; import java.io.OutputStream; import java.io.Writer; import java.util.Base64; @@ -60,6 +61,8 @@ public class ClientSideStateHelper extends StateHelper { private static final Logger LOGGER = FacesLogger.APPLICATION.getLogger(); + public static final String STATELESS = "stateless"; + /** *

      * Enabled encryption of view state. Encryption is disabled by default. @@ -189,8 +192,8 @@ public Object getState(FacesContext ctx, String viewId) throws IOException { return null; } - if ("stateless".equals(stateString)) { - return "stateless"; + if (STATELESS.equals(stateString)) { + return STATELESS; } return doGetState(ctx, stateString); @@ -206,7 +209,7 @@ public Object getState(FacesContext ctx, String viewId) throws IOException { */ protected Object doGetState(FacesContext ctx, String stateString) { - if ("stateless".equals(stateString)) { + if (STATELESS.equals(stateString)) { return null; } @@ -261,16 +264,11 @@ protected Object doGetState(FacesContext ctx, String stateString) { return new Object[] { structure, state }; - } catch (java.io.OptionalDataException ode) { + } catch (OptionalDataException | ClassNotFoundException ode) { if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, ode.getMessage(), ode); } throw new FacesException(ode); - } catch (ClassNotFoundException cnfe) { - if (LOGGER.isLoggable(Level.SEVERE)) { - LOGGER.log(Level.SEVERE, cnfe.getMessage(), cnfe); - } - throw new FacesException(cnfe); } catch (InvalidClassException ice) { /* * Thrown when the Faces runtime is trying to deserialize a client-side state that has been saved with a previous version @@ -306,13 +304,13 @@ protected Object doGetState(FacesContext ctx, String stateString) { protected void doWriteState(FacesContext facesContext, Object state, Writer writer) throws IOException { if (facesContext.getViewRoot().isTransient()) { - writer.write("stateless"); + writer.write(STATELESS); writer.flush(); return; } ByteArrayOutputStream baos = new ByteArrayOutputStream(); - OutputStream base = null; + final OutputStream base; if (compressViewState) { base = new GZIPOutputStream(baos, csBuffSize); } else { @@ -494,11 +492,8 @@ public boolean isStateless(FacesContext facesContext, String viewId) throws Ille } catch (IOException ioe) { throw new IllegalStateException("Cannot determine whether or not the request is stateless", ioe); } - if (stateObject instanceof String && "stateless".equals(stateObject)) { - return true; - } - return false; + return STATELESS.equals(stateObject); } throw new IllegalStateException("Cannot determine whether or not the request is stateless"); @@ -511,7 +506,7 @@ public boolean isStateless(FacesContext facesContext, String viewId) throws Ille */ protected static final class StringBuilderWriter extends Writer { - private StringBuilder sb; + private final StringBuilder sb; // -------------------------------------------------------- Constructors @@ -531,7 +526,7 @@ public void write(int c) throws IOException { } @Override - public void write(char cbuf[]) throws IOException { + public void write(char[] cbuf) throws IOException { sb.append(cbuf); @@ -576,7 +571,7 @@ public Writer append(char c) throws IOException { } @Override - public void write(char cbuf[], int off, int len) throws IOException { + public void write(char[] cbuf, int off, int len) throws IOException { sb.append(cbuf, off, len); diff --git a/impl/src/main/java/com/sun/faces/renderkit/RenderKitImpl.java b/impl/src/main/java/com/sun/faces/renderkit/RenderKitImpl.java index 13c1000810..325b32bff8 100644 --- a/impl/src/main/java/com/sun/faces/renderkit/RenderKitImpl.java +++ b/impl/src/main/java/com/sun/faces/renderkit/RenderKitImpl.java @@ -198,7 +198,7 @@ public ResponseWriter createResponseWriter(Writer writer, String desiredContentT if (null == desiredContentTypeList || contentTypeNullFromResponse) { String[] typeArray = context.getExternalContext().getRequestHeaderValuesMap().get("Accept"); if (typeArray.length > 0) { - StringBuffer buff = new StringBuffer(); + StringBuilder buff = new StringBuilder(); buff.append(typeArray[0]); for (int i = 1, len = typeArray.length; i < len; i++) { buff.append(','); @@ -279,15 +279,13 @@ private String findMatch(String desiredContentTypeList, String[] supportedTypes) // For each entry in the desiredTypes array, look for a match in // the supportedTypes array - for (int i = 0, ilen = desiredTypes.length; i < ilen; i++) { - String curDesiredType = desiredTypes[i]; - for (int j = 0, jlen = supportedTypes.length; j < jlen; j++) { - String curContentType = supportedTypes[j].trim(); + for (String curDesiredType : desiredTypes) { + for (String supportedType : supportedTypes) { + String curContentType = supportedType.trim(); if (curDesiredType.contains(curContentType)) { if (curContentType.contains(RIConstants.HTML_CONTENT_TYPE)) { contentType = RIConstants.HTML_CONTENT_TYPE; - } else if (curContentType.contains(RIConstants.XHTML_CONTENT_TYPE) || curContentType.contains(RIConstants.APPLICATION_XML_CONTENT_TYPE) - || curContentType.contains(RIConstants.TEXT_XML_CONTENT_TYPE)) { + } else if (curContentType.contains(RIConstants.XHTML_CONTENT_TYPE) || curContentType.contains(RIConstants.APPLICATION_XML_CONTENT_TYPE) || curContentType.contains(RIConstants.TEXT_XML_CONTENT_TYPE)) { contentType = RIConstants.XHTML_CONTENT_TYPE; } break; @@ -310,12 +308,12 @@ public void write(int b) throws IOException { } @Override - public void write(byte b[]) throws IOException { + public void write(byte[] b) throws IOException { output.write(b); } @Override - public void write(byte b[], int off, int len) throws IOException { + public void write(byte[] b, int off, int len) throws IOException { output.write(b, off, len); } diff --git a/impl/src/main/java/com/sun/faces/renderkit/RenderKitUtils.java b/impl/src/main/java/com/sun/faces/renderkit/RenderKitUtils.java index a1bbd394cd..9f885f27f4 100644 --- a/impl/src/main/java/com/sun/faces/renderkit/RenderKitUtils.java +++ b/impl/src/main/java/com/sun/faces/renderkit/RenderKitUtils.java @@ -21,6 +21,7 @@ import static com.sun.faces.renderkit.RenderKitUtils.PredefinedPostbackParameter.PARTIAL_EVENT_PARAM; import static jakarta.faces.application.ResourceHandler.FACES_SCRIPT_LIBRARY_NAME; import static jakarta.faces.application.ResourceHandler.FACES_SCRIPT_RESOURCE_NAME; +import static java.util.stream.Collectors.toList; import java.io.IOException; import java.io.Writer; @@ -30,15 +31,16 @@ import java.util.Collection; import java.util.Collections; import java.util.Iterator; +import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; import com.sun.faces.RIConstants; import com.sun.faces.application.ApplicationAssociate; -import com.sun.faces.config.WebConfiguration; import com.sun.faces.el.ELUtils; import com.sun.faces.facelets.util.DevTools; import com.sun.faces.util.FacesLogger; @@ -54,7 +56,6 @@ import jakarta.faces.application.Resource; import jakarta.faces.application.ResourceHandler; import jakarta.faces.component.ActionSource; -import jakarta.faces.component.ActionSource2; import jakarta.faces.component.Doctype; import jakarta.faces.component.UIComponent; import jakarta.faces.component.UIComponentBase; @@ -66,11 +67,13 @@ import jakarta.faces.component.behavior.ClientBehaviorContext; import jakarta.faces.component.behavior.ClientBehaviorHint; import jakarta.faces.component.behavior.ClientBehaviorHolder; +import jakarta.faces.component.html.HtmlEvents.HtmlDocumentElementEvent; import jakarta.faces.component.html.HtmlMessages; import jakarta.faces.context.ExternalContext; import jakarta.faces.context.FacesContext; import jakarta.faces.context.PartialViewContext; import jakarta.faces.context.ResponseWriter; +import jakarta.faces.event.BehaviorEvent.FacesComponentEvent; import jakarta.faces.model.SelectItem; import jakarta.faces.render.RenderKit; import jakarta.faces.render.RenderKitFactory; @@ -143,11 +146,7 @@ public class RenderKitUtils { */ private static final String ATTRIBUTES_THAT_ARE_SET_KEY = UIComponentBase.class.getName() + ".attributesThatAreSet"; - /** - * UIViewRoot attribute key of a boolean value which remembers whether the view will be rendered with a HTML5 doctype. - */ - private static final String VIEW_ROOT_ATTRIBUTES_DOCTYPE_KEY = RenderKitUtils.class.getName() + ".isOutputHtml5Doctype"; - + private static final String BEHAVIOR_EVENT_ATTRIBUTE_PREFIX = "on"; protected static final Logger LOGGER = FacesLogger.RENDERKIT.getLogger(); @@ -332,18 +331,17 @@ public static void renderPassThruAttributes(FacesContext context, ResponseWriter behaviors = Collections.emptyMap(); } - if (canBeOptimized(component, behaviors)) { - List setAttributes = (List) component.getAttributes().get(ATTRIBUTES_THAT_ARE_SET_KEY); - if (setAttributes != null) { - renderPassThruAttributesOptimized(context, writer, component, attributes, setAttributes, behaviors); - } + List setAttributes = (List) component.getAttributes().get(ATTRIBUTES_THAT_ARE_SET_KEY); + + if (setAttributes != null && canBeOptimized(component, behaviors)) { + renderPassThruAttributesOptimized(context, writer, component, attributes, setAttributes, behaviors); } else { // this block should only be hit by custom components leveraging // the RI's rendering code, or in cases where we have behaviors // attached to multiple events. We make no assumptions and loop // through - renderPassThruAttributesUnoptimized(context, writer, component, attributes, behaviors); + renderPassThruAttributesUnoptimized(context, writer, component, attributes, setAttributes, behaviors); } } @@ -354,11 +352,12 @@ public static void renderOnchange(FacesContext context, UIComponent component, b final String handlerName = "onchange"; final Object userHandler = component.getAttributes().get(handlerName); - String behaviorEventName = "valueChange"; + String behaviorEventName = FacesComponentEvent.valueChange.name(); + String domEventName = HtmlDocumentElementEvent.change.name(); if (component instanceof ClientBehaviorHolder) { Map behaviors = ((ClientBehaviorHolder) component).getClientBehaviors(); - if (null != behaviors && behaviors.containsKey("change")) { - behaviorEventName = "change"; + if (null != behaviors && behaviors.containsKey(domEventName)) { + behaviorEventName = domEventName; } } @@ -377,11 +376,12 @@ public static void renderSelectOnclick(FacesContext context, UIComponent compone final String handlerName = "onclick"; final Object userHandler = component.getAttributes().get(handlerName); - String behaviorEventName = "valueChange"; + String behaviorEventName = FacesComponentEvent.valueChange.name(); + String domEventName = HtmlDocumentElementEvent.click.name(); if (component instanceof ClientBehaviorHolder) { Map behaviors = ((ClientBehaviorHolder) component).getClientBehaviors(); - if (null != behaviors && behaviors.containsKey("click")) { - behaviorEventName = "click"; + if (null != behaviors && behaviors.containsKey(domEventName)) { + behaviorEventName = domEventName; } } @@ -403,18 +403,19 @@ public static void renderOnclick(FacesContext context, UIComponent component, Co final String handlerName = "onclick"; final Object userHandler = component.getAttributes().get(handlerName); - String behaviorEventName = "action"; + String behaviorEventName = FacesComponentEvent.action.name(); + String domEventName = HtmlDocumentElementEvent.click.name(); if (component instanceof ClientBehaviorHolder) { Map> behaviors = ((ClientBehaviorHolder) component).getClientBehaviors(); - boolean mixed = null != behaviors && behaviors.containsKey("click") && behaviors.containsKey("action"); + boolean mixed = null != behaviors && behaviors.containsKey(domEventName) && behaviors.containsKey(behaviorEventName); if (mixed) { - behaviorEventName = "click"; - List clickBehaviors = behaviors.get("click"); - List actionBehaviors = behaviors.get("action"); + List actionBehaviors = behaviors.get(behaviorEventName); + behaviorEventName = domEventName; + List clickBehaviors = behaviors.get(domEventName); clickBehaviors.addAll(actionBehaviors); actionBehaviors.clear(); - } else if (null != behaviors && behaviors.containsKey("click")) { - behaviorEventName = "click"; + } else if (null != behaviors && behaviors.containsKey(domEventName)) { + behaviorEventName = domEventName; } } @@ -425,7 +426,7 @@ public static void renderOnclick(FacesContext context, UIComponent component, Co public static void renderFunction(FacesContext context, UIComponent component, Collection params, String submitTarget) throws IOException { - ClientBehaviorContext behaviorContext = ClientBehaviorContext.createClientBehaviorContext(context, component, "action", submitTarget, params); + ClientBehaviorContext behaviorContext = ClientBehaviorContext.createClientBehaviorContext(context, component, FacesComponentEvent.action.name(), submitTarget, params); AjaxBehavior behavior = (AjaxBehavior) context.getApplication().createBehavior(AjaxBehavior.BEHAVIOR_ID); mapAttributes(component, behavior, "execute", "render", "onerror", "onevent", "resetValues"); @@ -625,6 +626,18 @@ private static void renderPassThruAttributesOptimized(FacesContext context, Resp if (isBehaviorEventAttribute(attr, behaviorEventName)) { renderHandler(context, component, null, name, value, behaviorEventName, null, false, false); + renderedBehavior = true; + } else { + writer.writeAttribute(prefixAttribute(name, isXhtml), value, name); + } + } + } + else if (isBehaviorEventAttribute(name)) { + Object value = attrMap.get(name); + if (value != null && shouldRenderAttribute(value)) { + if (name.substring(2).equals(behaviorEventName)) { + renderHandler(context, component, null, name, value, behaviorEventName, null, false, false); + renderedBehavior = true; } else { writer.writeAttribute(prefixAttribute(name, isXhtml), value, name); @@ -637,18 +650,27 @@ private static void renderPassThruAttributesOptimized(FacesContext context, Resp // attribute rendering. Need to manually render it out now. if (behaviorEventName != null && !renderedBehavior) { + List behaviorAttributes = setAttributes.stream().filter(RenderKitUtils::isBehaviorEventAttribute).collect(toList()); + + for (String attrName : behaviorAttributes) { + String eventName = attrName.substring(2); + if (behaviorEventName.equals(eventName)) { + renderPassthruAttribute(context, writer, component, behaviors, isXhtml, attrMap, attrName, behaviorEventName); + return; + } + } + // Note that we can optimize this search by providing // an event name -> Attribute inverse look up map. // This would change the search time from O(n) to O(1). - for (int i = 0; i < knownAttributes.length; i++) { - Attribute attr = knownAttributes[i]; - String[] events = attr.getEvents(); - if (events != null && events.length > 0 && behaviorEventName.equals(events[0])) { - renderHandler(context, component, null, attr.getName(), null, behaviorEventName, null, false, false); + for (Attribute attribute : knownAttributes) { + String attrName = attribute.getName(); + String[] events = attribute.getEvents(); + if (events != null && events.length > 0 && behaviorEventName.equals(events[0])) { + renderHandler(context, component, null, attrName, null, behaviorEventName, null, false, false); } } - } } @@ -660,35 +682,59 @@ private static void renderPassThruAttributesOptimized(FacesContext context, Resp * @param writer the current writer * @param component the component whose attributes we're rendering * @param knownAttributes an array of pass-through attributes supported by this component + * @param setAttributes a List of attributes that have been set on the provided component * @param behaviors the non-null behaviors map for this request. * @throws IOException if an error occurs during the write */ private static void renderPassThruAttributesUnoptimized(FacesContext context, ResponseWriter writer, UIComponent component, Attribute[] knownAttributes, - Map> behaviors) throws IOException { + List setAttributes, Map> behaviors) throws IOException { boolean isXhtml = RIConstants.XHTML_CONTENT_TYPE.equals(writer.getContentType()); Map attrMap = component.getAttributes(); + Set behaviorEventNames = new LinkedHashSet<>(behaviors.size() + 2); + + behaviorEventNames.addAll(behaviors.keySet()); + + if (setAttributes != null) { + setAttributes.stream().filter(RenderKitUtils::isBehaviorEventAttribute).map(a -> a.substring(BEHAVIOR_EVENT_ATTRIBUTE_PREFIX.length())).forEach(behaviorEventNames::add); + } for (Attribute attribute : knownAttributes) { String attrName = attribute.getName(); String[] events = attribute.getEvents(); - boolean hasBehavior = events != null && events.length > 0 && behaviors.containsKey(events[0]); + String eventName = events != null && events.length > 0 ? events[0] : null; + renderPassthruAttribute(context, writer, component, behaviors, isXhtml, attrMap, attrName, eventName); + behaviorEventNames.remove(eventName); + } - Object value = attrMap.get(attrName); + for (String eventName : behaviorEventNames) { + renderPassthruAttribute(context, writer, component, behaviors, isXhtml, attrMap, BEHAVIOR_EVENT_ATTRIBUTE_PREFIX + eventName, eventName); + } + } - if (value != null && shouldRenderAttribute(value) && !hasBehavior) { - writer.writeAttribute(prefixAttribute(attrName, isXhtml), value, attrName); - } else if (hasBehavior) { + private static void renderPassthruAttribute(FacesContext context, ResponseWriter writer, UIComponent component, + Map> behaviors, boolean isXhtml, Map attrMap, String attrName, + String eventName) throws IOException { + boolean hasBehavior = eventName != null && behaviors.containsKey(eventName); - // If we've got a behavior for this attribute, - // we may need to chain scripts together, so use - // renderHandler(). - renderHandler(context, component, null, attrName, value, events[0], null, false, false); - } + Object value = attrMap.get(attrName); + + if (value != null && shouldRenderAttribute(value) && !hasBehavior) { + writer.writeAttribute(prefixAttribute(attrName, isXhtml), value, attrName); + } else if (hasBehavior) { + + // If we've got a behavior for this attribute, + // we may need to chain scripts together, so use + // renderHandler(). + renderHandler(context, component, null, attrName, value, eventName, null, false, false); } } + public static boolean isBehaviorEventAttribute(String name) { + return name.startsWith(BEHAVIOR_EVENT_ATTRIBUTE_PREFIX) && name.length() > 2; + } + /** *

      * Determines if an attribute should be rendered based on the specified #attributeVal. @@ -1146,14 +1192,14 @@ public static boolean isPartialOrBehaviorAction(FacesContext context, String cli // First check for a Behavior action event. String behaviorEvent = BEHAVIOR_EVENT_PARAM.getValue(context); if (null != behaviorEvent) { - return "action".equals(behaviorEvent); + return FacesComponentEvent.action.name().equals(behaviorEvent); } // Not a Behavior-related request. Check for faces.ajax.request() // request params. String partialEvent = PARTIAL_EVENT_PARAM.getValue(context); - return "click".equals(partialEvent); + return HtmlDocumentElementEvent.click.name().equals(partialEvent); } /** @@ -1220,7 +1266,7 @@ public static String getImageSource(FacesContext context, UIComponent component, ResourceHandler handler = context.getApplication().getResourceHandler(); if (resName != null) { String libName = (String) component.getAttributes().get("library"); - + if (libName == null && ApplicationAssociate.getInstance(context).getResourceManager().isContractsResource(resName)) { if (context.isProjectStage(ProjectStage.Development)) { String msg = "Illegal path, direct contract references are not allowed: " + resName; @@ -1246,8 +1292,7 @@ public static String getImageSource(FacesContext context, UIComponent component, if (value == null || value.length() == 0) { return ""; } - WebConfiguration webConfig = WebConfiguration.getInstance(); - if (value.startsWith(webConfig.getOptionValue(WebConfiguration.WebContextInitParameter.WebAppContractsDirectory))) { + if (ApplicationAssociate.getInstance(context).getResourceManager().isContractsResource(value)) { if (context.isProjectStage(ProjectStage.Development)) { String msg = "Illegal path, direct contract references are not allowed: " + value; context.addMessage(component.getClientId(context), new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, msg)); @@ -1532,7 +1577,7 @@ private static String getChainedHandler(FacesContext context, UIComponent compon // If we're submitting (either via a behavior, or by rendering // a submit script), we need to return false to prevent the // default button/link action. - if (submitting && ("action".equals(behaviorEventName) || "click".equals(behaviorEventName))) { + if (submitting && (FacesComponentEvent.action.name().equals(behaviorEventName) || HtmlDocumentElementEvent.click.name().equals(behaviorEventName))) { builder.append(";return false"); } @@ -1547,7 +1592,7 @@ private static String getSingleBehaviorHandler(FacesContext context, UIComponent String script = behavior.getScript(bContext); - boolean preventDefault = (needsSubmit || isSubmitting(behavior)) && (component instanceof ActionSource || component instanceof ActionSource2); + boolean preventDefault = (needsSubmit || isSubmitting(behavior)) && (component instanceof ActionSource); if (script == null) { if (needsSubmit) { diff --git a/impl/src/main/java/com/sun/faces/renderkit/ResponseStateManagerImpl.java b/impl/src/main/java/com/sun/faces/renderkit/ResponseStateManagerImpl.java index 3f09244f68..0737a1e82b 100644 --- a/impl/src/main/java/com/sun/faces/renderkit/ResponseStateManagerImpl.java +++ b/impl/src/main/java/com/sun/faces/renderkit/ResponseStateManagerImpl.java @@ -16,17 +16,15 @@ package com.sun.faces.renderkit; -import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.StateSavingMethod; import static com.sun.faces.util.RequestStateManager.FACES_VIEW_STATE; -import static jakarta.faces.application.StateManager.STATE_SAVING_METHOD_CLIENT; import java.io.IOException; -import com.sun.faces.config.WebConfiguration; import com.sun.faces.renderkit.RenderKitUtils.PredefinedPostbackParameter; import com.sun.faces.util.RequestStateManager; import jakarta.faces.FacesException; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.context.FacesContext; import jakarta.faces.render.ResponseStateManager; @@ -39,9 +37,8 @@ public class ResponseStateManagerImpl extends ResponseStateManager { private StateHelper helper; public ResponseStateManagerImpl() { - WebConfiguration webConfig = WebConfiguration.getInstance(); - String stateMode = webConfig.getOptionValue(StateSavingMethod); - helper = STATE_SAVING_METHOD_CLIENT.equalsIgnoreCase(stateMode) ? new ClientSideStateHelper() : new ServerSideStateHelper(); + FacesContext context = FacesContext.getCurrentInstance(); + helper = ContextParam.STATE_SAVING_METHOD.isDefault(context) ? new ClientSideStateHelper() : new ServerSideStateHelper(); } // --------------------------------------- Methods from ResponseStateManager diff --git a/impl/src/main/java/com/sun/faces/renderkit/ServerSideStateHelper.java b/impl/src/main/java/com/sun/faces/renderkit/ServerSideStateHelper.java index 1d2a2a6e03..998ff6ad8d 100644 --- a/impl/src/main/java/com/sun/faces/renderkit/ServerSideStateHelper.java +++ b/impl/src/main/java/com/sun/faces/renderkit/ServerSideStateHelper.java @@ -19,7 +19,6 @@ import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.AutoCompleteOffOnViewState; import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.EnableViewStateIdRendering; import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.GenerateUniqueServerStateIds; -import static com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.SerializeServerState; import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.NumberOfLogicalViews; import static com.sun.faces.config.WebConfiguration.WebContextInitParameter.NumberOfViews; import static com.sun.faces.context.SessionMap.getMutex; @@ -51,6 +50,7 @@ import com.sun.faces.util.Util; import jakarta.faces.FacesException; +import jakarta.faces.annotation.FacesConfig.ContextParam; import jakarta.faces.component.UIViewRoot; import jakarta.faces.context.ExternalContext; import jakarta.faces.context.FacesContext; @@ -329,7 +329,7 @@ protected Integer getIntegerConfigValue(WebContextInitParameter param) { * @return If option SerializeServerState is true, serialize and return the state, otherwise, return state unchanged. */ protected Object handleSaveState(Object state) { - if (!webConfig.isOptionEnabled(SerializeServerState)) { + if (!ContextParam.SERIALIZE_SERVER_STATE.isSet(FacesContext.getCurrentInstance())) { return state; } @@ -360,7 +360,7 @@ protected Object handleSaveState(Object state) { * de-serialize the state prior to returning it, otherwise return state as is. */ protected Object handleRestoreState(Object state) { - if (!webConfig.isOptionEnabled(SerializeServerState)) { + if (!ContextParam.SERIALIZE_SERVER_STATE.isSet(FacesContext.getCurrentInstance())) { return state; } diff --git a/impl/src/main/java/com/sun/faces/renderkit/StateHelper.java b/impl/src/main/java/com/sun/faces/renderkit/StateHelper.java index 43380f0db1..b865c9d165 100644 --- a/impl/src/main/java/com/sun/faces/renderkit/StateHelper.java +++ b/impl/src/main/java/com/sun/faces/renderkit/StateHelper.java @@ -110,7 +110,7 @@ public StateHelper() { public static void createAndStoreCryptographicallyStrongTokenInSession(HttpSession session) { ByteArrayGuardAESCTR guard = new ByteArrayGuardAESCTR(); - String clearText = "" + System.currentTimeMillis(); + String clearText = String.valueOf(System.currentTimeMillis()); String result = guard.encrypt(clearText); result = URLEncoder.encode(result, UTF_8); session.setAttribute(TOKEN_NAME, result); diff --git a/impl/src/main/java/com/sun/faces/renderkit/html_basic/BodyRenderer.java b/impl/src/main/java/com/sun/faces/renderkit/html_basic/BodyRenderer.java index 86867dc427..29be9470f2 100644 --- a/impl/src/main/java/com/sun/faces/renderkit/html_basic/BodyRenderer.java +++ b/impl/src/main/java/com/sun/faces/renderkit/html_basic/BodyRenderer.java @@ -54,7 +54,9 @@ public void decode(FacesContext context, UIComponent component) { public void encodeBegin(FacesContext context, UIComponent component) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.startElement("body", component); - writeIdAttributeIfNecessary(context, writer, component); + if (RenderKitUtils.isOutputHtml5Doctype(context)) { + writeIdAttributeIfNecessary(context, writer, component); + } String styleClass = (String) component.getAttributes().get("styleClass"); if (styleClass != null && styleClass.length() != 0) { writer.writeAttribute("class", styleClass, "styleClass"); diff --git a/impl/src/main/java/com/sun/faces/renderkit/html_basic/ButtonRenderer.java b/impl/src/main/java/com/sun/faces/renderkit/html_basic/ButtonRenderer.java index e851f26c04..920eb6cafb 100644 --- a/impl/src/main/java/com/sun/faces/renderkit/html_basic/ButtonRenderer.java +++ b/impl/src/main/java/com/sun/faces/renderkit/html_basic/ButtonRenderer.java @@ -35,6 +35,8 @@ import jakarta.faces.component.UIComponent; import jakarta.faces.component.behavior.ClientBehavior; import jakarta.faces.component.behavior.ClientBehaviorContext; +import jakarta.faces.component.html.HtmlEvents.HtmlDocumentElementEvent; +import jakarta.faces.event.BehaviorEvent.FacesComponentEvent; import jakarta.faces.context.FacesContext; import jakarta.faces.context.ResponseWriter; import jakarta.faces.event.ActionEvent; @@ -230,7 +232,7 @@ private static String getButtonType(UIComponent component) { // which allows us to take a more optimized code path. private static Map> getNonOnClickBehaviors(UIComponent component) { - return getPassThruBehaviors(component, "click", "action"); + return getPassThruBehaviors(component, HtmlDocumentElementEvent.click.name(), FacesComponentEvent.action.name()); } } // end of class ButtonRenderer diff --git a/impl/src/main/java/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java b/impl/src/main/java/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java index 40b40fdb97..e0937ba793 100644 --- a/impl/src/main/java/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java +++ b/impl/src/main/java/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java @@ -32,6 +32,8 @@ import jakarta.faces.component.UIComponent; import jakarta.faces.component.behavior.ClientBehavior; import jakarta.faces.component.behavior.ClientBehaviorContext; +import jakarta.faces.component.html.HtmlEvents.HtmlDocumentElementEvent; +import jakarta.faces.event.BehaviorEvent.FacesComponentEvent; import jakarta.faces.context.FacesContext; import jakarta.faces.context.ResponseWriter; import jakarta.faces.event.ActionEvent; @@ -199,7 +201,7 @@ private static boolean wasClicked(FacesContext context, UIComponent component, S // which allows us to take a more optimized code path. private static Map> getNonOnClickBehaviors(UIComponent component) { - return getPassThruBehaviors(component, "click", "action"); + return getPassThruBehaviors(component, HtmlDocumentElementEvent.click.name(), FacesComponentEvent.action.name()); } } // end of class CommandLinkRenderer diff --git a/impl/src/main/java/com/sun/faces/renderkit/html_basic/HeadRenderer.java b/impl/src/main/java/com/sun/faces/renderkit/html_basic/HeadRenderer.java index d549d377f9..620aa439fc 100644 --- a/impl/src/main/java/com/sun/faces/renderkit/html_basic/HeadRenderer.java +++ b/impl/src/main/java/com/sun/faces/renderkit/html_basic/HeadRenderer.java @@ -26,7 +26,6 @@ import jakarta.faces.component.UIViewRoot; import jakarta.faces.context.FacesContext; import jakarta.faces.context.ResponseWriter; -import jakarta.faces.render.Renderer; /** * /** @@ -35,7 +34,7 @@ * resources that should be output before the head tag is closed. *

      */ -public class HeadRenderer extends Renderer { +public class HeadRenderer extends HtmlBasicRenderer { private static final Attribute[] HEAD_ATTRIBUTES = AttributeManager.getAttributes(AttributeManager.Key.OUTPUTHEAD); @@ -48,12 +47,10 @@ public void decode(FacesContext context, UIComponent component) { public void encodeBegin(FacesContext context, UIComponent component) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.startElement("head", component); - RenderKitUtils.renderPassThruAttributes(context, writer, component, HEAD_ATTRIBUTES); - if (RenderKitUtils.isOutputHtml5Doctype(context)) { - String clientId = component.getClientId(context); - writer.writeAttribute("id", clientId, "clientId"); + writeIdAttributeIfNecessary(context, writer, component); } + RenderKitUtils.renderPassThruAttributes(context, writer, component, HEAD_ATTRIBUTES); } @Override @@ -68,6 +65,16 @@ public void encodeEnd(FacesContext context, UIComponent component) throws IOExce writer.endElement("head"); } + /** + * Do we render our children. + * + * @return false. + */ + @Override + public boolean getRendersChildren() { + return false; + } + // --------------------------------------------------------- Private Methods private void encodeHeadResources(FacesContext context) throws IOException { diff --git a/impl/src/main/java/com/sun/faces/renderkit/html_basic/HtmlBasicInputRenderer.java b/impl/src/main/java/com/sun/faces/renderkit/html_basic/HtmlBasicInputRenderer.java index 8d07093a10..3b1e928515 100644 --- a/impl/src/main/java/com/sun/faces/renderkit/html_basic/HtmlBasicInputRenderer.java +++ b/impl/src/main/java/com/sun/faces/renderkit/html_basic/HtmlBasicInputRenderer.java @@ -33,6 +33,8 @@ import jakarta.faces.component.UIInput; import jakarta.faces.component.ValueHolder; import jakarta.faces.component.behavior.ClientBehavior; +import jakarta.faces.component.html.HtmlEvents.HtmlDocumentElementEvent; +import jakarta.faces.event.BehaviorEvent.FacesComponentEvent; import jakarta.faces.context.FacesContext; import jakarta.faces.convert.Converter; import jakarta.faces.convert.ConverterException; @@ -178,7 +180,7 @@ protected Object getValue(UIComponent component) { // we pass a null Behaviors map into renderPassThruAttributes(), // which allows us to take a more optimized code path. protected static Map> getNonOnChangeBehaviors(UIComponent component) { - return getPassThruBehaviors(component, "change", "valueChange"); + return getPassThruBehaviors(component, HtmlDocumentElementEvent.change.name(), FacesComponentEvent.valueChange.name()); } // Returns the Behaviors map, but only if it contains some entry other @@ -188,7 +190,7 @@ protected static Map> getNonOnChangeBehaviors(UICom // we pass a null Behaviors map into renderPassThruAttributes(), // which allows us to take a more optimized code path. protected static Map> getNonOnClickSelectBehaviors(UIComponent component) { - return getPassThruBehaviors(component, "click", "valueChange"); + return getPassThruBehaviors(component, HtmlDocumentElementEvent.click.name(), FacesComponentEvent.valueChange.name()); } // --------------------------------------------------------- Private Methods diff --git a/impl/src/main/java/com/sun/faces/renderkit/html_basic/MessageRenderer.java b/impl/src/main/java/com/sun/faces/renderkit/html_basic/MessageRenderer.java index 4534f66249..c1053f7381 100644 --- a/impl/src/main/java/com/sun/faces/renderkit/html_basic/MessageRenderer.java +++ b/impl/src/main/java/com/sun/faces/renderkit/html_basic/MessageRenderer.java @@ -134,18 +134,10 @@ public void encodeEnd(FacesContext context, UIComponent component) throws IOExce // Default to summary if we have no detail String detail = null != (detail = curMessage.getDetail()) ? detail : summary; - if (curMessage.getSeverity() == FacesMessage.SEVERITY_INFO) { - severityStyle = (String) component.getAttributes().get("infoStyle"); - severityStyleClass = (String) component.getAttributes().get("infoClass"); - } else if (curMessage.getSeverity() == FacesMessage.SEVERITY_WARN) { - severityStyle = (String) component.getAttributes().get("warnStyle"); - severityStyleClass = (String) component.getAttributes().get("warnClass"); - } else if (curMessage.getSeverity() == FacesMessage.SEVERITY_ERROR) { - severityStyle = (String) component.getAttributes().get("errorStyle"); - severityStyleClass = (String) component.getAttributes().get("errorClass"); - } else if (curMessage.getSeverity() == FacesMessage.SEVERITY_FATAL) { - severityStyle = (String) component.getAttributes().get("fatalStyle"); - severityStyleClass = (String) component.getAttributes().get("fatalClass"); + if (curMessage.getSeverity() != null) { + String severityPrefix = curMessage.getSeverity().name().toLowerCase(); + severityStyle = (String) component.getAttributes().get(severityPrefix + "Style"); + severityStyleClass = (String) component.getAttributes().get(severityPrefix + "Class"); } String style = (String) component.getAttributes().get("style"); diff --git a/impl/src/main/java/com/sun/faces/renderkit/html_basic/MessagesRenderer.java b/impl/src/main/java/com/sun/faces/renderkit/html_basic/MessagesRenderer.java index 3c8a8c3cd1..c340cfd1f0 100644 --- a/impl/src/main/java/com/sun/faces/renderkit/html_basic/MessagesRenderer.java +++ b/impl/src/main/java/com/sun/faces/renderkit/html_basic/MessagesRenderer.java @@ -139,18 +139,10 @@ public void encodeEnd(FacesContext context, UIComponent component) throws IOExce // Default to summary if we have no detail String detail = null != (detail = curMessage.getDetail()) ? detail : summary; - if (curMessage.getSeverity() == FacesMessage.SEVERITY_INFO) { - severityStyle = (String) component.getAttributes().get("infoStyle"); - severityStyleClass = (String) component.getAttributes().get("infoClass"); - } else if (curMessage.getSeverity() == FacesMessage.SEVERITY_WARN) { - severityStyle = (String) component.getAttributes().get("warnStyle"); - severityStyleClass = (String) component.getAttributes().get("warnClass"); - } else if (curMessage.getSeverity() == FacesMessage.SEVERITY_ERROR) { - severityStyle = (String) component.getAttributes().get("errorStyle"); - severityStyleClass = (String) component.getAttributes().get("errorClass"); - } else if (curMessage.getSeverity() == FacesMessage.SEVERITY_FATAL) { - severityStyle = (String) component.getAttributes().get("fatalStyle"); - severityStyleClass = (String) component.getAttributes().get("fatalClass"); + if (curMessage.getSeverity() != null) { + String severityPrefix = curMessage.getSeverity().name().toLowerCase(); + severityStyle = (String) component.getAttributes().get(severityPrefix + "Style"); + severityStyleClass = (String) component.getAttributes().get(severityPrefix + "Class"); } // Done intializing local variables. Move on to rendering. diff --git a/impl/src/main/java/com/sun/faces/renderkit/html_basic/OutcomeTargetRenderer.java b/impl/src/main/java/com/sun/faces/renderkit/html_basic/OutcomeTargetRenderer.java index 1cbb9a02c8..4806836ae7 100644 --- a/impl/src/main/java/com/sun/faces/renderkit/html_basic/OutcomeTargetRenderer.java +++ b/impl/src/main/java/com/sun/faces/renderkit/html_basic/OutcomeTargetRenderer.java @@ -29,7 +29,6 @@ import com.sun.faces.renderkit.RenderKitUtils; import com.sun.faces.util.Util; -import jakarta.faces.application.ConfigurableNavigationHandler; import jakarta.faces.application.NavigationCase; import jakarta.faces.application.NavigationHandler; import jakarta.faces.application.ViewHandler; @@ -99,13 +98,6 @@ protected boolean isIncludeViewParams(UIComponent component, NavigationCase navc */ protected NavigationCase getNavigationCase(FacesContext context, UIComponent component) { NavigationHandler navHandler = context.getApplication().getNavigationHandler(); - if (!(navHandler instanceof ConfigurableNavigationHandler)) { - if (logger.isLoggable(Level.WARNING)) { - logger.log(Level.WARNING, "faces.outcome.target.invalid.navigationhandler.type", component.getId()); - } - return null; - } - String outcome = ((UIOutcomeTarget) component).getOutcome(); if (outcome == null) { outcome = context.getViewRoot().getViewId(); @@ -118,9 +110,9 @@ protected NavigationCase getNavigationCase(FacesContext context, UIComponent com NavigationHandlerImpl.setResetFlowHandlerStateIfUnset(context, false); try { if (null == toFlowDocumentId) { - navCase = ((ConfigurableNavigationHandler) navHandler).getNavigationCase(context, null, outcome); + navCase = navHandler.getNavigationCase(context, null, outcome); } else { - navCase = ((ConfigurableNavigationHandler) navHandler).getNavigationCase(context, null, outcome, toFlowDocumentId); + navCase = navHandler.getNavigationCase(context, null, outcome, toFlowDocumentId); } } finally { NavigationHandlerImpl.unsetResetFlowHandlerState(context); diff --git a/impl/src/main/java/com/sun/faces/renderkit/html_basic/OutputLinkRenderer.java b/impl/src/main/java/com/sun/faces/renderkit/html_basic/OutputLinkRenderer.java index 750b7668e4..20d155f4d7 100644 --- a/impl/src/main/java/com/sun/faces/renderkit/html_basic/OutputLinkRenderer.java +++ b/impl/src/main/java/com/sun/faces/renderkit/html_basic/OutputLinkRenderer.java @@ -167,15 +167,15 @@ protected void renderAsActive(FacesContext context, UIComponent component) throw // Write Anchor attributes - Param paramList[] = getParamList(component); - StringBuffer sb = new StringBuffer(); + Param[] paramList = getParamList(component); + StringBuilder sb = new StringBuilder(); sb.append(hrefVal); boolean paramWritten = hrefVal.indexOf('?') > 0; - for (int i = 0, len = paramList.length; i < len; i++) { - String pn = paramList[i].name; + for (Param param : paramList) { + String pn = param.name; if (pn != null && pn.length() != 0) { - String pv = paramList[i].value; + String pv = param.value; sb.append(paramWritten ? '&' : '?'); sb.append(URLEncoder.encode(pn, UTF_8)); sb.append('='); diff --git a/impl/src/main/java/com/sun/faces/renderkit/html_basic/OutputMessageRenderer.java b/impl/src/main/java/com/sun/faces/renderkit/html_basic/OutputMessageRenderer.java index 69d2e07a3f..a6f9541078 100644 --- a/impl/src/main/java/com/sun/faces/renderkit/html_basic/OutputMessageRenderer.java +++ b/impl/src/main/java/com/sun/faces/renderkit/html_basic/OutputMessageRenderer.java @@ -54,7 +54,7 @@ public void encodeEnd(FacesContext context, UIComponent component) throws IOExce } String currentValue = getCurrentValue(context, component); - // If null, do not putput anything - return. + // If null, do not output anything - return. if (null == currentValue) { return; } diff --git a/impl/src/main/java/com/sun/faces/util/Cache.java b/impl/src/main/java/com/sun/faces/util/Cache.java index b2249f9bfa..4f0088ca4d 100644 --- a/impl/src/main/java/com/sun/faces/util/Cache.java +++ b/impl/src/main/java/com/sun/faces/util/Cache.java @@ -16,8 +16,10 @@ package com.sun.faces.util; +import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; +import java.util.function.Function; /** * A concurrent caching mechanism. @@ -27,11 +29,20 @@ public class Cache { /** * Factory interface for creating various cacheable objects. */ - public interface Factory { + public interface Factory extends Function { V newInstance(final K arg) throws InterruptedException; - } // END Factory + @Override + default V apply(K key) { + try { + return newInstance( key ); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + } + + } private final ConcurrentMap cache = new ConcurrentHashMap<>(); private final Factory factory; @@ -41,12 +52,11 @@ public interface Factory { /** * Constructs this cache using the specified Factory. * - * @param factory + * @param factory a factory to create or retrieve the element that need to be cached */ - public Cache(Factory factory) { + public Cache(Factory factory) { this.factory = factory; - } // ------------------------------------------------------ Public Methods @@ -62,26 +72,9 @@ public Cache(Factory factory) { * @return the value for the specified key, if any */ public V get(final K key) { - V result = cache.get(key); - - if (result == null) { - try { - result = factory.newInstance(key); - } catch (InterruptedException ie) { - // will never happen. Just for testing - throw new RuntimeException(ie); - } - - // put could be used instead if it didn't matter whether we replaced - // an existing entry - V oldResult = cache.putIfAbsent(key, result); - - if (oldResult != null) { - result = oldResult; - } - } + Objects.requireNonNull(key); - return result; + return cache.computeIfAbsent( key , factory ); } public V remove(final K key) { @@ -89,4 +82,4 @@ public V remove(final K key) { } -} // END Cache +} diff --git a/impl/src/main/java/com/sun/faces/util/CollectionsUtils.java b/impl/src/main/java/com/sun/faces/util/CollectionsUtils.java index 2f684a6d70..b5d1902cbe 100644 --- a/impl/src/main/java/com/sun/faces/util/CollectionsUtils.java +++ b/impl/src/main/java/com/sun/faces/util/CollectionsUtils.java @@ -16,13 +16,18 @@ package com.sun.faces.util; +import jakarta.faces.model.SelectItem; + import static java.util.Arrays.asList; import static java.util.Collections.unmodifiableMap; +import java.util.Enumeration; import java.util.HashMap; import java.util.HashSet; +import java.util.Iterator; import java.util.Map; import java.util.Set; +import java.util.stream.Stream; /** * @author asmirnov@exadel.com @@ -39,6 +44,7 @@ public static Set asSet(T... a) { return new HashSet<>(asList(a)); } + @SafeVarargs public static T[] ar(T... ts) { return ts; } @@ -68,4 +74,44 @@ public Map fix() { return unmodifiableMap(this); } } + + /** + * @return an unmodifiable Iterator over the passed typed array + */ + public static Iterator asIterator(T[] items) { + return unmodifiableIterator(Stream.of(items).iterator()); + } + + /** + * @return an unmodifiable Iterator over the passed array of SelectItem + */ + public static Iterator asIterator(T[] items) { + return unmodifiableIterator(Stream.of(items).iterator()); + } + + /** + * @return an Iterator over the passed Enumeration with no remove support + */ + public static Iterator unmodifiableIterator(Enumeration enumeration) { + return unmodifiableIterator(enumeration.asIterator()); + } + + /** + * @return an Iterator over the passed Iterator with no remove support + */ + public static Iterator unmodifiableIterator(Iterator iterator) { + return new UnmodifiableIterator<>(iterator); + } + + public static class UnmodifiableIterator implements Iterator { + + private final Iterator iterator; + + public UnmodifiableIterator(Iterator iterator) {this.iterator = iterator;} + + @Override public boolean hasNext() {return iterator.hasNext();} + @Override public T next() {return iterator.next();} + @Override public void remove() {throw new UnsupportedOperationException();} + } + } diff --git a/impl/src/main/java/com/sun/faces/util/ComponentStruct.java b/impl/src/main/java/com/sun/faces/util/ComponentStruct.java index f2d7ab5a81..752afc40b8 100644 --- a/impl/src/main/java/com/sun/faces/util/ComponentStruct.java +++ b/impl/src/main/java/com/sun/faces/util/ComponentStruct.java @@ -73,7 +73,7 @@ public void restoreState(FacesContext ctx, Object state) { return; } - Object s[] = (Object[]) state; + Object[] s = (Object[]) state; action = (String) s[0]; parentClientId = (String) s[1]; clientId = (String) s[2]; @@ -87,7 +87,7 @@ public Object saveState(FacesContext ctx) { throw new NullPointerException(); } - Object state[] = new Object[5]; + Object[] state = new Object[5]; state[0] = action; state[1] = parentClientId; state[2] = clientId; diff --git a/impl/src/main/java/com/sun/faces/util/DebugUtil.java b/impl/src/main/java/com/sun/faces/util/DebugUtil.java index 7cf9128ae8..66fed6c118 100644 --- a/impl/src/main/java/com/sun/faces/util/DebugUtil.java +++ b/impl/src/main/java/com/sun/faces/util/DebugUtil.java @@ -33,8 +33,6 @@ import java.util.logging.Level; import java.util.logging.Logger; -// DebugUtil.java - import com.sun.faces.RIConstants; import com.sun.faces.io.FastStringWriter; import com.sun.faces.renderkit.RenderKitUtils; @@ -77,7 +75,7 @@ public static void setKeepWaiting(boolean keepWaiting) { * * Place a call to this method in the earliest possible entry point of your servlet app. It will cause the app to enter * into an infinite loop, sleeping until the static var keepWaiting is set to false. The idea is that you attach your - * debugger to the servlet, then, set a breakpont in this method. When it is hit, you use the debugger to set the + * debugger to the servlet, then, set a breakpoint in this method. When it is hit, you use the debugger to set the * keepWaiting class var to false. */ public static void waitForDebugger() { diff --git a/impl/src/main/java/com/sun/faces/util/ELAwareBeanManagerWrapper.java b/impl/src/main/java/com/sun/faces/util/ELAwareBeanManagerWrapper.java new file mode 100644 index 0000000000..f94562fafa --- /dev/null +++ b/impl/src/main/java/com/sun/faces/util/ELAwareBeanManagerWrapper.java @@ -0,0 +1,502 @@ +/* + * Copyright (c) 2023, 2024 Contributors to Eclipse Foundation. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ +package com.sun.faces.util; + +import jakarta.el.ELResolver; +import jakarta.el.ExpressionFactory; +import jakarta.enterprise.context.spi.Context; +import jakarta.enterprise.context.spi.Contextual; +import jakarta.enterprise.context.spi.CreationalContext; +import jakarta.enterprise.event.Event; +import jakarta.enterprise.inject.Instance; +import jakarta.enterprise.inject.spi.AnnotatedField; +import jakarta.enterprise.inject.spi.AnnotatedMember; +import jakarta.enterprise.inject.spi.AnnotatedMethod; +import jakarta.enterprise.inject.spi.AnnotatedParameter; +import jakarta.enterprise.inject.spi.AnnotatedType; +import jakarta.enterprise.inject.spi.Bean; +import jakarta.enterprise.inject.spi.BeanAttributes; +import jakarta.enterprise.inject.spi.BeanManager; +import jakarta.enterprise.inject.spi.Decorator; +import jakarta.enterprise.inject.spi.Extension; +import jakarta.enterprise.inject.spi.InjectionPoint; +import jakarta.enterprise.inject.spi.InjectionTargetFactory; +import jakarta.enterprise.inject.spi.InterceptionFactory; +import jakarta.enterprise.inject.spi.InterceptionType; +import jakarta.enterprise.inject.spi.Interceptor; +import jakarta.enterprise.inject.spi.ObserverMethod; +import jakarta.enterprise.inject.spi.ProducerFactory; +import jakarta.enterprise.inject.spi.el.ELAwareBeanManager; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; +import java.util.Collection; +import java.util.List; +import java.util.Set; + +public class ELAwareBeanManagerWrapper implements ELAwareBeanManager { + + BeanManager wrapped; + + public ELAwareBeanManagerWrapper(BeanManager wrapped) { + this.wrapped = wrapped; + } + + /** + * @return + * @see jakarta.enterprise.inject.spi.el.ELAwareBeanManager#getELResolver() + */ + @Override + public ELResolver getELResolver() { + return wrapped.getELResolver(); + } + + /** + * @param expressionFactory + * @return + * @see jakarta.enterprise.inject.spi.el.ELAwareBeanManager#wrapExpressionFactory(jakarta.el.ExpressionFactory) + */ + @Override + public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory) { + return wrapped.wrapExpressionFactory(expressionFactory); + } + + /** + * @param bean + * @param beanType + * @param ctx + * @return + * @see jakarta.enterprise.inject.spi.BeanContainer#getReference(jakarta.enterprise.inject.spi.Bean, java.lang.reflect.Type, jakarta.enterprise.context.spi.CreationalContext) + */ + @Override + public Object getReference(Bean bean, Type beanType, CreationalContext ctx) { + return wrapped.getReference(bean, beanType, ctx); + } + + /** + * @param + * @param contextual + * @return + * @see jakarta.enterprise.inject.spi.BeanContainer#createCreationalContext(jakarta.enterprise.context.spi.Contextual) + */ + @Override + public CreationalContext createCreationalContext(Contextual contextual) { + return wrapped.createCreationalContext(contextual); + } + + /** + * @param beanType + * @param qualifiers + * @return + * @see jakarta.enterprise.inject.spi.BeanContainer#getBeans(java.lang.reflect.Type, java.lang.annotation.Annotation[]) + */ + @Override + public Set> getBeans(Type beanType, Annotation... qualifiers) { + return wrapped.getBeans(beanType, qualifiers); + } + + /** + * @param ij + * @param ctx + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#getInjectableReference(jakarta.enterprise.inject.spi.InjectionPoint, jakarta.enterprise.context.spi.CreationalContext) + */ + @Override + public Object getInjectableReference(InjectionPoint ij, CreationalContext ctx) { + return wrapped.getInjectableReference(ij, ctx); + } + + /** + * @param name + * @return + * @see jakarta.enterprise.inject.spi.BeanContainer#getBeans(java.lang.String) + */ + @Override + public Set> getBeans(String name) { + return wrapped.getBeans(name); + } + + /** + * @param id + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#getPassivationCapableBean(java.lang.String) + */ + @Override + public Bean getPassivationCapableBean(String id) { + return wrapped.getPassivationCapableBean(id); + } + + /** + * @param + * @param beans + * @return + * @see jakarta.enterprise.inject.spi.BeanContainer#resolve(java.util.Set) + */ + @Override + public Bean resolve(Set> beans) { + return wrapped.resolve(beans); + } + + /** + * @param injectionPoint + * @see jakarta.enterprise.inject.spi.BeanManager#validate(jakarta.enterprise.inject.spi.InjectionPoint) + */ + @Override + public void validate(InjectionPoint injectionPoint) { + wrapped.validate(injectionPoint); + } + + /** + * @param types + * @param qualifiers + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#resolveDecorators(java.util.Set, java.lang.annotation.Annotation[]) + */ + @Override + public List> resolveDecorators(Set types, Annotation... qualifiers) { + return wrapped.resolveDecorators(types, qualifiers); + } + + /** + * @param + * @param event + * @param qualifiers + * @return + * @see jakarta.enterprise.inject.spi.BeanContainer#resolveObserverMethods(java.lang.Object, java.lang.annotation.Annotation[]) + */ + @Override + public Set> resolveObserverMethods(T event, Annotation... qualifiers) { + return wrapped.resolveObserverMethods(event, qualifiers); + } + + /** + * @param type + * @param interceptorBindings + * @return + * @see jakarta.enterprise.inject.spi.BeanContainer#resolveInterceptors(jakarta.enterprise.inject.spi.InterceptionType, java.lang.annotation.Annotation[]) + */ + @Override + public List> resolveInterceptors(InterceptionType type, Annotation... interceptorBindings) { + return wrapped.resolveInterceptors(type, interceptorBindings); + } + + /** + * @param annotationType + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#isPassivatingScope(java.lang.Class) + */ + @Override + public boolean isPassivatingScope(Class annotationType) { + return wrapped.isPassivatingScope(annotationType); + } + + /** + * @param bindingType + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#getInterceptorBindingDefinition(java.lang.Class) + */ + @Override + public Set getInterceptorBindingDefinition(Class bindingType) { + return wrapped.getInterceptorBindingDefinition(bindingType); + } + + /** + * @param stereotype + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#getStereotypeDefinition(java.lang.Class) + */ + @Override + public Set getStereotypeDefinition(Class stereotype) { + return wrapped.getStereotypeDefinition(stereotype); + } + + /** + * @param qualifier1 + * @param qualifier2 + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#areQualifiersEquivalent(java.lang.annotation.Annotation, java.lang.annotation.Annotation) + */ + @Override + public boolean areQualifiersEquivalent(Annotation qualifier1, Annotation qualifier2) { + return wrapped.areQualifiersEquivalent(qualifier1, qualifier2); + } + + /** + * @param annotationType + * @return + * @see jakarta.enterprise.inject.spi.BeanContainer#isScope(java.lang.Class) + */ + @Override + public boolean isScope(Class annotationType) { + return wrapped.isScope(annotationType); + } + + /** + * @param interceptorBinding1 + * @param interceptorBinding2 + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#areInterceptorBindingsEquivalent(java.lang.annotation.Annotation, java.lang.annotation.Annotation) + */ + @Override + public boolean areInterceptorBindingsEquivalent(Annotation interceptorBinding1, Annotation interceptorBinding2) { + return wrapped.areInterceptorBindingsEquivalent(interceptorBinding1, interceptorBinding2); + } + + /** + * @param annotationType + * @return + * @see jakarta.enterprise.inject.spi.BeanContainer#isNormalScope(java.lang.Class) + */ + @Override + public boolean isNormalScope(Class annotationType) { + return wrapped.isNormalScope(annotationType); + } + + /** + * @param qualifier + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#getQualifierHashCode(java.lang.annotation.Annotation) + */ + @Override + public int getQualifierHashCode(Annotation qualifier) { + return wrapped.getQualifierHashCode(qualifier); + } + + /** + * @param annotationType + * @return + * @see jakarta.enterprise.inject.spi.BeanContainer#isQualifier(java.lang.Class) + */ + @Override + public boolean isQualifier(Class annotationType) { + return wrapped.isQualifier(annotationType); + } + + /** + * @param interceptorBinding + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#getInterceptorBindingHashCode(java.lang.annotation.Annotation) + */ + @Override + public int getInterceptorBindingHashCode(Annotation interceptorBinding) { + return wrapped.getInterceptorBindingHashCode(interceptorBinding); + } + + /** + * @param annotationType + * @return + * @see jakarta.enterprise.inject.spi.BeanContainer#isStereotype(java.lang.Class) + */ + @Override + public boolean isStereotype(Class annotationType) { + return wrapped.isStereotype(annotationType); + } + + /** + * @param annotationType + * @return + * @see jakarta.enterprise.inject.spi.BeanContainer#isInterceptorBinding(java.lang.Class) + */ + @Override + public boolean isInterceptorBinding(Class annotationType) { + return wrapped.isInterceptorBinding(annotationType); + } + + /** + * @param scopeType + * @return + * @see jakarta.enterprise.inject.spi.BeanContainer#getContext(java.lang.Class) + */ + @Override + public Context getContext(Class scopeType) { + return wrapped.getContext(scopeType); + } + + /** + * @param scopeType + * @return + * @see jakarta.enterprise.inject.spi.BeanContainer#getContexts(java.lang.Class) + */ + @Override + public Collection getContexts(Class scopeType) { + return wrapped.getContexts(scopeType); + } + + /** + * @param + * @param type + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#createAnnotatedType(java.lang.Class) + */ + @Override + public AnnotatedType createAnnotatedType(Class type) { + return wrapped.createAnnotatedType(type); + } + + /** + * @return + * @see jakarta.enterprise.inject.spi.BeanContainer#getEvent() + */ + @Override + public Event getEvent() { + return wrapped.getEvent(); + } + + /** + * @param + * @param annotatedType + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#getInjectionTargetFactory(jakarta.enterprise.inject.spi.AnnotatedType) + */ + @Override + public InjectionTargetFactory getInjectionTargetFactory(AnnotatedType annotatedType) { + return wrapped.getInjectionTargetFactory(annotatedType); + } + + /** + * @return + * @see jakarta.enterprise.inject.spi.BeanContainer#createInstance() + */ + @Override + public Instance createInstance() { + return wrapped.createInstance(); + } + + /** + * @param + * @param field + * @param declaringBean + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#getProducerFactory(jakarta.enterprise.inject.spi.AnnotatedField, jakarta.enterprise.inject.spi.Bean) + */ + @Override + public ProducerFactory getProducerFactory(AnnotatedField field, Bean declaringBean) { + return wrapped.getProducerFactory(field, declaringBean); + } + + /** + * @param + * @param method + * @param declaringBean + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#getProducerFactory(jakarta.enterprise.inject.spi.AnnotatedMethod, jakarta.enterprise.inject.spi.Bean) + */ + @Override + public ProducerFactory getProducerFactory(AnnotatedMethod method, Bean declaringBean) { + return wrapped.getProducerFactory(method, declaringBean); + } + + /** + * @param + * @param type + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#createBeanAttributes(jakarta.enterprise.inject.spi.AnnotatedType) + */ + @Override + public BeanAttributes createBeanAttributes(AnnotatedType type) { + return wrapped.createBeanAttributes(type); + } + + /** + * @param type + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#createBeanAttributes(jakarta.enterprise.inject.spi.AnnotatedMember) + */ + @Override + public BeanAttributes createBeanAttributes(AnnotatedMember type) { + return wrapped.createBeanAttributes(type); + } + + /** + * @param + * @param attributes + * @param beanClass + * @param injectionTargetFactory + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#createBean(jakarta.enterprise.inject.spi.BeanAttributes, java.lang.Class, jakarta.enterprise.inject.spi.InjectionTargetFactory) + */ + @Override + public Bean createBean(BeanAttributes attributes, Class beanClass, InjectionTargetFactory injectionTargetFactory) { + return wrapped.createBean(attributes, beanClass, injectionTargetFactory); + } + + /** + * @param + * @param + * @param attributes + * @param beanClass + * @param producerFactory + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#createBean(jakarta.enterprise.inject.spi.BeanAttributes, java.lang.Class, jakarta.enterprise.inject.spi.ProducerFactory) + */ + @Override + public Bean createBean(BeanAttributes attributes, Class beanClass, ProducerFactory producerFactory) { + return wrapped.createBean(attributes, beanClass, producerFactory); + } + + /** + * @param field + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#createInjectionPoint(jakarta.enterprise.inject.spi.AnnotatedField) + */ + @Override + public InjectionPoint createInjectionPoint(AnnotatedField field) { + return wrapped.createInjectionPoint(field); + } + + /** + * @param parameter + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#createInjectionPoint(jakarta.enterprise.inject.spi.AnnotatedParameter) + */ + @Override + public InjectionPoint createInjectionPoint(AnnotatedParameter parameter) { + return wrapped.createInjectionPoint(parameter); + } + + /** + * @param + * @param extensionClass + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#getExtension(java.lang.Class) + */ + @Override + public T getExtension(Class extensionClass) { + return wrapped.getExtension(extensionClass); + } + + /** + * @param + * @param ctx + * @param clazz + * @return + * @see jakarta.enterprise.inject.spi.BeanManager#createInterceptionFactory(jakarta.enterprise.context.spi.CreationalContext, java.lang.Class) + */ + @Override + public InterceptionFactory createInterceptionFactory(CreationalContext ctx, Class clazz) { + return wrapped.createInterceptionFactory(ctx, clazz); + } + + @Override + public boolean isMatchingBean(Set beanTypes, Set beanQualifiers, Type requiredType, Set requiredQualifiers) { + return wrapped.isMatchingBean(beanTypes, beanQualifiers, requiredType, requiredQualifiers); + } + + @Override + public boolean isMatchingEvent(Type specifiedType, Set specifiedQualifiers, Type observedEventType, Set observedEventQualifiers) { + return wrapped.isMatchingEvent(specifiedType, specifiedQualifiers, observedEventType, observedEventQualifiers); + } + +} diff --git a/impl/src/main/java/com/sun/faces/util/FacesLogger.java b/impl/src/main/java/com/sun/faces/util/FacesLogger.java index 341aef0c46..9622e02016 100644 --- a/impl/src/main/java/com/sun/faces/util/FacesLogger.java +++ b/impl/src/main/java/com/sun/faces/util/FacesLogger.java @@ -16,15 +16,15 @@ package com.sun.faces.util; -import jakarta.faces.component.UIViewRoot; -import jakarta.faces.context.FacesContext; - import java.text.MessageFormat; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; import java.util.logging.Logger; +import jakarta.faces.component.UIViewRoot; +import jakarta.faces.context.FacesContext; + /** * An enum of all application Loggers. */ @@ -38,7 +38,7 @@ public enum FacesLogger { private static final String LOGGER_RESOURCES = "com.sun.faces.LogStrings"; public static final String FACES_LOGGER_NAME_PREFIX = "jakarta.enterprise.resource.webcontainer.faces."; - private String loggerName; + private final String loggerName; FacesLogger(String loggerName) { this.loggerName = FACES_LOGGER_NAME_PREFIX + loggerName; diff --git a/impl/src/main/java/com/sun/faces/util/LRUCache.java b/impl/src/main/java/com/sun/faces/util/LRUCache.java new file mode 100644 index 0000000000..01c766d5aa --- /dev/null +++ b/impl/src/main/java/com/sun/faces/util/LRUCache.java @@ -0,0 +1,131 @@ +/* + * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ +package com.sun.faces.util; + +import java.util.Objects; +import java.util.concurrent.locks.ReentrantLock; + +/** + * LRU Cache adapted to the code style of Faces + * + * @author Paolo Bernardi + */ +public class LRUCache { + + // we can't use a read/write lock because getting an element + // from a LinkedHashMap with access order creates internal + // structural changes, so we have a unique lock. + // We use the fair mode to better serve waiting threads, otherwise + // we could simply use a synchronized block over an "Object lock" + private final ReentrantLock lock = new ReentrantLock(true); + + // We use an LRUMap to reuse a common Faces' data structure. + // this is backed by a LinkedHashMap with access order + private final LRUMap cache; + + // we wrap the old Factory class of Faces' Cache + // in a Function because it can be used natively with Maps + private final Cache.Factory factory; + + public LRUCache(Cache.Factory factory,int capacity) { + this.cache = new LRUMap<>(capacity); + this.factory = factory; + } + + /** + * get from cache if exists + * else init the value + save in cache + return created value + * + * @param key the key + * + * @return the value from cache if exists, otherwise the newly created and saved value + */ + public V get(K key) { + Objects.requireNonNull(key); + + // lock + try { + // if a waiting thread is interrupted it will release the lock... server shutdown? + // if this introduces a performance penalty we could use lock.lock() and remove the try-catch + lock.lockInterruptibly(); + } + catch (InterruptedException e) { + // in this case we return null + // ...it should be ok, isn't it? + return null; + } + + // read + (create and store if not exist) atomically + try { + return cache.computeIfAbsent( key , factory ); + } + finally { + lock.unlock(); + } + } + + /** + * clear the cache + */ + public void clear() { + // lock + try { + // if a waiting thread is interrupted it will release the lock... server shutdown? + // if this introduces a performance penalty we could use lock.lock() and remove the try-catch + lock.lockInterruptibly(); + } + // release if interrupted and return + catch (InterruptedException ignored) { + return; + } + // clear + try { + cache.clear(); + } + // always unlock + finally { + lock.unlock(); + } + } + + /** + * remove an element identified by + * the passed key from the cache + */ + public V remove(final K key) { + Objects.requireNonNull(key); + + // lock + try { + // if a waiting thread is interrupted it will release the lock... server shutdown? + // if this introduces a performance penalty we could use lock.lock() and remove the try-catch + lock.lockInterruptibly(); + } + // release if interrupted and return + catch (InterruptedException ignored) { + return null; + } + // remove + try { + return cache.remove(key); + } + // always unlock + finally { + lock.unlock(); + } + } + +} diff --git a/impl/src/main/java/com/sun/faces/util/LRUMap.java b/impl/src/main/java/com/sun/faces/util/LRUMap.java index dc14511294..82521b304f 100644 --- a/impl/src/main/java/com/sun/faces/util/LRUMap.java +++ b/impl/src/main/java/com/sun/faces/util/LRUMap.java @@ -25,7 +25,7 @@ public class LRUMap extends LinkedHashMap { private static final long serialVersionUID = -7137951139094651602L; - private int maxCapacity; + private final int maxCapacity; // ------------------------------------------------------------ Constructors diff --git a/impl/src/main/java/com/sun/faces/util/MessageFactory.java b/impl/src/main/java/com/sun/faces/util/MessageFactory.java index 1e907b6f71..83fc14ed16 100644 --- a/impl/src/main/java/com/sun/faces/util/MessageFactory.java +++ b/impl/src/main/java/com/sun/faces/util/MessageFactory.java @@ -237,7 +237,7 @@ protected static Application getApplication() { return afactory.getApplication(); } - protected static ClassLoader getCurrentLoader(Class fallbackClass) { + protected static ClassLoader getCurrentLoader(Class fallbackClass) { ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { loader = fallbackClass.getClassLoader(); @@ -309,7 +309,7 @@ private String getFormattedString(String msgtext, Object[] params) { if (params == null || msgtext == null) { return msgtext; } - StringBuffer b = new StringBuffer(100); + StringBuilder b = new StringBuilder(100); MessageFormat mf = new MessageFormat(msgtext); if (locale != null) { mf.setLocale(locale); @@ -319,8 +319,8 @@ private String getFormattedString(String msgtext, Object[] params) { return localizedStr; } - private Locale locale; - private Object[] parameters; + private final Locale locale; + private final Object[] parameters; private Object[] resolvedParameters; } diff --git a/impl/src/main/java/com/sun/faces/util/MetadataWrapperMap.java b/impl/src/main/java/com/sun/faces/util/MetadataWrapperMap.java index ca5df63edf..06876270e8 100644 --- a/impl/src/main/java/com/sun/faces/util/MetadataWrapperMap.java +++ b/impl/src/main/java/com/sun/faces/util/MetadataWrapperMap.java @@ -32,8 +32,8 @@ protected Map> getMetadata() { return metadata; } - private Map wrapped; - private Map> metadata; + private final Map wrapped; + private final Map> metadata; @Override public void clear() { diff --git a/impl/src/main/java/com/sun/faces/util/MojarraThreadFactory.java b/impl/src/main/java/com/sun/faces/util/MojarraThreadFactory.java index 2f02b36d71..f45598c772 100644 --- a/impl/src/main/java/com/sun/faces/util/MojarraThreadFactory.java +++ b/impl/src/main/java/com/sun/faces/util/MojarraThreadFactory.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -29,11 +30,8 @@ public class MojarraThreadFactory implements ThreadFactory { // -------------------------------------------------------- Constructors public MojarraThreadFactory(String factoryName) { - - SecurityManager s = System.getSecurityManager(); - group = s != null ? s.getThreadGroup() : Thread.currentThread().getThreadGroup(); + group = Thread.currentThread().getThreadGroup(); namePrefix = "Mojarra-" + factoryName + '-' + poolNumber.getAndIncrement() + "-thread-"; - } // ------------------------------------------ Methods from ThreadFactory diff --git a/impl/src/main/java/com/sun/faces/util/ReflectionUtils.java b/impl/src/main/java/com/sun/faces/util/ReflectionUtils.java index 022322c7bd..9ff4b02485 100644 --- a/impl/src/main/java/com/sun/faces/util/ReflectionUtils.java +++ b/impl/src/main/java/com/sun/faces/util/ReflectionUtils.java @@ -506,33 +506,25 @@ public MetaData(Class clazz) { String name; this.clazz = clazz; - Constructor[] ctors = clazz.getConstructors(); + Constructor[] ctors = clazz.getConstructors(); constructors = new HashMap<>(ctors.length, 1.0f); - for (int i = 0, len = ctors.length; i < len; i++) { - constructors.put(getKey(ctors[i].getParameterTypes()), ctors[i]); + for (Constructor ctor : ctors) { + constructors.put(getKey(ctor.getParameterTypes()), ctor); } Method[] meths = clazz.getMethods(); methods = new HashMap<>(meths.length, 1.0f); - for (int i = 0, len = meths.length; i < len; i++) { - name = meths[i].getName(); - HashMap methodsMap = methods.get(name); - if (methodsMap == null) { - methodsMap = new HashMap<>(4, 1.0f); - methods.put(name, methodsMap); - } - methodsMap.put(getKey(meths[i].getParameterTypes()), meths[i]); + for (Method method : meths) { + name = method.getName(); + methods.computeIfAbsent(name, k -> new HashMap<>(4, 1.0f)) + .put(getKey(method.getParameterTypes()), method); } meths = clazz.getDeclaredMethods(); declaredMethods = new HashMap<>(meths.length, 1.0f); - for (int i = 0, len = meths.length; i < len; i++) { - name = meths[i].getName(); - HashMap declaredMethodsMap = declaredMethods.get(name); - if (declaredMethodsMap == null) { - declaredMethodsMap = new HashMap<>(4, 1.0f); - declaredMethods.put(name, declaredMethodsMap); - } - declaredMethodsMap.put(getKey(meths[i].getParameterTypes()), meths[i]); + for (Method meth : meths) { + name = meth.getName(); + declaredMethods.computeIfAbsent(name, k -> new HashMap<>(4, 1.0f)) + .put(getKey(meth.getParameterTypes()), meth); } try { diff --git a/impl/src/main/java/com/sun/faces/util/ScopedRunner.java b/impl/src/main/java/com/sun/faces/util/ScopedRunner.java index 25645a0270..b5ab0de7bb 100644 --- a/impl/src/main/java/com/sun/faces/util/ScopedRunner.java +++ b/impl/src/main/java/com/sun/faces/util/ScopedRunner.java @@ -30,9 +30,9 @@ */ public class ScopedRunner { - private FacesContext context; - private Map scopedVariables; - private Map previousVariables = new HashMap<>(); + private final FacesContext context; + private final Map scopedVariables; + private final Map previousVariables = new HashMap<>(); public ScopedRunner(FacesContext context) { this(context, new HashMap<>()); diff --git a/impl/src/main/java/com/sun/faces/util/Util.java b/impl/src/main/java/com/sun/faces/util/Util.java index ca481492aa..4bc5f936d2 100644 --- a/impl/src/main/java/com/sun/faces/util/Util.java +++ b/impl/src/main/java/com/sun/faces/util/Util.java @@ -1,6 +1,6 @@ /* + * Copyright (c) 2021, 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2021 Contributors to Eclipse Foundation. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -19,6 +19,7 @@ package com.sun.faces.util; +import static com.sun.faces.RIConstants.CDI_BEAN_MANAGER; import static com.sun.faces.RIConstants.FACELETS_ENCODING_KEY; import static com.sun.faces.RIConstants.FACES_SERVLET_MAPPINGS; import static com.sun.faces.RIConstants.FACES_SERVLET_REGISTRATION; @@ -35,7 +36,6 @@ import static java.util.logging.Level.FINEST; import static java.util.logging.Level.SEVERE; -import java.beans.FeatureDescriptor; import java.io.IOException; import java.io.InputStream; import java.lang.reflect.Array; @@ -46,11 +46,11 @@ import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; -import java.security.PrivilegedAction; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; +import java.util.Enumeration; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; @@ -84,10 +84,10 @@ import com.sun.faces.facelets.component.UIRepeat; import com.sun.faces.io.FastStringWriter; -import jakarta.el.ELResolver; import jakarta.el.ValueExpression; import jakarta.enterprise.inject.spi.BeanManager; import jakarta.enterprise.inject.spi.CDI; +import jakarta.enterprise.inject.spi.el.ELAwareBeanManager; import jakarta.faces.FacesException; import jakarta.faces.application.Application; import jakarta.faces.application.ProjectStage; @@ -357,19 +357,21 @@ public static SchemaFactory createSchemaFactory(String uri) { return factory; } - public static Class loadClass(String name, Object fallbackClass) throws ClassNotFoundException { - ClassLoader loader = Util.getCurrentLoader(fallbackClass); - - String[] primitiveNames = { "byte", "short", "int", "long", "float", "double", "boolean", "char" }; - Class[] primitiveClasses = { byte.class, short.class, int.class, long.class, float.class, double.class, boolean.class, char.class }; - for (int i = 0; i < primitiveNames.length; i++) { - if (primitiveNames[i].equals(name)) { - return primitiveClasses[i]; - } - } + public static final Map> primitiveTypes = Map.of( + "byte" , byte.class , + "short" , short.class , + "int" , int.class , + "long" , long.class , + "float" , float.class , + "double" , double.class , + "boolean" , boolean.class , + "char" , char.class + ); - return Class.forName(name, true, loader); + public static Class loadClass(String name, Object fallbackClass) throws ClassNotFoundException { + ClassLoader loader = Util.getCurrentLoader(fallbackClass); + return primitiveTypes.getOrDefault(name, Class.forName(name, true, loader)); } public static Class loadClass2(String name, Object fallbackClass) { @@ -403,11 +405,7 @@ public static ClassLoader getCurrentLoader(Object fallbackClass) { } private static ClassLoader getContextClassLoader() { - if (System.getSecurityManager() == null) { - return Thread.currentThread().getContextClassLoader(); - } else { - return (ClassLoader) java.security.AccessController.doPrivileged((PrivilegedAction) () -> Thread.currentThread().getContextClassLoader()); - } + return Thread.currentThread().getContextClassLoader(); } /** @@ -452,6 +450,17 @@ public static String removeAllButLastSlashPathSegment(String input) { return input; } + /** + * @return the filename extension or null. the method is null-safe + */ + public static String fileExtension(String filename) { + final String notBlankFilename = nullIfBlank(filename); + if ( notBlankFilename == null ) return null; + int idx = notBlankFilename.lastIndexOf('.'); + return idx == -1 ? null : notBlankFilename.substring(idx+1); + } + + public static String removeAllButNextToLastSlashPathSegment(String input) { // Trim the leading lastSlash, if any. if (input.charAt(0) == '/') { @@ -549,6 +558,23 @@ public static boolean isEmpty(String string) { return string == null || string.isEmpty(); } + /** + * Returns true if the given string is null or is blank. + * + * @param string The string to be checked. + * @return True if the given string is null or is blank. + */ + public static boolean isBlank(String string) { + return string == null || string.isBlank(); + } + + /** + * @return null if the passed String is null or blank, s otherwise + */ + public static String nullIfBlank(String s) { + return isBlank(s) ? null : s; + } + /** * Returns true if the given array is null or is empty. * @@ -586,7 +612,7 @@ public static boolean isEmpty(Object value) { } else if (value instanceof Map) { return ((Map) value).isEmpty(); } else if (value instanceof Optional) { - return !((Optional) value).isPresent(); + return ((Optional) value).isEmpty(); } else if (value.getClass().isArray()) { return Array.getLength(value) == 0; } else { @@ -814,12 +840,12 @@ public static ViewHandler getViewHandler(FacesContext context) throws FacesExcep } public static boolean componentIsDisabled(UIComponent component) { - return Boolean.valueOf(String.valueOf(component.getAttributes().get("disabled"))); + return Boolean.parseBoolean(String.valueOf(component.getAttributes().get("disabled"))); } public static boolean componentIsDisabledOrReadonly(UIComponent component) { - return Boolean.valueOf(String.valueOf(component.getAttributes().get("disabled"))) - || Boolean.valueOf(String.valueOf(component.getAttributes().get("readonly"))); + return Boolean.parseBoolean(String.valueOf(component.getAttributes().get("disabled"))) + || Boolean.parseBoolean(String.valueOf(component.getAttributes().get("readonly"))); } // W3C XML specification refers to IETF RFC 1766 for language code @@ -937,7 +963,7 @@ public static String getStackTraceString(Throwable e) { } StackTraceElement[] stacks = e.getStackTrace(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (StackTraceElement stack : stacks) { sb.append(stack.toString()).append('\n'); } @@ -977,21 +1003,6 @@ public static String getContentTypeFromResponse(Object response) { return result; } - public static FeatureDescriptor getFeatureDescriptor(String name, String displayName, String desc, boolean expert, boolean hidden, boolean preferred, - Object type, Boolean designTime) { - - FeatureDescriptor fd = new FeatureDescriptor(); - fd.setName(name); - fd.setDisplayName(displayName); - fd.setShortDescription(desc); - fd.setExpert(expert); - fd.setHidden(hidden); - fd.setPreferred(preferred); - fd.setValue(ELResolver.TYPE, type); - fd.setValue(ELResolver.RESOLVABLE_AT_DESIGN_TIME, designTime); - return fd; - } - /** *

      * A slightly more efficient version of String.split() which caches the Patterns in an LRUMap @@ -1486,25 +1497,22 @@ public Iterator getPrefixes(String namespaceURI) { * @param facesContext the Faces context to consult * @return the CDI bean manager. */ - public static BeanManager getCdiBeanManager(FacesContext facesContext) { - BeanManager result = null; + public static ELAwareBeanManager getCdiBeanManager(FacesContext facesContext) { + ELAwareBeanManager result = null; - if (facesContext != null && facesContext.getAttributes().containsKey(RIConstants.CDI_BEAN_MANAGER)) { - result = (BeanManager) facesContext.getAttributes().get(RIConstants.CDI_BEAN_MANAGER); - } else if (facesContext != null && facesContext.getExternalContext().getApplicationMap().containsKey(RIConstants.CDI_BEAN_MANAGER)) { - result = (BeanManager) facesContext.getExternalContext().getApplicationMap().get(RIConstants.CDI_BEAN_MANAGER); + if (facesContext != null && facesContext.getAttributes().containsKey(CDI_BEAN_MANAGER)) { + result = (ELAwareBeanManager) facesContext.getAttributes().get(CDI_BEAN_MANAGER); + } else if (facesContext != null && facesContext.getExternalContext().getApplicationMap().containsKey(CDI_BEAN_MANAGER)) { + result = (ELAwareBeanManager) facesContext.getExternalContext().getApplicationMap().get(CDI_BEAN_MANAGER); } else { try { - InitialContext initialContext = new InitialContext(); - result = (BeanManager) initialContext.lookup("java:comp/BeanManager"); + result = wrapIfNeeded(InitialContext.doLookup("java:comp/BeanManager")); } catch (NamingException ne) { try { - InitialContext initialContext = new InitialContext(); - result = (BeanManager) initialContext.lookup("java:comp/env/BeanManager"); + result = wrapIfNeeded(InitialContext.doLookup("java:comp/env/BeanManager")); } catch (NamingException ne2) { try { - CDI cdi = CDI.current(); - result = cdi.getBeanManager(); + result = wrapIfNeeded(CDI.current().getBeanManager()); } catch (Exception | LinkageError e) { } @@ -1513,12 +1521,12 @@ public static BeanManager getCdiBeanManager(FacesContext facesContext) { if (result == null && facesContext != null) { Map applicationMap = facesContext.getExternalContext().getApplicationMap(); - result = (BeanManager) applicationMap.get("org.jboss.weld.environment.servlet.jakarta.enterprise.inject.spi.BeanManager"); + result = wrapIfNeeded((BeanManager) applicationMap.get("org.jboss.weld.environment.servlet.jakarta.enterprise.inject.spi.BeanManager")); } if (result != null && facesContext != null) { - facesContext.getAttributes().put(RIConstants.CDI_BEAN_MANAGER, result); - facesContext.getExternalContext().getApplicationMap().put(RIConstants.CDI_BEAN_MANAGER, result); + facesContext.getAttributes().put(CDI_BEAN_MANAGER, result); + facesContext.getExternalContext().getApplicationMap().put(CDI_BEAN_MANAGER, result); } } @@ -1529,13 +1537,33 @@ public static BeanManager getCdiBeanManager(FacesContext facesContext) { return result; } + private static ELAwareBeanManager wrapIfNeeded(BeanManager beanManager) { + if (beanManager == null) { + return null; + } + + if (beanManager instanceof ELAwareBeanManager elAwareBeanManager) { + return elAwareBeanManager; + } + + return new ELAwareBeanManagerWrapper(beanManager); + } + @SuppressWarnings("unchecked") public static Stream stream(Object object) { if (object == null) { return Stream.empty(); - } else if (object instanceof Stream) { + } + else if (object instanceof Stream) { return (Stream) object; - } else if (object instanceof Iterable) { + } + else if (object instanceof Collection) { + return ((Collection)object).stream(); // little bonus with sized spliterator... + } + else if ( object instanceof Enumeration ) { // recursive call wrapping in an Iterator (Java 9+) + return stream( ((Enumeration)object).asIterator() ); + } + else if (object instanceof Iterable) { return (Stream) StreamSupport.stream(((Iterable) object).spliterator(), false); } else if (object instanceof Map) { return (Stream) ((Map) object).entrySet().stream(); diff --git a/impl/src/main/java/com/sun/faces/util/copier/CloneCopier.java b/impl/src/main/java/com/sun/faces/util/copier/CloneCopier.java index aec695515c..787b82bce3 100644 --- a/impl/src/main/java/com/sun/faces/util/copier/CloneCopier.java +++ b/impl/src/main/java/com/sun/faces/util/copier/CloneCopier.java @@ -43,7 +43,7 @@ public Object copy(Object object) { Method cloneMethod = getMethod(object, "clone"); - if (!cloneMethod.isAccessible()) { + if (!cloneMethod.canAccess(object)) { cloneMethod.setAccessible(true); } diff --git a/impl/src/main/java/com/sun/faces/util/copier/CopierUtils.java b/impl/src/main/java/com/sun/faces/util/copier/CopierUtils.java index 5ad9b01e7a..25bcd0b728 100644 --- a/impl/src/main/java/com/sun/faces/util/copier/CopierUtils.java +++ b/impl/src/main/java/com/sun/faces/util/copier/CopierUtils.java @@ -29,21 +29,14 @@ public class CopierUtils { private static final String ERROR_COPIER_NAME = "The copier name should be a Java valid simple/qualified name."; private static final String COPIER_PREFIX = "com.sun.faces.util.copier."; - private final static Set keywords; - - static { - Set s = new HashSet<>(); - String[] kws = { "abstract", "continue", "for", "new", "switch", "assert", "default", "if", "package", "synchronized", "boolean", "do", "goto", - "private", "this", "break", "double", "implements", "protected", "throw", "byte", "else", "import", "public", "throws", "case", "enum", - "instanceof", "return", "transient", "catch", "extends", "int", "short", "try", "char", "final", "interface", "static", "void", "class", - "finally", "long", "strictfp", "volatile", "const", "float", "native", "super", "while", - // literals - "null", "true", "false" }; - for (String kw : kws) { - s.add(kw); - } - keywords = Collections.unmodifiableSet(s); - } + private final static Set keywords = Set.of( + "abstract", "continue", "for", "new", "switch", "assert", "default", "if", "package", "synchronized", "boolean", "do", "goto", + "private", "this", "break", "double", "implements", "protected", "throw", "byte", "else", "import", "public", "throws", "case", "enum", + "instanceof", "return", "transient", "catch", "extends", "int", "short", "try", "char", "final", "interface", "static", "void", "class", + "finally", "long", "strictfp", "volatile", "const", "float", "native", "super", "while", + // literals + "null", "true", "false" + ); public static Copier getCopier(FacesContext context, String copierType) { Copier copier = null; diff --git a/impl/src/main/java/com/sun/faces/util/copier/CopyCtorCopier.java b/impl/src/main/java/com/sun/faces/util/copier/CopyCtorCopier.java index a4ee60b6eb..c50a57ed08 100644 --- a/impl/src/main/java/com/sun/faces/util/copier/CopyCtorCopier.java +++ b/impl/src/main/java/com/sun/faces/util/copier/CopyCtorCopier.java @@ -35,7 +35,7 @@ public class CopyCtorCopier implements Copier { public Object copy(Object object) { try { - Constructor copyConstructor = object.getClass().getConstructor(object.getClass()); + Constructor copyConstructor = object.getClass().getConstructor(object.getClass()); return copyConstructor.newInstance(object); diff --git a/impl/src/main/java/com/sun/faces/util/copier/MultiStrategyCopier.java b/impl/src/main/java/com/sun/faces/util/copier/MultiStrategyCopier.java index 82bfa27632..067b27b743 100644 --- a/impl/src/main/java/com/sun/faces/util/copier/MultiStrategyCopier.java +++ b/impl/src/main/java/com/sun/faces/util/copier/MultiStrategyCopier.java @@ -37,7 +37,7 @@ */ public class MultiStrategyCopier implements Copier { - private static final List COPIERS = asList( // Note: copier instances used here must be thread-safe! + private static final List COPIERS = List.of( // Note: copier instances used here must be thread-safe! new SerializationCopier(), new CloneCopier(), new CopyCtorCopier(), new NewInstanceCopier()); @Override diff --git a/impl/src/main/java/com/sun/faces/util/copier/NewInstanceCopier.java b/impl/src/main/java/com/sun/faces/util/copier/NewInstanceCopier.java index 684ab024e5..1c44bd6cbb 100644 --- a/impl/src/main/java/com/sun/faces/util/copier/NewInstanceCopier.java +++ b/impl/src/main/java/com/sun/faces/util/copier/NewInstanceCopier.java @@ -16,6 +16,8 @@ package com.sun.faces.util.copier; +import java.lang.reflect.InvocationTargetException; + /** * Copier that doesn't actually copy an object fully, but just returns a new instance of the same type. *

      @@ -30,8 +32,8 @@ public class NewInstanceCopier implements Copier { @Override public Object copy(Object object) { try { - return object.getClass().newInstance(); - } catch (InstantiationException | IllegalAccessException e) { + return object.getClass().getDeclaredConstructor().newInstance(); + } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) { throw new IllegalStateException(e); } } diff --git a/impl/src/main/java/com/sun/faces/vendor/WebContainerInjectionProvider.java b/impl/src/main/java/com/sun/faces/vendor/WebContainerInjectionProvider.java index aa563c211c..68e9c88951 100644 --- a/impl/src/main/java/com/sun/faces/vendor/WebContainerInjectionProvider.java +++ b/impl/src/main/java/com/sun/faces/vendor/WebContainerInjectionProvider.java @@ -47,7 +47,7 @@ public class WebContainerInjectionProvider implements InjectionProvider { private static final Logger LOGGER = FacesLogger.APPLICATION.getLogger(); - private static Map, ConcurrentHashMap, MethodHolder>> methodsPerClazz = new ConcurrentHashMap<>(); + private static final Map, ConcurrentHashMap, MethodHolder>> methodsPerClazz = new ConcurrentHashMap<>(); // ------------------------------------------ Methods from InjectionProvider @@ -74,7 +74,7 @@ public void invokePostConstruct(Object managedBean) throws InjectionProviderExce private static void invokeAnnotatedMethod(Method method, Object managedBean) throws InjectionProviderException { if (method != null) { - boolean accessible = method.isAccessible(); + boolean accessible = method.canAccess(managedBean); method.setAccessible(true); try { diff --git a/impl/src/main/java/com/sun/faces/webapp/FacesServletFactoryImpl.java b/impl/src/main/java/com/sun/faces/webapp/FacesServletFactoryImpl.java new file mode 100644 index 0000000000..e6707d019a --- /dev/null +++ b/impl/src/main/java/com/sun/faces/webapp/FacesServletFactoryImpl.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Contributors to Eclipse Foundation. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ +package com.sun.faces.webapp; + +import java.util.HashMap; + +import jakarta.faces.FacesException; +import jakarta.faces.webapp.FacesServletFactory; +import jakarta.servlet.Servlet; +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletException; + +/** + * The implementation of the FacesServletFactory. + * + * @author Manfred Riem + */ +public class FacesServletFactoryImpl extends FacesServletFactory { + + /** + * Stores the map of FacesServlet instances keyed by ServletConfig. + */ + private HashMap servlets = new HashMap<>(); + + @Override + public Servlet getFacesServlet(ServletConfig config) { + Servlet servlet = servlets.get(config); + if (servlet == null) { + servlet = new FacesServletImpl(); + try { + servlet.init(config); + } catch (ServletException e) { + throw new FacesException(e); + } + servlets.put(config, servlet); + } + return servlet; + } + + @Override + public FacesServletFactory getWrapped() { + return null; // we don't actually wrap anything + } +} diff --git a/impl/src/main/java/jakarta/faces/webapp/FacesServlet.java b/impl/src/main/java/com/sun/faces/webapp/FacesServletImpl.java similarity index 97% rename from impl/src/main/java/jakarta/faces/webapp/FacesServlet.java rename to impl/src/main/java/com/sun/faces/webapp/FacesServletImpl.java index b65f8c5e8d..1e7e495fde 100644 --- a/impl/src/main/java/jakarta/faces/webapp/FacesServlet.java +++ b/impl/src/main/java/com/sun/faces/webapp/FacesServletImpl.java @@ -15,7 +15,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package jakarta.faces.webapp; +package com.sun.faces.webapp; import static jakarta.faces.FactoryFinder.FACES_CONTEXT_FACTORY; import static jakarta.faces.FactoryFinder.LIFECYCLE_FACTORY; @@ -215,7 +215,7 @@ * */ @MultipartConfig -public final class FacesServlet implements Servlet { +public final class FacesServletImpl implements Servlet { /** *

      @@ -277,7 +277,7 @@ private enum HttpMethod { OPTIONS("OPTIONS"), GET("GET"), HEAD("HEAD"), POST("POST"), PUT("PUT"), DELETE("DELETE"), TRACE("TRACE"), CONNECT("CONNECT"); - private String name; + private final String name; HttpMethod(String name) { this.name = name; @@ -432,7 +432,7 @@ public void service(ServletRequest req, ServletResponse resp) throws IOException return; } - logIfThreadInterruped(); + logIfThreadInterrupted(); // If prefix mapped, then ensure requests for /WEB-INF are not processed. if (notProcessWebInfIfPrefixMapped(request, response)) { @@ -573,10 +573,8 @@ private void initHttpMethodValidityVerification() { logUnknownHttpMethod(httpMethod); - // prevent duplicates - if (!allowedUnknownHttpMethods.contains(httpMethod)) { - allowedUnknownHttpMethods.add(httpMethod); - } + // we use a Set to prevent duplicates + allowedUnknownHttpMethods.add(httpMethod); } else { // prevent duplicates if (!allowedKnownHttpMethodsStringList.contains(httpMethod)) { @@ -626,7 +624,7 @@ private void initializeAllowedKnownHttpMethods(List allowedKnownHttpMeth } } - private void logIfThreadInterruped() { + private void logIfThreadInterrupted() { if (Thread.currentThread().isInterrupted()) { if (LOGGER.isLoggable(FINER)) { LOGGER.log(FINE, "Thread {0} given to FacesServlet.service() in interrupted state", Thread.currentThread().getName()); @@ -660,10 +658,6 @@ private void releaseFacesInitContextIfNeeded() { if (initFacesContext != null) { initFacesContext.release(); } - // Bug 20458755: ensure the special factory is removed, so as not - // to incur an additional performance penalty at request processing - // time. - FactoryFinder.getFactory("com.sun.faces.ServletContextFacesContextFactory_Removal"); initFacesContextReleased = true; } } diff --git a/impl/src/main/java/jakarta/faces/CurrentThreadToServletContext.java b/impl/src/main/java/jakarta/faces/CurrentThreadToServletContext.java deleted file mode 100644 index 4f02188633..0000000000 --- a/impl/src/main/java/jakarta/faces/CurrentThreadToServletContext.java +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces; - -import static com.sun.faces.util.Util.coalesce; -import static com.sun.faces.util.Util.getContextClassLoader2; -import static com.sun.faces.util.Util.isAnyNull; -import static java.lang.System.currentTimeMillis; -import static java.lang.System.identityHashCode; - -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.atomic.AtomicBoolean; - -import jakarta.faces.context.ExternalContext; -import jakarta.faces.context.FacesContext; - -final class CurrentThreadToServletContext { - - // Bug 20458755: This instance provides a method to look up the current FacesContext - // that bypasses the additional check for the InitFacesContext introduced - // by the fix for 20458755 - private final ServletContextFacesContextFactory servletContextFacesContextFactory = new ServletContextFacesContextFactory(); - - ConcurrentMap factoryFinderMap = new ConcurrentHashMap<>(); - private AtomicBoolean logNullFacesContext = new AtomicBoolean(); - private AtomicBoolean logNonNullFacesContext = new AtomicBoolean(); - - // ------------------------------------------------------ Public Methods - - FactoryFinderInstance getFactoryFinder() { - return getFactoryFinder(getContextClassLoader2(), true); - } - - FactoryFinderInstance getFactoryFinder(boolean create) { - return getFactoryFinder(getContextClassLoader2(), create); - } - - private FactoryFinderInstance getFactoryFinder(ClassLoader classLoader, boolean create) { - - FacesContext facesContext = servletContextFacesContextFactory.getFacesContextWithoutServletContextLookup(); - - boolean isSpecialInitializationCase = detectSpecialInitializationCase(facesContext); - FactoryFinderCacheKey key = new FactoryFinderCacheKey(facesContext, classLoader, factoryFinderMap); - FactoryFinderInstance factoryFinder = factoryFinderMap.get(key); - FactoryFinderInstance toCopy = null; - - if (factoryFinder == null && create) { - boolean createNewFactoryFinderInstance = false; - if (isSpecialInitializationCase) { - - // We need to obtain a reference to the correct FactoryFinderInstance. - // Iterate through the data structure containing all FactoryFinderInstance instances for this VM. - boolean classLoadersMatchButContextsDoNotMatch = false; - boolean foundNoMatchInApplicationMap = true; - - for (Map.Entry cur : factoryFinderMap.entrySet()) { - FactoryFinderCacheKey curKey = cur.getKey(); - - // If the current FactoryFinderInstance is for the same ClassLoader as the current ClassLoader... - if (curKey.getClassLoader().equals(classLoader)) { - foundNoMatchInApplicationMap = false; - - // Check the other discriminator for the key: the context. - // If the context objects of the keys are both non-null and non-equal, then *do* - // create a new FactoryFinderInstance instance. - - if (!isAnyNull(key.getContext(), curKey.getContext()) && !key.getContext().equals(curKey.getContext())) { - classLoadersMatchButContextsDoNotMatch = true; - toCopy = cur.getValue(); - } else { - // Otherwise, use this FactoryFinderInstance instance. - factoryFinder = cur.getValue(); - } - - break; - } - } - - // We must create a new FactoryFinderInstance if there was no matchingKey - // at all found in the applicationMap, or a matchingKey was found - // and the matchingKey is safe to use in this web app - createNewFactoryFinderInstance = foundNoMatchInApplicationMap || factoryFinder == null && classLoadersMatchButContextsDoNotMatch; - } else { - createNewFactoryFinderInstance = true; - } - - if (createNewFactoryFinderInstance) { - FactoryFinderInstance newResult; - if (toCopy != null) { - newResult = new FactoryFinderInstance(facesContext, toCopy); - } else { - newResult = new FactoryFinderInstance(facesContext); - } - - factoryFinder = coalesce(factoryFinderMap.putIfAbsent(key, newResult), newResult); - } - } - - return factoryFinder; - } - - Object getFallbackFactory(FactoryFinderInstance brokenFactoryManager, String factoryName) { - - ClassLoader classLoader = getContextClassLoader2(); - for (Map.Entry cur : factoryFinderMap.entrySet()) { - if (cur.getKey().getClassLoader().equals(classLoader) && !cur.getValue().equals(brokenFactoryManager)) { - Object factory = cur.getValue().getFactory(factoryName); - if (factory != null) { - return factory; - } - } - } - - return null; - } - - /** - * Uses the FactoryManagerCacheKey system to find the ServletContext associated with the current ClassLoader, if any. - */ - Object getServletContextForCurrentClassLoader() { - return new FactoryFinderCacheKey(null, getContextClassLoader2(), factoryFinderMap).getContext(); - } - - /** - * This method is used to detect the following special initialization case. IF no FactoryFinderInstance can be found for - * key, AND this call to getApplicationFactoryFinderInstance() *does* have a currentKeyrent FacesContext BUT a previous - * call to getApplicationFactoryFinderInstance *did not* have a currentKeyrent FacesContext - * - * @param facesContext the currentKeyrent FacesContext for this request - * @return true if the currentKeyrent execution falls into the special initialization case. - */ - private boolean detectSpecialInitializationCase(FacesContext facesContext) { - if (facesContext == null) { - logNullFacesContext.compareAndSet(false, true); - } else { - logNonNullFacesContext.compareAndSet(false, true); - } - - return logNullFacesContext.get() && logNonNullFacesContext.get(); - } - - void removeFactoryFinder() { - ClassLoader classLoader = getContextClassLoader2(); - FactoryFinderInstance factoryFinder = getFactoryFinder(classLoader, false); - if (factoryFinder != null) { - factoryFinder.clearInjectionProvider(); - } - - FacesContext facesContext = servletContextFacesContextFactory.getFacesContextWithoutServletContextLookup(); - boolean isSpecialInitializationCase = detectSpecialInitializationCase(facesContext); - - factoryFinderMap.remove(new FactoryFinderCacheKey(facesContext, classLoader, factoryFinderMap)); - - if (isSpecialInitializationCase) { - resetSpecialInitializationCaseFlags(); - } - } - - void resetSpecialInitializationCaseFlags() { - logNullFacesContext.set(false); - logNonNullFacesContext.set(false); - } - - private static final class FactoryFinderCacheKey { - - /** - * The ClassLoader that is active the first time this key is created. At startup time, this is assumed to be the web app - * ClassLoader - */ - private ClassLoader classLoader; - - /** - * A marker that disambiguates the case when multiple web apps have the same web app ClassLoader but different - * ServletContext instances. - */ - private Long marker; - - /** - * The ServletContext corresponding to this marker/ClassLoader pair. - */ - private Object context; - - private static final String MARKER_KEY = FactoryFinder.class.getName() + "." + FactoryFinderCacheKey.class.getSimpleName(); - private static final String INIT_TIME_CL_KEY = MARKER_KEY + ".InitTimeCLKey"; - - FactoryFinderCacheKey(FacesContext facesContext, ClassLoader classLoaderIn, Map factoryMap) { - ExternalContext extContext = facesContext != null ? facesContext.getExternalContext() : null; - Object servletContext = extContext != null ? extContext.getContext() : null; - - if (isAnyNull(facesContext, extContext, servletContext)) { - initFromFactoryMap(classLoaderIn, factoryMap); - } else { - initFromApplicationMap(extContext, classLoaderIn); - } - } - - private void initFromFactoryMap(ClassLoader classLoaderIn, Map factoryFinderMap) { - - // We don't have a FacesContext. - // - // Our only recourse is to inspect the keys of the factoryFinderMap and see if any of them has a classloader - // equal to our argument classLoader - - Set keys = factoryFinderMap.keySet(); - FactoryFinderCacheKey matchingKey = null; - - if (keys.isEmpty()) { - classLoader = classLoaderIn; - marker = currentTimeMillis(); - } else { - - // For each entry in the factoryMap's keySet... - for (FactoryFinderCacheKey currentKey : keys) { - - ClassLoader matchingClassLoader = findMatchConsideringParentClassLoader(classLoaderIn, currentKey.classLoader); - - // If there is a match... - if (matchingClassLoader != null) { - // If the match was found on a previous iteration... - if (matchingKey != null) { - break; - } - matchingKey = currentKey; - classLoader = matchingClassLoader; - } - } - - if (matchingKey != null) { - marker = matchingKey.marker; - context = matchingKey.context; - } - } - } - - private ClassLoader findMatchConsideringParentClassLoader(ClassLoader argumentClassLoader, ClassLoader currentKeyCL) { - ClassLoader currentClassLoader = argumentClassLoader; - - // For each ClassLoader in the hierarchy starting with the argument ClassLoader... - while (currentClassLoader != null) { - - // If the ClassLoader at this level in the hierarchy is equal to the argument ClassLoader, - // consider it a matchingKey. - if (currentClassLoader.equals(currentKeyCL)) { - return currentClassLoader; - } else { - // If it's not a matchingKey, try the parent in the ClassLoader hierarchy. - currentClassLoader = currentClassLoader.getParent(); - } - } - - return null; - } - - private void initFromApplicationMap(ExternalContext extContext, ClassLoader classLoaderIn) { - Map applicationMap = extContext.getApplicationMap(); - - Long val = (Long) applicationMap.get(MARKER_KEY); - if (val == null) { - marker = currentTimeMillis(); - applicationMap.put(MARKER_KEY, marker); - - // If we needed to create a marker, assume that the argument CL is safe to treat as the web app - // ClassLoader. - // - // This assumption allows us to bypass the ClassLoader resolution algorithm in resolveToFirstTimeUsedClassLoader() - // in all cases except when the TCCL has been replaced. - - applicationMap.put(INIT_TIME_CL_KEY, identityHashCode(classLoaderIn)); - - } else { - marker = val; - } - - classLoader = resolveToFirstTimeUsedClassLoader(classLoaderIn, extContext); - context = extContext.getContext(); - } - - /** - * Resolve the argument ClassLoader to be the ClassLoader that was passed in to the ctor the first time a - * FactoryManagerCacheKey was created for this web app. - */ - private ClassLoader resolveToFirstTimeUsedClassLoader(ClassLoader classLoaderToResolve, ExternalContext extContext) { - ClassLoader currentClassLoader = classLoaderToResolve; - Map appMap = extContext.getApplicationMap(); - - // See if the argument currentClassLoader already is the web app class loader - Integer webAppCLHashCode = (Integer) appMap.get(INIT_TIME_CL_KEY); - boolean found = false; - if (webAppCLHashCode != null) { - int toResolveHashCode = identityHashCode(currentClassLoader); - while (!found && currentClassLoader != null) { - found = toResolveHashCode == webAppCLHashCode; - if (!found) { - currentClassLoader = currentClassLoader.getParent(); - toResolveHashCode = identityHashCode(currentClassLoader); - } - } - } - - return found ? currentClassLoader : classLoaderToResolve; - } - - ClassLoader getClassLoader() { - return classLoader; - } - - Object getContext() { - return context; - } - - @Override - public boolean equals(Object obj) { - if (obj == null) { - return false; - } - - if (getClass() != obj.getClass()) { - return false; - } - - final FactoryFinderCacheKey other = (FactoryFinderCacheKey) obj; - if (classLoader != other.classLoader && (classLoader == null || !classLoader.equals(other.classLoader))) { - return false; - } - - if (marker != other.marker && (marker == null || !marker.equals(other.marker))) { - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hash = 7; - hash = 97 * hash + (classLoader != null ? classLoader.hashCode() : 0); - return 97 * hash + (marker != null ? marker.hashCode() : 0); - } - - } - -} diff --git a/impl/src/main/java/jakarta/faces/FacesException.java b/impl/src/main/java/jakarta/faces/FacesException.java deleted file mode 100644 index 18eb7c2e1c..0000000000 --- a/impl/src/main/java/jakarta/faces/FacesException.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces; - -/** - *

      - * This class encapsulates general Jakarta Faces exceptions. - *

      - */ - -public class FacesException extends RuntimeException { - - // ----------------------------------------------------------- Constructors - - private static final long serialVersionUID = 3501800507902565991L; - - /** - *

      - * Construct a new exception with no detail message or root cause. - *

      - */ - public FacesException() { - super(); - } - - /** - *

      - * Construct a new exception with the specified detail message and no root cause. - *

      - * - * @param message The detail message for this exception - */ - public FacesException(String message) { - super(message); - } - - /** - *

      - * Construct a new exception with the specified root cause. The detail message will be set to - * (cause == null ? null : - * cause.toString() - * - * @param cause The root cause for this exception - */ - public FacesException(Throwable cause) { - super(cause == null ? null : cause.toString()); - this.cause = cause; - } - - /** - *

      - * Construct a new exception with the specified detail message and root cause. - *

      - * - * @param message The detail message for this exception - * @param cause The root cause for this exception - */ - public FacesException(String message, Throwable cause) { - super(message); - this.cause = cause; - } - - // ----------------------------------------------------- Instance Variables - - /** - *

      - * The underlying exception that caused this exception. - *

      - */ - private Throwable cause = null; - - // --------------------------------------------------------- Public Methods - - /** - *

      - * Return the cause of this exception, or null if the cause is nonexistent or unknown. - *

      - */ - @Override - public Throwable getCause() { - - return cause; - - } - -} diff --git a/impl/src/main/java/jakarta/faces/FacesWrapper.java b/impl/src/main/java/jakarta/faces/FacesWrapper.java deleted file mode 100644 index 0a9042d0a6..0000000000 --- a/impl/src/main/java/jakarta/faces/FacesWrapper.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces; - -/** - *

      - * Any wrapper class in Jakarta Faces that must provide access to the - * object it wraps must implement this interface. - *

      - * - *

      - * The expected usage of all subclasses is to provide a constructor that takes an instance of type T, which - * sets the instance variable that is returned from the {@link #getWrapped} method. - *

      - * - * @param the wrapped type. - * @since 2.0 - */ -public interface FacesWrapper { - - /** - *

      - * A class that implements this interface uses this method to return an instance of the class being wrapped. - *

      - * - * @return the wrapped instance. - * @since 2.0 - */ - T getWrapped(); - -} diff --git a/impl/src/main/java/jakarta/faces/FactoryFinder.java b/impl/src/main/java/jakarta/faces/FactoryFinder.java deleted file mode 100644 index d6e1f83163..0000000000 --- a/impl/src/main/java/jakarta/faces/FactoryFinder.java +++ /dev/null @@ -1,324 +0,0 @@ -/* - * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces; - -import static jakarta.faces.ServletContextFacesContextFactory.SERVLET_CONTEXT_FINDER_NAME; - -/** - *

      - * FactoryFinder implements the standard discovery algorithm for all factory objects - * specified in the Jakarta Faces APIs. For a given factory class name, a corresponding implementation class is - * searched for based on the following algorithm. Items are listed in order of decreasing search precedence: - *

      - * - *
        - * - *
      • - *

        - * If the Jakarta Faces configuration file bundled into the WEB-INF directory of the webapp contains - * a factory entry of the given factory class name, that factory is used. - *

        - *
      • - * - *
      • - *

        - * If the Jakarta Faces configuration files named by the jakarta.faces.CONFIG_FILES - * ServletContext init parameter contain any factory entries of the given factory class name, - * those injectionProvider are used, with the last one taking precedence. - *

        - *
      • - * - *
      • - *

        - * If there are any Jakarta Faces configuration files bundled into the META-INF directory of any - * jars on the ServletContext's resource paths, the factory entries of the given factory class - * name in those files are used, with the last one taking precedence. - *

        - *
      • - * - *
      • - *

        - * If a META-INF/services/{factory-class-name} resource is visible to the web application class loader for - * the calling application (typically as a injectionProvider of being present in the manifest of a JAR file), its first - * line is read and assumed to be the name of the factory implementation class to use. - *

        - *
      • - * - *
      • - *

        - * If none of the above steps yield a match, the Jakarta Faces implementation specific class is used. - *

        - *
      • - * - *
      - * - *

      - * If any of the injectionProvider found on any of the steps above happen to have a one-argument constructor, with - * argument the type being the abstract factory class, that constructor is invoked, and the previous match is passed to - * the constructor. For example, say the container vendor provided an implementation of - * {@link jakarta.faces.context.FacesContextFactory}, and identified it in - * META-INF/services/jakarta.faces.context.FacesContextFactory in a jar on the webapp ClassLoader. Also say - * this implementation provided by the container vendor had a one argument constructor that took a - * FacesContextFactory instance. The FactoryFinder system would call that one-argument - * constructor, passing the implementation of FacesContextFactory provided by the Jakarta Faces - * implementation. - *

      - * - *

      - * If a Factory implementation does not provide a proper one-argument constructor, it must provide a zero-arguments - * constructor in order to be successfully instantiated. - *

      - * - *

      - * Once the name of the factory implementation class is located, the web application class loader for the calling - * application is requested to load this class, and a corresponding instance of the class will be created. A side effect - * of this rule is that each web application will receive its own instance of each factory class, whether the Jakarta - * Server Faces implementation is included within the web application or is made visible through the container's - * facilities for shared libraries. - *

      - */ -public final class FactoryFinder { - - // ----------------------------------------------------------- Constructors - - /** - * Package-private constructor to disable instantiation of this class. - */ - FactoryFinder() { - } - - // ----------------------------------------------------- Manifest Constants - - /** - *

      - * The property name for the {@link jakarta.faces.application.ApplicationFactory} class name. - *

      - */ - public final static String APPLICATION_FACTORY = "jakarta.faces.application.ApplicationFactory"; - - /** - *

      - * The property name for the {@link jakarta.faces.lifecycle.ClientWindowFactory} class name. - *

      - * - * @since 2.2 - */ - public final static String CLIENT_WINDOW_FACTORY = "jakarta.faces.lifecycle.ClientWindowFactory"; - - /** - *

      - * The property name for the {@link jakarta.faces.context.ExceptionHandlerFactory} class name. - *

      - */ - public final static String EXCEPTION_HANDLER_FACTORY = "jakarta.faces.context.ExceptionHandlerFactory"; - - /** - *

      - * The property name for the {@link jakarta.faces.context.ExternalContextFactory} class name. - *

      - */ - public final static String EXTERNAL_CONTEXT_FACTORY = "jakarta.faces.context.ExternalContextFactory"; - - /** - *

      - * The property name for the {@link jakarta.faces.context.FacesContextFactory} class name. - *

      - */ - public final static String FACES_CONTEXT_FACTORY = "jakarta.faces.context.FacesContextFactory"; - - /** - *

      - * The property name for the {@link jakarta.faces.view.facelets.FaceletCacheFactory} class name. - *

      - * - * @since 2.1 - */ - public final static String FACELET_CACHE_FACTORY = "jakarta.faces.view.facelets.FaceletCacheFactory"; - - /** - *

      - * The property name for the {@link jakarta.faces.context.FlashFactory} class name. - *

      - * - * @since 2.2 - */ - public final static String FLASH_FACTORY = "jakarta.faces.context.FlashFactory"; - - /** - *

      - * The property name for the {@link jakarta.faces.flow.FlowHandlerFactory} class name. - *

      - * - * @since 2.2 - */ - public final static String FLOW_HANDLER_FACTORY = "jakarta.faces.flow.FlowHandlerFactory"; - - /** - *

      - * The property name for the {@link jakarta.faces.context.PartialViewContextFactory} class name. - *

      - */ - public final static String PARTIAL_VIEW_CONTEXT_FACTORY = "jakarta.faces.context.PartialViewContextFactory"; - - /** - *

      - * The property name for the {@link jakarta.faces.component.visit.VisitContextFactory} class name. - *

      - */ - public final static String VISIT_CONTEXT_FACTORY = "jakarta.faces.component.visit.VisitContextFactory"; - - /** - *

      - * The property name for the {@link jakarta.faces.lifecycle.LifecycleFactory} class name. - *

      - */ - public final static String LIFECYCLE_FACTORY = "jakarta.faces.lifecycle.LifecycleFactory"; - - /** - *

      - * The property name for the {@link jakarta.faces.render.RenderKitFactory} class name. - *

      - */ - public final static String RENDER_KIT_FACTORY = "jakarta.faces.render.RenderKitFactory"; - - /** - *

      - * The property name for the {@link jakarta.faces.view.ViewDeclarationLanguage} class name. - *

      - */ - public final static String VIEW_DECLARATION_LANGUAGE_FACTORY = "jakarta.faces.view.ViewDeclarationLanguageFactory"; - - /** - *

      - * The property name for the {@link jakarta.faces.view.facelets.TagHandlerDelegate} class name. - *

      - */ - public final static String TAG_HANDLER_DELEGATE_FACTORY = "jakarta.faces.view.facelets.TagHandlerDelegateFactory"; - - /** - *

      - * The property name for the {@link jakarta.faces.component.search.SearchExpressionContext} class name. - *

      - */ - public static final String SEARCH_EXPRESSION_CONTEXT_FACTORY = "jakarta.faces.component.search.SearchExpressionContextFactory"; - - // ------------------------------------------------------- Static Variables - - static final CurrentThreadToServletContext FACTORIES_CACHE = new CurrentThreadToServletContext(); - - // --------------------------------------------------------- Public Methods - - /** - *

      - * Create (if necessary) and return a per-web-application instance of the - * appropriate implementation class for the specified Jakarta Faces factory class, based on the discovery - * algorithm described in the class description. - *

      - * - *

      - * The standard injectionProvider and wrappers in Jakarta Faces all implement the interface {@link FacesWrapper}. - * If the returned Object is an implementation of one of the standard injectionProvider, it must be legal - * to cast it to an instance of FacesWrapper and call {@link FacesWrapper#getWrapped} on the instance. - *

      - * - * @param factoryName Fully qualified name of the Jakarta Faces factory for which an implementation instance is - * requested - * @throws FacesException if the web application class loader cannot be identified - * @throws FacesException if an instance of the configured factory implementation class cannot be loaded - * @throws FacesException if an instance of the configured factory implementation class cannot be instantiated - * @throws IllegalArgumentException if factoryName does not identify a standard Jakarta Faces - * factory name - * @throws IllegalStateException if there is no configured factory implementation class for the specified factory name - * @throws NullPointerException if factoryname is null - * - * @return the found factory instance - */ - public static Object getFactory(String factoryName) throws FacesException { - FactoryFinderInstance factoryFinder; - - // Bug 20458755: If the factory being requested is the special - // SERVLET_CONTEXT_FINDER, do not lazily create the FactoryFinderInstance. - if (SERVLET_CONTEXT_FINDER_NAME.equals(factoryName)) { - factoryFinder = FACTORIES_CACHE.getFactoryFinder(false); - } else { - factoryFinder = FACTORIES_CACHE.getFactoryFinder(); - } - - if (factoryFinder != null) { - return factoryFinder.getFactory(factoryName); - } - - return null; - } - - /** - *

      - * This method will store the argument factoryName/implName mapping in such a way that {@link #getFactory} - * will find this mapping when searching for a match. - *

      - * - *

      - * This method has no effect if getFactory() has already been called looking for a factory for this - * factoryName. - *

      - * - *

      - * This method can be used by implementations to store a factory mapping while parsing the Faces configuration file - *

      - * - * @param factoryName the name to be used in a subsequent call to {@link #getFactory}. - * - * @param implName the fully qualified class name of the factory corresponding to {@code factoryName}. - * - * @throws IllegalArgumentException if factoryName does not identify a standard Jakarta Faces - * factory name - * @throws NullPointerException if factoryname is null - */ - public static void setFactory(String factoryName, String implName) { - FACTORIES_CACHE.getFactoryFinder().addFactory(factoryName, implName); - } - - /** - *

      - * Release any references to factory instances associated with the class - * loader for the calling web application. This method must be called during of web - * application shutdown. - *

      - * - * @throws FacesException if the web application class loader cannot be identified - */ - public static void releaseFactories() throws FacesException { - synchronized (FACTORIES_CACHE) { - - if (!FACTORIES_CACHE.factoryFinderMap.isEmpty()) { - FACTORIES_CACHE.getFactoryFinder().releaseFactories(); - } - - FACTORIES_CACHE.removeFactoryFinder(); - } - } - - // -------------------------------------------------------- Private Methods - - // Called via reflection from automated tests. - @SuppressWarnings("unused") - private static void reInitializeFactoryManager() { - FACTORIES_CACHE.resetSpecialInitializationCaseFlags(); - } - -} diff --git a/impl/src/main/java/jakarta/faces/FactoryFinderInstance.java b/impl/src/main/java/jakarta/faces/FactoryFinderInstance.java deleted file mode 100644 index e2f633ee6c..0000000000 --- a/impl/src/main/java/jakarta/faces/FactoryFinderInstance.java +++ /dev/null @@ -1,546 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces; - -import static com.sun.faces.util.Util.generateCreatedBy; -import static com.sun.faces.util.Util.getContextClassLoader2; -import static com.sun.faces.util.Util.isAnyNull; -import static com.sun.faces.util.Util.isOneOf; -import static jakarta.faces.FactoryFinder.APPLICATION_FACTORY; -import static jakarta.faces.FactoryFinder.CLIENT_WINDOW_FACTORY; -import static jakarta.faces.FactoryFinder.EXCEPTION_HANDLER_FACTORY; -import static jakarta.faces.FactoryFinder.EXTERNAL_CONTEXT_FACTORY; -import static jakarta.faces.FactoryFinder.FACELET_CACHE_FACTORY; -import static jakarta.faces.FactoryFinder.FACES_CONTEXT_FACTORY; -import static jakarta.faces.FactoryFinder.FACTORIES_CACHE; -import static jakarta.faces.FactoryFinder.FLASH_FACTORY; -import static jakarta.faces.FactoryFinder.FLOW_HANDLER_FACTORY; -import static jakarta.faces.FactoryFinder.LIFECYCLE_FACTORY; -import static jakarta.faces.FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY; -import static jakarta.faces.FactoryFinder.RENDER_KIT_FACTORY; -import static jakarta.faces.FactoryFinder.SEARCH_EXPRESSION_CONTEXT_FACTORY; -import static jakarta.faces.FactoryFinder.TAG_HANDLER_DELEGATE_FACTORY; -import static jakarta.faces.FactoryFinder.VIEW_DECLARATION_LANGUAGE_FACTORY; -import static jakarta.faces.FactoryFinder.VISIT_CONTEXT_FACTORY; -import static jakarta.faces.ServletContextFacesContextFactory.SERVLET_CONTEXT_FINDER_NAME; -import static jakarta.faces.ServletContextFacesContextFactory.SERVLET_CONTEXT_FINDER_REMOVAL_NAME; -import static java.text.MessageFormat.format; -import static java.util.Collections.binarySearch; -import static java.util.Collections.unmodifiableMap; -import static java.util.logging.Level.SEVERE; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.UnsupportedEncodingException; -import java.lang.reflect.InvocationTargetException; -import java.net.URL; -import java.net.URLConnection; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.locks.ReentrantReadWriteLock; -import java.util.logging.Logger; - -import com.sun.faces.config.ConfigManager; -import com.sun.faces.spi.InjectionProvider; - -import jakarta.faces.context.FacesContext; - -final class FactoryFinderInstance { - - private static final Logger LOGGER = Logger.getLogger("jakarta.faces", "jakarta.faces.LogStrings"); - - private static final String INJECTION_PROVIDER_KEY = FactoryFinder.class.getPackage().getName() + "INJECTION_PROVIDER_KEY"; - - private final Map factories = new ConcurrentHashMap<>(); - private final Map> savedFactoryNames = new ConcurrentHashMap<>(); - private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true); - private final String createdBy; - - private ServletContextFacesContextFactory servletContextFinder = new ServletContextFacesContextFactory(); - - /** - *

      - * The set of Jakarta Faces factory classes for which the factory discovery mechanism is supported. The entries - * in this list must be alphabetically ordered according to the entire string of the *value* of each of the literals, - * not just the last part of the literal! - *

      - */ - private final List factoryNames = asSortedList(APPLICATION_FACTORY, VISIT_CONTEXT_FACTORY, EXCEPTION_HANDLER_FACTORY, EXTERNAL_CONTEXT_FACTORY, - FACES_CONTEXT_FACTORY, FLASH_FACTORY, FLOW_HANDLER_FACTORY, PARTIAL_VIEW_CONTEXT_FACTORY, CLIENT_WINDOW_FACTORY, LIFECYCLE_FACTORY, - RENDER_KIT_FACTORY, VIEW_DECLARATION_LANGUAGE_FACTORY, FACELET_CACHE_FACTORY, TAG_HANDLER_DELEGATE_FACTORY, SEARCH_EXPRESSION_CONTEXT_FACTORY); - - /** - *

      - * Map of Class instances for our factory names. - *

      - */ - private final Map> factoryClasses = buildFactoryClassesMap(); - - // -------------------------------------------------------- Constructors - - FactoryFinderInstance(FacesContext facesContext) { - for (String name : factoryNames) { - factories.put(name, new ArrayList<>(4)); // NOPMD - } - copyInjectionProviderFromFacesContext(facesContext); - createdBy = generateCreatedBy(facesContext); - } - - FactoryFinderInstance(FacesContext facesContext, FactoryFinderInstance toCopy) { - factories.putAll(toCopy.savedFactoryNames); - copyInjectionProviderFromFacesContext(facesContext); - createdBy = generateCreatedBy(facesContext); - } - - @Override - public String toString() { - return super.toString() + " created by" + createdBy; - } - - // ------------------------------------------------------ Package Private Methods - - void addFactory(String factoryName, String implementationClassName) { - validateFactoryName(factoryName); - - Object result = factories.get(factoryName); - lock.writeLock().lock(); - try { - if (result instanceof List) { - TypedCollections.dynamicallyCastList((List) result, String.class).add(0, implementationClassName); - } - } finally { - lock.writeLock().unlock(); - } - } - - @SuppressWarnings("unchecked") - Object getFactory(String factoryName) { - validateFactoryName(factoryName); - - if (factoryName.equals(SERVLET_CONTEXT_FINDER_NAME)) { - return servletContextFinder; - } - - if (factoryName.equals(SERVLET_CONTEXT_FINDER_REMOVAL_NAME)) { - try { - lock.writeLock().lock(); - servletContextFinder = null; - return null; - } finally { - lock.writeLock().unlock(); - } - } - - Object factoryOrList; - lock.readLock().lock(); - try { - factoryOrList = factories.get(factoryName); - if (!(factoryOrList instanceof List)) { - return factoryOrList; - } - } finally { - lock.readLock().unlock(); - } - - // Factory hasn't been constructed - lock.writeLock().lock(); - try { - - // Double check the current value. Another thread - // may have completed the initialization by the time - // this thread entered this block - factoryOrList = factories.get(factoryName); - if (!(factoryOrList instanceof List)) { - return factoryOrList; - } - - savedFactoryNames.put(factoryName, new ArrayList<>((List) factoryOrList)); - - Object factory = getImplementationInstance(getContextClassLoader2(), factoryName, (List) factoryOrList); - - if (factory == null) { - logNoFactory(factoryName); - - factory = FACTORIES_CACHE.getFallbackFactory(this, factoryName); - - notNullFactory(factoryName, factory); - } - - // Record and return the new instance - factories.put(factoryName, factory); - - return factory; - } finally { - lock.writeLock().unlock(); - } - } - - InjectionProvider getInjectionProvider() { - return (InjectionProvider) factories.get(INJECTION_PROVIDER_KEY); - } - - void clearInjectionProvider() { - factories.remove(INJECTION_PROVIDER_KEY); - } - - void releaseFactories() { - InjectionProvider provider = getInjectionProvider(); - - if (provider != null) { - lock.writeLock().lock(); - try { - for (Entry entry : factories.entrySet()) { - Object curFactory = entry.getValue(); - - // If the current entry is not the injectionProvider itself - // and the current entry has a non-null value - // and the value is not a string... - if (!INJECTION_PROVIDER_KEY.equals(entry.getKey()) && curFactory != null && !(curFactory instanceof String)) { - try { - provider.invokePreDestroy(curFactory); - } catch (Exception ex) { - logPreDestroyFail(entry.getValue(), ex); - } - } - } - } finally { - factories.clear(); - lock.writeLock().unlock(); - } - - } else { - LOGGER.log(SEVERE, - "Unable to call @PreDestroy annotated methods because no InjectionProvider can be found. Does this container implement the Mojarra Injection SPI?"); - } - } - - Collection getFactories() { - return factories.values(); - } - - // -------------------------------------------------------- Private methods - - private void copyInjectionProviderFromFacesContext(FacesContext facesContext) { - InjectionProvider injectionProvider = null; - if (facesContext != null) { - injectionProvider = (InjectionProvider) facesContext.getAttributes().get(ConfigManager.INJECTION_PROVIDER_KEY); - } - - if (injectionProvider != null) { - factories.put(INJECTION_PROVIDER_KEY, injectionProvider); - } else { - LOGGER.log(SEVERE, "Unable to obtain InjectionProvider from init time FacesContext. Does this container implement the Mojarra Injection SPI?"); - } - } - - /** - *

      - * Load and return an instance of the specified implementation class using the following algorithm. - *

      - * - *
        - * - *
      1. - *

        - * If the argument implementations list has more than one element, or exactly one element, interpret the - * last element in the list to be the fully qualified class name of a class implementing factoryName. - * Instantiate that class and save it for return. If the implementations list has only one element, skip - * this step. - *

        - *
      2. - * - *
      3. - *

        - * Look for a resource called /META-INF/services/<factoryName>. If found, interpret it as a - * properties file, and read out the first entry. Interpret the first entry as a fully qualify class name of a class - * that implements factoryName. If we have an instantiated factory from the previous step and the - * implementing class has a one arg constructor of the type for factoryName, instantiate it, passing the - * instantiated factory from the previous step. If there is no one arg constructor, just instantiate the zero arg - * constructor. Save the newly instantiated factory for return, replacing the instantiated factory from the previous - * step. - *

        - *
      4. - * - *
      5. - *

        - * Treat each remaining element in the implementations list as a fully qualified class name of a class - * implementing factoryName. If the currentKeyrent element has a one arg constructor of the type for - * factoryName, instantiate it, passing the instantiated factory from the previous or step iteration. If - * there is no one arg constructor, just instantiate the zero arg constructor, replacing the instantiated factory from - * the previous step or iteration. - *

        - *
      6. - * - *
      7. - *

        - * Return the saved factory - *

        - *
      8. - * - *
      - * - * @param classLoader Class loader for the web application that will be loading the implementation class - * @param implementations A List of implementations for a given factory class. - * @throws FacesException if the specified implementation class cannot be loaded - * @throws FacesException if an instance of the specified implementation class cannot be instantiated - */ - private Object getImplementationInstance(ClassLoader classLoader, String factoryName, List implementations) throws FacesException { - - Object implementation = null; - String curImplClass; - int len; - - // step 1. - if (implementations != null && (1 < (len = implementations.size()) || 1 == len)) { - curImplClass = implementations.remove(len - 1); - // since this is the hard coded implementation default, - // there is no preceding implementation, so don't bother - // with a non-zero-argument ctor. - implementation = getImplGivenPreviousImpl(classLoader, factoryName, curImplClass, null); - } - - // step 2. - List fromServices = getImplNameFromServices(classLoader, factoryName); - if (fromServices != null) { - for (String name : fromServices) { - implementation = getImplGivenPreviousImpl(classLoader, factoryName, name, implementation); - } - } - - // step 3. - if (implementations != null) { - for (len = implementations.size() - 1; 0 <= len; len--) { - curImplClass = implementations.remove(len); - implementation = getImplGivenPreviousImpl(classLoader, factoryName, curImplClass, implementation); - } - } - - return implementation; - } - - /** - *

      - * Perform the logic to get the implementation class for the second step of - * {@link FactoryFinder#getImplementationInstance(ClassLoader, String, java.util.List)}. - *

      - */ - private List getImplNameFromServices(ClassLoader classLoader, String factoryName) { - - // Check for a services definition - List implementationNames = new ArrayList<>(); - String resourceName = "META-INF/services/" + factoryName; - - try { - Enumeration resources = classLoader.getResources(resourceName); - while (resources.hasMoreElements()) { - URL url = resources.nextElement(); - URLConnection connection = url.openConnection(); - connection.setUseCaches(false); - - try (InputStream stream = connection.getInputStream()) { - if (stream != null) { - implementationNames.add(readLineFromStream(stream)); - } - } - } - } catch (IOException | SecurityException e) { - if (LOGGER.isLoggable(SEVERE)) { - LOGGER.log(SEVERE, e.toString(), e); - } - } - - return implementationNames; - } - - /** - *

      - * Implement the decorator pattern for the factory implementation. - *

      - * - *

      - * If previousImpl is non-null and the class named by the argument implName has a - * one arg contstructor of type factoryName, instantiate it, passing previousImpl to the constructor. - *

      - * - *

      - * Otherwise, we just instantiate and return implName. - *

      - * - * @param classLoader the ClassLoader from which to load the class - * @param factoryName the fully qualified class name of the factory. - * @param factoryImplClassName the fully qualified class name of a class that implements the factory. - * @param previousFactoryImplementation if non-null, the factory instance to be passed to the constructor - * of the new factory. - */ - private Object getImplGivenPreviousImpl(ClassLoader classLoader, String factoryName, String factoryImplClassName, Object previousFactoryImplementation) { - - Object factoryImplementation = null; - - Class factoryClass = getFactoryClass(factoryName); - - if (!isAnyNull(previousFactoryImplementation, factoryClass)) { - - // We have a previous factory implementation AND the appropriate one argument ctor. - - try { - factoryImplementation = Class.forName(factoryImplClassName, false, classLoader).getConstructor(factoryClass) - .newInstance(previousFactoryImplementation); - - } catch (NoSuchMethodException nsme) { - // fall through to "zero-arg-ctor" case - factoryClass = null; - } catch (ClassNotFoundException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException - | InvocationTargetException e) { - throw new FacesException(factoryImplClassName, e); - } - } - - if (isAnyNull(previousFactoryImplementation, factoryClass)) { - - // We have either no previous factory implementation or no appropriate one argument ctor. - - try { - - // Since this is the hard coded implementation default, there is no preceding implementation, - // so don't bother with a non-zero-argument ctor. - - factoryImplementation = Class.forName(factoryImplClassName, false, classLoader).getDeclaredConstructor() - .newInstance(); - - } catch (IllegalArgumentException | ReflectiveOperationException | SecurityException e) { - throw new FacesException(factoryImplClassName, e); - } - } - - injectImplementation(factoryImplClassName, factoryImplementation); - - return factoryImplementation; - } - - /** - * @return the java.lang.Class for the argument factory. - */ - private Class getFactoryClass(String factoryClassName) { - return factoryClasses.get(factoryClassName); - } - - private String readLineFromStream(InputStream stream) throws IOException { - // Deal with systems whose native encoding is possibly - // different from the way that the services entry was created - try (BufferedReader reader = new BufferedReader(new InputStreamReader(stream, "UTF-8"))) { - return reader.readLine(); - } catch (UnsupportedEncodingException uee) { - // The DM_DEFAULT_ENCODING warning is acceptable here - // because we explicitly *want* to use the Java runtime's - // default encoding. - try (BufferedReader reader = new BufferedReader(new InputStreamReader(stream))) { - return reader.readLine(); - } - } - } - - private void injectImplementation(String implementationName, Object implementation) { - if (implementation != null) { - InjectionProvider provider = getInjectionProvider(); - if (provider != null) { - try { - provider.inject(implementation); - provider.invokePostConstruct(implementation); - } catch (Exception e) { - throw new FacesException(implementationName, e); - } - } else { - LOGGER.log(SEVERE, "Unable to inject {0} because no InjectionProvider can be found. Does this container implement the Mojarra Injection SPI?", - implementation); - } - } - } - - private void logNoFactory(String factoryName) { - if (LOGGER.isLoggable(SEVERE)) { - LOGGER.log(SEVERE, format(LOGGER.getResourceBundle().getString("severe.no_factory"), factoryName)); - } - } - - private void logPreDestroyFail(Object factory, Exception ex) { - if (LOGGER.isLoggable(SEVERE)) { - LOGGER.log(SEVERE, format("Unable to invoke @PreDestroy annotated methods on {0}.", factory), ex); - } - } - - private void notNullFactory(String factoryName, Object factory) { - if (factory == null) { - throw new IllegalStateException(format(LOGGER.getResourceBundle().getString("severe.no_factory_backup_failed"), factoryName)); - } - } - - private void validateFactoryName(String factoryName) { - - if (factoryName == null) { - throw new NullPointerException(); - } - - if (isOneOf(factoryName, SERVLET_CONTEXT_FINDER_NAME, SERVLET_CONTEXT_FINDER_REMOVAL_NAME)) { - return; - } - - if (binarySearch(factoryNames, factoryName) < 0) { - throw new IllegalArgumentException(factoryName); - } - } - - private Map> buildFactoryClassesMap() { - Map> buildUpFactoryClasses; - - buildUpFactoryClasses = new HashMap<>(); - buildUpFactoryClasses.put(APPLICATION_FACTORY, jakarta.faces.application.ApplicationFactory.class); - buildUpFactoryClasses.put(VISIT_CONTEXT_FACTORY, jakarta.faces.component.visit.VisitContextFactory.class); - buildUpFactoryClasses.put(EXCEPTION_HANDLER_FACTORY, jakarta.faces.context.ExceptionHandlerFactory.class); - buildUpFactoryClasses.put(EXTERNAL_CONTEXT_FACTORY, jakarta.faces.context.ExternalContextFactory.class); - buildUpFactoryClasses.put(FACES_CONTEXT_FACTORY, jakarta.faces.context.FacesContextFactory.class); - buildUpFactoryClasses.put(FLASH_FACTORY, jakarta.faces.context.FlashFactory.class); - buildUpFactoryClasses.put(PARTIAL_VIEW_CONTEXT_FACTORY, jakarta.faces.context.PartialViewContextFactory.class); - buildUpFactoryClasses.put(LIFECYCLE_FACTORY, jakarta.faces.lifecycle.LifecycleFactory.class); - buildUpFactoryClasses.put(CLIENT_WINDOW_FACTORY, jakarta.faces.lifecycle.ClientWindowFactory.class); - buildUpFactoryClasses.put(RENDER_KIT_FACTORY, jakarta.faces.render.RenderKitFactory.class); - buildUpFactoryClasses.put(VIEW_DECLARATION_LANGUAGE_FACTORY, jakarta.faces.view.ViewDeclarationLanguageFactory.class); - buildUpFactoryClasses.put(FACELET_CACHE_FACTORY, jakarta.faces.view.facelets.FaceletCacheFactory.class); - buildUpFactoryClasses.put(TAG_HANDLER_DELEGATE_FACTORY, jakarta.faces.view.facelets.TagHandlerDelegateFactory.class); - buildUpFactoryClasses.put(FLOW_HANDLER_FACTORY, jakarta.faces.flow.FlowHandlerFactory.class); - buildUpFactoryClasses.put(SEARCH_EXPRESSION_CONTEXT_FACTORY, jakarta.faces.component.search.SearchExpressionContextFactory.class); - - return unmodifiableMap(buildUpFactoryClasses); - } - - private List asSortedList(String... names) { - List list = Arrays.asList(names); - Collections.sort(list); - - return list; - } - -} diff --git a/impl/src/main/java/jakarta/faces/ServletContextFacesContextFactory.java b/impl/src/main/java/jakarta/faces/ServletContextFacesContextFactory.java deleted file mode 100644 index d433ff617a..0000000000 --- a/impl/src/main/java/jakarta/faces/ServletContextFacesContextFactory.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces; - -import java.lang.reflect.Field; -import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Level; -import java.util.logging.Logger; - -import jakarta.faces.context.FacesContext; -import jakarta.faces.context.FacesContextFactory; -import jakarta.faces.lifecycle.Lifecycle; -import jakarta.servlet.ServletContext; - -/* - * Bug 20458755 - - * This class provides a utility method to look up the current FacesContext - * without performing the additional check introduced in FacesContext.getCurrentInstance() - * by this bug fix. - - * This class also is a FacesContextFactory implementation that ignores - * all arguments and is able to look up the FacesContext corresponding - * to the ServletContext corresponding to the current Thread context ClassLoader. - - * This FacesContextFactory implementation is used by FacesContext.getCurrentInstance() - * so that the init FacesContext can be correctly looked up regardless of - * thread re-use. - */ -final class ServletContextFacesContextFactory extends FacesContextFactory { - - static final String SERVLET_CONTEXT_FINDER_NAME = "com.sun.faces.ServletContextFacesContextFactory"; - static final String SERVLET_CONTEXT_FINDER_REMOVAL_NAME = "com.sun.faces.ServletContextFacesContextFactory_Removal"; - - private static final Logger LOGGER = Logger.getLogger("jakarta.faces", "jakarta.faces.LogStrings"); - - private ThreadLocal facesContextCurrentInstance; - private ConcurrentHashMap facesContextThreadInitContextMap; - private ConcurrentHashMap initContextServletContextMap; - - @SuppressWarnings("unchecked") - ServletContextFacesContextFactory() { - try { - Field instanceField = FacesContext.class.getDeclaredField("instance"); - instanceField.setAccessible(true); - facesContextCurrentInstance = (ThreadLocal) instanceField.get(null); - - Field threadInitContextMapField = FacesContext.class.getDeclaredField("threadInitContext"); - threadInitContextMapField.setAccessible(true); - facesContextThreadInitContextMap = (ConcurrentHashMap) threadInitContextMapField.get(null); - - Field initContextServletContextMapField = FacesContext.class.getDeclaredField("initContextServletContext"); - initContextServletContextMapField.setAccessible(true); - initContextServletContextMap = (ConcurrentHashMap) initContextServletContextMapField.get(null); - - } catch (IllegalAccessException | IllegalArgumentException | NoSuchFieldException | SecurityException ex) { - if (LOGGER.isLoggable(Level.SEVERE)) { - LOGGER.log(Level.SEVERE, "Unable to access instance field of FacesContext", ex); - } - } - } - - /** - * This method does what FacesContext.getCurrentInstance() did *before* the fix for Bug 20458755. - */ - FacesContext getFacesContextWithoutServletContextLookup() { - FacesContext result = facesContextCurrentInstance.get(); - - if (result == null) { - if (facesContextThreadInitContextMap != null) { - result = facesContextThreadInitContextMap.get(Thread.currentThread()); - } - } - - return result; - } - - /** - * Consult the initContextServletContextMap (reflectively obtained from the FacesContext in our ctor). If it is - * non-empty, obtain the ServletContext corresponding to the current Thread's context ClassLoader. If found, use the - * initContextServletContextMap to find the FacesContext corresponding to that ServletContext. - */ - @Override - public FacesContext getFacesContext(Object context, Object request, Object response, Lifecycle lifecycle) throws FacesException { - FacesContext result = null; - - if (initContextServletContextMap != null && !initContextServletContextMap.isEmpty()) { - - // Obtain the ServletContext corresponding to the current Thread's context ClassLoader - ServletContext servletContext = (ServletContext) FactoryFinder.FACTORIES_CACHE.getServletContextForCurrentClassLoader(); - - if (servletContext != null) { - - // ServletContext found. Use the initContextServletContextMap to find the FacesContext corresponding - // to this ServletContext. - - for (Entry entry : initContextServletContextMap.entrySet()) { - if (servletContext.equals(entry.getValue())) { - result = entry.getKey(); - break; - } - } - } - } - - return result; - } - -} diff --git a/impl/src/main/java/jakarta/faces/TypedCollections.java b/impl/src/main/java/jakarta/faces/TypedCollections.java deleted file mode 100644 index c99f3e3dbc..0000000000 --- a/impl/src/main/java/jakarta/faces/TypedCollections.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces; - -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.Set; - -class TypedCollections { - - /** - * Dynamically check that the members of the collection are all instances of the given type (or null). - */ - private static boolean checkCollectionMembers(Collection c, Class type) { - for (Object element : c) { - if (element != null && !type.isInstance(element)) { - return false; - } - } - return true; - } - - /** - * Dynamically check that the members of the collection are all instances of the given type (or null), and that the - * collection itself is of the given collection type. - * - * @param the collection's element type - * @param c the collection to cast - * @param type the class of the collection's element type. - * @return the dynamically-type checked collection. - * @throws java.lang.ClassCastException - */ - static > TypedC dynamicallyCastCollection(Collection c, Class type, Class collectionType) { - if (c == null) { - return null; - } - - if (!collectionType.isInstance(c)) { - throw new ClassCastException(c.getClass().getName()); - } - - assert checkCollectionMembers(c, type) : "The collection contains members with a type other than " + type.getName(); - - return collectionType.cast(c); - } - - /** - * Dynamically check that the members of the list are all instances of the given type (or null). - * - * @param the list's element type - * @param list the list to cast - * @param type the class of the list's element type. - * @return the dynamically-type checked list. - * @throws java.lang.ClassCastException - */ - @SuppressWarnings("unchecked") - static List dynamicallyCastList(List list, Class type) { - return dynamicallyCastCollection(list, type, List.class); - } - - /** - * Dynamically check that the members of the set are all instances of the given type (or null). - * - * @param the set's element type - * @param set the set to cast - * @param type the class of the set's element type. - * @return the dynamically-type checked set. - * @throws java.lang.ClassCastException - */ - @SuppressWarnings("unchecked") - static Set dynamicallyCastSet(Set set, Class type) { - return dynamicallyCastCollection(set, type, Set.class); - } - - /** - * Dynamically check that the keys and values in the map are all instances of the correct types (or null). - * - * @param the map's key type - * @param the map's value type - * @param map the map to cast - * @param keyType the class of the map's key type. - * @param valueType the class of the map's value type. - * @return the dynamically-type checked map. - * @throws java.lang.ClassCastException - */ - @SuppressWarnings("unchecked") - static Map dynamicallyCastMap(Map map, Class keyType, Class valueType) { - if (map == null) { - return null; - } - assert checkCollectionMembers(map.keySet(), keyType) : "The map contains keys with a type other than " + keyType.getName(); - assert checkCollectionMembers(map.values(), valueType) : "The map contains values with a type other than " + valueType.getName(); - - return (Map) map; - } -} diff --git a/impl/src/main/java/jakarta/faces/annotation/ApplicationMap.java b/impl/src/main/java/jakarta/faces/annotation/ApplicationMap.java deleted file mode 100644 index 753da6d89f..0000000000 --- a/impl/src/main/java/jakarta/faces/annotation/ApplicationMap.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.annotation; - -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PARAMETER; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.enterprise.util.AnnotationLiteral; -import jakarta.inject.Qualifier; - -/** - *

      - * The presence of this annotation (along with {@code @Inject}) on a field of type Map<String, - * Object> causes the map returned from {@link jakarta.faces.context.ExternalContext#getApplicationMap} to be - * injected as the value of that field. - *

      - */ - -@Target({ TYPE, METHOD, PARAMETER, FIELD }) -@Qualifier -@Retention(value = RUNTIME) -public @interface ApplicationMap { - - /** - *

      - * Supports inline instantiation of the {@link ApplicationMap} qualifier. - *

      - * - * @since 4.0 - */ - public static final class Literal extends AnnotationLiteral implements ApplicationMap { - private static final long serialVersionUID = 1L; - - /** - * Instance of the {@link ApplicationMap} qualifier. - */ - public static final Literal INSTANCE = new Literal(); - } -} diff --git a/impl/src/main/java/jakarta/faces/annotation/FacesConfig.java b/impl/src/main/java/jakarta/faces/annotation/FacesConfig.java deleted file mode 100644 index 4c274347e3..0000000000 --- a/impl/src/main/java/jakarta/faces/annotation/FacesConfig.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.annotation; - -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.enterprise.util.AnnotationLiteral; -import jakarta.enterprise.util.Nonbinding; -import jakarta.inject.Qualifier; - -/** - *

      - * The presence of this annotation on a class deployed within an application - * guarantees activation of Jakarta Faces and its CDI specific features, even when - * /WEB-INF/faces-config.xml is absent and FacesServlet is not explicitly registered. - *

      - */ -@Qualifier -@Target(TYPE) -@Retention(RUNTIME) -public @interface FacesConfig { - - - /** - *

      - * Supports inline instantiation of the {@link FacesConfig} qualifier. - *

      - * - * @since 4.0 - */ - public static final class Literal extends AnnotationLiteral implements FacesConfig { - private static final long serialVersionUID = 1L; - - /** - * Instance of the {@link FacesConfig} qualifier. - */ - public static final Literal INSTANCE = new Literal(); - - @Override - public Version version() { - return Version.JSF_2_3; - } - } - - /** - * The Faces spec version - * - * @deprecated It has no effect anymore as per Jakarta Faces version 4.0; the actual impl version should be leading. - */ - @Deprecated(forRemoval = true, since = "4.0") - public static enum Version { - - /** - *

      - * This value indicates CDI should be used for Jakarta Expression Language resolution as well as enabling Jakarta Server - * Faces CDI injection, as specified in Section 5.6.3 "CDI for EL Resolution" and Section 5.9 "CDI Integration". - *

      - */ - JSF_2_3 - - } - - /** - *

      - * The value of this attribute indicates that features corresponding to this version must be enabled for this - * application. - *

      - * - * @return the spec version for which the features must be enabled. - * - * @deprecated It has no effect anymore as per Jakarta Faces version 4.0; the actual impl version should be leading. - */ - @Nonbinding - @Deprecated(forRemoval = true, since = "4.0") - Version version() default Version.JSF_2_3; - -} diff --git a/impl/src/main/java/jakarta/faces/annotation/FlowMap.java b/impl/src/main/java/jakarta/faces/annotation/FlowMap.java deleted file mode 100644 index 2f88b7f39f..0000000000 --- a/impl/src/main/java/jakarta/faces/annotation/FlowMap.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.annotation; - -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PARAMETER; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.enterprise.util.AnnotationLiteral; -import jakarta.inject.Qualifier; - -/** - *

      - * The presence of this annotation (along with {@code @Inject}) on a field of type Map<Object, - * Object> causes the map returned from {@link jakarta.faces.flow.FlowHandler#getCurrentFlowScope} to be - * injected as the value of that field. - *

      - */ - -@Target({ TYPE, METHOD, PARAMETER, FIELD }) -@Qualifier -@Retention(value = RUNTIME) -public @interface FlowMap { - - /** - *

      - * Supports inline instantiation of the {@link ApplicationMap} qualifier. - *

      - * - * @since 4.0 - */ - public static final class Literal extends AnnotationLiteral implements FlowMap { - private static final long serialVersionUID = 1L; - - /** - * Instance of the {@link FlowMap} qualifier. - */ - public static final Literal INSTANCE = new Literal(); - } -} diff --git a/impl/src/main/java/jakarta/faces/annotation/HeaderMap.java b/impl/src/main/java/jakarta/faces/annotation/HeaderMap.java deleted file mode 100644 index d143372039..0000000000 --- a/impl/src/main/java/jakarta/faces/annotation/HeaderMap.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.annotation; - -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PARAMETER; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.enterprise.util.AnnotationLiteral; -import jakarta.inject.Qualifier; - -/** - *

      - * The presence of this annotation (along with {@code @Inject}) on a field of type Map<String, - * String> causes the map returned from {@link jakarta.faces.context.ExternalContext#getRequestHeaderMap} to - * be injected as the value of that field. - *

      - */ - -@Target({ TYPE, METHOD, PARAMETER, FIELD }) -@Qualifier -@Retention(value = RUNTIME) -public @interface HeaderMap { - - /** - *

      - * Supports inline instantiation of the {@link HeaderMap} qualifier. - *

      - * - * @since 4.0 - */ - public static final class Literal extends AnnotationLiteral implements HeaderMap { - private static final long serialVersionUID = 1L; - - /** - * Instance of the {@link HeaderMap} qualifier. - */ - public static final Literal INSTANCE = new Literal(); - } -} diff --git a/impl/src/main/java/jakarta/faces/annotation/HeaderValuesMap.java b/impl/src/main/java/jakarta/faces/annotation/HeaderValuesMap.java deleted file mode 100644 index 1384992be4..0000000000 --- a/impl/src/main/java/jakarta/faces/annotation/HeaderValuesMap.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.annotation; - -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PARAMETER; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.enterprise.util.AnnotationLiteral; -import jakarta.inject.Qualifier; - -/** - *

      - * The presence of this annotation (along with {@code @Inject}) on a field of type Map<String, - * String[]> causes the map returned from - * {@link jakarta.faces.context.ExternalContext#getRequestHeaderValuesMap} to be injected as the value of that field. - *

      - */ - -@Target({ TYPE, METHOD, PARAMETER, FIELD }) -@Qualifier -@Retention(value = RUNTIME) -public @interface HeaderValuesMap { - /** - *

      - * Supports inline instantiation of the {@link HeaderValuesMap} qualifier. - *

      - * - * @since 4.0 - */ - public static final class Literal extends AnnotationLiteral implements HeaderValuesMap { - private static final long serialVersionUID = 1L; - - /** - * Instance of the {@link HeaderValuesMap} qualifier. - */ - public static final Literal INSTANCE = new Literal(); - } -} diff --git a/impl/src/main/java/jakarta/faces/annotation/InitParameterMap.java b/impl/src/main/java/jakarta/faces/annotation/InitParameterMap.java deleted file mode 100644 index 6a23d7ef6c..0000000000 --- a/impl/src/main/java/jakarta/faces/annotation/InitParameterMap.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.annotation; - -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PARAMETER; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.enterprise.util.AnnotationLiteral; -import jakarta.inject.Qualifier; - -/** - *

      - * The presence of this annotation (along with {@code @Inject}) on a field of type Map<String, - * String> causes the map returned from {@link jakarta.faces.context.ExternalContext#getInitParameterMap} to - * be injected as the value of that field. - *

      - */ - -@Target({ TYPE, METHOD, PARAMETER, FIELD }) -@Qualifier -@Retention(value = RUNTIME) -public @interface InitParameterMap { - - /** - *

      - * Supports inline instantiation of the {@link InitParameterMap} qualifier. - *

      - * - * @since 4.0 - */ - public static final class Literal extends AnnotationLiteral implements InitParameterMap { - private static final long serialVersionUID = 1L; - - /** - * Instance of the {@link InitParameterMap} qualifier. - */ - public static final Literal INSTANCE = new Literal(); - } -} diff --git a/impl/src/main/java/jakarta/faces/annotation/ManagedProperty.java b/impl/src/main/java/jakarta/faces/annotation/ManagedProperty.java deleted file mode 100644 index 71888bc7dc..0000000000 --- a/impl/src/main/java/jakarta/faces/annotation/ManagedProperty.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.annotation; - -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.enterprise.util.AnnotationLiteral; -import jakarta.enterprise.util.Nonbinding; -import jakarta.faces.application.Application; -import jakarta.faces.context.FacesContext; -import jakarta.inject.Qualifier; - -/** - *

      - * The presence of this annotation (along with {@code @Inject}) on a field of any type causes the value returned from - * evaluating an expression language expression to be injected as the value of that field. - * - * This expression will be evaluated using {@link Application#evaluateExpressionGet(jakarta.faces.context.FacesContext, String, Class)}, - * which in turn implies that the {@link FacesContext#getCurrentInstance()} must be available at the moment of the evaluation. - * - *

      - */ - -@Qualifier -@Target(FIELD) -@Retention(RUNTIME) -public @interface ManagedProperty { - - - /** - *

      - * Taken to be the value that is injected into the field. - *

      - * - * @return the value. - */ - @Nonbinding - String value(); - - /** - *

      - * Supports inline instantiation of the {@link ManagedProperty} qualifier. - *

      - * - * @since 4.0 - */ - public static final class Literal extends AnnotationLiteral implements ManagedProperty { - - private static final long serialVersionUID = 1L; - - /** - * Instance of the {@link ManagedProperty} qualifier. - */ - public static final Literal INSTANCE = of(""); - - private final String value; - - public static Literal of(String value) { - return new Literal(value); - } - - private Literal(String value) { - this.value = value; - } - - @Override - public String value() { - return value; - } - } - -} diff --git a/impl/src/main/java/jakarta/faces/annotation/RequestCookieMap.java b/impl/src/main/java/jakarta/faces/annotation/RequestCookieMap.java deleted file mode 100644 index a57a62c1b7..0000000000 --- a/impl/src/main/java/jakarta/faces/annotation/RequestCookieMap.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.annotation; - -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PARAMETER; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.enterprise.util.AnnotationLiteral; -import jakarta.inject.Qualifier; - -/** - *

      - * The presence of this annotation (along with {@code @Inject}) on a field of type Map<String, - * Object> causes the map returned from {@link jakarta.faces.context.ExternalContext#getRequestCookieMap} to - * be injected as the value of that field. - *

      - */ - -@Target({ TYPE, METHOD, PARAMETER, FIELD }) -@Qualifier -@Retention(value = RUNTIME) -public @interface RequestCookieMap { - /** - *

      - * Supports inline instantiation of the {@link RequestCookieMap} qualifier. - *

      - * - * @since 4.0 - */ - public static final class Literal extends AnnotationLiteral implements RequestCookieMap { - private static final long serialVersionUID = 1L; - - /** - * Instance of the {@link RequestCookieMap} qualifier. - */ - public static final Literal INSTANCE = new Literal(); - } -} diff --git a/impl/src/main/java/jakarta/faces/annotation/RequestMap.java b/impl/src/main/java/jakarta/faces/annotation/RequestMap.java deleted file mode 100644 index f16ac63f4e..0000000000 --- a/impl/src/main/java/jakarta/faces/annotation/RequestMap.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.annotation; - -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PARAMETER; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.enterprise.util.AnnotationLiteral; -import jakarta.inject.Qualifier; - -/** - *

      - * The presence of this annotation (along with {@code @Inject}) on a field of type Map<String, - * Object> causes the map returned from {@link jakarta.faces.context.ExternalContext#getRequestMap} to be - * injected as the value of that field. - *

      - */ - -@Target({ TYPE, METHOD, PARAMETER, FIELD }) -@Qualifier -@Retention(value = RUNTIME) -public @interface RequestMap { - /** - *

      - * Supports inline instantiation of the {@link RequestMap} qualifier. - *

      - * - * @since 4.0 - */ - public static final class Literal extends AnnotationLiteral implements RequestMap { - private static final long serialVersionUID = 1L; - - /** - * Instance of the {@link RequestMap} qualifier. - */ - public static final Literal INSTANCE = new Literal(); - } -} diff --git a/impl/src/main/java/jakarta/faces/annotation/RequestParameterMap.java b/impl/src/main/java/jakarta/faces/annotation/RequestParameterMap.java deleted file mode 100644 index ae9424038a..0000000000 --- a/impl/src/main/java/jakarta/faces/annotation/RequestParameterMap.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.annotation; - -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PARAMETER; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.enterprise.util.AnnotationLiteral; -import jakarta.inject.Qualifier; - -/** - *

      - * The presence of this annotation (along with {@code @Inject}) on a field of type Map<String, - * String> causes the map returned from {@link jakarta.faces.context.ExternalContext#getRequestParameterMap} - * to be injected as the value of that field. - *

      - */ - -@Target({ TYPE, METHOD, PARAMETER, FIELD }) -@Qualifier -@Retention(value = RUNTIME) -public @interface RequestParameterMap { - /** - *

      - * Supports inline instantiation of the {@link RequestParameterMap} qualifier. - *

      - * - * @since 4.0 - */ - public static final class Literal extends AnnotationLiteral implements RequestParameterMap { - private static final long serialVersionUID = 1L; - - /** - * Instance of the {@link RequestParameterMap} qualifier. - */ - public static final Literal INSTANCE = new Literal(); - } -} diff --git a/impl/src/main/java/jakarta/faces/annotation/RequestParameterValuesMap.java b/impl/src/main/java/jakarta/faces/annotation/RequestParameterValuesMap.java deleted file mode 100644 index 9e1be713ce..0000000000 --- a/impl/src/main/java/jakarta/faces/annotation/RequestParameterValuesMap.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.annotation; - -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PARAMETER; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.enterprise.util.AnnotationLiteral; -import jakarta.inject.Qualifier; - -/** - *

      - * The presence of this annotation (along with {@code @Inject}) on a field of type Map<String, - * String []> causes the map returned from - * {@link jakarta.faces.context.ExternalContext#getRequestParameterValuesMap} to be injected as the value of that field. - *

      - */ - -@Target({ TYPE, METHOD, PARAMETER, FIELD }) -@Qualifier -@Retention(value = RUNTIME) -public @interface RequestParameterValuesMap { - /** - *

      - * Supports inline instantiation of the {@link RequestParameterValuesMap} qualifier. - *

      - * - * @since 4.0 - */ - public static final class Literal extends AnnotationLiteral implements RequestParameterValuesMap { - private static final long serialVersionUID = 1L; - - /** - * Instance of the {@link RequestParameterValuesMap} qualifier. - */ - public static final Literal INSTANCE = new Literal(); - } -} diff --git a/impl/src/main/java/jakarta/faces/annotation/SessionMap.java b/impl/src/main/java/jakarta/faces/annotation/SessionMap.java deleted file mode 100644 index b50fa71015..0000000000 --- a/impl/src/main/java/jakarta/faces/annotation/SessionMap.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.annotation; - -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PARAMETER; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.enterprise.util.AnnotationLiteral; -import jakarta.inject.Qualifier; - -/** - *

      - * The presence of this annotation (along with {@code @Inject}) on a field of type Map<String, - * Object> causes the map returned from {@link jakarta.faces.context.ExternalContext#getSessionMap} to be - * injected as the value of that field. - *

      - */ - -@Target({ TYPE, METHOD, PARAMETER, FIELD }) -@Qualifier -@Retention(value = RUNTIME) -public @interface SessionMap { - /** - *

      - * Supports inline instantiation of the {@link SessionMap} qualifier. - *

      - * - * @since 4.0 - */ - public static final class Literal extends AnnotationLiteral implements SessionMap { - private static final long serialVersionUID = 1L; - - /** - * Instance of the {@link SessionMap} qualifier. - */ - public static final Literal INSTANCE = new Literal(); - } -} diff --git a/impl/src/main/java/jakarta/faces/annotation/View.java b/impl/src/main/java/jakarta/faces/annotation/View.java deleted file mode 100644 index c90bcf8710..0000000000 --- a/impl/src/main/java/jakarta/faces/annotation/View.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.annotation; - -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PARAMETER; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Documented; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.enterprise.util.AnnotationLiteral; -import jakarta.faces.component.ActionSource2; -import jakarta.inject.Qualifier; - -/** - *

      - * The presence of this annotation on a target (type, method, parameter or field) within an application is used to indicate that - * this target is somehow handling a Faces View Id or Ids. - *

      - * - *

      - * The exact way in which such view is handled depends on the annotated element in question. - * - * @since 4.0 - * - */ - -@Target({ TYPE, METHOD, PARAMETER, FIELD }) -@Retention(RUNTIME) -@Qualifier -@Documented -public @interface View { - - /** - *

      - * Set the Faces View Id pattern. - *

      - * - * The Faces View Id pattern can represent a single view, such as "/index.xhtml", - * or a pattern like "/foo/bar/*". Though the exact interpretation of the Faces View Id - * for a single view is ultimately defined by the annotated element, in general it should - * align with the return value from an action expression - * (see {@link ActionSource2#setActionExpression(jakarta.el.MethodExpression)} - * - * @return the Faces View Id pattern - */ - String value() default ""; - - /** - * Supports inline instantiation of the {@link View} annotation. - * - */ - public final static class Literal extends AnnotationLiteral implements View { - - /** - * Instance of the {@link View} qualifier. - */ - public static final Literal INSTANCE = of(""); - - private static final long serialVersionUID = 1L; - - private final String value; - - public static Literal of(String value) { - return new Literal(value); - } - - private Literal(String value) { - this.value = value; - } - - @Override - public String value() { - return value; - } - } - -} diff --git a/impl/src/main/java/jakarta/faces/annotation/ViewMap.java b/impl/src/main/java/jakarta/faces/annotation/ViewMap.java deleted file mode 100644 index 0ae20821ab..0000000000 --- a/impl/src/main/java/jakarta/faces/annotation/ViewMap.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.annotation; - -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PARAMETER; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.enterprise.util.AnnotationLiteral; -import jakarta.inject.Qualifier; - -/** - *

      - * The presence of this annotation (along with {@code @Inject}) on a field of type Map<String, - * Object> causes the map returned from {@link jakarta.faces.component.UIViewRoot#getViewMap} to be injected - * as the value of that field. - *

      - */ - -@Target({ TYPE, METHOD, PARAMETER, FIELD }) -@Qualifier -@Retention(value = RUNTIME) -public @interface ViewMap { - /** - *

      - * Supports inline instantiation of the {@link ViewMap} qualifier. - *

      - * - * @since 4.0 - */ - public static final class Literal extends AnnotationLiteral implements ViewMap { - private static final long serialVersionUID = 1L; - - /** - * Instance of the {@link ViewMap} qualifier. - */ - public static final Literal INSTANCE = new Literal(); - } -} diff --git a/impl/src/main/java/jakarta/faces/application/Application.java b/impl/src/main/java/jakarta/faces/application/Application.java deleted file mode 100644 index 3a0484ffc5..0000000000 --- a/impl/src/main/java/jakarta/faces/application/Application.java +++ /dev/null @@ -1,1690 +0,0 @@ -/* - * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.Locale; -import java.util.Map; -import java.util.ResourceBundle; - -import jakarta.el.ELContextListener; -import jakarta.el.ELException; -import jakarta.el.ELResolver; -import jakarta.el.ExpressionFactory; -import jakarta.el.ValueExpression; -import jakarta.faces.FacesException; -import jakarta.faces.component.UIComponent; -import jakarta.faces.component.behavior.Behavior; -import jakarta.faces.component.search.SearchExpressionHandler; -import jakarta.faces.component.search.SearchKeywordResolver; -import jakarta.faces.context.FacesContext; -import jakarta.faces.convert.Converter; -import jakarta.faces.event.ActionListener; -import jakarta.faces.event.SystemEvent; -import jakarta.faces.event.SystemEventListener; -import jakarta.faces.flow.FlowHandler; -import jakarta.faces.validator.Validator; -import jakarta.faces.view.ViewDeclarationLanguage; - -/** - *

      - * Application represents a per-web-application singleton object where applications based - * on Jakarta Faces (or implementations wishing to provide extended functionality) can register application-wide - * singletons that provide functionality required by Jakarta Faces. Default implementations of each object are - * provided for cases where the application does not choose to customize the behavior. - *

      - * - *

      - * The instance of {@link Application} is created by calling the getApplication() method of - * {@link ApplicationFactory}. Because this instance is shared, it must be implemented in a thread-safe manner. - *

      - * - *

      - * The application also acts as a factory for several types of Objects specified in the Faces Configuration file. Please - * see {@link Application#createComponent}, {@link Application#createConverter}, and - * {@link Application#createValidator}. - *

      - */ -public abstract class Application { - - private Application defaultApplication; - - // ------------------------------------------------------------- Properties - - /** - *

      - * Return the default {@link ActionListener} to be registered for all - * {@link jakarta.faces.component.ActionSource} components in this application. If not explicitly set, a default - * implementation must be provided that performs the functions as specified in the - * section 7.1.1 "ActionListener Property" in the chapter 7 "Application Integration" of the Jakarta Faces Specification Document. - *

      - * - *

      - * Note that the specification for the default ActionListener contiues to call for the use of a - * deprecated property (action) and class (MethodBinding). Unfortunately, - * this is necessary because the default ActionListener must continue to work with components that do not - * implement {@link jakarta.faces.component.ActionSource2}, and only implement - * {@link jakarta.faces.component.ActionSource}. - *

      - * - * @return the action listener. - */ - public abstract ActionListener getActionListener(); - - /** - *

      - * Set the default {@link ActionListener} to be registered for all {@link jakarta.faces.component.ActionSource} - * components. - *

      - * - * @param listener The new default {@link ActionListener} - * - * @throws NullPointerException if listener is null - */ - public abstract void setActionListener(ActionListener listener); - - /** - *

      - * Return the default Locale for this application. If not explicitly set, null is returned. - *

      - * - * @return the default Locale, or null. - */ - public abstract Locale getDefaultLocale(); - - /** - *

      - * Set the default Locale for this application. - *

      - * - * @param locale The new default Locale - * - * @throws NullPointerException if locale is null - */ - public abstract void setDefaultLocale(Locale locale); - - /** - *

      - * Return the renderKitId to be used for rendering this application. If not explicitly set, - * null is returned. - *

      - * - * @return the default render kit id, or null. - */ - public abstract String getDefaultRenderKitId(); - - /** - *

      - * Set the renderKitId to be used to render this application. Unless the client has provided a custom - * {@link ViewHandler} that supports the use of multiple {@link jakarta.faces.render.RenderKit} instances in the same - * application, this method must only be called at application startup, before any Faces requests have been processed. - * This is a limitation of the current Specification, and may be lifted in a future release. - *

      - * - * @param renderKitId the render kit id to set. - */ - public abstract void setDefaultRenderKitId(String renderKitId); - - /** - *

      - * Return the fully qualified class name of the ResourceBundle to be used for Jakarta Faces messages - * for this application. If not explicitly set, null is returned. - *

      - * - * @return the message bundle class name, or null. - */ - public abstract String getMessageBundle(); - - /** - *

      - * Set the fully qualified class name of the ResourceBundle to be used for Jakarta Faces messages - * for this application. See the JavaDocs for the java.util.ResourceBundle class for more information about - * the syntax for resource bundle names. - *

      - * - * @param bundle Base name of the resource bundle to be used - * - * @throws NullPointerException if bundle is null - */ - public abstract void setMessageBundle(String bundle); - - /** - *

      - * Return the {@link NavigationHandler} instance that will be passed the outcome returned by any invoked application - * action for this web application. If not explicitly set, a default implementation must be provided that performs the - * functions described in the {@link NavigationHandler} class description. - *

      - * - *
      - *
        - *
      • The NavigationHandler implementation is declared in the application configuration resources by - * giving the fully qualified class name as the value of the <navigation-handler> element within the - * <application> element.
      • - *
      - *

      - * The runtime must employ the decorator pattern as for every other pluggable artifact in Jakarta Faces. - *

      - *
      - * - * @return the navigation handler. - */ - public abstract NavigationHandler getNavigationHandler(); - - /** - *

      - * Set the {@link NavigationHandler} instance that will be passed the outcome returned by any invoked application action - * for this web application. - *

      - * - * @param handler The new {@link NavigationHandler} instance - * - * @throws NullPointerException if handler is null - */ - public abstract void setNavigationHandler(NavigationHandler handler); - - /** - *

      - * Return the singleton, stateless, thread-safe {@link ResourceHandler} for this application. The Jakarta Faces - * implementation must support the following techniques for declaring an alternate implementation of - * ResourceHandler. - *

      - *
      - *
        - *
      • - *

        - * The ResourceHandler implementation is declared in the application configuration resources by giving the - * fully qualified class name as the value of the <resource-handler> element within the - * <application> element. - *

        - *
      • - *
      - *

      - * In all of the above cases, the runtime must employ the decorator pattern as for every other pluggable artifact in - * Jakarta Faces. - *

      - * - *

      - * A default implementation is provided that throws UnsupportedOperationException so that users that - * decorate Application can continue to function - *

      - * . - * - * - *
      - * - * @return the resource handler. - * @since 2.0 - */ - public ResourceHandler getResourceHandler() { - if (defaultApplication != null) { - return defaultApplication.getResourceHandler(); - } - - throw new UnsupportedOperationException(); - } - - /** - *

      - * Set the {@link ResourceHandler} instance that will be utilized for rendering the markup for resources, and for - * satisfying client requests to serve up resources. - *

      - * - * @param resourceHandler The new ResourceHandler instance - * - * @throws IllegalStateException if this method is called after at least one request has been processed by the - * Lifecycle instance for this application. - * @throws NullPointerException if resourceHandler is null - * @since 2.0 - */ - public void setResourceHandler(ResourceHandler resourceHandler) { - if (defaultApplication != null) { - defaultApplication.setResourceHandler(resourceHandler); - } else { - throw new UnsupportedOperationException(); - } - } - - /** - *

      - * Find a ResourceBundle as defined in the application configuration resources under the specified name. If - * a ResourceBundle was defined for the name, return an instance that uses the locale of the current - * {@link jakarta.faces.component.UIViewRoot}. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @param ctx the Faces context. - * @param name the name of the resource bundle. - * @return the resource bundle. - * @throws FacesException if a bundle was defined, but not resolvable - * @throws NullPointerException if ctx == null || name == null - * @since 1.2 - */ - public ResourceBundle getResourceBundle(FacesContext ctx, String name) { - if (defaultApplication != null) { - return defaultApplication.getResourceBundle(ctx, name); - } - - throw new UnsupportedOperationException(); - } - - /** - *

      - * Return the project stage for the currently running application instance. The default value is - * {@link ProjectStage#Production} - *

      - * - *
      - *

      - * The implementation of this method must perform the following algorithm or an equivalent with the same end result to - * determine the value to return. - *

      - * - *
      - * - *

      - * If the value has already been determined by a previous call to this method, simply return that value. - *

      - * - *

      - * Look for a JNDI environment entry under the key given by the value of - * {@link ProjectStage#PROJECT_STAGE_JNDI_NAME} (return type of java.lang.String). If found, continue with - * the algorithm below, otherwise, look for an entry in the initParamMap of the - * ExternalContext from the current FacesContext with the key given by the value of - * {@link ProjectStage#PROJECT_STAGE_PARAM_NAME} - * - *

      - * - *

      - * If a value is found, see if an enum constant can be obtained by calling ProjectStage.valueOf(), passing - * the value from the initParamMap. If this succeeds without exception, save the value and return it. - *

      - * - *

      - * If not found, or any of the previous attempts to discover the enum constant value have failed, log a descriptive - * error message, assign the value as ProjectStage.Production and return it. - *

      - * - *
      - * - *

      - * A default implementation is provided that throws UnsupportedOperationException so that users that - * decorate Application can continue to function - *

      - * . - * - *
      - * - * @return the project stage. - * @since 2.0 - */ - public ProjectStage getProjectStage() { - if (defaultApplication != null) { - return defaultApplication.getProjectStage(); - } - - return ProjectStage.Production; - } - - /** - *

      - * Cause an the argument resolver to be added to the - * resolver chain as specified in section 5.3.2 "ELResolver" of the Jakarta Faces Specification Document. - *

      - * - *

      - * It is not possible to remove an ELResolver registered with this method, once it has been registered. - *

      - * - *

      - * It is illegal to register an ELResolver after the application has received any requests from the client. - * If an attempt is made to register a listener after that time, an IllegalStateException must be thrown. - * This restriction is in place to allow the Jakarta Server Pages container to optimize for the common case where no - * additional ELResolvers are in the chain, aside from the standard ones. It is permissible to add - * ELResolvers before or after initialization to a CompositeELResolver that is already in the - * chain. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend {@link Application}. - *

      - * - * @param resolver the Jakarta Expression Language resolver to add. - * - * @throws IllegalStateException if called after the first request to the - * {@link jakarta.faces.webapp.FacesServlet} has been serviced. - * - * @since 1.2 - */ - public void addELResolver(ELResolver resolver) { - if (defaultApplication != null) { - defaultApplication.addELResolver(resolver); - } else { - throw new UnsupportedOperationException(); - } - } - - /** - *

      - * Return the singleton {@link ELResolver} instance to be used for all Jakarta Expression Language resolution. This is - * actually an instance of {@link jakarta.el.CompositeELResolver} that must contain the following - * ELResolver instances in the following order: - *

      - * - *
        - * - *
      1. - *

        - * ELResolver instances declared using the <el-resolver> element in the application configuration - * resources. - *

        - *
      2. - * - *
      3. - *

        - * An implementation that wraps the head of the legacy VariableResolver chain, as per section - * VariableResolver ChainWrapper in Chapter 5 in the spec document. - *

        - *
      4. - * - *
      5. - *

        - * An implementation that wraps the head of the legacy PropertyResolver chain, as per section - * PropertyResolver ChainWrapper in Chapter 5 in the spec document. - *

        - *
      6. - * - *
      7. - *

        - * Any ELResolver instances added by calls to {@link #addELResolver}. - *

        - *
      8. - * - *
      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend {@link Application}. - *

      - * - * @return the Jakarta Expression Language resolver. - * @since 1.2 - */ - public ELResolver getELResolver() { - if (defaultApplication != null) { - return defaultApplication.getELResolver(); - } - - throw new UnsupportedOperationException(); - } - - /** - *

      - * Return the thread-safe singleton {@link FlowHandler} for this application. For implementations declaring compliance - * with version 2.2 of the specification, this method must never return {@code null}, even if the application has no - * flows. This is necessary to enable dynamic flow creation during the application's lifetime. - *

      - * - *
      - * - *

      - * All implementations that declare compliance with version 2.2 of the specification must implement this method. For the - * purpose of backward compatibility with environments that extend {@code - * Application} but do not override this method, an implementation is provided that returns {@code null}. Due to the - * decoratable nature of {@code Application}, code calling this method should always check for a {@code null} return. - *

      - *
      - * - * @return the flow handler. - * @since 2.2 - */ - public FlowHandler getFlowHandler() { - if (defaultApplication != null) { - return defaultApplication.getFlowHandler(); - } - - return null; - } - - /** - *

      - * Set the {@link FlowHandler} instance used by the {@link NavigationHandler} to satisfy the requirements of the faces - * flows feature. - *

      - * - * @param newHandler the flow handler to set. - * @throws NullPointerException if newHandler is null - * @throws IllegalStateException if this method is called after at least one request has been processed by the - * {@code Lifecycle} instance for this application. - * @since 2.2 - */ - public void setFlowHandler(FlowHandler newHandler) { - if (defaultApplication != null) { - defaultApplication.setFlowHandler(newHandler); - } - } - - /** - *

      - * Return the {@link ViewHandler} instance that will be utilized during the Restore View and Render - * Response phases of the request processing lifecycle. If not explicitly set, a default implementation must be - * provided that performs the functions described in the {@link ViewHandler} description in the Jakarta Faces - * Specification. - *

      - * - * @return the view handler. - */ - public abstract ViewHandler getViewHandler(); - - /** - *

      - * Set the {@link ViewHandler} instance that will be utilized during the Restore View and Render - * Response phases of the request processing lifecycle. - *

      - * - * @param handler The new {@link ViewHandler} instance - * - * @throws IllegalStateException if this method is called after at least one request has been processed by the - * Lifecycle instance for this application. - * @throws NullPointerException if handler is null - */ - public abstract void setViewHandler(ViewHandler handler); - - /** - *

      - * Return the {@link StateManager} instance that will be utilized during the Restore View and Render - * Response phases of the request processing lifecycle. If not explicitly set, a default implementation must be - * provided that performs the functions described in the {@link StateManager} description in the Jakarta Faces - * Specification. - *

      - * - * @return the state manager. - */ - public abstract StateManager getStateManager(); - - /** - *

      - * Set the {@link StateManager} instance that will be utilized during the Restore View and Render - * Response phases of the request processing lifecycle. - *

      - * - * @param manager The new {@link StateManager} instance - * - * @throws IllegalStateException if this method is called after at least one request has been processed by the - * Lifecycle instance for this application. - * @throws NullPointerException if manager is null - */ - public abstract void setStateManager(StateManager manager); - - // ------------------------------------------------------- Object Factories - - /** - *

      - * Register a new mapping of behavior id to the name of the corresponding - * {@link Behavior} class. This allows subsequent calls to createBehavior() to serve as a factory for - * {@link Behavior} instances. - *

      - * - * @param behaviorId The behavior id to be registered - * @param behaviorClass The fully qualified class name of the corresponding {@link Behavior} implementation - * - * @throws NullPointerException if behaviorId or behaviorClass is null - * - * @since 2.0 - */ - public void addBehavior(String behaviorId, String behaviorClass) { - if (defaultApplication != null) { - defaultApplication.addBehavior(behaviorId, behaviorClass); - } - } - - /** - *

      - * Instantiate and return a new {@link Behavior} instance of the class specified - * by a previous call to addBehavior() for the specified behavior id. - *

      - * - * @param behaviorId The behavior id for which to create and return a new {@link Behavior} instance - * @return the behavior. - * @throws FacesException if the {@link Behavior} cannot be created - * @throws NullPointerException if behaviorId is null - */ - public Behavior createBehavior(String behaviorId) throws FacesException { - if (defaultApplication != null) { - return defaultApplication.createBehavior(behaviorId); - } - - return null; - } - - /** - *

      - * Return an Iterator over the set of currently registered behavior ids for this Application. - *

      - * - * @return an iterator with behavior ids. - */ - public Iterator getBehaviorIds() { - if (defaultApplication != null) { - return defaultApplication.getBehaviorIds(); - } - - return Collections.emptyList().iterator(); - } - - /** - *

      - * Register a new mapping of component type to the name of the corresponding {@link UIComponent} class. This allows - * subsequent calls to createComponent() to serve as a factory for {@link UIComponent} instances. - *

      - * - * @param componentType The component type to be registered - * @param componentClass The fully qualified class name of the corresponding {@link UIComponent} implementation - * - * @throws NullPointerException if componentType or componentClass is null - */ - public abstract void addComponent(String componentType, String componentClass); - - /** - *

      - * Instantiate and return a new {@link UIComponent} instance of the class - * specified by a previous call to addComponent() for the specified component type. - *

      - * - *

      - * Before the component instance is returned, it must be inspected for the presence of a - * {@link jakarta.faces.event.ListenerFor} (or {@link jakarta.faces.event.ListenersFor}) or {@link ResourceDependency} - * (or {@link ResourceDependencies}) annotation. If any of these annotations are present, the action listed in - * {@link jakarta.faces.event.ListenerFor} or {@link ResourceDependency} must be taken on the component, before it is - * returned from this method. This variant of createComponent must not inspect the - * {@link jakarta.faces.render.Renderer} for the component to be returned for any of the afore mentioned annotations. - * Such inspection is the province of {@link #createComponent(ValueExpression, FacesContext, String, String)} or - * {@link #createComponent(FacesContext, String, String)}. - *

      - * - * @param componentType The component type for which to create and return a new {@link UIComponent} instance - * @return the UI component. - * @throws FacesException if a {@link UIComponent} of the specified type cannot be created - * @throws NullPointerException if componentType is null - */ - public abstract UIComponent createComponent(String componentType) throws FacesException; - - /** - *

      - * Call the getValue() method on the specified - * {@link ValueExpression}. If it returns a {@link UIComponent} instance, return it as the value of this method. If it - * does not, instantiate a new {@link UIComponent} instance of the specified component type, pass the new component to - * the setValue() method of the specified {@link ValueExpression}, and return it. - *

      - * - *

      - * Before the component instance is returned, it must be inspected for the presence of a - * {@link jakarta.faces.event.ListenerFor} (or {@link jakarta.faces.event.ListenersFor}) or {@link ResourceDependency} - * (or {@link ResourceDependencies}) annotation. If any of these annotations are present, the action listed in - * {@link jakarta.faces.event.ListenerFor} or {@link ResourceDependency} must be taken on the component, before it is - * returned from this method. This variant of createComponent must not inspect the - * {@link jakarta.faces.render.Renderer} for the component to be returned for any of the afore mentioned annotations. - * Such inspection is the province of {@link #createComponent(ValueExpression, FacesContext, String, String)} or - * {@link #createComponent(FacesContext, String, String)}. - *

      - * - *

      - * A default implementation is provided that throws UnsupportedOperationException so that users that - * decorate Application can continue to function. - *

      - * - * @param componentExpression {@link ValueExpression} representing a component value expression (typically specified by - * the component attribute of a custom tag) - * @param context {@link FacesContext} for the current request - * @param componentType Component type to create if the {@link ValueExpression} does not return a component instance - * @return the UI component. - * @throws FacesException if a {@link UIComponent} cannot be created - * @throws NullPointerException if any parameter is null - * @since 1.2 - */ - public UIComponent createComponent(ValueExpression componentExpression, FacesContext context, String componentType) throws FacesException { - if (defaultApplication != null) { - return defaultApplication.createComponent(componentExpression, context, componentType); - } - - throw new UnsupportedOperationException(); - } - - /** - *

      - * Like {@link #createComponent(ValueExpression, FacesContext, String)} except the Renderer for the - * component to be returned must be inspected for the annotations mentioned in - * {@link #createComponent(ValueExpression, FacesContext, String)} as specified in the documentation for that method. - * The Renderer instance to inspect must be obtained by calling {@link FacesContext#getRenderKit} and - * calling {@link jakarta.faces.render.RenderKit#getRenderer} on the result, passing the argument - * componentType as the first argument and the result of calling {@link UIComponent#getFamily} on the newly - * created component as the second argument. If no such Renderer can be found, a message must be logged - * with a helpful error message. Otherwise, {@link UIComponent#setRendererType} must be called on the newly created - * UIComponent instance, passing the argument rendererType as the argument. - *

      - * - *

      - * A default implementation is provided that throws UnsupportedOperationException so that users that - * decorate Application can continue to function. - *

      - * - * - * @param componentExpression {@link ValueExpression} representing a component value expression (typically specified by - * the component attribute of a custom tag) - * @param context {@link FacesContext} for the current request - * @param componentType Component type to create if the {@link ValueExpression} does not return a component instance - * @param rendererType The renderer-type of the Renderer that will render this component. A - * null value must be accepted for this parameter. - * @return the UI component. - * @throws FacesException if a {@link UIComponent} cannot be created - * @throws NullPointerException if any of the parameters componentExpression, context, or - * componentType are null - * @since 2.0 - */ - public UIComponent createComponent(ValueExpression componentExpression, FacesContext context, String componentType, String rendererType) { - if (defaultApplication != null) { - return defaultApplication.createComponent(componentExpression, context, componentType, rendererType); - } - - throw new UnsupportedOperationException(); - } - - /** - *

      - * Like {@link #createComponent(String)} except the Renderer for the component to be returned must be - * inspected for the annotations mentioned in {@link #createComponent(ValueExpression, FacesContext, String)} as - * specified in the documentation for that method. The Renderer instance to inspect must be obtained by - * calling {@link FacesContext#getRenderKit} and calling {@link jakarta.faces.render.RenderKit#getRenderer} on the - * result, passing the argument componentType as the first argument and the result of calling - * {@link UIComponent#getFamily} on the newly created component as the second argument. If no such Renderer - * can be found, a message must be logged with a helpful error message. Otherwise, {@link UIComponent#setRendererType} - * must be called on the newly created UIComponent instance, passing the argument rendererType - * as the argument. - *

      - * - *

      - * A default implementation is provided that throws UnsupportedOperationException so that users that - * decorate Application can continue to function - *

      - * . - * - * - * @param context {@link FacesContext} for the current request - * @param componentType Component type to create - * @param rendererType The renderer-type of the Renderer that will render this component. A - * null value must be accepted for this parameter. - * @return the UI component. - * @throws FacesException if a {@link UIComponent} cannot be created - * @throws NullPointerException if any of the parameters context, or componentType are - * null - * @since 2.0 - */ - public UIComponent createComponent(FacesContext context, String componentType, String rendererType) { - if (defaultApplication != null) { - return defaultApplication.createComponent(context, componentType, rendererType); - } - - throw new UnsupportedOperationException(); - } - - /** - *

      - * Instantiate and return a new {@link UIComponent} instance from the - * argument {@link Resource}. An algorithm semantically equivalent to the following must be followed to instantiate the - * UIComponent to return. - *

      - * - *
      - * - *
        - * - *
      • - *

        - * Obtain a reference to the {@link ViewDeclarationLanguage} for this Application instance by calling - * {@link ViewHandler#getViewDeclarationLanguage}, passing the viewId found by calling - * {@link jakarta.faces.component.UIViewRoot#getViewId} on the {@link jakarta.faces.component.UIViewRoot} in the - * argument {@link FacesContext}. - *

        - *
      • - * - * - *
      • - *

        - * Obtain a reference to the composite component metadata for this composite component by calling - * {@link ViewDeclarationLanguage#getComponentMetadata}, passing the facesContext and - * componentResource arguments to this method. This version of the Jakarta Faces Specification uses - * JavaBeans as the API to the component metadata. - *

        - *
      • - * - *
      • - *

        - * Determine if the component author declared a componentType for this component instance by obtaining the - * BeanDescriptor from the component metadata and calling its getValue() method, passing - * {@link UIComponent#COMPOSITE_COMPONENT_TYPE_KEY} as the argument. If non-null, the result must be a - * ValueExpression whose value is the component-type of the UIComponent to be - * created for this Resource component. Call through to {@link #createComponent(java.lang.String)} to - * create the component. - *

        - *
      • - * - *
      • - *

        - * Otherwise, determine if a script based component for this Resource can be found by calling - * {@link ViewDeclarationLanguage#getScriptComponentResource}. If the result is non-null, and is a script - * written in a language satisfying the content type text/javascript, create a - * UIComponent instance from the script resource. - *

        - *
      • - * - *
      • - *

        - * Otherwise, let library-name be the return from calling {@link Resource#getLibraryName} on the argument - * componentResource and resource-name be the return from calling {@link Resource#getResourceName} - * on the argument componentResource. Create a fully qualified Java class name by removing any file - * extension from resource-name and let fqcn be library-name + "." + - resource-name. If a class with the name of fqcn cannot be found, take no action and continue - * to the next step. If any of InstantiationException, IllegalAccessException, or - * ClassCastException are thrown, wrap the exception in a FacesException and re-throw it. If - * any other exception is thrown, log the exception and continue to the next step. - *

        - *
      • - * - *
      • - *

        - * If none of the previous steps have yielded a UIComponent instance, call - * {@link #createComponent(java.lang.String)} passing "jakarta.faces.NamingContainer" as the argument. - *

        - *
      • - * - *
      • - *

        - * Call {@link UIComponent#setRendererType} on the UIComponent instance, passing - * "jakarta.faces.Composite" as the argument. - *

        - *
      • - * - *
      • - * - *

        - * Store the argument Resource in the attributes Map of the UIComponent under the - * key, {@link Resource#COMPONENT_RESOURCE_KEY}. - *

        - * - *
      • - * - *
      • - * - *

        - * Store composite component metadata in the attributes Map of the UIComponent under - * the key, {@link UIComponent#BEANINFO_KEY}. - *

        - * - *
      • - * - *
      - * - *

      - * Before the component instance is returned, it must be inspected for the presence of a - * {@link jakarta.faces.event.ListenerFor} annotation. If this annotation is present, the action listed in - * {@link jakarta.faces.event.ListenerFor} must be taken on the component, before it is returned from this method. - *

      - * - *

      - * A default implementation is provided that throws UnsupportedOperationException so that users that - * decorate Application can continue to function. - *

      - * - *
      - * - * @param context {@link FacesContext} for the current request - * @param componentResource A {@link Resource} that points to a source file that provides an implementation of a - * component. - * @return the UI component. - * @throws FacesException if a {@link UIComponent} from the {@link Resource} cannot be created - * @throws NullPointerException if any parameter is null - * @throws NullPointerException if unable, for any reason, to obtain a ViewDeclarationLanguage instance as - * described above. - * @since 2.0 - */ - public UIComponent createComponent(FacesContext context, Resource componentResource) { - if (defaultApplication != null) { - return defaultApplication.createComponent(context, componentResource); - } - - throw new UnsupportedOperationException(); - } - - /** - *

      - * Return an Iterator over the set of currently defined component types for this Application. - *

      - * - * @return an iterator with component types. - */ - public abstract Iterator getComponentTypes(); - - /** - *

      - * Register a new mapping of converter id to the name of the corresponding {@link Converter} class. This allows - * subsequent calls to createConverter() to serve as a factory for {@link Converter} instances. - *

      - * - * @param converterId The converter id to be registered - * @param converterClass The fully qualified class name of the corresponding {@link Converter} implementation - * - * @throws NullPointerException if converterId or converterClass is null - */ - public abstract void addConverter(String converterId, String converterClass); - - /** - *

      - * Register a new converter class that is capable of performing conversions for the specified target class. - *

      - * - * @param targetClass The class for which this converter is registered - * @param converterClass The fully qualified class name of the corresponding {@link Converter} implementation - * - * @throws NullPointerException if targetClass or converterClass is null - */ - public abstract void addConverter(Class targetClass, String converterClass); - - /** - *

      - * Instantiate and return a new {@link Converter} instance of the class - * specified by a previous call to addConverter() for the specified converter id. - *

      - * - *

      - * If the toLowerCase() of the String represenation of the value of the - * "jakarta.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE" application configuration - * parameter is "true" (without the quotes) and the Converter instance to be returned is an - * instance of {@link jakarta.faces.convert.DateTimeConverter}, - * {@link jakarta.faces.convert.DateTimeConverter#setTimeZone} must be called, passing the return from - * TimeZone.getDefault(). - *

      - * - *

      - * The argument converter must be inspected for the presence of the - * {@link jakarta.faces.application.ResourceDependency} annotation. If the ResourceDependency annotation is - * present, the action described in ResourceDependency must be taken. If the - * ResourceDependency annotation is not present, the argument converter must be inspected for - * the presence of the {@link jakarta.faces.application.ResourceDependencies} annotation. If the - * ResourceDependencies annotation is present, the action described in ResourceDependencies - * must be taken. - *

      - * - * @param converterId The converter id for which to create and return a new {@link Converter} instance - * @return the converter. - * @throws FacesException if the {@link Converter} cannot be created - * @throws NullPointerException if converterId is null - */ - public abstract Converter createConverter(String converterId); - - /** - *

      - * Instantiate and return a new {@link Converter} instance of the class that - * has registered itself as capable of performing conversions for objects of the specified type. If no such - * {@link Converter} class can be identified, return null. - *

      - * - *

      - * To locate an appropriate {@link Converter} class, the following algorithm is performed, stopping as soon as an - * appropriate {@link Converter} class is found: - *

      - *
        - *
      • Locate a {@link Converter} registered for the target class itself.
      • - *
      • Locate a {@link Converter} registered for interfaces that are implemented by the target class (directly or - * indirectly).
      • - *
      • Locate a {@link Converter} registered for the superclass (if any) of the target class, recursively working up the - * inheritance hierarchy.
      • - *
      - * - *

      - * If the Converter has a single argument constructor that accepts a Class, instantiate the - * Converter using that constructor, passing the argument targetClass as the sole argument. - * Otherwise, simply use the zero-argument constructor. - *

      - * - *

      - * If the toLowerCase() of the String represenation of the value of the - * "jakarta.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE" application configuration - * parameter is "true" (without the quotes) and the Converter instance to be returned is an - * instance of {@link jakarta.faces.convert.DateTimeConverter}, - * {@link jakarta.faces.convert.DateTimeConverter#setTimeZone} must be called, passing the return from - * TimeZone.getDefault(). - *

      - * - * @param targetClass Target class for which to return a {@link Converter} - * @return the converter. - * @throws FacesException if the {@link Converter} cannot be created - * @throws NullPointerException if targetClass is null - */ - public abstract Converter createConverter(Class targetClass); - - /** - *

      - * Return an Iterator over the set of currently registered converter ids for this Application. - *

      - * - * @return an iterator with converter ids. - */ - public abstract Iterator getConverterIds(); - - /** - *

      - * Return an Iterator over the set of Class instances for which {@link Converter} classes have - * been explicitly registered. - *

      - * - * @return an iterator with converter types. - */ - public abstract Iterator> getConverterTypes(); - - /** - *

      - * Register a validator by its id that is applied to all UIInput components in a view. The validator to - * most often serve this role is the BeanValidator. The usage contract for this method assumes that the - * validator has been registered using the normal “by-id” registration mechanism. - *

      - * - *

      - * An implementation is provided that takes no action so that users that decorate the Application continue - * to work. - * - * @param validatorId the validator id. - * @since 2.0 - */ - public void addDefaultValidatorId(String validatorId) { - if (defaultApplication != null) { - defaultApplication.addDefaultValidatorId(validatorId); - } - } - - /** - *

      - * Return an immutable Map over the set of currently registered default validator IDs and their class name - * for this Application. - *

      - * - *

      - * An implementation is provided that returns Collections.emptyMap so that users that decorate the - * Application continue to work. - * - * @return a map of default validator information. - * @since 2.0 - */ - public Map getDefaultValidatorInfo() { - if (defaultApplication != null) { - return defaultApplication.getDefaultValidatorInfo(); - } - - return Collections.emptyMap(); - } - - /** - *

      - * Return the {@link ExpressionFactory} instance for this application. This instance is used by the convenience method - * {@link #evaluateExpressionGet}. - *

      - * - *

      - * The implementation must return the ExpressionFactory from the Expression Language container by calling - * jakarta.el.ELManager.getExpressionFactory(). - *

      - * - *

      - * An implementation is provided that throws UnsupportedOperationException so that users that decorate the - * Application continue to work. - * - * @return the expression factory. - * @since 1.2 - */ - public ExpressionFactory getExpressionFactory() { - if (defaultApplication != null) { - return defaultApplication.getExpressionFactory(); - } - - throw new UnsupportedOperationException(); - } - - /** - *

      - * Get a value by evaluating an expression. - *

      - * - *

      - * Call {@link #getExpressionFactory} then call {@link ExpressionFactory#createValueExpression} passing the argument - * expression and expectedType. Call {@link FacesContext#getELContext} and pass it to - * {@link ValueExpression#getValue}, returning the result. - *

      - * - *

      - * An implementation is provided that throws UnsupportedOperationException so that users that decorate the - * Application continue to work. - * - * @param the return type. - * @param context the Faces context. - * @param expression the expression. - * @param expectedType the expected type. - * @return the result of the evaluation. - */ - public T evaluateExpressionGet(FacesContext context, String expression, Class expectedType) throws ELException { - if (defaultApplication != null) { - return defaultApplication.evaluateExpressionGet(context, expression, expectedType); - } - - throw new UnsupportedOperationException(); - } - - /** - *

      - * Return an Iterator over the supported Locales for this appication. - *

      - * - * @return an iterator of the supported locales. - */ - public abstract Iterator getSupportedLocales(); - - /** - *

      - * Set the Locale instances representing the supported Locales for this application. - *

      - * - * @param locales The set of supported Locales for this application - * - * @throws NullPointerException if the argument newLocales is null. - * - */ - public abstract void setSupportedLocales(Collection locales); - - /** - *

      - * Provide a way for Faces applications to register an ELContextListener that will be notified on creation - * of ELContext instances. This listener will be called once per request. - *

      - * - *

      - * An implementation is provided that throws UnsupportedOperationException so that users that decorate the - * Application continue to work. - * - * @param listener the Jakarta Expression Language context listener to add. - * @since 1.2 - */ - - public void addELContextListener(ELContextListener listener) { - if (defaultApplication != null) { - defaultApplication.addELContextListener(listener); - } else { - throw new UnsupportedOperationException(); - } - } - - /** - *

      - * Remove the argument listener from the list of {@link ELContextListener}s. If listener is - * null, no exception is thrown and no action is performed. If listener is not in the list, no exception is - * thrown and no action is performed. - *

      - * - *

      - * An implementation is provided that throws UnsupportedOperationException so that users that decorate the - * Application continue to work. - * - * @param listener the Jakarta Expression Language context listener to remove. - * @since 1.2 - */ - - public void removeELContextListener(ELContextListener listener) { - if (defaultApplication != null) { - defaultApplication.removeELContextListener(listener); - } else { - throw new UnsupportedOperationException(); - } - } - - /** - *

      - * If no calls have been made to {@link #addELContextListener}, this method must return an empty array. - *

      - * - *

      - * Otherwise, return an array representing the list of listeners added by calls to {@link #addELContextListener}. - *

      - * - *

      - * An implementation is provided that throws UnsupportedOperationException so that users that decorate the - * Application continue to work. - * - * @return an array of Jakarta Expression Language context listeners. - * @since 1.2 - */ - - public ELContextListener[] getELContextListeners() { - if (defaultApplication != null) { - return defaultApplication.getELContextListeners(); - } - - throw new UnsupportedOperationException(); - } - - /** - *

      - * Register a new mapping of validator id to the name of the corresponding {@link Validator} class. This allows - * subsequent calls to createValidator() to serve as a factory for {@link Validator} instances. - *

      - * - * @param validatorId The validator id to be registered - * @param validatorClass The fully qualified class name of the corresponding {@link Validator} implementation - * - * @throws NullPointerException if validatorId or validatorClass is null - */ - public abstract void addValidator(String validatorId, String validatorClass); - - /** - *

      - * Instantiate and return a new {@link Validator} instance of the class - * specified by a previous call to addValidator() for the specified validator id. - *

      - * - *

      - * The argument validator must be inspected for the presence of the - * {@link jakarta.faces.application.ResourceDependency} annotation. If the ResourceDependency annotation is - * present, the action described in ResourceDependency must be taken. If the - * ResourceDependency annotation is not present, the argument validator must be inspected for - * the presence of the {@link jakarta.faces.application.ResourceDependencies} annotation. If the - * ResourceDependencies annotation is present, the action described in ResourceDependencies - * must be taken. - *

      - * - * @param validatorId The validator id for which to create and return a new {@link Validator} instance - * @return the validator. - * @throws FacesException if a {@link Validator} of the specified id cannot be created - * @throws NullPointerException if validatorId is null - */ - public abstract Validator createValidator(String validatorId) throws FacesException; - - /** - *

      - * Return an Iterator over the set of currently registered validator ids for this Application. - *

      - * - * @return an iterator of validator ids. - */ - public abstract Iterator getValidatorIds(); - - /** - *

      - * If {@link jakarta.faces.context.FacesContext#isProcessingEvents()} is true and there are one or more - * listeners for events of the type represented by systemEventClass, call those listeners, passing - * source as the source of the event. The implementation should be as fast as possible in determining - * whether or not a listener for the given systemEventClass and source has been installed, and - * should return immediately once such a determination has been made. The implementation of publishEvent - * must honor the requirements stated in {@link #subscribeToEvent} regarding the storage and retrieval of listener - * instances. Specifically, if {@link #subscribeToEvent(Class,Class,SystemEventListener)} was called, the - * sourceClass argument must match exactly the Class of the source argument in - * the call to publishEvent(). The implementation must not do any inheritance hierarachy inspection when - * looking for a match between the sourceClass passed to - * {@link #subscribeToEvent(Class,Class,SystemEventListener)} and the sourceClass passed to - * publishEvent() in order to find any listeners to which the event should be published. In the case where - * the Class of the source argument does not match the Class of the - * sourceClass used when the listener was subscribed using subscribeToEvent(), - * {@link #publishEvent(FacesContext,Class,Class,Object)} can be used to provide the Class used to perform - * the listener lookup and match. - *

      - * - *
      - * - *

      - * The default implementation must implement an algorithm semantically equivalent to the following to locate listener - * instances and to invoke them. - *

      - * - *
        - * - *
      • - *

        - * If the source argument implements {@link jakarta.faces.event.SystemEventListenerHolder}, call - * {@link jakarta.faces.event.SystemEventListenerHolder#getListenersForEventClass} on it, passing the - * systemEventClass argument. If the list is not empty, perform algorithm traverseListenerList on - * the list. - *

        - *
      • - * - *
      • - *

        - * If any view level listeners have been installed by previous calls to - * {@link #subscribeToEvent(Class, Class, jakarta.faces.event.SystemEventListener)} on the - * {@link jakarta.faces.component.UIViewRoot}, perform algorithm traverseListenerList on the list of listeners - * for that event installed on the UIViewRoot. - *

        - *
      • - * - *
      • - *

        - * If any Application level listeners have been installed by previous calls to - * {@link #subscribeToEvent(Class, Class, jakarta.faces.event.SystemEventListener)}, perform algorithm - * traverseListenerList on the list. - *

        - *
      • - * - *
      • - *

        - * If any Application level listeners have been installed by previous calls to - * {@link #subscribeToEvent(Class, jakarta.faces.event.SystemEventListener)}, perform algorithm - * traverseListenerList on the list. - *

        - *
      • - * - *
      - * - *

      - * If the act of invoking the processListener method causes an - * {@link jakarta.faces.event.AbortProcessingException} to be thrown, processing of the listeners must be aborted, no - * further processing of the listeners for this event must take place, and the exception must be logged with - * Level.SEVERE. - *

      - * - *

      - * Algorithm traverseListenerList: For each listener in the list, - *

      - * - *
        - * - *
      • - *

        - * Call {@link jakarta.faces.event.SystemEventListener#isListenerForSource}, passing the source argument. - * If this returns false, take no action on the listener. - *

        - *
      • - * - *
      • - *

        - * Otherwise, if the event to be passed to the listener instances has not yet been constructed, construct the event, - * passing source as the argument to the one-argument constructor that takes an Object. This - * same event instance must be passed to all listener instances. - *

        - *
      • - * - *
      • - *

        - * Call {@link jakarta.faces.event.SystemEvent#isAppropriateListener}, passing the listener instance as the argument. If - * this returns false, take no action on the listener. - *

        - *
      • - * - *
      • - *

        - * Call {@link jakarta.faces.event.SystemEvent#processListener}, passing the listener instance. - *

        - *
      • - * - *
      - * - *

      - * A default implementation is provided that throws UnsupportedOperationException so that users that - * decorate Application can continue to function - *

      - * . - * - *
      - * - * @param context the FacesContext for the current request - * @param systemEventClass The Class of event that is being published. - * @param source The source for the event of type systemEventClass. - * - * @throws NullPointerException if either context, systemEventClass or source is - * null - * - * @since 2.0 - * - */ - public void publishEvent(FacesContext context, Class systemEventClass, Object source) { - if (defaultApplication != null) { - defaultApplication.publishEvent(context, systemEventClass, source); - } else { - throw new UnsupportedOperationException(); - } - } - - /** - *

      - * This method functions exactly like {@link #publishEvent(FacesContext,Class,Object)}, except the run-time must use the - * argument sourceBaseType to find the matching listener instead of using the Class of the - * source argument. - *

      - * - *

      - * A default implementation is provided that throws UnsupportedOperationException so that users that - * decorate Application can continue to function - *

      - * . - * - * @param context the FacesContext for the current request - * @param systemEventClass The Class of event that is being published. - * @param sourceBaseType The Class of the source event that must be used to lookup the listener to which - * this event must be published. If this argument is null the return from source.getClass() - * must be used as the sourceBaseType. - * @param source The source for the event of type systemEventClass. - * - * @throws NullPointerException if any arguments except for sourceBaseType are null - * - * @since 2.0 - */ - - public void publishEvent(FacesContext context, Class systemEventClass, Class sourceBaseType, Object source) { - if (defaultApplication != null) { - defaultApplication.publishEvent(context, systemEventClass, sourceBaseType, source); - } else { - throw new UnsupportedOperationException(); - } - } - - /** - *

      - * Install the listener instance referenced by argument listener - * into the application as a listener for events of type systemEventClass that originate from objects of - * type sourceClass. - *

      - * - *
      - * - *

      - * If argument sourceClass is non-null, sourceClass and - * systemEventClass must be used to store the argument listener in the application in such a - * way that the listener can be quickly looked up by the implementation of {@link #publishEvent} given - * systemEventClass and an instance of the Class referenced by sourceClass. If - * argument sourceClass is null, the listener must be discoverable by the - * implementation of {@link #publishEvent} given only systemEventClass. - *

      - * - *
      - * - *
      - * - *

      - * It is valid to call this method during the processing of an event which was subscribed to by a - * previous call to this method. - *

      - * - *
      - * - * - * @param systemEventClass the Class of event for which listener must be fired. - * - * @param sourceClass the Class of the instance which causes events of type systemEventClass - * to be fired. May be null. - * - * @param listener the implementation of {@link jakarta.faces.event.SystemEventListener} whose - * {@link jakarta.faces.event.SystemEventListener#processEvent} method must be called when events of type - * systemEventClass are fired. - * - * @throws NullPointerException if any combination of systemEventClass, or listener are - * null. - * - * @since 2.0 - */ - public void subscribeToEvent(Class systemEventClass, Class sourceClass, SystemEventListener listener) { - if (defaultApplication != null) { - defaultApplication.subscribeToEvent(systemEventClass, sourceClass, listener); - } else { - throw new UnsupportedOperationException(); - } - } - - /** - *

      - * Install the listener instance referenced by argument listener - * into application as a listener for events of type systemEventClass. The default implementation simply - * calls through to {@link #subscribeToEvent(Class, Class, jakarta.faces.event.SystemEventListener)} passing - * null as the sourceClass argument - *

      - * - *

      - * A default implementation is provided that throws UnsupportedOperationException so that users that - * decorate Application can continue to function - *

      - * . - * - * @param systemEventClass the Class of event for which listener must be fired. - * - * @param listener the implementation of {@link jakarta.faces.event.SystemEventListener} whose - * {@link jakarta.faces.event.SystemEventListener#processEvent} method must be called when events of type - * systemEventClass are fired. - * - *
      - * - *

      - * See {@link #subscribeToEvent(java.lang.Class,java.lang.Class,jakarta.faces.event.SystemEventListener)} for an - * additional requirement regarding when it is valid to call this method. - *

      - * - *
      - * - * @throws NullPointerException if any combination of systemEventClass, or listener are - * null. - * - * @since 2.0 - */ - public void subscribeToEvent(Class systemEventClass, SystemEventListener listener) { - if (defaultApplication != null) { - defaultApplication.subscribeToEvent(systemEventClass, listener); - } else { - throw new UnsupportedOperationException(); - } - } - - /** - *

      - * Remove the listener instance referenced by argument listener - * from the application as a listener for events of type systemEventClass that originate from objects of - * type sourceClass. See {@link #subscribeToEvent(Class, Class, jakarta.faces.event.SystemEventListener)} - * for the specification of how the listener is stored, and therefore, how it must be removed. - *

      - * - *
      - * - *

      - * See {@link #subscribeToEvent(java.lang.Class,java.lang.Class,jakarta.faces.event.SystemEventListener)} for an - * additional requirement regarding when it is valid to call this method. - *

      - * - *
      - * - * @param systemEventClass the Class of event for which listener must be fired. - * - * @param sourceClass the Class of the instance which causes events of type systemEventClass - * to be fired. May be null. - * - * @param listener the implementation of {@link jakarta.faces.event.SystemEventListener} to remove from the internal - * data structure. - * - * @throws NullPointerException if any combination of context, systemEventClass, or - * listener are null. - * - * @since 2.0 - */ - public void unsubscribeFromEvent(Class systemEventClass, Class sourceClass, SystemEventListener listener) { - if (defaultApplication != null) { - defaultApplication.unsubscribeFromEvent(systemEventClass, sourceClass, listener); - } else { - throw new UnsupportedOperationException(); - } - } - - /** - *

      - * Remove the listener instance referenced by argument listener - * from the application as a listener for events of type systemEventClass. The default implementation - * simply calls through to {@link #unsubscribeFromEvent(Class, jakarta.faces.event.SystemEventListener)} passing - * null as the sourceClass argument - *

      - * - *
      - * - *

      - * See {@link #subscribeToEvent(java.lang.Class,java.lang.Class,jakarta.faces.event.SystemEventListener)} for an - * additional requirement regarding when it is valid to call this method. - *

      - * - *
      - * - * @param systemEventClass the Class of event for which listener must be fired. - * - * @param listener the implementation of {@link jakarta.faces.event.SystemEventListener} to remove from the internal - * data structure. - * - * @throws NullPointerException if any combination of context, systemEventClass, or - * listener are null. - * - * @since 2.0 - */ - public void unsubscribeFromEvent(Class systemEventClass, SystemEventListener listener) { - if (defaultApplication != null) { - defaultApplication.unsubscribeFromEvent(systemEventClass, listener); - } else { - throw new UnsupportedOperationException(); - } - } - - /** - *

      - * Return the thread-safe singleton {@link SearchExpressionHandler} for this application. - *

      - * - * @return the {@link SearchExpressionHandler}. - * @since 2.3 - */ - public SearchExpressionHandler getSearchExpressionHandler() { - if (defaultApplication != null) { - return defaultApplication.getSearchExpressionHandler(); - } - - throw new UnsupportedOperationException(); - } - - /** - *

      - * Set the {@link SearchExpressionHandler} instance used by the application. - *

      - * - * @param searchExpressionHandler the {@link SearchExpressionHandler}. - * @throws NullPointerException if searchExpressionHandler is null - * @throws IllegalStateException if this method is called after at least one request has been processed by the - * {@code Lifecycle} instance for this application. - * - * @since 2.3 - */ - public void setSearchExpressionHandler(SearchExpressionHandler searchExpressionHandler) { - if (defaultApplication != null) { - defaultApplication.setSearchExpressionHandler(searchExpressionHandler); - } else { - throw new UnsupportedOperationException(); - } - } - - /** - *

      - * Cause the argument resolver to be added to the head of the resolver chain. - *

      - * - *
      - * - *

      - * It is not possible to remove a {@link SearchKeywordResolver} registered with this method, once it has been - * registered. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend {@link Application}. - *

      - * - *
      - * - * @param resolver the SearchKeywordResolver to add. - * - * @throws IllegalStateException if called after the first request to the {@link jakarta.faces.webapp.FacesServlet} has - * been serviced. - * @throws NullPointerException when resolver is null. - * - * @since 2.3 - */ - public void addSearchKeywordResolver(SearchKeywordResolver resolver) { - if (defaultApplication != null) { - defaultApplication.addSearchKeywordResolver(resolver); - } else { - throw new UnsupportedOperationException(); - } - } - - /** - *

      - * Return the singleton {@link SearchKeywordResolver} instance to be used for all search keyword resolution. This is - * actually an instance of a composite SearchKeywordResolver that must contain the following - * SearchKeywordResolver instances in the following order: - *

      - * - *
        - * - *
      1. - *

        - * SearchKeywordResolver instances declared using the <search-keyword-resolver> element in the - * application configuration resources. - *

        - *
      2. - * - *
      3. - *

        - * Any SearchKeywordResolver instances added by calls to {@link #addSearchKeywordResolver}. - *

        - *
      4. - * - *
      5. - *

        - * The SearchKeywordResolver implementations for @all, @child(n), - * @form, @id(...), @namingcontainer, @next, @none, - * @parent, @previous, @root and @this. - *

        - *
      6. - * - *
      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend {@link Application}. - *

      - * - * @return the {@link SearchKeywordResolver}. - * @since 2.3 - */ - public SearchKeywordResolver getSearchKeywordResolver() { - if (defaultApplication != null) { - return defaultApplication.getSearchKeywordResolver(); - } - - throw new UnsupportedOperationException(); - } -} diff --git a/impl/src/main/java/jakarta/faces/application/ApplicationConfigurationPopulator.java b/impl/src/main/java/jakarta/faces/application/ApplicationConfigurationPopulator.java deleted file mode 100644 index 2cb9fa1e69..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ApplicationConfigurationPopulator.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import org.w3c.dom.Document; - -/** - * - *

      - * This class defines a {@code java.util.ServiceLoader} service which enables programmatic configuration of the Jakarta - * Server Faces runtime using the existing Application Configuration Resources schema. See the - * section 11.3.2 "Application Startup Behavior" in the Jakarta Faces Specification Document - * for the specification on when and how implementations of this - * service are used. - *

      - * - * @since 2.2 - * - */ -public abstract class ApplicationConfigurationPopulator { - - /** - *

      - * Service providers that implement this service must be called by the Jakarta Faces runtime exactly once for - * each implementation, at startup, before any requests have been serviced. Before calling the - * {@link #populateApplicationConfiguration} method, the runtime must ensure that the {@code Document} argument is empty - * aside from being pre-configured to be in the proper namespace for an Application Configuration Resources file: - * {@code https://jakarta.ee/xml/ns/jakartaee}. Implementations of this service must ensure that any changes made to the - * argument {@code - * Document} conform to that schema as defined in the specification. The Jakarta Faces runtime is not required to - * validate the {@code Document} after control returns from the service implementation, though it may do so. - *

      - * - *
      - * - *

      - * Ordering of Artifacts - *

      - * - *

      - * If the document is made to contain an {@code } element, as specified in the - * section 11.3.8 "Ordering of Artifacts" in the Jakarta Faces Specification Document, - * the document will be prioritized accordingly. Otherwise, the - * runtime must place the document in the list of other Application Configuration Resources documents at the "lowest" - * priority, meaning any conflicts that may arise between the argument document and any other Application Configuration - * Resources are resolved in favor of the other document. - *

      - * - *
      - * - * @param toPopulate The Document to populate with configuration. - * - * @since 2.2 - */ - - public abstract void populateApplicationConfiguration(Document toPopulate); - -} diff --git a/impl/src/main/java/jakarta/faces/application/ApplicationFactory.java b/impl/src/main/java/jakarta/faces/application/ApplicationFactory.java deleted file mode 100644 index 0024504401..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ApplicationFactory.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import jakarta.faces.FacesWrapper; - -/** - *

      - * ApplicationFactory is a factory object that - * creates (if needed) and returns {@link Application} instances. Implementations of Jakarta Faces must provide - * at least a default implementation of {@link Application}. - *

      - * - *

      - * There must be one {@link ApplicationFactory} instance per web application that is utilizing Jakarta Faces. - * This instance can be acquired, in a portable manner, by calling: - *

      - * - *
      - * ApplicationFactory factory = (ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
      - * 
      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - */ - -public abstract class ApplicationFactory implements FacesWrapper { - - private ApplicationFactory wrapped; - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public ApplicationFactory() { - - } - - /** - *

      - * If this factory has been decorated, the implementation doing the decorating should push the implementation being - * wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - */ - public ApplicationFactory(ApplicationFactory wrapped) { - this.wrapped = wrapped; - } - - /** - *

      - * If this factory has been decorated, the implementation doing the decorating may override this method to provide - * access to the implementation being wrapped. - *

      - * - * @since 2.0 - */ - @Override - public ApplicationFactory getWrapped() { - return wrapped; - } - - /** - *

      - * Create (if needed) and return an {@link Application} instance for this web application. - *

      - * - * @return the application. - */ - public abstract Application getApplication(); - - /** - *

      - * Replace the {@link Application} instance that will be returned for this web application. - *

      - * - * @param application The replacement {@link Application} instance - * - * @throws NullPointerException if application is null. - */ - public abstract void setApplication(Application application); - -} diff --git a/impl/src/main/java/jakarta/faces/application/ApplicationWrapper.java b/impl/src/main/java/jakarta/faces/application/ApplicationWrapper.java deleted file mode 100644 index fa112728f2..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ApplicationWrapper.java +++ /dev/null @@ -1,742 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import java.util.Collection; -import java.util.Iterator; -import java.util.Locale; -import java.util.Map; -import java.util.ResourceBundle; - -import jakarta.el.ELContextListener; -import jakarta.el.ELException; -import jakarta.el.ELResolver; -import jakarta.el.ExpressionFactory; -import jakarta.el.ValueExpression; -import jakarta.faces.FacesException; -import jakarta.faces.FacesWrapper; -import jakarta.faces.component.UIComponent; -import jakarta.faces.component.behavior.Behavior; -import jakarta.faces.component.search.SearchExpressionHandler; -import jakarta.faces.component.search.SearchKeywordResolver; -import jakarta.faces.context.FacesContext; -import jakarta.faces.convert.Converter; -import jakarta.faces.event.ActionListener; -import jakarta.faces.event.SystemEvent; -import jakarta.faces.event.SystemEventListener; -import jakarta.faces.flow.FlowHandler; -import jakarta.faces.validator.Validator; - -/** - *

      - * Provides a simple implementation of {@link Application} that can be - * subclassed by developers wishing to provide specialized behavior to an existing {@link Application} instance. The - * default implementation of all methods is to call through to the wrapped {@link Application}. - *

      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - * @since 2.0 - */ -public abstract class ApplicationWrapper extends Application implements FacesWrapper { - - private Application wrapped; - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public ApplicationWrapper() { - - } - - /** - *

      - * If this application has been decorated, the implementation doing the decorating should push the implementation being - * wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - * @since 2.3 - */ - public ApplicationWrapper(Application wrapped) { - this.wrapped = wrapped; - } - - @Override - public Application getWrapped() { - return wrapped; - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getActionListener} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public ActionListener getActionListener() { - return getWrapped().getActionListener(); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#setActionListener(jakarta.faces.event.ActionListener)} on the wrapped {@link Application} object. - *

      - */ - @Override - public void setActionListener(ActionListener listener) { - getWrapped().setActionListener(listener); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getDefaultLocale} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public Locale getDefaultLocale() { - return getWrapped().getDefaultLocale(); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#setDefaultLocale(java.util.Locale)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public void setDefaultLocale(Locale locale) { - getWrapped().setDefaultLocale(locale); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getDefaultRenderKitId} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public String getDefaultRenderKitId() { - return getWrapped().getDefaultRenderKitId(); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#addDefaultValidatorId(String)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public void addDefaultValidatorId(String validatorId) { - getWrapped().addDefaultValidatorId(validatorId); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getDefaultValidatorInfo} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public Map getDefaultValidatorInfo() { - return getWrapped().getDefaultValidatorInfo(); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#setDefaultRenderKitId(String)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public void setDefaultRenderKitId(String renderKitId) { - getWrapped().setDefaultRenderKitId(renderKitId); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getMessageBundle} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public String getMessageBundle() { - return getWrapped().getMessageBundle(); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#setMessageBundle(String)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public void setMessageBundle(String bundle) { - getWrapped().setMessageBundle(bundle); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getNavigationHandler} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public NavigationHandler getNavigationHandler() { - return getWrapped().getNavigationHandler(); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#setNavigationHandler(NavigationHandler)} on the - * wrapped {@link Application} object. - *

      - */ - @Override - public void setNavigationHandler(NavigationHandler handler) { - getWrapped().setNavigationHandler(handler); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getViewHandler} on the wrapped {@link Application} - * object. - *

      - */ - @Override - public ViewHandler getViewHandler() { - return getWrapped().getViewHandler(); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#setViewHandler(ViewHandler)} on the wrapped {@link Application} object. - *

      - * - * @throws IllegalStateException if this method is called after at least one request - * has been processed by the Lifecycle instance for this application. - * @throws NullPointerException if manager is null - */ - @Override - public void setViewHandler(ViewHandler handler) { - getWrapped().setViewHandler(handler); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getStateManager} on the wrapped {@link Application} - * object. - *

      - */ - @Override - public StateManager getStateManager() { - return getWrapped().getStateManager(); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#setStateManager(StateManager)} on the wrapped {@link Application} object. - *

      - * - * @throws IllegalStateException if this method is called after at least one request has - * been processed by the Lifecycle instance for this application. - * @throws NullPointerException if manager is null - */ - @Override - public void setStateManager(StateManager manager) { - getWrapped().setStateManager(manager); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#addComponent(String, String)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public void addComponent(String componentType, String componentClass) { - getWrapped().addComponent(componentType, componentClass); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#createComponent(String)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public UIComponent createComponent(String componentType) throws FacesException { - return getWrapped().createComponent(componentType); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getComponentTypes} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public Iterator getComponentTypes() { - return getWrapped().getComponentTypes(); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#addConverter(String, String)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public void addConverter(String converterId, String converterClass) { - getWrapped().addConverter(converterId, converterClass); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#addConverter(Class, String)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public void addConverter(Class targetClass, String converterClass) { - getWrapped().addConverter(targetClass, converterClass); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#createConverter(String)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public Converter createConverter(String converterId) { - return getWrapped().createConverter(converterId); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#createConverter(Class)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public Converter createConverter(Class targetClass) { - return getWrapped().createConverter(targetClass); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getConverterIds} on the wrapped {@link Application} - * object. - *

      - */ - @Override - public Iterator getConverterIds() { - return getWrapped().getConverterIds(); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getConverterTypes} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public Iterator> getConverterTypes() { - return getWrapped().getConverterTypes(); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getSupportedLocales} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public Iterator getSupportedLocales() { - return getWrapped().getSupportedLocales(); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#setSupportedLocales(java.util.Collection)} on the - * wrapped {@link Application} object. - *

      - */ - @Override - public void setSupportedLocales(Collection locales) { - getWrapped().setSupportedLocales(locales); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#addBehavior(String, String)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public void addBehavior(String behaviorId, String behaviorClass) { - getWrapped().addBehavior(behaviorId, behaviorClass); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#createBehavior(String)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public Behavior createBehavior(String behaviorId) throws FacesException { - return getWrapped().createBehavior(behaviorId); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getBehaviorIds} on the wrapped {@link Application} - * object. - *

      - */ - @Override - public Iterator getBehaviorIds() { - return getWrapped().getBehaviorIds(); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#addValidator(String, String)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public void addValidator(String validatorId, String validatorClass) { - getWrapped().addValidator(validatorId, validatorClass); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#createValidator(String)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public Validator createValidator(String validatorId) throws FacesException { - return getWrapped().createValidator(validatorId); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getValidatorIds} on the wrapped {@link Application} - * object. - *

      - */ - @Override - public Iterator getValidatorIds() { - return getWrapped().getValidatorIds(); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getResourceHandler} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public ResourceHandler getResourceHandler() { - return getWrapped().getResourceHandler(); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#setResourceHandler(ResourceHandler)} on the wrapped {@link Application} object. - *

      - * - * - * This method can throw IllegalStateException and NullPointerException. - * - * - * @throws IllegalStateException if this method is called after at least one request has - * been processed by the Lifecycle instance for this application. - * @throws NullPointerException if resourceHandler is null - */ - @Override - public void setResourceHandler(ResourceHandler resourceHandler) { - getWrapped().setResourceHandler(resourceHandler); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#getResourceBundle(jakarta.faces.context.FacesContext, String)} on the wrapped {@link Application} - * object. - *

      - */ - @Override - public ResourceBundle getResourceBundle(FacesContext ctx, String name) { - return getWrapped().getResourceBundle(ctx, name); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getProjectStage} on the wrapped {@link Application} - * object. - *

      - */ - @Override - public ProjectStage getProjectStage() { - return getWrapped().getProjectStage(); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#addELResolver(jakarta.el.ELResolver)} on the wrapped {@link Application} object. - *

      - * - * @throws IllegalStateException if called after the first request to the - * {@link jakarta.faces.webapp.FacesServlet} has been serviced. - */ - @Override - public void addELResolver(ELResolver resolver) { - getWrapped().addELResolver(resolver); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getELResolver} on the wrapped {@link Application} - * object. - *

      - */ - @Override - public ELResolver getELResolver() { - return getWrapped().getELResolver(); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#createComponent(jakarta.el.ValueExpression, jakarta.faces.context.FacesContext, String)} on the - * wrapped {@link Application} object. - *

      - */ - @Override - public UIComponent createComponent(ValueExpression componentExpression, FacesContext context, String componentType) throws FacesException { - return getWrapped().createComponent(componentExpression, context, componentType); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#createComponent(jakarta.el.ValueExpression, jakarta.faces.context.FacesContext, String, String)} - * on the wrapped {@link Application} object. - *

      - */ - @Override - public UIComponent createComponent(ValueExpression componentExpression, FacesContext context, String componentType, String rendererType) { - return getWrapped().createComponent(componentExpression, context, componentType, rendererType); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#createComponent(jakarta.faces.context.FacesContext, String, String)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public UIComponent createComponent(FacesContext context, String componentType, String rendererType) { - return getWrapped().createComponent(context, componentType, rendererType); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#createComponent(jakarta.faces.context.FacesContext, Resource)} on the wrapped {@link Application} - * object. - *

      - */ - @Override - public UIComponent createComponent(FacesContext context, Resource componentResource) { - return getWrapped().createComponent(context, componentResource); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getExpressionFactory} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public ExpressionFactory getExpressionFactory() { - return getWrapped().getExpressionFactory(); - } - - @Override - public FlowHandler getFlowHandler() { - return getWrapped().getFlowHandler(); - } - - @Override - public void setFlowHandler(FlowHandler newHandler) { - super.setFlowHandler(newHandler); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#evaluateExpressionGet(jakarta.faces.context.FacesContext, String, Class)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public T evaluateExpressionGet(FacesContext context, String expression, Class expectedType) throws ELException { - return getWrapped().evaluateExpressionGet(context, expression, expectedType); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#addELContextListener(jakarta.el.ELContextListener)} - * on the wrapped {@link Application} object. - *

      - */ - @Override - public void addELContextListener(ELContextListener listener) { - getWrapped().addELContextListener(listener); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#removeELContextListener(jakarta.el.ELContextListener)} on the wrapped {@link Application} object. - *

      - */ - @Override - public void removeELContextListener(ELContextListener listener) { - getWrapped().removeELContextListener(listener); - } - - /** - *

      - * The default behavior of this method is to call {@link Application#getELContextListeners} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public ELContextListener[] getELContextListeners() { - return getWrapped().getELContextListeners(); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#publishEvent(jakarta.faces.context.FacesContext, Class, Object)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public void publishEvent(FacesContext context, Class systemEventClass, Object source) { - getWrapped().publishEvent(context, systemEventClass, source); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#publishEvent(jakarta.faces.context.FacesContext, Class, Class, Object)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public void publishEvent(FacesContext context, Class systemEventClass, Class sourceBaseType, Object source) { - getWrapped().publishEvent(context, systemEventClass, sourceBaseType, source); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#subscribeToEvent(Class, Class, jakarta.faces.event.SystemEventListener)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public void subscribeToEvent(Class systemEventClass, Class sourceClass, SystemEventListener listener) { - getWrapped().subscribeToEvent(systemEventClass, sourceClass, listener); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#subscribeToEvent(Class, jakarta.faces.event.SystemEventListener)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public void subscribeToEvent(Class systemEventClass, SystemEventListener listener) { - getWrapped().subscribeToEvent(systemEventClass, listener); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#unsubscribeFromEvent(Class, Class, jakarta.faces.event.SystemEventListener)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public void unsubscribeFromEvent(Class systemEventClass, Class sourceClass, SystemEventListener listener) { - getWrapped().unsubscribeFromEvent(systemEventClass, sourceClass, listener); - } - - /** - *

      - * The default behavior of this method is to call - * {@link Application#unsubscribeFromEvent(Class, jakarta.faces.event.SystemEventListener)} on the wrapped - * {@link Application} object. - *

      - */ - @Override - public void unsubscribeFromEvent(Class systemEventClass, SystemEventListener listener) { - getWrapped().unsubscribeFromEvent(systemEventClass, listener); - } - - @Override - public SearchExpressionHandler getSearchExpressionHandler() { - return getWrapped().getSearchExpressionHandler(); - } - - @Override - public void setSearchExpressionHandler(SearchExpressionHandler searchExpressionHandler) { - getWrapped().setSearchExpressionHandler(searchExpressionHandler); - } - - @Override - public void addSearchKeywordResolver(SearchKeywordResolver resolver) { - getWrapped().addSearchKeywordResolver(resolver); - } - - @Override - public SearchKeywordResolver getSearchKeywordResolver() { - return getWrapped().getSearchKeywordResolver(); - } -} diff --git a/impl/src/main/java/jakarta/faces/application/ConfigurableNavigationHandler.java b/impl/src/main/java/jakarta/faces/application/ConfigurableNavigationHandler.java deleted file mode 100644 index 0f13af0f90..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ConfigurableNavigationHandler.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import java.util.Map; -import java.util.Set; - -import jakarta.faces.context.FacesContext; -import jakarta.faces.flow.Flow; - -/** - *

      - * ConfigurableNavigationHandler extends the contract of - * {@link NavigationHandler} to allow runtime inspection of the {@link NavigationCase}s that make up the rule-base for - * navigation. An implementation compliant with the version of the specification in which this class was introduced (or - * a later version) must make it so that its NavigationHandler is an extension of this class. - *

      - * - * @since 2.0 - */ -public abstract class ConfigurableNavigationHandler extends NavigationHandler { - - /** - *

      - * Return the {@link NavigationCase} representing the navigation that would be taken had - * {@link NavigationHandler#handleNavigation} been called with the same arguments or null if there is no - * such case. - *

      - * - * @param context The {@link FacesContext} for the current request - * @param fromAction The action binding expression that was evaluated to retrieve the specified outcome, or - * null if the outcome was acquired by some other means - * @param outcome The logical outcome returned by a previous invoked application action (which may be null) - * @return the navigation case, or null. - * @throws NullPointerException if context is null - * @since 2.0 - */ - public abstract NavigationCase getNavigationCase(FacesContext context, String fromAction, String outcome); - - /** - *

      - * Return the {@link NavigationCase} representing the navigation that would be taken had - * {@link NavigationHandler#handleNavigation} been called with the same arguments or null if there is no - * such case. Implementations that comply the version of the specification in which this method was introduced must - * override this method. For compatibility with decorated implementations that comply with an earlier version of the - * specification, an implementation is provided that simply calls through to - * {@link #getNavigationCase(jakarta.faces.context.FacesContext, java.lang.String, java.lang.String)}, ignoring the - * {@code toFlowDocumentId} parameter. - *

      - * - * @param context The {@link FacesContext} for the current request - * @param fromAction The action binding expression that was evaluated to retrieve the specified outcome, or - * null if the outcome was acquired by some other means - * @param outcome The logical outcome returned by a previous invoked application action (which may be null) - * @param toFlowDocumentId The value of the toFlowDocumentId property for the navigation case (which may be - * null) - * @return the navigation case, or null. - * @throws NullPointerException if context is null - * @since 2.2 - */ - public NavigationCase getNavigationCase(FacesContext context, String fromAction, String outcome, String toFlowDocumentId) { - return getNavigationCase(context, fromAction, outcome); - } - - /** - *

      - * Return a Map<String, - * Set<NavigationCase>> where the keys are <from-view-id> values and the values are - * Set<NavigationCase> where each element in the Set is a NavigationCase that applies to - * that <from-view-id>. The implementation must support live modifications to this Map. - *

      - * - * @return a map with navigation cases. - * @since 2.0 - */ - public abstract Map> getNavigationCases(); - - /** - *

      - * A convenience method to signal the Jakarta Faces implementation to perform navigation with the provided - * outcome. When the NavigationHandler is invoked, the current viewId is treated as the "from viewId" and the "from - * action" is null. - *

      - * - * @param outcome the provided outcome. - * @throws IllegalStateException if this method is called after this instance has been released - */ - public void performNavigation(String outcome) { - this.handleNavigation(FacesContext.getCurrentInstance(), null, outcome); - } - - /** - *

      - * Called by the flow system to cause the flow to be inspected for navigation rules. For backward compatibility with - * earlier implementations, an empty method is provided. - *

      - * - * @param context the Faces context. - * @param flow the flow. - * @since 2.2 - */ - public void inspectFlow(FacesContext context, Flow flow) { - } -} diff --git a/impl/src/main/java/jakarta/faces/application/ConfigurableNavigationHandlerWrapper.java b/impl/src/main/java/jakarta/faces/application/ConfigurableNavigationHandlerWrapper.java deleted file mode 100644 index eb044c5f25..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ConfigurableNavigationHandlerWrapper.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import java.util.Map; -import java.util.Set; - -import jakarta.faces.FacesWrapper; -import jakarta.faces.context.FacesContext; -import jakarta.faces.flow.Flow; - -/** - *

      - * Provides a simple implementation of {@link ConfigurableNavigationHandler} - * that can be subclassed by developers wishing to provide specialized behavior to an existing - * {@link ConfigurableNavigationHandler} instance. The default implementation of all methods is to call through to the - * wrapped {@link ConfigurableNavigationHandler}. - *

      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - * @since 2.2 - */ -public abstract class ConfigurableNavigationHandlerWrapper extends ConfigurableNavigationHandler implements FacesWrapper { - - private ConfigurableNavigationHandler wrapped; - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public ConfigurableNavigationHandlerWrapper() { - - } - - /** - *

      - * If this configurable navigation handler has been decorated, the implementation doing the decorating should push the - * implementation being wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being - * wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - * @since 2.3 - */ - public ConfigurableNavigationHandlerWrapper(ConfigurableNavigationHandler wrapped) { - this.wrapped = wrapped; - } - - @Override - public ConfigurableNavigationHandler getWrapped() { - return wrapped; - } - - @Override - public NavigationCase getNavigationCase(FacesContext context, String fromAction, String outcome) { - return getWrapped().getNavigationCase(context, fromAction, outcome); - } - - @Override - public Map> getNavigationCases() { - return getWrapped().getNavigationCases(); - } - - @Override - public NavigationCase getNavigationCase(FacesContext context, String fromAction, String outcome, String toFlowDocumentId) { - return getWrapped().getNavigationCase(context, fromAction, outcome, toFlowDocumentId); - } - - @Override - public void handleNavigation(FacesContext context, String fromAction, String outcome) { - getWrapped().handleNavigation(context, fromAction, outcome); - } - - @Override - public void performNavigation(String outcome) { - getWrapped().performNavigation(outcome); - } - - @Override - public void inspectFlow(FacesContext context, Flow flow) { - getWrapped().inspectFlow(context, flow); - } - -} diff --git a/impl/src/main/java/jakarta/faces/application/FacesMessage.java b/impl/src/main/java/jakarta/faces/application/FacesMessage.java deleted file mode 100644 index 8b2b3ad215..0000000000 --- a/impl/src/main/java/jakarta/faces/application/FacesMessage.java +++ /dev/null @@ -1,461 +0,0 @@ -/* - * Copyright (c) 2022, 2023 Contributors to Eclipse Foundation. - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import static java.util.Arrays.asList; -import static java.util.Collections.unmodifiableList; -import static java.util.Collections.unmodifiableMap; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.Serializable; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - *

      - * FacesMessage represents a single validation (or other) message, which is typically associated with a - * particular component in the view. A {@link jakarta.faces.application.FacesMessage} instance may be created based on a - * specific messageId. The specification defines the set of messageIds for which there must be - * {@link jakarta.faces.application.FacesMessage} instances. - *

      - * - *

      - * The implementation must take the following steps when creating FacesMessage instances given a - * messageId: - *

      - * - *
      - * - *

      - * Call {@link Application#getMessageBundle}. If non-null, locate the named ResourceBundle, - * using the Locale from the current {@link jakarta.faces.component.UIViewRoot} and see if it has a value - * for the argument messageId. If it does, treat the value as the summary of the - * FacesMessage. If it does not, or if {@link Application#getMessageBundle} returned null, - * look in the ResourceBundle named by the value of the constant {@link #FACES_MESSAGES} and see if it has - * a value for the argument messageId. If it does, treat the value as the summary of the - * FacesMessage. If it does not, there is no initialization information for the FacesMessage - * instance. - *

      - * - *

      - * In all cases, if a ResourceBundle hit is found for the {messageId}, look for further hits - * under the key {messageId}_detail. Use this value, if present, as the detail for the - * returned FacesMessage. - *

      - * - *

      - * Make sure to perform any parameter substitution required for the summary and detail of the - * FacesMessage. - *

      - * - *
      - * - */ -public class FacesMessage implements Serializable { - - // --------------------------------------------------------------- Constants - - /** - *

      - * ResourceBundle identifier for messages whose message identifiers are defined in the Jakarta Faces - * specification. - *

      - */ - public static final String FACES_MESSAGES = "jakarta.faces.Messages"; - - // ------------------------------------------------- Message Severity Levels - - // Any new Severity values must go at the end of the list, or we will break - // backwards compatibility on serialized instances - - private static final String SEVERITY_INFO_NAME = "INFO"; - /** - *

      - * Message severity level indicating an informational message rather than an error. - *

      - */ - public static final Severity SEVERITY_INFO = new Severity(SEVERITY_INFO_NAME); - - private static final String SEVERITY_WARN_NAME = "WARN"; - - /** - *

      - * Message severity level indicating that an error might have occurred. - *

      - */ - public static final Severity SEVERITY_WARN = new Severity(SEVERITY_WARN_NAME); - - private static final String SEVERITY_ERROR_NAME = "ERROR"; - - /** - *

      - * Message severity level indicating that an error has occurred. - *

      - */ - public static final Severity SEVERITY_ERROR = new Severity(SEVERITY_ERROR_NAME); - - private static final String SEVERITY_FATAL_NAME = "FATAL"; - - /** - *

      - * Message severity level indicating that a serious error has occurred. - *

      - */ - public static final Severity SEVERITY_FATAL = new Severity(SEVERITY_FATAL_NAME); - - /** - *

      - * Array of all defined values, ascending order of ordinal value. Be sure you include any new instances created above, - * in the same order. - *

      - */ - private static final Severity[] values = { SEVERITY_INFO, SEVERITY_WARN, SEVERITY_ERROR, SEVERITY_FATAL }; - - /** - *

      - * Immutable List of valid {@link jakarta.faces.application.FacesMessage.Severity} instances, in ascending - * order of their ordinal value. - *

      - */ - public static final List VALUES = unmodifiableList(asList(values)); - - private static Map _MODIFIABLE_MAP = new HashMap<>(4, 1.0f); - - static { - for (int i = 0, len = values.length; i < len; i++) { - _MODIFIABLE_MAP.put(values[i].severityName, values[i]); - } - } - - /** - *

      - * Immutable Map of valid {@link jakarta.faces.application.FacesMessage.Severity} instances, keyed by name. - *

      - */ - public final static Map VALUES_MAP = unmodifiableMap(_MODIFIABLE_MAP); - - private static final long serialVersionUID = -1180773928220076822L; - - // ------------------------------------------------------ Instance Variables - - private transient Severity severity = SEVERITY_INFO; - private transient String summary = null; - private transient String detail = null; - private transient boolean rendered; - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Construct a new {@link jakarta.faces.application.FacesMessage} with no initial values. The severity is set to - * Severity.INFO. - *

      - */ - public FacesMessage() { - super(); - } - - /** - *

      - * Construct a new {@link jakarta.faces.application.FacesMessage} with just a summary. The detail is null, - * the severity is set to Severity.INFO. - *

      - * - * @param summary the summary. - */ - public FacesMessage(String summary) { - super(); - setSummary(summary); - } - - /** - *

      - * Construct a new {@link jakarta.faces.application.FacesMessage} with the specified initial values. The severity is set - * to Severity.INFO. - *

      - * - * @param summary Localized summary message text - * @param detail Localized detail message text - * - * @throws IllegalArgumentException if the specified severity level is not one of the supported values - */ - public FacesMessage(String summary, String detail) { - super(); - setSummary(summary); - setDetail(detail); - } - - /** - *

      - * Construct a new FacesMessage with the specified initial values. - *

      - * - * @param severity the severity - * @param summary Localized summary message text - * @param detail Localized detail message text - * - * @throws IllegalArgumentException if the specified severity level is not one of the supported values - */ - public FacesMessage(Severity severity, String summary, String detail) { - super(); - setSeverity(severity); - setSummary(summary); - setDetail(detail); - } - - // ---------------------------------------------------------- Public Methods - - /** - *

      - * Return the localized detail text. If no localized detail text has been defined for this message, return the localized - * summary text instead. - *

      - * - * @return the localized detail text. - */ - public String getDetail() { - - if (detail == null) { - return summary; - } - - return detail; - } - - /** - *

      - * Set the localized detail text. - *

      - * - * @param detail The new localized detail text - */ - public void setDetail(String detail) { - this.detail = detail; - } - - /** - *

      - * Return the severity level. - *

      - * - * @return the severity level. - */ - public Severity getSeverity() { - return severity; - } - - /** - *

      - * Set the severity level. - *

      - * - * @param severity The new severity level - * - * @throws IllegalArgumentException if the specified severity level is not one of the supported values - */ - public void setSeverity(Severity severity) { - - if (severity.getOrdinal() < SEVERITY_INFO.getOrdinal() || severity.getOrdinal() > SEVERITY_FATAL.getOrdinal()) { - throw new IllegalArgumentException(String.valueOf(severity)); - } - - this.severity = severity; - } - - /** - *

      - * Return the localized summary text. - *

      - * - * @return the localized summary text. - */ - public String getSummary() { - return summary; - } - - /** - *

      - * Set the localized summary text. - *

      - * - * @param summary The new localized summary text - */ - public void setSummary(String summary) { - this.summary = summary; - } - - /** - * @return true if {@link #rendered()} has been called, otherwise false - * - * @since 2.0 - */ - public boolean isRendered() { - return rendered; - } - - /** - *

      - * Marks this message as having been rendered to the client. - *

      - * - * @since 2.0 - */ - public void rendered() { - rendered = true; - } - - /** - *

      - * Persist {@link jakarta.faces.application.FacesMessage} artifacts, including the non serializable - * Severity. - *

      - * - * @param out The target stream to which the object will be written. - * - * @throws IOException Any of the usual Input/Output related exceptions. - */ - private void writeObject(ObjectOutputStream out) throws IOException { - out.defaultWriteObject(); - out.writeInt(severity.getOrdinal()); - out.writeObject(summary); - out.writeObject(detail); - out.writeObject(rendered); - } - - /** - *

      - * Reconstruct {@link jakarta.faces.application.FacesMessage} from serialized artifacts. - *

      - * - * @param in The binary input of the object to be read - * - * @throws IOException Any of the usual Input/Output related exceptions. - * @throws ClassNotFoundException Class of a serialized object cannot be found. - * - */ - private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - in.defaultReadObject(); - severity = SEVERITY_INFO; - summary = null; - detail = null; - int ordinal = in.readInt(); - if (ordinal == SEVERITY_INFO.getOrdinal()) { - severity = SEVERITY_INFO; - } else if (ordinal == SEVERITY_WARN.getOrdinal()) { - severity = SEVERITY_WARN; - } else if (ordinal == SEVERITY_ERROR.getOrdinal()) { - severity = SEVERITY_ERROR; - } else if (ordinal == SEVERITY_FATAL.getOrdinal()) { - severity = SEVERITY_FATAL; - } - - summary = (String) in.readObject(); - detail = (String) in.readObject(); - rendered = (Boolean) in.readObject(); - } - - /** - *

      - * Class used to represent message severity levels in a typesafe enumeration. - *

      - */ - public static class Severity implements Comparable { - - // ------------------------------------------------------- Constructors - - /** - *

      - * Private constructor to disable the creation of new instances. - *

      - */ - private Severity(String newSeverityName) { - severityName = newSeverityName; - } - - // -------------------------------------------------- Instance Variables - - /** - *

      - * The ordinal value assigned to this instance. - *

      - */ - private final int ordinal = nextOrdinal++; - - /** - *

      - * The (optional) name for this severity. - *

      - */ - String severityName; - - // ----------------------------------------------------- Public Methods - - /** - *

      - * Compare this {@link jakarta.faces.application.FacesMessage.Severity} instance to the specified one. Returns a - * negative integer, zero, or a positive integer if this object is less than, equal to, or greater than the specified - * object. - *

      - * - * @param other The other object to be compared to - */ - @Override - public int compareTo(Object other) { - return ordinal - ((Severity) other).ordinal; - } - - /** - *

      - * Return the ordinal value of this {@link FacesMessage.Severity} instance. - *

      - * - * @return the ordinal. - */ - public int getOrdinal() { - return ordinal; - } - - /** - *

      - * Return a String representation of this {@link FacesMessage.Severity} instance. - *

      - */ - @Override - public String toString() { - if (severityName == null) { - return String.valueOf(ordinal); - } - - return String.valueOf(severityName) + ' ' + ordinal; - } - - // --------------------------------------------------- Static Variables - - /** - *

      - * Static counter returning the ordinal value to be assigned to the next instance that is created. - *

      - */ - private static int nextOrdinal = 0; - - } - -} diff --git a/impl/src/main/java/jakarta/faces/application/NavigationCase.java b/impl/src/main/java/jakarta/faces/application/NavigationCase.java deleted file mode 100644 index 1309740a76..0000000000 --- a/impl/src/main/java/jakarta/faces/application/NavigationCase.java +++ /dev/null @@ -1,393 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import static jakarta.faces.application.SharedUtils.evaluateExpressions; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.List; -import java.util.Map; - -import jakarta.el.ValueExpression; -import jakarta.faces.context.ExternalContext; -import jakarta.faces.context.FacesContext; - -/** - *

      - * NavigationCase represents a <navigation-case> in - * the navigation rule base, as well as the <from-view-id> with - * which this <navigation-case> is a sibling. - *

      - * - * @since 2.0 - */ -public class NavigationCase { - - private final String fromViewId; - private final String fromAction; - private final String fromOutcome; - private final String condition; - private final String toViewId; - private final String toFlowDocumentId; - private final Map> parameters; - private final boolean redirect; - private final boolean includeViewParams; - - private ValueExpression toViewIdExpr; - private ValueExpression conditionExpr; - private String toString; - private int hashCode; - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Construct a new NavigationCase based on the provided arguments. - * See section 7.4.2 "Default NavigationHandler Algorithm" of the Jakarta Faces Specification Document for how a - * NavigationCase is used by the standard {@link ConfigurableNavigationHandler} - *

      - * - * @param fromViewId return from {@link #getFromViewId} - * @param fromAction return from {@link #getFromAction} - * @param fromOutcome return from {@link #getFromOutcome} - * @param condition A string to be interpreted as a ValueExpression by a call to {@link #getCondition} - * @param toViewId return from {@link #getToViewId} - * @param parameters return from {@link #getParameters} - * @param redirect return from {@link #isRedirect} - * @param includeViewParams return {@link #isIncludeViewParams} - */ - public NavigationCase(String fromViewId, String fromAction, String fromOutcome, String condition, String toViewId, Map> parameters, - boolean redirect, boolean includeViewParams) { - - this.fromViewId = fromViewId; - this.fromAction = fromAction; - this.fromOutcome = fromOutcome; - this.condition = condition; - this.toViewId = toViewId; - toFlowDocumentId = null; - this.parameters = parameters; - this.redirect = redirect; - this.includeViewParams = includeViewParams; - - } - - /** - *

      - * Construct a new NavigationCase based on the provided arguments. - * See section 7.4.2 "Default NavigationHandler Algorithm" of the Jakarta Faces Specification Document - * for how a NavigationCase is used by the standard {@link ConfigurableNavigationHandler} - *

      - * - * @param fromViewId return from {@link #getFromViewId} - * @param fromAction return from {@link #getFromAction} - * @param fromOutcome return from {@link #getFromOutcome} - * @param condition A string to be interpreted as a ValueExpression by a call to {@link #getCondition} - * @param toViewId return from {@link #getToViewId} - * @param toFlowDocumentId the toFlow documentId. - * @param parameters return from {@link #getParameters} - * @param redirect return from {@link #isRedirect} - * @param includeViewParams return {@link #isIncludeViewParams} - */ - public NavigationCase(String fromViewId, String fromAction, String fromOutcome, String condition, String toViewId, String toFlowDocumentId, - Map> parameters, boolean redirect, boolean includeViewParams) { - - this.fromViewId = fromViewId; - this.fromAction = fromAction; - this.fromOutcome = fromOutcome; - this.condition = condition; - this.toViewId = toViewId; - this.toFlowDocumentId = toFlowDocumentId; - this.parameters = parameters; - this.redirect = redirect; - this.includeViewParams = includeViewParams; - - } - - // ---------------------------------------------------------- Public Methods - - /** - *

      - * Construct an absolute URL to this NavigationCase instance using - * {@link jakarta.faces.application.ViewHandler#getActionURL} on the path portion of the url. - *

      - * - * @param context the {@link FacesContext} for the current request - * @return the action URL. - * @throws MalformedURLException if the process of constructing the URL causes this exception to be thrown. - */ - public URL getActionURL(FacesContext context) throws MalformedURLException { - ExternalContext extContext = context.getExternalContext(); - - return new URL(extContext.getRequestScheme(), extContext.getRequestServerName(), extContext.getRequestServerPort(), - context.getApplication().getViewHandler().getActionURL(context, getToViewId(context))); - } - - /** - *

      - * Construct an absolute URL to this NavigationCase instance using - * {@link jakarta.faces.application.ViewHandler#getResourceURL} on the path portion of the url. - *

      - * - * @param context the {@link FacesContext} for the current request - * @return the resource URL. - * @throws MalformedURLException if the process of constructing the URL causes this exception to be thrown. - */ - public URL getResourceURL(FacesContext context) throws MalformedURLException { - ExternalContext extContext = context.getExternalContext(); - - return new URL(extContext.getRequestScheme(), extContext.getRequestServerName(), extContext.getRequestServerPort(), - context.getApplication().getViewHandler().getResourceURL(context, getToViewId(context))); - } - - /** - *

      - * Construct an absolute URL suitable for a "redirect" to this NavigationCase instance using - * {@link jakarta.faces.application.ViewHandler#getRedirectURL} on the path portion of the url. - *

      - * - * @param context the {@link FacesContext} for the current request - * @return the redirect URL. - * @throws MalformedURLException if the process of constructing the URL causes this exception to be thrown. - */ - public URL getRedirectURL(FacesContext context) throws MalformedURLException { - ExternalContext extContext = context.getExternalContext(); - - return new URL(extContext.getRequestScheme(), extContext.getRequestServerName(), extContext.getRequestServerPort(), context.getApplication() - .getViewHandler().getRedirectURL(context, getToViewId(context), evaluateExpressions(context, getParameters()), isIncludeViewParams())); - } - - /** - *

      - * Construct an absolute URL suitable for a bookmarkable link to this NavigationCase instance using - * {@link jakarta.faces.application.ViewHandler#getBookmarkableURL} on the path portion of the url. This URL may include - * view parameters specified as metadata within the view. - *

      - * - * @param context the {@link FacesContext} for the current request - * @return the bookmarkable URL. - * @throws MalformedURLException if the process of constructing the URL causes this exception to be thrown. - */ - public URL getBookmarkableURL(FacesContext context) throws MalformedURLException { - ExternalContext extContext = context.getExternalContext(); - - return new URL(extContext.getRequestScheme(), extContext.getRequestServerName(), extContext.getRequestServerPort(), - context.getApplication().getViewHandler().getBookmarkableURL(context, getToViewId(context), getParameters(), isIncludeViewParams())); - } - - /** - *

      - * Return the <from-view-id> of the <navigation-rule> inside which this - * <navigation-case> is nested. - *

      - * - * @return the from viedId. - */ - public String getFromViewId() { - return fromViewId; - } - - /** - *

      - * Return the <from-action> for this <navigation-case> - *

      - * - * @return the from action. - */ - public String getFromAction() { - return fromAction; - } - - /** - *

      - * Return the <from-outcome> for this <navigation-case> - *

      - * - * @return the from outcome. - */ - public String getFromOutcome() { - return fromOutcome; - } - - /** - *

      - * Evaluates the <to-view-id> for this <navigation-case> - *

      - * - * @param context the {@link FacesContext} for the current request - * - * @return the view ID that should be navigated to - */ - public String getToViewId(FacesContext context) { - if (toViewIdExpr == null) { - toViewIdExpr = context.getApplication().getExpressionFactory().createValueExpression(context.getELContext(), toViewId, String.class); - } - - String newToViewId = (String) toViewIdExpr.getValue(context.getELContext()); - if (newToViewId.charAt(0) != '/') { - newToViewId = '/' + newToViewId; - } - - return newToViewId; - } - - /** - *

      - * If this navigation case represents a flow invocation, this property is the documentId in which the flow whose id is - * given by the return from {@link #getFromOutcome()} is defined. Implementations must override this method to return - * the value defined in the corresponding application configuration resources element. The base implementation returns - * the empty string. - *

      - * - * @return the toFlow documentId. - * @since 2.2 - */ - public String getToFlowDocumentId() { - return toFlowDocumentId; - } - - /** - *

      - * Test if this navigation case has an associated <if> element. - * - * @return true if there's an <if> element associated with this - * <navigation-case>, otherwise false - */ - public boolean hasCondition() { - return condition != null; - } - - /** - *

      - * Evaluates the <if> for this <navigation-case>, if any. The expression to be - * evaluated is passed into the constructor as a string. When the expression is evaluated, its value must be coerced - * into a boolean per the normal Jakarta Expression Language coercion rules. - *

      - * - * Note throws any exceptions encountered during the process of evaluating the expression or obtaining its value. - * - * @param context the {@link FacesContext} for the current request - * - * @return null if there is no <if> element associated with this - * <navigation-case>, otherwise return the evaluation result of the condition - */ - public Boolean getCondition(FacesContext context) { - if (conditionExpr == null && condition != null) { - conditionExpr = context.getApplication().getExpressionFactory().createValueExpression(context.getELContext(), condition, Boolean.class); - } - - return conditionExpr != null ? (Boolean) conditionExpr.getValue(context.getELContext()) : null; - } - - /** - *

      - * Return the parameters to be included for navigation cases requiring a redirect. If no parameters are defined, - * null will be returned. The keys in the Map are parameter names. For each key, the - * corresponding value is a List of unconverted values. - *

      - * - * @return the list of parameters, or null - */ - public Map> getParameters() { - return parameters; - } - - /** - *

      - * Return the <redirect> value for this <navigation-case>. This will be - * true if the new view should be navigated to via a - * {@link jakarta.faces.context.ExternalContext#redirect(String)} - *

      - * - * @return true if this is a redirect, false otherwise. - */ - public boolean isRedirect() { - return redirect; - } - - /** - *

      - * Return the <redirect> value for this <navigation-case>. This will be - * true if the view parametets should be encoded into the redirect URL (only applies to redirect case) - *

      - * - * @return true if view parameters are to be included, false otherwise. - */ - public boolean isIncludeViewParams() { - return includeViewParams; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - NavigationCase that = (NavigationCase) o; - - return redirect == that.redirect && !(fromAction != null ? !fromAction.equals(that.fromAction) : that.fromAction != null) - && !(fromOutcome != null ? !fromOutcome.equals(that.fromOutcome) : that.fromOutcome != null) - && !(condition != null ? !condition.equals(that.condition) : that.condition != null) - && !(fromViewId != null ? !fromViewId.equals(that.fromViewId) : that.fromViewId != null) - && !(toViewId != null ? !toViewId.equals(that.toViewId) : that.toViewId != null) - && !(toFlowDocumentId != null ? !toFlowDocumentId.equals(that.toFlowDocumentId) : that.toFlowDocumentId != null) - && !(parameters != null ? !parameters.equals(that.parameters) : that.parameters != null); - - } - - @Override - public int hashCode() { - if (hashCode == 0) { - int result = fromViewId != null ? fromViewId.hashCode() : 0; - result = 31 * result + (fromAction != null ? fromAction.hashCode() : 0); - result = 31 * result + (fromOutcome != null ? fromOutcome.hashCode() : 0); - result = 31 * result + (condition != null ? condition.hashCode() : 0); - result = 31 * result + (toViewId != null ? toViewId.hashCode() : 0); - result = 31 * result + (toFlowDocumentId != null ? toFlowDocumentId.hashCode() : 0); - result = 31 * result + (redirect ? 1 : 0); - result = 31 * result + (parameters != null ? parameters.hashCode() : 0); - hashCode = result; - } - - return hashCode; - - } - - @Override - public String toString() { - if (toString == null) { - StringBuilder sb = new StringBuilder(64); - sb.append("NavigationCase{"); - sb.append("fromViewId='").append(fromViewId).append('\''); - sb.append(", fromAction='").append(fromAction).append('\''); - sb.append(", fromOutcome='").append(fromOutcome).append('\''); - sb.append(", if='").append(condition).append('\''); - sb.append(", toViewId='").append(toViewId).append('\''); - sb.append(", faces-redirect=").append(redirect); - sb.append(", includeViewParams=").append(includeViewParams).append('\''); - sb.append(", parameters=").append(parameters != null ? parameters.toString() : ""); - sb.append('}'); - toString = sb.toString(); - } - - return toString; - } - -} diff --git a/impl/src/main/java/jakarta/faces/application/NavigationCaseWrapper.java b/impl/src/main/java/jakarta/faces/application/NavigationCaseWrapper.java deleted file mode 100644 index 2883d9c34a..0000000000 --- a/impl/src/main/java/jakarta/faces/application/NavigationCaseWrapper.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.List; -import java.util.Map; - -import jakarta.faces.FacesWrapper; -import jakarta.faces.context.FacesContext; - -/** - *

      - * Provides a simple implementation of {@link NavigationCase} that can be - * subclassed by developers wishing to provide specialized behavior to an existing {@link NavigationCase} instance. The - * default implementation of all methods is to call through to the wrapped {@link NavigationCase} instance. - *

      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - * @since 2.2 - */ -public abstract class NavigationCaseWrapper extends NavigationCase implements FacesWrapper { - - private NavigationCase wrapped; - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public NavigationCaseWrapper() { - this(null); - } - - /** - *

      - * If this navigation case has been decorated, the implementation doing the decorating should push the implementation - * being wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - * @since 2.3 - */ - public NavigationCaseWrapper(NavigationCase wrapped) { - super((String) null, (String) null, (String) null, (String) null, (String) null, (Map>) null, false, false); - this.wrapped = wrapped; - } - - @Override - public NavigationCase getWrapped() { - return wrapped; - } - - @Override - public boolean equals(Object o) { - return getWrapped().equals(o); - } - - @Override - public int hashCode() { - return getWrapped().hashCode(); - } - - @Override - public String toString() { - return getWrapped().toString(); - } - - @Override - public URL getActionURL(FacesContext context) throws MalformedURLException { - return getWrapped().getActionURL(context); - } - - @Override - public URL getBookmarkableURL(FacesContext context) throws MalformedURLException { - return getWrapped().getBookmarkableURL(context); - } - - @Override - public Boolean getCondition(FacesContext context) { - return getWrapped().getCondition(context); - } - - @Override - public String getFromAction() { - return getWrapped().getFromAction(); - } - - @Override - public String getFromOutcome() { - return getWrapped().getFromOutcome(); - } - - @Override - public String getFromViewId() { - return getWrapped().getFromViewId(); - } - - @Override - public Map> getParameters() { - return getWrapped().getParameters(); - } - - @Override - public URL getRedirectURL(FacesContext context) throws MalformedURLException { - return getWrapped().getRedirectURL(context); - } - - @Override - public URL getResourceURL(FacesContext context) throws MalformedURLException { - return getWrapped().getResourceURL(context); - } - - @Override - public String getToViewId(FacesContext context) { - return getWrapped().getToViewId(context); - } - - @Override - public String getToFlowDocumentId() { - return getWrapped().getToFlowDocumentId(); - } - - @Override - public boolean hasCondition() { - return getWrapped().hasCondition(); - } - - @Override - public boolean isIncludeViewParams() { - return getWrapped().isIncludeViewParams(); - } - - @Override - public boolean isRedirect() { - return getWrapped().isRedirect(); - } - -} diff --git a/impl/src/main/java/jakarta/faces/application/NavigationHandler.java b/impl/src/main/java/jakarta/faces/application/NavigationHandler.java deleted file mode 100644 index ea76de2427..0000000000 --- a/impl/src/main/java/jakarta/faces/application/NavigationHandler.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import jakarta.faces.context.FacesContext; - -/** - *

      - * A NavigationHandler is passed the - * outcome string returned by an application action invoked for this application, and will use this (along with related - * state information) to choose the view to be displayed next. - *

      - * - *

      - * A default implementation of NavigationHandler must be provided by the Jakarta Faces - * implementation, which will be utilized unless setNavigationHandler() is called to establish a different - * one. An implementation of this class must be thread-safe. This default - * instance will compare the view identifier of the current view, the specified action binding, and the specified - * outcome against any navigation rules provided in faces-config.xml file(s). If a navigation case matches, - * the current view will be changed by a call to FacesContext.setViewRoot(). Note that a null - * outcome value will never match any navigation rule, so it can be used as an indicator that the current view should be - * redisplayed. - *

      - */ - -public abstract class NavigationHandler { - - /** - *

      - * Perform navigation processing based on the state information in the - * specified {@link FacesContext}, plus the outcome string returned by an executed application action. - *

      - * - *

      - * If the implementation class also extends {@link ConfigurableNavigationHandler}, the implementation must guarantee - * that the logic used in a call to {@link ConfigurableNavigationHandler#getNavigationCase} is used in this method to - * determine the correct navigation. - *

      - * - *

      - * This method must set the render targets (used in partial rendering) to render all invoking - * {@link jakarta.faces.context.PartialViewContext#setRenderAll}) if the view identifier has changed as the result of an - * application action (to take into account Ajax requests). - *

      - * - * @param context The {@link FacesContext} for the current request - * @param fromAction The action binding expression that was evaluated to retrieve the specified outcome, or - * null if the outcome was acquired by some other means - * @param outcome The logical outcome returned by a previous invoked application action (which may be null) - * - * @throws NullPointerException if context is null - */ - public abstract void handleNavigation(FacesContext context, String fromAction, String outcome); - - /** - *

      - * Overloaded variant of - * {@link #handleNavigation(jakarta.faces.context.FacesContext, java.lang.String, java.lang.String)} that allows the - * caller to provide the defining document id for a flow to be entered by this navigation. For backward compatibility - * with decorated {@code NavigationHandler} implementations that conform to an earlier version of the specification, an - * implementation is provided that calls through to - * {@link #handleNavigation(jakarta.faces.context.FacesContext, java.lang.String, java.lang.String)}, ignoring the - * {@code toFlowDocumentId} parameter. - *

      - * - * @param context The {@link FacesContext} for the current request - * @param fromAction The action binding expression that was evaluated to retrieve the specified outcome, or - * null if the outcome was acquired by some other means - * @param outcome The logical outcome returned by a previous invoked application action (which may be null) - * @param toFlowDocumentId The defining document id of the flow into which this navigation will cause entry. - * - * @throws NullPointerException if context is null - */ - public void handleNavigation(FacesContext context, String fromAction, String outcome, String toFlowDocumentId) { - this.handleNavigation(context, fromAction, outcome); - } - -} diff --git a/impl/src/main/java/jakarta/faces/application/NavigationHandlerWrapper.java b/impl/src/main/java/jakarta/faces/application/NavigationHandlerWrapper.java deleted file mode 100644 index 67ba4fede0..0000000000 --- a/impl/src/main/java/jakarta/faces/application/NavigationHandlerWrapper.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import jakarta.faces.FacesWrapper; -import jakarta.faces.context.FacesContext; - -/** - *

      - * NavigationHandlerWrapper provides a simple implementation of - * {@link NavigationHandler} that can be subclassed by developers wishing to provide specialized behavior to an existing - * {@link NavigationHandler} instance. The default implementation of all methods is to call through to the wrapped - * {@link NavigationHandler} instance. - *

      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - * @since 2.2 - */ -public abstract class NavigationHandlerWrapper extends NavigationHandler implements FacesWrapper { - - private NavigationHandler wrapped; - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public NavigationHandlerWrapper() { - - } - - /** - *

      - * If this navigation handler has been decorated, the implementation doing the decorating should push the implementation - * being wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - * @since 2.3 - */ - public NavigationHandlerWrapper(NavigationHandler wrapped) { - this.wrapped = wrapped; - } - - @Override - public NavigationHandler getWrapped() { - return wrapped; - } - - @Override - public void handleNavigation(FacesContext context, String fromAction, String outcome) { - getWrapped().handleNavigation(context, fromAction, outcome); - } - - @Override - public void handleNavigation(FacesContext context, String fromAction, String outcome, String toFlowDocumentId) { - getWrapped().handleNavigation(context, fromAction, outcome, toFlowDocumentId); - } - -} diff --git a/impl/src/main/java/jakarta/faces/application/ProjectStage.java b/impl/src/main/java/jakarta/faces/application/ProjectStage.java deleted file mode 100644 index f31f68dbe3..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ProjectStage.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -/** - * - *

      - * This class enables a feature similar to the RAILS_ENV feature of the Ruby on Rails web framework. The - * constants in this class represent the current state of the running application in a typical product development - * lifecycle. The value of this state may be queried at any time after application startup by calling - * {@link Application#getProjectStage}. - *

      - * - * @since 2.0 - */ -public enum ProjectStage { - - /** - *

      - * This value indicates the currently running application is right now, at this moment, being developed. This value will - * usually be set during iterative development. - *

      - */ - Development, - - /** - *

      - * This value indicates the currently running application is undergoing unit testing. - *

      - */ - UnitTest, - /** - *

      - * This value indicates the currently running application is undergoing system testing. - *

      - */ - SystemTest, - - /** - *

      - * This value indicates the currently running application is deployed in production. - *

      - */ - Production; - - /** - *

      - * The value of this constant is the value of the param-name for setting the current value to be returned - * by {@link Application#getProjectStage}. - *

      - */ - public static final String PROJECT_STAGE_PARAM_NAME = "jakarta.faces.PROJECT_STAGE"; - - /** - *

      - * The value of this constant is the name used for JNDI lookups for setting the current value to be returned by - * {@link Application#getProjectStage}. - *

      - */ - public static final String PROJECT_STAGE_JNDI_NAME = "java:comp/env/faces/ProjectStage"; - -} diff --git a/impl/src/main/java/jakarta/faces/application/ProtectedViewException.java b/impl/src/main/java/jakarta/faces/application/ProtectedViewException.java deleted file mode 100644 index bb2b6f432c..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ProtectedViewException.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import jakarta.faces.FacesException; - -/** - *

      - * This exception is thrown by the runtime when a violation of the view protection mechanism is encountered. - *

      - * - * @since 2.2 - */ -public class ProtectedViewException extends FacesException { - - private static final long serialVersionUID = -1906819977415598769L; - - /** - *

      - * Construct a new exception with no detail message or root cause. - *

      - */ - public ProtectedViewException() { - } - - /** - *

      - * Construct a new exception with the specified detail message and no root cause. - *

      - * - * @param message The detail message for this exception - */ - public ProtectedViewException(String message) { - super(message); - } - - /** - *

      - * Construct a new exception with the specified root cause. The detail message will be set to - * (cause == null ? null : - * cause.toString() - * - * @param cause The root cause for this exception - */ - public ProtectedViewException(Throwable cause) { - super(cause); - } - - /** - *

      - * Construct a new exception with the specified detail message and root cause. - *

      - * - * @param message The detail message for this exception - * @param cause The root cause for this exception - */ - public ProtectedViewException(String message, Throwable cause) { - super(message, cause); - } - -} diff --git a/impl/src/main/java/jakarta/faces/application/Resource.java b/impl/src/main/java/jakarta/faces/application/Resource.java deleted file mode 100644 index 627f30c7a7..0000000000 --- a/impl/src/main/java/jakarta/faces/application/Resource.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.util.Map; - -import jakarta.faces.context.FacesContext; -import jakarta.servlet.ServletRegistration; - -/** - *

      - * An instance of - * Resource is a Java object representation of the artifact that is served up in response to a resource - * request from the client. Instances of Resource are normally created and initialized via calls to - * {@link ResourceHandler#createResource}. See the documentation for {@link ResourceHandler} for more information. - *

      - * - *
      - * - * @since 2.0 - */ -public abstract class Resource extends ViewResource { - - /** - *

      - * This constant is used as the key in the component attribute map of a composite component to associate the component - * with its Resource instance. The value for this key is the actual Resource instance. - *

      - * - */ - public static final String COMPONENT_RESOURCE_KEY = "jakarta.faces.application.Resource.ComponentResource"; - - private String contentType; - private String libraryName; - private String resourceName; - - // ---------------------------------------------------------- Public Methods - - /** - *

      - * Return the MIME content-type for this resource. - *

      - * - * @return the MIME content-type for this resource. - */ - public String getContentType() { - return contentType; - } - - /** - * - *

      - * Set the MIME content-type for this resource. The default implementation performs no validation on the argument. - *

      - * - * @param contentType the MIME content-type for this resource. The default implementation must accept null - * as a parameter. - */ - public void setContentType(String contentType) { - this.contentType = contentType; - } - - /** - *

      - * Return the libraryName for this resource. May be null. The libraryName for a resource is an optional - * String that indicates membership in a "resource library". All resources with the same libraryName belong to the same - * "resource library". The "resource library" concept allows disambiguating resources that have the same resourceName. - * See {@link ResourceHandler} for more information. - *

      - * - * @return Return the libraryName for this resource. May be null. - */ - public String getLibraryName() { - return libraryName; - } - - /** - *

      - * Set the libraryName for this resource. - *

      - * - * @param libraryName the libraryName for this resource. The default implementation must accept null for - * the libraryName. - */ - public void setLibraryName(String libraryName) { - this.libraryName = libraryName; - } - - /** - *

      - * Return the resourceName for this resource. Will never be null. All Resource instances must have a - * resourceName. - *

      - * - * @return Return the resourceName for this resource. Will never be null. - */ - public String getResourceName() { - return resourceName; - } - - /** - *

      - * Set the resourceName for this resource. - *

      - * - * @param resourceName a non-null String. - * - * @throws NullPointerException if argument resourceName is null. - */ - public void setResourceName(String resourceName) { - - if (resourceName == null) { - throw new NullPointerException("All resources must have a non-null resourceName."); - } - - this.resourceName = resourceName; - } - - /** - *

      - * If the current request is a resource request, (that is, - * {@link ResourceHandler#isResourceRequest} returns true), return an InputStream containing - * the bytes of the resource. Otherwise, throw an IOException. - *

      - * - * @return an InputStream containing the bytes of the resource. - * - *

      - * Any Jakarta Expression Language expressions present in the resource must be evaluated before serving the bytes of the - * resource. Note that due to browser and server caching, Jakarta Expression Language expressions in a resource file - * will generally only be evaluated once, when the resource is first served up. Therefore, using Jakarta Expression - * Language expressions that refer to per-request data is not advisable since this data can become stale. - *

      - * - * @throws IOException if the current request is not a resource request. - */ - public abstract InputStream getInputStream() throws IOException; - - /** - *

      - * Returns a mutable Map<String, String> whose entries will be sent as response headers during - * {@link ResourceHandler#handleResourceRequest}. The entries in this map must not persist beyond the scope of a single - * request. Any modifications made to the map after the resource has been served will be ignored by the run-time. - *

      - * - * @return a mutable Map<String, String> of headers that will be included with the response. - */ - public abstract Map getResponseHeaders(); - - /** - *

      - * Return a path to this resource such that, when the - * browser resolves it against the base URI for the view that includes the resource, and issues a GET request to the - * resultant fully qualified URL, the bytes of the resource are returned in response. - *

      - * - *
      - * - *

      - * The default implementation must implement the following algorithm. For discussion, the return result from this method - * will be called result. - *

      - * - *
        - * - *
      • - *

        - * Get the context-root for this web application, not ending in slash. For discussion this will be called - * contextRoot. - *

        - *
      • - * - *
      • - *

        - * Discover if the FacesServlet is prefix (path) mapped, extension mapped, or exact mapped (as defined by - * Servlet.12.2.) and the value of the mapping (including the leading '.' in the case of extension mapping). For - * discussion, this will be facesServletMapping. - *

        - * - *
        - *

        - * If exact mapped, result must be the following if and only if the FacesServlet is mapped to the exact URL - * pattern {@link ResourceHandler#RESOURCE_IDENTIFIER} + {@link #getResourceName} - *

        - * - *
        - *

        - * result = contextRoot + {@link - * ResourceHandler#RESOURCE_IDENTIFIER} + {@link #getResourceName} - *

        - *
        - * - *

        - * If exact mapped, and the FacesServlet is not mapped to the exact URL pattern - * {@link ResourceHandler#RESOURCE_IDENTIFIER} + {@link #getResourceName} do the following: - *

        - * - *

        - * Retrieve the existing mappings of the FacesServlet, e.g. using {@link ServletRegistration#getMappings()}, and from - * those pick any prefix mapping or extension mapping. If no such mapping is found, throw an - * {@link IllegalStateException}. If such mapping is found remove the * character from that mapping, take - * that as the new facesServletMapping and continue with evaluating this mapping as specified below for if - * prefix mapped and for if extension mapped

        - * - *

        - * If prefix mapped, result must be - *

        - * - *
        - *

        - * result = contextRoot + '/' + - * facesServletMapping + {@link - * ResourceHandler#RESOURCE_IDENTIFIER} + '/' + {@link - * #getResourceName} - *

        - *
        - * - *

        - * If extension mapped, result must be - *

        - * - *
        - *

        - * result = contextRoot + {@link - * ResourceHandler#RESOURCE_IDENTIFIER} + {@link #getResourceName} + - * facesServletMapping - *

        - *
        - * - *
      • - * - *
      • - *

        - * Build up a string, called resourceMetaData which is an & separated string of name=value pairs suitable - * for inclusion in a URL query string. - *

        - * - *
        - * - *

        - * If {@link #getLibraryName} returns non-null, resourceMetaData must include "ln=" + the - * return from {@link #getLibraryName} - *

        - * - *

        - * If there is a localePrefix for this application, as defined in {@link ResourceHandler#LOCALE_PREFIX}, - * resourceMetaData must include "loc=" + the localePrefix. - *

        - * - * - *

        - * If this resource is contained in a resource library contract, resourceMetaData must include "con=" + the - * name of the resource library contract. - *

        - * - *
        - * - *

        - * Append "?" + resourceMetaData to result. - *

        - * - *
      • - * - *
      • - *

        - * Make it portlet safe by passing the result through {@link ViewHandler#getResourceURL}. - *

        - *
      • - * - *
      - * - *
      - * - * @return the path to this resource, intended to be included in the encoded view that is sent to the browser when - * sending a faces response. - */ - public abstract String getRequestPath(); - - /** - *

      - * Return an actual URL instance that refers to this resource instance. - *

      - * - * @return Return an actual URL instance that refers to this resource instance. - */ - @Override - public abstract URL getURL(); - - /** - *

      - * Call through to {@link #getRequestPath} and return the result. - *

      - * - * @return Call through to {@link #getRequestPath} and return the result. - */ - @Override - public String toString() { - return getRequestPath(); - } - - /** - *

      - * Return true if the user-agent requesting this resource needs - * an update. If the {@code If-Modified-Since} HTTP header is available for this - * request, its value must be consulted, as specified in Section 14.25 of IETF RFC 2616, to determine the result. - * Returns false if the user-agent does not need an update for this resource. - *

      - * - * @param context the Faces context. - * @return true or false depending on whether or not the user-agent needs an update of this - * resource. - */ - public abstract boolean userAgentNeedsUpdate(FacesContext context); - -} diff --git a/impl/src/main/java/jakarta/faces/application/ResourceDependencies.java b/impl/src/main/java/jakarta/faces/application/ResourceDependencies.java deleted file mode 100644 index 78dd156d0a..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ResourceDependencies.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -/** - *

      - * Container annotation to specify multiple {@link ResourceDependency} annotations on a single class. Example: - *

      - * - *
      - * 
      -@ResourceDependencies( {
      -  @ResourceDependency(library="corporate", name="css_master.css"),
      -  @ResourceDependency(library="client01", name="layout.css"),
      -  @ResourceDependency(library="corporate", name="typography.css"),
      -  @ResourceDependency(library="client01", name="colorAndMedia.css"),
      -  @ResourceDependency(library="corporate", name="table2.css"),
      -  @ResourceDependency(library="fancy", name="commontaskssection.css"),
      -  @ResourceDependency(library="fancy", name="progressBar.css"),
      -  @ResourceDependency(library="fancy", name="css_ns6up.css")
      -                       })
      -
      - * 
      - * - * - *
      - * - *

      - * The action described in {@link ResourceDependency} must be taken for each @ResourceDependency - * present in the container annotation. - *

      - * - *
      - */ -@Retention(RUNTIME) -@Target(TYPE) -@Inherited -public @interface ResourceDependencies { - - /** - * The individual resource dependencies - * @return The individual resource dependencies - */ - ResourceDependency[] value(); -} diff --git a/impl/src/main/java/jakarta/faces/application/ResourceDependency.java b/impl/src/main/java/jakarta/faces/application/ResourceDependency.java deleted file mode 100644 index b79a91be2d..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ResourceDependency.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Inherited; -import java.lang.annotation.Repeatable; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -/** - *

      - * Instances of {@link jakarta.faces.component.UIComponent} or {@link jakarta.faces.render.Renderer} that have this - * annotation (or {@link ResourceDependencies} attached at the class level will automatically have a resource dependency - * added so that the named resource will be present in user agent's view of the UIViewRoot in which this - * component or renderer is used. - *

      - * - *
      - * - *

      - * The default implementation must support attaching this annotation to {@link jakarta.faces.component.UIComponent} or - * {@link jakarta.faces.render.Renderer} classes. In both cases, the event that precipitates the processing of this - * annotation is the insertion of a UIComponent instance into the view hierarchy on an initial request for - * a view. When that event happens, the following action must be taken. - *

      - * - *
        - *
      1. - *

        - * If this annotation is not present on the class in question, no action must be taken. - *

        - *
      2. - * - *
      3. - *

        - * Create a {@link jakarta.faces.component.UIOutput} instance by passing jakarta.faces.Output. to - * {@link Application#createComponent(java.lang.String)}. - *

        - *
      4. - * - *
      5. - *

        - * Get the annotation instance from the class and obtain the values of the name, library, and - * target attributes. - *

        - *
      6. - * - *
      7. - *

        - * If library is the empty string, let library be null. - *

        - *
      8. - * - *
      9. - *

        - * If target is the empty string, let target be null. - *

        - *
      10. - * - *
      11. - *

        - * Obtain the renderer-type for the resource name by passing name to - * {@link ResourceHandler#getRendererTypeForResourceName}. - *

        - *
      12. - * - *
      13. - *

        - * Call setRendererType on the UIOutput instance, passing the renderer-type. - *

        - *
      14. - * - *
      15. - *

        - * Obtain the Map of attributes from the UIOutput component by calling - * {@link jakarta.faces.component.UIComponent#getAttributes}. - *

        - *
      16. - * - *
      17. - *

        - * Store the name into the attributes Map under the key "name". - *

        - *
      18. - * - *
      19. - *

        - * If library is non-null, store it under the key "library". - *

        - *
      20. - * - *
      21. - *

        - * If target is non-null, store it under the key "target". - *

        - *
      22. - * - *
      23. - *

        - * Otherwise, if target is null, call - * {@link jakarta.faces.component.UIViewRoot#addComponentResource(jakarta.faces.context.FacesContext, jakarta.faces.component.UIComponent)}, - * passing the UIOutput instance as the second argument. - *

        - *
      24. - *
      - * - *

      - * Example: - *

      - * - *
      - * 
      -  @ResourceDependency(library="corporate", name="colorAndMedia.css"),
      -
      - * 
      - * - * - *
      - * - * @since 2.0 - */ -@Retention(RUNTIME) -@Target(TYPE) -@Inherited -@Repeatable(ResourceDependencies.class) -public @interface ResourceDependency { - - /** - *

      - * The resourceName of the resource pointed to by this ResourceDependency. It is valid to have - * Jakarta Expression Language Expressions in the value of this attribute, as long as the expression resolves to an - * instance of the expected type. - *

      - * - * @return the name. - */ - public String name(); - - /** - *

      - * The libraryName in which the resource pointed to by this ResourceDependency resides. If not - * specified, defaults to the empty string. It is valid to have Jakarta Expression Language Expressions in the value of - * this attribute, as long as the expression resolves to an instance of the expected type. - *

      - * - * @return the library. - */ - public String library() default ""; - - /** - *

      - * The value given for this attribute will be passed as the "target" argument to - * {@link jakarta.faces.component.UIViewRoot#addComponentResource(jakarta.faces.context.FacesContext, jakarta.faces.component.UIComponent, java.lang.String)}. - * If this attribute is specified, - * {@link jakarta.faces.component.UIViewRoot#addComponentResource(jakarta.faces.context.FacesContext,jakarta.faces.component.UIComponent)} - * must be called instead, as described above. It is valid to have Jakarta Expression Language Expressions in the value - * of this attribute, as long as the expression resolves to an instance of the expected type. - *

      - * - * @return the target. - */ - public String target() default ""; - -} diff --git a/impl/src/main/java/jakarta/faces/application/ResourceHandler.java b/impl/src/main/java/jakarta/faces/application/ResourceHandler.java deleted file mode 100644 index 9acd56e630..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ResourceHandler.java +++ /dev/null @@ -1,750 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import java.io.IOException; -import java.util.HashSet; -import java.util.Set; -import java.util.stream.Stream; - -import jakarta.faces.context.FacesContext; - -/** - *

      - * ResourceHandler is the - * run-time API by which {@link jakarta.faces.component.UIComponent} and {@link jakarta.faces.render.Renderer} - * instances, and the {@link jakarta.faces.view.ViewDeclarationLanguage} can reference - * {@link Resource} instances. An implementation of this class must be thread-safe. - *

      - * - *
      - * - *

      - * Packaging Resources - *

      - * - *
      - * - *

      - * ResourceHandler defines a path based packaging convention for resources. The default implementation of - * ResourceHandler must support packaging resources in the classpath or in the web application root. See - * section 2.6.1 "Packaging Resources" of the Jakarta Faces Specification Document - * for the normative specification of packaging resources. - *

      - * - *

      - * Briefly, The default implementation must support packaging resources in the web application root under the path - *

      - * - *

      - * resources/<resourceIdentifier> - *

      - * - *

      - * relative to the web app root. "resources" is the default location, but this location - * can be changed by the value of the {@link #WEBAPP_RESOURCES_DIRECTORY_PARAM_NAME} - * <context-param>. - *

      - * - *

      - * For the default implementation, resources packaged in the classpath must reside under the JAR entry name - *

      - * - *

      - * META-INF/resources/<resourceIdentifier> - *

      - * - *
      - * - *

      - * In the case of Faces Flows packaged within jar files, resources packaged in the classpath must reside under the jar - * entry name - *

      - * - *

      - * META-INF/flows/<resourceIdentifier> - *

      - * - *
      - * - *

      - * <resourceIdentifier> consists of several segments, specified as follows. - *

      - * - *

      - * [localePrefix/][libraryName/][libraryVersion/]resourceName[/resourceVersion] - *

      - * - *

      - * None of the segments in the resourceIdentifier may be relative paths, such as ‘../otherLibraryName’. The - * implementation is not required to support the libraryVersion and resourceVersion segments - * for the JAR packaging case. - *

      - * - *

      - * Note that resourceName is the only required segment. - *

      - * - *
      - * - *

      - * Encoding Resources - *

      - * - *
      - * - *

      - * During the handling of view requests, the Jakarta Server Face run-time may be called upon to encode a resource in - * such a way as to instruct the user-agent to make a subsequent resource request. This behavior is orchestrated by one - * of the resource renderers (ScriptRenderer, StylesheetRenderer, ImageRenderer), - * which all call {@link Resource#getRequestPath} to obtain the encoded URI for the resource. See - * {@link Resource#getRequestPath} and the Standard HTML RenderKit specification for the complete specification. - *

      - * - *

      - * This usage of resources does not apply for resources that correspond to VDL resources. - *

      - * - *
      - * - *

      - * Decoding Resources - *

      - * - *
      - * - *

      - * During the handling of resource requests, the Jakarta Faces run-time will be called upon to decode a resource - * in such a way as to serve up the bytes of the resource to the user-agent. This behavior is orchestrated by - * {@link #handleResourceRequest}, which calls {@link Resource#getInputStream} to obtain bytes of the resource. See - * {@link #handleResourceRequest} for the complete specification. - *

      - * - *

      - * This usage of resources does not apply for resources that correspond to VDL resources. - *

      - * - *
      - * - *
      - * - * @since 2.0 - */ -public abstract class ResourceHandler { - - /** - *

      - * {@link Resource#getRequestPath} returns the value of this constant as the prefix of the URI. - * {@link #handleResourceRequest(jakarta.faces.context.FacesContext)} looks for the value of this constant within the - * request URI to determine if the request is a resource request or a view request. - *

      - */ - public static final String RESOURCE_IDENTIFIER = "/jakarta.faces.resource"; - - /** - *

      - * Resource name of Jakarta Faces script resource. - *

      - * - * @since 2.3 - * @deprecated Use {@link #FACES_SCRIPT_RESOURCE_NAME} instead. - */ - @Deprecated(since = "4.0", forRemoval = true) - public static final String JSF_SCRIPT_RESOURCE_NAME = "faces.js"; - - /** - *

      - * Resource name of Jakarta Faces script resource. - *

      - * - * @since 2.3 - */ - public static final String FACES_SCRIPT_RESOURCE_NAME = "faces.js"; - - /** - *

      - * Library name of Jakarta Faces script resource. - *

      - * - * @since 2.3 - * @deprecated Use {@link #FACES_SCRIPT_LIBRARY_NAME} instead. - */ - @Deprecated(since = "4.0", forRemoval = true) - public static final String JSF_SCRIPT_LIBRARY_NAME = "jakarta.faces"; - - /** - *

      - * Library name of Jakarta Faces script resource. - *

      - * - * @since 2.3 - */ - public static final String FACES_SCRIPT_LIBRARY_NAME = "jakarta.faces"; - - /** - *

      - * This file must be located in META-INF/contracts/<contractName>/ in a jar file that contains a - * resource library contract, where <contractName> is the name of the contract. If the jar file - * contains multiple contracts, the marker file must be present in each one. See “constant field values” for - * the name of the file that must be placed at that location. - *

      - * - * @since 2.2 - */ - public static final String RESOURCE_CONTRACT_XML = "jakarta.faces.contract.xml"; - - /** - *

      - * If a <context-param> with the param name equal to the value of - * {@link #WEBAPP_RESOURCES_DIRECTORY_PARAM_NAME} exists, the runtime must interpret its value as a path, relative to - * the web app root, where resources are to be located. This param value must not start with a "/", though it may - * contain "/" characters. If no such <context-param> exists, or its value is invalid, the value - * "resources", without the quotes, must be used by the runtime as the value. - *

      - * - * @since 2.2 - */ - public static final String WEBAPP_RESOURCES_DIRECTORY_PARAM_NAME = "jakarta.faces.WEBAPP_RESOURCES_DIRECTORY"; - - /** - *

      - * If a <context-param> with the param name equal to the value of - * {@link #WEBAPP_CONTRACTS_DIRECTORY_PARAM_NAME} exists, the runtime must interpret its value as a path, relative to - * the web app root, where resource library contracts are to be located. This param value must not start with a "/", - * though it may contain "/" characters. If no such <context-param> exists, or its value is invalid, - * the value "contracts", without the quotes, must be used by the runtime as the value. - *

      - * - * @since 2.2 - */ - public static final String WEBAPP_CONTRACTS_DIRECTORY_PARAM_NAME = "jakarta.faces.WEBAPP_CONTRACTS_DIRECTORY"; - - /** - *

      - * The name of a key within the application message bundle named by the return from {@link Application#getMessageBundle} - * whose value is the locale prefix used to find a packaged resource to return from {@link #createResource} (or one of - * its variants). - */ - public static final String LOCALE_PREFIX = "jakarta.faces.resource.localePrefix"; - - /** - *

      - * The ServletContext init parameter consulted by the {@link #handleResourceRequest} to tell which kinds of - * resources must never be served up in response to a resource request. The value of this parameter is a single space - * separated list of file extensions, including the leading '.' character (without the quotes). If not specified, the - * default value given in the value of the {@link #RESOURCE_EXCLUDES_DEFAULT_VALUE} constant is used. If manually - * specified, the given value entirely overrides the default one and does not supplement it. - *

      - */ - public static final String RESOURCE_EXCLUDES_PARAM_NAME = "jakarta.faces.RESOURCE_EXCLUDES"; - - /** - *

      - * The default value for the {@link #RESOURCE_EXCLUDES_PARAM_NAME} init param. - *

      - */ - public static final String RESOURCE_EXCLUDES_DEFAULT_VALUE = ".class .jsp .jspx .properties .xhtml .groovy"; - - // ---------------------------------------------------------- Public Methods - - /** - *

      - * Create an instance of ViewResource given the argument - * resourceName. The content-type of the resource is derived by passing the resourceName to - * {@link jakarta.faces.context.ExternalContext#getMimeType} - *

      - * - *
      - * - *

      - * The algorithm specified in section 2.6.1.4 "Libraries of Localized and Versioned Resources" of the Jakarta Faces Specification Document - * must be executed to create - * the Resource. New requirements were introduced in version 2.2 of the - * specification. For historical reasons, this method operate correctly when the argument {@code resourceName} is of the - * form {@code libraryName/resourceName}, even when {@code resourceName} contains '/' characters. - *

      - * - *
      - * - * @param resourceName the name of the resource. - * - * @throws NullPointerException if resourceName is null. - * - * @return a newly created Resource instance, suitable for use in encoding or decoding the named resource. - */ - public abstract Resource createResource(String resourceName); - - /** - *

      - * Create an instance of Resource given the argument resourceName, which may contain "/" - * characters. The {@link jakarta.faces.view.ViewDeclarationLanguage} calls this method when it needs to load a view - * from a persistent store, such as a filesystem. This method is functionality equivalent to - * {@link #createResource(java.lang.String)}, but all callsites that need to load VDL views must use this method so that - * classes that want to decorate the ResourceHandler in order to only affect the loading of views may do so - * without affecting the processing of other kinds of resources, such as scripts and stylesheets. A - * {@link jakarta.faces.context.FacesContext} must be present before calling this method. To preserve compatibility with - * prior revisions of the specification, a default implementation must be provided that calls - * {@link #createResource(java.lang.String)}. - *

      - * - *
      - * - *

      - * The default implementation must look for the resource in the following places, in this order. - *

      - * - *
        - * - *
      • - *

        - * Considering resource library contracts (at the locations specified in the - * Jakarta Faces Specification Document section 2.7 "Resource Library Contracts"). - *

        - *
      • - * - *
      • - *

        - * Considering the web app root. - *

        - *
      • - * - *
      • - *

        - * Considering faces flows (at the locations specified in the - * Jakarta Faces Specification Document section 11.3.3 "Faces Flows"). - *

        - *
      • - * - *
      - * - *

      - * Call {@link FacesContext#getResourceLibraryContracts}. If the result is non-{@code null} and not empty, for each - * value in the list, treat the value as the name of a resource library contract. If the argument {@code resoureName} - * exists as a resource in the resource library contract, return it. Otherwise, return the resource (not in the resource - * library contract), if found. Otherwise, return {@code null}. - *

      - *
      - * - * @param context the {@link FacesContext} for this request. - * @param resourceName the name of the resource to be interpreted as a view by the - * {@link jakarta.faces.view.ViewDeclarationLanguage}. - * - * @throws NullPointerException if resourceName is {@code null}. - * - * @return a newly created {@link ViewResource} instance, suitable for use by the - * {@link jakarta.faces.view.ViewDeclarationLanguage}. - * - * @since 2.2 - */ - public ViewResource createViewResource(FacesContext context, String resourceName) { - return context.getApplication().getResourceHandler().createResource(resourceName); - } - - /** - *

      - * Return a {@code Stream} possibly lazily populated by walking the resource tree rooted at a given initial path. The - * resource tree is traversed breadth-first, the elements in the stream are view resource names that would - * yield a {@code ViewResource} when passed into {@link ResourceHandler#createViewResource} as the {@code resourceName} - * parameter. - *

      - * - *

      - * The {@code maxDepth} parameter is the maximum depth of directory levels to visit beyond the initial path, - * which is always visited. The value is relative to the root ({@code /}), not to the given initial path. E.g. given - * {@code maxDepth} = {@code 3} and initial path {@code /foo/}, visiting will proceed up to {@code /foo/bar/}, where - * {@code /} counts as depth {@code 1}, {@code /foo/} as depth {@code 2} and {@code /foo/bar/} as depth {@code 3}. A - * value lower or equal to the depth of the initial path means that only the initial path is visited. A value of - * {@link Integer#MAX_VALUE MAX_VALUE} may be used to indicate that all levels should be visited. - * - * @param facesContext The {@link FacesContext} for this request. - * @param path The initial path from which to start looking for view resources - * @param maxDepth The absolute maximum depth of nested directories to visit counted from the root ({@code /}). - * @param options The options to influence the traversal. See {@link ResourceVisitOption} for details on those. - * - * @return the {@link Stream} of view resource names - * - * @since 2.3 - */ - public Stream getViewResources(FacesContext facesContext, String path, int maxDepth, ResourceVisitOption... options) { - return Stream.empty(); - } - - /** - *

      - * Return a {@code Stream} possibly lazily populated by walking the resource tree rooted at a given initial path. The - * resource tree is traversed breadth-first, the elements in the stream are view resource names that would - * yield a {@code ViewResource} when passed into {@link ResourceHandler#createViewResource} as the {@code resourceName} - * parameter. - *

      - * - *

      - * This method works as if invoking it were equivalent to evaluating the expression:

      - * - *
      -     * getViewResources(facesContext, start, Integer.MAX_VALUE, options)
      -     * 
      - * - *
      Put differently, it visits all levels of the resource tree. - * - * @param facesContext The {@link FacesContext} for this request. - * @param path The initial path from which to start looking for view resources - * @param options The options to influence the traversal. See {@link ResourceVisitOption} for details on those. - * - * @return the {@link Stream} of view resource names - * - * @since 2.3 - */ - public Stream getViewResources(FacesContext facesContext, String path, ResourceVisitOption... options) { - return Stream.empty(); - } - - /** - *

      - * Create an instance of Resource given the argument resourceId. The content-type of the - * resource is derived by passing the resourceName to {@link jakarta.faces.context.ExternalContext#getMimeType} - *

      - * - *
      - * - *

      - * The resource must be identified according to the specification in - * section 2.6.1.3 "Resource Identifiers" of the Jakarta Faces Specification Document. New requirements were - * introduced in version 2.2 of the specification. - *

      - * - *
      - * - * @param resourceId the resource identifier of the resource. - * - * @throws NullPointerException if resourceId is null. - * - * @return a newly created Resource instance, suitable for use in encoding or decoding the named resource. - * - * @since 2.2 - */ - public Resource createResourceFromId(String resourceId) { - return null; - } - - /** - *

      - * Create an instance of Resource with a resourceName given by - * the value of the argument resourceName that is a member of the library named by the argument - * libraryName. The content-type of the resource is derived by passing the resourceName to - * {@link jakarta.faces.context.ExternalContext#getMimeType}. - *

      - * - *
      - * - *

      - * The algorithm specified in section 2.6.1.4 "Libraries of Localized and Versioned Resources" of the Jakarta Faces Specification Document - * must be executed to create - * the Resource. New requirements were introduced in version 2.2 of the - * specification. - *

      - * - *
      - * - * @param resourceName the name of the resource. - * - * @param libraryOrContractName the name of the library (or contract) in which this - * resource resides, may be null. If there is a conflict between the name of a resource library and a - * resource library contract, the resource library takes precedence. May not - * include relative paths, such as "../". - * - * @throws NullPointerException if resourceName is null - * - * @return a newly created Resource instance, suitable for use in encoding or decoding the named resource. - */ - public abstract Resource createResource(String resourceName, String libraryOrContractName); - - /** - *

      - * Create an instance of Resource with a resourceName - * given by the value of the argument resourceName that is a member of the library named by the argument - * libraryName that claims to have the content-type given by the argument content-type. - *

      - * - *
      - * - *

      - * The algorithm specified in section 2.6.1.4 "Libraries of Localized and Versioned Resources" of the Jakarta Faces Specification Document - * must be executed to create - * the Resource. New requirements were introduced in version 2.2 of the - * specification. - *

      - * - *
      - * - * @param resourceName the name of the resource. - * - * @param libraryName the name of the library in which this resource resides, may be null. - * May not include relative paths, such as "../". - * - * @param contentType the mime content that this Resource instance will return from - * {@link Resource#getContentType}. If the value is null, The content-type of the resource is derived by - * passing the resourceName to {@link jakarta.faces.context.ExternalContext#getMimeType} - * - * @throws NullPointerException if resourceName is null. - * - * @return a newly created Resource instance, suitable for use in encoding or decoding the named resource. - */ - public abstract Resource createResource(String resourceName, String libraryName, String contentType); - - /** - *

      - * Return true if the resource library named by the argument - * libraryName can be found. If there is a localePrefix for - * this application, as defined in {@link #LOCALE_PREFIX}, first look for the library with the prefix. If no such - * library is found, look for the library without the prefix. This allows developers to avoid duplication of files. For - * example, consider the case where the developer wants to have a resource library containing a localized image resource - * and a non-localized script resource. By checking both locations for the existence of the library, along with other - * spec changes in section 2.6.1.4 "Libraries of Localized and Versioned Resources" of the Jakarta Faces Specification Document, - * this scenario is enabled. - *

      - * - * @param libraryName the library name. - * @return true if the library exists, false otherwise. - * @since 2.0 - * - */ - public abstract boolean libraryExists(String libraryName); - - /** - *

      - * This method specifies the contract for satisfying resource requests. This method is called from - * {@link jakarta.faces.webapp.FacesServlet#service} after that method determines the current request is a resource - * request by calling {@link #isResourceRequest}. Thus, handleResourceRequest may assume that the current - * request is a resource request. - *

      - * - *
      - * - *

      - * The default implementation must implement an algorithm semantically identical to the following algorithm. - *

      - * - * For discussion, in all cases when a status code is to be set, this spec talks only using the Jakarta Servlet API, but - * it is understood that in a portlet environment the appropriate equivalent API must be used. - * - *
        - * - *
      • - *

        - * If the resourceIdentifier ends with any of the extensions listed in the value of the - * {@link #RESOURCE_EXCLUDES_PARAM_NAME} init parameter, HttpServletRequest.SC_NOT_FOUND must be passed to - * HttpServletResponse.setStatus(), then handleResourceRequest must immediately return. - *

        - *
      • - * - *
      • - *

        - * Extract the resourceName from the resourceIdentifier by taking the substring of - * resourceIdentifier that starts at {@link - * #RESOURCE_IDENTIFIER}.length() + 1 and goes to the end of resourceIdentifier. If no - * resourceName can be extracted, HttpServletRequest.SC_NOT_FOUND must be passed to - * HttpServletResponse.setStatus(), then handleResourceRequest must immediately return. - *

        - *
      • - * - *
      • - *

        - * Extract the libraryName from the request by looking in the request parameter map for an entry under the key - * "ln", without the quotes. If found, use its value as the libraryName. - *

        - *
      • - * - *
      • - *

        - * If resourceName and libraryName are present, call {@link #createResource(String, String)} to create - * the Resource. If only resourceName is present, call {@link #createResource(String)} to create - * the Resource. If the Resource cannot be successfully created, - * HttpServletRequest.SC_NOT_FOUND must be passed to HttpServletResponse.setStatus(), then - * handleResourceRequest must immediately return. - *

        - *
      • - * - *
      • - *

        - * Call {@link Resource#userAgentNeedsUpdate}. If this method returns false, - * HttpServletRequest.SC_NOT_MODIFIED must be passed to HttpServletResponse.setStatus(), then - * handleResourceRequest must immediately return. - *

        - *
      • - * - *
      • - *

        - * Pass the result of {@link Resource#getContentType} to HttpServletResponse.setContentType. - *

        - *
      • - * - *
      • - *

        - * Call {@link Resource#getResponseHeaders}. For each entry in this Map, call - * HttpServletResponse.setHeader(), passing the key as the first argument and the value as the second - * argument. - *

        - *
      • - * - *
      • - *

        - * Call {@link Resource#getInputStream} and serve up the bytes of the resource to the response. - *

        - *
      • - * - *
      • - *

        - * Call HttpServletResponse.setContentLength() passing the byte count of the resource. - *

        - *
      • - * - *
      • - *

        - * If an IOException is thrown during any of the previous steps, log a descriptive, localized message, - * including the resourceName and libraryName (if present). Then, - * HttpServletRequest.SC_NOT_FOUND must be passed to HttpServletResponse.setStatus(), then - * handleResourceRequest must immediately return. - *

        - *
      • - * - *
      • - *

        - * In all cases in this method, any streams, channels, sockets, or any other IO resources must be closed before this - * method returns. - *

        - *
      • - * - *
      - * - *
      - * - * @param context the {@link jakarta.faces.context.FacesContext} for this request - * @throws IOException when an I/O error occurs. - */ - public abstract void handleResourceRequest(FacesContext context) throws IOException; - - /** - *

      - * Return true if the current request is a resource request. This method is called by - * {@link jakarta.faces.webapp.FacesServlet#service} to determine if this request is a view request or a - * resource request. - *

      - * - * @param context the {@link jakarta.faces.context.FacesContext} for this request - * @return true if the current request is a resource request, false otherwise. - */ - public abstract boolean isResourceRequest(FacesContext context); - - /** - *

      - * Return {@code true} if the argument {@code url} contains the string given by the value of the constant - * {@link ResourceHandler#RESOURCE_IDENTIFIER}, false otherwise. - *

      - * - * @param url the url to inspect for the presence of {@link ResourceHandler#RESOURCE_IDENTIFIER}. - * @return true if this is a resource URL, false otherwise. - * @throws NullPointerException if the argument url is {@code null}. - */ - public boolean isResourceURL(String url) { - if (url == null) { - throw new NullPointerException("null url"); - } - - return url.contains(RESOURCE_IDENTIFIER); - } - - /** - *

      - * Return the renderer-type for a {@link jakarta.faces.render.Renderer} that is capable of rendering this - * resource. The default implementation must return values according to the following table. If no - * renderer-type can be determined, null must be returned. - *

      - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
      resource name to renderer-type mapping
      example resource namerenderer-type
      mycomponent.jsjakarta.faces.resource.Script
      mystyle.cssjakarta.faces.resource.Stylesheet
      - * - * @param resourceName the resource name. - * @return the renderer type. - */ - public abstract String getRendererTypeForResourceName(String resourceName); - - /** - *

      - * Mark the resource as identified by given resource and library name as rendered. The default implementation must - * ensure that {@link #isResourceRendered(FacesContext, String, String)} will return true when the resource - * has already been rendered during the render response phase of the current view. - *

      - * - * @param context The {@link FacesContext} for this request. - * @param resourceName The name of the resource. - * @param libraryName The name of the library in which the resource resides, may be null. - * @since 2.3 - */ - @SuppressWarnings("unchecked") - public void markResourceRendered(FacesContext context, String resourceName, String libraryName) { - String resourceIdentifier = libraryName + ":" + resourceName; - Set resourceIdentifiers = (Set) context.getAttributes().computeIfAbsent(RESOURCE_IDENTIFIER, k -> new HashSet<>()); - resourceIdentifiers.add(resourceIdentifier); - } - - /** - *

      - * Returns whether the resource as identified by given resource and library name has been rendered. The default - * implementation must during the render response phase of the current view return true when the resource - * has been marked as rendered via {@link #markResourceRendered(FacesContext, String, String)}. - *

      - * - * @param context The {@link FacesContext} for this request. - * @param resourceName The name of the resource. - * @param libraryName The name of the library in which this resource resides, may be null. - * @return Whether the resource as identified by given resource and library name has been rendered. - * @since 2.3 - */ - @SuppressWarnings("unchecked") - public boolean isResourceRendered(FacesContext context, String resourceName, String libraryName) { - String resourceIdentifier = libraryName + ":" + resourceName; - Set resourceIdentifiers = (Set) context.getAttributes().get(RESOURCE_IDENTIFIER); - return resourceIdentifiers != null && resourceIdentifiers.contains(resourceIdentifier); - } - -} diff --git a/impl/src/main/java/jakarta/faces/application/ResourceHandlerWrapper.java b/impl/src/main/java/jakarta/faces/application/ResourceHandlerWrapper.java deleted file mode 100644 index f198855553..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ResourceHandlerWrapper.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import java.io.IOException; -import java.util.stream.Stream; - -import jakarta.faces.FacesWrapper; -import jakarta.faces.context.FacesContext; - -/** - *

      - * Provides a simple - * implementation of {@link ResourceHandler} that can be subclassed by developers wishing to provide specialized - * behavior to an existing {@link ResourceHandler} instance. The default implementation of all methods is to call - * through to the wrapped {@link ResourceHandler}. - *

      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - * @since 2.0 - */ -public abstract class ResourceHandlerWrapper extends ResourceHandler implements FacesWrapper { - - private ResourceHandler wrapped; - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public ResourceHandlerWrapper() { - - } - - /** - *

      - * If this resource handler has been decorated, the implementation doing the decorating should push the implementation - * being wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - * @since 2.3 - */ - public ResourceHandlerWrapper(ResourceHandler wrapped) { - this.wrapped = wrapped; - } - - @Override - public ResourceHandler getWrapped() { - return wrapped; - } - - // -------------------------------------------- Methods from ResourceHandler - - /** - *

      - * The default behavior of this method is to call {@link ResourceHandler#createResource(String)} on the wrapped - * {@link ResourceHandler} object. - *

      - */ - @Override - public Resource createResource(String resourceName) { - return getWrapped().createResource(resourceName); - } - - /** - *

      - * The default behavior of this method is to call {@link ResourceHandler#createResourceFromId(String)} on the wrapped - * {@link ResourceHandler} object. - *

      - * - * @since 2.2 - */ - @Override - public Resource createResourceFromId(String resourceId) { - return getWrapped().createResourceFromId(resourceId); - } - - /** - *

      - * The default behavior of this method is to call {@link ResourceHandler#createResource(String, String)} on the wrapped - * {@link ResourceHandler} object. - *

      - */ - @Override - public Resource createResource(String resourceName, String libraryName) { - return getWrapped().createResource(resourceName, libraryName); - } - - /** - *

      - * The default behavior of this method is to call {@link ResourceHandler#createViewResource} on the wrapped - * {@link ResourceHandler} object. - *

      - */ - @Override - public ViewResource createViewResource(FacesContext context, String resourceName) { - return getWrapped().createViewResource(context, resourceName); - } - - /** - *

      - * The default behavior of this method is to call - * {@link ResourceHandler#getViewResources(FacesContext, String, int, ResourceVisitOption...)} on the wrapped - * {@link ResourceHandler} object. - *

      - * - * @since 2.3 - */ - @Override - public Stream getViewResources(FacesContext facesContext, String path, int maxDepth, ResourceVisitOption... options) { - return getWrapped().getViewResources(facesContext, path, maxDepth, options); - } - - /** - *

      - * The default behavior of this method is to call - * {@link ResourceHandler#getViewResources(FacesContext, String, ResourceVisitOption...)} on the wrapped - * {@link ResourceHandler} object. - *

      - * - * @since 2.3 - */ - @Override - public Stream getViewResources(FacesContext facesContext, String path, ResourceVisitOption... options) { - return getWrapped().getViewResources(facesContext, path, options); - } - - /** - *

      - * The default behavior of this method is to call {@link ResourceHandler#createResource(String, String, String)} on the - * wrapped {@link ResourceHandler} object. - *

      - */ - @Override - public Resource createResource(String resourceName, String libraryName, String contentType) { - return getWrapped().createResource(resourceName, libraryName, contentType); - } - - /** - *

      - * The default behavior of this method is to call - * {@link ResourceHandler#handleResourceRequest(jakarta.faces.context.FacesContext)} on the wrapped - * {@link ResourceHandler} object. - *

      - */ - @Override - public void handleResourceRequest(FacesContext context) throws IOException { - getWrapped().handleResourceRequest(context); - } - - /** - *

      - * The default behavior of this method is to call - * {@link ResourceHandler#isResourceRequest(jakarta.faces.context.FacesContext)} on the wrapped {@link ResourceHandler} - * object. - *

      - */ - @Override - public boolean isResourceRequest(FacesContext context) { - return getWrapped().isResourceRequest(context); - } - - /** - *

      - * The default behavior of this method is to call {@link ResourceHandler#isResourceURL} on the wrapped - * {@link ResourceHandler} object. - *

      - */ - @Override - public boolean isResourceURL(String url) { - return getWrapped().isResourceURL(url); - } - - /** - *

      - * The default behavior of this method is to call {@link ResourceHandler#libraryExists(String)} on the wrapped - * {@link ResourceHandler} object. - *

      - */ - @Override - public boolean libraryExists(String libraryName) { - return getWrapped().libraryExists(libraryName); - } - - /** - *

      - * The default behavior of this method is to call {@link ResourceHandler#getRendererTypeForResourceName(String)} on the - * wrapped {@link ResourceHandler} object. - *

      - */ - @Override - public String getRendererTypeForResourceName(String resourceName) { - return getWrapped().getRendererTypeForResourceName(resourceName); - } - - /** - *

      - * The default behavior of this method is to call - * {@link ResourceHandler#markResourceRendered(FacesContext, String, String)} on the wrapped {@link ResourceHandler} - * object. - *

      - * - * @since 2.3 - */ - @Override - public void markResourceRendered(FacesContext context, String resourceName, String libraryName) { - getWrapped().markResourceRendered(context, resourceName, libraryName); - } - - /** - *

      - * The default behavior of this method is to call - * {@link ResourceHandler#isResourceRendered(FacesContext, String, String)} on the wrapped {@link ResourceHandler} - * object. - *

      - * - * @since 2.3 - */ - @Override - public boolean isResourceRendered(FacesContext context, String resourceName, String libraryName) { - return getWrapped().isResourceRendered(context, resourceName, libraryName); - } - -} diff --git a/impl/src/main/java/jakarta/faces/application/ResourceVisitOption.java b/impl/src/main/java/jakarta/faces/application/ResourceVisitOption.java deleted file mode 100644 index c9fb0fa475..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ResourceVisitOption.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -/** - *

      - * Defines the resource traversal options. - *

      - * - * @since 2.3 - * - * @see ResourceHandler#getViewResources(jakarta.faces.context.FacesContext, String, int, ResourceVisitOption...) - * - */ -public enum ResourceVisitOption { - - /** - * Only visit resources that are top level views, i.e. views that can be used to serve a request as opposed to those - * that can only be used for includes. - */ - TOP_LEVEL_VIEWS_ONLY - -} diff --git a/impl/src/main/java/jakarta/faces/application/ResourceWrapper.java b/impl/src/main/java/jakarta/faces/application/ResourceWrapper.java deleted file mode 100644 index 954fc838a6..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ResourceWrapper.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.util.Map; - -import jakarta.faces.FacesWrapper; -import jakarta.faces.context.FacesContext; - -/** - *

      - * Provides a simple implementation of {@link Resource} - * that can be subclassed by developers wishing to provide specialized behavior to an existing {@link Resource} - * instance. The default implementation of all methods is to call through to the wrapped {@link Resource}. - *

      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - * @since 2.0 - */ -public abstract class ResourceWrapper extends Resource implements FacesWrapper { - - private Resource wrapped; - - /** - *

      - * If this resource has been decorated, the implementation doing the decorating should push the implementation being - * wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - * @since 2.3 - */ - public ResourceWrapper(Resource wrapped) { - this.wrapped = wrapped; - } - - @Override - public Resource getWrapped() { - return wrapped; - } - - // --------------------------------------------------- Methods from Resource - - /** - *

      - * The default behavior of this method is to call {@link Resource#getInputStream} on the wrapped {@link ResourceHandler} - * object. - *

      - */ - @Override - public InputStream getInputStream() throws IOException { - return getWrapped().getInputStream(); - } - - /** - *

      - * The default behavior of this method is to call {@link Resource#getURL} on the wrapped {@link ResourceHandler} object. - *

      - */ - @Override - public URL getURL() { - return getWrapped().getURL(); - } - - /** - *

      - * The default behavior of this method is to call {@link Resource#getResponseHeaders} on the wrapped - * {@link ResourceHandler} object. - *

      - */ - @Override - public Map getResponseHeaders() { - return getWrapped().getResponseHeaders(); - } - - /** - *

      - * The default behavior of this method is to call {@link Resource#getRequestPath} on the wrapped {@link ResourceHandler} - * object. - *

      - */ - @Override - public String getRequestPath() { - return getWrapped().getRequestPath(); - } - - /** - *

      - * The default behavior of this method is to call {@link Resource#userAgentNeedsUpdate} on the wrapped - * {@link ResourceHandler} object. - *

      - */ - @Override - public boolean userAgentNeedsUpdate(FacesContext context) { - return getWrapped().userAgentNeedsUpdate(context); - } - - /** - *

      - * The default behavior of this method is to call {@link Resource#getContentType()} on the wrapped - * {@link ResourceHandler} object. - *

      - */ - @Override - public String getContentType() { - return getWrapped().getContentType(); - } - - /** - *

      - * The default behavior of this method is to call {@link Resource#setContentType(String)} on the wrapped - * {@link ResourceHandler} object. - *

      - */ - @Override - public void setContentType(String contentType) { - getWrapped().setContentType(contentType); - } - - /** - *

      - * The default behavior of this method is to call {@link Resource#getLibraryName()} on the wrapped - * {@link ResourceHandler} object. - *

      - */ - @Override - public String getLibraryName() { - return getWrapped().getLibraryName(); - } - - /** - *

      - * The default behavior of this method is to call {@link Resource#setLibraryName(String)} on the wrapped - * {@link ResourceHandler} object. - *

      - */ - @Override - public void setLibraryName(String libraryName) { - getWrapped().setLibraryName(libraryName); - } - - /** - *

      - * The default behavior of this method is to call {@link Resource#getResourceName()} on the wrapped - * {@link ResourceHandler} object. - *

      - */ - @Override - public String getResourceName() { - return getWrapped().getResourceName(); - } - - /** - *

      - * The default behavior of this method is to call {@link Resource#setResourceName(String)} on the wrapped - * {@link ResourceHandler} object. - *

      - */ - @Override - public void setResourceName(String resourceName) { - getWrapped().setResourceName(resourceName); - } - - // --------------------------------------------------- Deprecated methods - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public ResourceWrapper() { - - } - -} diff --git a/impl/src/main/java/jakarta/faces/application/SharedUtils.java b/impl/src/main/java/jakarta/faces/application/SharedUtils.java deleted file mode 100644 index e2a82a6365..0000000000 --- a/impl/src/main/java/jakarta/faces/application/SharedUtils.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import jakarta.faces.context.FacesContext; - -class SharedUtils { - - /* - * Determine whether String is a mixed value binding expression or not. - */ - static boolean isMixedExpression(String expression) { - - if (null == expression) { - return false; - } - - // if it doesn't start and end with delimiters - return !(expression.startsWith("#{") && expression.endsWith("}")) && isExpression(expression); - - } - - /* - * Determine whether String is a value binding expression or not. - */ - static boolean isExpression(String expression) { - - if (null == expression) { - return false; - } - - // check to see if attribute has an expression - int start = expression.indexOf("#{"); - return start != -1 && expression.indexOf('}', start + 2) != -1; - } - - static Map> evaluateExpressions(FacesContext context, Map> map) { - if (map != null && !map.isEmpty()) { - Map> ret = new HashMap<>(map.size()); - for (Map.Entry> entry : map.entrySet()) { - ret.put(entry.getKey(), evaluateExpressions(context, entry.getValue())); - } - - return ret; - } - - return map; - } - - static List evaluateExpressions(FacesContext context, List values) { - if (!values.isEmpty()) { - List ret = new ArrayList<>(values.size()); - Application app = context.getApplication(); - for (String val : values) { - if (val != null) { - String value = val.trim(); - if (isExpression(value)) { - value = app.evaluateExpressionGet(context, value, String.class); - } - ret.add(value); - } - } - - return ret; - } - return values; - } - -} diff --git a/impl/src/main/java/jakarta/faces/application/StateManager.java b/impl/src/main/java/jakarta/faces/application/StateManager.java deleted file mode 100644 index 5b0c9de323..0000000000 --- a/impl/src/main/java/jakarta/faces/application/StateManager.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import static java.lang.Boolean.TRUE; - -import java.io.IOException; -import java.util.Map; - -import jakarta.faces.context.FacesContext; -import jakarta.faces.context.ResponseWriter; -import jakarta.faces.render.RenderKit; -import jakarta.faces.render.ResponseStateManager; -import jakarta.faces.view.StateManagementStrategy; -import jakarta.faces.view.ViewDeclarationLanguage; - -/** - *

      - * StateManager directs the process of saving and restoring the view between requests. - * An implementation of this class must be thread-safe. The {@link StateManager} - * instance for an application is retrieved from the {@link Application} instance, and thus cannot know any details of - * the markup language created by the {@link RenderKit} being used to render a view. - * - * The {@link StateManager} utilizes a helper object ({@link ResponseStateManager}), that is provided by the - * {@link RenderKit} implementation and is therefore aware of the markup language details. - *

      - */ -public abstract class StateManager { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The ServletContext init parameter consulted by the StateManager to tell where the state - * should be saved. Valid values are given as the values of the constants: {@link #STATE_SAVING_METHOD_CLIENT} or - * {@link #STATE_SAVING_METHOD_SERVER}. - *

      - * - *

      - * If this parameter is not specified, the default value is the value of the constant - * {@link #STATE_SAVING_METHOD_CLIENT}. - *

      - */ - public static final String STATE_SAVING_METHOD_PARAM_NAME = "jakarta.faces.STATE_SAVING_METHOD"; - - /** - *

      - * The ServletContext init parameter consulted by the runtime to determine if the partial state saving - * mechanism should be used. - *

      - * - *
      - * - *

      - * If undefined, the runtime must determine the version level of the application. - *

      - * - *
        - * - *
      • - *

        - * For applications versioned at 1.2 and under, the runtime must not use the partial state saving mechanism. - *

        - *
      • - * - *
      • - *

        - * For applications versioned at 2.0 and above, the runtime must use the partial state saving mechanism. - *

        - *
      • - * - *
      - * - *

      - * If this parameter is defined, and the application is versioned at 1.2 and under, the runtime must not use the partial - * state saving mechanism. Otherwise, If this param is defined, and calling toLowerCase().equals("true") on - * a String representation of its value returns true, the runtime must use partial state - * mechanism. Otherwise the partial state saving mechanism must not be used. - *

      - * - *
      - * - * @since 2.0 - */ - public static final String PARTIAL_STATE_SAVING_PARAM_NAME = "jakarta.faces.PARTIAL_STATE_SAVING"; - - /** - *

      - * The runtime must interpret the value of this parameter as a comma separated list of view IDs, each of which must have - * their state saved using the state saving mechanism specified in Jakarta Faces 1.2. - *

      - */ - public static final String FULL_STATE_SAVING_VIEW_IDS_PARAM_NAME = "jakarta.faces.FULL_STATE_SAVING_VIEW_IDS"; - - /** - *

      - * Marker within the FacesContext attributes map to indicate we are saving state. The implementation must - * set this marker into the map before starting the state saving traversal and the marker must be cleared, in a - * finally block, after the traversal is complete. - *

      - */ - public static final String IS_SAVING_STATE = "jakarta.faces.IS_SAVING_STATE"; - - /** - *

      - * Marker within the FacesContext attributes map to indicate we are marking initial state, so the - * markInitialState() method of iterating components such as {@link jakarta.faces.component.UIData} could - * recognize this fact and save the initial state of descendents. - *

      - * - * @since 2.1 - * - */ - public final static String IS_BUILDING_INITIAL_STATE = "jakarta.faces.IS_BUILDING_INITIAL_STATE"; - - /** - *

      - * If this param is set, and calling toLowerCase().equals("true") on a String representation of its value returns true, - * and the jakarta.faces.STATE_SAVING_METHOD is set to "server" (as indicated below), the server state must be - * guaranteed to be Serializable such that the aggregate state implements java.io.Serializable. The intent of this - * parameter is to ensure that the act of writing out the state to an ObjectOutputStream would not throw a - * NotSerializableException, but the runtime is not required verify this before saving the state. - *

      - * - * @since 2.2 - */ - public static final String SERIALIZE_SERVER_STATE_PARAM_NAME = "jakarta.faces.SERIALIZE_SERVER_STATE"; - - /** - *

      - * Constant value for the initialization parameter named by the STATE_SAVING_METHOD_PARAM_NAME that - * indicates state saving should take place on the client. - *

      - */ - public static final String STATE_SAVING_METHOD_CLIENT = "client"; - - /** - *

      - * Constant value for the initialization parameter named by the STATE_SAVING_METHOD_PARAM_NAME that - * indicates state saving should take place on the server. - *

      - */ - public static final String STATE_SAVING_METHOD_SERVER = "server"; - - - private Boolean savingStateInClient; - - // ---------------------------------------------------- State Saving Methods - - - /** - *

      - * Save the state represented in the specified state Object instance, in an implementation dependent - * manner. - *

      - * - *

      - * This method will typically simply delegate the actual writing to the writeState() method of the - * {@link ResponseStateManager} instance provided by the {@link RenderKit} being used to render this view. This method - * assumes that the caller has positioned the {@link ResponseWriter} at the correct position for the saved state to be - * written. - *

      - * - * @param context {@link FacesContext} for the current request - * @param state the state to be written - * @throws IOException when an I/O error occurs. - * @since 1.2 - */ - public void writeState(FacesContext context, Object state) throws IOException { - } - - - // ------------------------------------------------- State Restoring Methods - - - /** - *

      - * Method to determine if the state is saved on the client. - *

      - * - * @param context the Faces context. - * @return true if and only if the value of the ServletContext init parameter named by the - * value of the constant {@link #STATE_SAVING_METHOD_PARAM_NAME} is equal (ignoring - * case) to the value of the constant {@link #STATE_SAVING_METHOD_CLIENT}. false otherwise. - * - * @throws NullPointerException if context is null. - */ - public boolean isSavingStateInClient(FacesContext context) { - if (savingStateInClient != null) { - return savingStateInClient; - } - savingStateInClient = false; - - String saveStateParam = context.getExternalContext().getInitParameter(STATE_SAVING_METHOD_PARAM_NAME); - if (saveStateParam != null && saveStateParam.equalsIgnoreCase(STATE_SAVING_METHOD_CLIENT)) { - savingStateInClient = true; - } - - return savingStateInClient; - } - - /** - *

      - * Convenience method to return the view state as a String with no RenderKit specific markup. - * - * This default implementation of this method will call {@link StateManagementStrategy#saveView(FacesContext)} and - * passing the result to and returning the resulting value from - * {@link ResponseStateManager#getViewState(jakarta.faces.context.FacesContext, Object)}. - *

      - * - * @param context {@link FacesContext} for the current request - * @return the view state. - * @since 2.0 - */ - public String getViewState(FacesContext context) { - Object savedView = null; - - if (context != null && !context.getViewRoot().isTransient()) { - String viewId = context.getViewRoot().getViewId(); - - ViewDeclarationLanguage vdl = context.getApplication().getViewHandler().getViewDeclarationLanguage(context, viewId); - if (vdl != null) { - Map contextAttributes = context.getAttributes(); - try { - contextAttributes.put(IS_SAVING_STATE, TRUE); - - savedView = vdl.getStateManagementStrategy(context, viewId) - .saveView(context); - } finally { - contextAttributes.remove(IS_SAVING_STATE); - } - } - } - - return context.getRenderKit().getResponseStateManager().getViewState(context, savedView); - } -} diff --git a/impl/src/main/java/jakarta/faces/application/StateManagerWrapper.java b/impl/src/main/java/jakarta/faces/application/StateManagerWrapper.java deleted file mode 100644 index 26d56271da..0000000000 --- a/impl/src/main/java/jakarta/faces/application/StateManagerWrapper.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import java.io.IOException; - -import jakarta.faces.FacesWrapper; -import jakarta.faces.context.FacesContext; - -/** - *

      - * Provides a simple implementation of {@link StateManager} that can be - * subclassed by developers wishing to provide specialized behavior to an existing {@link StateManager} instance. The - * default implementation of all methods is to call through to the wrapped {@link StateManager}. - *

      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - * @since 1.2 - */ -public abstract class StateManagerWrapper extends StateManager implements FacesWrapper { - - private StateManager wrapped; - - /** - *

      - * If this state manager has been decorated, the implementation doing the decorating should push the implementation - * being wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - * @since 2.3 - */ - public StateManagerWrapper(StateManager wrapped) { - this.wrapped = wrapped; - } - - @Override - public StateManager getWrapped() { - return wrapped; - } - - // ----------------------- Methods from jakarta.faces.application.StateManager - - /** - *

      - * The default behavior of this method is to call - * {@link StateManager#writeState(jakarta.faces.context.FacesContext, java.lang.Object)} on the wrapped - * {@link StateManager} object. - *

      - * - * @see StateManager#writeState(jakarta.faces.context.FacesContext, java.lang.Object) - * @since 1.2 - */ - @Override - public void writeState(FacesContext context, Object state) throws IOException { - getWrapped().writeState(context, state); - } - - /** - *

      - * The default behavior of this method is to call - * {@link StateManager#isSavingStateInClient(jakarta.faces.context.FacesContext)} on the wrapped {@link StateManager} - * object. - *

      - * - * @see StateManager#isSavingStateInClient(jakarta.faces.context.FacesContext) - * @since 1.2 - */ - @Override - public boolean isSavingStateInClient(FacesContext context) { - return getWrapped().isSavingStateInClient(context); - } - - /** - *

      - * The default behavior of this method is to call {@link StateManager#getViewState(jakarta.faces.context.FacesContext)} - * on the wrapped {@link StateManager} object. - *

      - * - * @since 2.0 - */ - @Override - public String getViewState(FacesContext context) { - return getWrapped().getViewState(context); - } -} diff --git a/impl/src/main/java/jakarta/faces/application/ViewExpiredException.java b/impl/src/main/java/jakarta/faces/application/ViewExpiredException.java deleted file mode 100644 index 7af494e463..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ViewExpiredException.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import jakarta.faces.FacesException; -import jakarta.faces.context.FacesContext; -import jakarta.faces.view.StateManagementStrategy; - -/** - *

      - * Implementations must throw this {@link FacesException} when attempting to restore the view - * {@link StateManagementStrategy#restoreView(FacesContext, String, String)} results in failure on postback. - *

      - * - * @since 1.2 - */ -public class ViewExpiredException extends FacesException { - - private static final long serialVersionUID = 5175808310270035833L; - - // ----------------------------------------------------- Instance Variables - - /** - *

      - * The view identifier of the view that could not be restored. - *

      - */ - private String viewId; - - // ----------------------------------------------------------- Constructors - - /** - *

      - * Construct a new exception with no detail message or root cause. - *

      - */ - public ViewExpiredException() { - super(); - } - - /** - *

      - * Construct a new exception with the specified view identifier. - *

      - * - * @param viewId The view identifier for this exception - */ - public ViewExpiredException(String viewId) { - this.viewId = viewId; - } - - /** - *

      - * Construct a new exception with the specified detail message and no root cause. - *

      - * - * @param message The detail message for this exception - * @param viewId The view identifier for this exception - */ - public ViewExpiredException(String message, String viewId) { - super(message); - this.viewId = viewId; - } - - /** - *

      - * Construct a new exception with the specified root cause. The detail message will be set to - * (cause == null ? null : - * cause.toString() - * - * @param cause The root cause for this exception - * @param viewId The view identifier for this exception - */ - public ViewExpiredException(Throwable cause, String viewId) { - super(cause); - this.viewId = viewId; - } - - /** - *

      - * Construct a new exception with the specified detail message and root cause. - *

      - * - * @param message The detail message for this exception - * @param cause The root cause for this exception - * @param viewId The view identifier for this exception - */ - public ViewExpiredException(String message, Throwable cause, String viewId) { - super(message, cause); - this.viewId = viewId; - } - - // --------------------------------------------------------- Public Methods - - /** - *

      - * Return the view identifier of this exception, or null if the view identifier is nonexistent or unknown. - *

      - * - * @return the view id, or null. - */ - public String getViewId() { - return viewId; - } - - /** - *

      - * Return the message for this exception prepended with the view identifier if the view identifier is not - * null, otherwise, return the message. - *

      - * - * @return the message. - */ - @Override - public String getMessage() { - if (viewId != null) { - return "viewId:" + viewId + " - " + super.getMessage(); - } - - return super.getMessage(); - } - -} diff --git a/impl/src/main/java/jakarta/faces/application/ViewHandler.java b/impl/src/main/java/jakarta/faces/application/ViewHandler.java deleted file mode 100644 index 95c67f65d2..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ViewHandler.java +++ /dev/null @@ -1,749 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import static java.util.Collections.emptySet; -import static java.util.Collections.unmodifiableSet; - -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Set; -import java.util.logging.Logger; -import java.util.stream.Stream; - -import jakarta.faces.FacesException; -import jakarta.faces.component.UIComponent; -import jakarta.faces.component.UIViewRoot; -import jakarta.faces.context.ExternalContext; -import jakarta.faces.context.FacesContext; -import jakarta.faces.push.PushContext; -import jakarta.faces.view.ViewDeclarationLanguage; - -/** - *

      - * - * ViewHandler is the pluggablity mechanism for allowing implementations of or applications using the - * Jakarta Faces Specification to provide their own handling of the activities in the Render Response - * and Restore View phases of the request processing lifecycle. - * - * This allows for implementations to support different response generation technologies, as well as alternative - * strategies for saving and restoring the state of each view. - * - * An implementation of this class must be thread-safe. - *

      - * - *

      - * Please see {@link StateManager} for information on how the ViewHandler interacts the - * {@link StateManager}. - *

      - * - *

      - * Version 2 of the specification formally introduced the concept of View Declaration Language. A View - * Declaration Language (VDL) is a syntax used to declare user interfaces comprised of instances of Jakarta Faces - * {@link UIComponent}s. Any of the responsibilities of the ViewHandler that specifically deal with the VDL - * sub-system are now the domain of the VDL implementation. These responsibilities are defined on the - * {@link ViewDeclarationLanguage} class. The ViewHandler provides {@link #getViewDeclarationLanguage} as a - * convenience method to access the VDL implementation given a viewId. - *

      - * - */ -public abstract class ViewHandler { - - private static final Logger log = Logger.getLogger("jakarta.faces.application"); - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The key, in the session's attribute set, under which the response character encoding may be stored and retrieved. - *

      - * - */ - public static final String CHARACTER_ENCODING_KEY = "jakarta.faces.request.charset"; - - /** - *

      - * This is not anymore used since removal of support for Jakarta Pages. - *

      - * @deprecated Use {@link #FACELETS_SUFFIX_PARAM_NAME} instead. - */ - @Deprecated(since = "4.0", forRemoval = true) - public static final String DEFAULT_SUFFIX_PARAM_NAME = "jakarta.faces.DEFAULT_SUFFIX"; - - /** - *

      - * This is not anymore used since removal of support for Jakarta Pages. - *

      - * @deprecated Use {@link #DEFAULT_FACELETS_SUFFIX} instead. - */ - @Deprecated(since = "4.0", forRemoval = true) - public static final String DEFAULT_SUFFIX = ".xhtml"; - - /** - *

      - * If this param is set, and calling toLowerCase().equals("true") on a String representation of its value returns true, - * the runtime must ensure that any XML comments in the Facelets source page are not delivered to the client. The - * runtime must also consider the facelets.SKIP_COMMENTS param name as an alias to this param name for backwards - * compatibility with existing facelets tag libraries. - *

      - * - * @since 2.0 - */ - public static final String FACELETS_SKIP_COMMENTS_PARAM_NAME = "jakarta.faces.FACELETS_SKIP_COMMENTS"; - - /** - *

      - * Allow the web application to define a list of alternate suffixes for Facelet based XHTML pages containing Jakarta Faces - * content. This list is a space separated list of values of the form - * .<extension>. The first physical resource whose extension matches one of the configured - * extensions will be the suffix used to create the view ID. If this init parameter is not specified, the default value is taken from the value of the constant - * {@link #DEFAULT_FACELETS_SUFFIX} - *

      - * - * @since 2.0 - */ - public static final String FACELETS_SUFFIX_PARAM_NAME = "jakarta.faces.FACELETS_SUFFIX"; - - /** - *

      - * The value to use for the default extension for Facelet based XHTML pages if the webapp is using url extension - * mapping. - *

      - * - * @since 2.0 - */ - public static final String DEFAULT_FACELETS_SUFFIX = ".xhtml"; - - /** - *

      - * Allow the web application to define a semicolon (;) separated list of strings that is used to forcibly declare that - * certain pages in the application must be interpreted as using Facelets, regardless of their extension. Each entry in - * the semicolon (;) separated list of strings is either a file extension, as in *.xhtml, or a resource - * prefix (starting with '/' and interpreted as relative to the web application root), as in /user/*. The - * latter class of entry can also take the form of /<filename>.<extension>* such as - * /login.xhtml*. - *

      - * - * @since 2.0 - */ - public static final String FACELETS_VIEW_MAPPINGS_PARAM_NAME = "jakarta.faces.FACELETS_VIEW_MAPPINGS"; - - /** - *

      - * The buffer size to set on the response when the ResponseWriter is generated. By default the value is 1024. A value of - * -1 will not assign a buffer size on the response. This should be increased if you are using development mode in order - * to guarantee that the response isn't partially rendered when an error is generated. The runtime must also consider - * the facelets.BUFFER_SIZE param name as an alias to this param name for backwards compatibility with existing facelets - * tag libraries. - *

      - * - * @since 2.0 - */ - public static final String FACELETS_BUFFER_SIZE_PARAM_NAME = "jakarta.faces.FACELETS_BUFFER_SIZE"; - - /** - *

      - * When a page is requested, what interval in seconds should the compiler - * check for changes. If you don't want the compiler to check for changes once the page is compiled, then use a value of - * -1. Setting a low refresh period helps during development to be able to edit pages in a running application.The - * runtime must also consider the facelets.REFRESH_PERIOD param name as an alias to this param name for backwards - * compatibility with existing facelets tag libraries. If - * {@link jakarta.faces.application.ProjectStage} is set to {@code Production} and this value is not otherwise - * specified, the runtime must act as if it is set to -1. - *

      - * - * @since 2.0 - */ - public static final String FACELETS_REFRESH_PERIOD_PARAM_NAME = "jakarta.faces.FACELETS_REFRESH_PERIOD"; - - /** - *

      - * If this param is set, the runtime must interpret it as a semicolon (;) separated list of paths, starting with "/" - * (without the quotes). The runtime must interpret each entry in the list as a path relative to the web application - * root and interpret the file found at that path as a facelet tag library, conforming to the facelet taglibrary schema - * and expose the tags therein according to Section "Facelet Tag Library mechanism". The runtime must also consider the - * facelets.LIBRARIES param name as an alias to this param name for backwards compatibility with existing facelets tag - * libraries. - *

      - * - * - * @since 2.0 - */ - public static final String FACELETS_LIBRARIES_PARAM_NAME = "jakarta.faces.FACELETS_LIBRARIES"; - - /** - *

      - * A semicolon (;) delimitted list of class names of type jakarta.faces.view.facelets.TagDecorator, with a no-argument - * constructor. These decorators will be loaded when the first request for a Facelets VDL view hits the ViewHandler for - * page compilation.The runtime must also consider the facelets.DECORATORS param name as an alias to this param name for - * backwards compatibility with existing facelets tag libraries. - *

      - * - * @since 2.0 - */ - public static final String FACELETS_DECORATORS_PARAM_NAME = "jakarta.faces.FACELETS_DECORATORS"; - - - // ---------------------------------------------------------- Public Methods - - /** - * - *

      - * Initialize the view for the request processing lifecycle. - *

      - * - *

      - * This method must be called at the beginning of the Restore View Phase of the Request Processing Lifecycle. - * It is responsible for performing any per-request initialization necessary to the operation of the lifycecle. - *

      - * - *

      - * The default implementation must perform the following actions. If {@link ExternalContext#getRequestCharacterEncoding} - * returns null, call {@link #calculateCharacterEncoding} and pass the result, if non-null, - * into the {@link ExternalContext#setRequestCharacterEncoding} method. If - * {@link ExternalContext#getRequestCharacterEncoding} returns non-null take no action. - *

      - * - * @param context the Faces context. - * @throws FacesException if a problem occurs setting the encoding, such as the - * UnsupportedEncodingException thrown by the underlying Jakarta Servlet or Portlet technology when the - * encoding is not supported. - * - */ - public void initView(FacesContext context) throws FacesException { - String originalEncoding = context.getExternalContext().getRequestCharacterEncoding(); - String encoding = (originalEncoding != null) ? originalEncoding : calculateCharacterEncoding(context); - - if (encoding != null && context.getExternalContext().getSession(false) != null) { - context.getExternalContext().getSessionMap().put(CHARACTER_ENCODING_KEY, encoding); - } - - if (originalEncoding != null) { - return; - } - - if (encoding != null) { - try { - context.getExternalContext().setRequestCharacterEncoding(encoding); - } catch (UnsupportedEncodingException e) { - String message = "Can't set encoding to: " + encoding + " Exception:" + e.getMessage(); - log.fine(message); - - throw new FacesException(message, e); - } - } - } - - /** - *

      - * Perform whatever actions are required to restore the view associated with - * the specified {@link FacesContext} and viewId. It may delegate to the restoreView of the - * associated {@link StateManager} to do the actual work of restoring the view. If there is no available state for the - * specified viewId, return null. - *

      - * - *

      - * Otherwise, the default implementation must obtain a reference to the {@link ViewDeclarationLanguage} for this - * viewId and call its {@link ViewDeclarationLanguage#restoreView} method, returning the result and not - * swallowing any exceptions thrown by that method. - *

      - * - * @param context {@link FacesContext} for the current request - * @param viewId the view identifier for the current request - * @return the restored view root, or null. - * @throws NullPointerException if context is null - * @throws FacesException if a Jakarta Servlet error occurs - */ - public abstract UIViewRoot restoreView(FacesContext context, String viewId); - - /** - *

      - * Create and return a new {@link UIViewRoot} instance initialized with - * information from the argument FacesContext and viewId. - * Locate the {@link ViewDeclarationLanguage} implementation for the VDL used in the - * view. The argument viewId must be converted to a physical viewId that can refer to an - * actual resource suitable for use by the ViewDeclarationLanguage - * {@link ViewDeclarationLanguage#createView}, which must be called by this method. - * - * @param context the Faces context. - * @param viewId the view id. - * @throws NullPointerException if context is null - * - * @return the viewroot. - */ - public abstract UIViewRoot createView(FacesContext context, String viewId); - - /** - *

      - * Perform whatever actions are required to render the response view to the - * response object associated with the current {@link FacesContext}. - *

      - * - *

      - * Otherwise, the default implementation must obtain a reference to the {@link ViewDeclarationLanguage} for the - * viewId of the argument viewToRender and call its {@link ViewDeclarationLanguage#renderView} - * method, returning the result and not swallowing any exceptions thrown by that method. - *

      - * - * @param context {@link FacesContext} for the current request - * @param viewToRender the view to render - * - * @throws IOException if an input/output error occurs - * @throws NullPointerException if context or viewToRender is null - * @throws FacesException if a Jakarta Servlet error occurs - */ - public abstract void renderView(FacesContext context, UIViewRoot viewToRender) throws IOException, FacesException; - - /** - *

      - * Returns an appropriate {@link Locale} to use for this and subsequent requests for the current client. - *

      - * - * @param context {@link FacesContext} for the current request - * @return the locale. - * @throws NullPointerException if context is null - */ - public abstract Locale calculateLocale(FacesContext context); - - /** - *

      - * Returns the correct character encoding to be used for this request. - *

      - * - *

      - * The following algorithm is employed. - *

      - * - *
        - * - *
      • - *

        - * Examine the Content-Type request header. If it has a charset parameter, extract it and - * return that as the encoding. - *

        - *
      • - * - *
      • - *

        - * If no charset parameter was found, check for the existence of a session by calling - * {@link ExternalContext#getSession(boolean)} passing false as the argument. If that method returns - * true, get the session Map by calling {@link ExternalContext#getSessionMap} and look for a value under - * the key given by the value of the symbolic constant {@link ViewHandler#CHARACTER_ENCODING_KEY}. If present, return - * the value, converted to String. - *

        - *
      • - * - *
      • - *

        - * Otherwise, return null - *

        - *
      • - * - *
      - * - * @param context the Faces context. - * @return the character encoding, or null - * @since 1.2 - */ - public String calculateCharacterEncoding(FacesContext context) { - ExternalContext extContext = context.getExternalContext(); - Map headerMap = extContext.getRequestHeaderMap(); - String contentType = headerMap.get("Content-Type"); - String charEnc = null; - - // Look for a charset in the Content-Type header first. - if (contentType != null) { - - // See if this header had a charset - String charsetStr = "charset="; - int len = charsetStr.length(); - int idx = contentType.indexOf(charsetStr); - - // If we have a charset in this Content-Type header AND it - // has a non-zero length. - if (idx != -1 && idx + len < contentType.length()) { - charEnc = contentType.substring(idx + len); - } - } - - // failing that, look in the session for a previously saved one - if (charEnc == null) { - if (extContext.getSession(false) != null) { - charEnc = (String) extContext.getSessionMap().get(CHARACTER_ENCODING_KEY); - } - } - - return charEnc; - } - - /** - *

      - * Return an appropriate renderKitId for this and subsequent requests from the current client. It is an - * error for this method to return null. - *

      - * - *

      - * The default return value is {@link jakarta.faces.render.RenderKitFactory#HTML_BASIC_RENDER_KIT}. - *

      - * - * @param context {@link FacesContext} for the current request - * @return the render kit id. - * @throws NullPointerException if context is null - */ - public abstract String calculateRenderKitId(FacesContext context); - - /** - *

      - * Derive and return the viewId from the current request, or the argument input by following the algorithm defined in - * section 7.6.2 "Default ViewHandler Implementation" of the Jakarta Faces Specification Document. - *

      - * - *

      - * This method should work correctly when the FacesServlet is invoked via either a path mapping, - * extension mapping or an exact match (mapping) as defined by Servlet.12.2. Note that - * path mapping is also commonly known as prefix mapping (e.g. "/faces/*") and - * extension mapping as suffix mapping (e.g. "*.xhtml"). An exact match is possible where - * there's a servlet mapping with an exact URL pattern such as "/foo". - *

      - * - *

      - * The default implementation of this method simply returns requestViewId unchanged. - *

      - * - * @param context the FacesContext for this request - * - * @param requestViewId the viewId to derive, - * @return the derived view id. - * @since 2.0 - */ - public String deriveViewId(FacesContext context, String requestViewId) { - return requestViewId; - } - - /** - *

      - * Derive and return the viewId from the current request, or the argument input by following the algorithm defined in - * section 7.6.2 "Default ViewHandler Implementation" of the Jakarta Faces Specification Document. - * Note that unlike deriveViewId(), this method does not require that a - * physical view be present. - *

      - * - *

      - * This method should work correctly when the FacesServlet is invoked via either a path mapping, - * extension mapping or an exact match (mapping) as defined by Servlet.12.2. Note that - * path mapping is also commonly known as prefix mapping (e.g. "/faces/*") and - * extension mapping as suffix mapping (e.g. "*.xhtml"). An exact match is possible where - * there's a servlet mapping with an exact URL pattern such as "/foo". - *

      - * - *

      - * The default implementation of this method simply returns requestViewId unchanged. - *

      - * - * @param context the FacesContext for this request - * - * @param requestViewId the viewId to derive, - * @return the derived logical view id. - * @since 2.1 - */ - public String deriveLogicalViewId(FacesContext context, String requestViewId) { - return requestViewId; - } - - /** - *

      - * If the value returned from this method is used as the file - * argument to the four-argument constructor for java.net.URL (assuming appropriate values are used for the - * first three arguments), then a client making a request to the toExternalForm() of that URL - * will select the argument viewId for traversing the Jakarta Faces lifecycle. Please see - * section 7.6.2 "Default ViewHandler Implementation" of the Jakarta Faces Specification Document - * for the complete specification, especially for details related to view - * protection using the {@link jakarta.faces.render.ResponseStateManager#NON_POSTBACK_VIEW_TOKEN_PARAM} - * and the behavior when the current request is to a URL for which the - * FacesServlet has an exact mapping as defined by Servlet.12.2. - *

      - * - * - * @param context {@link FacesContext} for this request - * @param viewId View identifier of the desired view - * - * @throws IllegalArgumentException if viewId is not valid for this ViewHandler, or does not - * start with "/". - * @throws NullPointerException if context or viewId is null. - * - * @return the action url. - */ - public abstract String getActionURL(FacesContext context, String viewId); - - /** - *

      - * Return a Jakarta Faces action URL derived from the viewId argument that is suitable to be used by - * the {@link NavigationHandler} to issue a redirect request to the URL using a NonFaces request. Compliant - * implementations must implement this method as specified in - * section 7.6.2 "Default ViewHandler Implementation" of the Jakarta Faces Specification Document. - * The default implementation simply calls - * through to {@link #getActionURL}, passing the arguments context and viewId. - *

      - * - * @param context The FacesContext processing this request - * @param viewId The view identifier of the target page - * @param parameters A mapping of parameter names to one or more values - * @param includeViewParams A flag indicating whether view parameters should be encoded into this URL - * @return the redirect URL. - * @since 2.0 - */ - public String getRedirectURL(FacesContext context, String viewId, Map> parameters, boolean includeViewParams) { - return getActionURL(context, viewId); - } - - /** - *

      - * Return a Jakarta Faces action URL derived from the viewId argument that is suitable to be used as the target - * of a link in a Jakarta Faces response. Compliant implementations must implement this method as specified in - * section 7.6.2 "Default ViewHandler Implementation" of the Jakarta Faces Specification Document. - * The default implementation simply calls through to {@link #getActionURL}, passing the arguments - * context and viewId. - *

      - * - * @param context The FacesContext processing this request - * @param viewId The view identifier of the target page - * @param parameters A mapping of parameter names to one or more values - * @param includeViewParams A flag indicating whether view parameters should be encoded into this URL - * - * @return the bookmarkable URL. - * - * @since 2.0 - */ - public String getBookmarkableURL(FacesContext context, String viewId, Map> parameters, boolean includeViewParams) { - return getActionURL(context, viewId); - } - - /** - *

      - * If the value returned from this method is used as the file argument to the four-argument constructor for - * java.net.URL (assuming appropriate values are used for the first three arguments), then a client making - * a request to the toExternalForm() of that URL will select the argument path - * for direct rendering. If the specified path starts with a slash, it must be treated as context relative; otherwise, - * it must be treated as relative to the action URL of the current view. - *

      - * - * @param context {@link FacesContext} for the current request - * @param path Resource path to convert to a URL - * - * @throws IllegalArgumentException if viewId is not valid for this ViewHandler. - * @throws NullPointerException if context or path is null. - * - * @return the resource URL. - */ - public abstract String getResourceURL(FacesContext context, String path); - - /** - *

      - * If the value returned from this method is used as the file argument to the four-argument constructor for - * java.net.URL (assuming appropriate values are used for the first three arguments), then a client making - * a push handshake request to the toExternalForm() of that URL will select the argument - * channel for connecting the websocket push channel in the current view. It must match the - * {@link PushContext#URI_PREFIX} of the endpoint. - *

      - * - * @param context {@link FacesContext} for the current request. - * @param channel The channel name of the websocket. - * - * @throws NullPointerException if context or channel is null. - * - * @return the websocket URL. - * @see PushContext#URI_PREFIX - */ - public abstract String getWebsocketURL(FacesContext context, String channel); - - /** - *

      - * Return an unmodifiable Set of the protected views currently known to this ViewHandler - * instance. Compliant implementations must return a Set that is the concatenation of the contents of all - * the <url-pattern> elements within all the <protected-views> in all of the - * application configuration resources in the current application. The runtime must support calling this method at any - * time after application startup. The default implementation returns an unmodifiable empty Set. - *

      - * - * @return the unmodifiable set of protected views. - * @since 2.2 - */ - public Set getProtectedViewsUnmodifiable() { - return unmodifiableSet(emptySet()); - } - - /** - *

      - * Add the argument urlPattern to the thread safe Set of protected views for this application. - * Compliant implementations make it so a subsequent call to {@link #getProtectedViewsUnmodifiable} contains the - * argument. The runtime must support calling this method at any time after application startup. The default - * implementation takes no action. - *

      - * - * @param urlPattern the url-pattern to add. - * - * @since 2.2 - */ - public void addProtectedView(String urlPattern) { - - } - - /** - *

      - * Remove the argument urlPattern from the thread safe Set of protected views for this - * application, if present in the Set. If the argument urlPattern is not present in the - * Set, this method has no effect. Compliant implementations must make it so a subsequent call to - * {@link #getProtectedViewsUnmodifiable} does not contain the argument. The runtime must support calling this method at - * any time after application startup. Returns true if this Set contained the argument. The - * default implementation takes no action and returns false. - *

      - * - * @param urlPattern the url-pattern to remove. - * @return true if in the Set, false otherwise. - * @since 2.2 - */ - public boolean removeProtectedView(String urlPattern) { - return false; - } - - /** - *

      - * Return the {@link ViewDeclarationLanguage} instance used for this - * ViewHandler instance. - *

      - * - *
      - * - *

      - * The default implementation must use - * {@link jakarta.faces.view.ViewDeclarationLanguageFactory#getViewDeclarationLanguage} to obtain the appropriate - * ViewDeclarationLanguage implementation for the argument viewId. Any exceptions thrown as a - * result of invoking that method must not be swallowed. - *

      - * - *

      - * The default implementation of this method returns null. - *

      - * - *
      - * - * @param context the FacesContext for this request. - * - * @param viewId the logical view id, as returned from {@link #deriveLogicalViewId} - * for which the ViewDeclarationLanguage should be returned. - * @return the ViewDeclarationLanguage, or null. - * @since 2.0 - */ - public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, String viewId) { - return null; - } - - /** - *

      - * Return a {@code Stream} possibly lazily populated by walking the view trees of every active - * {@link ViewDeclarationLanguage} rooted at a given initial path. The view tree of every - * {@link ViewDeclarationLanguage} is individually traversed breadth-first as per the contract of - * {@link ViewDeclarationLanguage#getViews(FacesContext, String, int, ViewVisitOption...)}. The elements in the stream - * are logical view ids. - *

      - * - *

      - * The {@code maxDepth} parameter is the maximum depth of directory levels to visit for each - * {@code ViewDeclarationLanguage} beyond the initial path, which is always visited. The value is relative to - * the root ({@code /}), not to the given initial path. E.g. given {@code maxDepth} = {@code 3} and initial path - * {@code /foo/}, visiting will proceed up to {@code /foo/bar/}, where {@code /} counts as depth {@code 1}, - * {@code /foo/} as depth {@code 2} and {@code /foo/bar/} as depth {@code 3}. A value lower or equal to the depth of the - * initial path means that only the initial path is visited. A value of {@link Integer#MAX_VALUE MAX_VALUE} may be used - * to indicate that all levels should be visited. - * - *

      - * In case more than one active {@code ViewDeclarationLanguage} is present, the order in which view ids from each - * {@code ViewDeclarationLanguage} appear in the stream is undetermined, except for the guarantee that every individual - * {@code ViewDeclarationLanguage} is traversed breadth-first. - * - * @param facesContext The {@link FacesContext} for this request. - * @param path The initial path from which to start looking for view ids. - * @param maxDepth The absolute maximum depth of nested directories to visit counted from the root ({@code /}). - * @param options The options to influence the traversal. See {@link ViewVisitOption} for details on those. - * - * @return the {@link Stream} of view ids - * - * @since 2.3 - */ - public Stream getViews(FacesContext facesContext, String path, int maxDepth, ViewVisitOption... options) { - return Stream.empty(); - } - - /** - *

      - * Return a {@code Stream} possibly lazily populated by walking the view trees of every active - * {@link ViewDeclarationLanguage} rooted at a given initial path. The view tree of every - * {@link ViewDeclarationLanguage} is individually traversed breadth-first as per the contract of - * {@link ViewDeclarationLanguage#getViews(FacesContext, String, int, ViewVisitOption...)}. The elements in the stream - * are logical view ids. - *

      - * - *

      - * This method works as if invoking it were equivalent to evaluating the expression:

      - * - *
      -     * getViews(facesContext, start, Integer.MAX_VALUE, options)
      -     * 
      - * - *
      Put differently, it visits all levels of the view tree. - * - *

      - * In case more than one active {@code ViewDeclarationLanguage} is present, the order in which view ids from each - * {@code ViewDeclarationLanguage} appear in the stream is undetermined, except for the guarantee that every individual - * {@code ViewDeclarationLanguage} is traversed breadth-first. - * - * @param facesContext The {@link FacesContext} for this request. - * @param path The initial path from which to start looking for view ids. - * @param options The options to influence the traversal. See {@link ViewVisitOption} for details on those. - * - * @return the {@link Stream} of view ids - * - * @since 2.3 - */ - public Stream getViews(FacesContext facesContext, String path, ViewVisitOption... options) { - return Stream.empty(); - } - - /** - *

      - * Take any appropriate action to either immediately write out the current state information (by calling - * {@link StateManager#writeState}, or noting where state information should later be written. - *

      - * - *

      - * This method must do nothing if the current request is an Ajax request. When responding to - * Ajax requests, the state is obtained by calling {@link StateManager#getViewState} and then written into - * the Ajax response during final encoding - * ({@link jakarta.faces.context.PartialViewContext#processPartial(jakarta.faces.event.PhaseId)}) . - *

      - * - * @param context {@link FacesContext} for the current request - * - * @throws IOException if an input/output error occurs - * @throws NullPointerException if context is null - */ - public abstract void writeState(FacesContext context) throws IOException; - -} diff --git a/impl/src/main/java/jakarta/faces/application/ViewHandlerWrapper.java b/impl/src/main/java/jakarta/faces/application/ViewHandlerWrapper.java deleted file mode 100644 index ee4065456f..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ViewHandlerWrapper.java +++ /dev/null @@ -1,389 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import java.io.IOException; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Set; -import java.util.stream.Stream; - -import jakarta.faces.FacesException; -import jakarta.faces.FacesWrapper; -import jakarta.faces.component.UIViewRoot; -import jakarta.faces.context.FacesContext; -import jakarta.faces.view.ViewDeclarationLanguage; - -/** - *

      - * Provides a simple implementation of {@link ViewHandler} that can be - * subclassed by developers wishing to provide specialized behavior to an existing {@link ViewHandler} instance. The - * default implementation of all methods is to call through to the wrapped {@link ViewHandler}. - *

      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - * @since 1.2 - */ -public abstract class ViewHandlerWrapper extends ViewHandler implements FacesWrapper { - - private ViewHandler wrapped; - - /** - *

      - * If this view handler has been decorated, the implementation doing the decorating should push the implementation being - * wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - * @since 2.3 - */ - public ViewHandlerWrapper(ViewHandler wrapped) { - this.wrapped = wrapped; - } - - @Override - public ViewHandler getWrapped() { - return wrapped; - } - - // ------------------------ Methods from jakarta.faces.application.ViewHandler - - /** - *

      - * The default behavior of this method is to call {@link ViewHandler#initView} on the wrapped {@link ViewHandler} - * object. - *

      - * - * @see ViewHandler#initView - * @since 1.2 - */ - @Override - public void initView(FacesContext context) throws FacesException { - getWrapped().initView(context); - } - - /** - *

      - * The default behavior of this method is to call - * {@link ViewHandler#restoreView(jakarta.faces.context.FacesContext, String)} on the wrapped {@link ViewHandler} - * object. - *

      - * - * @see ViewHandler#restoreView(jakarta.faces.context.FacesContext, String) - * @since 1.2 - */ - @Override - public UIViewRoot restoreView(FacesContext context, String viewId) { - return getWrapped().restoreView(context, viewId); - } - - /** - *

      - * The default behavior of this method is to call - * {@link ViewHandler#createView(jakarta.faces.context.FacesContext, String)} on the wrapped {@link ViewHandler} object. - *

      - * - * @see ViewHandler#createView(jakarta.faces.context.FacesContext, String) - * @since 1.2 - */ - @Override - public UIViewRoot createView(FacesContext context, String viewId) { - return getWrapped().createView(context, viewId); - } - - /** - *

      - * The default behavior of this method is to call - * {@link ViewHandler#renderView(jakarta.faces.context.FacesContext, jakarta.faces.component.UIViewRoot)} on the wrapped - * {@link ViewHandler} object. - *

      - * - * @see ViewHandler#renderView(jakarta.faces.context.FacesContext, jakarta.faces.component.UIViewRoot) - * @since 1.2 - */ - @Override - public void renderView(FacesContext context, UIViewRoot viewToRender) throws IOException, FacesException { - getWrapped().renderView(context, viewToRender); - } - - /** - * - *

      - * The default behavior of this method is to call - * {@link ViewHandler#calculateCharacterEncoding(jakarta.faces.context.FacesContext)} on the wrapped {@link ViewHandler} - * object. - *

      - * - * @see ViewHandler#calculateCharacterEncoding(jakarta.faces.context.FacesContext) - * @since 1.2 - */ - @Override - public String calculateCharacterEncoding(FacesContext context) { - return getWrapped().calculateCharacterEncoding(context); - } - - /** - * - *

      - * The default behavior of this method is to call - * {@link ViewHandler#calculateLocale(jakarta.faces.context.FacesContext)} on the wrapped {@link ViewHandler} object. - *

      - * - * @see ViewHandler#calculateLocale(jakarta.faces.context.FacesContext) - * @since 1.2 - */ - @Override - public Locale calculateLocale(FacesContext context) { - return getWrapped().calculateLocale(context); - } - - /** - * - *

      - * The default behavior of this method is to call - * {@link ViewHandler#deriveViewId(jakarta.faces.context.FacesContext, String)} on the wrapped {@link ViewHandler} - * object. - *

      - * - * @see ViewHandler#deriveViewId(jakarta.faces.context.FacesContext, String) - * @since 2.0 - */ - @Override - public String deriveViewId(FacesContext context, String requestViewId) { - return getWrapped().deriveViewId(context, requestViewId); - } - - /** - * - *

      - * The default behavior of this method is to call - * {@link ViewHandler#deriveLogicalViewId(jakarta.faces.context.FacesContext, String)} on the wrapped - * {@link ViewHandler} object. - *

      - * - * @see ViewHandler#deriveLogicalViewId(jakarta.faces.context.FacesContext, String) - * @since 2.1 - */ - @Override - public String deriveLogicalViewId(FacesContext context, String requestViewId) { - return getWrapped().deriveLogicalViewId(context, requestViewId); - } - - /** - *

      - * The default behavior of this method is to call - * {@link ViewHandler#calculateRenderKitId(jakarta.faces.context.FacesContext)} on the wrapped {@link ViewHandler} - * object. - *

      - * - * @see ViewHandler#calculateRenderKitId(jakarta.faces.context.FacesContext) - * @since 1.2 - */ - @Override - public String calculateRenderKitId(FacesContext context) { - return getWrapped().calculateRenderKitId(context); - } - - /** - *

      - * The default behavior of this method is to call - * {@link ViewHandler#getActionURL(jakarta.faces.context.FacesContext, String)} on the wrapped {@link ViewHandler} - * object. - *

      - * - * @see ViewHandler#getActionURL(jakarta.faces.context.FacesContext, String) - * @since 1.2 - */ - @Override - public String getActionURL(FacesContext context, String viewId) { - return getWrapped().getActionURL(context, viewId); - } - - /** - * - *

      - * The default behavior of this method is to call {@link ViewHandler#getProtectedViewsUnmodifiable} on the wrapped - * {@link ViewHandler} object. - *

      - * - * @see ViewHandler#getProtectedViewsUnmodifiable - * @since 2.2 - */ - @Override - public Set getProtectedViewsUnmodifiable() { - return getWrapped().getProtectedViewsUnmodifiable(); - } - - /** - * - *

      - * The default behavior of this method is to call {@link ViewHandler#addProtectedView} on the wrapped - * {@link ViewHandler} object. - *

      - * - * @see ViewHandler#addProtectedView - * @since 2.2 - */ - @Override - public void addProtectedView(String urlPattern) { - getWrapped().addProtectedView(urlPattern); - } - - /** - * - *

      - * The default behavior of this method is to call {@link ViewHandler#removeProtectedView} on the wrapped - * {@link ViewHandler} object. - *

      - * - * @see ViewHandler#removeProtectedView - * @since 2.2 - */ - @Override - public boolean removeProtectedView(String urlPattern) { - return getWrapped().removeProtectedView(urlPattern); - } - - /** - *

      - * The default behavior of this method is to call - * {@link ViewHandler#getRedirectURL(jakarta.faces.context.FacesContext, String, java.util.Map, boolean)} on the wrapped - * {@link ViewHandler} object. - *

      - * - * @see ViewHandler#getRedirectURL(jakarta.faces.context.FacesContext, String, java.util.Map, boolean) - * @since 2.0 - */ - @Override - public String getRedirectURL(FacesContext context, String viewId, Map> parameters, boolean includeViewParams) { - return getWrapped().getRedirectURL(context, viewId, parameters, includeViewParams); - } - - /** - *

      - * The default behavior of this method is to call - * {@link ViewHandler#getBookmarkableURL(jakarta.faces.context.FacesContext, String, java.util.Map, boolean)} on the - * wrapped {@link ViewHandler} object. - *

      - * - * @see ViewHandler#getBookmarkableURL(jakarta.faces.context.FacesContext, String, java.util.Map, boolean) - * @since 2.0 - */ - @Override - public String getBookmarkableURL(FacesContext context, String viewId, Map> parameters, boolean includeViewParams) { - return getWrapped().getBookmarkableURL(context, viewId, parameters, includeViewParams); - } - - /** - *

      - * The default behavior of this method is to call - * {@link ViewHandler#getResourceURL(jakarta.faces.context.FacesContext, String)} on the wrapped {@link ViewHandler} - * object. - *

      - * - * @see ViewHandler#getResourceURL(jakarta.faces.context.FacesContext, String) - * @since 1.2 - */ - @Override - public String getResourceURL(FacesContext context, String path) { - return getWrapped().getResourceURL(context, path); - } - - /** - *

      - * The default behavior of this method is to call {@link ViewHandler#getWebsocketURL(FacesContext, String)} on the - * wrapped {@link ViewHandler} object. - *

      - * - * @see ViewHandler#getWebsocketURL(FacesContext, String) - * @since 2.3 - */ - @Override - public String getWebsocketURL(FacesContext context, String channel) { - return getWrapped().getWebsocketURL(context, channel); - } - - /** - *

      - * The default behavior of this method is to call {@link ViewHandler#getViewDeclarationLanguage} on the wrapped - * {@link ViewHandler} object. - *

      - * - * @since 2.0 - */ - @Override - public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, String viewId) { - return getWrapped().getViewDeclarationLanguage(context, viewId); - } - - /** - *

      - * The default behavior of this method is to call {@link ViewHandler#getViews(FacesContext, String, ViewVisitOption...)} - * on the wrapped {@link ViewHandler} object. - *

      - * - * @since 2.3 - */ - @Override - public Stream getViews(FacesContext context, String path, ViewVisitOption... options) { - return getWrapped().getViews(context, path, options); - } - - /** - *

      - * The default behavior of this method is to call - * {@link ViewHandler#getViews(FacesContext, String, int, ViewVisitOption...)} on the wrapped {@link ViewHandler} - * object. - *

      - * - * @since 2.3 - */ - @Override - public Stream getViews(FacesContext context, String path, int maxDepth, ViewVisitOption... options) { - return getWrapped().getViews(context, path, maxDepth, options); - } - - /** - *

      - * The default behavior of this method is to call {@link ViewHandler#writeState(jakarta.faces.context.FacesContext)} on - * the wrapped {@link ViewHandler} object. - *

      - * - * @see ViewHandler#writeState(jakarta.faces.context.FacesContext) - * @since 1.2 - */ - @Override - public void writeState(FacesContext context) throws IOException { - getWrapped().writeState(context); - } - - // ------------------------------------------------------------- Deprecated methods - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public ViewHandlerWrapper() { - - } - -} diff --git a/impl/src/main/java/jakarta/faces/application/ViewResource.java b/impl/src/main/java/jakarta/faces/application/ViewResource.java deleted file mode 100644 index 7f038eb614..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ViewResource.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import java.net.URL; - -/** - *

      - * Superclass of {@link Resource} that is only for use with views. - *

      - * - * @since 2.2 - * - */ -public abstract class ViewResource { - - /** - *

      - * Return an actual URL instance that refers to this resource instance. - *

      - * - * @return Return an actual URL instance that refers to this resource instance. - * - * @since 2.2 - */ - public abstract URL getURL(); - -} diff --git a/impl/src/main/java/jakarta/faces/application/ViewVisitOption.java b/impl/src/main/java/jakarta/faces/application/ViewVisitOption.java deleted file mode 100644 index 79c60de322..0000000000 --- a/impl/src/main/java/jakarta/faces/application/ViewVisitOption.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.application; - -import jakarta.faces.view.ViewDeclarationLanguage; - -/** - *

      - * Defines the view traversal options. - *

      - * - * @since 2.3 - * - * @see ViewHandler#getViews(jakarta.faces.context.FacesContext, String, int, ViewVisitOption...) - * @see ViewDeclarationLanguage#getViews(jakarta.faces.context.FacesContext, String, int, ViewVisitOption...) - * - */ -public enum ViewVisitOption { - - /** - * Return the logical views in the most minimal form form such that they can still be used for an implicit match by the - * navigation handler as described in the Jakarta Faces Specification Document section 7.4.2 "Default NavigationHandler Algorithm". - *

      - * For example, for the Facelets VDL a view such as /foo/bar.xhtml would be returned as - * /foo/bar. - * - */ - RETURN_AS_MINIMAL_IMPLICIT_OUTCOME - -} diff --git a/impl/src/main/java/jakarta/faces/component/ActionSource.java b/impl/src/main/java/jakarta/faces/component/ActionSource.java deleted file mode 100644 index c1bd034e58..0000000000 --- a/impl/src/main/java/jakarta/faces/component/ActionSource.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.faces.event.ActionEvent; -import jakarta.faces.event.ActionListener; - -/** - *

      - * ActionSource is an interface that may be implemented by any concrete {@link UIComponent} that wishes - * to be a source of {@link ActionEvent}s, including the ability to invoke application actions via the default - * {@link ActionListener} mechanism. - *

      - */ -public interface ActionSource { - - // -------------------------------------------------------------- Properties - - /** - *

      - * Return a flag indicating that the default {@link ActionListener} provided by the Jakarta Faces implementation - * should be executed immediately (that is, during Apply Request Values phase of the request processing - * lifecycle), rather than waiting until the Invoke Application phase. The default value for this property must - * be false. - *

      - * - * @return true if immediate, false otherwise. - */ - boolean isImmediate(); - - /** - *

      - * Set the "immediate execution" flag for this {@link UIComponent}. - *

      - * - * @param immediate The new immediate execution flag - */ - void setImmediate(boolean immediate); - - // -------------------------------------------------- Event Listener Methods - - /** - *

      - * Add a new {@link ActionListener} to the set of listeners interested in being notified when {@link ActionEvent}s - * occur. - *

      - * - * @param listener The {@link ActionListener} to be added - * - * @throws NullPointerException if listener is null - */ - void addActionListener(ActionListener listener); - - /** - *

      - * Return the set of registered {@link ActionListener}s for this {@link ActionSource} instance. If there are no - * registered listeners, a zero-length array is returned. - *

      - * - * @return the action listeners, or a zero-length array. - */ - ActionListener[] getActionListeners(); - - /** - *

      - * Remove an existing {@link ActionListener} (if any) from the set of listeners interested in being notified when - * {@link ActionEvent}s occur. - *

      - * - * @param listener The {@link ActionListener} to be removed - * - * @throws NullPointerException if listener is null - */ - void removeActionListener(ActionListener listener); - -} diff --git a/impl/src/main/java/jakarta/faces/component/ActionSource2.java b/impl/src/main/java/jakarta/faces/component/ActionSource2.java deleted file mode 100644 index dba3d2f610..0000000000 --- a/impl/src/main/java/jakarta/faces/component/ActionSource2.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.el.MethodExpression; - -/** - *

      - * ActionSource2 extends {@link ActionSource} and provides a JavaBeans - * "action" property. The type of this property is a {@link MethodExpression}. - * This allows the ActionSource concept to leverage the Jakarta Expression Language API. - *

      - * - * @since 1.2 - */ -public interface ActionSource2 extends ActionSource { - - // -------------------------------------------------------------- Properties - - /** - *

      - * Return the {@link MethodExpression} pointing at the application action to be invoked, if this {@link UIComponent} is - * activated by the user, during the Apply Request Values or Invoke Application phase of the request - * processing lifecycle, depending on the value of the immediate property. - *

      - * - * @return the action expression. - */ - MethodExpression getActionExpression(); - - /** - *

      - * Set the {@link MethodExpression} pointing at the appication action to be invoked, if this {@link UIComponent} is - * activated by the user, during the Apply Request Values or Invoke Application phase of the request - * processing lifecycle, depending on the value of the immediate property. - *

      - * - *

      - * Any method referenced by such an expression must be public, with a return type of String, and accept no - * parameters. - *

      - * - * @param action The new method expression - */ - void setActionExpression(MethodExpression action); - -} diff --git a/impl/src/main/java/jakarta/faces/component/AttachedObjectListHolder.java b/impl/src/main/java/jakarta/faces/component/AttachedObjectListHolder.java deleted file mode 100644 index c15d76fcac..0000000000 --- a/impl/src/main/java/jakarta/faces/component/AttachedObjectListHolder.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import static jakarta.faces.component.UIComponentBase.saveAttachedState; - -import java.lang.reflect.Array; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import jakarta.faces.context.FacesContext; - -/** - *

      - * Utility class to enable partial state saving of Lists of attached objects such as FacesListeners or - * Validators. - *

      - */ -@SuppressWarnings({ "unchecked" }) -class AttachedObjectListHolder implements PartialStateHolder { - - private boolean initialState; - private List attachedObjects = new ArrayList<>(2); - - // ------------------------------------- Methods from PartialStateHolder - - @Override - public void markInitialState() { - - if (!attachedObjects.isEmpty()) { - for (T t : attachedObjects) { - if (t instanceof PartialStateHolder) { - ((PartialStateHolder) t).markInitialState(); - } - } - } - initialState = true; - - } - - @Override - public boolean initialStateMarked() { - return initialState; - } - - @Override - public void clearInitialState() { - - if (!attachedObjects.isEmpty()) { - for (T t : attachedObjects) { - if (t instanceof PartialStateHolder) { - ((PartialStateHolder) t).clearInitialState(); - } - } - } - - initialState = false; - } - - // -------------------------------------------- Methods from StateHolder - - @Override - public Object saveState(FacesContext context) { - - if (context == null) { - throw new NullPointerException(); - } - - if (attachedObjects == null) { - return null; - } - - if (initialState) { - Object[] attachedObjects = new Object[this.attachedObjects.size()]; - boolean stateWritten = false; - for (int i = 0, len = attachedObjects.length; i < len; i++) { - T attachedObject = this.attachedObjects.get(i); - if (attachedObject instanceof StateHolder) { - StateHolder stateHolder = (StateHolder) attachedObject; - if (!stateHolder.isTransient()) { - attachedObjects[i] = stateHolder.saveState(context); - } - if (attachedObjects[i] != null) { - stateWritten = true; - } - } - } - - return stateWritten ? attachedObjects : null; - } - - Object[] attachedObjects = new Object[this.attachedObjects.size()]; - for (int i = 0, len = attachedObjects.length; i < len; i++) { - attachedObjects[i] = saveAttachedState(context, this.attachedObjects.get(i)); - } - - return attachedObjects; - } - - @Override - public void restoreState(FacesContext context, Object state) { - - if (context == null) { - throw new NullPointerException(); - } - - if (state == null) { - return; - } - - Object[] attachedObjects = (Object[]) state; - if (attachedObjects.length > 0 && attachedObjects[0] instanceof StateHolderSaver) { - // overwrite the existing attachedObjects with those included - // in the full state. - if (this.attachedObjects != null) { - this.attachedObjects.clear(); - } else { - this.attachedObjects = new ArrayList<>(2); - } - - for (int i = 0, len = attachedObjects.length; i < len; i++) { - T restored = (T) ((StateHolderSaver) attachedObjects[i]).restore(context); - if (restored != null) { - add(restored); - } - } - } else if (this.attachedObjects != null && this.attachedObjects.size() == attachedObjects.length) { - // Assume 1:1 relation between existing attachedObjects and state - for (int i = 0, len = attachedObjects.length; i < len; i++) { - T attachedObject = this.attachedObjects.get(i); - if (attachedObject instanceof StateHolder) { - ((StateHolder) attachedObject).restoreState(context, attachedObjects[i]); - } - } - } - - } - - @Override - public boolean isTransient() { - return false; - } - - @Override - public void setTransient(boolean newTransientValue) { - // no-op - } - - // ------------------------------------------------------ Public Methods - - void add(T attachedObject) { - clearInitialState(); - attachedObjects.add(attachedObject); - } - - void remove(T attachedObject) { - clearInitialState(); - attachedObjects.remove(attachedObject); - } - - T[] asArray(Class type) { - return new ArrayList<>(attachedObjects).toArray((T[]) Array.newInstance(type, attachedObjects.size())); - } - - Iterator iterator() { - return attachedObjects.iterator(); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/ComponentStateHelper.java b/impl/src/main/java/jakarta/faces/component/ComponentStateHelper.java deleted file mode 100644 index 931f6643b7..0000000000 --- a/impl/src/main/java/jakarta/faces/component/ComponentStateHelper.java +++ /dev/null @@ -1,516 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import static com.sun.faces.facelets.tag.faces.ComponentSupport.MARK_CREATED; -import static com.sun.faces.facelets.tag.faces.ComponentSupport.addToDescendantMarkIdCache; -import static com.sun.faces.util.Util.coalesce; -import static com.sun.faces.util.Util.isEmpty; -import static jakarta.faces.component.UIComponentBase.restoreAttachedState; -import static jakarta.faces.component.UIComponentBase.saveAttachedState; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.function.Supplier; - -import jakarta.el.ValueExpression; -import jakarta.faces.component.UIComponent.PropertyKeys; -import jakarta.faces.context.FacesContext; - -/** - * A base implementation for maps which implement the PartialStateHolder and TransientStateHolder interfaces. - * - * This can be used as a base-class for all state-holder implementations in components, converters and validators and - * other implementations of the StateHolder interface. - */ -@SuppressWarnings({ "unchecked" }) -class ComponentStateHelper implements StateHelper, TransientStateHelper { - - private UIComponent component; - private boolean isTransient; - private Map deltaMap; - private Map defaultMap; - private Map transientState; - - // ------------------------------------------------------------ Constructors - - public ComponentStateHelper(UIComponent component) { - this.component = component; - deltaMap = new HashMap<>(); - defaultMap = new HashMap<>(); - transientState = null; - } - - // ------------------------------------------------ Methods from StateHelper - - /** - * Put the object in the main-map and/or the delta-map, if necessary. - * - * @param key - * @param value - * @return the original value in the delta-map, if not present, the old value in the main map - */ - @Override - public Object put(Serializable key, Object value) { - - if (component.initialStateMarked() || value instanceof PartialStateHolder) { - Object retVal = deltaMap.put(key, value); - - if (retVal == null) { - return defaultMap.put(key, value); - } - - defaultMap.put(key, value); - return retVal; - - } - - return defaultMap.put(key, value); - } - - /** - * We need to remove from both maps, if we do remove an existing key. - * - * @param key - * @return the removed object in the delta-map. if not present, the removed object from the main map - */ - @Override - public Object remove(Serializable key) { - if (component.initialStateMarked()) { - Object retVal = deltaMap.remove(key); - - if (retVal == null) { - return defaultMap.remove(key); - } - - defaultMap.remove(key); - return retVal; - } - - return defaultMap.remove(key); - } - - /** - * @see StateHelper#put(java.io.Serializable, String, Object) - */ - @Override - public Object put(Serializable key, String mapKey, Object value) { - initMap(key); - - if (MARK_CREATED.equals(mapKey)) { - if (PropertyKeys.attributes.equals(key)) { - UIComponent parent = component.getParent(); - if (parent != null) { - // remember this component by its mark id - addToDescendantMarkIdCache(parent, component); - } - } - } - - Object ret = null; - if (component.initialStateMarked()) { - Map dMap = (Map) deltaMap.get(key); - ret = dMap.put(mapKey, value); - } - - Map map = (Map) get(key); - if (ret == null) { - return map.put(mapKey, value); - } - - map.put(mapKey, value); - return ret; - } - - private void initMap(Serializable key) { - if (component.initialStateMarked()) { - Map dMap = (Map) deltaMap.get(key); - if (dMap == null) { - dMap = new HashMap<>(5); - deltaMap.put(key, dMap); - } - } - - Map map = (Map) get(key); - if (map == null) { - map = new HashMap<>(8); - defaultMap.put(key, map); - } - } - - /** - * Get the object from the main-map. As everything is written through from the delta-map to the main-map, this should be - * enough. - * - * @param key - */ - @Override - public Object get(Serializable key) { - return defaultMap.get(key); - } - - /** - * @see StateHelper#eval(java.io.Serializable) - */ - @Override - public Object eval(Serializable key) { - return eval(key, null); - } - - /** - * @see StateHelper#eval(java.io.Serializable, Object) - */ - @Override - public Object eval(Serializable key, Object defaultValue) { - Object retVal = get(key); - - if (retVal == null) { - ValueExpression valueExpression = component.getValueExpression(key.toString()); - if (valueExpression != null) { - retVal = valueExpression.getValue(component.getFacesContext().getELContext()); - } - - } - - return coalesce(retVal, defaultValue); - } - - /** - * @see StateHelper#eval(java.io.Serializable, Supplier) - */ - @Override - public Object eval(Serializable key, Supplier defaultValueSupplier) { - Object retVal = get(key); - - if (retVal == null) { - ValueExpression valueExpression = component.getValueExpression(key.toString()); - if (valueExpression != null) { - retVal = valueExpression.getValue(component.getFacesContext().getELContext()); - } - - } - - if (retVal == null && defaultValueSupplier != null) { - retVal = defaultValueSupplier.get(); - } - - return retVal; - } - - /** - * @see StateHelper#add(java.io.Serializable, Object) - */ - @Override - public void add(Serializable key, Object value) { - - initList(key); - - if (component.initialStateMarked()) { - ((List) deltaMap.get(key)).add(value); - } - - List items = (List) get(key); - items.add(value); - } - - private void initList(Serializable key) { - if (get(key) == null) { - List items = new ArrayList<>(4); - defaultMap.put(key, items); - } - - if (component.initialStateMarked()) { - deltaMap.computeIfAbsent(key, e -> new ArrayList<>((List) get(key))); - } - } - - /** - * @see StateHelper#remove(java.io.Serializable, Object) - */ - @Override - public Object remove(Serializable key, Object valueOrKey) { - Object source = get(key); - - if (source instanceof Collection) { - return removeFromList(key, valueOrKey); - } - - if (source instanceof Map) { - return removeFromMap(key, valueOrKey.toString()); - } - - return null; - } - - // ------------------------------------------------ Methods from StateHolder - - /** - * One and only implementation of save-state - makes all other implementations unnecessary. - * - * @param context - * @return the saved state - */ - @Override - public Object saveState(FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - if (component.initialStateMarked()) { - return saveMap(context, deltaMap); - } - - return saveMap(context, defaultMap); - } - - /** - * One and only implementation of restore state. Makes all other implementations unnecessary. - * - * @param context FacesContext - * @param state the state to be restored. - */ - @Override - public void restoreState(FacesContext context, Object state) { - - if (context == null) { - throw new NullPointerException(); - } - - if (state == null) { - return; - } - - if (!component.initialStateMarked() && !defaultMap.isEmpty()) { - defaultMap.clear(); - if (!isEmpty(deltaMap)) { - deltaMap.clear(); - } - } - - Object[] savedState = (Object[]) state; - if (savedState[savedState.length - 1] != null) { - component.initialState = (Boolean) savedState[savedState.length - 1]; - } - - int length = (savedState.length - 1) / 2; - for (int i = 0; i < length; i++) { - Object value = savedState[i * 2 + 1]; - Serializable serializable = (Serializable) savedState[i * 2]; - if (value != null) { - if (value instanceof Collection) { - value = restoreAttachedState(context, value); - } else if (value instanceof StateHolderSaver) { - value = ((StateHolderSaver) value).restore(context); - } else { - value = value instanceof Serializable ? value : restoreAttachedState(context, value); - } - } - - if (value instanceof Map) { - for (Map.Entry entry : ((Map) value).entrySet()) { - put(serializable, entry.getKey(), entry.getValue()); - } - } else if (value instanceof List) { - defaultMap.remove(serializable); - deltaMap.remove(serializable); - - List values = (List) value; - values.stream().forEach(o -> add(serializable, o)); - } else { - put(serializable, value); - handleAttribute(serializable.toString(), value); - } - } - } - - /* - * Because our renderers optimize we need to make sure that upon restore we mimic the handleAttribute of our standard - * generated HTML components setter methods. - */ - private void handleAttribute(String name, Object value) { - List setAttributes = (List) component.getAttributes().get("jakarta.faces.component.UIComponentBase.attributesThatAreSet"); - if (setAttributes == null) { - String className = getClass().getName(); - if (className != null && className.startsWith("jakarta.faces.component.")) { - setAttributes = new ArrayList<>(6); - component.getAttributes().put("jakarta.faces.component.UIComponentBase.attributesThatAreSet", setAttributes); - } - } - - if (setAttributes != null) { - if (value == null) { - ValueExpression valueExpression = component.getValueExpression(name); - if (valueExpression == null) { - setAttributes.remove(name); - } - } else if (!setAttributes.contains(name)) { - setAttributes.add(name); - } - } - } - - /** - * @see jakarta.faces.component.StateHolder#isTransient() - */ - @Override - public boolean isTransient() { - return isTransient; - } - - /** - * @see StateHolder#setTransient(boolean) - */ - @Override - public void setTransient(boolean newTransientValue) { - isTransient = newTransientValue; - } - - // --------------------------------------------------------- Private Methods - - private Object saveMap(FacesContext context, Map map) { - - if (map.isEmpty()) { - if (!component.initialStateMarked()) { - // only need to propagate the component's delta status when - // delta tracking has been disabled. We're assuming that - // the VDL will reset the status when the view is reconstructed, - // so no need to save the state if the saved state is the default. - return new Object[] { component.initialStateMarked() }; - } - - return null; - } - - Object[] savedState = new Object[map.size() * 2 + 1]; - - int i = 0; - - for (Map.Entry entry : map.entrySet()) { - Object value = entry.getValue(); - savedState[i * 2] = entry.getKey(); - if (value instanceof Collection || value instanceof StateHolder || value instanceof Map || !(value instanceof Serializable)) { - value = saveAttachedState(context, value); - } - savedState[i * 2 + 1] = value; - i++; - } - - if (!component.initialStateMarked()) { - savedState[savedState.length - 1] = component.initialStateMarked(); - } - - return savedState; - - } - - private Object removeFromList(Serializable key, Object value) { - Object ret = null; - if (component.initialStateMarked() || value instanceof PartialStateHolder) { - Collection deltaList = (Collection) deltaMap.get(key); - if (deltaList != null) { - ret = deltaList.remove(value); - if (deltaList.isEmpty()) { - deltaMap.remove(key); - } - } - } - - Collection list = (Collection) get(key); - if (list != null) { - if (ret == null) { - ret = list.remove(value); - } else { - list.remove(value); - } - - if (list.isEmpty()) { - defaultMap.remove(key); - } - } - - return ret; - } - - private Object removeFromMap(Serializable key, String mapKey) { - Object ret = null; - if (component.initialStateMarked()) { - Map dMap = (Map) deltaMap.get(key); - if (dMap != null) { - ret = dMap.remove(mapKey); - if (dMap.isEmpty()) { - deltaMap.remove(key); - } - } - } - Map map = (Map) get(key); - if (map != null) { - if (ret == null) { - ret = map.remove(mapKey); - } else { - map.remove(mapKey); - - } - if (map.isEmpty()) { - defaultMap.remove(key); - } - } - - if (ret != null && !component.initialStateMarked()) { - deltaMap.remove(key); - } - - return ret; - } - - @Override - public Object getTransient(Object key) { - return transientState == null ? null : transientState.get(key); - } - - @Override - public Object getTransient(Object key, Object defaultValue) { - Object returnValue = transientState == null ? null : transientState.get(key); - if (returnValue != null) { - return returnValue; - } - - return defaultValue; - } - - @Override - public Object putTransient(Object key, Object value) { - if (transientState == null) { - transientState = new HashMap<>(); - } - - return transientState.put(key, value); - } - - @Override - public void restoreTransientState(FacesContext context, Object state) { - transientState = (Map) state; - } - - @Override - public Object saveTransientState(FacesContext context) { - return transientState; - } -} diff --git a/impl/src/main/java/jakarta/faces/component/ContextCallback.java b/impl/src/main/java/jakarta/faces/component/ContextCallback.java deleted file mode 100644 index 2be17ff186..0000000000 --- a/impl/src/main/java/jakarta/faces/component/ContextCallback.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.faces.context.FacesContext; - -/** - * - *

      - * A simple callback interace that enables taking action on a specific UIComponent (either facet or child) in the view - * while preserving any contextual state for that component instance in the view. - *

      - * - */ -public interface ContextCallback { - - /** - *

      - * This method will be called by an implementation of {@link UIComponent#invokeOnComponent} and must be passed the - * component with the clientId given as an argument to invokeOnComponent. At the point in time - * when this method is called, the argument target is guaranteed to be in the proper state with respect to - * its ancestors in the View. - *

      - * - * @param context the FacesContext for this request. - * - * @param target the {@link UIComponent} that was located by clientId by a call to - * {@link UIComponent#invokeOnComponent}. - */ - void invokeContextCallback(FacesContext context, UIComponent target); - -} diff --git a/impl/src/main/java/jakarta/faces/component/Doctype.java b/impl/src/main/java/jakarta/faces/component/Doctype.java deleted file mode 100644 index 433fbb6b81..0000000000 --- a/impl/src/main/java/jakarta/faces/component/Doctype.java +++ /dev/null @@ -1,33 +0,0 @@ -package jakarta.faces.component; - -/** - *

      - * Doctype is an interface that must be implemented by any {@link UIComponent} that represents a document type declaration. - *

      - * - * @since 4.0 - */ -public interface Doctype { - - /** - * Returns the name of the first element in the document, never null. - * For example, "html". - * @return The name of the first element in the document, never null. - */ - String getRootElement(); - - /** - * Returns the public identifier of the document, or null if there is none. - * For example, "-//W3C//DTD XHTML 1.1//EN". - * @return The public identifier of the document, or null if there is none. - */ - String getPublic(); - - /** - * Returns the system identifier of the document, or null if there is none. - * For example, "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd". - * @return The system identifier of the document, or null if there is none. - */ - String getSystem(); - -} diff --git a/impl/src/main/java/jakarta/faces/component/EditableValueHolder.java b/impl/src/main/java/jakarta/faces/component/EditableValueHolder.java deleted file mode 100644 index 5253c27b15..0000000000 --- a/impl/src/main/java/jakarta/faces/component/EditableValueHolder.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.faces.event.ValueChangeEvent; -import jakarta.faces.event.ValueChangeListener; -import jakarta.faces.render.Renderer; -import jakarta.faces.validator.Validator; - -/** - *

      - * EditableValueHolder is an extension of - * ValueHolder that describes additional features supported by editable components, including {@link ValueChangeEvent}s - * and {@link Validator}s. - */ - -public interface EditableValueHolder extends ValueHolder { - - /** - *

      - * Return the submittedValue value of this component. This method should only be used by the encodeBegin() - * and/or encodeEnd() methods of this component, or its corresponding {@link Renderer}. - * The action taken based on whether the value is null, empty, or - * non-null is determined based on the value of the - * jakarta.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULLcontext-param. - *

      - * - * @return the submitted value. - */ - Object getSubmittedValue(); - - /** - *

      - * Convenience method to reset this component's value to the un-initialized state. - *

      - * - * @since 2.0 - */ - void resetValue(); - - /** - *

      - * Set the submittedValue value of this component. This method should only be used by the decode() and - * validate() method of this component, or its corresponding {@link Renderer}. - * The action taken based on whether the value is null, empty, or - * non-null is determined based on the value of the - * jakarta.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULLcontext-param. - *

      - * - * @param submittedValue The new submitted value - */ - void setSubmittedValue(Object submittedValue); - - /** - * Return the "local value set" state for this component. Calls to setValue() automatically reset this - * property to true. - * - * @return true if the local value is set, false otherwise. - */ - boolean isLocalValueSet(); - - /** - * Sets the "local value set" state for this component. - * - * @param localValueSet the "local value set" boolean. - */ - void setLocalValueSet(boolean localValueSet); - - /** - *

      - * Return a flag indicating whether the local value of this component is valid (no conversion error has occurred). - *

      - * - * @return true if valid, false otherwise. - */ - boolean isValid(); - - /** - *

      - * Set a flag indicating whether the local value of this component is valid (no conversion error has occurred). - *

      - * - * @param valid The new valid flag - */ - void setValid(boolean valid); - - /** - *

      - * Return the "required field" state for this component. - *

      - * - * @return true if required, false otherwise. - */ - boolean isRequired(); - - /** - *

      - * Set the "required field" state for this component. - *

      - * - * @param required The new "required field" state - */ - void setRequired(boolean required); - - /** - *

      - * Return the "immediate" state for this component. - *

      - * - * @return true if is immediate, false otherwise. - */ - boolean isImmediate(); - - /** - *

      - * Set the "immediate" state for this component. When set to true, the component's value will be converted and validated - * immediately in the Apply Request Values phase, and {@link ValueChangeEvent}s will be delivered in that phase - * as well. The default value for this property must be false. - *

      - * - * @param immediate The new "immediate" state - */ - void setImmediate(boolean immediate); - - /** - *

      - * Add a {@link Validator} instance to the set associated with this component. - *

      - * - * @param validator The {@link Validator} to add - * - * @throws NullPointerException if validator is null - */ - void addValidator(Validator validator); - - /** - *

      - * Return the set of registered {@link Validator}s for this component instance. If there are no registered validators, a - * zero-length array is returned. - *

      - * - * @return the validators, or a zero-length array. - */ - Validator[] getValidators(); - - /** - *

      - * Remove a {@link Validator} instance from the set associated with this component, if it was previously associated. - * Otherwise, do nothing. - *

      - * - * @param validator The {@link Validator} to remove - */ - void removeValidator(Validator validator); - - /** - *

      - * Add a new {@link ValueChangeListener} to the set of listeners interested in being notified when - * {@link ValueChangeEvent}s occur. - *

      - * - * @param listener The {@link ValueChangeListener} to be added - * - * @throws NullPointerException if listener is null - */ - void addValueChangeListener(ValueChangeListener listener); - - /** - *

      - * Return the set of registered {@link ValueChangeListener}s for this component instance. If there are no registered - * listeners, a zero-length array is returned. - *

      - * - * @return the value change listeners, or a zero-length array. - */ - ValueChangeListener[] getValueChangeListeners(); - - /** - *

      - * Remove an existing {@link ValueChangeListener} (if any) from the set of listeners interested in being notified when - * {@link ValueChangeEvent}s occur. - *

      - * - * @param listener The {@link ValueChangeListener} to be removed - * - * @throws NullPointerException if listener is null - */ - void removeValueChangeListener(ValueChangeListener listener); - -} diff --git a/impl/src/main/java/jakarta/faces/component/FacesComponent.java b/impl/src/main/java/jakarta/faces/component/FacesComponent.java deleted file mode 100644 index 62971b484c..0000000000 --- a/impl/src/main/java/jakarta/faces/component/FacesComponent.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -/** - *

      The presence of this annotation on a - * class automatically registers the class with the runtime as a {@link - * UIComponent}. The value of the {@link #value} attribute is taken to - * be the component-type and the fully qualified class name of - * the class to which this annotation is attached is taken to be the - * component-class. The implementation must guarantee that for - * each class annotated with FacesComponent, found with the scanning algorithm in - * section 11.4 "Annotations that correspond to and may take the place of entries in the Application Configuration Resources" of the Jakarta Faces Specification Document, - * {@link jakarta.faces.application.Application#addComponent(java.lang.String,java.lang.String)} - * is called, passing the derived component-type as the first - * argument and the derived component-class as the second - * argument. The implementation must guarantee that all such calls to - * addComponent() happen during application startup time - * and before any requests are serviced.

      - - */ - -/** - *

      - * The presence of this annotation on a class that extends {@link UIComponent} - * must cause the runtime to register this class as a component suitable for inclusion in a view. - * If the createTag attribute is true, the runtime must create - * a corresponding Facelet tag handler according to the rules specified in the attributes of this annotation. - *

      - * - */ -@Retention(RUNTIME) -@Target(TYPE) -@Inherited -public @interface FacesComponent { - - /** - *

      - * Components that declare a createTag = true attribute will be placed into this tag namespace if the - * namespace attribute is omitted. - *

      - */ - public static final String NAMESPACE = "jakarta.faces.component"; - - /** - *

      - * The value of this annotation attribute is taken to be the - * component-type with which instances of this class of component can be instantiated by calling - * {@link jakarta.faces.application.Application#createComponent(java.lang.String)}. If - * no value is specified, or the value is null, the value is taken to be the return of calling - * getSimpleName on the class to which this annotation is attached and lowercasing the first character. If - * more than one component with this derived name is found, the results are undefined. - *

      - * - * @return the component type. - */ - String value() default ""; - - /** - *

      - * If the value of this attribute is true, the runtime must create a Facelet tag handler, that extends from - * {@link jakarta.faces.view.facelets.ComponentHandler}, suitable for use in pages under the tag library with namespace - * given by the value of the {@link #namespace} attribute. - *

      - * - * @return true to create the Facelet tag handler, false otherwise. - */ - boolean createTag() default false; - - /** - *

      - * If the value of the {@link #createTag} attribute is true, the runtime must use this value as the tag - * name for including an instance of the component annotated with this annotation in a view. If this attribute is not - * specified on a usage of this annotation, the simple name of the class on which this annotation is declared, with the - * first character lowercased, is taken to be the value. - *

      - * - * @return the tag name. - */ - String tagName() default ""; - - /** - *

      - * If the value of the {@link #createTag} attribute is true, the value of this attribute is taken to be the - * tag library namespace into which this component is placed. - *

      - * - * @return the namespace. - */ - String namespace() default NAMESPACE; - -} diff --git a/impl/src/main/java/jakarta/faces/component/MessageFactory.java b/impl/src/main/java/jakarta/faces/component/MessageFactory.java deleted file mode 100644 index 367ce62fc7..0000000000 --- a/impl/src/main/java/jakarta/faces/component/MessageFactory.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import java.text.MessageFormat; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -import jakarta.el.ValueExpression; -import jakarta.faces.FactoryFinder; -import jakarta.faces.application.Application; -import jakarta.faces.application.ApplicationFactory; -import jakarta.faces.application.FacesMessage; -import jakarta.faces.context.FacesContext; - -/** - * - *

      - * supported filters: package and protection. - *

      - */ -class MessageFactory { - - private static final String MOJARRA_RESOURCE_BASENAME = "com.sun.faces.resources.Messages"; - - private MessageFactory() { - } - - /** - * @see #getMessage(String, Object...) - * @param severity set a custom severity - */ - static FacesMessage getMessage(String messageId, FacesMessage.Severity severity, Object... params) { - FacesMessage message = getMessage(messageId, params); - message.setSeverity(severity); - return message; - } - - /** - * @see #getMessage(Locale, String, Object...) - * @param severity set a custom severity - */ - static FacesMessage getMessage(Locale locale, String messageId, FacesMessage.Severity severity, Object... params) { - FacesMessage message = getMessage(locale, messageId, params); - message.setSeverity(severity); - return message; - } - - /** - * @see #getMessage(FacesContext, String, Object...) - * @param severity set a custom severity - */ - static FacesMessage getMessage(FacesContext context, String messageId, FacesMessage.Severity severity, Object... params) { - FacesMessage message = getMessage(context, messageId, params); - message.setSeverity(severity); - return message; - } - - /** - *

      - * This version of getMessage() is used for localizing implementation specific messages. - *

      - * - * @param messageId - the key of the message in the resource bundle - * @param params - substittion parameters - * - * @return a localized FacesMessage with the severity of FacesMessage.SEVERITY_ERROR - */ - static FacesMessage getMessage(String messageId, Object... params) { - Locale locale = null; - FacesContext context = FacesContext.getCurrentInstance(); - // context.getViewRoot() may not have been initialized at this point. - if (context != null && context.getViewRoot() != null) { - locale = context.getViewRoot().getLocale(); - if (locale == null) { - locale = Locale.getDefault(); - } - } else { - locale = Locale.getDefault(); - } - - return getMessage(locale, messageId, params); - } - - /** - *

      - * Creates and returns a FacesMessage for the specified Locale. - *

      - * - * @param locale - the target Locale - * @param messageId - the key of the message in the resource bundle - * @param params - substittion parameters - * - * @return a localized FacesMessage with the severity of FacesMessage.SEVERITY_ERROR - */ - static FacesMessage getMessage(Locale locale, String messageId, Object... params) { - String summary = null; - String detail = null; - ResourceBundle bundle; - String bundleName; - - // see if we have a user-provided bundle - Application app = getApplication(); - Class appClass = app.getClass(); - if (null != (bundleName = app.getMessageBundle())) { - if (null != (bundle = ResourceBundle.getBundle(bundleName, locale, getCurrentLoader(appClass)))) { - // see if we have a hit - try { - summary = bundle.getString(messageId); - detail = bundle.getString(messageId + "_detail"); - } catch (MissingResourceException e) { - // ignore - } - } - } - - // we couldn't find a summary in the user-provided bundle - if (null == summary) { - // see if we have a summary in the app provided bundle - bundle = ResourceBundle.getBundle(FacesMessage.FACES_MESSAGES, locale, getCurrentLoader(appClass)); - if (null == bundle) { - throw new NullPointerException(); - } - // see if we have a hit - try { - summary = bundle.getString(messageId); - detail = bundle.getString(messageId + "_detail"); - } catch (MissingResourceException e) { - // ignore - } - } - - // no hit found in the standard jakarta.faces.Messages bundle. - // check the Mojarra resources - if (summary == null) { - // see if we have a summary in the app provided bundle - bundle = ResourceBundle.getBundle(MOJARRA_RESOURCE_BASENAME, locale, getCurrentLoader(appClass)); - if (null == bundle) { - throw new NullPointerException(); - } - // see if we have a hit - try { - summary = bundle.getString(messageId); - } catch (MissingResourceException e) { - return null; - } - } - - // At this point, we have a summary and a bundle. - FacesMessage ret = new BindingFacesMessage(locale, summary, detail, params); - ret.setSeverity(FacesMessage.SEVERITY_ERROR); - return ret; - } - - /** - *

      - * Creates and returns a FacesMessage for the specified Locale. - *

      - * - * @param context - the FacesContext for the current request - * @param messageId - the key of the message in the resource bundle - * @param params - substittion parameters - * - * @return a localized FacesMessage with the severity of FacesMessage.SEVERITY_ERROR - */ - static FacesMessage getMessage(FacesContext context, String messageId, Object... params) { - - if (context == null || messageId == null) { - throw new NullPointerException(" context " + context + " messageId " + messageId); - } - Locale locale; - // viewRoot may not have been initialized at this point. - if (context.getViewRoot() != null) { - locale = context.getViewRoot().getLocale(); - } else { - locale = Locale.getDefault(); - } - - if (null == locale) { - throw new NullPointerException(" locale is null "); - } - - FacesMessage message = getMessage(locale, messageId, params); - if (message != null) { - return message; - } - locale = Locale.getDefault(); - return getMessage(locale, messageId, params); - } - - /** - *

      - * Returns the label property from the specified component. - *

      - * - * @param context - the FacesContext for the current request - * @param component - the component of interest - * - * @return the label, if any, of the component - */ - static Object getLabel(FacesContext context, UIComponent component) { - - Object o = component.getAttributes().get("label"); - if (o == null || o instanceof String && ((String) o).length() == 0) { - o = component.getValueExpression("label"); - } - // Use the "clientId" if there was no label specified. - if (o == null) { - o = component.getClientId(context); - } - return o; - } - - protected static Application getApplication() { - FacesContext context = FacesContext.getCurrentInstance(); - if (context != null) { - return FacesContext.getCurrentInstance().getApplication(); - } - ApplicationFactory afactory = (ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY); - return afactory.getApplication(); - } - - protected static ClassLoader getCurrentLoader(Class fallbackClass) { - ClassLoader loader = Thread.currentThread().getContextClassLoader(); - if (loader == null) { - loader = fallbackClass.getClassLoader(); - } - return loader; - } - - /** - * This class overrides FacesMessage to provide the evaluation of binding expressions in addition to Strings. It is - * often the case, that a binding expression may reference a localized property value that would be used as a - * substitution parameter in the message. For example: #{bundle.userLabel} "bundle" may not be available - * until the page is rendered. The "late" binding evaluation in getSummary and getDetail allow - * the expression to be evaluated when that property is available. - */ - static class BindingFacesMessage extends FacesMessage { - /** - * - */ - private static final long serialVersionUID = -124099152627362643L; - BindingFacesMessage(Locale locale, String messageFormat, String detailMessageFormat, - // array of parameters, both Strings and ValueBindings - Object[] parameters) { - - super(messageFormat, detailMessageFormat); - this.locale = locale; - this.parameters = parameters; - if (parameters != null) { - resolvedParameters = new Object[parameters.length]; - } - } - - @Override - public String getSummary() { - String pattern = super.getSummary(); - resolveBindings(); - return getFormattedString(pattern, resolvedParameters); - } - - @Override - public String getDetail() { - String pattern = super.getDetail(); - resolveBindings(); - return getFormattedString(pattern, resolvedParameters); - } - - private void resolveBindings() { - FacesContext context = null; - if (parameters != null) { - for (int i = 0; i < parameters.length; i++) { - Object o = parameters[i]; - if (o instanceof ValueExpression) { - if (context == null) { - context = FacesContext.getCurrentInstance(); - } - o = ((ValueExpression) o).getValue(context.getELContext()); - } - // to avoid 'null' appearing in message - if (o == null) { - o = ""; - } - resolvedParameters[i] = o; - } - } - } - - private String getFormattedString(String msgtext, Object[] params) { - String localizedStr = null; - - if (params == null || msgtext == null) { - return msgtext; - } - StringBuffer b = new StringBuffer(100); - MessageFormat mf = new MessageFormat(msgtext); - if (locale != null) { - mf.setLocale(locale); - b.append(mf.format(params)); - localizedStr = b.toString(); - } - return localizedStr; - } - - private Locale locale; - private Object[] parameters; - private Object[] resolvedParameters; - } - -} // end of class MessageFactory diff --git a/impl/src/main/java/jakarta/faces/component/NamingContainer.java b/impl/src/main/java/jakarta/faces/component/NamingContainer.java deleted file mode 100644 index 98b4899e3f..0000000000 --- a/impl/src/main/java/jakarta/faces/component/NamingContainer.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -/** - *

      - * NamingContainer is an interface that must be implemented by any - * {@link UIComponent} that wants to be a naming container. Naming containers affect the behavior of the - * {@link UIComponent#findComponent} and {@link UIComponent#getClientId} methods; see those methods for further - * information. - *

      - */ - -public interface NamingContainer { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The default separator character used in component identifiers to demarcate navigation to a child naming container, - * in case {@link UINamingContainer#getSeparatorChar(jakarta.faces.context.FacesContext)} does not resolve to a valid value. - * It is not recommended to use this value directly, the {@link UINamingContainer#getSeparatorChar(jakarta.faces.context.FacesContext)} must be used instead. - *

      - */ - char SEPARATOR_CHAR = ':'; - -} diff --git a/impl/src/main/java/jakarta/faces/component/PartialStateHolder.java b/impl/src/main/java/jakarta/faces/component/PartialStateHolder.java deleted file mode 100644 index 9df2307f89..0000000000 --- a/impl/src/main/java/jakarta/faces/component/PartialStateHolder.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -/** - *

      - * Components that want to leverage the partial state saving feature must implement this interface instead of - * implementing {@link StateHolder}, from which this interface inherits. - *

      - * - * @since 2.0 - */ -public interface PartialStateHolder extends StateHolder { - - /** - *

      - * The runtime must ensure that the {@link #markInitialState} method is called on each instance of this interface in the - * view at the appropriate time to indicate the component is in its initial state. The implementor of the interface must - * ensure that {@link #initialStateMarked} returns true from the time markInitialState() is - * called until {@link #clearInitialState} is called, after which time initialStateMarked() must return - * false. Also, during the time that the instance returns true from - * initialStateMarked(), the implementation must return only the state that has changed in its - * implementation of {@link StateHolder#saveState}. - *

      - * - * @since 2.0 - */ - void markInitialState(); - - /** - *

      - * Return true if delta state changes are being tracked, otherwise false - *

      - * - * @return true if the initial state is marked, false otherwise. - * @since 2.0 - */ - boolean initialStateMarked(); - - /** - *

      - * Reset the PartialStateHolder to a non-delta tracking state. - *

      - * - * @since 2.0 - */ - void clearInitialState(); - -} diff --git a/impl/src/main/java/jakarta/faces/component/SelectItemsIterator.java b/impl/src/main/java/jakarta/faces/component/SelectItemsIterator.java deleted file mode 100644 index 47ba51c16f..0000000000 --- a/impl/src/main/java/jakarta/faces/component/SelectItemsIterator.java +++ /dev/null @@ -1,591 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import java.io.IOException; -import java.io.NotSerializableException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.lang.reflect.Array; -import java.util.Iterator; -import java.util.ListIterator; -import java.util.Map; -import java.util.NoSuchElementException; - -import jakarta.el.ValueExpression; -import jakarta.faces.context.FacesContext; -import jakarta.faces.model.SelectItem; - -/** - *

      - * Package private class for iterating over the set of {@link SelectItem}s for a parent {@link UISelectMany} or - * {@link UISelectOne}. - *

      - * - */ -final class SelectItemsIterator implements Iterator { - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Construct an iterator instance for the specified parent component. - *

      - * - * @param ctx the {@link FacesContext} for the current request - * @param parent The parent {@link UIComponent} whose children will be processed - */ - public SelectItemsIterator(FacesContext ctx, UIComponent parent) { - - kids = parent.getChildren().listIterator(); - this.ctx = ctx; - - } - - // ------------------------------------------------------ Instance Variables - - /** - *

      - * Iterator over the SelectItem elements pointed at by a UISelectItems component, or null. - *

      - */ - private Iterator items; - - /** - *

      - * Iterator over the children of the parent component. - *

      - */ - private ListIterator kids; - - /** - * Expose single SelectItems via an Iterator. This iterator will be reset/reused for each individual SelectItem instance - * encountered. - */ - private SingleElementIterator singleItemIterator; - - /** - * The {@link FacesContext} for the current request. - */ - private FacesContext ctx; - - // -------------------------------------------------------- Iterator Methods - - /** - *

      - * Return true if the iteration has more elements. - *

      - */ - @Override - public boolean hasNext() { - - if (items != null) { - if (items.hasNext()) { - return true; - } else { - items = null; - } - } - Object next = findNextValidChild(); - while (next != null) { - initializeItems(next); - if (items != null) { - return true; - } else { - next = findNextValidChild(); - } - } - return false; - - } - - /** - *

      - * Return the next element in the iteration. - *

      - * - * @throws NoSuchElementException if there are no more elements - */ - @Override - public SelectItem next() { - - if (!hasNext()) { - throw new NoSuchElementException(); - } - if (items != null) { - return items.next(); - } - return next(); - - } - - /** - *

      - * Throw UnsupportedOperationException. - *

      - */ - @Override - public void remove() { - - throw new UnsupportedOperationException(); - - } - - // --------------------------------------------------------- Private Methods - - /** - *

      - * Initializes the items instance variable with an Iterator appropriate to the UISelectItem(s) - * value. - *

      - */ - private void initializeItems(Object kid) { - - if (kid instanceof UISelectItem) { - UISelectItem ui = (UISelectItem) kid; - SelectItem item = (SelectItem) ui.getValue(); - if (item == null) { - item = new SelectItem(ui.getItemValue(), ui.getItemLabel(), ui.getItemDescription(), ui.isItemDisabled(), ui.isItemEscaped(), - ui.isNoSelectionOption()); - } - updateSingeItemIterator(item); - items = singleItemIterator; - } else if (kid instanceof UISelectItems) { - UISelectItems ui = (UISelectItems) kid; - Object value = ui.getValue(); - if (value != null) { - if (value instanceof SelectItem) { - updateSingeItemIterator((SelectItem) value); - items = singleItemIterator; - } else if (value.getClass().isArray()) { - items = new ArrayIterator(ctx, (UISelectItems) kid, value); - } else if (value instanceof Iterable) { - items = new IterableItemIterator(ctx, (UISelectItems) kid, (Iterable) value); - } else if (value instanceof Map) { - items = new MapIterator((Map) value); - } else { - throw new IllegalArgumentException(); - } - } - if (items != null && !items.hasNext()) { - items = null; - } - } - - } - - /** - * @return the next valid child for processing - */ - private Object findNextValidChild() { - - if (kids.hasNext()) { - Object next = kids.next(); - while (kids.hasNext() && !(next instanceof UISelectItem || next instanceof UISelectItems)) { - next = kids.next(); - } - if (next instanceof UISelectItem || next instanceof UISelectItems) { - return next; - } - } - return null; - - } - - /** - * Update the singleItemIterator with the provided item - * - * @param item the {@link SelectItem} to expose as an Iterator - */ - private void updateSingeItemIterator(SelectItem item) { - - if (singleItemIterator == null) { - singleItemIterator = new SingleElementIterator(); - } - singleItemIterator.updateItem(item); - - } - - // ---------------------------------------------------------- Nested Classes - - /** - * Exposes single {@link SelectItem} instances as an Iterator. - */ - private static final class SingleElementIterator implements Iterator { - - private SelectItem item; - private boolean nextCalled; - - // ----------------------------------------------- Methods from Iterator - - @Override - public boolean hasNext() { - - return !nextCalled; - - } - - @Override - public SelectItem next() { - - if (nextCalled) { - throw new NoSuchElementException(); - } - nextCalled = true; - return item; - - } - - @Override - public void remove() { - - throw new UnsupportedOperationException(); - - } - - // ----------------------------------------------------- Private Methods - - private void updateItem(SelectItem item) { - - this.item = item; - nextCalled = false; - - } - - } // END SingleElementIterator - - /** - * Iterates over a Map of values exposing each entry as a SelectItem. Note that this will do so re-using - * the same SelectItem but changing the value and label as appropriate. - */ - private static final class MapIterator implements Iterator { - - private SelectItem item = new SelectItem(); - private Iterator iterator; - - // -------------------------------------------------------- Constructors - - private MapIterator(Map map) { - - iterator = map.entrySet().iterator(); - - } - - // ----------------------------------------------- Methods from Iterator - - @Override - public boolean hasNext() { - - return iterator.hasNext(); - - } - - @Override - public SelectItem next() { - - Map.Entry entry = (Map.Entry) iterator.next(); - Object key = entry.getKey(); - Object value = entry.getValue(); - item.setLabel(key != null ? key.toString() : value.toString()); - item.setValue(value != null ? value : ""); - return item; - - } - - @Override - public void remove() { - - throw new UnsupportedOperationException(); - - } - - } // END MapIterator - - /** - *

      - * Base class to support iterating over Collections or Arrays that may or may not contain SelectItem - * instances. - *

      - */ - private static abstract class GenericObjectSelectItemIterator implements Iterator { - - /** - * SelectItem that is updated based on the current Object being iterated over. - */ - private GenericObjectSelectItem genericObjectSI; - - /** - * The source UISelectItems. - */ - protected UISelectItems sourceComponent; - - // -------------------------------------------------------- Constructors - - protected GenericObjectSelectItemIterator(UISelectItems sourceComponent) { - - this.sourceComponent = sourceComponent; - - } - - // --------------------------------------------------- Protected Methods - - protected SelectItem getSelectItemFor(FacesContext ctx, Object value) { - - if (genericObjectSI == null) { - genericObjectSI = new GenericObjectSelectItem(sourceComponent); - } - - genericObjectSI.updateItem(ctx, value); - return genericObjectSI; - - } - - // ------------------------------------------------------ Nested Classes - - /** - * A SelectItem implementation to support generating unique SelectItem values based on - * ValueExpressions from the owning {@link UISelectItems} instance. - */ - private static final class GenericObjectSelectItem extends SelectItem { - - private static final String VAR = "var"; - private static final String ITEM_VALUE = "itemValue"; - private static final String ITEM_LABEL = "itemLabel"; - private static final String ITEM_DESCRIPTION = "itemDescription"; - private static final String ITEM_ESCAPED = "itemLabelEscaped"; - private static final String ITEM_DISABLED = "itemDisabled"; - private static final String NO_SELECTION_OPTION = "noSelectionOption"; - - /** - * Resolves to the value of the SelectItem. - */ - private ValueExpression itemValue; - - /** - * Resolves to the label of the SelectItem. - */ - private ValueExpression itemLabel; - - /** - * Resolves to the description of the SelectItem. - */ - private ValueExpression itemDescription; - - /** - * Determines the value for the escaped property of the SelectItem. - */ - private ValueExpression itemEscaped; - - /** - * Determines the value for the disabled property of the SelectItem/ - */ - private ValueExpression itemDisabled; - - /** - * Determines the value for the noSelectionOption property of the SelectItem/ - */ - private ValueExpression noSelectionOption; - - /** - * The request-scoped variable under which the current object will be exposed. - */ - private String var; - - private UISelectItems sourceComponent; - - // -------------------------------------------------------- Constructors - - private GenericObjectSelectItem(UISelectItems sourceComponent) { - - var = (String) sourceComponent.getAttributes().get(VAR); - this.sourceComponent = sourceComponent; - // itemValue = sourceComponent.getValueExpression(ITEM_VALUE); - // itemLabel = sourceComponent.getValueExpression(ITEM_LABEL); - // itemDescription = sourceComponent.getValueExpression(ITEM_DESCRIPTION); - // itemEscaped = sourceComponent.getValueExpression(ITEM_ESCAPED); - // itemDisabled = sourceComponent.getValueExpression(ITEM_DISABLED); - // noSelectionOption = sourceComponent.getValueExpression(NO_SELECTION_OPTION); - - } - - // ----------------------------------------------------- Private Methods - - /** - * Updates the SelectItem properties based on the current value. - * - * @param ctx the {@link FacesContext} for the current request - * @param value the value to build the updated values from - */ - private void updateItem(FacesContext ctx, Object value) { - - Map reqMap = ctx.getExternalContext().getRequestMap(); - Object oldVarValue = null; - if (var != null) { - oldVarValue = reqMap.put(var, value); - } - try { - Map attrs = sourceComponent.getAttributes(); - Object itemValueResult = attrs.get(ITEM_VALUE); - Object itemLabelResult = attrs.get(ITEM_LABEL); - Object itemDescriptionResult = attrs.get(ITEM_DESCRIPTION); - Object itemEscapedResult = attrs.get(ITEM_ESCAPED); - Object itemDisabledResult = attrs.get(ITEM_DISABLED); - Object noSelectionOptionResult = attrs.get(NO_SELECTION_OPTION); - setValue(itemValueResult != null ? itemValueResult : value); - setLabel(itemLabelResult != null ? itemLabelResult.toString() : value.toString()); - setDescription(itemDescriptionResult != null ? itemDescriptionResult.toString() : null); - setEscape(itemEscapedResult != null ? Boolean.valueOf(itemEscapedResult.toString()) : true); - setDisabled(itemDisabledResult != null ? Boolean.valueOf(itemDisabledResult.toString()) : false); - setNoSelectionOption(noSelectionOptionResult != null ? Boolean.valueOf(noSelectionOptionResult.toString()) : false); - } finally { - if (var != null) { - if (oldVarValue != null) { - reqMap.put(var, oldVarValue); - } else { - reqMap.remove(var); - } - } - } - - } - - // --------------------------------------- Methods from Serializable - - private void writeObject(ObjectOutputStream out) throws IOException { - - throw new NotSerializableException(); - - } - - private void readObject(ObjectInputStream in) throws IOException { - - throw new NotSerializableException(); - - } - - } // END GenericObjectSelectItem - - } // END GenericObjectSelectItemIterator - - /** - * Handles arrays of SelectItems, generic Objects, or combintations of both. - * - * A single GenericObjectSelectItem will be leverage for any non-SelectItem objects - * encountered. - */ - private static final class ArrayIterator extends GenericObjectSelectItemIterator { - - private FacesContext ctx; - private Object array; - private int count; - private int index; - - // -------------------------------------------------------- Constructors - - private ArrayIterator(FacesContext ctx, UISelectItems sourceComponent, Object array) { - - super(sourceComponent); - this.ctx = ctx; - this.array = array; - count = Array.getLength(array); - - } - - // ----------------------------------------------- Methods from Iterator - - @Override - public boolean hasNext() { - - return index < count; - - } - - @Override - public SelectItem next() { - - if (index >= count) { - throw new NoSuchElementException(); - } - - Object item = Array.get(array, index++); - if (item instanceof SelectItem) { - return (SelectItem) item; - } else { - return getSelectItemFor(ctx, item); - } - - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - } // END ArrayIterator - - /** - * Handles Collections of SelectItems, generic Objects, or combintations of both. - * - * A single GenericObjectSelectItem will be leverage for any non-SelectItem objects - * encountered. - */ - private static final class IterableItemIterator extends GenericObjectSelectItemIterator { - - private FacesContext ctx; - private Iterator iterator; - - // -------------------------------------------------------- Constructors - - private IterableItemIterator(FacesContext ctx, UISelectItems sourceComponent, Iterable iterable) { - - super(sourceComponent); - this.ctx = ctx; - iterator = iterable.iterator(); - - } - - // ----------------------------------------------- Methods from Iterator - - @Override - public boolean hasNext() { - - return iterator.hasNext(); - - } - - @Override - public SelectItem next() { - - Object item = iterator.next(); - if (item instanceof SelectItem) { - return (SelectItem) item; - } else { - return getSelectItemFor(ctx, item); - } - - } - - @Override - public void remove() { - - throw new UnsupportedOperationException(); - - } - - } // END CollectionItemIterator - -} diff --git a/impl/src/main/java/jakarta/faces/component/SelectUtils.java b/impl/src/main/java/jakarta/faces/component/SelectUtils.java deleted file mode 100644 index 4850650540..0000000000 --- a/impl/src/main/java/jakarta/faces/component/SelectUtils.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import java.util.Iterator; -import java.util.NoSuchElementException; - -import jakarta.el.ELException; -import jakarta.el.ExpressionFactory; -import jakarta.faces.context.FacesContext; -import jakarta.faces.convert.Converter; -import jakarta.faces.model.SelectItem; -import jakarta.faces.model.SelectItemGroup; - -/** - * Contains common utility methods used by both {@link UISelectOne} and {@link UISelectMany}. - */ -class SelectUtils { - - // ------------------------------------------------------------ Constructors - - private SelectUtils() { - } - - // ------------------------------------------------- Package Private Methods - - /** - *

      - * Return true if the specified value matches one of the available options, performing a recursive search - * if if a {@link jakarta.faces.model.SelectItemGroup} instance is detected. - *

      - * - * @param ctx {@link FacesContext} for the current request - * @param value {@link UIComponent} value to be tested - * @param items Iterator over the {@link jakarta.faces.model.SelectItem}s to be checked - * @param converter the {@link Converter} associated with this component - */ - static boolean matchValue(FacesContext ctx, UIComponent component, Object value, Iterator items, Converter converter) { - - while (items.hasNext()) { - SelectItem item = items.next(); - if (item instanceof SelectItemGroup) { - SelectItem subitems[] = ((SelectItemGroup) item).getSelectItems(); - if (subitems != null && subitems.length > 0) { - if (matchValue(ctx, component, value, new ArrayIterator(subitems), converter)) { - return true; - } - } - } else { - Object compareValue = null; - - try { - compareValue = doConversion(ctx, component, item, value, converter); - } catch (IllegalStateException ise) { - continue; - } - - if (null == compareValue && null == value) { - return true; - } - - if (value.equals(compareValue)) { - return true; - } - } - } - return false; - - } - - /** - * Returns true iff component has a {@link UISelectItem} child whose itemValue exactly matches the argument value - * - * @param ctx - * @param component - * @param value - * @param items - * @return - */ - - static boolean valueIsNoSelectionOption(FacesContext ctx, UIComponent component, Object value, Iterator items, Converter converter) { - boolean result = false; - - while (items.hasNext()) { - SelectItem item = items.next(); - if (item instanceof SelectItemGroup) { - SelectItem subitems[] = ((SelectItemGroup) item).getSelectItems(); - if (subitems != null && subitems.length > 0) { - if (valueIsNoSelectionOption(ctx, component, value, new ArrayIterator(subitems), converter)) { - result = true; - break; - } - } - } else { - Object compareValue = null; - - try { - compareValue = doConversion(ctx, component, item, value, converter); - } catch (IllegalStateException ise) { - continue; - } - - if (null == compareValue && null == value && item.isNoSelectionOption()) { - result = true; - break; - } else if (value.equals(compareValue) && item.isNoSelectionOption()) { - result = true; - break; - } - } - - } - - return result; - } - - private static Object doConversion(FacesContext ctx, UIComponent component, SelectItem item, Object value, Converter converter) - throws IllegalStateException { - Object itemValue = item.getValue(); - if (itemValue == null && value == null) { - return null; - } - if (value == null ^ itemValue == null) { - throw new IllegalStateException("Either value was null, or itemValue was null, but not both."); - } - Object compareValue; - if (converter == null) { - compareValue = coerceToModelType(ctx, itemValue, value.getClass()); - } else { - compareValue = itemValue; - if (compareValue instanceof String && !(value instanceof String)) { - // type mismatch between the time and the value we're - // comparing. Invoke the Converter. - compareValue = converter.getAsObject(ctx, component, (String) compareValue); - } - } - - return compareValue; - } - - /** - * Coerce the provided value to the specified type using Jakarta Expression Language coercion. - * - * @param ctx the {@link FacesContext} for the current request - * @param value the value to coerce - * @param toType the type value should be coerced to - * - * @return the result of the Jakarta Expression Language coersion - * - * @see ExpressionFactory#coerceToType(Object, Class) - */ - private static Object coerceToModelType(FacesContext ctx, Object value, Class toType) { - - Object newValue; - try { - ExpressionFactory ef = ctx.getApplication().getExpressionFactory(); - newValue = ef.coerceToType(value, toType); - } catch (ELException | IllegalArgumentException ele) { - // If coerceToType fails, per the docs it should throw - // an ELException, however, GF 9.0 and 9.0u1 will throw - // an IllegalArgumentException instead (see GF issue 1527). - newValue = value; - } - - return newValue; - - } - - // ---------------------------------------------------------- Nested Classes - - /** - * Exposes an Array via an Iterator - */ - static class ArrayIterator implements Iterator { - - public ArrayIterator(Object items[]) { - this.items = items; - } - - private Object items[]; - private int index = 0; - - @Override - public boolean hasNext() { - return index < items.length; - } - - @Override - public Object next() { - try { - return items[index++]; - } catch (IndexOutOfBoundsException e) { - throw new NoSuchElementException(); - } - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - } // END ArrayIterator - -} diff --git a/impl/src/main/java/jakarta/faces/component/SharedUtils.java b/impl/src/main/java/jakarta/faces/component/SharedUtils.java deleted file mode 100644 index 9fb0498b8c..0000000000 --- a/impl/src/main/java/jakarta/faces/component/SharedUtils.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import jakarta.faces.application.Application; -import jakarta.faces.context.FacesContext; - -class SharedUtils { - - /* - * Determine whether String is a mixed value binding expression or not. - */ - static boolean isMixedExpression(String expression) { - - if (null == expression) { - return false; - } - - // if it doesn't start and end with delimiters - return !(expression.startsWith("#{") && expression.endsWith("}")) && isExpression(expression); - - } - - /* - * Determine whether String is a value binding expression or not. - */ - static boolean isExpression(String expression) { - - if (null == expression) { - return false; - } - - // check to see if attribute has an expression - int start = expression.indexOf("#{"); - return start != -1 && expression.indexOf('}', start + 2) != -1; - } - - static Map> evaluateExpressions(FacesContext context, Map> map) { - if (map != null && !map.isEmpty()) { - Map> ret = new HashMap<>(map.size()); - for (Map.Entry> entry : map.entrySet()) { - ret.put(entry.getKey(), evaluateExpressions(context, entry.getValue())); - } - - return ret; - } - - return map; - } - - static List evaluateExpressions(FacesContext context, List values) { - if (!values.isEmpty()) { - List ret = new ArrayList<>(values.size()); - Application app = context.getApplication(); - for (String val : values) { - if (val != null) { - String value = val.trim(); - if (isExpression(value)) { - value = app.evaluateExpressionGet(context, value, String.class); - } - ret.add(value); - } - } - - return ret; - } - return values; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/StateHelper.java b/impl/src/main/java/jakarta/faces/component/StateHelper.java deleted file mode 100644 index 5a83a51e4e..0000000000 --- a/impl/src/main/java/jakarta/faces/component/StateHelper.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import java.io.Serializable; -import java.util.function.Supplier; - -/** - *

      - * Define a Map-like contract that makes it easier for components to implement {@link PartialStateHolder}. - * Each {@link UIComponent} in the view will return an implementation of this interface from its - * {@link UIComponent#getStateHelper} method. - *

      - * - * @since 2.0 - */ -public interface StateHelper extends StateHolder { - - /** - *

      - * Return the previously stored value and store the specified key/value pair. This is intended to store data that would - * otherwise reside in an instance variable on the component. - *

      - * - * @param key the key for the value - * @param value the value - * @return the previously stored value - * @since 2.0 - */ - Object put(Serializable key, Object value); - - /** - *

      - * Remove the key/value pair from the helper, returning the value previously stored under this key. - *

      - * - * @param key the key to remove - * @return the removed value. - * @since 2.0 - */ - Object remove(Serializable key); - - /** - *

      - * Store the specified mapKey/value in a Map that is internal to the helper, and - * return the previously stored value. The Map will then be associated with key. - *

      - * - *
      - * - *

      - * It's important to note for delta tracking that any modifications to the internal Map be made through - * this method or {@link StateHelper#remove(java.io.Serializable, Object)}. - *

      - * - *
      - * - * @param key the key of the map itself - * @param mapKey the key within the internal map - * @param value the value for the key in the internal map - * @return the value. - * @since 2.0 - */ - Object put(Serializable key, String mapKey, Object value); - - /** - *

      - * Return the value currently associated with the specified key if any. - *

      - * - * @param key the key for which the value should be returned. - * @return the value. - * @since 2.0 - */ - Object get(Serializable key); - - /** - *

      - * Attempts to find a value associated with the specified key, using the value expression collection from the component - * if no such value is found. - *

      - * - * @param key the name of the value in the internal map, or the name of a value expression in the components value - * expression collection. - * - * @return the evaluated value. - * @since 2.0 - */ - Object eval(Serializable key); - - /** - *

      - * Performs the same logic as {@link #eval(java.io.Serializable)} } but if no value is found, this will return the - * specified defaultValue - *

      - * - * @param key the key for which the value should be returned. - * @param defaultValue the value to return if no value is found in the call to eval(). - * @return the evaluated value. - * @since 2.0 - */ - Object eval(Serializable key, Object defaultValue); - - /** - *

      - * Performs the same logic as {@link #eval(java.io.Serializable)} } but if no value is found, this will return the - * return-value of the defaultValueSupplier - *

      - * - * @param key the key for which the value should be returned. - * @param defaultValueSupplier the supplier used to evaluate the default value if no value is found in the call to eval(). - * @return the evaluated value. - * @since 4.0 - */ - Object eval(Serializable key, Supplier defaultValueSupplier); - - /** - *

      - * Store the specified value in a List that is internal to the StateHelper. - *

      - * - *

      - * It's important to note for delta tracking that any modifications to the internal List be made through - * this method or {@link StateHelper#remove(java.io.Serializable, Object)}. - *

      - * - * @param key the key for which the value should be returned. - * @param value the value to add - * @since 2.0 - */ - void add(Serializable key, Object value); - - /** - *

      - * Remove a value from the inner data structure. Look in the inner data structure for the value at the given - * key. If the value is a Map, remove and return the value under the key given by the - * valueOrKey argument. If the value is a Collection, simply remove the value given by the - * argument valueOrKey and return null. - *

      - * - * @param key the key of in the inner data structure whose value is a Collection or Map - * @param valueOrKey the value or key to be removed. - * @return the removed value. - */ - Object remove(Serializable key, Object valueOrKey); - -} diff --git a/impl/src/main/java/jakarta/faces/component/StateHolder.java b/impl/src/main/java/jakarta/faces/component/StateHolder.java deleted file mode 100644 index 7e20b04b47..0000000000 --- a/impl/src/main/java/jakarta/faces/component/StateHolder.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.faces.context.FacesContext; - -/** - * - *

      - * This interface is implemented by classes that need to save their - * state between requests. - *

      - * - *

      - * An implementor must implement both {@link #saveState} and {@link #restoreState} methods in this - * class, since these two methods have a tightly coupled contract between themselves. In other words, if there is an - * ineritance hierarchy, it is not permissable to have the {@link #saveState} and {@link #restoreState} methods reside - * at different levels of the hierarchy. - *

      - * - *

      - * An implementor must have a public no-args constructor. - *

      - * - */ - -public interface StateHolder { - - /** - *

      - * Gets the state of the instance as a Serializable Object. - *

      - * - *

      - * If the class that implements this interface has references to instances that implement StateHolder (such as a - * UIComponent with event handlers, validators, etc.) this method must call the {@link #saveState} method - * on all those instances as well. This method must not save the state of children and facets. That is - * done via the {@link jakarta.faces.application.StateManager} - *

      - * - *

      - * This method must not alter the state of the implementing object. In other words, after executing this code: - *

      - * - *
      -     * 
      -     * Object state = component.saveState(facesContext);
      -     * 
      -     * 
      - * - *

      - * component should be the same as before executing it. - *

      - * - *

      - * The return from this method must be Serializable - *

      - * - * @param context the Faces context. - * @return the saved state. - * @throws NullPointerException if context is null - */ - - Object saveState(FacesContext context); - - /** - * - *

      - * Perform any processing required to restore the state from the entries - * in the state Object. - *

      - * - *

      - * If the class that implements this interface has references to instances that also implement StateHolder (such as a - * UIComponent with event handlers, validators, etc.) this method must call the {@link #restoreState} - * method on all those instances as well. - *

      - * - *

      - * If the state argument is null, take no action and return. - *

      - * - * @param context the Faces context. - * @param state the state. - * @throws NullPointerException if context is null. - */ - - void restoreState(FacesContext context, Object state); - - /** - * - *

      - * If true, the Object implementing this interface must not participate in state saving or restoring. - *

      - * - * @return true if transient, false otherwise. - */ - - boolean isTransient(); - - /** - *

      - * Denotes whether or not the Object implementing this interface must or - * must not participate in state saving or restoring. - *

      - * - * @param newTransientValue boolean pass true if this Object will - * not participate in state saving or restoring, otherwise pass false. - */ - void setTransient(boolean newTransientValue); - -} diff --git a/impl/src/main/java/jakarta/faces/component/StateHolderSaver.java b/impl/src/main/java/jakarta/faces/component/StateHolderSaver.java deleted file mode 100644 index 8966b72c21..0000000000 --- a/impl/src/main/java/jakarta/faces/component/StateHolderSaver.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import java.io.Serializable; - -import jakarta.faces.context.FacesContext; - -/** - *

      - * Helper class for saving and restoring attached objects. - *

      - */ -class StateHolderSaver implements Serializable { - - private static final long serialVersionUID = 6470180891722042701L; - - private String className = null; - private Serializable savedState = null; - - public static final String DYNAMIC_COMPONENT = "com.sun.faces.DynamicComponent"; - - private enum StateHolderTupleIndices { - StateHolderSaverInstance, ComponentAddedDynamically, LastMember - } - - public boolean componentAddedDynamically() { - boolean result = false; - - // if the Object to save implemented Serializable but not - // StateHolder - if (null == className && null != savedState) { - return result; - } - - // if the Object to save did not implement Serializable or - // StateHolder - if (className == null) { - return result; - } - - // else the object to save did implement StateHolder - - if (null != savedState) { - // don't need to check transient, since that was done on - // the saving side. - Serializable[] tuple = (Serializable[]) savedState; - result = (Boolean) tuple[StateHolderTupleIndices.ComponentAddedDynamically.ordinal()]; - } - - return result; - } - - public StateHolderSaver(FacesContext context, Object toSave) { - if (toSave == null) { - className = null; - } else { - className = toSave.getClass().getName(); - } - - if (toSave instanceof StateHolder) { - // do not save an attached object that is marked transient. - if (!((StateHolder) toSave).isTransient()) { - Serializable[] tuple = new Serializable[StateHolderTupleIndices.LastMember.ordinal()]; - - tuple[StateHolderTupleIndices.StateHolderSaverInstance.ordinal()] = (Serializable) ((StateHolder) toSave).saveState(context); - if (toSave instanceof UIComponent) { - tuple[StateHolderTupleIndices.ComponentAddedDynamically.ordinal()] = ((UIComponent) toSave).getAttributes().containsKey(DYNAMIC_COMPONENT) - ? Boolean.TRUE - : Boolean.FALSE; - } - savedState = tuple; - } else { - className = null; - } - } else if (toSave instanceof Serializable) { - savedState = (Serializable) toSave; - className = null; - } - } - - /** - * - * @return the restored {@link StateHolder} instance. - */ - - public Object restore(FacesContext context) throws IllegalStateException { - Object result = null; - Class toRestoreClass; - - // if the Object to save implemented Serializable but not - // StateHolder - if (null == className && null != savedState) { - return savedState; - } - - // if the Object to save did not implement Serializable or - // StateHolder - if (className == null) { - return null; - } - - // else the object to save did implement StateHolder - - try { - toRestoreClass = loadClass(className, this); - } catch (ClassNotFoundException e) { - throw new IllegalStateException(e); - } - - if (null != toRestoreClass) { - try { - result = toRestoreClass.newInstance(); - } catch (InstantiationException e) { - throw new IllegalStateException(e); - } catch (IllegalAccessException a) { - throw new IllegalStateException(a); - } - } - - if (null != result && null != savedState && result instanceof StateHolder) { - // don't need to check transient, since that was done on - // the saving side. - Serializable[] tuple = (Serializable[]) savedState; - ((StateHolder) result).restoreState(context, tuple[StateHolderTupleIndices.StateHolderSaverInstance.ordinal()]); - } - return result; - } - - private static Class loadClass(String name, Object fallbackClass) throws ClassNotFoundException { - ClassLoader loader = Thread.currentThread().getContextClassLoader(); - if (loader == null) { - loader = fallbackClass.getClass().getClassLoader(); - } - return Class.forName(name, false, loader); - } -} diff --git a/impl/src/main/java/jakarta/faces/component/TransientStateHelper.java b/impl/src/main/java/jakarta/faces/component/TransientStateHelper.java deleted file mode 100644 index 889b661bea..0000000000 --- a/impl/src/main/java/jakarta/faces/component/TransientStateHelper.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -/** - *

      - * Define a Map-like contract that makes it easier for components to implement - * {@link TransientStateHolder}. Each {@link UIComponent} in the view will return an implementation of this interface - * from its {@link UIComponent#getTransientStateHelper} method. - *

      - * - *
      - * - *

      - * The values retrieved or saved through {@link #getTransient} or {@link #putTransient} will not be preserved between - * requests. - *

      - * - *
      - * - * @since 2.1 - * - */ -public interface TransientStateHelper extends TransientStateHolder { - /** - *

      - * Return the value currently associated with the specified key if any. - *

      - * - * @param key the key for which the value should be returned. - * @return the stored value. - * @since 2.1 - */ - Object getTransient(Object key); - - /** - *

      - * Performs the same logic as {@link #getTransient} } but if no value is found, this will return the specified - * defaultValue - *

      - * - * @param key the key for which the value should be returned. - * @param defaultValue the value to return if no value is found in the call to get(). - * @return the stored value. - * @since 2.1 - */ - Object getTransient(Object key, Object defaultValue); - - /** - *

      - * Return the previously stored value and store the specified key/value pair. This is intended to store data that would - * otherwise reside in an instance variable on the component. - *

      - * - * @param key the key for the value - * @param value the value - * @return the previously stored value - * @since 2.1 - */ - Object putTransient(Object key, Object value); -} diff --git a/impl/src/main/java/jakarta/faces/component/TransientStateHolder.java b/impl/src/main/java/jakarta/faces/component/TransientStateHolder.java deleted file mode 100644 index 9026e21f5e..0000000000 --- a/impl/src/main/java/jakarta/faces/component/TransientStateHolder.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.faces.context.FacesContext; - -/** - *

      - * This interface is implemented by classes that need to save state that is expected to be available only within the - * scope of the current request. - *

      - * - *
      - * - *

      - * An implementor must implement both {@link #saveTransientState} and {@link #restoreTransientState} - * methods in this class, since these two methods have a tightly coupled contract between themselves. In other words, if - * there is an inheritance hierarchy, it is not permissible to have the {@link #saveTransientState} and - * {@link #restoreTransientState} methods reside at different levels of the hierarchy. - *

      - * - *

      - * An example of transient state is the "submitted" property on forms. - *

      - * - *
      - * - * @since 2.1 - */ -public interface TransientStateHolder { - - /** - *

      - * Return the object containing related "transient states". that could be used later to restore the "transient state". - *

      - * - * @param context the Faces context. - * @return object containing transient values - * @since 2.1 - */ - Object saveTransientState(FacesContext context); - - /** - *

      - * Restore the "transient state" using the object passed as state. - *

      - * - *

      - * If the state argument is null clear any previous transient state if any and return. - *

      - * - * @param context the Faces context - * @param state the object containing transient values - * @since 2.1 - */ - void restoreTransientState(FacesContext context, Object state); -} diff --git a/impl/src/main/java/jakarta/faces/component/TypedCollections.java b/impl/src/main/java/jakarta/faces/component/TypedCollections.java deleted file mode 100644 index cd38ba2cf5..0000000000 --- a/impl/src/main/java/jakarta/faces/component/TypedCollections.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.Set; - -class TypedCollections { - - /** - * Dynamically check that the members of the collection are all instances of the given type (or null). - */ - private static boolean checkCollectionMembers(Collection c, Class type) { - for (Object element : c) { - if (element != null && !type.isInstance(element)) { - return false; - } - } - return true; - } - - /** - * Dynamically check that the members of the collection are all instances of the given type (or null), and that the - * collection itself is of the given collection type. - * - * @param the collection's element type - * @param c the collection to cast - * @param type the class of the collection's element type. - * @return the dynamically-type checked collection. - * @throws java.lang.ClassCastException - */ - static > TypedC dynamicallyCastCollection(Collection c, Class type, Class collectionType) { - if (c == null) { - return null; - } - if (!collectionType.isInstance(c)) { - throw new ClassCastException(c.getClass().getName()); - } - assert checkCollectionMembers(c, type) : "The collection contains members with a type other than " + type.getName(); - - return collectionType.cast(c); - } - - /** - * Dynamically check that the members of the list are all instances of the given type (or null). - * - * @param the list's element type - * @param list the list to cast - * @param type the class of the list's element type. - * @return the dynamically-type checked list. - * @throws java.lang.ClassCastException - */ - @SuppressWarnings("unchecked") - static List dynamicallyCastList(List list, Class type) { - return dynamicallyCastCollection(list, type, List.class); - } - - /** - * Dynamically check that the members of the set are all instances of the given type (or null). - * - * @param the set's element type - * @param set the set to cast - * @param type the class of the set's element type. - * @return the dynamically-type checked set. - * @throws java.lang.ClassCastException - */ - @SuppressWarnings("unchecked") - static Set dynamicallyCastSet(Set set, Class type) { - return dynamicallyCastCollection(set, type, Set.class); - } - - /** - * Dynamically check that the keys and values in the map are all instances of the correct types (or null). - * - * @param the map's key type - * @param the map's value type - * @param map the map to cast - * @param keyType the class of the map's key type. - * @param valueType the class of the map's value type. - * @return the dynamically-type checked map. - * @throws java.lang.ClassCastException - */ - @SuppressWarnings("unchecked") - static Map dynamicallyCastMap(Map map, Class keyType, Class valueType) { - if (map == null) { - return null; - } - assert checkCollectionMembers(map.keySet(), keyType) : "The map contains keys with a type other than " + keyType.getName(); - assert checkCollectionMembers(map.values(), valueType) : "The map contains values with a type other than " + valueType.getName(); - - return (Map) map; - } -} diff --git a/impl/src/main/java/jakarta/faces/component/UIColumn.java b/impl/src/main/java/jakarta/faces/component/UIColumn.java deleted file mode 100644 index fa87615e2b..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIColumn.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -/** - *

      - * UIColumn is a {@link UIComponent} that represents a single column of data within a parent - * {@link UIData} component. - *

      - */ -public class UIColumn extends UIComponentBase { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.Column"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.Column"; - - // ----------------------------------------------------------- Constructors - - /** - *

      - * Create a new {@link UIColumn} instance with default property values. - *

      - */ - public UIColumn() { - super(); - setRendererType(null); - } - - // -------------------------------------------------------------- Properties - - /** - * Get the component family. - * - * @return the component family. - */ - @Override - public String getFamily() { - return COMPONENT_FAMILY; - } - - /** - *

      - * Return the footer facet of the column (if any). A convenience method for getFacet("footer"). - *

      - * - * @return the footer component. - */ - public UIComponent getFooter() { - return getFacet("footer"); - } - - /** - *

      - * Set the footer facet of the column. A convenience method for getFacets().put("footer", footer). - *

      - * - * @param footer the new footer facet - * - * @throws NullPointerException if footer is null - */ - public void setFooter(UIComponent footer) { - getFacets().put("footer", footer); - } - - /** - *

      - * Return the header facet of the column (if any). A convenience method for getFacet("header"). - *

      - * - * @return the header component. - */ - public UIComponent getHeader() { - return getFacet("header"); - } - - /** - *

      - * Set the header facet of the column. A convenience method for getFacets().put("header", header). - *

      - * - * @param header the new header facet - * - * @throws NullPointerException if header is null - */ - public void setHeader(UIComponent header) { - getFacets().put("header", header); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UICommand.java b/impl/src/main/java/jakarta/faces/component/UICommand.java deleted file mode 100644 index 0565bb6ea3..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UICommand.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import static jakarta.faces.event.PhaseId.APPLY_REQUEST_VALUES; -import static jakarta.faces.event.PhaseId.INVOKE_APPLICATION; - -import jakarta.el.MethodExpression; -import jakarta.faces.application.Application; -import jakarta.faces.context.FacesContext; -import jakarta.faces.event.AbortProcessingException; -import jakarta.faces.event.ActionEvent; -import jakarta.faces.event.ActionListener; -import jakarta.faces.event.FacesEvent; -import jakarta.faces.render.Renderer; - -/** - *

      - * UICommand is a {@link UIComponent} that represents a user interface component which, when activated - * by the user, triggers an application specific "command" or "action". Such a component is typically rendered as a push - * button, a menu item, or a hyperlink. - *

      - * - *

      - * When the decode() method of this {@link UICommand}, or its corresponding {@link Renderer}, detects that - * this control has been activated, it will queue an {@link ActionEvent}. Later on, the broadcast() method - * will ensure that this event is broadcast to all interested listeners. - *

      - * - *

      - * Listeners will be invoked in the following order: - *

        - *
      1. {@link ActionListener}s, in the order in which they were registered. - *
      2. The "actionListener" {@link MethodExpression} (which will cover the "actionListener" that was set as a - * MethodBinding). - *
      3. The default {@link ActionListener}, retrieved from the {@link Application} - and therefore, any attached "action" - * {@link MethodExpression}. - *
      - * - *

      - * By default, the rendererType property must be set to "jakarta.faces.Button". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class UICommand extends UIComponentBase implements ActionSource2 { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.Command"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.Command"; - - /** - * Properties that are tracked by state saving. - */ - enum PropertyKeys { - value, immediate, methodBindingActionListener, actionExpression, - } - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UICommand} instance with default property values. - *

      - */ - public UICommand() { - super(); - setRendererType("jakarta.faces.Button"); - } - - // -------------------------------------------------------------- Properties - - @Override - public String getFamily() { - return COMPONENT_FAMILY; - } - - // ------------------------------------------------- ActionSource/ActionSource2 Properties - - /** - *

      - * The immediate flag. - *

      - */ - @Override - public boolean isImmediate() { - return (Boolean) getStateHelper().eval(PropertyKeys.immediate, false); - } - - @Override - public void setImmediate(boolean immediate) { - getStateHelper().put(PropertyKeys.immediate, immediate); - } - - /** - *

      - * Returns the value property of the UICommand. This is most often rendered as a label. - *

      - * - * @return The object representing the value of this component. - */ - public Object getValue() { - return getStateHelper().eval(PropertyKeys.value); - } - - /** - *

      - * Sets the value property of the UICommand. This is most often rendered as a label. - *

      - * - * @param value the new value - */ - public void setValue(Object value) { - getStateHelper().put(PropertyKeys.value, value); - } - - // ---------------------------------------------------- ActionSource / ActionSource2 Methods - - @Override - public MethodExpression getActionExpression() { - return (MethodExpression) getStateHelper().get(PropertyKeys.actionExpression); - } - - @Override - public void setActionExpression(MethodExpression actionExpression) { - getStateHelper().put(PropertyKeys.actionExpression, actionExpression); - } - - /** - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void addActionListener(ActionListener listener) { - addFacesListener(listener); - } - - @Override - public ActionListener[] getActionListeners() { - return (ActionListener[]) getFacesListeners(ActionListener.class); - } - - /** - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void removeActionListener(ActionListener listener) { - removeFacesListener(listener); - } - - // ----------------------------------------------------- UIComponent Methods - - /** - *

      - * In addition to to the default {@link UIComponent#broadcast} processing, pass the {@link ActionEvent} being broadcast - * to the method referenced by actionListener (if any), and to the default {@link ActionListener} - * registered on the {@link jakarta.faces.application.Application}. - *

      - * - * @param event {@link FacesEvent} to be broadcast - * - * @throws AbortProcessingException Signal the Jakarta Faces implementation that no further processing on the - * current event should be performed - * @throws IllegalArgumentException if the implementation class of this {@link FacesEvent} is not supported by this - * component - * @throws NullPointerException if event is null - */ - @Override - public void broadcast(FacesEvent event) throws AbortProcessingException { - - // Perform standard superclass processing (including calling our - // ActionListeners) - super.broadcast(event); - - if (event instanceof ActionEvent) { - FacesContext context = event.getFacesContext(); - - // Invoke the default ActionListener - ActionListener listener = context.getApplication().getActionListener(); - if (listener != null) { - listener.processAction((ActionEvent) event); - } - } - } - - /** - * - *

      - * Intercept queueEvent and take the following action. If the event is an {@link ActionEvent}, - * obtain the UIComponent instance from the event. If the component is an {@link ActionSource} - * obtain the value of its "immediate" property. If it is true, mark the phaseId for the event to be - * PhaseId.APPLY_REQUEST_VALUES otherwise, mark the phaseId to be PhaseId.INVOKE_APPLICATION. - * The event must be passed on to super.queueEvent() before returning from this method. - *

      - * - */ - @Override - public void queueEvent(FacesEvent event) { - UIComponent component = event.getComponent(); - - if (event instanceof ActionEvent && component instanceof ActionSource) { - if (((ActionSource) component).isImmediate()) { - event.setPhaseId(APPLY_REQUEST_VALUES); - } else { - event.setPhaseId(INVOKE_APPLICATION); - } - } - - super.queueEvent(event); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UIComponent.java b/impl/src/main/java/jakarta/faces/component/UIComponent.java deleted file mode 100644 index 38f764f570..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIComponent.java +++ /dev/null @@ -1,2387 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import static com.sun.faces.util.Util.isAnyNull; -import static com.sun.faces.util.Util.isOneOf; -import static jakarta.faces.application.Resource.COMPONENT_RESOURCE_KEY; -import static jakarta.faces.component.visit.VisitHint.SKIP_TRANSIENT; -import static jakarta.faces.component.visit.VisitHint.SKIP_UNRENDERED; -import static jakarta.faces.component.visit.VisitResult.ACCEPT; -import static jakarta.faces.component.visit.VisitResult.COMPLETE; -import static java.util.Collections.emptyMap; -import static java.util.logging.Level.SEVERE; - -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayDeque; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.MissingResourceException; -import java.util.Objects; -import java.util.PropertyResourceBundle; -import java.util.ResourceBundle; -import java.util.Set; -import java.util.logging.Level; -import java.util.logging.Logger; - -import jakarta.el.ELContext; -import jakarta.el.ELException; -import jakarta.el.ValueExpression; -import jakarta.faces.FacesException; -import jakarta.faces.FacesWrapper; -import jakarta.faces.application.Resource; -import jakarta.faces.component.visit.VisitCallback; -import jakarta.faces.component.visit.VisitContext; -import jakarta.faces.component.visit.VisitHint; -import jakarta.faces.component.visit.VisitResult; -import jakarta.faces.context.FacesContext; -import jakarta.faces.event.AbortProcessingException; -import jakarta.faces.event.ComponentSystemEvent; -import jakarta.faces.event.ComponentSystemEventListener; -import jakarta.faces.event.FacesEvent; -import jakarta.faces.event.FacesListener; -import jakarta.faces.event.PostRestoreStateEvent; -import jakarta.faces.event.SystemEvent; -import jakarta.faces.event.SystemEventListener; -import jakarta.faces.event.SystemEventListenerHolder; -import jakarta.faces.render.Renderer; - -/** - *

      - * UIComponent is the base class for all user interface components in Jakarta Server - * Faces. The set of {@link UIComponent} instances associated with a particular request and response are organized into - * a component tree under a {@link UIViewRoot} that represents the entire content of the request or response. - *

      - * - *

      - * For the convenience of component developers, {@link UIComponentBase} provides the default behavior that is specified - * for a {@link UIComponent}, and is the base class for all of the concrete {@link UIComponent} "base" implementations. - * Component writers are encouraged to subclass {@link UIComponentBase}, instead of directly implementing this abstract - * class, to reduce the impact of any future changes to the method signatures. - *

      - * - *

      - * If the {@link jakarta.faces.event.ListenerFor} annotation is attached to the class definition of a - * Component, that class must also implement {@link jakarta.faces.event.ComponentSystemEventListener}. - *

      - * - *

      - * Dynamically modifying the component tree can happen at any time, during and after restoring the view, but not during - * state saving and needs to function properly with respect to rendering and state saving - *

      - */ -public abstract class UIComponent implements PartialStateHolder, TransientStateHolder, SystemEventListenerHolder, ComponentSystemEventListener { - - private static Logger LOGGER = Logger.getLogger("jakarta.faces.component", "jakarta.faces.LogStrings"); - - /** - *

      - * The value of this constant is used as the key in the component attribute map, the value for which is a - * java.beans.BeanInfo implementation describing the composite component. This BeanInfo is - * known as the composite component BeanInfo. - *

      - * - * @since 2.0 - */ - public static final String BEANINFO_KEY = "jakarta.faces.component.BEANINFO_KEY"; - - /** - *

      - * The value of this constant is used as the key in the composite component BeanDescriptor for the - * Map<PropertyDescriptor> that contains meta-information for the declared facets for this composite - * component. This map must contain an entry under the key {@link #COMPOSITE_FACET_NAME}, even if no facets were - * explicitly declared. See {@link #COMPOSITE_FACET_NAME}. - *

      - * - * @since 2.0 - */ - public static final String FACETS_KEY = "jakarta.faces.component.FACETS_KEY"; - - /** - *

      - * The value of this constant is used as the key in the component attributes Map for the - * {@link jakarta.faces.view.Location} in the view at which this component instance resides. - *

      - * - * @since 2.0 - */ - public static final String VIEW_LOCATION_KEY = "jakarta.faces.component.VIEW_LOCATION_KEY"; - - /** - *

      - * The value of this constant is used as the key in the composite component BeanDescriptor for a - * ValueExpression that evaluates to the component-type of the composite component - * root UIComponent for this composite component, if one was declared by the composite component - * author. - *

      - * - * @since 2.0 - */ - public static final String COMPOSITE_COMPONENT_TYPE_KEY = "jakarta.faces.component.COMPOSITE_COMPONENT_TYPE"; - - /** - *

      - * The value of this constant is used as the key in the Map returned as described in {@link #FACETS_KEY} - * for the PropertyDescriptor describing the composite component facet. The value of this constant is also - * used as the key in the Map returned from {@link #getFacets}. In this case, it refers to the actual facet - * that is the {@link jakarta.faces.component.UIPanel} that is the parent of the all of the components in the - * <composite:implementation> section of the composite component VDL file. - *

      - * - * @since 2.0 - */ - public static final String COMPOSITE_FACET_NAME = "jakarta.faces.component.COMPOSITE_FACET_NAME"; - - /** - *

      - * This constant enables one to quickly discover the names of the declared composite component attributes that have been - * given default values by the composite component author. The information is exposed as a - * Collection<String> returned from the getValue() method on the composite component - * BeanDescriptor, when this constant is passed as the argument. - *

      - * - * @since 2.1 - */ - public static final String ATTRS_WITH_DECLARED_DEFAULT_VALUES = "jakarta.faces.component.ATTR_NAMES_WITH_DEFAULT_VALUES"; - - /** - * key used to look up current component stack if FacesContext attributes - */ - private static final String _CURRENT_COMPONENT_STACK_KEY = "jakarta.faces.component.CURRENT_COMPONENT_STACK"; - - /** - * key used to look up current composite component stack if FacesContext attributes - */ - private static final String _CURRENT_COMPOSITE_COMPONENT_STACK_KEY = "jakarta.faces.component.CURRENT_COMPOSITE_COMPONENT_STACK"; - - enum PropertyKeysPrivate { - attributesThatAreSet - } - - /** - * Properties that are tracked by state saving. - */ - enum PropertyKeys { - rendered, attributes, bindings, rendererType, systemEventListeners, behaviors, passThroughAttributes - } - - /** - * List of attributes that have been set on the component (this may be from setValueExpression, the attributes map, or - * setters from the concrete HTML components. This allows for faster rendering of attributes as this list is - * authoritative on what has been set. - */ - List attributesThatAreSet; - ComponentStateHelper stateHelper; - UIComponent compositeParent; - private boolean isInView; - private Map resourceBundleMap; - - // It is safe to cache this because components never go from being - // composite to non-composite. - private transient Boolean isCompositeComponent; - - /** - * Track whether we have been pushed as current in order to handle mismatched pushes and pops of Jakarta Expression - * Language context stack. We use a counter to handle cases where the same component is pushed on multiple times - */ - private int _isPushedAsCurrentRefCount = 0; - - // -------------------------------------------------------------- Attributes - - /** - *

      - * Return a mutable Map representing the attributes (and properties, see below) associated wth this - * {@link UIComponent}, keyed by attribute name (which must be a String). The returned implementation must support all - * of the standard and optional Map methods, plus support the following additional requirements: - *

      - *
        - *
      • The Map implementation must implement the java.io.Serializable interface.
      • - *
      • Any attempt to add a null key or value must throw a NullPointerException.
      • - *
      • Any attempt to add a key that is not a String must throw a ClassCastException.
      • - *
      • If the attribute name specified as a key matches a property of this {@link UIComponent}'s implementation class, - * the following methods will have special behavior: - *
          - *
        • containsKey - Return false.
        • - *
        • get() - If the property is readable, call the getter method and return the returned value (wrapping - * primitive values in their corresponding wrapper classes); otherwise throw IllegalArgumentException.
        • - *
        • put() - If the property is writeable, call the setter method to set the corresponding value - * (unwrapping primitive values in their corresponding wrapper classes). If the property is not writeable, or an attempt - * is made to set a property of primitive type to null, throw IllegalArgumentException.
        • - *
        • remove - Throw IllegalArgumentException.
        • - *
        - *
      • - *
      - * - * @return the component attribute map. - */ - public abstract Map getAttributes(); - - /** - *

      - * This is a convenience method that simply calls {@link #getPassThroughAttributes(boolean)}, passing {@code true} as - * the argument. This method must never return {@code null}. - *

      - * - * @return the pass-through attribute map. - * @since 2.2 - */ - public Map getPassThroughAttributes() { - return getPassThroughAttributes(true); - } - - /** - *

      - * This method has the same specification as {@link #getPassThroughAttributes() } except that it is allowed to return - * {@code null} if and only if the argument {@code create} is {@code false} and no pass through attribute data structure - * exists for this instance. The returned {@code Map} implementation must support all of the standard and optional - * {@code Map} methods, plus support the following additional requirements. The map must be stored in using - * {@link #getStateHelper}. - *

      - * - *
      - * - *

      - * The {@code Map} implementation must implement {@code java.io.Serializable}. - *

      - * - *

      - * Any attempt to add a {@code null} key or value must throw a {@code NullPointerException}. - *

      - * - *

      - * Any attempt to add a key that is not a {@code String} must throw an {@code IllegalArgumentException}. - *

      - * - *

      - * For backward compatibility with components that extend directly from this class, a default implementation is provided - * that returns the empty map. - *

      - * - *
      - * - * @param create if true, a new {@code Map} instance will be created if it does not exist already. If - * false, and there is no existing Map instance, one will not be created and null - * will be returned. - * @return A {@code Map} instance, or {@code null}. - * - * @since 2.2 - */ - public Map getPassThroughAttributes(boolean create) { - return emptyMap(); - } - - // ---------------------------------------------------------------- Bindings - - /** - *

      - * Return the {@link ValueExpression} used to calculate the value for the specified attribute or property name, if any. - *

      - * - *

      - * This method must be overridden and implemented for components that comply with Jakarta Faces 1.2 and later. - *

      - * - * @param name Name of the attribute or property for which to retrieve a {@link ValueExpression} - * @return the value expression, or null. - * @since 1.2 - * @throws NullPointerException if name is null - * - */ - public ValueExpression getValueExpression(String name) { - - if (name == null) { - throw new NullPointerException(); - } - - @SuppressWarnings("unchecked") - Map map = (Map) getStateHelper().get(UIComponentBase.PropertyKeys.bindings); - - return map != null ? map.get(name) : null; - } - - /** - *

      - * Set the {@link ValueExpression} used to calculate the value for the specified attribute or property name, if any. - *

      - * - *

      - * The implementation must call {@link ValueExpression#isLiteralText} on the argument expression. If - * isLiteralText() returns true, invoke {@link ValueExpression#getValue} on the argument - * expression and pass the result as the value parameter in a call to this.{@link - * #getAttributes()}.put(name, value) where name is the argument name. If an exception - * is thrown as a result of calling {@link ValueExpression#getValue}, wrap it in a {@link jakarta.faces.FacesException} - * and re-throw it. If isLiteralText() returns false, simply store the un-evaluated - * expression argument in the collection of ValueExpressions under the key given by the - * argument name. - *

      - * - *

      - * This method must be overridden and implemented for components that comply with Jakarta Faces 1.2 and later. - *

      - * - * @since 1.2 - * - * @param name Name of the attribute or property for which to set a {@link ValueExpression} - * @param binding The {@link ValueExpression} to set, or null to remove any currently set - * {@link ValueExpression} - * - * @throws IllegalArgumentException if name is one of id or parent - * @throws NullPointerException if name is null - * - */ - public void setValueExpression(String name, ValueExpression binding) { - - if (name == null) { - throw new NullPointerException(); - } - - if (isOneOf(name, "id", "parent")) { - throw new IllegalArgumentException(); - } - - if (binding != null) { - if (!binding.isLiteralText()) { - - @SuppressWarnings("unchecked") - List sProperties = (List) getStateHelper().get(PropertyKeysPrivate.attributesThatAreSet); - - if (sProperties == null) { - getStateHelper().add(PropertyKeysPrivate.attributesThatAreSet, name); - } else if (!sProperties.contains(name)) { - getStateHelper().add(PropertyKeysPrivate.attributesThatAreSet, name); - } - - getStateHelper().put(UIComponentBase.PropertyKeys.bindings, name, binding); - - } else { - ELContext context = FacesContext.getCurrentInstance().getELContext(); - try { - getAttributes().put(name, binding.getValue(context)); - } catch (ELException ele) { - throw new FacesException(ele); - } - } - } else { - getStateHelper().remove(PropertyKeysPrivate.attributesThatAreSet, name); - getStateHelper().remove(UIComponentBase.PropertyKeys.bindings, name); - } - } - - // -------------------------------------------------------------- Properties - - boolean initialState; - - /** - *

      - * An implementation of {@link PartialStateHolder#markInitialState}, this method is called by the runtime to indicate - * that the instance should start tracking changes to its state. - *

      - * - * @since 2.0 - */ - @Override - public void markInitialState() { - initialState = true; - } - - /** - *

      - * An implementation of {@link PartialStateHolder#initialStateMarked}, this method is called by the runtime to test if - * the {@link PartialStateHolder#markInitialState} method was called. - *

      - * - * @since 2.0 - */ - @Override - public boolean initialStateMarked() { - return initialState; - } - - /** - *

      - * An implementation of {@link PartialStateHolder#clearInitialState}, this method is called by the runtime to tell the - * instance to stop tracking state changes. - *

      - * - * @since 2.0 - */ - @Override - public void clearInitialState() { - initialState = false; - } - - /** - *

      - * Return the {@link StateHelper} instance used to help this component implement {@link PartialStateHolder}. - *

      - * - * @return the state helper. - * @since 2.0 - */ - protected StateHelper getStateHelper() { - return getStateHelper(true); - } - - /** - *

      - * Like {@link #getStateHelper()}, but only create a state helper instance if the argument creat is - * true. - *

      - * - * @param create if true, a new {@link StateHelper} instance will be created if it does not exist already. - * If false, and there is no existing StateHelper instance, one will not be created and - * null will be returned. - * - * @return the state helper. - * @since 2.0 - */ - protected StateHelper getStateHelper(boolean create) { - - if (create && stateHelper == null) { - stateHelper = new ComponentStateHelper(this); - } - - return stateHelper; - } - - /** - *

      - * Return the {@link TransientStateHelper} instance for this UIComponent instance. The default - * implementation simply calls through to {@link #getTransientStateHelper(boolean)} passing true as the - * argument. - *

      - * - * @return the transient state helper. - * @since 2.1 - */ - public TransientStateHelper getTransientStateHelper() { - return getTransientStateHelper(true); - } - - /** - *

      - * Return the {@link TransientStateHelper} instance for this UIComponent instance. - *

      - * - * @param create if true create, if necessary, any internal data structures. If false, do not - * create any instances. In this case, it is possible for this method to return null. - * @return the transient state helper. - * @since 2.1 - */ - - public TransientStateHelper getTransientStateHelper(boolean create) { - - if (create && stateHelper == null) { - stateHelper = new ComponentStateHelper(this); - } - - return stateHelper; - } - - /** - *

      - * For components that need to support the concept of transient state, this method will restore any state saved on a - * prior call to {@link #saveTransientState}. - *

      - * - * @since 2.1 - */ - @Override - public void restoreTransientState(FacesContext context, Object state) { - boolean forceCreate = state != null; - TransientStateHelper helper = getTransientStateHelper(forceCreate); - - if (helper != null) { - helper.restoreTransientState(context, state); - } - } - - /** - *

      - * For components that need to support the concept of transient state, this method will save any state that is known to - * be transient in nature. - *

      - * - * @since 2.1 - */ - @Override - public Object saveTransientState(FacesContext context) { - TransientStateHelper helper = getTransientStateHelper(false); - - return helper == null ? null : helper.saveTransientState(context); - } - - /** - *

      - * Return true if this component is within the view hierarchy otherwise false - * - * @return true if within a view hierarchy, false otherwise. - * @since 2.0 - */ - public boolean isInView() { - return isInView; - } - - /** - *

      - * Updates the status as to whether or not this component is currently within the view hierarchy. This method - * must never be called by developers; a {@link UIComponent}'s internal implementation will call it as components are - * added to or removed from a parent's child List or facet Map. - *

      - * - * @param isInView flag indicating whether or not this component is within the view hierachy - * - * @since 2.0 - */ - public void setInView(boolean isInView) { - this.isInView = isInView; - } - - /** - *

      - * Enable Jakarta Expression Language to access the clientId of a component. This is particularly useful in - * combination with the component and cc implicit objects. A default implementation is - * provided that simply calls {@link FacesContext#getCurrentInstance} and then calls through to - * {@link #getClientId(FacesContext)}. - *

      - * - * @return the client id. - * @since 2.0 - */ - public String getClientId() { - return getClientId(FacesContext.getCurrentInstance()); - } - - /** - *

      - * Return a client-side identifier for this component, generating one if necessary. The associated {@link Renderer}, if - * any, will be asked to convert the clientId to a form suitable for transmission to the client. - *

      - * - *

      - * The return from this method must be the same value throughout the lifetime of the instance, unless the - * id property of the component is changed, or the component is placed in a {@link NamingContainer} whose - * client ID changes (for example, {@link UIData}). However, even in these cases, consecutive calls to this method must - * always return the same value. The implementation must follow these steps in determining the clientId: - *

      - * - *

      - * Find the closest ancestor to this component in the view hierarchy that implements - * NamingContainer. Call getContainerClientId() on it and save the result as the - * parentId local variable. Call {@link #getId} on this component and save the result as the - * myId local variable. If myId is null, call - * context.getViewRoot().createUniqueId() and assign the result to myId. If parentId is - * non-null, let myId equal parentId - * + {@link UINamingContainer#getSeparatorChar} + myId. Call {@link Renderer#convertClientId}, passing - * myId, and return the result. - *

      - * - * @param context The {@link FacesContext} for the current request - * @return the client id. - * - * @throws NullPointerException if context is null - */ - public abstract String getClientId(FacesContext context); - - /** - *

      - * Allow components that implement {@link NamingContainer} to selectively disable prepending their clientId to their - * descendent's clientIds by breaking the prepending logic into a separately callable method. See {@link #getClientId} - * for usage. - *

      - * - *

      - * By default, this method will call through to {@link #getClientId} and return the result. - * - * @param context the Faces context. - * @return the container client id. - * @since 1.2 - * - * @throws NullPointerException if context is null - */ - public String getContainerClientId(FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - return getClientId(context); - } - - /** - *

      - * Return the identifier of the component family to which this component belongs. This identifier, in conjunction with - * the value of the rendererType property, may be used to select the appropriate {@link Renderer} for this - * component instance. Note this method should NOT return null - *

      - * - * @return the component family (not null). - */ - public abstract String getFamily(); - - /** - *

      - * Return the component identifier of this {@link UIComponent}. - *

      - * - * @return the component identifier. - */ - public abstract String getId(); - - /** - *

      - * Set the component identifier of this {@link UIComponent} (if any). Component identifiers must obey the following - * syntax restrictions: - *

      - *
        - *
      • Must not be a zero-length String.
      • - *
      • First character must be a letter or an underscore ('_').
      • - *
      • Subsequent characters must be a letter, a digit, an underscore ('_'), or a dash ('-').
      • - *
      • - *
      - * - *

      - * Component identifiers must also obey the following semantic restrictions (note that this restriction is - * NOT enforced by the setId() implementation): - *

      - *
        - *
      • The specified identifier must be unique among all the components (including facets) that are descendents of the - * nearest ancestor {@link UIComponent} that is a {@link NamingContainer}, or within the scope of the entire component - * tree if there is no such ancestor that is a {@link NamingContainer}.
      • - *
      - * - * @param id The new component identifier, or null to indicate that this {@link UIComponent} does not have - * a component identifier - * - * @throws IllegalArgumentException if id is not syntactically valid - */ - public abstract void setId(String id); - - /** - *

      - * Return the parent {@link UIComponent} of this UIComponent, if any. A component must allow child - * components to be added to and removed from the list of children of this component, even though the child component - * returns null from getParent( ). - *

      - * - * @return the parent component. - */ - public abstract UIComponent getParent(); - - /** - *

      - * Set the parent UIComponent of this - * UIComponent. If - * parent.isInView() returns true, calling this method will first cause a - * {@link jakarta.faces.event.PreRemoveFromViewEvent} to be published, for this node, and then the children of this - * node. Then, once the re-parenting has occurred, a {@link jakarta.faces.event.PostAddToViewEvent} will be published as - * well, first for this node, and then for the node's children, but only if any - * of the following conditions are true. - *

      - * - *
      - * - *
        - *
      • - *

        - * {@link jakarta.faces.context.FacesContext#getCurrentPhaseId} returns {@link jakarta.faces.event.PhaseId#RESTORE_VIEW} - * and partial state saving is enabled. - *

        - *
      • - * - *
      • - *

        - * {@link jakarta.faces.context.FacesContext#isPostback} returns false and - * {@link jakarta.faces.context.FacesContext#getCurrentPhaseId} returns something other than - * {@link jakarta.faces.event.PhaseId#RESTORE_VIEW} - *

        - *
      • - *
      - * - *
      - * - * - *

      - * This method must never be called by developers; a {@link UIComponent}'s internal implementation will call it - * as components are added to or removed from a parent's child List or facet Map. - *

      - * - * @param parent The new parent, or null for the root node of a component tree - */ - public abstract void setParent(UIComponent parent); - - /** - *

      - * Return true if this component (and its children) should be rendered during the Render Response - * phase of the request processing lifecycle. - *

      - * - * @return true if the component should be rendered, false otherwise. - */ - public abstract boolean isRendered(); - - /** - *

      - * Set the rendered property of this {@link UIComponent}. - *

      - * - * @param rendered If true render this component; otherwise, do not render this component - */ - public abstract void setRendered(boolean rendered); - - /** - *

      - * Return the {@link Renderer} type for this {@link UIComponent} (if any). - *

      - * - * @return the renderer type. - */ - public abstract String getRendererType(); - - /** - *

      - * Set the {@link Renderer} type for this {@link UIComponent}, or null for components that render - * themselves. - *

      - * - * @param rendererType Logical identifier of the type of {@link Renderer} to use, or null for components - * that render themselves - */ - public abstract void setRendererType(String rendererType); - - /** - *

      - * Return a flag indicating whether this component is responsible for rendering its child components. The default - * implementation in {@link UIComponentBase#getRendersChildren} tries to find the renderer for this component. If it - * does, it calls {@link Renderer#getRendersChildren} and returns the result. If it doesn't, it returns false. As of - * version 1.2 of the Jakarta Faces Specification, component authors are encouraged to return true - * from this method and rely on {@link UIComponentBase#encodeChildren}. - *

      - * - * @return true if the component renders its children, false otherwise. - */ - public abstract boolean getRendersChildren(); - - /** - *

      - * Return a Map<String,String> of the ResourceBundle for this component. A component may - * have a ResourceBundle associated with it. This bundle may contain localized properties relating to - * instances of this component. The default implementation first looks for a ResourceBundle with a base - * name equal to the fully qualified class name of the current UIComponent this and Locale - * equal to the Locale of the current UIViewRoot. If no such bundle is found, and the - * component is a composite component, let resourceName be the resourceName of the {@link Resource} - * for this composite component, replacing the file extension with ".properties". Let libraryName be the - * libraryName of the the {@link Resource} for this composite component. Call - * {@link jakarta.faces.application.ResourceHandler#createResource(java.lang.String,java.lang.String)}, passing the - * derived resourceName and libraryName. Note that this will automatically allow for the localization - * of the ResourceBundle due to the localization facility implemented in createResource, which - * is specified in section 2.6.1.3 "Resource Identifiers" of the Jakarta Faces Specification Document. - * If the resultant {@link Resource} exists and can be - * found, the InputStream for the resource is used to create a ResourceBundle. If either of - * the two previous steps for obtaining the ResourceBundle for this component is successful, the - * ResourceBundle is wrapped in a Map<String,String> and returned. Otherwise - * Collections.EMPTY_MAP is returned. - *

      - * - * @return the resource bundle map. - * @since 2.0 - */ - public Map getResourceBundleMap() { - - if (resourceBundleMap == null) { - - FacesContext context = FacesContext.getCurrentInstance(); - - // Step 1: look for a ResourceBundle under the FQCN of this instance - ResourceBundle resourceBundle = findResourceBundleUnderFQCNofThis(context); - - // Step 2: if this is a composite component, look for a - // ResourceBundle as a Resource - if (resourceBundle == null) { - resourceBundle = findResourceBundleAsResource(context); - } - - // Step 3: if the previous steps yielded a ResourceBundle, wrap it - // with a Map - if (resourceBundle != null) { - resourceBundleMap = wrapBundleAsMap(resourceBundle); - } - - if (resourceBundleMap == null) { - resourceBundleMap = emptyMap(); - } - } - - return resourceBundleMap; - } - - // This is necessary for Jakarta Faces components that extend from UIComponent - // directly rather than extending from UIComponentBase. Such components - // may need to have implementations provided for methods that originated - // from a spec version more recent than the version with which the component - // complies. Currently this private property is only consulted in the - // getValueExpression() method. - // private boolean isUIComponentBase; - // private boolean isUIComponentBaseIsSet = false; - // - // private boolean isUIComponentBase() { - // if (!isUIComponentBaseIsSet) { - // isUIComponentBase = (this instanceof UIComponentBase); - // } - // - // return isUIComponentBase; - // } - - // ------------------------------------------------- Tree Management Methods - - /** - *

      - * Return a mutable List representing the child - * {@link UIComponent}s associated with this component. The returned implementation must support all of the standard and - * optional List methods, plus support the following additional requirements: - *

      - *
        - *
      • The List implementation must implement the java.io.Serializable interface.
      • - *
      • Any attempt to add a null must throw a NullPointerException
      • - *
      • Any attempt to add an object that does not implement {@link UIComponent} must throw a ClassCastException.
      • - *
      • Whenever a new child component is added, the parent property of the child must be set to this - * component instance. If the parent property of the child was already non-null, the child must first be - * removed from its previous parent (where it may have been either a child or a facet).
      • - *
      • Whenever an existing child component is removed, the parent property of the child must be set to - * null.
      • - * - *
      • - *

        - * After the child component has been added to the view, {@link jakarta.faces.application.Application#publishEvent} must - * be called, passing {@link jakarta.faces.event.PostAddToViewEvent}.class as the first argument and the - * newly added component as the second argument if any the following cases are true. - *

        - * - *
          - * - *
        • - *

          - * {@link jakarta.faces.context.FacesContext#getCurrentPhaseId} returns {@link jakarta.faces.event.PhaseId#RESTORE_VIEW} - * and partial state saving is enabled. - *

          - *
        • - * - *
        • - *

          - * {@link jakarta.faces.context.FacesContext#isPostback} returns false and - * {@link jakarta.faces.context.FacesContext#getCurrentPhaseId} returns something other than - * {@link jakarta.faces.event.PhaseId#RESTORE_VIEW} - *

          - *
        • - * - *
        - * - *
      • - * - *
      - * - * @return the list of children. - */ - public abstract List getChildren(); - - /** - *

      - * Return the number of child {@link UIComponent}s that are associated with this {@link UIComponent}. If there are no - * children, this method must return 0. The method must not cause the creation of a child component list. - *

      - * - * @return the number of child components. - */ - public abstract int getChildCount(); - - /** - *

      - * Search for and return the {@link UIComponent} with an id that - * matches the specified search expression (if any), according to the algorithm described below. - *

      - * - *

      - * WARNING: The found UIComponent instance, if any, is returned without regard for its - * tree traversal context. Retrieving an Jakarta Expression Language-bound attribute from the component is not safe. - * Jakarta Expression Language expressions can contain implicit objects, such as #{component}, which assume - * they are being evaluated within the scope of a tree traversal context. Evaluating expressions with these kinds of - * implicit objects outside of a tree traversal context produces undefined results. See {@link #invokeOnComponent} for a - * method that does correctly account for the tree traversal context when operating on the found - * UIComponent instance. {@link #invokeOnComponent} is also useful to find components given a simple - * clientId. - * - *

      - * Component identifiers are required to be unique within the scope of the closest ancestor {@link NamingContainer} that - * encloses this component (which might be this component itself). If there are no {@link NamingContainer} components in - * the ancestry of this component, the root component in the tree is treated as if it were a {@link NamingContainer}, - * whether or not its class actually implements the {@link NamingContainer} interface. - *

      - * - *

      - * A search expression consists of either an identifier (which is matched exactly against the id - * property of a {@link UIComponent}, or a series of such identifiers linked by the - * {@link UINamingContainer#getSeparatorChar} character value. The search algorithm should operates as follows, though - * alternate alogrithms may be used as long as the end result is the same: - *

      - * - *
        - *
      • Identify the {@link UIComponent} that will be the base for searching, by stopping as soon as one of the following - * conditions is met: - *
          - *
        • If the search expression begins with the the separator character (called an "absolute" search expression), the - * base will be the root {@link UIComponent} of the component tree. The leading separator character will be stripped - * off, and the remainder of the search expression will be treated as a "relative" search expression as described - * below.
        • - *
        • Otherwise, if this {@link UIComponent} is a {@link NamingContainer} it will serve as the basis.
        • - *
        • Otherwise, search up the parents of this component. If a {@link NamingContainer} is encountered, it will be the - * base.
        • - *
        • Otherwise (if no {@link NamingContainer} is encountered) the root {@link UIComponent} will be the base.
        • - *
        - *
      • - *
      • The search expression (possibly modified in the previous step) is now a "relative" search expression that will be - * used to locate the component (if any) that has an id that matches, within the scope of the base - * component. The match is performed as follows: - *
          - *
        • If the search expression is a simple identifier, this value is compared to the id property, and then - * recursively through the facets and children of the base {@link UIComponent} (except that if a descendant - * {@link NamingContainer} is found, its own facets and children are not searched).
        • - *
        • If the search expression includes more than one identifier separated by the separator character, the first - * identifier is used to locate a {@link NamingContainer} by the rules in the previous bullet point. Then, the - * findComponent() method of this {@link NamingContainer} will be called, passing the remainder of the - * search expression.
        • - *
        - *
      • - *
      - * - * @param expr Search expression identifying the {@link UIComponent} to be returned - * - * @return the found {@link UIComponent}, or null if the component was not found. - * - * @throws IllegalArgumentException if an intermediate identifier in a search expression identifies a - * {@link UIComponent} that is not a {@link NamingContainer} - * @throws NullPointerException if expr is null - */ - public abstract UIComponent findComponent(String expr); - - /** - *

      - * Starting at this component in the View hierarchy, search for a component - * with a clientId equal to the argument clientId and, if found, call the - * {@link ContextCallback#invokeContextCallback} method on the argument callback, passing the current - * {@link FacesContext} and the found component as arguments. This method is similar to {@link #findComponent} but it - * does not support the leading {@link UINamingContainer#getSeparatorChar} syntax for searching from the root of the - * View. - *

      - * - *

      - * The default implementation will first check if this.getClientId() is equal to the argument - * clientId. If so, first call {@link #pushComponentToEL}, then call - * the {@link ContextCallback#invokeContextCallback} method on the argument callback, passing through the - * FacesContext argument and passing this as the component argument. Then - * call {@link #popComponentFromEL}. If an Exception is thrown by the callback, wrap it in a - * {@link FacesException} and re-throw it. Otherwise, return true. - *

      - * - *

      - * Otherwise, for each component returned by {@link #getFacetsAndChildren}, call invokeOnComponent() - * passing the arguments to this method, in order. The first time invokeOnComponent() returns true, abort - * traversing the rest of the Iterator and return true. - *

      - * - *

      - * When calling {@link ContextCallback#invokeContextCallback} the implementation of this method must guarantee that the - * state of the component passed to the callback correctly reflects the component's position in the View hierarchy with - * respect to any state found in the argument clientId. For example, an iterating component such as - * {@link UIData} will need to set its row index to correctly reflect the argument clientId before finding - * the appropriate child component backed by the correct row. When the callback returns, either normally or by throwing - * an Exception the implementation of this method must restore the state of the view to the way it was - * before invoking the callback. - *

      - * - *

      - * If none of the elements from {@link #getFacetsAndChildren} returned true from - * invokeOnComponent(), return false. - *

      - * - *

      - * Simple usage example to find a component by clientId. - *

      - * - *
      -     * 
      -    private UIComponent found = null;
      -
      -    private void doFind(FacesContext context, String clientId) {
      -      context.getViewRoot().invokeOnComponent(context, clientId,
      -          new ContextCallback() {
      -             public void invokeContextCallback(FacesContext context,
      -                                           UIComponent component) {
      -               found = component;
      -             }
      -          });
      -    }
      -    * 
      -     * 
      - * - * - * - * @since 1.2 - * - * @param context the {@link FacesContext} for the current request - * - * @param clientId the client identifier of the component to be passed to the argument callback. - * - * @param callback an implementation of the Callback interface. - * - * @throws NullPointerException if any of the arguments are null - * - * @throws FacesException if the argument Callback throws an Exception, it is wrapped in a FacesException - * and re-thrown. - * - * @return true if the a component with the given clientId is found, the callback method was - * successfully invoked passing that component as an argument, and no Exception was thrown. Returns false - * if no component with the given clientId is found. - * - */ - public boolean invokeOnComponent(FacesContext context, String clientId, ContextCallback callback) throws FacesException { - - if (isAnyNull(context, clientId, callback)) { - throw new NullPointerException(); - } - - boolean found = false; - if (clientId.equals(getClientId(context))) { - try { - pushComponentToEL(context, this); - callback.invokeContextCallback(context, this); - - return true; - } catch (Exception e) { - throw new FacesException(e); - } finally { - popComponentFromEL(context); - } - } else { - Iterator facetsAndChildrenIterator = getFacetsAndChildren(); - - while (facetsAndChildrenIterator.hasNext() && !found) { - found = facetsAndChildrenIterator.next().invokeOnComponent(context, clientId, callback); - } - } - - return found; - } - - - // ------------------------------------------------ Facet Management Methods - - /** - *

      - * Return a mutable Map representing the facet {@link UIComponent}s associated with this - * {@link UIComponent}, keyed by facet name (which must be a String). The returned implementation must support all of - * the standard and optional Map methods, plus support the following additional requirements: - *

      - * - *
        - *
      • The Map implementation must implement the java.io.Serializable interface.
      • - *
      • Any attempt to add a null key or value must throw a NullPointerException.
      • - *
      • Any attempt to add a key that is not a String must throw a ClassCastException.
      • - *
      • Any attempt to add a value that is not a {@link UIComponent} must throw a ClassCastException.
      • - *
      • Whenever a new facet {@link UIComponent} is added: - *
          - *
        • The parent property of the component must be set to this component instance.
        • - *
        • If the parent property of the component was already non-null, the component must first be removed - * from its previous parent (where it may have been either a child or a facet).
        • - *
        - *
      • - * - *
      • Whenever an existing facet {@link UIComponent} is removed: - *
          - *
        • The parent property of the facet must be set to null.
        • - *
        - *
      • - *
      - * - * @return the map of facets. - */ - public abstract Map getFacets(); - - /** - *

      - * Return the number of facet {@link UIComponent}s that are associated with this {@link UIComponent}. If there are no - * facets, this method must return 0. The method must not cause the creation of a facet component map. - *

      - * - *

      - * For backwards compatability with classes that extend UIComponent directly, a default implementation is provided that - * simply calls {@link #getFacets} and then calls the size() method on the returned Map. A - * more optimized version of this method is provided in {@link UIComponentBase#getFacetCount}. - * - * @return the number of facets. - * @since 1.2 - */ - public int getFacetCount() { - return getFacets().size(); - } - - /** - *

      - * Convenience method to return the named facet, if it exists, or null otherwise. If the requested facet - * does not exist, the facets Map must not be created. - *

      - * - * @param name Name of the desired facet - * @return the component, or null. - */ - public abstract UIComponent getFacet(String name); - - /** - *

      - * Return an Iterator over the facet followed by child {@link UIComponent}s of this {@link UIComponent}. - * Facets are returned in an undefined order, followed by all the children in the order they are stored in the child - * list. If this component has no facets or children, an empty Iterator is returned. - *

      - * - *

      - * The returned Iterator must not support the remove() operation. - *

      - * - * @return the facets and children iterator. - */ - public abstract Iterator getFacetsAndChildren(); - - // -------------------------------------------- Lifecycle Processing Methods - - /** - *

      - * Broadcast the specified {@link FacesEvent} to all registered event listeners who have expressed an interest in events - * of this type. Listeners are called in the order in which they were added. - *

      - *

      - * If the event is an instance of {@link jakarta.faces.event.BehaviorEvent} and the current - * component is the source of the event call - * {@link jakarta.faces.event.BehaviorEvent#getBehavior} to get the {@link jakarta.faces.component.behavior.Behavior} - * for the event. - * - * Call - * {@link jakarta.faces.component.behavior.Behavior#broadcast(jakarta.faces.event.BehaviorEvent)} on the - * Behavior instance. - *

      - * - * @param event The {@link FacesEvent} to be broadcast - * - * @throws AbortProcessingException Signal the Jakarta Faces implementation that no further processing on the - * current event should be performed - * @throws IllegalArgumentException if the implementation class of this {@link FacesEvent} is not supported by this - * component - * @throws NullPointerException if event is null - */ - public abstract void broadcast(FacesEvent event) throws AbortProcessingException; - - /** - *

      - * Decode any new state of this {@link UIComponent} from the request contained in the specified {@link FacesContext}, - * and store this state as needed. - *

      - *

      - * During decoding, events may be enqueued for later processing (by event listeners who have registered an interest), by - * calling queueEvent(). - *

      - * - * @param context {@link FacesContext} for the request we are processing - * - * @throws NullPointerException if context is null - */ - public abstract void decode(FacesContext context); - - /** - *

      - * Perform a tree visit starting at this node in the tree. - *

      - * - *
      - * - *

      - * UIComponent.visitTree() implementations do not invoke the {@link VisitCallback} directly, but instead call - * {@link VisitContext#invokeVisitCallback} to invoke the callback. This allows {@code VisitContext} implementations to - * provide optimized tree traversals, for example by only calling the {@code - * VisitCallback} for a subset of components. - *

      - * - *

      - * UIComponent.visitTree() implementations must call UIComponent.pushComponentToEL() before performing the visit and - * UIComponent.popComponentFromEL() after the visit. - *

      - *
      - * - * @param visitContext the VisitContext for this visit - * @param callback the VisitCallback instance whose visit method will be called for each node - * visited. - * @return component implementations may return true to indicate that the tree visit is complete (eg. all - * components that need to be visited have been visited). This results in the tree visit being short-circuited such that - * no more components are visited. - * - * @see VisitContext#invokeVisitCallback VisitContext.invokeVisitCallback() - * - * @since 2.0 - */ - public boolean visitTree(VisitContext visitContext, VisitCallback callback) { - - // First check to see whether we are visitable. If not - // short-circuit out of this subtree, though allow the - // visit to proceed through to other subtrees. - if (!isVisitable(visitContext)) { - return false; - } - - // Push ourselves to Jakarta Expression Language before visiting - FacesContext facesContext = visitContext.getFacesContext(); - pushComponentToEL(facesContext, null); - - try { - // Visit ourselves. Note that we delegate to the - // VisitContext to actually perform the visit. - VisitResult result = visitContext.invokeVisitCallback(this, callback); - - // If the visit is complete, short-circuit out and end the visit - if (result == COMPLETE) { - return true; - } - - // Visit children if necessary - if (result == ACCEPT) { - Iterator kids = getFacetsAndChildren(); - - while (kids.hasNext()) { - boolean done = kids.next().visitTree(visitContext, callback); - - // If any kid visit returns true, we are done. - if (done) { - return true; - } - } - } - } finally { - // Pop ourselves off the Jakarta Expression Language stack - popComponentFromEL(facesContext); - } - - // Return false to allow the visit to continue - return false; - } - - /** - *

      - * Return true if this component should be visited, false otherwise. Called by - * {@link UIComponent#visitTree UIComponent.visitTree()} to determine whether this component satisfies the hints - * returned by {@link jakarta.faces.component.visit.VisitContext#getHints}. - *

      - * - *
      - * - *

      - * If this method returns false, the tree visited is short-circuited such that neither the component nor any of its - * descendents will be visited - *

      - * - *

      - * Custom {@code visitTree()} implementations may call this method to determine whether the component is visitable - * before performing any visit-related processing. - *

      - * - *
      - * - * @param context the Visit context. - * @return true if visitable, false otherwise. - * @since 2.0 - */ - protected boolean isVisitable(VisitContext context) { - - // VisitHints currently defines two hints that affect visitability: - // VIIST_RENDERED and VISIT_TRANSIENT. - // Check for both of these and if set, verify that we comply. - Set hints = context.getHints(); - - if (hints.contains(SKIP_UNRENDERED) && !isRendered() || hints.contains(SKIP_TRANSIENT) && isTransient()) { - return false; - } - - return true; - } - - /** - *

      - * If our rendered property is true, render the - * beginning of the current state of this {@link UIComponent} to the response contained in the specified - * {@link FacesContext}. Call - * {@link #pushComponentToEL(jakarta.faces.context.FacesContext,jakarta.faces.component.UIComponent)}. Call - * {@link jakarta.faces.application.Application#publishEvent}, passing - * {@link jakarta.faces.event.PreRenderComponentEvent}.class as the first argument and the component - * instance to be rendered as the second argument. - *

      - * - *

      - * If a {@link Renderer} is associated with this {@link UIComponent}, the actual encoding will be delegated to - * {@link Renderer#encodeBegin(FacesContext, UIComponent)}. - *

      - * - *

      - * If our rendered property is false, call - * {@link #pushComponentToEL(jakarta.faces.context.FacesContext,jakarta.faces.component.UIComponent)} and return - * immediately. - *

      - * - * @param context {@link FacesContext} for the response we are creating - * - * @throws IOException if an input/output error occurs while rendering - * @throws NullPointerException if context is null - */ - public abstract void encodeBegin(FacesContext context) throws IOException; - - /** - *

      - * If our rendered property is true, render the child {@link UIComponent}s of this - * {@link UIComponent}. This method will only be called if the rendersChildren property is - * true. - *

      - * - *

      - * If a {@link Renderer} is associated with this {@link UIComponent}, the actual encoding will be delegated to - * {@link Renderer#encodeChildren(FacesContext, UIComponent)}. If no {@link Renderer} - * is associated with this {@link UIComponent}, iterate over each of the children of this component and call - * {@link #encodeAll(jakarta.faces.context.FacesContext)}. - *

      - * - * @param context {@link FacesContext} for the response we are creating - * - * @throws IOException if an input/output error occurs while rendering - * @throws NullPointerException if context is null - */ - public abstract void encodeChildren(FacesContext context) throws IOException; - - /** - *

      - * If our rendered property is true, render the - * ending of the current state of this {@link UIComponent}. - *

      - * - *

      - * If a {@link Renderer} is associated with this {@link UIComponent}, the actual encoding will be delegated to - * {@link Renderer#encodeEnd(FacesContext, UIComponent)}. - *

      - * - *

      - * Call {@link UIComponent#popComponentFromEL}. before returning regardless of the value of the rendered - * property. - *

      - * - * @param context {@link FacesContext} for the response we are creating - * - * @throws IOException if an input/output error occurs while rendering - * @throws NullPointerException if context is null - */ - public abstract void encodeEnd(FacesContext context) throws IOException; - - /** - *

      - * If this component returns true from {@link #isRendered}, take the following action. - *

      - * - *

      - * Render this component and all its children that return true from isRendered(), regardless - * of the value of the {@link #getRendersChildren} flag. - *

      - * - * @param context the Faces context. - * @since 1.2 - * @throws IOException if an input/output error occurs while rendering - * @throws NullPointerException if context is null - */ - public void encodeAll(FacesContext context) throws IOException { - - if (context == null) { - throw new NullPointerException(); - } - - if (!isRendered()) { - return; - } - - encodeBegin(context); - - if (getRendersChildren()) { - encodeChildren(context); - } else if (getChildCount() > 0) { - for (UIComponent kid : getChildren()) { - kid.encodeAll(context); - } - } - - encodeEnd(context); - } - - @SuppressWarnings("unchecked") - private static ArrayDeque _getComponentELStack(String keyName, Map contextAttributes) { - return (ArrayDeque) contextAttributes.computeIfAbsent(keyName, e -> new ArrayDeque<>()); - } - - /** - *

      - * Push the current UIComponent this to the {@link FacesContext} attribute map - * saving the previous UIComponent - * for a subsequent call to {@link #popComponentFromEL}. - *

      - * - *

      - * This method and popComponentFromEL() form the basis for the contract that enables the Jakarta Expression - * Language Expression "#{component}" to resolve to the "current" component that is being processed in the - * lifecycle. The requirements for when pushComponentToEL() and popComponentFromEL() must be - * called are specified as needed in the javadoc for this class. - *

      - * - *

      - * After pushComponentToEL() returns, a call to {@link #getCurrentComponent} must return this - * UIComponent instance until popComponentFromEL() is called, after which point the previous - * UIComponent instance will be returned from getCurrentComponent() - *

      - * - * @param context the {@link FacesContext} for the current request - * @param component the component to push to the EL. If component is null the - * UIComponent instance that this call was invoked upon will be pushed to the EL. - * - * @throws NullPointerException if context is null - * - * @see jakarta.faces.context.FacesContext#getAttributes() - * - * @since 2.0 - */ - public void pushComponentToEL(FacesContext context, UIComponent component) { - if (context == null) { - throw new NullPointerException(); - } - - if (component == null) { - component = this; - } - - Map contextAttributes = context.getAttributes(); - ArrayDeque componentELStack = _getComponentELStack(_CURRENT_COMPONENT_STACK_KEY, contextAttributes); - componentELStack.push(component); - component._isPushedAsCurrentRefCount++; - - // If the pushed component is a composite component, we need to update that - // stack as well - if (UIComponent.isCompositeComponent(component)) { - _getComponentELStack(_CURRENT_COMPOSITE_COMPONENT_STACK_KEY, contextAttributes).push(component); - } - } - - /** - *

      - * Pop the current UIComponent from the {@link FacesContext} attributes map so that the previous - * UIComponent, if any, becomes the current component. - *

      - * - * @param context the {@link FacesContext} for the current request - * - * @throws NullPointerException if context is null - * - * @see jakarta.faces.context.FacesContext#getAttributes() - * - * @since 2.0 - */ - public void popComponentFromEL(FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - Map contextAttributes = context.getAttributes(); - - ArrayDeque componentELStack = _getComponentELStack(_CURRENT_COMPONENT_STACK_KEY, contextAttributes); - - // Detect cases where the stack has become unbalanced. Due to how UIComponentBase - // implemented pushing and pooping of components from the ELContext, components - // that - // overrode just one of encodeBegin or encodeEnd, or only called super in one case - // will become unbalanced. Detect and correct for those cases here. - // - // detect case where push was never called. In that case, pop should be a no-op - if (_isPushedAsCurrentRefCount < 1) { - if (componentELStack.peek() != this) { - return; - } - LOGGER.log(Level.SEVERE, "the component(" + this + ") is the head component of the stack, but it's _isPushedAsCurrentRefCount < 1"); - } - - // check for the other unbalanced case, a component was pushed but never popped. - // Keep - // popping those components until we get to our component - for (UIComponent topComponent = componentELStack.peek(); topComponent != this; topComponent = componentELStack.peek()) { - topComponent.popComponentFromEL(context); - } - - // pop ourselves off of the stack - componentELStack.pop(); - _isPushedAsCurrentRefCount--; - - // If we're a composite component, we also have to pop ourselves off of the - // composite stack - if (UIComponent.isCompositeComponent(this)) { - ArrayDeque compositeELStack = _getComponentELStack(_CURRENT_COMPOSITE_COMPONENT_STACK_KEY, contextAttributes); - if (!compositeELStack.isEmpty()) { - compositeELStack.pop(); - } - } - } - - /** - *

      - * Return true if component is a composite component, otherwise false. - *

      - * - * @param component the {@link UIComponent} to test - * @return true if this is a composite component, false otherwise. - * @throws NullPointerException if component is null - * @since 2.0 - */ - public static boolean isCompositeComponent(UIComponent component) { - - if (component == null) { - throw new NullPointerException(); - } - boolean result = false; - if (null != component.isCompositeComponent) { - result = component.isCompositeComponent.booleanValue(); - } else { - result = component.isCompositeComponent = component.getAttributes().containsKey(Resource.COMPONENT_RESOURCE_KEY); - } - return result; - - } - - /** - *

      - * Finds the nearest composite component parent of the specified component. - *

      - * - * @param component the component from which to start the search from - * - * @return if component is null, return null, otherwise search the component's - * parent hierachy for the nearest parent composite component. If no parent composite component is found, return - * null - * - * @since 2.0 - */ - public static UIComponent getCompositeComponentParent(UIComponent component) { - - if (component == null) { - return null; - } else { - if (component.compositeParent != null) { - return component.compositeParent; - } - UIComponent parent = component.getParent(); - while (parent != null) { - if (UIComponent.isCompositeComponent(parent)) { - if (component.isInView()) { - component.compositeParent = parent; - } - return parent; - } - parent = parent.getParent(); - } - return null; - } - - } - - /** - *

      - * Return the UIComponent instance that is currently processing. This is equivalent to evaluating the - * Jakarta Expression Language expression "#{component}" and doing a getValue operation on the - * resultant ValueExpression. - *

      - * - *

      - * This method must return null if there is no currently processing UIComponent - *

      - * - * @param context {@link FacesContext} for the request we are processing - * @return the current component, or null. - * @throws NullPointerException if context is null - * - * @since 2.0 - */ - public static UIComponent getCurrentComponent(FacesContext context) { - Map contextAttributes = context.getAttributes(); - ArrayDeque componentELStack = _getComponentELStack(_CURRENT_COMPONENT_STACK_KEY, contextAttributes); - - return componentELStack.peek(); - } - - /** - *

      - * Return the closest ancestor component, relative to the component returned from {@link #getCurrentComponent}, that is - * a composite component, or null if no such component exists. - *

      - * - * @param context {@link FacesContext} for the request we are processing - * @return the current composite component, or null. - * @throws NullPointerException if context is null - * - * @since 2.0 - */ - public static UIComponent getCurrentCompositeComponent(FacesContext context) { - return _getComponentELStack(_CURRENT_COMPOSITE_COMPONENT_STACK_KEY, context.getAttributes()).peek(); - } - - // -------------------------------------------------- Event Listener Methods - - /** - *

      - * Add the specified {@link FacesListener} to the set of listeners registered to receive event notifications from this - * {@link UIComponent}. It is expected that {@link UIComponent} classes acting as event sources will have corresponding - * typesafe APIs for registering listeners of the required type, and the implementation of those registration methods - * will delegate to this method. For example: - *

      - * - *
      -     * public class FooEvent extends FacesEvent { ... }
      -     *
      -     * public interface FooListener extends FacesListener {
      -     *   public void processFoo(FooEvent event);
      -     * }
      -     *
      -     * public class FooComponent extends UIComponentBase {
      -     *   ...
      -     *   public void addFooListener(FooListener listener) {
      -     *     addFacesListener(listener);
      -     *   }
      -     *   public void removeFooListener(FooListener listener) {
      -     *     removeFacesListener(listener);
      -     *   }
      -     *   ...
      -     * }
      -     * 
      - * - * @param listener The {@link FacesListener} to be registered - * - * @throws NullPointerException if listener is null - */ - protected abstract void addFacesListener(FacesListener listener); - - /** - *

      - * Return an array of registered {@link FacesListener}s that are instances of the specified class. If there are no such - * registered listeners, a zero-length array is returned. The returned array can be safely be cast to an array strongly - * typed to an element type of clazz. - *

      - * - * @param clazz Class that must be implemented by a {@link FacesListener} for it to be returned - * @return the Faces listeners, or a zero-length array. - * @throws IllegalArgumentException if class is not, and does not implement, {@link FacesListener} - * @throws NullPointerException if clazz is null - */ - protected abstract FacesListener[] getFacesListeners(Class clazz); - - /** - *

      - * Remove the specified {@link FacesListener} from the set of listeners registered to receive event notifications from - * this {@link UIComponent}. - * - * @param listener The {@link FacesListener} to be deregistered - * - * @throws NullPointerException if listener is null - */ - protected abstract void removeFacesListener(FacesListener listener); - - /** - *

      - * Queue an event for broadcast at the end of the current request processing lifecycle phase. The default implementation - * in {@link UIComponentBase} must delegate this call to the queueEvent() method of the parent - * {@link UIComponent}. - *

      - * - * @param event {@link FacesEvent} to be queued - * - * @throws IllegalStateException if this component is not a descendant of a {@link UIViewRoot} - * @throws NullPointerException if event is null - */ - public abstract void queueEvent(FacesEvent event); - - /** - *

      - * This implementation throws UnsupportedOperationException and is provided for the sole purpose of not - * breaking existing applications that extend this class. {@link UIComponentBase} provides the implementation of this - * method. - *

      - * - * @param eventClass the event class. - * @param componentListener the listener. - * @since 2.1 - */ - public void subscribeToEvent(Class eventClass, ComponentSystemEventListener componentListener) { - throw new UnsupportedOperationException(); - } - - /** - *

      - * This implementation throws UnsupportedOperationException and is provided for the sole purpose of not - * breaking existing applications that extend this class. {@link UIComponentBase} provides the implementation of this - * method. - *

      - * - * @param eventClass the event class. - * @param componentListener the component listener. - * @since 2.1 - */ - public void unsubscribeFromEvent(Class eventClass, ComponentSystemEventListener componentListener) { - throw new UnsupportedOperationException(); - } - - /** - *

      - * This implementation throws UnsupportedOperationException and is provided for the sole purpose of not - * breaking existing applications that extend this class. {@link UIComponentBase} provides the implementation of this - * method. - *

      - * - * @param eventClass the event class. - * @return the list of listeners, never null. - * @since 2.1 - */ - @Override - public List getListenersForEventClass(Class eventClass) { - throw new UnsupportedOperationException(); - } - - /** - *

      - * Starting with "this", return the closest component in the ancestry that is a NamingContainer or - * null if none can be found. - *

      - * - * @return the naming container, or null. - * @since 2.0 - */ - public UIComponent getNamingContainer() { - UIComponent namingContainer = this; - while (namingContainer != null) { - if (namingContainer instanceof NamingContainer) { - return namingContainer; - } - namingContainer = namingContainer.getParent(); - } - - return null; - } - - // ------------------------------------------------ Lifecycle Phase Handlers - - /** - *

      - * Perform the component tree processing required by the Restore View - * phase of the request processing lifecycle for all facets of this component, all children of this component, and this - * component itself, as follows. - *

      - *
        - *
      • Call the restoreState() method of this component.
      • - * - *
      • Call {@link UIComponent#pushComponentToEL}.
      • - * - *
      • Call the processRestoreState() method of all facets and children of this {@link UIComponent} in the - * order determined by a call to getFacetsAndChildren(). After returning - * from the processRestoreState() method on a child or facet, call - * {@link UIComponent#popComponentFromEL}
      • - *
      - * - *

      - * This method may not be called if the state saving method is set to server. - *

      - * - * @param context {@link FacesContext} for the request we are processing - * @param state the state. - * @throws NullPointerException if context is null - */ - public abstract void processRestoreState(FacesContext context, Object state); - - /** - *

      - * Perform the component tree processing required by the Apply Request - * Values phase of the request processing lifecycle for all facets of this component, all children of this - * component, and this component itself, as follows. - *

      - * - *
        - *
      • If the rendered property of this {@link UIComponent} is false, skip further - * processing.
      • - *
      • Call {@link #pushComponentToEL}.
      • - * - *
      • Call the processDecodes() method of all facets and children of this {@link UIComponent}, in the - * order determined by a call to getFacetsAndChildren().
      • - * - *
      • Call the decode() method of this component.
      • - * - *
      • Call {@link #popComponentFromEL} from inside of a finally block, just before returning.
      • - * - *
      • If a RuntimeException is thrown during decode processing, call {@link FacesContext#renderResponse} - * and re-throw the exception.
      • - *
      - * - * @param context {@link FacesContext} for the request we are processing - * - * @throws NullPointerException if context is null - */ - public abstract void processDecodes(FacesContext context); - - /** - *

      - * The default implementation performs the following action. If the argument event is an instance of - * {@link PostRestoreStateEvent}, call this.{@link #getValueExpression} passing the literal string - * “binding”, without the quotes, as the argument. If the result is non-null, set the value of - * the ValueExpression to be this. - *

      - */ - @Override - public void processEvent(ComponentSystemEvent event) throws AbortProcessingException { - if (event instanceof PostRestoreStateEvent) { - - // If this component has a component value reference expression, - // make sure to populate the ValueExpression for it. - ValueExpression valueExpression = getValueExpression("binding"); - if (valueExpression != null) { - valueExpression.setValue(FacesContext.getCurrentInstance().getELContext(), this); - } - - isCompositeComponent = null; - } - } - - /** - *

      - * Perform the component tree processing required by the Process - * Validations phase of the request processing lifecycle for all facets of this component, all children of this - * component, and this component itself, as follows. - *

      - * - *
        - *
      • If the rendered property of this {@link UIComponent} is false, skip further - * processing.
      • - *
      • Call {@link #pushComponentToEL}.
      • - *
      • Call the processValidators() method of all facets and children of this {@link UIComponent}, in the - * order determined by a call to getFacetsAndChildren().
      • - *
      • After returning from calling getFacetsAndChildren() call - * {@link UIComponent#popComponentFromEL}.
      • - *
      - * - * @param context {@link FacesContext} for the request we are processing - * - * @throws NullPointerException if context is null - * @see jakarta.faces.event.PreValidateEvent - * @see jakarta.faces.event.PostValidateEvent - */ - public abstract void processValidators(FacesContext context); - - /** - *

      - * Perform the component tree processing required by the Update Model - * Values phase of the request processing lifecycle for all facets of this component, all children of this - * component, and this component itself, as follows. - *

      - * - *
        - *
      • If the rendered property of this {@link UIComponent} is false, skip further - * processing.
      • - * - *
      • Call {@link #pushComponentToEL}.
      • - * - *
      • Call the processUpdates() method of all facets and children of this {@link UIComponent}, in the - * order determined by a call to getFacetsAndChildren(). After returning - * from the processUpdates() method on a child or facet, call - * {@link UIComponent#popComponentFromEL}
      • - *
      - * - * @param context {@link FacesContext} for the request we are processing - * - * @throws NullPointerException if context is null - */ - public abstract void processUpdates(FacesContext context); - - /** - *

      - * Perform the component tree processing required by the state saving portion - * of the Render Response phase of the request processing lifecycle for all facets of this component, all - * children of this component, and this component itself, as follows. - *

      - * - *
        - * - *
      • consult the transient property of this component. If true, just return null.
      • - * - *
      • Call {@link #pushComponentToEL}.
      • - * - *
      • Call the processSaveState() method of all facets and children of this {@link UIComponent} in the - * order determined by a call to getFacetsAndChildren(), skipping children and facets that are transient. - * Ensure that {@link #popComponentFromEL} is called correctly after each child or facet.
      • - * - *
      • Call the saveState() method of this component.
      • - * - *
      • Encapsulate the child state and your state into a Serializable Object and return it.
      • - * - *
      - * - *

      - * This method may not be called if the state saving method is set to server. - *

      - * - * @param context {@link FacesContext} for the request we are processing - * @return the saved state. - * @throws NullPointerException if context is null - */ - public abstract Object processSaveState(FacesContext context); - - // ----------------------------------------------------- Convenience Methods - - /** - *

      - * Convenience method to return the {@link FacesContext} instance for the current request. - *

      - * - * @return the Faces context. - */ - protected abstract FacesContext getFacesContext(); - - /** - *

      - * Convenience method to return the {@link Renderer} instance associated with this component, if any; otherwise, return - * null. - *

      - * - * @param context {@link FacesContext} for the current request - * @return the renderer, or null. - */ - protected abstract Renderer getRenderer(FacesContext context); - - // --------------------------------------------------------- Package Private - - static final class ComponentSystemEventListenerAdapter - implements ComponentSystemEventListener, SystemEventListener, StateHolder, FacesWrapper { - - ComponentSystemEventListener wrapped; - Class instanceClass; - - // -------------------------------------------------------- Constructors - - ComponentSystemEventListenerAdapter() { - // necessary for state saving - } - - ComponentSystemEventListenerAdapter(ComponentSystemEventListener wrapped, UIComponent component) { - this.wrapped = wrapped; - instanceClass = component.getClass(); - } - - // ------------------------------------ Methods from SystemEventListener - - /** - * Process the event. - * - * @param event the event. - * @throws AbortProcessingException if the event processing should be aborted. - */ - @Override - public void processEvent(SystemEvent event) throws AbortProcessingException { - wrapped.processEvent((ComponentSystemEvent) event); - } - - // ------------------------------------ Methods from SystemEventListener - - /** - * Process the event. - * - * @param event the event. - * @throws AbortProcessingException if the event processing should be aborted. - */ - @Override - public void processEvent(ComponentSystemEvent event) throws AbortProcessingException { - wrapped.processEvent(event); - } - - /** - * Is this a listener for the given component. - * - * @param component the component. - * @return true if it is a listener, false otherwise. - */ - @Override - public boolean isListenerForSource(Object component) { - - if (wrapped instanceof SystemEventListener) { - return ((SystemEventListener) wrapped).isListenerForSource(component); - } - - return instanceClass.isAssignableFrom(component.getClass()); - } - - // -------------------------------------------- Methods from StateHolder - - /** - * Save the state. - * - * @param context the Faces context. - * @return the saved state. - */ - @Override - public Object saveState(FacesContext context) { - - if (context == null) { - throw new NullPointerException(); - } - - return new Object[] { wrapped instanceof UIComponent ? null : new StateHolderSaver(context, wrapped), instanceClass }; - } - - /** - * Restore the state. - * - * @param context the Faces context. - * @param state the state. - */ - @Override - public void restoreState(FacesContext context, Object state) { - - if (context == null) { - throw new NullPointerException(); - } - - if (state == null) { - return; - } - - Object[] s = (Object[]) state; - Object listener = s[0]; - wrapped = (ComponentSystemEventListener) (listener == null ? UIComponent.getCurrentComponent(context) - : ((StateHolderSaver) listener).restore(context)); - instanceClass = (Class) s[1]; - } - - /** - * Get the transient flag. - * - * @return true if transient, false otherwise. - */ - @Override - public boolean isTransient() { - - if (wrapped instanceof StateHolder) { - return ((StateHolder) wrapped).isTransient(); - } - - return false; - } - - /** - * Set the transient flag. - * - *

      - * This is a no-op in this case. - *

      - * - * @param newTransientValue the new transient flag value. - */ - @Override - public void setTransient(boolean newTransientValue) { - // no-op - } - - // ------------------------------------------- Methods from FacesWrapper - - /** - * Get the wrapped ComponentSystemEventListener. - * - * @return the wrapped ComponentSystemEventListener. - */ - @Override - public ComponentSystemEventListener getWrapped() { - return wrapped; - } - - // ------------------------------------------------------ Public Methods - - @Override - public int hashCode() { - return wrapped.hashCode() ^ instanceClass.hashCode(); - } - - @Override - public boolean equals(Object obj) { - - if (!(obj instanceof ComponentSystemEventListenerAdapter)) { - return false; - } - - ComponentSystemEventListenerAdapter in = (ComponentSystemEventListenerAdapter) obj; - - return wrapped.equals(in.wrapped) && instanceClass.equals(in.instanceClass); - - } - } // END ComponentSystemEventListenerAdapter - - // --------------------------------------------------------- Private methods - - private Map wrapBundleAsMap(final ResourceBundle bundle) { - return new Map() { - - // This is an immutable Map - - @Override - public String toString() { - StringBuffer sb = new StringBuffer(); - Iterator> entries = entrySet().iterator(); - Map.Entry cur; - while (entries.hasNext()) { - cur = entries.next(); - sb.append(cur.getKey()).append(": ").append(cur.getValue()).append('\n'); - } - - return sb.toString(); - } - - // Do not need to implement for immutable Map - @Override - public void clear() { - throw new UnsupportedOperationException(); - } - - @Override - public boolean containsKey(Object key) { - if (key != null) { - return bundle.getString(key.toString()) != null; - } - - return false; - } - - @Override - public boolean containsValue(Object value) { - Enumeration keys = bundle.getKeys(); - while (keys.hasMoreElements()) { - if (Objects.equals(value, bundle.getString(keys.nextElement()))) { - return true; - } - } - - return false; - } - - @Override - public Set> entrySet() { - HashMap mappings = new HashMap<>(); - - Enumeration keys = bundle.getKeys(); - while (keys.hasMoreElements()) { - String key = keys.nextElement(); - String value = bundle.getString(key); - mappings.put(key, value); - } - - return mappings.entrySet(); - } - - @Override - @SuppressWarnings("unchecked") - public boolean equals(Object obj) { - return !(obj == null || !(obj instanceof Map)) && entrySet().equals(((Map) obj).entrySet()); - } - - @Override - public String get(Object key) { - if (key == null) { - return null; - } - - try { - return bundle.getString(key.toString()); - } catch (MissingResourceException e) { - return "???" + key + "???"; - } - } - - @Override - public int hashCode() { - return bundle.hashCode(); - } - - @Override - public boolean isEmpty() { - return !bundle.getKeys().hasMoreElements(); - } - - @Override - public Set keySet() { - Set keySet = new HashSet<>(); - Enumeration keys = bundle.getKeys(); - while (keys.hasMoreElements()) { - keySet.add(keys.nextElement()); - } - - return keySet; - } - - // Do not need to implement for immutable Map - @Override - public String put(String k, String v) { - throw new UnsupportedOperationException(); - } - - // Do not need to implement for immutable Map - @Override - public void putAll(Map m) { - throw new UnsupportedOperationException(); - } - - // Do not need to implement for immutable Map - @Override - public String remove(Object k) { - throw new UnsupportedOperationException(); - } - - @Override - public int size() { - int result = 0; - - Enumeration keys = bundle.getKeys(); - while (keys.hasMoreElements()) { - keys.nextElement(); - result++; - } - - return result; - } - - @Override - public Collection values() { - List result = new ArrayList<>(); - - Enumeration keys = bundle.getKeys(); - while (keys.hasMoreElements()) { - result.add(bundle.getString(keys.nextElement())); - } - - return result; - } - }; - } - - private ResourceBundle findResourceBundleUnderFQCNofThis(FacesContext context) { - String className = this.getClass().getName(); - Locale currentLocale = null; - UIViewRoot root = null; - ResourceBundle resourceBundle = null; - - // Step 1: look for a ResourceBundle under the FQCN of this instance - if (context != null) { - if ((root = context.getViewRoot()) != null) { - currentLocale = root.getLocale(); - } - } - - if (currentLocale == null) { - currentLocale = Locale.getDefault(); - } - - try { - resourceBundle = ResourceBundle.getBundle(className, currentLocale); - } catch (MissingResourceException e) { - // It is not an error if there is no ResourceBundle - } - - return resourceBundle; - } - - private ResourceBundle findResourceBundleAsResource(FacesContext context) { - - if (getAttributes().containsKey(COMPONENT_RESOURCE_KEY)) { - Resource ccResource = (Resource) getAttributes().get(COMPONENT_RESOURCE_KEY); - - if (ccResource != null) { - - ccResource = findComponentResourceBundleLocaleMatch(context, ccResource.getResourceName(), ccResource.getLibraryName()); - - if (ccResource != null) { - try (InputStream propertiesInputStream = ccResource.getInputStream()) { - return new PropertyResourceBundle(propertiesInputStream); - } catch (IOException ex) { - Logger.getLogger(UIComponent.class.getName()).log(SEVERE, null, ex); - } - } - } - } - - return null; - } - - // PENDING(rlubke): I'm sure there's a more efficient - // way to handle this. - private Resource findComponentResourceBundleLocaleMatch(FacesContext context, String resourceName, String libraryName) { - Resource result = null; - ResourceBundle resourceBundle = null; - int i; - if (-1 != (i = resourceName.lastIndexOf("."))) { - resourceName = resourceName.substring(0, i) + ".properties"; - if (null != context) { - result = context.getApplication().getResourceHandler().createResource(resourceName, libraryName); - InputStream propertiesInputStream = null; - try { - propertiesInputStream = result.getInputStream(); - resourceBundle = new PropertyResourceBundle(propertiesInputStream); - } catch (IOException ex) { - Logger.getLogger(UIComponent.class.getName()).log(SEVERE, null, ex); - } finally { - if (propertiesInputStream != null) { - try { - propertiesInputStream.close(); - } catch (IOException ioe) { - if (LOGGER.isLoggable(SEVERE)) { - LOGGER.log(SEVERE, null, ioe); - } - } - } - } - } - } - - return resourceBundle != null ? result : null; - } - - // The set of ValueExpressions for this component, keyed by property - // name This collection is lazily instantiated - // The set of ValueExpressions for this component, keyed by property - // name This collection is lazily instantiated - @Deprecated - protected Map bindings = null; - -} diff --git a/impl/src/main/java/jakarta/faces/component/UIComponentBase.java b/impl/src/main/java/jakarta/faces/component/UIComponentBase.java deleted file mode 100644 index 6f51537e46..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIComponentBase.java +++ /dev/null @@ -1,3468 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import static com.sun.faces.facelets.tag.faces.ComponentSupport.addToDescendantMarkIdCache; -import static com.sun.faces.facelets.tag.faces.ComponentSupport.isNotRenderingResponse; -import static com.sun.faces.facelets.tag.faces.ComponentSupport.removeFromDescendantMarkIdCache; -import static com.sun.faces.util.Util.isAllNull; -import static com.sun.faces.util.Util.isAnyNull; -import static com.sun.faces.util.Util.isEmpty; -import static java.beans.Introspector.getBeanInfo; -import static java.lang.Boolean.TRUE; -import static java.lang.Character.isDigit; -import static java.lang.Character.isLetter; -import static java.lang.Thread.currentThread; -import static java.util.Collections.unmodifiableCollection; -import static java.util.Collections.unmodifiableList; -import static java.util.logging.Level.FINE; - -import java.beans.BeanInfo; -import java.beans.IntrospectionException; -import java.beans.PropertyDescriptor; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.Serializable; -import java.lang.reflect.Array; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.util.AbstractCollection; -import java.util.AbstractMap; -import java.util.AbstractSet; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; -import java.util.Map; -import java.util.Map.Entry; -import java.util.NoSuchElementException; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; -import java.util.logging.Level; -import java.util.logging.Logger; - -import jakarta.el.ELException; -import jakarta.el.ValueExpression; -import jakarta.faces.FacesException; -import jakarta.faces.application.Application; -import jakarta.faces.component.behavior.Behavior; -import jakarta.faces.component.behavior.ClientBehavior; -import jakarta.faces.component.behavior.ClientBehaviorHolder; -import jakarta.faces.context.FacesContext; -import jakarta.faces.event.AbortProcessingException; -import jakarta.faces.event.BehaviorEvent; -import jakarta.faces.event.ComponentSystemEventListener; -import jakarta.faces.event.FacesEvent; -import jakarta.faces.event.FacesListener; -import jakarta.faces.event.PostAddToViewEvent; -import jakarta.faces.event.PostValidateEvent; -import jakarta.faces.event.PreRemoveFromViewEvent; -import jakarta.faces.event.PreRenderComponentEvent; -import jakarta.faces.event.PreValidateEvent; -import jakarta.faces.event.SystemEvent; -import jakarta.faces.event.SystemEventListener; -import jakarta.faces.render.Renderer; - -/** - *

      - * UIComponentBase is a - * convenience base class that implements the default concrete behavior of all methods defined by {@link UIComponent}. - *

      - * - *

      - * By default, this class defines getRendersChildren() to find the renderer for this component and call its - * getRendersChildren() method. The default implementation on the Renderer returns - * false. As of version 1.2 of the Jakarta Faces Specification, component authors are encouraged to - * return true from this method and rely on the implementation of {@link #encodeChildren} in this class and - * in the Renderer ({@link Renderer#encodeChildren}). Subclasses that wish to manage the rendering of their children - * should override this method to return true instead. - *

      - */ -public abstract class UIComponentBase extends UIComponent { - - // -------------------------------------------------------------- Attributes - - private static Logger LOGGER = Logger.getLogger("jakarta.faces.component", "jakarta.faces.LogStrings"); - - private static final String ADDED = UIComponentBase.class.getName() + ".ADDED"; - - private static final int MY_STATE = 0; - private static final int CHILD_STATE = 1; - - /** - *

      - * Each entry is an map of PropertyDescriptors describing the properties of a concrete {@link UIComponent} - * implementation, keyed by the corresponding java.lang.Class. - *

      - * - */ - private Map, Map> descriptors; - - /** - * Reference to the map of PropertyDescriptors for this class in the descriptors - * Map. - */ - private Map propertyDescriptorMap; - - private Map, List> listenersByEventClass; - - /** - *

      - * An EMPTY_OBJECT_ARRAY argument list to be passed to reflection methods. - *

      - */ - private static final Object EMPTY_OBJECT_ARRAY[] = new Object[0]; - - /** - *

      - * The Map containing our attributes, keyed by attribute name. - *

      - */ - private AttributesMap attributes; - - /** - *

      - * The component identifier for this component. - *

      - */ - private String id; - - /** - *

      - * The assigned client identifier for this component. - *

      - */ - private String clientId; - - /** - *

      - * The parent component for this component. - *

      - */ - private UIComponent parent; - - /** - * The List containing our child components. - */ - private List children; - - /** - * The Map containing our related facet components. - */ - private Map facets; - - private AttachedObjectListHolder listeners; - - /** - * Flag indicating a desire to now participate in state saving. - */ - private boolean transientFlag; - - /** - * Default constructor, populates the descriptor map. - */ - public UIComponentBase() { - populateDescriptorsMapIfNecessary(); - } - - @Override - public Map getAttributes() { - - if (attributes == null) { - attributes = new AttributesMap(this); - } - - return attributes; - } - - @Override - public Map getPassThroughAttributes(boolean create) { - @SuppressWarnings("unchecked") - Map passThroughAttributes = (Map) this.getStateHelper().get(PropertyKeys.passThroughAttributes); - - if (passThroughAttributes == null && create) { - passThroughAttributes = new PassThroughAttributesMap<>(); - getStateHelper().put(PropertyKeys.passThroughAttributes, passThroughAttributes); - } - - return passThroughAttributes; - } - - // -------------------------------------------------------------- Properties - - /** - * @throws NullPointerException {@inheritDoc} - */ - @Override - public String getClientId(FacesContext context) { - - if (context == null) { - throw new NullPointerException(); - } - - // If the clientId is not yet set - if (clientId == null) { - UIComponent namingContainerAncestor = getNamingContainerAncestor(); - - // Give the parent the opportunity to first grab a unique clientId - String parentId = getParentId(context, namingContainerAncestor); - - // Now resolve our own client id - clientId = getId(); - if (clientId == null) { - setId(generateId(context, namingContainerAncestor)); - clientId = getId(); - } - - if (parentId != null) { - clientId = addParentId(context, parentId, clientId); - } - - // Allow the renderer to convert the clientId - Renderer renderer = getRenderer(context); - if (renderer != null) { - clientId = renderer.convertClientId(context, clientId); - } - } - - return clientId; - } - - @Override - public String getId() { - return id; - } - - /** - * @throws IllegalArgumentException {@inheritDoc} - * @throws IllegalStateException {@inheritDoc} - */ - @Override - public void setId(String id) { - - // if the current ID is not null, and the passed - // argument is the same, no need to validate it - // as it has already been validated. - if (this.id == null || !this.id.equals(id)) { - validateId(id); - this.id = id; - } - - clientId = null; // Erase any cached value - } - - @Override - public UIComponent getParent() { - return parent; - } - - @Override - public void setParent(UIComponent parent) { - - if (parent == null) { - if (this.parent != null) { - doPreRemoveProcessing(FacesContext.getCurrentInstance(), this); - this.parent = parent; - } - compositeParent = null; - } else { - this.parent = parent; - if (getAttributes().get(ADDED) == null) { - - // Add an attribute to this component here to indiciate that - // it's being processed. If we don't do this, and the component - // is re-parented, the events could fire again in certain cases - // and cause a stack overflow. - getAttributes().put(ADDED, TRUE); - - doPostAddProcessing(FacesContext.getCurrentInstance(), this); - - // Remove the attribute once we've returned from the event - // processing. - getAttributes().remove(ADDED); - } - } - } - - @Override - public boolean isRendered() { - return Boolean.valueOf(getStateHelper().eval(PropertyKeys.rendered, TRUE).toString()); - } - - @Override - public void setRendered(boolean rendered) { - getStateHelper().put(PropertyKeys.rendered, rendered); - } - - @Override - public String getRendererType() { - return (String) getStateHelper().eval(PropertyKeys.rendererType); - } - - @Override - public void setRendererType(String rendererType) { - getStateHelper().put(PropertyKeys.rendererType, rendererType); - } - - @Override - public boolean getRendersChildren() { - if (getRendererType() != null) { - Renderer renderer = getRenderer(getFacesContext()); - if (renderer != null) { - return renderer.getRendersChildren(); - } - } - - return false; - } - - // ------------------------------------------------- Tree Management Methods - - @Override - public List getChildren() { - if (children == null) { - children = new ChildrenList(this); - } - - return children; - } - - // Do not allocate the children List to answer this question - @Override - public int getChildCount() { - if (children != null) { - return children.size(); - } - - return 0; - } - - /** - * @throws NullPointerException {@inheritDoc} - */ - @Override - public UIComponent findComponent(String expression) { - if (expression == null) { - throw new NullPointerException(); - } - - if (expression.isEmpty()) { - // If an empty value is provided, fail fast. - throw new IllegalArgumentException("\"\""); - } - - final char sepChar = UINamingContainer.getSeparatorChar(FacesContext.getCurrentInstance()); - - // Identify the base component from which we will perform our search - UIComponent base = findBaseComponent(expression, sepChar); - - if (expression.charAt(0) == sepChar) { - // Treat remainder of the expression as relative - expression = expression.substring(1); - } - - // Evaluate the search expression (now guaranteed to be relative) - return evaluateSearchExpression(base, expression, String.valueOf(sepChar)); - } - - /** - * {@inheritDoc} - * - * @throws NullPointerException {@inheritDoc} - * @throws FacesException {@inheritDoc} - * @since 1.2 - */ - @Override - public boolean invokeOnComponent(FacesContext context, String clientId, ContextCallback callback) throws FacesException { - return super.invokeOnComponent(context, clientId, callback); - } - - // ------------------------------------------------ Facet Management Methods - - @Override - public Map getFacets() { - if (facets == null) { - facets = new FacetsMap(this); - } - - return facets; - } - - // Do not allocate the children List to answer this question - @Override - public int getFacetCount() { - if (facets != null) { - return facets.size(); - } - - return 0; - } - - // Do not allocate the facets Map to answer this question - @Override - public UIComponent getFacet(String name) { - if (facets != null) { - return facets.get(name); - } - - return null; - } - - @Override - public Iterator getFacetsAndChildren() { - - int childCount = getChildCount(), facetCount = getFacetCount(); - - // If there are neither facets nor children - if (childCount == 0 && facetCount == 0) { - return EMPTY_ITERATOR; - } - - // If there are only facets and no children - if (childCount == 0) { - return unmodifiableCollection(getFacets().values()).iterator(); - } - - // If there are only children and no facets - if (facetCount == 0) { - return unmodifiableList(getChildren()).iterator(); - } - - // If there are both children and facets - return new FacetsAndChildrenIterator(this); - } - - // -------------------------------------------- Lifecycle Processing Methods - - /** - * @throws AbortProcessingException {@inheritDoc} - * @throws IllegalStateException {@inheritDoc} - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void broadcast(FacesEvent event) throws AbortProcessingException { - - if (event == null) { - throw new NullPointerException(); - } - - if (event instanceof BehaviorEvent) { - BehaviorEvent behaviorEvent = (BehaviorEvent) event; - Behavior behavior = behaviorEvent.getBehavior(); - behavior.broadcast(behaviorEvent); - } - - if (listeners == null) { - return; - } - - for (FacesListener listener : listeners.asArray(FacesListener.class)) { - if (event.isAppropriateListener(listener)) { - event.processListener(listener); - } - } - } - - /** - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void decode(FacesContext context) { - - if (context == null) { - throw new NullPointerException(); - } - - String rendererType = getRendererType(); - if (rendererType != null) { - Renderer renderer = getRenderer(context); - if (renderer != null) { - renderer.decode(context, this); - } else { - if (LOGGER.isLoggable(FINE)) { - LOGGER.fine("Can't get Renderer for type " + rendererType); - } - } - } - } - - /** - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void encodeBegin(FacesContext context) throws IOException { - - if (context == null) { - throw new NullPointerException(); - } - - pushComponentToEL(context, null); - - if (!isRendered()) { - return; - } - - context.getApplication().publishEvent(context, PreRenderComponentEvent.class, this); - - String rendererType = getRendererType(); - if (rendererType != null) { - Renderer renderer = getRenderer(context); - if (renderer != null) { - renderer.encodeBegin(context, this); - } else { - if (LOGGER.isLoggable(FINE)) { - LOGGER.fine("Can't get Renderer for type " + rendererType); - } - } - } - } - - /** - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void encodeChildren(FacesContext context) throws IOException { - - if (context == null) { - throw new NullPointerException(); - } - - if (!isRendered()) { - return; - } - - if (getRendererType() != null) { - Renderer renderer = getRenderer(context); - if (renderer != null) { - renderer.encodeChildren(context, this); - } - // We've already logged for this component - } else if (getChildCount() > 0) { - for (UIComponent child : getChildren()) { - child.encodeAll(context); - } - } - } - - /** - * @throws IOException {@inheritDoc} - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void encodeEnd(FacesContext context) throws IOException { - - if (context == null) { - throw new NullPointerException(); - } - - if (!isRendered()) { - popComponentFromEL(context); - return; - } - - if (getRendererType() != null) { - Renderer renderer = getRenderer(context); - if (renderer != null) { - renderer.encodeEnd(context, this); - } - - // We've already logged for this component - } - - popComponentFromEL(context); - } - - // -------------------------------------------------- Event Listener Methods - - /** - *

      - * Add the specified {@link FacesListener} to the set of listeners registered to receive event notifications from this - * {@link UIComponent}. It is expected that {@link UIComponent} classes acting as event sources will have corresponding - * typesafe APIs for registering listeners of the required type, and the implementation of those registration methods - * will delegate to this method. For example: - *

      - * - *
      -     * public class FooEvent extends FacesEvent {
      -     *   ...
      -     *   protected boolean isAppropriateListener(FacesListener listener) {
      -     *     return (listener instanceof FooListener);
      -     *   }
      -     *   protected void processListener(FacesListener listener) {
      -     *     ((FooListener) listener).processFoo(this);
      -     *   }
      -     *   ...
      -     * }
      -     *
      -     * public interface FooListener extends FacesListener {
      -     *   public void processFoo(FooEvent event);
      -     * }
      -     *
      -     * public class FooComponent extends UIComponentBase {
      -     *   ...
      -     *   public void addFooListener(FooListener listener) {
      -     *     addFacesListener(listener);
      -     *   }
      -     *   public void removeFooListener(FooListener listener) {
      -     *     removeFacesListener(listener);
      -     *   }
      -     *   ...
      -     * }
      -     * 
      - * - * @param listener The {@link FacesListener} to be registered - * @throws NullPointerException if listener is null - */ - @Override - protected void addFacesListener(FacesListener listener) { - - if (listener == null) { - throw new NullPointerException(); - } - - if (listeners == null) { - listeners = new AttachedObjectListHolder<>(); - } - - listeners.add(listener); - } - - /** - * @throws IllegalArgumentException {@inheritDoc} - * @throws NullPointerException {@inheritDoc} - */ - @Override - protected FacesListener[] getFacesListeners(Class clazz) { - - if (clazz == null) { - throw new NullPointerException(); - } - if (!FacesListener.class.isAssignableFrom(clazz)) { - throw new IllegalArgumentException(); - } - - if (listeners == null) { - return (FacesListener[]) Array.newInstance(clazz, 0); - } - - FacesListener[] listeners = this.listeners.asArray(FacesListener.class); - if (listeners.length == 0) { - return (FacesListener[]) Array.newInstance(clazz, 0); - } - - List results = new ArrayList<>(listeners.length); - for (FacesListener listener : listeners) { - if (((Class) clazz).isAssignableFrom(listener.getClass())) { - results.add(listener); - } - } - - return results.toArray((FacesListener[]) Array.newInstance(clazz, results.size())); - } - - /** - *

      - * Remove the specified {@link FacesListener} from the set of listeners registered to receive event notifications from - * this {@link UIComponent}. - * - * @param listener The {@link FacesListener} to be deregistered - * @throws NullPointerException if listener is null - */ - @Override - protected void removeFacesListener(FacesListener listener) { - - if (listener == null) { - throw new NullPointerException(); - } - - if (listeners != null) { - listeners.remove(listener); - } - } - - /** - * @throws IllegalStateException {@inheritDoc} - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void queueEvent(FacesEvent event) { - - if (event == null) { - throw new NullPointerException(); - } - - UIComponent parent = getParent(); - - if (parent == null) { - throw new IllegalStateException(); - } - - parent.queueEvent(event); - } - - /** - *

      - * Install the listener instance referenced by argument componentListener as a listener for events of type - * eventClass originating from this specific instance of UIComponent. The default - * implementation creates an inner {@link SystemEventListener} instance that wraps argument - * componentListener as the listener argument. This inner class must call through to the - * argument componentListener in its implementation of {@link SystemEventListener#processEvent} and its - * implementation of {@link SystemEventListener#isListenerForSource} must return true if the instance class of this - * UIComponent is assignable from the argument to isListenerForSource. - *

      - *

      - * The listener instance referenced by argument componentListener may not already be installed as a listener for events of type - * eventClass originating from this specific instance of UIComponent. When doing the - * comparison to determine if an existing listener is equal to the argument componentListener, - * the equals() method on the existing listener must be invoked, passing the - * argument componentListener, rather than the other way around. - *

      - * - * @param eventClass the Class of event for which listener must be fired. - * @param componentListener the implementation of {@link jakarta.faces.event.ComponentSystemEventListener} whose - * {@link jakarta.faces.event.ComponentSystemEventListener#processEvent} method must be called when events of type - * facesEventClass are fired. - * - * @throws NullPointerException if any of the arguments are null. - * - * @since 2.1 - */ - @Override - public void subscribeToEvent(Class eventClass, ComponentSystemEventListener componentListener) { - - if (isAnyNull(eventClass, componentListener)) { - throw new NullPointerException(); - } - - if (initialStateMarked()) { - initialState = false; - } - - if (listenersByEventClass == null) { - listenersByEventClass = new HashMap<>(3, 1.0f); - } - - SystemEventListener facesLifecycleListener = new ComponentSystemEventListenerAdapter(componentListener, this); - List listenersForEventClass = listenersByEventClass.get(eventClass); - if (listenersForEventClass == null) { - listenersForEventClass = new ArrayList<>(3); - listenersByEventClass.put(eventClass, listenersForEventClass); - } - - if (!listenersForEventClass.contains(facesLifecycleListener)) { - listenersForEventClass.add(facesLifecycleListener); - } - } - - /** - *

      - * Remove the listener instance referenced by argument componentListener as a listener for events of type - * eventClass originating from this specific instance of UIComponent. When doing the - * comparison to determine if an existing listener is equal to the argument componentListener (and thus - * must be removed), the equals() method on the existing listener must be invoked, passing the - * argument componentListener, rather than the other way around. - *

      - * - * @param eventClass the Class of event for which listener must be removed. - * @param componentListener the implementation of {@link ComponentSystemEventListener} whose - * {@link ComponentSystemEventListener#processEvent} method must no longer be called when events of type - * eventClass are fired. - * - * @throws NullPointerException if any of the arguments are null. - * - * @since 2.1 - */ - @Override - public void unsubscribeFromEvent(Class eventClass, ComponentSystemEventListener componentListener) { - - if (isAnyNull(eventClass, componentListener)) { - throw new NullPointerException(); - } - - List listeners = getListenersForEventClass(eventClass); - - if (!isEmpty(listeners)) { - for (Iterator i = listeners.iterator(); i.hasNext();) { - - ComponentSystemEventListener existingListener = ((ComponentSystemEventListenerAdapter) i.next()).getWrapped(); - - if (existingListener.equals(componentListener)) { - i.remove(); - break; - } - } - } - } - - /** - *

      - * Return the SystemEventListener instances registered on this UIComponent instance that are - * interested in events of type eventClass. - *

      - * - * @param eventClass the Class of event for which the listeners must be returned. - * - * @throws NullPointerException if argument eventClass is null. - * - * @since 2.1 - */ - @Override - public List getListenersForEventClass(Class eventClass) { - - if (eventClass == null) { - throw new NullPointerException(); - } - - if (listenersByEventClass != null) { - return listenersByEventClass.getOrDefault(eventClass, Collections.emptyList()); - } - - return Collections.emptyList(); - } - - // ------------------------------------------------ Lifecycle Phase Handlers - - /** - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void processDecodes(FacesContext context) { - - if (context == null) { - throw new NullPointerException(); - } - - // Skip processing if our rendered flag is false - if (!isRendered()) { - return; - } - - pushComponentToEL(context, null); - - try { - // Process all facets and children of this component - Iterator kids = getFacetsAndChildren(); - while (kids.hasNext()) { - UIComponent kid = kids.next(); - kid.processDecodes(context); - } - - // Process this component itself - try { - decode(context); - } catch (RuntimeException e) { - context.renderResponse(); - throw e; - } - } finally { - popComponentFromEL(context); - } - } - - /** - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void processValidators(FacesContext context) { - - if (context == null) { - throw new NullPointerException(); - } - - // Skip processing if our rendered flag is false - if (!isRendered()) { - return; - } - - pushComponentToEL(context, null); - - try { - Application application = context.getApplication(); - application.publishEvent(context, PreValidateEvent.class, this); - - // Process all the facets and children of this component - Iterator kids = getFacetsAndChildren(); - while (kids.hasNext()) { - UIComponent kid = kids.next(); - kid.processValidators(context); - } - - application.publishEvent(context, PostValidateEvent.class, this); - } finally { - popComponentFromEL(context); - } - } - - /** - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void processUpdates(FacesContext context) { - - if (context == null) { - throw new NullPointerException(); - } - - // Skip processing if our rendered flag is false - if (!isRendered()) { - return; - } - - pushComponentToEL(context, null); - - try { - // Process all facets and children of this component - Iterator kids = getFacetsAndChildren(); - while (kids.hasNext()) { - UIComponent kid = kids.next(); - kid.processUpdates(context); - } - } finally { - popComponentFromEL(context); - } - } - - /** - * @throws NullPointerException {@inheritDoc} - */ - @Override - public Object processSaveState(FacesContext context) { - - if (context == null) { - throw new NullPointerException(); - } - - if (isTransient()) { - return null; - } - - Object[] stateStruct = new Object[2]; - Object[] childState = EMPTY_ARRAY; - - pushComponentToEL(context, null); - - try { - // Process this component itself - stateStruct[MY_STATE] = saveState(context); - - // Determine if we have any children to store - int count = getChildCount() + getFacetCount(); - if (count > 0) { - - // This arraylist will store state - List stateList = new ArrayList<>(count); - - // If we have children, add them to the stateList - collectChildState(context, stateList); - - // If we have facets, add them to the stateList - collectFacetsState(context, stateList); - - // Finally, capture the stateList and replace the original, - // EMPTY_OBJECT_ARRAY Object array - childState = stateList.toArray(); - } - } finally { - popComponentFromEL(context); - } - - stateStruct[CHILD_STATE] = childState; - return stateStruct; - } - - /** - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void processRestoreState(FacesContext context, Object state) { - if (context == null) { - throw new NullPointerException(); - } - - pushComponentToEL(context, null); - - try { - Object[] stateStruct = (Object[]) state; - Object[] childState = (Object[]) stateStruct[CHILD_STATE]; - - // Process this component itself - restoreState(context, stateStruct[MY_STATE]); - - // Process all the children of this component - int i = restoreChildState(context, childState); - - // Process all of the facets of this component - restoreFacetsState(context, childState, i); - - } finally { - popComponentFromEL(context); - } - } - - // ------------------------------------------------------- Protected Methods - - @Override - protected FacesContext getFacesContext() { - - // PENDING(edburns): we can't use the cache ivar because we - // don't always know when to clear it. For example, in the - // "save state in server" case, the UIComponent instances stick - // around between requests, yielding stale facesContext - // references. If there was some way to clear the facesContext - // cache ivar for each node in the tree *after* the - // render-response phase, then we could keep a cache ivar. As - // it is now, we must always use the Thread Local Storage - // solution. - - return FacesContext.getCurrentInstance(); - } - - @Override - protected Renderer getRenderer(FacesContext context) { - - Renderer renderer = null; - - String rendererType = getRendererType(); - if (rendererType != null) { - renderer = context.getRenderKit().getRenderer(getFamily(), rendererType); - - if (renderer == null && LOGGER.isLoggable(FINE)) { - LOGGER.fine("Can't get Renderer for type " + rendererType); - } - } else { - if (LOGGER.isLoggable(FINE)) { - String id = getId(); - LOGGER.fine("No renderer-type for component " + id != null ? id : getClass().getName()); - } - } - - return renderer; - } - - // ---------------------------------------------- PartialStateHolder Methods - - /** - *

      - * For each of the attached objects on this instance that implement {@link PartialStateHolder}, call - * {@link PartialStateHolder#markInitialState} on the attached object. - *

      - * - * @since 2.0 - */ - @Override - public void markInitialState() { - super.markInitialState(); - - if (listeners != null) { - listeners.markInitialState(); - } - if (listenersByEventClass != null) { - for (List listener : listenersByEventClass.values()) { - if (listener instanceof PartialStateHolder) { - ((PartialStateHolder) listener).markInitialState(); - } - } - } - if (behaviors != null) { - for (Entry> entry : behaviors.entrySet()) { - for (ClientBehavior behavior : entry.getValue()) { - if (behavior instanceof PartialStateHolder) { - ((PartialStateHolder) behavior).markInitialState(); - } - } - } - } - } - - /** - *

      - * For each of the attached objects on this instance that implement {@link PartialStateHolder}, call - * {@link PartialStateHolder#clearInitialState} on the attached object. - *

      - * - * @since 2.0 - */ - @Override - public void clearInitialState() { - super.clearInitialState(); - if (listeners != null) { - listeners.clearInitialState(); - } - if (listenersByEventClass != null) { - for (List listener : listenersByEventClass.values()) { - if (listener instanceof PartialStateHolder) { - ((PartialStateHolder) listener).clearInitialState(); - } - } - } - if (behaviors != null) { - for (Entry> entry : behaviors.entrySet()) { - for (ClientBehavior behavior : entry.getValue()) { - if (behavior instanceof PartialStateHolder) { - ((PartialStateHolder) behavior).clearInitialState(); - } - } - } - } - } - - @Override - public Object saveState(FacesContext context) { - - if (context == null) { - throw new NullPointerException(); - } - - Object[] values = null; - - if (initialStateMarked()) { - Object savedFacesListeners = listeners != null ? listeners.saveState(context) : null; - Object savedSysEventListeners = saveSystemEventListeners(context); - Object savedBehaviors = saveBehaviorsState(context); - Object savedBindings = null; - - if (bindings != null) { - savedBindings = saveBindingsState(context); - } - - Object savedHelper = null; - if (stateHelper != null) { - savedHelper = stateHelper.saveState(context); - } - - if (isAllNull(savedFacesListeners, savedSysEventListeners, savedBehaviors, savedBindings, savedHelper)) { - return null; - } - - if (values == null || values.length != 5) { - values = new Object[5]; - } - - // Since we're saving partial state, skip id and clientId - // as this will be reconstructed from the template execution - // when the view is restored - values[0] = savedFacesListeners; - values[1] = savedSysEventListeners; - values[2] = savedBehaviors; - values[3] = savedBindings; - values[4] = savedHelper; - - return values; - - } else { - if (values == null || values.length != 6) { - values = new Object[6]; - } - - values[0] = listeners != null ? listeners.saveState(context) : null; - values[1] = saveSystemEventListeners(context); - values[2] = saveBehaviorsState(context); - - if (bindings != null) { - values[3] = saveBindingsState(context); - } - - if (stateHelper != null) { - values[4] = stateHelper.saveState(context); - } - - values[5] = id; - - return values; - } - } - - @Override - public void restoreState(FacesContext context, Object state) { - - if (context == null) { - throw new NullPointerException(); - } - - if (state == null) { - return; - } - - Object[] values = (Object[]) state; - - if (values[0] != null) { - if (listeners == null) { - listeners = new AttachedObjectListHolder<>(); - } - listeners.restoreState(context, values[0]); - } - - if (values[1] != null) { - Map, List> restoredListeners = restoreSystemEventListeners(context, values[1]); - if (listenersByEventClass != null) { - listenersByEventClass.putAll(restoredListeners); - } else { - listenersByEventClass = restoredListeners; - } - } - - if (values[2] != null) { - behaviors = restoreBehaviorsState(context, values[2]); - } - - if (values[3] != null) { - bindings = restoreBindingsState(context, values[3]); - } - - if (values[4] != null) { - getStateHelper().restoreState(context, values[4]); - } - - if (values.length == 6) { - // This means we've saved full state and need to do a little more - // work to finish the job - if (values[5] != null) { - id = (String) values[5]; - } - } - - } - - @Override - public boolean isTransient() { - return transientFlag; - } - - @Override - public void setTransient(boolean transientFlag) { - this.transientFlag = transientFlag; - } - - // -------------------------------------- Helper methods for state saving - - // --------- methods used by UIComponents to save their attached Objects. - - /** - *

      - * This method is called by {@link UIComponent} subclasses that want to save one or more attached objects. It is a - * convenience method that does the work of saving attached objects that may or may not implement the - * {@link StateHolder} interface. Using this method implies the use of {@link #restoreAttachedState} to restore the - * attached objects. - *

      - * - *

      - * This method supports saving attached objects of the following type: Objects, null values, - * and Collections of these objects. If any contained objects are not Collections and do not implement {@link StateHolder}, they must have - * zero-argument public constructors. The exact structure of the returned object is undefined and opaque, but will be - * serializable. - *

      - * - * @param context the {@link FacesContext} for this request. - * @param attachedObject the object, which may be a List instance, or an Object. The - * attachedObject (or the elements that comprise attachedObject may implement - * {@link StateHolder}. - * - * @return The state object to be saved. - * @throws NullPointerException if the context argument is null. - */ - - public static Object saveAttachedState(FacesContext context, Object attachedObject) { - if (context == null) { - throw new NullPointerException(); - } - - if (attachedObject == null) { - return null; - } - - Object result; - Class mapOrCollectionClass = attachedObject.getClass(); - boolean newWillSucceed = true; - // first, test for newability of the class. - try { - int modifiers = mapOrCollectionClass.getModifiers(); - newWillSucceed = Modifier.isPublic(modifiers); - if (newWillSucceed) { - newWillSucceed = null != mapOrCollectionClass.getConstructor(); - } - } catch (Exception e) { - newWillSucceed = false; - } - - if (newWillSucceed && attachedObject instanceof Collection) { - Collection attachedCollection = (Collection) attachedObject; - List resultList = new ArrayList<>(attachedCollection.size() + 1); - resultList.add(new StateHolderSaver(context, mapOrCollectionClass)); - for (Object item : attachedCollection) { - if (item != null) { - if (item instanceof StateHolder && ((StateHolder) item).isTransient()) { - continue; - } - resultList.add(new StateHolderSaver(context, item)); - } - } - result = resultList; - } else if (newWillSucceed && attachedObject instanceof Map) { - Map attachedMap = (Map) attachedObject; - List resultList = new ArrayList<>(attachedMap.size() * 2 + 1); - resultList.add(new StateHolderSaver(context, mapOrCollectionClass)); - Object key, value; - for (Map.Entry entry : attachedMap.entrySet()) { - key = entry.getKey(); - if (key instanceof StateHolder && ((StateHolder) key).isTransient()) { - continue; - } - value = entry.getValue(); - if (value instanceof StateHolder && ((StateHolder) value).isTransient()) { - continue; - } - resultList.add(new StateHolderSaver(context, key)); - resultList.add(new StateHolderSaver(context, value)); - } - result = resultList; - } else { - result = new StateHolderSaver(context, attachedObject); - } - - return result; - } - - /** - *

      - * This method is called by {@link UIComponent} subclasses that need to restore the objects they saved using - * {@link #saveAttachedState}. This method is tightly coupled with {@link #saveAttachedState}. - *

      - * - *

      - * This method supports restoring all attached objects types supported by {@link #saveAttachedState}. - *

      - * - * @param context the {@link FacesContext} for this request - * @param stateObj the opaque object returned from {@link #saveAttachedState} - * - * @return the object restored from stateObj. - * - * @throws NullPointerException if context is null. - * @throws IllegalStateException if the object is not previously returned by {@link #saveAttachedState}. - */ - - public static Object restoreAttachedState(FacesContext context, Object stateObj) throws IllegalStateException { - if (null == context) { - throw new NullPointerException(); - } - if (null == stateObj) { - return null; - } - Object result; - - if (stateObj instanceof List) { - List stateList = (List) stateObj; - StateHolderSaver collectionSaver = stateList.get(0); - Class mapOrCollection = (Class) collectionSaver.restore(context); - if (Collection.class.isAssignableFrom(mapOrCollection)) { - Collection retCollection = null; - try { - retCollection = (Collection) mapOrCollection.getDeclaredConstructor().newInstance(); - } catch (IllegalArgumentException | ReflectiveOperationException | SecurityException e) { - if (LOGGER.isLoggable(Level.SEVERE)) { - LOGGER.log(Level.SEVERE, e.toString(), e); - } - throw new IllegalStateException("Unknown object type"); - } - for (int i = 1, len = stateList.size(); i < len; i++) { - try { - retCollection.add(stateList.get(i).restore(context)); - } catch (ClassCastException cce) { - if (LOGGER.isLoggable(Level.SEVERE)) { - LOGGER.log(Level.SEVERE, cce.toString(), cce); - } - throw new IllegalStateException("Unknown object type"); - } - } - result = retCollection; - } else { - // If we were doing assertions: assert(mapOrList.isAssignableFrom(Map.class)); - Map retMap = null; - try { - retMap = (Map) mapOrCollection.getDeclaredConstructor().newInstance(); - } catch (IllegalArgumentException | ReflectiveOperationException | SecurityException e) { - if (LOGGER.isLoggable(Level.SEVERE)) { - LOGGER.log(Level.SEVERE, e.toString(), e); - } - throw new IllegalStateException("Unknown object type"); - } - for (int i = 1, len = stateList.size(); i < len; i += 2) { - try { - retMap.put(stateList.get(i).restore(context), stateList.get(i + 1).restore(context)); - } catch (ClassCastException cce) { - if (LOGGER.isLoggable(Level.SEVERE)) { - LOGGER.log(Level.SEVERE, cce.toString(), cce); - } - throw new IllegalStateException("Unknown object type"); - } - } - result = retMap; - - } - } else if (stateObj instanceof StateHolderSaver) { - StateHolderSaver saver = (StateHolderSaver) stateObj; - result = saver.restore(context); - } else { - throw new IllegalStateException("Unknown object type"); - } - return result; - } - - private static Map restoreBindingsState(FacesContext context, Object state) { - - if (state == null) { - return null; - } - Object values[] = (Object[]) state; - String names[] = (String[]) values[0]; - Object states[] = (Object[]) values[1]; - Map bindings = new HashMap<>(names.length); - for (int i = 0; i < names.length; i++) { - bindings.put(names[i], (ValueExpression) restoreAttachedState(context, states[i])); - } - return bindings; - - } - - private Object saveBindingsState(FacesContext context) { - - if (bindings == null) { - return null; - } - - Object values[] = new Object[2]; - values[0] = bindings.keySet().toArray(new String[bindings.size()]); - - Object[] bindingValues = bindings.values().toArray(); - for (int i = 0; i < bindingValues.length; i++) { - bindingValues[i] = saveAttachedState(context, bindingValues[i]); - } - - values[1] = bindingValues; - - return values; - - } - - private Object saveSystemEventListeners(FacesContext ctx) { - - if (listenersByEventClass == null) { - return null; - } - - int size = listenersByEventClass.size(); - Object listeners[][] = new Object[size][2]; - int idx = 0; - boolean savedState = false; - for (Entry, List> e : listenersByEventClass.entrySet()) { - Object[] target = listeners[idx++]; - target[0] = e.getKey(); - target[1] = saveAttachedState(ctx, e.getValue()); - if (target[1] == null) { - target[0] = null; - } else { - savedState = true; - } - } - - return savedState ? listeners : null; - - } - - private Map, List> restoreSystemEventListeners(FacesContext ctx, Object state) { - - if (state == null) { - return null; - } - - Object[][] listeners = (Object[][]) state; - Map, List> m = new HashMap<>(listeners.length, 1.0f); - for (int i = 0, len = listeners.length; i < len; i++) { - Object[] source = listeners[i]; - m.put((Class) source[0], (List) restoreAttachedState(ctx, source[1])); - } - - return m; - } - - Map getDescriptorMap() { - return propertyDescriptorMap; - } - - private void doPostAddProcessing(FacesContext context, UIComponent added) { - - if (parent.isInView()) { - publishAfterViewEvents(context, context.getApplication(), added); - } - - } - - private void doPreRemoveProcessing(FacesContext context, UIComponent toRemove) { - - if (parent.isInView()) { - disconnectFromView(context, context.getApplication(), toRemove); - } - - } - - // ------------------------------------------------------------- BehaviorHolder stub methods. - - /** - * behaviors associated with this component. - */ - private BehaviorsMap behaviors; - - /** - *

      - * This is a default implementation of {@link jakarta.faces.component.behavior.ClientBehaviorHolder#addClientBehavior}. - * UIComponent does not implement the {@link jakarta.faces.component.behavior.ClientBehaviorHolder} - * interface, but provides default implementations for the methods defined by - * {@link jakarta.faces.component.behavior.ClientBehaviorHolder} to simplify subclass implementations. Subclasses that - * wish to support the {@link jakarta.faces.component.behavior.ClientBehaviorHolder} contract must declare that the - * subclass implements {@link jakarta.faces.component.behavior.ClientBehaviorHolder}, and must provide an implementation - * of {@link jakarta.faces.component.behavior.ClientBehaviorHolder#getEventNames}. - *

      - * - * @param eventName the logical name of the client-side event to attach the behavior to. - * @param behavior the {@link jakarta.faces.component.behavior.Behavior} instance to attach for the specified event - * name. - * - * @since 2.0 - */ - public void addClientBehavior(String eventName, ClientBehavior behavior) { - assertClientBehaviorHolder(); - // First, make sure that the event is supported. We don't want - // to bother attaching behaviors for unsupported events. - - Collection eventNames = getEventNames(); - - // getClientEventNames() is spec'ed to require a non-null Set. - // If getClientEventNames() returns null, throw an exception - // to indicate that the API in not being used properly. - if (eventNames == null) { - throw new IllegalStateException( - "Attempting to add a Behavior to a component " + "that does not support any event types. " + "getEventTypes() must return a non-null Set."); - } - - if (eventNames.contains(eventName)) { - - if (initialStateMarked()) { - // a Behavior has been added dynamically. Update existing - // Behaviors, if any, to save their full state. - if (behaviors != null) { - for (Entry> entry : behaviors.entrySet()) { - for (ClientBehavior b : entry.getValue()) { - if (b instanceof PartialStateHolder) { - ((PartialStateHolder) behavior).clearInitialState(); - } - } - } - } - } - // We've got an event that we support, create our Map - // if necessary - - if (null == behaviors) { - // Typically we only have a small number of behaviors for - // any component - in most cases only 1. Using a very small - // initial capacity so that we keep the footprint to a minimum. - Map> modifiableMap = new HashMap<>(5, 1.0f); - behaviors = new BehaviorsMap(modifiableMap); - } - - List eventBehaviours = behaviors.get(eventName); - - if (null == eventBehaviours) { - // Again using small initial capacity - we typically - // only have 1 Behavior per event type. - eventBehaviours = new ArrayList<>(3); - behaviors.getModifiableMap().put(eventName, eventBehaviours); - } - - eventBehaviours.add(behavior); - } - } - - /** - *

      - * This is a default implementation of {@link jakarta.faces.component.behavior.ClientBehaviorHolder#getEventNames}. - * UIComponent does not implement the {@link jakarta.faces.component.behavior.ClientBehaviorHolder} - * interface, but provides default implementations for the methods defined by - * {@link jakarta.faces.component.behavior.ClientBehaviorHolder} to simplify subclass implementations. Subclasses that - * wish to support the {@link jakarta.faces.component.behavior.ClientBehaviorHolder} contract must declare that the - * subclass implements {@link jakarta.faces.component.behavior.ClientBehaviorHolder}, and must override this method to - * return a non-Empty Collection of the client event names that the component supports. - *

      - * - * @return the collection of event names. - * @since 2.0 - */ - public Collection getEventNames() { - assertClientBehaviorHolder(); - // Note: we intentionally return null here even though this - // is not a valid value. The result is that addClientBehavior() - // will fail with an IllegalStateException if getEventNames() - // is not overridden. This should make it obvious to the - // component author that something is wrong. - return null; - } - - /** - *

      - * This is a default implementation of {@link jakarta.faces.component.behavior.ClientBehaviorHolder#getClientBehaviors}. - * UIComponent does not implement the {@link jakarta.faces.component.behavior.ClientBehaviorHolder} - * interface, but provides default implementations for the methods defined by - * {@link jakarta.faces.component.behavior.ClientBehaviorHolder} to simplify subclass implementations. Subclasses that - * wish to support the {@link jakarta.faces.component.behavior.ClientBehaviorHolder} contract must declare that the - * subclass implements {@link jakarta.faces.component.behavior.ClientBehaviorHolder}, and must add an implementation of - * {@link jakarta.faces.component.behavior.ClientBehaviorHolder#getEventNames}. - *

      - * - * @return behaviors associated with this component. - * @since 2.0 - */ - public Map> getClientBehaviors() { - if (null == behaviors) { - return Collections.emptyMap(); - } - - return behaviors; - } - - /** - *

      - * This is a default implementation of - * {@link jakarta.faces.component.behavior.ClientBehaviorHolder#getDefaultEventName}. UIComponent does not - * implement the {@link jakarta.faces.component.behavior.ClientBehaviorHolder} interface, but provides default - * implementations for the methods defined by {@link jakarta.faces.component.behavior.ClientBehaviorHolder} to simplify - * subclass implementations. Subclasses that wish to support the - * {@link jakarta.faces.component.behavior.ClientBehaviorHolder} contract must declare that the subclass implements - * {@link jakarta.faces.component.behavior.ClientBehaviorHolder}, and must provide an implementation of - * {@link jakarta.faces.component.behavior.ClientBehaviorHolder#getEventNames}. - *

      - * - * @return the default event name. - */ - public String getDefaultEventName() { - assertClientBehaviorHolder(); - // Our default implementation just returns null - no default - // event name; - return null; - } - - /** - * {@link UIComponentBase} has stub methods from the {@link ClientBehaviorHolder} interface, but these method should be - * used only with componets that really implement holder interface. For an any other classes this method throws - * {@link IllegalStateException} - * - * @throws IllegalStateException - */ - private void assertClientBehaviorHolder() { - if (!isClientBehaviorHolder()) { - throw new IllegalStateException("Attempting to use a Behavior feature with a component " + "that does not support any event types. " - + "Component must implement BehaviourHolder interface."); - } - } - - /** - * @return true if component implements {@link ClientBehaviorHolder} interface. - */ - private boolean isClientBehaviorHolder() { - return ClientBehaviorHolder.class.isInstance(this); - } - - /** - * Save state of the behaviors map. - * - * @param context the {@link FacesContext} for this request. - * @return map converted to the array of Object or null if no behaviors have been set. - */ - private Object saveBehaviorsState(FacesContext context) { - Object state = null; - if (null != behaviors && behaviors.size() > 0) { - boolean stateWritten = false; - Object[] attachedBehaviors = new Object[behaviors.size()]; - int i = 0; - for (List eventBehaviors : behaviors.values()) { - // we need to take different action depending on whether - // or not markInitialState() was called. If it's not called, - // assume Jakarta Faces 1.2 style state saving and call through to - // saveAttachedState(), otherwise, call saveState() on the - // behaviors directly. - Object[] attachedEventBehaviors = new Object[eventBehaviors.size()]; - for (int j = 0; j < attachedEventBehaviors.length; j++) { - attachedEventBehaviors[j] = initialStateMarked() ? saveBehavior(context, eventBehaviors.get(j)) - : saveAttachedState(context, eventBehaviors.get(j)); - if (!stateWritten) { - stateWritten = attachedEventBehaviors[j] != null; - } - } - attachedBehaviors[i++] = attachedEventBehaviors; - } - if (stateWritten) { - state = new Object[] { behaviors.keySet().toArray(new String[behaviors.size()]), attachedBehaviors }; - } - } - return state; - } - - /** - * @param context the {@link FacesContext} for this request. - * @param state saved state of the {@link Behavior}'s attached to the component. - * @return restored Map of the behaviors. - */ - private BehaviorsMap restoreBehaviorsState(FacesContext context, Object state) { - - if (null != state) { - Object[] values = (Object[]) state; - String[] names = (String[]) values[0]; - Object[] attachedBehaviors = (Object[]) values[1]; - // we need to take different action depending on whether - // or not markInitialState() was called. If it's not called, - // assume Jakarta Faces 1.2 style state saving and call through to - // restoreAttachedState(), otherwise, call restoreState() on the - // behaviors directly. - if (!initialStateMarked()) { - Map> modifiableMap = new HashMap<>(names.length, 1.0f); - for (int i = 0; i < attachedBehaviors.length; i++) { - Object[] attachedEventBehaviors = (Object[]) attachedBehaviors[i]; - ArrayList eventBehaviors = new ArrayList<>(attachedBehaviors.length); - for (int j = 0; j < attachedEventBehaviors.length; j++) { - eventBehaviors.add((ClientBehavior) restoreAttachedState(context, attachedEventBehaviors[j])); - } - - modifiableMap.put(names[i], eventBehaviors); - } - - return new BehaviorsMap(modifiableMap); - } else { - for (int i = 0, len = names.length; i < len; i++) { - // assume the behaviors have already been populated by - // execution of the template. Process the state in the - // same order that the names were saved. - if (behaviors != null) { - List existingBehaviors = behaviors.get(names[i]); - restoreBehaviors(context, existingBehaviors, (Object[]) attachedBehaviors[i]); - } - } - return behaviors; - } - } - return null; - } - - private Object saveBehavior(FacesContext ctx, ClientBehavior behavior) { - - // if the Behavior isn't a StateHolder, do nothing as it will be - // added to the BehaviorMap when the template is re-executed. - return behavior instanceof StateHolder ? ((StateHolder) behavior).saveState(ctx) : null; - - } - - private void restoreBehaviors(FacesContext ctx, List existingBehaviors, Object[] state) { - - // this method assumes a one to one correspondence in both length and - // order. - for (int i = 0, len = state.length; i < len; i++) { - ClientBehavior behavior = existingBehaviors.get(i); - if (state[i] == null) { - // nothing to do...move on - continue; - } - // if the Behavior is a StateHolder, invoke restoreState - // passing in the current state. If it's not, just ignore - // it and move along. - if (behavior instanceof StateHolder) { - if (state[i] instanceof StateHolderSaver) { - ((StateHolderSaver) state[i]).restore(ctx); - } else { - ((StateHolder) behavior).restoreState(ctx, state[i]); - } - } - } - } - - private static void publishAfterViewEvents(FacesContext context, Application application, UIComponent component) { - - component.setInView(true); - try { - component.pushComponentToEL(context, component); - application.publishEvent(context, PostAddToViewEvent.class, component); - if (component.getChildCount() > 0) { - Collection clist = new ArrayList<>(component.getChildren()); - for (UIComponent c : clist) { - publishAfterViewEvents(context, application, c); - } - } - - if (component.getFacetCount() > 0) { - Collection clist = new ArrayList<>(component.getFacets().values()); - for (UIComponent c : clist) { - publishAfterViewEvents(context, application, c); - } - } - } finally { - component.popComponentFromEL(context); - } - - } - - private static void disconnectFromView(FacesContext context, Application application, UIComponent component) { - - component.setInView(false); - - if (component.getChildCount() > 0) { - List children = component.getChildren(); - for (UIComponent c : children) { - disconnectFromView(context, application, c); - } - } - if (component.getFacetCount() > 0) { - Map facets = component.getFacets(); - for (UIComponent c : facets.values()) { - disconnectFromView(context, application, c); - } - } - - application.publishEvent(context, PreRemoveFromViewEvent.class, component); - component.compositeParent = null; - } - - // --------------------------------------------------------- Private Classes - - // For state saving - private final static Object[] EMPTY_ARRAY = new Object[0]; - - // Empty iterator for short circuiting operations - private final static Iterator EMPTY_ITERATOR = new Iterator<>() { - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - @Override - public UIComponent next() { - throw new NoSuchElementException("Empty Iterator"); - } - - @Override - public boolean hasNext() { - return false; - } - }; - - // Private implementation of Map that supports the functionality - // required by UIComponent.getFacets() - // HISTORY: - // Versions 1.333 and older used inheritence to provide the - // basic map functionality. This was wasteful since a - // component could be completely configured via ValueExpressions - // or (Bindings) which means an EMPTY_OBJECT_ARRAY Map would always be - // present when it wasn't needed. By using composition, - // we control if and when the Map is instantiated thereby - // reducing uneeded object allocation. This change also - // has a nice side effect in state saving since we no - // longer need to duplicate the map, we just provide the - // private 'attributes' map directly to the state saving process. - private static class AttributesMap implements Map, Serializable { - - // this KEY is special to the AttributesMap - this allows the implementation - // to access the the List containing the attributes that have been set - private static final String ATTRIBUTES_THAT_ARE_SET_KEY = UIComponentBase.class.getName() + ".attributesThatAreSet"; - - // private Map attributes; - private transient Map pdMap; - private transient ConcurrentMap readMap; - private transient UIComponent component; - private static final long serialVersionUID = -6773035086539772945L; - - // -------------------------------------------------------- Constructors - - private AttributesMap(UIComponent component) { - - this.component = component; - pdMap = ((UIComponentBase) component).getDescriptorMap(); - } - - @Override - public boolean containsKey(Object keyObj) { - if (ATTRIBUTES_THAT_ARE_SET_KEY.equals(keyObj)) { - return true; - } - String key = (String) keyObj; - PropertyDescriptor pd = getPropertyDescriptor(key); - if (pd == null) { - Map attributes = (Map) component.getStateHelper().get(PropertyKeys.attributes); - if (attributes != null) { - return attributes.containsKey(key); - } else { - return false; - } - } else { - return false; - } - } - - @Override - public Object get(Object keyObj) { - String key = (String) keyObj; - Object result = null; - if (key == null) { - throw new NullPointerException(); - } - if (ATTRIBUTES_THAT_ARE_SET_KEY.equals(key)) { - result = component.getStateHelper().get(UIComponent.PropertyKeysPrivate.attributesThatAreSet); - } - Map attributes = (Map) component.getStateHelper().get(PropertyKeys.attributes); - if (null == result) { - PropertyDescriptor pd = getPropertyDescriptor(key); - if (pd != null) { - try { - if (null == readMap) { - readMap = new ConcurrentHashMap<>(); - } - Method readMethod = readMap.get(key); - if (null == readMethod) { - readMethod = pd.getReadMethod(); - Method putResult = readMap.putIfAbsent(key, readMethod); - if (null != putResult) { - readMethod = putResult; - } - } - - if (readMethod != null) { - result = readMethod.invoke(component, EMPTY_OBJECT_ARRAY); - } else { - throw new IllegalArgumentException(key); - } - } catch (IllegalAccessException e) { - throw new FacesException(e); - } catch (InvocationTargetException e) { - throw new FacesException(e.getTargetException()); - } - } else if (attributes != null) { - if (attributes.containsKey(key)) { - result = attributes.get(key); - } - } - } - if (null == result) { - ValueExpression ve = component.getValueExpression(key); - if (ve != null) { - try { - result = ve.getValue(component.getFacesContext().getELContext()); - } catch (ELException e) { - throw new FacesException(e); - } - } - } - if (result == null && attributes != null && isCompositeComponent(component)) { - result = getCompositeComponentAttributeDefaultValue(key, attributes); - } - return result; - } - - private Object getCompositeComponentAttributeDefaultValue(String name, Map attributes) { - var metadata = (BeanInfo) attributes.get(UIComponent.BEANINFO_KEY); - - if (metadata != null) { - for (var propertyDescriptor : metadata.getPropertyDescriptors()) { - if (propertyDescriptor.getName().equals(name)) { - var defaultValue = propertyDescriptor.getValue("default"); - - if (defaultValue != null) { - if (defaultValue instanceof ValueExpression) { - defaultValue = ((ValueExpression) defaultValue).getValue(component.getFacesContext().getELContext()); - } - - var expressionFactory = component.getFacesContext().getApplication().getExpressionFactory(); - return expressionFactory.coerceToType(defaultValue, propertyDescriptor.getPropertyType()); - } - } - } - } - - return null; - } - - @Override - public Object put(String keyValue, Object value) { - if (keyValue == null) { - throw new NullPointerException(); - } - - if (ATTRIBUTES_THAT_ARE_SET_KEY.equals(keyValue)) { - if (component.attributesThatAreSet == null) { - if (value instanceof List) { - component.getStateHelper().put(UIComponent.PropertyKeysPrivate.attributesThatAreSet, value); - } - } - return null; - } - - PropertyDescriptor pd = getPropertyDescriptor(keyValue); - if (pd != null) { - try { - Object result = null; - Method readMethod = pd.getReadMethod(); - if (readMethod != null) { - result = readMethod.invoke(component, EMPTY_OBJECT_ARRAY); - } - Method writeMethod = pd.getWriteMethod(); - if (writeMethod != null) { - writeMethod.invoke(component, value); - } else { - // TODO: i18n - throw new IllegalArgumentException("Setter not found for property " + keyValue); - } - return result; - } catch (IllegalAccessException e) { - throw new FacesException(e); - } catch (InvocationTargetException e) { - throw new FacesException(e.getTargetException()); - } - } else { - if (value == null) { - throw new NullPointerException(); - } - - List sProperties = (List) component.getStateHelper().get(PropertyKeysPrivate.attributesThatAreSet); - if (sProperties == null) { - component.getStateHelper().add(PropertyKeysPrivate.attributesThatAreSet, keyValue); - } else if (!sProperties.contains(keyValue)) { - component.getStateHelper().add(PropertyKeysPrivate.attributesThatAreSet, keyValue); - } - return putAttribute(keyValue, value); - } - } - - @Override - public void putAll(Map map) { - if (map == null) { - throw new NullPointerException(); - } - - for (Map.Entry entry : map.entrySet()) { - put(entry.getKey(), entry.getValue()); - } - } - - @Override - public Object remove(Object keyObj) { - String key = (String) keyObj; - if (key == null) { - throw new NullPointerException(); - } - if (ATTRIBUTES_THAT_ARE_SET_KEY.equals(key)) { - return null; - } - PropertyDescriptor pd = getPropertyDescriptor(key); - if (pd != null) { - throw new IllegalArgumentException(key); - } else { - Map attributes = getAttributes(); - if (attributes != null) { - component.getStateHelper().remove(UIComponent.PropertyKeysPrivate.attributesThatAreSet, key); - return component.getStateHelper().remove(PropertyKeys.attributes, key); - } else { - return null; - } - } - } - - @Override - public int size() { - Map attributes = getAttributes(); - return attributes != null ? attributes.size() : 0; - } - - @Override - public boolean isEmpty() { - Map attributes = getAttributes(); - return attributes == null || attributes.isEmpty(); - } - - @Override - public boolean containsValue(java.lang.Object value) { - Map attributes = getAttributes(); - return attributes != null && attributes.containsValue(value); - } - - @Override - public void clear() { - component.getStateHelper().remove(PropertyKeys.attributes); - component.getStateHelper().remove(PropertyKeysPrivate.attributesThatAreSet); - } - - @Override - public Set keySet() { - Map attributes = getAttributes(); - if (attributes != null) { - return Collections.unmodifiableSet(attributes.keySet()); - } - return Collections.emptySet(); - } - - @Override - public Collection values() { - Map attributes = getAttributes(); - if (attributes != null) { - return Collections.unmodifiableCollection(attributes.values()); - } - return Collections.emptyList(); - } - - @Override - public Set> entrySet() { - Map attributes = getAttributes(); - if (attributes != null) { - return Collections.unmodifiableSet(attributes.entrySet()); - } - return Collections.emptySet(); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - - if (!(o instanceof Map)) { - return false; - } - Map t = (Map) o; - if (t.size() != size()) { - return false; - } - - try { - for (Object e : entrySet()) { - Entry entry = (Entry) e; - Object key = entry.getKey(); - Object value = entry.getValue(); - if (value == null) { - if (!(t.get(key) == null && t.containsKey(key))) { - return false; - } - } else { - if (!value.equals(t.get(key))) { - return false; - } - } - } - } catch (ClassCastException | NullPointerException unused) { - return false; - } - - return true; - } - - @Override - public int hashCode() { - int h = 0; - for (Object o : entrySet()) { - h += o.hashCode(); - } - return h; - } - - private Map getAttributes() { - return (Map) component.getStateHelper().get(PropertyKeys.attributes); - } - - private Object putAttribute(String key, Object value) { - return component.getStateHelper().put(PropertyKeys.attributes, key, value); - } - - /** - *

      - * Return the PropertyDescriptor for the specified property name for this {@link UIComponent}'s - * implementation class, if any; otherwise, return null. - *

      - * - * @param name Name of the property to return a descriptor for - * @throws FacesException if an introspection exception occurs - */ - PropertyDescriptor getPropertyDescriptor(String name) { - if (pdMap != null) { - return pdMap.get(name); - } - return null; - } - - // ----------------------------------------------- Serialization Methods - - // This is dependent on serialization occuring with in a - // a Faces request, however, since UIComponentBase.{save,restore}State() - // doesn't actually serialize the AttributesMap, these methods are here - // purely to be good citizens. - - private void writeObject(ObjectOutputStream out) throws IOException { - out.writeObject(component.getClass()); - // noinspection NonSerializableObjectPassedToObjectStream - out.writeObject(component.saveState(FacesContext.getCurrentInstance())); - } - - private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - // noinspection unchecked - Class clazz = (Class) in.readObject(); - try { - component = (UIComponent) clazz.getDeclaredConstructor().newInstance(); - } catch (IllegalArgumentException | ReflectiveOperationException | SecurityException e) { - throw new RuntimeException(e); - } - component.restoreState(FacesContext.getCurrentInstance(), in.readObject()); - } - } - - // Private implementation of List that supports the functionality - // required by UIComponent.getChildren() - private static class ChildrenList extends ArrayList { - - /** - * - */ - private static final long serialVersionUID = 8926987612679576963L; - private UIComponent component; - private FacesContext context; - - public ChildrenList(UIComponent component) { - super(6); - this.component = component; - this.context = component.getFacesContext(); - } - - @Override - public void add(int index, UIComponent element) { - if (element == null) { - throw new NullPointerException(); - } else if (index < 0 || index > size()) { - throw new IndexOutOfBoundsException(); - } else { - addToDescendantMarkIdCache(component, element); - eraseParent(element); - super.add(index, element); - element.setParent(component); - - } - } - - @Override - public boolean add(UIComponent element) { - if (element == null) { - throw new NullPointerException(); - } else { - addToDescendantMarkIdCache(component, element); - eraseParent(element); - boolean result = super.add(element); - element.setParent(component); - return result; - } - } - - @Override - public boolean addAll(Collection collection) { - Iterator elements = new ArrayList(collection).iterator(); - boolean changed = false; - while (elements.hasNext()) { - UIComponent element = elements.next(); - if (element == null) { - throw new NullPointerException(); - } else { - add(element); - changed = true; - } - } - return changed; - } - - @Override - public boolean addAll(int index, Collection collection) { - Iterator elements = new ArrayList(collection).iterator(); - boolean changed = false; - while (elements.hasNext()) { - UIComponent element = elements.next(); - if (element == null) { - throw new NullPointerException(); - } else { - add(index++, element); - changed = true; - } - } - return changed; - } - - @Override - public void clear() { - int n = size(); - if (n < 1) { - return; - } - for (int i = 0; i < n; i++) { - UIComponent child = get(i); - if (isNotRenderingResponse(context)) { - removeFromDescendantMarkIdCache(component, child); - } - child.setParent(null); - } - super.clear(); - } - - @Override - public Iterator iterator() { - return new ChildrenListIterator(this); - } - - @Override - public ListIterator listIterator() { - return new ChildrenListIterator(this); - } - - @Override - public ListIterator listIterator(int index) { - return new ChildrenListIterator(this, index); - } - - @Override - public UIComponent remove(int index) { - UIComponent child = get(index); - if (isNotRenderingResponse(context)) { - removeFromDescendantMarkIdCache(component, child); - } - child.setParent(null); - super.remove(index); - return child; - } - - @Override - public boolean remove(Object elementObj) { - UIComponent element = (UIComponent) elementObj; - if (element == null) { - throw new NullPointerException(); - } - if (isNotRenderingResponse(context)) { - removeFromDescendantMarkIdCache(component, element); - } - if (super.indexOf(element) != -1) { - element.setParent(null); - } - if (super.remove(element)) { - return true; - } else { - return false; - } - } - - @Override - public boolean removeAll(Collection collection) { - boolean result = false; - for (Object elements : collection) { - if (remove(elements)) { - result = true; - } - } - return result; - } - - @Override - public boolean retainAll(Collection collection) { - boolean modified = false; - Iterator items = iterator(); - while (items.hasNext()) { - if (!collection.contains(items.next())) { - items.remove(); - modified = true; - } - } - return modified; - } - - @Override - public UIComponent set(int index, UIComponent element) { - if (element == null) { - throw new NullPointerException(); - } else if (index < 0 || index >= size()) { - throw new IndexOutOfBoundsException(); - } else { - addToDescendantMarkIdCache(component, element); - eraseParent(element); - UIComponent previous = get(index); - removeFromDescendantMarkIdCache(component, previous); - super.set(index, element); - previous.setParent(null); - element.setParent(component); - return previous; - } - } - } - - // Private implementation of ListIterator for ChildrenList - private static class ChildrenListIterator implements ListIterator { - - public ChildrenListIterator(ChildrenList list) { - this.list = list; - index = 0; - } - - public ChildrenListIterator(ChildrenList list, int index) { - this.list = list; - if (index < 0 || index > list.size()) { - throw new IndexOutOfBoundsException(String.valueOf(index)); - } else { - this.index = index; - } - } - - private ChildrenList list; - private int index; - private int last = -1; // Index last returned by next() or previous() - - // Iterator methods - - @Override - public boolean hasNext() { - return index < list.size(); - } - - @Override - public UIComponent next() { - try { - UIComponent o = list.get(index); - last = index++; - return o; - } catch (IndexOutOfBoundsException e) { - throw new NoSuchElementException(String.valueOf(index)); - } - } - - @Override - public void remove() { - if (last == -1) { - throw new IllegalStateException(); - } - list.remove(last); - if (last < index) { - index--; - } - last = -1; - } - - // ListIterator methods - - @Override - public void add(UIComponent o) { - last = -1; - list.add(index++, o); - } - - @Override - public boolean hasPrevious() { - return index > 1; - } - - @Override - public int nextIndex() { - return index; - } - - @Override - public UIComponent previous() { - try { - int current = index - 1; - UIComponent o = list.get(current); - last = current; - index = current; - return o; - } catch (IndexOutOfBoundsException e) { - throw new NoSuchElementException(); - } - } - - @Override - public int previousIndex() { - return index - 1; - } - - @Override - public void set(UIComponent o) { - if (last == -1) { - throw new IllegalStateException(); - } - list.set(last, o); - } - - } - - // Private implementation of Iterator for getFacetsAndChildren() - private final static class FacetsAndChildrenIterator implements Iterator { - - private Iterator iterator; - private boolean childMode; - private UIComponent c; - - public FacetsAndChildrenIterator(UIComponent c) { - this.c = c; - childMode = false; - } - - private void update() { - if (iterator == null) { - // we must guarantee that 'iterator' is never null - if (c.getFacetCount() != 0) { - iterator = c.getFacets().values().iterator(); - childMode = false; - } else if (c.getChildCount() != 0) { - iterator = c.getChildren().iterator(); - childMode = true; - } else { - iterator = EMPTY_ITERATOR; - childMode = true; - } - } else if (!childMode && !iterator.hasNext() && c.getChildCount() != 0) { - iterator = c.getChildren().iterator(); - childMode = true; - } - } - - @Override - public boolean hasNext() { - update(); - return iterator.hasNext(); - } - - @Override - public UIComponent next() { - update(); - return iterator.next(); - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - } - - // Private implementation of Map that supports the functionality - // required by UIComponent.getFacets() - private static class FacetsMap extends HashMap { - - /** - * - */ - private static final long serialVersionUID = -1444791615672259097L; - private UIComponent component; - private FacesContext context; - - public FacetsMap(UIComponent component) { - super(3, 1.0f); - this.component = component; - context = component.getFacesContext(); - } - - @Override - public void clear() { - Iterator keys = keySet().iterator(); - while (keys.hasNext()) { - keys.next(); - keys.remove(); - } - super.clear(); - } - - @Override - public Set> entrySet() { - return new FacetsMapEntrySet(this); - } - - @Override - public Set keySet() { - return new FacetsMapKeySet(this); - } - - @Override - public UIComponent put(String key, UIComponent value) { - if (key == null || value == null) { - throw new NullPointerException(); - } else // noinspection ConstantConditions - if (!(key instanceof String) || !(value instanceof UIComponent)) { - throw new ClassCastException(); - } - UIComponent previous = super.get(key); - if (previous != null) { - removeFromDescendantMarkIdCache(component, previous); - previous.setParent(null); - } - addToDescendantMarkIdCache(component, value); - eraseParent(value); - UIComponent result = super.put(key, value); - value.setParent(component); - - return result; - } - - @Override - public void putAll(Map map) { - if (map == null) { - throw new NullPointerException(); - } - for (Map.Entry entry : map.entrySet()) { - put(entry.getKey(), entry.getValue()); - } - } - - @Override - public UIComponent remove(Object key) { - UIComponent previous = get(key); - if (previous != null) { - if (isNotRenderingResponse(context)) { - removeFromDescendantMarkIdCache(component, previous); - } - previous.setParent(null); - } - super.remove(key); - return previous; - } - - @Override - public Collection values() { - return new FacetsMapValues(this); - } - - Iterator keySetIterator() { - return new ArrayList<>(super.keySet()).iterator(); - } - - } - - // Private implementation of Set for FacetsMap.getEntrySet() - private static class FacetsMapEntrySet extends AbstractSet> { - - public FacetsMapEntrySet(FacetsMap map) { - this.map = map; - } - - private FacetsMap map = null; - - @Override - public boolean add(Map.Entry o) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean addAll(Collection> c) { - throw new UnsupportedOperationException(); - } - - @Override - public void clear() { - map.clear(); - } - - @Override - public boolean contains(Object o) { - if (o == null) { - throw new NullPointerException(); - } - if (!(o instanceof Map.Entry)) { - return false; - } - Map.Entry e = (Map.Entry) o; - Object k = e.getKey(); - Object v = e.getValue(); - if (!map.containsKey(k)) { - return false; - } - if (v == null) { - return map.get(k) == null; - } else { - return v.equals(map.get(k)); - } - } - - @Override - public boolean isEmpty() { - return map.isEmpty(); - } - - @Override - public Iterator> iterator() { - return new FacetsMapEntrySetIterator(map); - } - - @Override - public boolean remove(Object o) { - if (o == null) { - throw new NullPointerException(); - } - if (!(o instanceof Map.Entry)) { - return false; - } - Object k = ((Map.Entry) o).getKey(); - if (map.containsKey(k)) { - map.remove(k); - return true; - } else { - return false; - } - } - - @Override - public boolean removeAll(Collection c) { - boolean result = false; - for (Object element : c) { - if (remove(element)) { - result = true; - } - } - return result; - } - - @Override - public boolean retainAll(Collection c) { - boolean result = false; - Iterator v = iterator(); - while (v.hasNext()) { - if (!c.contains(v.next())) { - v.remove(); - result = true; - } - } - return result; - } - - @Override - public int size() { - return map.size(); - } - - } - - // Private implementation of Map.Entry for FacetsMapEntrySet - private static class FacetsMapEntrySetEntry implements Map.Entry { - - public FacetsMapEntrySetEntry(FacetsMap map, String key) { - this.map = map; - this.key = key; - } - - private FacetsMap map; - private String key; - - @Override - public boolean equals(Object o) { - if (o == null) { - return false; - } - if (!(o instanceof Map.Entry)) { - return false; - } - Map.Entry e = (Map.Entry) o; - if (key == null) { - if (e.getKey() != null) { - return false; - } - } else { - if (!key.equals(e.getKey())) { - return false; - } - } - UIComponent v = map.get(key); - if (v == null) { - if (e.getValue() != null) { - return false; - } - } else { - if (!v.equals(e.getValue())) { - return false; - } - } - return true; - } - - @Override - public String getKey() { - return key; - } - - @Override - public UIComponent getValue() { - return map.get(key); - } - - @Override - public int hashCode() { - Object value = map.get(key); - return (key == null ? 0 : key.hashCode()) ^ (value == null ? 0 : value.hashCode()); - } - - @Override - public UIComponent setValue(UIComponent value) { - UIComponent previous = map.get(key); - map.put(key, value); - return previous; - } - - } - - // Private implementation of Set for FacetsMap.getEntrySet().iterator() - private static class FacetsMapEntrySetIterator implements Iterator> { - - public FacetsMapEntrySetIterator(FacetsMap map) { - this.map = map; - iterator = map.keySetIterator(); - } - - private FacetsMap map = null; - private Iterator iterator = null; - private Map.Entry last = null; - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public Map.Entry next() { - last = new FacetsMapEntrySetEntry(map, iterator.next()); - return last; - } - - @Override - public void remove() { - if (last == null) { - throw new IllegalStateException(); - } - map.remove(((Map.Entry) last).getKey()); - last = null; - } - - } - - // Private implementation of Set for FacetsMap.getKeySet() - private static class FacetsMapKeySet extends AbstractSet { - - public FacetsMapKeySet(FacetsMap map) { - this.map = map; - } - - private FacetsMap map = null; - - @Override - public boolean add(String o) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean addAll(Collection c) { - throw new UnsupportedOperationException(); - } - - @Override - public void clear() { - map.clear(); - } - - @Override - public boolean contains(Object o) { - return map.containsKey(o); - } - - @Override - public boolean containsAll(Collection c) { - for (Object item : c) { - if (!map.containsKey(item)) { - return false; - } - } - return true; - } - - @Override - public boolean isEmpty() { - return map.isEmpty(); - } - - @Override - public Iterator iterator() { - return new FacetsMapKeySetIterator(map); - } - - @Override - public boolean remove(Object o) { - if (map.containsKey(o)) { - map.remove(o); - return true; - } else { - return false; - } - } - - @Override - public boolean removeAll(Collection c) { - boolean result = false; - for (Object item : c) { - if (map.containsKey(item)) { - map.remove(item); - result = true; - } - } - return result; - } - - @Override - public boolean retainAll(Collection c) { - boolean result = false; - Iterator v = iterator(); - while (v.hasNext()) { - if (!c.contains(v.next())) { - v.remove(); - result = true; - } - } - return result; - } - - @Override - public int size() { - return map.size(); - } - - } - - // Private implementation of Set for FacetsMap.getKeySet().iterator() - private static class FacetsMapKeySetIterator implements Iterator { - - public FacetsMapKeySetIterator(FacetsMap map) { - this.map = map; - iterator = map.keySetIterator(); - } - - private FacetsMap map = null; - private Iterator iterator = null; - private String last = null; - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public String next() { - last = iterator.next(); - return last; - } - - @Override - public void remove() { - if (last == null) { - throw new IllegalStateException(); - } - map.remove(last); - last = null; - } - - } - - // Private implementation of Collection for FacetsMap.values() - private static class FacetsMapValues extends AbstractCollection { - - public FacetsMapValues(FacetsMap map) { - this.map = map; - } - - private FacetsMap map; - - @Override - public boolean add(UIComponent o) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean addAll(Collection c) { - throw new UnsupportedOperationException(); - } - - @Override - public void clear() { - map.clear(); - } - - @Override - public boolean isEmpty() { - return map.isEmpty(); - } - - @Override - public Iterator iterator() { - return new FacetsMapValuesIterator(map); - } - - @Override - public int size() { - return map.size(); - } - - } - - // Private implementation of Iterator for FacetsMap.values().iterator() - private static class FacetsMapValuesIterator implements Iterator { - - public FacetsMapValuesIterator(FacetsMap map) { - this.map = map; - iterator = map.keySetIterator(); - } - - private FacetsMap map = null; - private Iterator iterator = null; - private Object last = null; - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public UIComponent next() { - last = iterator.next(); - return map.get(last); - } - - @Override - public void remove() { - if (last == null) { - throw new IllegalStateException(); - } - map.remove(last); - last = null; - } - - } - - // Private static member class that provide access to Behaviors. - // Note that this Map must be unmodifiable to the external world, - // but UIComponentBase itself needs to be able to write to the Map. - // We solve these requirements wrapping the underlying modifiable - // Map inside of a unmodifiable map and providing private access to - // the underlying (modifable) Map - private static class BehaviorsMap extends AbstractMap> { - private Map> unmodifiableMap; - private Map> modifiableMap; - - private BehaviorsMap(Map> modifiableMap) { - this.modifiableMap = modifiableMap; - unmodifiableMap = Collections.unmodifiableMap(modifiableMap); - } - - @Override - public Set>> entrySet() { - return unmodifiableMap.entrySet(); - } - - private Map> getModifiableMap() { - return modifiableMap; - } - } - - private static class PassThroughAttributesMap extends ConcurrentHashMap implements Serializable { - - private static final long serialVersionUID = 4230540513272170861L; - - @Override - public Object put(String key, Object value) { - if (null == key || null == value) { - throw new NullPointerException(); - } - validateKey(key); - return super.put(key, value); - } - - @Override - public Object putIfAbsent(String key, Object value) { - if (null == key || null == value) { - throw new NullPointerException(); - } - validateKey(key); - return super.putIfAbsent(key, value); - } - - private void validateKey(Object key) { - if (!(key instanceof String) || key instanceof ValueExpression || !(key instanceof Serializable)) { - throw new IllegalArgumentException(); - } - } - - } - - @SuppressWarnings("unchecked") - private void populateDescriptorsMapIfNecessary() { - FacesContext facesContext = FacesContext.getCurrentInstance(); - Class clazz = getClass(); - - /* - * If we can find a valid FacesContext we are going to use it to get access to the property descriptor map. - */ - if (facesContext != null && facesContext.getExternalContext() != null && facesContext.getExternalContext().getApplicationMap() != null) { - - Map applicationMap = facesContext.getExternalContext().getApplicationMap(); - - if (!applicationMap.containsKey("com.sun.faces.compnent.COMPONENT_DESCRIPTORS_MAP")) { - applicationMap.put("com.sun.faces.compnent.COMPONENT_DESCRIPTORS_MAP", new ConcurrentHashMap<>()); - } - - descriptors = (Map, Map>) applicationMap.get("com.sun.faces.compnent.COMPONENT_DESCRIPTORS_MAP"); - propertyDescriptorMap = descriptors.get(clazz); - } - - if (propertyDescriptorMap == null) { - - // We did not find the property descriptor map so we are now going to load it. - - PropertyDescriptor propertyDescriptors[] = getPropertyDescriptors(); - if (propertyDescriptors != null) { - propertyDescriptorMap = new HashMap<>(propertyDescriptors.length, 1.0f); - for (PropertyDescriptor propertyDescriptor : propertyDescriptors) { - propertyDescriptorMap.put(propertyDescriptor.getName(), propertyDescriptor); - } - - if (LOGGER.isLoggable(FINE)) { - LOGGER.log(FINE, "fine.component.populating_descriptor_map", new Object[] { clazz, currentThread().getName() }); - } - - if (descriptors != null && !descriptors.containsKey(clazz)) { - descriptors.put(clazz, propertyDescriptorMap); - } - } - } - } - - /** - *

      - * Return an array of PropertyDescriptors for this {@link UIComponent}'s implementation class. If no - * descriptors can be identified, a zero-length array will be returned. - *

      - * - * @throws FacesException if an introspection exception occurs - */ - private PropertyDescriptor[] getPropertyDescriptors() { - try { - return getBeanInfo(getClass()).getPropertyDescriptors(); - } catch (IntrospectionException e) { - throw new FacesException(e); - } - } - - private String addParentId(FacesContext context, String parentId, String childId) { - return new StringBuilder(parentId.length() + 1 + childId.length()).append(parentId).append(UINamingContainer.getSeparatorChar(context)).append(childId) - .toString(); - } - - private String getParentId(FacesContext context, UIComponent parent) { - if (parent == null) { - return null; - } - - return parent.getContainerClientId(context); - } - - private String generateId(FacesContext context, UIComponent namingContainerAncestor) { - if (namingContainerAncestor instanceof UniqueIdVendor) { - return ((UniqueIdVendor) namingContainerAncestor).createUniqueId(context, null); - } - - return context.getViewRoot().createUniqueId(); - } - - private UIComponent getNamingContainerAncestor() { - UIComponent namingContainer = getParent(); - while (namingContainer != null) { - if (namingContainer instanceof NamingContainer) { - return namingContainer; - } - namingContainer = namingContainer.getParent(); - } - - return null; - } - - /** - *

      - * If the specified {@link UIComponent} has a non-null parent, remove it as a child or facet (as appropriate) of that - * parent. As a result, the parent property will always be null when this method returns. - *

      - * - * @param component {@link UIComponent} to have any parent erased - */ - private static void eraseParent(UIComponent component) { - - UIComponent parent = component.getParent(); - if (parent == null) { - return; - } - - if (parent.getChildCount() > 0) { - List children = parent.getChildren(); - int index = children.indexOf(component); - if (index >= 0) { - children.remove(index); - return; - } - } - - if (parent.getFacetCount() > 0) { - Map facets = parent.getFacets(); - Iterator> entries = facets.entrySet().iterator(); - - while (entries.hasNext()) { - Map.Entry entry = entries.next(); - // noinspection ObjectEquality - if (entry.getValue() == component) { - entries.remove(); - return; - } - } - } - - // Throw an exception for the "cannot happen" case - throw new IllegalStateException("Parent was not null, " + "but this component not related"); - } - - /** - *

      - * Throw IllegalArgumentException if the specified component identifier is non-null and not - * syntactically valid. - *

      - * - * @param id The component identifier to test - */ - private static void validateId(String id) { - - if (id == null) { - return; - } - - int idLength = id.length(); - if (idLength < 1) { - throw new IllegalArgumentException("Empty id attribute is not allowed"); - } - - for (int i = 0; i < idLength; i++) { - char c = id.charAt(i); - if (i == 0) { - if (!isLetter(c) && c != '_') { - throw new IllegalArgumentException(id); - } - } else { - if (!isLetter(c) && !isDigit(c) && c != '-' && c != '_') { - throw new IllegalArgumentException(id); - } - } - } - } - - private UIComponent findBaseComponent(String expression, final char sepChar) { - // Identify the base component from which we will perform our search - UIComponent base = this; - - if (expression.charAt(0) == sepChar) { - - // Absolute searches start at the root of the tree - while (base.getParent() != null) { - base = base.getParent(); - } - - // Treat remainder of the expression as relative - expression = expression.substring(1); - } else if (!(base instanceof NamingContainer)) { - - // Relative expressions start at the closest NamingContainer or root - while (base.getParent() != null) { - if (base instanceof NamingContainer) { - break; - } - base = base.getParent(); - } - } - - return base; - } - - private UIComponent evaluateSearchExpression(UIComponent base, String expression, final String SEPARATOR_STRING) { - UIComponent result = null; - - String[] segments = expression.split(SEPARATOR_STRING); - for (int i = 0, length = segments.length - 1; i < segments.length; i++, length--) { - result = findComponent(base, segments[i], i == 0); - - // the first element of the expression may match base.id - // (vs. a child if of base) - if (i == 0 && result == null && segments[i].equals(base.getId())) { - result = base; - } - - if (result != null && !(result instanceof NamingContainer) && length > 0) { - throw new IllegalArgumentException(segments[i]); - } - - if (result == null) { - break; - } - - base = result; - } - - return result; - } - - /** - *

      - * Return the {@link UIComponent} (if any) with the specified id, searching recursively starting at the - * specified base, and examining the base component itself, followed by examining all the base component's - * facets and children (unless the base component is a {@link NamingContainer}, in which case the recursive scan is - * skipped. - *

      - * - * @param base Base {@link UIComponent} from which to search - * @param id Component identifier to be matched - */ - private static UIComponent findComponent(UIComponent base, String id, boolean checkId) { - - if (checkId && id.equals(base.getId())) { - return base; - } - - // Search through our facets and children - UIComponent component = null; - for (Iterator i = base.getFacetsAndChildren(); i.hasNext();) { - UIComponent kid = i.next(); - if (!(kid instanceof NamingContainer)) { - if (checkId && id.equals(kid.getId())) { - component = kid; - break; - } - - component = findComponent(kid, id, true); - - if (component != null) { - break; - } - } else if (id.equals(kid.getId())) { - component = kid; - break; - } - } - - return component; - } - - private List collectChildState(FacesContext context, List stateList) { - if (getChildCount() > 0) { - Iterator kids = getChildren().iterator(); - while (kids.hasNext()) { - UIComponent kid = kids.next(); - if (!kid.isTransient()) { - stateList.add(kid.processSaveState(context)); - } - } - } - - return stateList; - } - - private List collectFacetsState(FacesContext context, List stateList) { - if (getFacetCount() > 0) { - Iterator> myFacets = getFacets().entrySet().iterator(); - - while (myFacets.hasNext()) { - Map.Entry entry = myFacets.next(); - UIComponent facet = entry.getValue(); - if (!facet.isTransient()) { - Object facetState = facet.processSaveState(context); - Object[] facetSaveState = new Object[2]; - facetSaveState[0] = entry.getKey(); - facetSaveState[1] = facetState; - stateList.add(facetSaveState); - } - } - } - - return stateList; - } - - private int restoreChildState(FacesContext context, Object[] childState) { - int i = 0; - - // Process all the children of this component - if (getChildCount() > 0) { - for (UIComponent kid : getChildren()) { - if (kid.isTransient()) { - continue; - } - - if (i >= childState.length) { - continue; - } - - Object currentState = childState[i++]; - - if (currentState == null) { - continue; - } - - kid.processRestoreState(context, currentState); - } - } - - return i; - } - - private void restoreFacetsState(FacesContext context, Object[] childState, int i) { - if (getFacetCount() > 0) { - - int j = 0; - int facetsSize = getFacets().size(); - - while (j < facetsSize) { - - if (i >= childState.length) { - break; - } - - Object[] facetSaveState = (Object[]) childState[i++]; - - if (facetSaveState != null) { - String facetName = (String) facetSaveState[0]; - Object facetState = facetSaveState[1]; - UIComponent facet = getFacets().get(facetName); - facet.processRestoreState(context, facetState); - } - - ++j; - } - } - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UIData.java b/impl/src/main/java/jakarta/faces/component/UIData.java deleted file mode 100644 index 8be5506c63..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIData.java +++ /dev/null @@ -1,2409 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import static com.sun.faces.util.Util.extractFirstNumericSegment; -import static com.sun.faces.util.Util.isNestedInIterator; - -import java.io.IOException; -import java.io.Serializable; -import java.sql.ResultSet; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import jakarta.el.ValueExpression; -import jakarta.enterprise.inject.spi.Bean; -import jakarta.enterprise.inject.spi.BeanManager; -import jakarta.enterprise.inject.spi.CDI; -import jakarta.enterprise.util.AnnotationLiteral; -import jakarta.faces.FacesException; -import jakarta.faces.application.Application; -import jakarta.faces.application.FacesMessage; -import jakarta.faces.application.StateManager; -import jakarta.faces.component.visit.VisitCallback; -import jakarta.faces.component.visit.VisitContext; -import jakarta.faces.component.visit.VisitHint; -import jakarta.faces.component.visit.VisitResult; -import jakarta.faces.context.FacesContext; -import jakarta.faces.event.AbortProcessingException; -import jakarta.faces.event.FacesEvent; -import jakarta.faces.event.FacesListener; -import jakarta.faces.event.PhaseId; -import jakarta.faces.event.PostValidateEvent; -import jakarta.faces.event.PreValidateEvent; -import jakarta.faces.model.ArrayDataModel; -import jakarta.faces.model.CollectionDataModel; -import jakarta.faces.model.DataModel; -import jakarta.faces.model.FacesDataModel; -import jakarta.faces.model.IterableDataModel; -import jakarta.faces.model.ListDataModel; -import jakarta.faces.model.ResultSetDataModel; -import jakarta.faces.model.ScalarDataModel; - -// ------------------------------------------------------------- Private Classes -// Private class to represent saved state information - -/** - *

      - * UIData is a - * {@link UIComponent} that supports data binding to a collection of data objects represented by a {@link DataModel} - * instance, which is the current value of this component itself (typically established via a {@link ValueExpression}). - * During iterative processing over the rows of data in the data model, the object for the current row is exposed as a - * request attribute under the key specified by the var property. - *

      - *

      - * Only children of type {@link UIColumn} should be processed by renderers associated with this component. - *

      - *

      - * By default, the rendererType property is set to jakarta.faces.Table. This value can be - * changed by calling the setRendererType() method. - *

      - */ - -public class UIData extends UIComponentBase implements NamingContainer, UniqueIdVendor { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.Data"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.Data"; - - // --------------------------------------------------------------- Constants - - private static final ListDataModel EMPTY_DATA_MODEL = new ListDataModel(Collections.emptyList()); - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UIData} instance with default property values. - *

      - */ - public UIData() { - - super(); - setRendererType("jakarta.faces.Table"); - - } - - // ------------------------------------------------------ Instance Variables - - /** - * Properties that are tracked by state saving. - */ - enum PropertyKeys { - /** - *

      - * The first row number (zero-relative) to be displayed. - *

      - */ - first, - - /** - *

      - * The zero-relative index of the current row number, or -1 for no current row association. - *

      - */ - rowIndex, - - /** - *

      - * The number of rows to display, or zero for all remaining rows in the table. - *

      - */ - rows, - - /** - *

      - * This map contains SavedState instances for each descendant component, keyed by the client identifier of - * the descendant. Because descendant client identifiers will contain the rowIndex value of the parent, - * per-row state information is actually preserved. - *

      - */ - saved, - - /** - *

      - * The local value of this {@link UIComponent}. - *

      - */ - value, - - /** - *

      - * The request scope attribute under which the data object for the current row will be exposed when iterating. - *

      - */ - var, - - /** - *

      - * Last id vended by {@link UIData#createUniqueId(jakarta.faces.context.FacesContext, String)}. - *

      - */ - lastId, - - /** - * - */ - rowStatePreserved - } - - /** - *

      - * The {@link DataModel} associated with this component, lazily instantiated if requested. This object is not part of - * the saved and restored state of the component. - *

      - */ - private DataModel model = null; - - /** - *

      - * During iteration through the rows of this table, This ivar is used to store the previous "var" value for this - * instance. When the row iteration is complete, this value is restored to the request map. - */ - private Object oldVar; - - /** - *

      - * Holds the base client ID that will be used to generate per-row client IDs (this will be null if this UIData is nested - * within another). - *

      - * - *

      - * This is not part of the component state. - *

      - */ - private String baseClientId = null; - - /** - *

      - * Length of the cached baseClientId plus one for the {@link UINamingContainer#getSeparatorChar}. - *

      - * - *

      - * This is not part of the component state. - *

      - */ - private int baseClientIdLength; - - /** - *

      - * StringBuilder used to build per-row client IDs. - *

      - * - *

      - * This is not part of the component state. - *

      - */ - private StringBuilder clientIdBuilder = null; - - /** - *

      - * Flag indicating whether or not this UIData instance is nested within another UIData instance - *

      - * - *

      - * This is not part of the component state. - *

      - */ - private Boolean isNested = null; - - private Map _rowDeltaStates = new HashMap<>(); - private Map _rowTransientStates = new HashMap<>(); - - private Object _initialDescendantFullComponentState = null; - - // -------------------------------------------------------------- Properties - - @Override - public String getFamily() { - - return COMPONENT_FAMILY; - - } - - /** - *

      - * Return the zero-relative row number of the first row to be displayed. - *

      - * - * @return the row number. - */ - public int getFirst() { - - return (Integer) getStateHelper().eval(PropertyKeys.first, 0); - - } - - /** - *

      - * Set the zero-relative row number of the first row to be displayed. - *

      - * - * @param first New first row number - * - * @throws IllegalArgumentException if first is negative - */ - public void setFirst(int first) { - - if (first < 0) { - throw new IllegalArgumentException(String.valueOf(first)); - } - getStateHelper().put(PropertyKeys.first, first); - - } - - /** - *

      - * Return the footer facet of this component (if any). A convenience method for getFacet("footer"). - *

      - * - * @return the footer facet. - */ - public UIComponent getFooter() { - - return getFacet("footer"); - - } - - /** - *

      - * Set the footer facet of this component. A convenience method for getFacets().put("footer", footer). - *

      - * - * @param footer the new footer facet - * - * @throws NullPointerException if footer is null - */ - public void setFooter(UIComponent footer) { - - getFacets().put("footer", footer); - - } - - /** - *

      - * Return the header facet of this component (if any). A convenience method for getFacet("header"). - *

      - * - * @return the header facet. - */ - public UIComponent getHeader() { - - return getFacet("header"); - - } - - /** - *

      - * Set the header facet of this component. A convenience method for getFacets().put("header", header). - *

      - * - * @param header the new header facet - * - * @throws NullPointerException if header is null - */ - public void setHeader(UIComponent header) { - - getFacets().put("header", header); - - } - - /** - *

      - * Return a flag indicating whether there is rowData available at the current rowIndex. If no - * wrappedData is available, return false. - *

      - * - * @return whether the row is available. - * - * @throws FacesException if an error occurs getting the row availability - */ - public boolean isRowAvailable() { - - return getDataModel().isRowAvailable(); - - } - - /** - *

      - * Return the number of rows in the underlying data model. If the number of available rows is unknown, return -1. - *

      - * - * @return the row count. - * @throws FacesException if an error occurs getting the row count - */ - public int getRowCount() { - - return getDataModel().getRowCount(); - - } - - /** - *

      - * Return the data object representing the data for the currently selected row index, if any. - *

      - * - * @return the row data. - * - * @throws FacesException if an error occurs getting the row data - * @throws IllegalArgumentException if now row data is available at the currently specified row index - */ - public Object getRowData() { - - return getDataModel().getRowData(); - - } - - /** - *

      - * Return the zero-relative index of the currently selected row. If we are not currently positioned on a row, return -1. - * This property is not enabled for value binding expressions. - *

      - * - * @return the row index. - * - * @throws FacesException if an error occurs getting the row index - */ - public int getRowIndex() { - - return (Integer) getStateHelper().eval(PropertyKeys.rowIndex, -1); - - } - - /** - *

      - * Set the zero relative index of the current row, or -1 to indicate that no - * row is currently selected, by implementing the following algorithm. It is possible to set the row index at a value - * for which the underlying data collection does not contain any row data. Therefore, callers may use the - * isRowAvailable() method to detect whether row data will be available for use by the - * getRowData() method. - *

      - * - *

      - * To support transient state among descendents, please consult the specification for {@link #setRowStatePreserved}, - * which details the requirements for setRowIndex() when the rowStatePreserved JavaBeans - * property is set to true. - *

      - * - *
        - *
      • Save current state information for all descendant components (as described below). - *
      • Store the new row index, and pass it on to the {@link DataModel} associated with this {@link UIData} - * instance.
      • - *
      • If the new rowIndex value is -1: - *
          - *
        • If the var property is not null, remove the corresponding request scope attribute (if any).
        • - *
        • Reset the state information for all descendant components (as described below).
        • - *
        - *
      • - *
      • If the new rowIndex value is not -1: - *
          - *
        • If the var property is not null, call getRowData() and expose the resulting data object - * as a request scope attribute whose key is the var property value.
        • - *
        • Reset the state information for all descendant components (as described below). - *
        - *
      • - *
      - * - *

      - * To save current state information for all descendant components, {@link UIData} must maintain per-row information for - * each descendant as follows: - *

      - *
        - *
      • If the descendant is an instance of EditableValueHolder, save the state of its - * localValue property.
      • - *
      • If the descendant is an instance of EditableValueHolder, save the state of the - * localValueSet property.
      • - *
      • If the descendant is an instance of EditableValueHolder, save the state of the valid - * property.
      • - *
      • If the descendant is an instance of EditableValueHolder, save the state of the - * submittedValue property.
      • - *
      - * - *

      - * To restore current state information for all descendant components, {@link UIData} must reference its previously - * stored information for the current rowIndex and call setters for each descendant as follows: - *

      - *
        - *
      • If the descendant is an instance of EditableValueHolder, restore the value - * property.
      • - *
      • If the descendant is an instance of EditableValueHolder, restore the state of the - * localValueSet property.
      • - *
      • If the descendant is an instance of EditableValueHolder, restore the state of the valid - * property.
      • - *
      • If the descendant is an instance of EditableValueHolder, restore the state of the - * submittedValue property.
      • - *
      - * - * @param rowIndex The new row index value, or -1 for no associated row - * - * @throws FacesException if an error occurs setting the row index - * @throws IllegalArgumentException if rowIndex is less than -1 - */ - public void setRowIndex(int rowIndex) { - if (isRowStatePreserved()) { - setRowIndexRowStatePreserved(rowIndex); - } else { - setRowIndexWithoutRowStatePreserved(rowIndex); - } - } - - private void setRowIndexWithoutRowStatePreserved(int rowIndex) { - // Save current state for the previous row index - saveDescendantState(); - - // Update to the new row index - // this.rowIndex = rowIndex; - getStateHelper().put(PropertyKeys.rowIndex, rowIndex); - DataModel localModel = getDataModel(); - localModel.setRowIndex(rowIndex); - - // if rowIndex is -1, clear the cache - if (rowIndex == -1) { - setDataModel(null); - } - - // Clear or expose the current row data as a request scope attribute - String var = (String) getStateHelper().get(PropertyKeys.var); - if (var != null) { - Map requestMap = getFacesContext().getExternalContext().getRequestMap(); - if (rowIndex == -1) { - oldVar = requestMap.remove(var); - } else if (isRowAvailable()) { - requestMap.put(var, getRowData()); - } else { - requestMap.remove(var); - if (null != oldVar) { - requestMap.put(var, oldVar); - oldVar = null; - } - } - } - - // Reset current state information for the new row index - restoreDescendantState(); - - } - - private void setRowIndexRowStatePreserved(int rowIndex) { - if (rowIndex < -1) { - throw new IllegalArgumentException("rowIndex is less than -1"); - } - - if (getRowIndex() == rowIndex) { - return; - } - - FacesContext facesContext = getFacesContext(); - - if (_initialDescendantFullComponentState != null) { - // Just save the row - Map sm = saveFullDescendantComponentStates(facesContext, null, getChildren().iterator(), false); - if (sm != null && !sm.isEmpty()) { - _rowDeltaStates.put(getContainerClientId(facesContext), sm); - } - if (getRowIndex() != -1) { - _rowTransientStates.put(getContainerClientId(facesContext), - saveTransientDescendantComponentStates(facesContext, null, getChildren().iterator(), false)); - } - } - - // Update to the new row index - // this.rowIndex = rowIndex; - getStateHelper().put(PropertyKeys.rowIndex, rowIndex); - DataModel localModel = getDataModel(); - localModel.setRowIndex(rowIndex); - - // if rowIndex is -1, clear the cache - if (rowIndex == -1) { - setDataModel(null); - } - - // Clear or expose the current row data as a request scope attribute - String var = (String) getStateHelper().get(PropertyKeys.var); - if (var != null) { - Map requestMap = getFacesContext().getExternalContext().getRequestMap(); - if (rowIndex == -1) { - oldVar = requestMap.remove(var); - } else if (isRowAvailable()) { - requestMap.put(var, getRowData()); - } else { - requestMap.remove(var); - if (null != oldVar) { - requestMap.put(var, oldVar); - oldVar = null; - } - } - } - - if (_initialDescendantFullComponentState != null) { - Object rowState = _rowDeltaStates.get(getContainerClientId(facesContext)); - if (rowState == null) { - // Restore as original - restoreFullDescendantComponentStates(facesContext, getChildren().iterator(), _initialDescendantFullComponentState, false); - } else { - // Restore first original and then delta - restoreFullDescendantComponentDeltaStates(facesContext, getChildren().iterator(), rowState, _initialDescendantFullComponentState, false); - } - if (getRowIndex() == -1) { - restoreTransientDescendantComponentStates(facesContext, getChildren().iterator(), null, false); - } else { - rowState = _rowTransientStates.get(getContainerClientId(facesContext)); - if (rowState == null) { - restoreTransientDescendantComponentStates(facesContext, getChildren().iterator(), null, false); - } else { - restoreTransientDescendantComponentStates(facesContext, getChildren().iterator(), (Map) rowState, false); - } - } - } - } - - /** - *

      - * Return the number of rows to be displayed, or zero for all remaining rows in the table. The default value of this - * property is zero. - *

      - * - * @return the number of rows. - */ - public int getRows() { - - return (Integer) getStateHelper().eval(PropertyKeys.rows, 0); - - } - - /** - *

      - * Set the number of rows to be displayed, or zero for all remaining rows in the table. - *

      - * - * @param rows New number of rows - * - * @throws IllegalArgumentException if rows is negative - */ - public void setRows(int rows) { - - if (rows < 0) { - throw new IllegalArgumentException(String.valueOf(rows)); - } - getStateHelper().put(PropertyKeys.rows, rows); - - } - - /** - *

      - * Return the request-scope attribute under which the data object for the current row will be exposed when iterating. - * This property is not enabled for value binding expressions. - *

      - * - * @return he request-scope attribute. - */ - public String getVar() { - - return (String) getStateHelper().get(PropertyKeys.var); - - } - - /** - *

      - * Set the request-scope attribute under which the data object for the current row wil be exposed when iterating. - *

      - * - * @param var The new request-scope attribute name - */ - public void setVar(String var) { - - getStateHelper().put(PropertyKeys.var, var); - - } - - /** - *

      - * Return the value of the rowStatePreserved JavaBeans property. See {@link #setRowStatePreserved}. - *

      - * - * @return the value of the rowStatePreserved. - * - * @since 2.1 - */ - - public boolean isRowStatePreserved() { - Boolean b = (Boolean) getStateHelper().get(PropertyKeys.rowStatePreserved); - return b != null && b.booleanValue(); - } - - /** - *

      - * If this property is set to true, the UIData must take steps to ensure that modifications to - * its iterated children will be preserved on a per-row basis. This allows applications to modify component properties, - * such as the style-class, for a specific row, rather than having such modifications apply to all rows. - *

      - * - *
      - * - *

      - * To accomplish this, UIData must call {@link StateHolder#saveState} and - * {@link TransientStateHolder#saveTransientState} on its children to capture their state on exiting each row. When - * re-entering the row, {@link StateHolder#restoreState} and {@link TransientStateHolder#restoreTransientState} must be - * called in order to reinitialize the children to the correct state for the new row. All of this action must take place - * during the processing of {@link #setRowIndex}. - *

      - * - *

      - * Users should consider enabling this feature for cases where it is necessary to modify properties of - * UIData's children in a row-specific way. Note, however, that row-level state saving/restoring does add - * overhead. As such, this feature should be used judiciously. - *

      - * - *
      - * - * @param preserveComponentState the flag if the state should be preserved. - * - * @since 2.1 - */ - - public void setRowStatePreserved(boolean preserveComponentState) { - getStateHelper().put(PropertyKeys.rowStatePreserved, preserveComponentState); - } - - // ----------------------------------------------------- StateHolder Methods - - /** - *

      - * Return the value of the UIData. This value must either be be of type - * {@link DataModel}, or a type that can be adapted into a {@link DataModel}. UIData will automatically - * adapt the following types: - *

      - *
        - *
      • Arrays
      • - *
      • java.util.List
      • - *
      • java.sql.ResultSet
      • - *
      • java.util.Collection
      • - *
      - *

      - * All other types will be adapted using the {@link ScalarDataModel} class, which will treat the object as a single row - * of data. - *

      - * - * @return the object for the value. - */ - public Object getValue() { - return getStateHelper().eval(PropertyKeys.value); - } - - /** - *

      - * Set the value of the UIData. This value must either be be of type {@link DataModel}, or a type that can - * be adapted into a {@link DataModel}. - *

      - * - * @param value the new value - */ - public void setValue(Object value) { - setDataModel(null); - getStateHelper().put(PropertyKeys.value, value); - } - - // ----------------------------------------------------- UIComponent Methods - - - /** - *

      - * Set the {@link ValueExpression} used to calculate the value for the specified attribute or property name, if any. In - * addition, if a {@link ValueExpression} is set for the value property, remove any synthesized - * {@link DataModel} for the data previously bound to this component. - *

      - * - * @param name Name of the attribute or property for which to set a {@link ValueExpression} - * @param binding The {@link ValueExpression} to set, or null to remove any currently set - * {@link ValueExpression} - * - * @throws IllegalArgumentException if name is one of id, parent, - * var, or rowIndex - * @throws NullPointerException if name is null - * @since 1.2 - */ - @Override - public void setValueExpression(String name, ValueExpression binding) { - - if (null != name) { - switch (name) { - case "value": - model = null; - break; - case "var": - case "rowIndex": - throw new IllegalArgumentException(); - } - } - super.setValueExpression(name, binding); - - } - - /** - *

      - * Return a client identifier for this component that includes the current value of the rowIndex property, - * if it is not set to -1. This implies that multiple calls to getClientId() may return different results, - * but ensures that child components can themselves generate row-specific client identifiers (since {@link UIData} is a - * {@link NamingContainer}). - *

      - * - * @throws NullPointerException if context is null - */ - @Override - public String getClientId(FacesContext context) { - - if (context == null) { - throw new NullPointerException(); - } - - // If baseClientId and clientIdBuilder are both null, this is the - // first time that getClientId() has been called. - // If we're not nested within another UIData, then: - // - create a new StringBuilder assigned to clientIdBuilder containing - // our client ID. - // - toString() the builder - this result will be our baseClientId - // for the duration of the component - // - append UINamingContainer.getSeparatorChar() to the builder - // If we are nested within another UIData, then: - // - create an empty StringBuilder that will be used to build - // this instance's ID - if (baseClientId == null && clientIdBuilder == null) { - if (!isNestedWithinIterator(context)) { - clientIdBuilder = new StringBuilder(super.getClientId(context)); - baseClientId = clientIdBuilder.toString(); - baseClientIdLength = baseClientId.length() + 1; - clientIdBuilder.append(UINamingContainer.getSeparatorChar(context)); - clientIdBuilder.setLength(baseClientIdLength); - } else { - clientIdBuilder = new StringBuilder(); - } - } - int rowIndex = getRowIndex(); - if (rowIndex >= 0) { - String cid; - if (!isNestedWithinIterator(context)) { - // we're not nested, so the clientIdBuilder is already - // primed with clientID + - // UINamingContainer.getSeparatorChar(). Append the - // current rowIndex, and toString() the builder. reset - // the builder to it's primed state. - cid = clientIdBuilder.append(rowIndex).toString(); - clientIdBuilder.setLength(baseClientIdLength); - } else { - // we're nested, so we have to build the ID from scratch - // each time. Reuse the same clientIdBuilder instance - // for each call by resetting the length to 0 after - // the ID has been computed. - cid = clientIdBuilder.append(super.getClientId(context)).append(UINamingContainer.getSeparatorChar(context)).append(rowIndex).toString(); - clientIdBuilder.setLength(0); - } - return cid; - } else { - if (!isNestedWithinIterator(context)) { - // Not nested and no row available, so just return our baseClientId - return baseClientId; - } else { - // nested and no row available, return the result of getClientId(). - // this is necessary as the client ID will reflect the row that - // this table represents - return super.getClientId(context); - } - } - - } - - /** - *

      - * Override behavior from {@link UIComponentBase#invokeOnComponent} to provide special care for positioning the data - * properly before finding the component and invoking the callback on it. If the argument clientId is equal - * to this.getClientId() simply invoke the contextCallback, passing the context - * argument and this as arguments, and return true. If the argument clientId is not - * equal to this.getClientId(), inspect each of the facet children of this UIData instance and - * for each one, compare its clientId with the argument clientId. If there is a match, invoke - * the contextCallback, passing the context argument and this as arguments, and return - * true. Otherwise, attempt to extract a rowIndex from the clientId. For example, if the - * argument clientId was form:data:3:customerHeader the rowIndex would be 3. Let - * this value be called newIndex. The current rowIndex of this instance must be saved aside and restored - * before returning in all cases, regardless of the outcome of the search or if any exceptions are thrown in the - * process. - *

      - * - *

      - * The implementation of this method must never return true if setting the rowIndex of this instance to be - * equal to newIndex causes this instance to return false from {@link #isRowAvailable}. - *

      - * - * @throws NullPointerException {@inheritDoc} - * @throws FacesException {@inheritDoc} Also throws FacesException if any exception is thrown when deriving - * the rowIndex from the argument clientId. - * @since 1.2 - */ - @Override - public boolean invokeOnComponent(FacesContext context, String clientId, ContextCallback callback) throws FacesException { - if (null == context || null == clientId || null == callback) { - throw new NullPointerException(); - } - - String myId = super.getClientId(context); - boolean found = false; - if (clientId.equals(myId)) { - try { - pushComponentToEL(context, compositeParent); - callback.invokeContextCallback(context, this); - return true; - } catch (Exception e) { - throw new FacesException(e); - } finally { - popComponentFromEL(context); - } - } - - // check the facets, if any, of UIData - if (getFacetCount() > 0) { - for (UIComponent c : getFacets().values()) { - if (clientId.equals(c.getClientId(context))) { - callback.invokeContextCallback(context, c); - return true; - } - } - } - - // Check if we are looking for a component that is part of the actual skeleton. - if (getChildCount() > 0) { - for (UIComponent column : getChildren()) { - if (column.invokeOnComponent(context, clientId, callback)) { - return true; - } - - // check column level facets, if any - if (column instanceof UIColumn) { - if (column.getFacetCount() > 0) { - for (UIComponent facet : column.getFacets().values()) { - if (facet.invokeOnComponent(context, clientId, callback)) { - return true; - } - } - } - } - } - } - - int lastSep, newRow, savedRowIndex = getRowIndex(); - char sepChar = UINamingContainer.getSeparatorChar(context); - // If we need to strip out the rowIndex from our id - // PENDING(edburns): is this safe with respect to I18N? - if (myId.endsWith(sepChar + Integer.toString(savedRowIndex, 10))) { - lastSep = myId.lastIndexOf(sepChar); - assert -1 != lastSep; - myId = myId.substring(0, lastSep); - } - - // myId will be something like form:outerData for a non-nested table, - // and form:outerData:3:data for a nested table. - // clientId will be something like form:outerData:3:outerColumn - // for a non-nested table. clientId will be something like - // outerData:3:data:3:input for a nested table. - // We need to find the first occurring client ID segment which is parseable as a number. - if (clientId.startsWith(myId)) { - try { - try { - newRow = extractFirstNumericSegment(clientId.substring(myId.length()), sepChar); - } catch (NumberFormatException ex) { - // PENDING(edburns): I18N - String message = "Trying to extract rowIndex from clientId \'" + clientId + "\' " + ex.getMessage(); - throw new NumberFormatException(message); - } - setRowIndex(newRow); - if (isRowAvailable()) { - found = super.invokeOnComponent(context, clientId, callback); - } - } catch (FacesException fe) { - throw fe; - } catch (NumberFormatException e) { - throw new FacesException(e); - } finally { - setRowIndex(savedRowIndex); - } - } - return found; - } - - /** - *

      - * Override the default {@link UIComponentBase#queueEvent} processing to wrap any queued events in a wrapper so that we - * can reset the current row index in broadcast(). - *

      - * - * @param event {@link FacesEvent} to be queued - * - * @throws IllegalStateException if this component is not a descendant of a {@link UIViewRoot} - * @throws NullPointerException if event is null - */ - @Override - public void queueEvent(FacesEvent event) { - - super.queueEvent(new WrapperEvent(this, event, getRowIndex())); - - } - - /** - *

      - * Override the default {@link UIComponentBase#broadcast} processing to unwrap any wrapped {@link FacesEvent} and reset - * the current row index, before the event is actually broadcast. For events that we did not wrap (in - * queueEvent()), default processing will occur. - *

      - * - * @param event The {@link FacesEvent} to be broadcast - * - * @throws AbortProcessingException Signal the Jakarta Faces implementation that no further processing on the - * current event should be performed - * @throws IllegalArgumentException if the implementation class of this {@link FacesEvent} is not supported by this - * component - * @throws NullPointerException if event is null - */ - @Override - public void broadcast(FacesEvent event) throws AbortProcessingException { - - if (!(event instanceof WrapperEvent)) { - super.broadcast(event); - return; - } - FacesContext context = event.getFacesContext(); - // Set up the correct context and fire our wrapped event - WrapperEvent revent = (WrapperEvent) event; - if (isNestedWithinIterator(context)) { - setDataModel(null); - } - int currentRowIndex = getRowIndex(); - int broadcastedRowIndex = revent.getRowIndex(); - boolean needsToSetIndex = currentRowIndex != -1 || broadcastedRowIndex != -1; // #5213 - - if (needsToSetIndex) { - setRowIndex(broadcastedRowIndex); - } - - FacesEvent rowEvent = revent.getFacesEvent(); - UIComponent source = rowEvent.getComponent(); - UIComponent compositeParent = null; - try { - if (!UIComponent.isCompositeComponent(source)) { - compositeParent = UIComponent.getCompositeComponentParent(source); - } - if (compositeParent != null) { - compositeParent.pushComponentToEL(context, null); - } - source.pushComponentToEL(context, null); - source.broadcast(rowEvent); - } finally { - source.popComponentFromEL(context); - if (compositeParent != null) { - compositeParent.popComponentFromEL(context); - } - } - - if (needsToSetIndex) { - setRowIndex(currentRowIndex); - } - } - - /** - *

      - * In addition to the default behavior, ensure that any saved per-row state for our child input components is discarded - * unless it is needed to rerender the current page with errors. - * - * @param context FacesContext for the current request - * - * @throws IOException if an input/output error occurs while rendering - * @throws NullPointerException if context is null - */ - @Override - public void encodeBegin(FacesContext context) throws IOException { - - preEncode(context); - super.encodeBegin(context); - - } - - /** - *

      - * Override the default {@link UIComponentBase#processDecodes} processing to perform the following steps. - *

      - *
        - *
      • If the rendered property of this {@link UIComponent} is false, skip further - * processing.
      • - *
      • Set the current rowIndex to -1.
      • - *
      • Call the processDecodes() method of all facets of this {@link UIData}, in the order determined by a - * call to getFacets().keySet().iterator().
      • - *
      • Call the processDecodes() method of all facets of the {@link UIColumn} children of this - * {@link UIData}.
      • - *
      • Iterate over the set of rows that were included when this component was rendered (i.e. those defined by the - * first and rows properties), performing the following processing for each row: - *
          - *
        • Set the current rowIndex to the appropriate value for this row.
        • - *
        • If isRowAvailable() returns true, iterate over the children components of each - * {@link UIColumn} child of this {@link UIData} component, calling the processDecodes() method for each - * such child.
        • - *
        - *
      • - *
      • Set the current rowIndex to -1.
      • - *
      • Call the decode() method of this component.
      • - *
      • If a RuntimeException is thrown during decode processing, call {@link FacesContext#renderResponse} - * and re-throw the exception.
      • - *
      - * - * @param context {@link FacesContext} for the current request - * - * @throws NullPointerException if context is null - */ - @Override - public void processDecodes(FacesContext context) { - - if (context == null) { - throw new NullPointerException(); - } - if (!isRendered()) { - return; - } - - pushComponentToEL(context, this); - preDecode(context); - iterate(context, PhaseId.APPLY_REQUEST_VALUES); - decode(context); - popComponentFromEL(context); - - } - - /** - *

      - * Override the default {@link UIComponentBase#processValidators} processing to perform the following steps. - *

      - *
        - *
      • If the rendered property of this {@link UIComponent} is false, skip further - * processing.
      • - *
      • Set the current rowIndex to -1.
      • - *
      • Call the processValidators() method of all facets of this {@link UIData}, in the order determined by - * a call to getFacets().keySet().iterator().
      • - *
      • Call the processValidators() method of all facets of the {@link UIColumn} children of this - * {@link UIData}.
      • - *
      • Iterate over the set of rows that were included when this component was rendered (i.e. those defined by the - * first and rows properties), performing the following processing for each row: - *
          - *
        • Set the current rowIndex to the appropriate value for this row.
        • - *
        • If isRowAvailable() returns true, iterate over the children components of each - * {@link UIColumn} child of this {@link UIData} component, calling the processValidators() method for each - * such child.
        • - *
        - *
      • - *
      • Set the current rowIndex to -1.
      • - *
      - * - * @param context {@link FacesContext} for the current request - * @throws NullPointerException if context is null - * @see jakarta.faces.event.PreValidateEvent - * @see jakarta.faces.event.PostValidateEvent - */ - @Override - public void processValidators(FacesContext context) { - - if (context == null) { - throw new NullPointerException(); - } - if (!isRendered()) { - return; - } - pushComponentToEL(context, this); - Application app = context.getApplication(); - app.publishEvent(context, PreValidateEvent.class, this); - preValidate(context); - iterate(context, PhaseId.PROCESS_VALIDATIONS); - app.publishEvent(context, PostValidateEvent.class, this); - popComponentFromEL(context); - - } - - /** - *

      - * Override the default {@link UIComponentBase#processUpdates} processing to perform the following steps. - *

      - *
        - *
      • If the rendered property of this {@link UIComponent} is false, skip further - * processing.
      • - *
      • Set the current rowIndex to -1.
      • - *
      • Call the processUpdates() method of all facets of this {@link UIData}, in the order determined by a - * call to getFacets().keySet().iterator().
      • - *
      • Call the processUpdates() method of all facets of the {@link UIColumn} children of this - * {@link UIData}.
      • - *
      • Iterate over the set of rows that were included when this component was rendered (i.e. those defined by the - * first and rows properties), performing the following processing for each row: - *
          - *
        • Set the current rowIndex to the appropriate value for this row.
        • - *
        • If isRowAvailable() returns true, iterate over the children components of each - * {@link UIColumn} child of this {@link UIData} component, calling the processUpdates() method for each - * such child.
        • - *
        - *
      • - *
      • Set the current rowIndex to -1.
      • - *
      - * - * @param context {@link FacesContext} for the current request - * - * @throws NullPointerException if context is null - */ - @Override - public void processUpdates(FacesContext context) { - - if (context == null) { - throw new NullPointerException(); - } - if (!isRendered()) { - return; - } - - pushComponentToEL(context, this); - preUpdate(context); - iterate(context, PhaseId.UPDATE_MODEL_VALUES); - popComponentFromEL(context); - // This is not a EditableValueHolder, so no further processing is required - - } - - @Override - public String createUniqueId(FacesContext context, String seed) { - Integer i = (Integer) getStateHelper().get(PropertyKeys.lastId); - int lastId = i != null ? i : 0; - getStateHelper().put(PropertyKeys.lastId, ++lastId); - return UIViewRoot.UNIQUE_ID_PREFIX + (seed == null ? lastId : seed); - } - - /** - *

      - * Override the behavior in {@link UIComponent#visitTree} to handle - * iteration correctly. - *

      - * - *
      - * - *

      - * If the {@link UIComponent#isVisitable} method of this instance returns false, take no action and return. - *

      - * - *

      - * Call {@link UIComponent#pushComponentToEL} and invoke the visit callback on this UIData instance as - * described in {@link UIComponent#visitTree}. Let the result of the invoctaion be visitResult. If - * visitResult is {@link VisitResult#COMPLETE}, take no further action and return true. Otherwise, - * determine if we need to visit our children. The default implementation calls - * {@link VisitContext#getSubtreeIdsToVisit} passing this as the argument. If the result of that call is - * non-empty, let doVisitChildren be true. If doVisitChildren is true and - * visitResult is {@link VisitResult#ACCEPT}, take the following action. - *

      - * - *
        - * - *
      • - *

        - * If this component has facets, call {@link UIComponent#getFacets} on this instance and invoke the - * values() method. For each UIComponent in the returned Map, call - * {@link UIComponent#visitTree}. - *

        - *
      • - * - *
      • - * - *
        - * - *

        - * If this component has children, for each UIColumn child: - *

        - * - *

        - * Call {@link VisitContext#invokeVisitCallback} on that UIColumn instance. If such a call returns - * true, terminate visiting and return true from this method. - *

        - * - *

        - * If the child UIColumn has facets, call {@link UIComponent#visitTree} on each one. - *

        - * - *

        - * Take no action on non-UIColumn children. - *

        - * - *
      • - * - *
      • - * - *
        - * - *

        - * Save aside the result of a call to {@link #getRowIndex}. - *

        - * - *

        - * For each child component of this UIData that is also an instance of {@link UIColumn}, - *

        - * - *

        - * Iterate over the rows. - *

        - * - *
        - * - *
          - * - *
        • - *

          - * Let rowsToProcess be the return from {@link #getRows}. - *

          - *
        • - * - *
        • - *

          - * Let rowIndex be the return from {@link #getFirst} - 1. - *

          - *
        • - * - *
        • - *

          - * While the number of rows processed is less than rowsToProcess, take the following actions. - *

          - * - *

          - * Call {@link #setRowIndex}, passing the current row index. - *

          - * - *

          - * If {@link #isRowAvailable} returns false, take no further action and return false. - *

          - * - *

          - * Call {@link UIComponent#visitTree} on each of the children of this UIColumn instance. - *

          - * - *
        • - * - *
        - * - *
      • - * - *
      - * - *

      - * Call {@link #popComponentFromEL} and restore the saved row index with a call to {@link #setRowIndex}. - *

      - * - *

      - * Return false to allow the visiting to continue. - *

      - * - *
      - * - * @param context the VisitContext that provides context for performing the visit. - * - * @param callback the callback to be invoked for each node encountered in the visit. - * - * @throws NullPointerException if any of the parameters are null. - * - * - */ - @Override - public boolean visitTree(VisitContext context, VisitCallback callback) { - - // First check to see whether we are visitable. If not - // short-circuit out of this subtree, though allow the - // visit to proceed through to other subtrees. - if (!isVisitable(context)) { - return false; - } - - FacesContext facesContext = context.getFacesContext(); - // NOTE: that the visitRows local will be obsolete once the - // appropriate visit hints have been added to the API - boolean visitRows = requiresRowIteration(context); - - // Clear out the row index is one is set so that - // we start from a clean slate. - int oldRowIndex = -1; - if (visitRows) { - oldRowIndex = getRowIndex(); - setRowIndex(-1); - } - - // Push ourselves to EL - pushComponentToEL(facesContext, null); - - try { - - // Visit ourselves. Note that we delegate to the - // VisitContext to actually perform the visit. - VisitResult result = context.invokeVisitCallback(this, callback); - - // If the visit is complete, short-circuit out and end the visit - if (result == VisitResult.COMPLETE) { - return true; - } - - // Visit children, short-circuiting as necessary - // NOTE: that the visitRows parameter will be obsolete once the - // appropriate visit hints have been added to the API - if (result == VisitResult.ACCEPT && doVisitChildren(context, visitRows)) { - - // First visit facets - // NOTE: that the visitRows parameter will be obsolete once the - // appropriate visit hints have been added to the API - if (visitFacets(context, callback, visitRows)) { - return true; - } - - // Next column facets - // NOTE: that the visitRows parameter will be obsolete once the - // appropriate visit hints have been added to the API - if (visitColumnsAndColumnFacets(context, callback, visitRows)) { - return true; - } - - // And finally, visit rows - // NOTE: that the visitRows parameter will be obsolete once the - // appropriate visit hints have been added to the API - if (visitRows(context, callback, visitRows)) { - return true; - } - } - } finally { - // Clean up - pop Jakarta Expression Language and restore old row index - popComponentFromEL(facesContext); - if (visitRows) { - setRowIndex(oldRowIndex); - } - } - - // Return false to allow the visit to continue - return false; - } - - /** - *

      - * Override the base class method to take special action if the method is being invoked when - * {@link StateManager#IS_BUILDING_INITIAL_STATE} is true and the rowStatePreserved - * JavaBeans property for this instance is true. - *

      - * - *

      - * The additional action taken is to traverse the descendents and save their state without regard to any particular row - * value. - *

      - * - * @since 2.1 - */ - - @Override - public void markInitialState() { - if (isRowStatePreserved()) { - if (getFacesContext().getAttributes().containsKey(StateManager.IS_BUILDING_INITIAL_STATE)) { - _initialDescendantFullComponentState = saveDescendantInitialComponentStates(getFacesContext(), getChildren().iterator(), false); - } - } - super.markInitialState(); - } - - private void restoreFullDescendantComponentStates(FacesContext facesContext, Iterator childIterator, Object state, - boolean restoreChildFacets) { - Iterator descendantStateIterator = null; - while (childIterator.hasNext()) { - if (descendantStateIterator == null && state != null) { - descendantStateIterator = ((Collection) state).iterator(); - } - UIComponent component = childIterator.next(); - - // reset the client id (see spec 3.1.6) - component.setId(component.getId()); - if (!component.isTransient()) { - Object childState = null; - Object descendantState = null; - if (descendantStateIterator != null && descendantStateIterator.hasNext()) { - Object[] object = descendantStateIterator.next(); - childState = object[0]; - descendantState = object[1]; - } - - component.clearInitialState(); - component.restoreState(facesContext, childState); - component.markInitialState(); - - Iterator childsIterator; - if (restoreChildFacets) { - childsIterator = component.getFacetsAndChildren(); - } else { - childsIterator = component.getChildren().iterator(); - } - restoreFullDescendantComponentStates(facesContext, childsIterator, descendantState, true); - } - } - } - - private Collection saveDescendantInitialComponentStates(FacesContext facesContext, Iterator childIterator, boolean saveChildFacets) { - Collection childStates = null; - while (childIterator.hasNext()) { - if (childStates == null) { - childStates = new ArrayList<>(); - } - - UIComponent child = childIterator.next(); - if (!child.isTransient()) { - // Add an entry to the collection, being an array of two - // elements. The first element is the state of the children - // of this component; the second is the state of the current - // child itself. - - Iterator childsIterator; - if (saveChildFacets) { - childsIterator = child.getFacetsAndChildren(); - } else { - childsIterator = child.getChildren().iterator(); - } - Object descendantState = saveDescendantInitialComponentStates(facesContext, childsIterator, true); - Object state = child.saveState(facesContext); - childStates.add(new Object[] { state, descendantState }); - } - } - return childStates; - } - - private Map saveFullDescendantComponentStates(FacesContext facesContext, Map stateMap, Iterator childIterator, - boolean saveChildFacets) { - while (childIterator.hasNext()) { - UIComponent child = childIterator.next(); - if (!child.isTransient()) { - Iterator childsIterator; - if (saveChildFacets) { - childsIterator = child.getFacetsAndChildren(); - } else { - childsIterator = child.getChildren().iterator(); - } - stateMap = saveFullDescendantComponentStates(facesContext, stateMap, childsIterator, true); - Object state = child.saveState(facesContext); - if (state != null) { - if (stateMap == null) { - stateMap = new HashMap<>(); - } - stateMap.put(child.getClientId(facesContext), state); - } - } - } - return stateMap; - } - - private void restoreFullDescendantComponentDeltaStates(FacesContext facesContext, Iterator childIterator, Object state, Object initialState, - boolean restoreChildFacets) { - Map descendantStateIterator = null; - Iterator descendantFullStateIterator = null; - while (childIterator.hasNext()) { - if (descendantStateIterator == null && state != null) { - descendantStateIterator = (Map) state; - } - if (descendantFullStateIterator == null && initialState != null) { - descendantFullStateIterator = ((Collection) initialState).iterator(); - } - UIComponent component = childIterator.next(); - - // reset the client id (see spec 3.1.6) - component.setId(component.getId()); - if (!component.isTransient()) { - Object childInitialState = null; - Object descendantInitialState = null; - Object childState = null; - if (descendantStateIterator != null && descendantStateIterator.containsKey(component.getClientId(facesContext))) { - // Object[] object = (Object[]) descendantStateIterator.get(component.getClientId(facesContext)); - // childState = object[0]; - childState = descendantStateIterator.get(component.getClientId(facesContext)); - } - if (descendantFullStateIterator != null && descendantFullStateIterator.hasNext()) { - Object[] object = descendantFullStateIterator.next(); - childInitialState = object[0]; - descendantInitialState = object[1]; - } - - component.clearInitialState(); - if (childInitialState != null) { - component.restoreState(facesContext, childInitialState); - component.markInitialState(); - component.restoreState(facesContext, childState); - } else { - component.restoreState(facesContext, childState); - component.markInitialState(); - } - - Iterator childsIterator; - if (restoreChildFacets) { - childsIterator = component.getFacetsAndChildren(); - } else { - childsIterator = component.getChildren().iterator(); - } - restoreFullDescendantComponentDeltaStates(facesContext, childsIterator, state, descendantInitialState, true); - } - } - } - - private void restoreTransientDescendantComponentStates(FacesContext facesContext, Iterator childIterator, Map state, - boolean restoreChildFacets) { - while (childIterator.hasNext()) { - UIComponent component = childIterator.next(); - - // reset the client id (see spec 3.1.6) - component.setId(component.getId()); - if (!component.isTransient()) { - component.restoreTransientState(facesContext, state == null ? null : state.get(component.getClientId(facesContext))); - - Iterator childsIterator; - if (restoreChildFacets) { - childsIterator = component.getFacetsAndChildren(); - } else { - childsIterator = component.getChildren().iterator(); - } - restoreTransientDescendantComponentStates(facesContext, childsIterator, state, true); - } - } - - } - - private Map saveTransientDescendantComponentStates(FacesContext facesContext, Map childStates, - Iterator childIterator, boolean saveChildFacets) { - while (childIterator.hasNext()) { - UIComponent child = childIterator.next(); - if (!child.isTransient()) { - Iterator childsIterator; - if (saveChildFacets) { - childsIterator = child.getFacetsAndChildren(); - } else { - childsIterator = child.getChildren().iterator(); - } - childStates = saveTransientDescendantComponentStates(facesContext, childStates, childsIterator, true); - Object state = child.saveTransientState(facesContext); - if (state != null) { - if (childStates == null) { - childStates = new HashMap<>(); - } - childStates.put(child.getClientId(facesContext), state); - } - } - } - return childStates; - } - - @Override - public void restoreState(FacesContext context, Object state) { - if (state == null) { - return; - } - - Object values[] = (Object[]) state; - super.restoreState(context, values[0]); - Object restoredRowStates = UIComponentBase.restoreAttachedState(context, values[1]); - if (restoredRowStates == null) { - if (!_rowDeltaStates.isEmpty()) { - _rowDeltaStates.clear(); - } - } else { - _rowDeltaStates = (Map) restoredRowStates; - } - } - - private void resetClientIds(UIComponent component) { - Iterator iterator = component.getFacetsAndChildren(); - while (iterator.hasNext()) { - UIComponent child = iterator.next(); - resetClientIds(child); - child.setId(child.getId()); - } - } - - @Override - public Object saveState(FacesContext context) { - resetClientIds(this); - - if (initialStateMarked()) { - Object superState = super.saveState(context); - - if (superState == null && _rowDeltaStates.isEmpty()) { - return null; - } else { - Object values[] = null; - Object attachedState = UIComponentBase.saveAttachedState(context, _rowDeltaStates); - if (superState != null || attachedState != null) { - values = new Object[] { superState, attachedState }; - } - return values; - } - } else { - Object values[] = new Object[2]; - values[0] = super.saveState(context); - values[1] = UIComponentBase.saveAttachedState(context, _rowDeltaStates); - return values; - } - } - - // --------------------------------------------------------- Protected Methods - - /** - *

      - * Return the internal {@link DataModel} object representing the data objects that we will iterate over in this - * component's rendering. - *

      - * - *

      - * If the model has been cached by a previous call to {@link #setDataModel}, return it. Otherwise call - * {@link #getValue}. If the result is null, create an empty {@link ListDataModel} and return it. If the result is an - * instance of {@link DataModel}, return it. Otherwise, adapt the result as described in {@link #getValue} and return - * it. - *

      - * - * @return the data model. - */ - protected DataModel getDataModel() { - - // Return any previously cached DataModel instance - if (model != null) { - return model; - } - - // Synthesize a DataModel around our current value if possible - Object current = getValue(); - if (current == null) { - setDataModel(EMPTY_DATA_MODEL); - } else if (current instanceof DataModel) { - setDataModel((DataModel) current); - } else if (current instanceof List) { - setDataModel(new ListDataModel((List) current)); - } else if (Object[].class.isAssignableFrom(current.getClass())) { - setDataModel(new ArrayDataModel((Object[]) current)); - } else if (current instanceof ResultSet) { - setDataModel(new ResultSetDataModel((ResultSet) current)); - } else if (current instanceof Collection) { - setDataModel(new CollectionDataModel((Collection) current)); - } else if (current instanceof Iterable) { - setDataModel(new IterableDataModel<>((Iterable) current)); - } else if (current instanceof Map) { - setDataModel(new IterableDataModel<>(((Map) current).entrySet())); - } else { - DataModel dataModel = createDataModel(current.getClass()); - if (dataModel != null) { - dataModel.setWrappedData(current); - setDataModel(dataModel); - } else { - setDataModel(new ScalarDataModel(current)); - } - } - return model; - - } - - @SuppressWarnings("all") - static private class FacesDataModelAnnotationLiteral extends AnnotationLiteral implements FacesDataModel { - private static final long serialVersionUID = 1L; - - /** - * Stores the forClass attribute. - */ - private final Class forClass; - - public FacesDataModelAnnotationLiteral(Class forClass) { - this.forClass = forClass; - } - - @Override - public Class forClass() { - return forClass; - } - } - - private DataModel createDataModel(final Class forClass) { - - List> dataModel = new ArrayList<>(1); - CDI cdi = CDI.current(); - - // Scan the map in order, the first class that is a super class or equal to the class for which - // we're looking for a DataModel is the closest match, since the Map is sorted on inheritance relation - getDataModelClassesMap(cdi).entrySet().stream().filter(e -> e.getKey().isAssignableFrom(forClass)).findFirst().ifPresent( - - // Get the bean from CDI which is of the class type that we found during annotation scanning - // and has the @FacesDataModel annotation, with the "forClass" attribute set to the closest - // super class of our target class. - - e -> dataModel.add(cdi.select(e.getValue(), new FacesDataModelAnnotationLiteral(e.getKey())).get())); - - return dataModel.isEmpty() ? null : dataModel.get(0); - } - - @SuppressWarnings("unchecked") - private Map, Class>> getDataModelClassesMap(CDI cdi) { - BeanManager beanManager = cdi.getBeanManager(); - - // Get the Map with classes for which a custom DataModel implementation is available from CDI - Bean bean = beanManager.resolve(beanManager.getBeans("comSunFacesDataModelClassesMap")); - Object beanReference = beanManager.getReference(bean, Map.class, beanManager.createCreationalContext(bean)); - - return (Map, Class>>) beanReference; - } - - /** - *

      - * Set the internal DataModel. This UIData instance must use the given {@link DataModel} as its internal - * value representation from now until the next call to setDataModel. If the given DataModel - * is null, the internal DataModel must be reset in a manner so that the next call to - * {@link #getDataModel} causes lazy instantion of a newly refreshed DataModel. - *

      - * - *

      - * Subclasses might call this method if they either want to restore the internal DataModel during the - * Restore View phase or if they want to explicitly refresh the current DataModel for the - * Render Response phase. - *

      - * - * @param dataModel the new DataModel or null to cause the model to be refreshed. - */ - - protected void setDataModel(DataModel dataModel) { - model = dataModel; - } - - // ---------------------------------------------------- Private Methods - - /** - * Called by {@link UIData#visitTree} to determine whether or not the visitTree implementation should visit - * the rows of UIData or by manipulating the row index before visiting the components themselves. - * - * Once we have the appropriate Visit hints for state saving, this method will become obsolete. - * - * @param ctx the FacesContext for the current request - * - * @return true if row index manipulation is required by the visit to this UIData instance - */ - private boolean requiresRowIteration(VisitContext ctx) { - - return !ctx.getHints().contains(VisitHint.SKIP_ITERATION); - - } - - // Perform pre-decode initialization work. Note that this - // initialization may be performed either during a normal decode - // (ie. processDecodes()) or during a tree visit (ie. visitTree()). - private void preDecode(FacesContext context) { - setDataModel(null); // Re-evaluate even with server-side state saving - Map saved = (Map) getStateHelper().get(PropertyKeys.saved); - if (null == saved || !keepSaved(context)) { - // noinspection CollectionWithoutInitialCapacity - getStateHelper().remove(PropertyKeys.saved); - } - } - - // Perform pre-validation initialization work. Note that this - // initialization may be performed either during a normal validation - // (ie. processValidators()) or during a tree visit (ie. visitTree()). - private void preValidate(FacesContext context) { - if (isNestedWithinIterator(context)) { - setDataModel(null); - } - } - - // Perform pre-update initialization work. Note that this - // initialization may be performed either during normal update - // (ie. processUpdates()) or during a tree visit (ie. visitTree()). - private void preUpdate(FacesContext context) { - if (isNestedWithinIterator(context)) { - setDataModel(null); - } - } - - // Perform pre-encode initialization work. Note that this - // initialization may be performed either during a normal encode - // (ie. encodeBegin()) or during a tree visit (ie. visitTree()). - private void preEncode(FacesContext context) { - setDataModel(null); // re-evaluate even with server-side state saving - if (!keepSaved(context)) { - //// noinspection CollectionWithoutInitialCapacity - // saved = new HashMap(); - getStateHelper().remove(PropertyKeys.saved); - } - } - - /** - *

      - * Perform the appropriate phase-specific processing and per-row iteration for the specified phase, as follows: - *

        - *
      • Set the rowIndex property to -1, and process the facets of this {@link UIData} component exactly - * once.
      • - *
      • Set the rowIndex property to -1, and process the facets of the {@link UIColumn} children of this - * {@link UIData} component exactly once.
      • - *
      • Iterate over the relevant rows, based on the first and row properties, and process the - * children of the {@link UIColumn} children of this {@link UIData} component once per row.
      • - *
      - * - * @param context {@link FacesContext} for the current request - * @param phaseId {@link PhaseId} of the phase we are currently running - */ - private void iterate(FacesContext context, PhaseId phaseId) { - - // Process each facet of this component exactly once - setRowIndex(-1); - if (getFacetCount() > 0) { - for (UIComponent facet : getFacets().values()) { - if (phaseId == PhaseId.APPLY_REQUEST_VALUES) { - facet.processDecodes(context); - } else if (phaseId == PhaseId.PROCESS_VALIDATIONS) { - facet.processValidators(context); - } else if (phaseId == PhaseId.UPDATE_MODEL_VALUES) { - facet.processUpdates(context); - } else { - throw new IllegalArgumentException(); - } - } - } - - // collect rendered columns once - List renderedColumns = new ArrayList<>(getChildCount()); - if (getChildCount() > 0) { - for (UIComponent child : getChildren()) { - if (child instanceof UIColumn && child.isRendered()) { - renderedColumns.add((UIColumn) child); - } - } - } - - // Process each facet of our child UIColumn components exactly once - setRowIndex(-1); - for (UIColumn column : renderedColumns) { - if (column.getFacetCount() > 0) { - for (UIComponent columnFacet : column.getFacets().values()) { - if (phaseId == PhaseId.APPLY_REQUEST_VALUES) { - columnFacet.processDecodes(context); - } else if (phaseId == PhaseId.PROCESS_VALIDATIONS) { - columnFacet.processValidators(context); - } else if (phaseId == PhaseId.UPDATE_MODEL_VALUES) { - columnFacet.processUpdates(context); - } else { - throw new IllegalArgumentException(); - } - } - } - } - - // Iterate over our UIColumn children, once per row - int processed = 0; - int rowIndex = getFirst() - 1; - int rows = getRows(); - - while (true) { - - // Have we processed the requested number of rows? - if (rows > 0 && ++processed > rows) { - break; - } - - // Expose the current row in the specified request attribute - setRowIndex(++rowIndex); - if (!isRowAvailable()) { - break; // Scrolled past the last row - } - - // Perform phase-specific processing as required - // on the *children* of the UIColumn (facets have - // been done a single time with rowIndex=-1 already) - for (UIColumn kid : renderedColumns) { - if (kid.getChildCount() > 0) { - for (UIComponent grandkid : kid.getChildren()) { - if (!grandkid.isRendered()) { - continue; - } - if (phaseId == PhaseId.APPLY_REQUEST_VALUES) { - grandkid.processDecodes(context); - } else if (phaseId == PhaseId.PROCESS_VALIDATIONS) { - grandkid.processValidators(context); - } else if (phaseId == PhaseId.UPDATE_MODEL_VALUES) { - grandkid.processUpdates(context); - } else { - throw new IllegalArgumentException(); - } - } - } - } - - } - - // Clean up after ourselves - setRowIndex(-1); - - } - - // Tests whether we need to visit our children as part of - // a tree visit - private boolean doVisitChildren(VisitContext context, boolean visitRows) { - - // Just need to check whether there are any ids under this - // subtree. Make sure row index is cleared out since - // getSubtreeIdsToVisit() needs our row-less client id. - if (visitRows) { - setRowIndex(-1); - } - Collection idsToVisit = context.getSubtreeIdsToVisit(this); - assert idsToVisit != null; - - // All ids or non-empty collection means we need to visit our children. - return !idsToVisit.isEmpty(); - } - -// // Performs pre-phase initialization before visiting children -// // (if necessary). -// private void preVisitChildren(VisitContext visitContext) { -// -// // If EXECUTE_LIFECYCLE hint is set, we need to do -// // lifecycle-related initialization before visiting children -// if (visitContext.getHints().contains(VisitHint.EXECUTE_LIFECYCLE)) { -// FacesContext facesContext = visitContext.getFacesContext(); -// PhaseId phaseId = facesContext.getCurrentPhaseId(); -// -// if (phaseId == PhaseId.APPLY_REQUEST_VALUES) -// preDecode(facesContext); -// else if (phaseId == PhaseId.PROCESS_VALIDATIONS) -// preValidate(facesContext); -// else if (phaseId == PhaseId.UPDATE_MODEL_VALUES) -// preUpdate(facesContext); -// else if (phaseId == PhaseId.RENDER_RESPONSE) -// preEncode(facesContext); -// } -// } - - // Visit each facet of this component exactly once. - private boolean visitFacets(VisitContext context, VisitCallback callback, boolean visitRows) { - - if (visitRows) { - setRowIndex(-1); - } - if (getFacetCount() > 0) { - for (UIComponent facet : getFacets().values()) { - if (facet.visitTree(context, callback)) { - return true; - } - } - } - - return false; - } - - // Visit each UIColumn and any facets it may have defined exactly once - private boolean visitColumnsAndColumnFacets(VisitContext context, VisitCallback callback, boolean visitRows) { - if (visitRows) { - setRowIndex(-1); - } - if (getChildCount() > 0) { - for (UIComponent column : getChildren()) { - if (column instanceof UIColumn) { - VisitResult result = context.invokeVisitCallback(column, callback); // visit the column directly - if (result == VisitResult.COMPLETE) { - return true; - } - if (column.getFacetCount() > 0) { - for (UIComponent columnFacet : column.getFacets().values()) { - if (columnFacet.visitTree(context, callback)) { - return true; - } - } - } - } - } - } - - return false; - } - - // Visit each column and row - private boolean visitRows(VisitContext context, VisitCallback callback, boolean visitRows) { - - // Iterate over our UIColumn children, once per row - int processed = 0; - int rowIndex = 0; - int rows = 0; - if (visitRows) { - rowIndex = getFirst() - 1; - rows = getRows(); - } - - while (true) { - - // Have we processed the requested number of rows? - if (visitRows) { - if (rows > 0 && ++processed > rows) { - break; - } - // Expose the current row in the specified request attribute - setRowIndex(++rowIndex); - if (!isRowAvailable()) { - break; // Scrolled past the last row - } - } - - // Visit as required on the *children* of the UIColumn - // (facets have been done a single time with rowIndex=-1 already) - if (getChildCount() > 0) { - for (UIComponent kid : getChildren()) { - if (!(kid instanceof UIColumn)) { - continue; - } - if (kid.getChildCount() > 0) { - for (UIComponent grandkid : kid.getChildren()) { - if (grandkid.visitTree(context, callback)) { - return true; - } - } - } - } - } - - if (!visitRows) { - break; - } - - } - - return false; - } - - /** - *

      - * Return true if we need to keep the saved per-child state information. This will be the case if any of - * the following are true: - *

      - * - *
        - * - *
      • there are messages queued with severity ERROR or FATAL.
      • - * - *
      • this UIData instance is nested inside of another UIData instance
      • - * - *
      - * - * @param context {@link FacesContext} for the current request - */ - private boolean keepSaved(FacesContext context) { - - return contextHasErrorMessages(context) || isNestedWithinIterator(context); - - } - - private Boolean isNestedWithinIterator(FacesContext context) { - if (isNested == null) { - isNested = isNestedInIterator(context, this); - } - return isNested; - } - - private boolean contextHasErrorMessages(FacesContext context) { - - FacesMessage.Severity sev = context.getMaximumSeverity(); - return sev != null && FacesMessage.SEVERITY_ERROR.compareTo(sev) >= 0; - - } - - /** - *

      - * Restore state information for all descendant components, as described for setRowIndex(). - *

      - */ - private void restoreDescendantState() { - - FacesContext context = getFacesContext(); - if (getChildCount() > 0) { - for (UIComponent kid : getChildren()) { - if (kid instanceof UIColumn) { - restoreDescendantState(kid, context); - } - } - } - - } - - /** - *

      - * Restore state information for the specified component and its descendants. - *

      - * - * @param component Component for which to restore state information - * @param context {@link FacesContext} for the current request - */ - private void restoreDescendantState(UIComponent component, FacesContext context) { - - // Reset the client identifier for this component - String id = component.getId(); - component.setId(id); // Forces client id to be reset - Map saved = (Map) getStateHelper().get(PropertyKeys.saved); - // Restore state for this component (if it is a EditableValueHolder) - if (component instanceof EditableValueHolder) { - EditableValueHolder input = (EditableValueHolder) component; - String clientId = component.getClientId(context); - - SavedState state = saved == null ? null : saved.get(clientId); - if (state == null) { - input.resetValue(); - } else { - input.setValue(state.getValue()); - input.setValid(state.isValid()); - input.setSubmittedValue(state.getSubmittedValue()); - // This *must* be set after the call to setValue(), since - // calling setValue() always resets "localValueSet" to true. - input.setLocalValueSet(state.isLocalValueSet()); - } - } else if (component instanceof UIForm) { - UIForm form = (UIForm) component; - String clientId = component.getClientId(context); - SavedState state = saved == null ? null : saved.get(clientId); - if (state == null) { - // submitted is transient state - form.setSubmitted(false); - } else { - form.setSubmitted(state.getSubmitted()); - } - } - - // Restore state for children of this component - if (component.getChildCount() > 0) { - for (UIComponent kid : component.getChildren()) { - restoreDescendantState(kid, context); - } - } - - // Restore state for facets of this component - if (component.getFacetCount() > 0) { - for (UIComponent facet : component.getFacets().values()) { - restoreDescendantState(facet, context); - } - } - - } - - /** - *

      - * Save state information for all descendant components, as described for setRowIndex(). - *

      - */ - private void saveDescendantState() { - - FacesContext context = getFacesContext(); - if (getChildCount() > 0) { - for (UIComponent kid : getChildren()) { - if (kid instanceof UIColumn) { - saveDescendantState(kid, context); - } - } - } - - } - - /** - *

      - * Save state information for the specified component and its descendants. - *

      - * - * @param component Component for which to save state information - * @param context {@link FacesContext} for the current request - */ - private void saveDescendantState(UIComponent component, FacesContext context) { - - // Save state for this component (if it is a EditableValueHolder) - Map saved = (Map) getStateHelper().get(PropertyKeys.saved); - if (component instanceof EditableValueHolder) { - EditableValueHolder input = (EditableValueHolder) component; - SavedState state = null; - String clientId = component.getClientId(context); - if (saved == null) { - state = new SavedState(); - } - if (state == null) { - state = saved.get(clientId); - if (state == null) { - state = new SavedState(); - } - } - state.setValue(input.getLocalValue()); - state.setValid(input.isValid()); - state.setSubmittedValue(input.getSubmittedValue()); - state.setLocalValueSet(input.isLocalValueSet()); - if (state.hasDeltaState()) { - getStateHelper().put(PropertyKeys.saved, clientId, state); - } else if (saved != null) { - getStateHelper().remove(PropertyKeys.saved, clientId); - } - } else if (component instanceof UIForm) { - UIForm form = (UIForm) component; - String clientId = component.getClientId(context); - SavedState state = null; - if (saved == null) { - state = new SavedState(); - } - if (state == null) { - state = saved.get(clientId); - if (state == null) { - state = new SavedState(); - } - } - state.setSubmitted(form.isSubmitted()); - if (state.hasDeltaState()) { - getStateHelper().put(PropertyKeys.saved, clientId, state); - } else if (saved != null) { - getStateHelper().remove(PropertyKeys.saved, clientId); - } - } - - // Save state for children of this component - if (component.getChildCount() > 0) { - for (UIComponent uiComponent : component.getChildren()) { - saveDescendantState(uiComponent, context); - } - } - - // Save state for facets of this component - if (component.getFacetCount() > 0) { - for (UIComponent facet : component.getFacets().values()) { - saveDescendantState(facet, context); - } - } - - } - -} - -@SuppressWarnings({ "SerializableHasSerializationMethods", "NonSerializableFieldInSerializableClass" }) -class SavedState implements Serializable { - - private static final long serialVersionUID = 2920252657338389849L; - private Object submittedValue; - private boolean submitted; - - Object getSubmittedValue() { - return submittedValue; - } - - void setSubmittedValue(Object submittedValue) { - this.submittedValue = submittedValue; - } - - private boolean valid = true; - - boolean isValid() { - return valid; - } - - void setValid(boolean valid) { - this.valid = valid; - } - - private Object value; - - Object getValue() { - return value; - } - - public void setValue(Object value) { - this.value = value; - } - - private boolean localValueSet; - - boolean isLocalValueSet() { - return localValueSet; - } - - public void setLocalValueSet(boolean localValueSet) { - this.localValueSet = localValueSet; - } - - public boolean getSubmitted() { - return submitted; - } - - public void setSubmitted(boolean submitted) { - this.submitted = submitted; - } - - public boolean hasDeltaState() { - return submittedValue != null || value != null || localValueSet || !valid || submitted; - } - - @Override - public String toString() { - return "submittedValue: " + submittedValue + " value: " + value + " localValueSet: " + localValueSet; - } - -} - -// Private class to wrap an event with a row index -class WrapperEvent extends FacesEvent { - - private static final long serialVersionUID = -1064272913195655452L; - - public WrapperEvent(UIComponent component, FacesEvent event, int rowIndex) { - super(component); - this.event = event; - this.rowIndex = rowIndex; - } - - private FacesEvent event = null; - private int rowIndex = -1; - - public FacesEvent getFacesEvent() { - return event; - } - - public int getRowIndex() { - return rowIndex; - } - - @Override - public PhaseId getPhaseId() { - return event.getPhaseId(); - } - - @Override - public void setPhaseId(PhaseId phaseId) { - event.setPhaseId(phaseId); - } - - @Override - public boolean isAppropriateListener(FacesListener listener) { - return false; - } - - @Override - public void processListener(FacesListener listener) { - throw new IllegalStateException(); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UIForm.java b/impl/src/main/java/jakarta/faces/component/UIForm.java deleted file mode 100644 index 37d7a8e11e..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIForm.java +++ /dev/null @@ -1,395 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import static com.sun.faces.util.Util.coalesce; -import static jakarta.faces.component.UIViewRoot.UNIQUE_ID_PREFIX; -import static jakarta.faces.component.visit.VisitResult.COMPLETE; - -import java.util.Collection; -import java.util.Iterator; - -import jakarta.faces.FacesException; -import jakarta.faces.application.Application; -import jakarta.faces.component.visit.VisitCallback; -import jakarta.faces.component.visit.VisitContext; -import jakarta.faces.context.FacesContext; -import jakarta.faces.event.PostValidateEvent; -import jakarta.faces.event.PreValidateEvent; - -/** - *

      - * UIForm is a {@link UIComponent} that represents an input form to be - * presented to the user, and whose child components represent (among other things) the input fields to be included when - * the form is submitted. - *

      - * - *

      - * By default, the rendererType property must be set to "jakarta.faces.Form". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class UIForm extends UIComponentBase implements NamingContainer, UniqueIdVendor { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.Form"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.Form"; - - /** - * Properties that are tracked by state saving. - */ - enum PropertyKeys { - - /** - *

      - * The prependId flag. - *

      - */ - prependId, - - /** - *

      - * Last id vended by {@link UIForm#createUniqueId(jakarta.faces.context.FacesContext, String)}. - *

      - */ - lastId, - - submitted, - } - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UIForm} instance with default property values. - *

      - */ - public UIForm() { - super(); - setRendererType("jakarta.faces.Form"); - } - - // -------------------------------------------------------------- Properties - - @Override - public String getFamily() { - return COMPONENT_FAMILY; - } - - /** - *

      - * Returns the current value of the submitted property. The - * default value is false. See {@link #setSubmitted} for details. - *

      - * - *

      - * This property must be kept as a transient property using the {@link UIComponent#getTransientStateHelper}. - *

      - * - * @return true if the form was submitted, false otherwise. - */ - public boolean isSubmitted() { - return (Boolean) getTransientStateHelper().getTransient(PropertyKeys.submitted, false); - } - - /** - *

      - * If this UIForm instance (as opposed to other - * forms in the page) is experiencing a submit during this request processing lifecycle, this method must be called, - * with true as the argument, during the {@link UIComponent#decode} for this UIForm instance. - * If this UIForm instance is not experiencing a submit, this method must - * be called, with false as the argument, during the {@link UIComponent#decode} for this - * UIForm instance. - *

      - * - *

      - * The value of a UIForm's submitted property must not be saved as part of its state. - *

      - * - *

      - * This property must be kept as a transient property using the {@link UIComponent#getTransientStateHelper}. - *

      - * - * @param submitted the new value of the submitted flag. - */ - public void setSubmitted(boolean submitted) { - getTransientStateHelper().putTransient(PropertyKeys.submitted, submitted); - } - - /** - * Is the id prepended. - * - * @return true if it is, false otherwise. - */ - public boolean isPrependId() { - return (Boolean) getStateHelper().eval(PropertyKeys.prependId, true); - } - - /** - * Set whether the id should be prepended. - * - * @param prependId true if it is, false otherwise. - */ - public void setPrependId(boolean prependId) { - getStateHelper().put(PropertyKeys.prependId, prependId); - } - - // ----------------------------------------------------- UIComponent Methods - - /** - *

      - * Override {@link UIComponent#processDecodes} to ensure that the form is decoded before its children. - * This is necessary to allow the submitted property to be correctly set. - *

      - * - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void processDecodes(FacesContext context) { - - if (context == null) { - throw new NullPointerException(); - } - - // Process this component itself - decode(context); - - // If we're not the submitted form, don't process children. - if (!isSubmitted()) { - return; - } - - // Process all facets and children of this component - Iterator kids = getFacetsAndChildren(); - while (kids.hasNext()) { - kids.next().processDecodes(context); - } - } - - /** - *

      - * Override {@link UIComponent#processValidators} to ensure that the children of this UIForm instance are - * only processed if {@link #isSubmitted} returns true. - *

      - * - * @throws NullPointerException {@inheritDoc} - * @see jakarta.faces.event.PreValidateEvent - * @see jakarta.faces.event.PostValidateEvent - */ - @Override - public void processValidators(FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - if (!isSubmitted()) { - return; - } - - pushComponentToEL(context, this); - Application application = context.getApplication(); - application.publishEvent(context, PreValidateEvent.class, this); - - // Process all the facets and children of this component - Iterator kids = getFacetsAndChildren(); - while (kids.hasNext()) { - kids.next().processValidators(context); - } - - application.publishEvent(context, PostValidateEvent.class, this); - popComponentFromEL(context); - } - - /** - *

      - * Override {@link UIComponent#processUpdates} to ensure that the children of this UIForm instance are only - * processed if {@link #isSubmitted} returns true. - *

      - * - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void processUpdates(FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - if (!isSubmitted()) { - return; - } - - pushComponentToEL(context, this); - - try { - // Process all facets and children of this component - Iterator kids = getFacetsAndChildren(); - while (kids.hasNext()) { - kids.next().processUpdates(context); - } - } finally { - popComponentFromEL(context); - } - } - - /** - *

      - * Generate an identifier for a component. The identifier will be prefixed with UNIQUE_ID_PREFIX, and will be unique - * within this component-container. Optionally, a unique seed value can be supplied by component creators which should - * be included in the generated unique id. - *

      - *

      - * If the prependId property has the value false, this method must call - * createUniqueId on the next ancestor UniqueIdVendor. - *

      - * - * @param context FacesContext - * @param seed an optional seed value - e.g. based on the position of the component in the VDL-template - * @return a unique-id in this component-container - */ - @Override - public String createUniqueId(FacesContext context, String seed) { - if (isPrependId()) { - int lastId = coalesce(getLastId(), 0); - - setLastId(++lastId); - - return UNIQUE_ID_PREFIX + coalesce(seed, lastId); - } - - UIComponent ancestorNamingContainer = getParent() == null ? null : getParent().getNamingContainer(); - if (ancestorNamingContainer instanceof UniqueIdVendor) { - return ((UniqueIdVendor) ancestorNamingContainer).createUniqueId(context, seed); - } - - return context.getViewRoot().createUniqueId(context, seed); - } - - /** - *

      - * Override the {@link UIComponent#getContainerClientId} to allow users to disable this form from prepending its - * clientId to its descendent's clientIds depending on the value of this form's - * {@link #isPrependId} property. - *

      - */ - @Override - public String getContainerClientId(FacesContext context) { - if (isPrependId()) { - return super.getContainerClientId(context); - } - - UIComponent parent = getParent(); - while (parent != null) { - if (parent instanceof NamingContainer) { - return parent.getContainerClientId(context); - } - parent = parent.getParent(); - } - - return null; - } - - /** - * @see UIComponent#visitTree - */ - @Override - public boolean visitTree(VisitContext context, VisitCallback callback) { - - // NamingContainers can optimize partial tree visits by taking advantage - // of the fact that it is possible to detect whether any ids to visit - // exist underneath the NamingContainer. If no such ids exist, there - // is no need to visit the subtree under the NamingContainer. - - // UIForm is a bit different from other NamingContainers. It only acts - // as a NamingContainer when prependId is true. Note that if it - // weren't for this, we could push this implementation up in to - // UIComponent and share it across all NamingContainers. Instead, - // we currently duplicate this implementation in UIForm and - // UINamingContainer, so that we can check isPrependId() here. - - if (!isPrependId()) { - return super.visitTree(context, callback); - } - - Collection idsToVisit = context.getSubtreeIdsToVisit(this); - - // If we have ids to visit, let the superclass implementation - // handle the visit - if (!idsToVisit.isEmpty()) { - return super.visitTree(context, callback); - } - - // If we have no child ids to visit, just visit ourselves, if - // we are visitable. - if (isVisitable(context)) { - FacesContext facesContext = context.getFacesContext(); - pushComponentToEL(facesContext, null); - - try { - return context.invokeVisitCallback(this, callback) == COMPLETE; - } finally { - popComponentFromEL(facesContext); - } - } - - // Done visiting this subtree. Return false to allow - // visit to continue. - return false; - } - - /** - * @see UIComponent#invokeOnComponent - */ - @Override - public boolean invokeOnComponent(FacesContext context, String clientId, ContextCallback callback) throws FacesException { - - // Optimization: In case when invokeOnComponent is used and the form has prependId=true, - // we can early skip the whole component tree if the baseClientId != form clientId. - - if (isPrependId()) { - String baseClientId = getClientId(context); - - // skip if the component is not a child of the UIForm - if (!clientId.startsWith(baseClientId)) { - return false; - } - } - - return super.invokeOnComponent(context, clientId, callback); - } - - // ----------------------------------------------------- Private Methods - - private Integer getLastId() { - return (Integer) getStateHelper().get(PropertyKeys.lastId); - } - - private void setLastId(Integer lastId) { - getStateHelper().put(PropertyKeys.lastId, lastId); - } -} diff --git a/impl/src/main/java/jakarta/faces/component/UIGraphic.java b/impl/src/main/java/jakarta/faces/component/UIGraphic.java deleted file mode 100644 index f1b8465d7c..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIGraphic.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.el.ValueExpression; - -/** - *

      - * UIGraphic is a {@link UIComponent} that displays a graphical image to the user. The user cannot - * manipulate this component; it is for display purposes only. - *

      - * - *

      - * By default, the rendererType property must be set to "jakarta.faces.Image". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class UIGraphic extends UIComponentBase { - - /** - * Properties that are tracked by state saving. - */ - enum PropertyKeys { - - /** - *

      - * The local value of this {@link UIComponent}. - *

      - */ - value - } - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.Graphic"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.Graphic"; - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UIGraphic} instance with default property values. - *

      - */ - public UIGraphic() { - super(); - setRendererType("jakarta.faces.Image"); - } - - // ------------------------------------------------------ Instance Variables - - // private Object value = null; - - // -------------------------------------------------------------- Properties - - @Override - public String getFamily() { - return COMPONENT_FAMILY; - } - - /** - *

      - * Return the image URL for this {@link UIGraphic}. This method is a typesafe alias for getValue(). - *

      - * - * @return the url. - */ - public String getUrl() { - return (String) getValue(); - } - - /** - *

      - * Set the image URL for this {@link UIGraphic}. This method is a typesafe alias for setValue(). - *

      - * - * @param url The new image URL - */ - public void setUrl(String url) { - setValue(url); - } - - /** - *

      - * Returns the value property of the UIGraphic. This will typically be rendered as an URL. - *

      - * - * @return the value. - */ - public Object getValue() { - return getStateHelper().eval(PropertyKeys.value); - } - - /** - *

      - * Sets the value property of the UIGraphic. This will typically be rendered as an URL. - *

      - * - * @param value the new value - */ - public void setValue(Object value) { - getStateHelper().put(PropertyKeys.value, value); - } - - // ---------------------------------------------------------------- Bindings - - - /** - *

      - * Return any {@link ValueExpression} set for value if a {@link ValueExpression} for url is - * requested; otherwise, perform the default superclass processing for this method. - *

      - * - * @param name Name of the attribute or property for which to retrieve a {@link ValueExpression} - * @return the value expression, or null. - * @throws NullPointerException if name is null - * @since 1.2 - */ - @Override - public ValueExpression getValueExpression(String name) { - if ("url".equals(name)) { - return super.getValueExpression("value"); - } else { - return super.getValueExpression(name); - } - } - - /** - *

      - * Store any {@link ValueExpression} specified for url under value instead; otherwise, perform - * the default superclass processing for this method. - *

      - * - * @param name Name of the attribute or property for which to set a {@link ValueExpression} - * @param binding The {@link ValueExpression} to set, or null to remove any currently set - * {@link ValueExpression} - * - * @throws NullPointerException if name is null - * @since 1.2 - */ - @Override - public void setValueExpression(String name, ValueExpression binding) { - if ("url".equals(name)) { - super.setValueExpression("value", binding); - } else { - super.setValueExpression(name, binding); - } - } - - // ----------------------------------------------------- StateHolder Methods - -} diff --git a/impl/src/main/java/jakarta/faces/component/UIImportConstants.java b/impl/src/main/java/jakarta/faces/component/UIImportConstants.java deleted file mode 100644 index 51a8250613..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIImportConstants.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.el.ValueExpression; -import jakarta.faces.view.ViewMetadata; - -/** - *
      - * - *

      - * UIImportConstants imports a mapping of all constant field values of the given type in the current - * view. - *

      - * - *

      - * The {@link jakarta.faces.view.ViewDeclarationLanguage} implementation must cause an instance of this component to be - * placed in the view for each occurrence of an <f:importConstants /> element placed inside of an - * <f:metadata /> element. The user must place <f:metadata /> as a direct child of - * the UIViewRoot. The {@link ViewMetadata#createMetadataView(jakarta.faces.context.FacesContext)} must - * take care of actual task of importing the constants. - *

      - * - *

      - * Instances of this class participate in the regular Jakarta Faces lifecycle, including on Ajax requests. - *

      - * - *

      - * The purpose of this component is to provide a mapping of all constant field values of the given type in the current - * view. Constant field values are all public static final fields of the given type. The map key represents - * the constant field name as String. The map value represents the actual constant field value. This works - * for classes, interfaces and enums. - *

      - * - *

      Usage

      - * - *

      - * The below constant fields: - *

      - * - *
      - * package com.example;
      - *
      - * public class Foo {
      - *     public static final String FOO1 = "foo1";
      - *     public static final String FOO2 = "foo2";
      - * }
      - * 
      - * - *
      - * package com.example;
      - *
      - * public interface Bar {
      - *     public static final String BAR1 = "bar1";
      - *     public static final String BAR2 = "bar2";
      - * }
      - * 
      - * - *
      - * package com.example;
      - *
      - * public enum Baz {
      - *     BAZ1, BAZ2;
      - * }
      - * 
      - * - *

      - * Can be imported as below: - *

      - * - *
      - * <f:metadata>
      - *     <f:importConstants type="com.example.Foo" />
      - *     <f:importConstants type="com.example.Bar" var="Barrr" />
      - *     <f:importConstants type="com.example.Baz" />
      - * </f:metadata>
      - * 
      - * - *

      - * And can be referenced as below: - *

      - * - *
      - * #{Foo.FOO1}, #{Foo.FOO2}, #{Barrr.BAR1}, #{Barrr.BAR2}, #{Baz.BAZ1}, #{Baz.BAZ2}
      - * 
      - * - *
      - * <h:selectOneMenu value="#{bean.baz}" >
      - *     <f:selectItems value="#{Baz}" />
      - * </h:selectOneMenu>
      - * 
      - * - *
      - * - * @since 2.3 - */ -public class UIImportConstants extends UIComponentBase { - - // ---------------------------------------------------------------------------------------------- Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.ImportConstants"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.ImportConstants"; - - /** - * Properties that are tracked by state saving. - */ - enum PropertyKeys { - type, var; - } - - // ---------------------------------------------------------------------------------------------------- Constructors - - /** - *

      - * Create a new {@link UIImportConstants} instance with renderer type set to null. - *

      - */ - public UIImportConstants() { - setRendererType(null); - } - - // ------------------------------------------------------------------------------------------------------ Properties - - @Override - public String getFamily() { - return COMPONENT_FAMILY; - } - - /** - *

      - * Returns the fully qualified name of the type to import the constant field values for. - *

      - * - * @return The fully qualified name of the type to import the constant field values for. - */ - public String getType() { - return (String) getStateHelper().eval(PropertyKeys.type); - } - - /** - *

      - * Sets the fully qualified name of the type to import the constant field values for. - *

      - * - * @param type The fully qualified name of the type to import the constant field values for. - */ - public void setType(final String type) { - getStateHelper().put(PropertyKeys.type, type); - } - - /** - *

      - * Returns name of request scope attribute under which constants will be exposed as a Map. - *

      - * - * @return Name of request scope attribute under which constants will be exposed as a Map. - */ - public String getVar() { - return (String) getStateHelper().eval(PropertyKeys.var); - } - - /** - *

      - * Sets name of request scope attribute under which constants will be exposed as a Map. - *

      - * - * @param var Name of request scope attribute under which constants will be exposed as a Map. - */ - public void setVar(final String var) { - getStateHelper().put(PropertyKeys.var, var); - } - - // --------------------------------------------------------------------------------------------- UIComponent Methods - - /** - *

      - * Set the {@link ValueExpression} used to calculate the value for the specified attribute or property name, if any. If - * a {@link ValueExpression} is set for the var property, throw an illegal argument exception. - *

      - * - * @throws IllegalArgumentException If name is one of id, parent, or - * var. - * @throws NullPointerException If name is null. - */ - @Override - public void setValueExpression(String name, ValueExpression binding) { - if (PropertyKeys.var.toString().equals(name)) { - throw new IllegalArgumentException(name); - } - - super.setValueExpression(name, binding); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UIInput.java b/impl/src/main/java/jakarta/faces/component/UIInput.java deleted file mode 100644 index ad8ad72001..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIInput.java +++ /dev/null @@ -1,1396 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import jakarta.el.ELException; -import jakarta.el.ValueExpression; -import jakarta.faces.FacesException; -import jakarta.faces.application.Application; -import jakarta.faces.application.FacesMessage; -import jakarta.faces.context.ExceptionHandler; -import jakarta.faces.context.ExternalContext; -import jakarta.faces.context.FacesContext; -import jakarta.faces.convert.Converter; -import jakarta.faces.convert.ConverterException; -import jakarta.faces.event.ExceptionQueuedEvent; -import jakarta.faces.event.ExceptionQueuedEventContext; -import jakarta.faces.event.PhaseId; -import jakarta.faces.event.PostValidateEvent; -import jakarta.faces.event.PreValidateEvent; -import jakarta.faces.event.ValueChangeEvent; -import jakarta.faces.event.ValueChangeListener; -import jakarta.faces.render.Renderer; -import jakarta.faces.validator.BeanValidator; -import jakarta.faces.validator.Validator; -import jakarta.faces.validator.ValidatorException; - -/** - *

      - * UIInput is a {@link UIComponent} that represents a component that both - * displays output to the user (like {@link UIOutput} components do) and processes request parameters on the subsequent - * request that need to be decoded. There are no restrictions on the data type of the local value, or the object - * referenced by the value binding expression (if any); however, individual {@link jakarta.faces.render.Renderer}s will - * generally impose restrictions on the type of data they know how to display. - *

      - * - *

      - * During the Apply Request Values phase of the request processing lifecycle, the decoded value of this - * component, usually but not necessarily a String, must be stored - but not yet converted - using - * setSubmittedValue(). If the component wishes to indicate that no particular value was submitted, it can - * either do nothing, or set the submitted value to null. - *

      - * - *

      - * By default, during the Process Validators phase of the request processing lifecycle, the submitted value - * will be converted to a typesafe object, and, if validation succeeds, stored as a local value using - * setValue(). However, if the immediate property is set to true, this processing - * will occur instead at the end of the Apply Request Values phase. - *

      - * - *

      - * During the Render Response phase of the request processing lifecycle, conversion for output occurs as for - * {@link UIOutput}. - *

      - * - *

      - * When the validate() method of this {@link UIInput} detects that a value change has actually occurred, - * and that all validations have been successfully passed, it will queue a {@link ValueChangeEvent}. Later on, the - * broadcast() method will ensure that this event is broadcast to all interested listeners. This event will - * be delivered by default in the Process Validators phase, but can be delivered instead during Apply - * Request Values if the immediate property is set to true. - * If the validation fails, the implementation must call - * {@link FacesContext#validationFailed}. - *

      - * - *

      - * By default, the rendererType property must be set to "Text". This value can be changed by - * calling the setRendererType() method. - *

      - */ -public class UIInput extends UIOutput implements EditableValueHolder { - - private static final String BEANS_VALIDATION_AVAILABLE = "jakarta.faces.private.BEANS_VALIDATION_AVAILABLE"; - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.Input"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.Input"; - - /** - *

      - * The message identifier of the {@link jakarta.faces.application.FacesMessage} to be created if a conversion error - * occurs, and neither the page author nor the {@link ConverterException} provides a message. - *

      - */ - public static final String CONVERSION_MESSAGE_ID = "jakarta.faces.component.UIInput.CONVERSION"; - - /** - *

      - * The message identifier of the {@link jakarta.faces.application.FacesMessage} to be created if a required check fails. - *

      - */ - public static final String REQUIRED_MESSAGE_ID = "jakarta.faces.component.UIInput.REQUIRED"; - - /** - *

      - * The message identifier of the {@link jakarta.faces.application.FacesMessage} to be created if a model update error - * occurs, and the thrown exception has no message. - *

      - */ - public static final String UPDATE_MESSAGE_ID = "jakarta.faces.component.UIInput.UPDATE"; - - /** - *

      - * The name of a context parameter that indicates how empty values should be handled with respect to validation. See - * {@link #validateValue} for the allowable values and specification of how they should be interpreted. - *

      - */ - - public static final String VALIDATE_EMPTY_FIELDS_PARAM_NAME = "jakarta.faces.VALIDATE_EMPTY_FIELDS"; - - /** - *

      - * The name of a context parameter that indicates how empty strings need to be interpreted. - *

      - */ - public static final String EMPTY_STRING_AS_NULL_PARAM_NAME = "jakarta.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL"; - - /** - *

      - * If this param is set, and calling toLowerCase().equals("true") on a String representation of its value returns true, - * validation must be performed, even when there is no corresponding value for this component in the incoming request. - * See {@link #validate}. - *

      - */ - public static final String ALWAYS_PERFORM_VALIDATION_WHEN_REQUIRED_IS_TRUE = "jakarta.faces.ALWAYS_PERFORM_VALIDATION_WHEN_REQUIRED_IS_TRUE"; - - private static final Validator[] EMPTY_VALIDATOR = new Validator[0]; - - private transient Boolean emptyStringIsNull; - - private transient Boolean validateEmptyFields; - - private transient Boolean isSetAlwaysValidateRequired; - - enum PropertyKeys { - /** - *

      - * The "localValueSet" state for this component. - */ - localValueSet, - - /** - *

      - * If the input is required or not. - *

      - */ - required, - - /** - *

      - * Custom message to be displayed if input is required but non was submitted. - *

      - */ - requiredMessage, - - /** - *

      - * Custom message to be displayed when conversion fails. - *

      - */ - converterMessage, - - /** - *

      - * Custom message to be displayed when validation fails. - *

      - */ - validatorMessage, - - /** - *

      - * Flag indicating whether or not this component is valid. - *

      - */ - valid, - - /** - *

      - * Flag indicating when conversion/validation should occur. - *

      - */ - immediate, - - } - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UIInput} instance with default property values. - *

      - */ - public UIInput() { - - super(); - setRendererType("jakarta.faces.Text"); - - } - - // -------------------------------------------------------------- Properties - - @Override - public String getFamily() { - - return COMPONENT_FAMILY; - - } - - /** - *

      - * The submittedValue value of this {@link UIInput} component. - *

      - */ - private transient Object submittedValue = null; - - /** - *

      - * Return the submittedValue value of this {@link UIInput} component. This method should only be used by the - * decode() and validate() method of this component, or its corresponding {@link Renderer}. - *

      - */ - @Override - public Object getSubmittedValue() { - if (submittedValue == null && !isValid() && considerEmptyStringNull(FacesContext.getCurrentInstance())) { // JAVASERVERFACES_SPEC_PUBLIC-671 - return ""; - } else { - return submittedValue; - } - } - - /** - *

      - * Set the submittedValue value of this {@link UIInput} component. This method should only be used by the - * decode() and validate() method of this component, or its corresponding {@link Renderer}. - *

      - * - * @param submittedValue The new submitted value - */ - @Override - public void setSubmittedValue(Object submittedValue) { - - this.submittedValue = submittedValue; - - } - - /** - *

      - * If there is a local value, return it, otherwise return the result of calling {@code super.getVaue()}. - *

      - * - * @since 2.2 - */ - - @Override - public Object getValue() { - return isLocalValueSet() ? getLocalValue() : super.getValue(); - } - - @Override - public void setValue(Object value) { - super.setValue(value); - // Mark the local value as set. - setLocalValueSet(true); - } - - /** - *

      - * Convenience method to reset this component's value to the un-initialized - * state. This method does the following: - *

      - * - *

      - * Call {@link UIOutput#setValue}. - *

      - * - *

      - * Call {@link #setSubmittedValue} passing null. - *

      - * - *

      - * Clear state for property localValueSet. - *

      - * - *

      - * Clear state for property valid. - *

      - * - *

      - * Upon return from this call if the instance had a ValueBinding associated with it for the "value" - * property, this binding is evaluated when {@link UIOutput#getValue} is called. Otherwise, null is - * returned from getValue(). - *

      - */ - - @Override - public void resetValue() { - super.resetValue(); - setSubmittedValue(null); - getStateHelper().remove(PropertyKeys.localValueSet); - getStateHelper().remove(PropertyKeys.valid); - } - - /** - * Return the "local value set" state for this component. Calls to setValue() automatically reset this - * property to true. - */ - @Override - public boolean isLocalValueSet() { - return (Boolean) getStateHelper().eval(PropertyKeys.localValueSet, false); - } - - /** - * Sets the "local value set" state for this component. - */ - @Override - public void setLocalValueSet(boolean localValueSet) { - getStateHelper().put(PropertyKeys.localValueSet, localValueSet); - } - - /** - *

      - * Return the "required field" state for this component. - *

      - */ - @Override - public boolean isRequired() { - - return (Boolean) getStateHelper().eval(PropertyKeys.required, false); - - } - - /** - *

      - * If there has been a call to {@link #setRequiredMessage} on this instance, return the message. Otherwise, call - * {@link #getValueExpression} passing the key "requiredMessage", get the result of the expression, and return it. Any - * {@link ELException}s thrown during the call to getValue() must be wrapped in a {@link FacesException} - * and rethrown. - * - * @return the required message. - */ - - public String getRequiredMessage() { - - return (String) getStateHelper().eval(PropertyKeys.requiredMessage); - - } - - /** - *

      - * Override any {@link ValueExpression} set for the "requiredMessage" with the literal argument provided to this method. - * Subsequent calls to {@link #getRequiredMessage} will return this value; - *

      - * - * @param message the literal message value to be displayed in the event the user hasn't supplied a value and one is - * required. - */ - - public void setRequiredMessage(String message) { - - getStateHelper().put(PropertyKeys.requiredMessage, message); - - } - - /** - *

      - * If there has been a call to {@link #setConverterMessage} on this instance, return the message. Otherwise, call - * {@link #getValueExpression} passing the key "converterMessage", get the result of the expression, and return it. Any - * {@link ELException}s thrown during the call to getValue() must be wrapped in a {@link FacesException} - * and rethrown. - * - * @return the converter message. - */ - - public String getConverterMessage() { - - return (String) getStateHelper().eval(PropertyKeys.converterMessage); - - } - - /** - *

      - * Override any {@link ValueExpression} set for the "converterMessage" with the literal argument provided to this - * method. Subsequent calls to {@link #getConverterMessage} will return this value; - *

      - * - * @param message the literal message value to be displayed in the event conversion fails. - */ - - public void setConverterMessage(String message) { - - getStateHelper().put(PropertyKeys.converterMessage, message); - - } - - /** - *

      - * If there has been a call to {@link #setValidatorMessage} on this instance, return the message. Otherwise, call - * {@link #getValueExpression} passing the key "validatorMessage", get the result of the expression, and return it. Any - * {@link ELException}s thrown during the call to getValue() must be wrapped in a {@link FacesException} - * and rethrown. - * - * @return the validator message. - */ - - public String getValidatorMessage() { - - return (String) getStateHelper().eval(PropertyKeys.validatorMessage); - - } - - /** - *

      - * Override any {@link ValueExpression} set for the "validatorMessage" with the literal argument provided to this - * method. Subsequent calls to {@link #getValidatorMessage} will return this value; - *

      - * - * @param message the literal message value to be displayed in the event validation fails. - */ - - public void setValidatorMessage(String message) { - - getStateHelper().put(PropertyKeys.validatorMessage, message); - - } - - @Override - public boolean isValid() { - - return (Boolean) getStateHelper().eval(PropertyKeys.valid, true); - - } - - @Override - public void setValid(boolean valid) { - - getStateHelper().put(PropertyKeys.valid, valid); - - } - - /** - *

      - * Set the "required field" state for this component. - *

      - * - * @param required The new "required field" state - */ - @Override - public void setRequired(boolean required) { - - getStateHelper().put(PropertyKeys.required, required); - - } - - @Override - public boolean isImmediate() { - - return (Boolean) getStateHelper().eval(PropertyKeys.immediate, false); - - } - - @Override - public void setImmediate(boolean immediate) { - - getStateHelper().put(PropertyKeys.immediate, immediate); - - } - - - // ----------------------------------------------------- UIComponent Methods - - /** - *

      - * In addition to the actions taken in {@link UIOutput} when {@link PartialStateHolder#markInitialState()} is called, - * check if any of the installed {@link Validator}s are PartialStateHolders and if so, call - * {@link jakarta.faces.component.PartialStateHolder#markInitialState()} as appropriate. - *

      - */ - @Override - public void markInitialState() { - super.markInitialState(); - if (validators != null) { - validators.markInitialState(); - } - - } - - @Override - public void clearInitialState() { - if (initialStateMarked()) { - super.clearInitialState(); - if (validators != null) { - validators.clearInitialState(); - } - } - - } - - /** - *

      - * Specialized decode behavior on top of that provided by the superclass. In addition to the standard - * processDecodes behavior inherited from {@link UIComponentBase}, calls validate() if the the - * immediate property is true; if the component is invalid afterwards or a RuntimeException is - * thrown, calls {@link FacesContext#renderResponse}. - *

      - * - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void processDecodes(FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - // Skip processing if our rendered flag is false - if (!isRendered()) { - return; - } - - super.processDecodes(context); - - if (isImmediate()) { - executeValidate(context); - } - } - - /** - *

      - * In addition to the standard processValidators behavior - * inherited from {@link UIComponentBase}, calls validate() if the immediate property is false - * (which is the default); if the component is invalid afterwards, calls {@link FacesContext#renderResponse}. - * To ensure the {@code PostValidateEvent} is published at the proper time, this - * component must be validated first, followed by the component's children and facets. If a - * RuntimeException is thrown during validation processing, calls {@link FacesContext#renderResponse} and - * re-throw the exception. - *

      - * - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void processValidators(FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - // Skip processing if our rendered flag is false - if (!isRendered()) { - return; - } - - pushComponentToEL(context, this); - - if (!isImmediate()) { - Application application = context.getApplication(); - application.publishEvent(context, PreValidateEvent.class, this); - executeValidate(context); - application.publishEvent(context, PostValidateEvent.class, this); - } - for (Iterator i = getFacetsAndChildren(); i.hasNext();) { - i.next().processValidators(context); - } - - popComponentFromEL(context); - } - - /** - *

      - * In addition to the standard processUpdates behavior inherited from {@link UIComponentBase}, calls - * updateModel(). If the component is invalid afterwards, calls {@link FacesContext#renderResponse}. If a - * RuntimeException is thrown during update processing, calls {@link FacesContext#renderResponse} and - * re-throw the exception. - *

      - * - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void processUpdates(FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - // Skip processing if our rendered flag is false - if (!isRendered()) { - return; - } - - super.processUpdates(context); - - pushComponentToEL(context, this); - - try { - updateModel(context); - } catch (RuntimeException e) { - context.renderResponse(); - throw e; - } finally { - popComponentFromEL(context); - } - - if (!isValid()) { - context.renderResponse(); - } - } - - /** - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void decode(FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - // Force validity back to "true" - setValid(true); - super.decode(context); - } - - /** - *

      - * Perform the following algorithm to update the model data associated with - * this {@link UIInput}, if any, as appropriate. - *

      - *
        - *
      • If the valid property of this component is false, take no further action.
      • - *
      • If the localValueSet property of this component is false, take no further action.
      • - *
      • If no {@link ValueExpression} for value exists, take no further action.
      • - *
      • Call setValue() method of the {@link ValueExpression} to update the value that the - * {@link ValueExpression} points at.
      • - *
      • If the setValue() method returns successfully: - *
          - *
        • Clear the local value of this {@link UIInput}.
        • - *
        • Set the localValueSet property of this {@link UIInput} to false.
        • - *
        - *
      • - *
      • If the setValue() method throws an Exception: - *
          - *
        • Enqueue an error message. Create a {@link FacesMessage} with the id - * {@link #UPDATE_MESSAGE_ID}. Create a {@link UpdateModelException}, passing the FacesMessage and the - * caught exception to the constructor. Create an {@link ExceptionQueuedEventContext}, passing the - * FacesContext, the UpdateModelException, this component instance, and - * {@link PhaseId#UPDATE_MODEL_VALUES} to its constructor. Call {@link FacesContext#getExceptionHandler} and then call - * {@link ExceptionHandler#processEvent}, passing the ExceptionQueuedEventContext.
        • - *
        • Set the valid property of this {@link UIInput} to false.
        • - *
        - * The exception must not be re-thrown. This enables tree traversal to continue for this lifecycle phase, as in all the - * other lifecycle phases.
      • - *
      - * - * @param context {@link FacesContext} for the request we are processing - * @throws NullPointerException if context is null - */ - public void updateModel(FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - if (!isValid() || !isLocalValueSet()) { - return; - } - ValueExpression ve = getValueExpression("value"); - if (ve != null) { - Throwable caught = null; - FacesMessage message = null; - try { - ve.setValue(context.getELContext(), getLocalValue()); - resetValue(); - } catch (ELException e) { - caught = e; - String messageStr = e.getMessage(); - Throwable result = e.getCause(); - while (null != result && result.getClass().isAssignableFrom(ELException.class)) { - messageStr = result.getMessage(); - result = result.getCause(); - } - if (null == messageStr) { - message = MessageFactory.getMessage(context, UPDATE_MESSAGE_ID, MessageFactory.getLabel(context, this)); - } else { - message = new FacesMessage(FacesMessage.SEVERITY_ERROR, messageStr, messageStr); - } - setValid(false); - } catch (Exception e) { - caught = e; - message = MessageFactory.getMessage(context, UPDATE_MESSAGE_ID, MessageFactory.getLabel(context, this)); - setValid(false); - } - if (caught != null) { - assert message != null; - // PENDING(edburns): verify this is in the spec. - @SuppressWarnings({ "ThrowableInstanceNeverThrown" }) - UpdateModelException toQueue = new UpdateModelException(message, caught); - ExceptionQueuedEventContext eventContext = new ExceptionQueuedEventContext(context, toQueue, this, PhaseId.UPDATE_MODEL_VALUES); - context.getApplication().publishEvent(context, ExceptionQueuedEvent.class, eventContext); - - } - - } - } - - // ------------------------------------------------------ Validation Methods - - /** - *

      - * Perform the following algorithm - * to validate the local value of this {@link UIInput}. - *

      - * - *
        - * - *
      • Retrieve the submitted value with {@link #getSubmittedValue}. If this returns null, - * and the value of the {@link #ALWAYS_PERFORM_VALIDATION_WHEN_REQUIRED_IS_TRUE} - * context-param is true (ignoring case), examine the value of the "required" property. If the value of "required" is - * true, continue as below. If the value of "required" is false or the required attribute is not set, exit without - * further processing. If the context-param is not set, or is set to false (ignoring case), exit without further - * processing. (This indicates that no value was submitted for this component.)
      • - * - *
      • If the - * jakarta.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL context parameter value is - * true (ignoring case), and getSubmittedValue() returns a zero-length String - * call {@link #setSubmittedValue}, passing null as the argument and continue processing using - * null as the current submitted value.
      • - * - *
      • Convert the submitted value into a "local value" of the appropriate data type by calling - * {@link #getConvertedValue}.
      • - *
      • If conversion fails: - *
          - *
        • Enqueue an appropriate error message by calling the addMessage() method on the - * FacesContext.
        • - *
        • Set the valid property on this component to false
        • - *
        - *
      • - * - *
      • Validate the property by calling {@link #validateValue}.
      • - * - *
      • If the valid property of this component is still true, retrieve the previous value of - * the component (with getValue()), store the new local value using setValue(), and reset the - * submitted value to null with a call to {@link #setSubmittedValue} passing - * {@code null} as the argument. If the local value is different from the previous value of this component, - * as determined by a call to {@link #compareValues}, fire a - * {@link ValueChangeEvent} to be broadcast to all interested listeners.
      • - * - *
      - *

      - * Application components implementing {@link UIInput} that wish to perform validation with logic embedded in the - * component should perform their own correctness checks, and then call the super.validate() method to - * perform the standard processing described above. - *

      - * - * @param context The {@link FacesContext} for the current request - * @throws NullPointerException if context is null - */ - public void validate(FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - // Submitted value == null means "the component was not submitted - // at all". - Object submittedValue = getSubmittedValue(); - if (submittedValue == null) { - if (isRequired() && isSetAlwaysValidateRequired(context)) { - // continue as below - } else { - if (this instanceof UIViewParameter && considerEmptyStringNull(context)) { - // https://github.com/eclipse-ee4j/mojarra/issues/4550 - // https://github.com/eclipse-ee4j/mojarra/issues/4716 - validateValue(context, getConvertedValue(context, submittedValue)); - } - return; - } - } - - // If non-null, an instanceof String, and we're configured to treat - // zero-length Strings as null: - // call setSubmittedValue(null) - if ((considerEmptyStringNull(context) - && submittedValue instanceof String - && ((String) submittedValue).length() == 0)) { - setSubmittedValue(null); - submittedValue = null; - } - - Object newValue = null; - - try { - newValue = getConvertedValue(context, submittedValue); - } catch (ConverterException ce) { - addConversionErrorMessage(context, ce); - setValid(false); - if (submittedValue == null) { - setSubmittedValue(""); - } - } - - validateValue(context, newValue); - - // If our value is valid, store the new value, erase the - // "submitted" value, and emit a ValueChangeEvent if appropriate - if (isValid()) { - Object previous = getValue(); - setValue(newValue); - setSubmittedValue(null); - if (compareValues(previous, newValue)) { - queueEvent(new ValueChangeEvent(context, this, previous, newValue)); - } - } - - } - - /* - * Respecting the fact that someone may have decorated FacesContextFactory and thus skipped our saving of this init - * param, look for the init param and return its value. The return is saved in a transient ivar to provide performance - * while not perturbing state saving. - */ - - private boolean isSetAlwaysValidateRequired(FacesContext context) { - if (null != isSetAlwaysValidateRequired) { - return isSetAlwaysValidateRequired; - } - - Boolean bool = (Boolean) context.getAttributes().get(ALWAYS_PERFORM_VALIDATION_WHEN_REQUIRED_IS_TRUE); - if (null != bool) { - isSetAlwaysValidateRequired = bool; - } else { - String val = context.getExternalContext().getInitParameter(ALWAYS_PERFORM_VALIDATION_WHEN_REQUIRED_IS_TRUE); - isSetAlwaysValidateRequired = Boolean.valueOf(val); - } - - return isSetAlwaysValidateRequired; - } - - /** - *

      - * Convert the submitted value into a "local value" of the appropriate data type, if necessary. Employ the following - * algorithm to do so: - *

      - *
        - *
      • If a Renderer is present, call getConvertedValue() to convert the submitted value.
      • - *
      • If no Renderer is present, and the submitted value is a String, locate a {@link Converter} as - * follows: - *
          - *
        • If getConverter() returns a non-null {@link Converter}, use that instance.
        • - *
        • Otherwise, if a value binding for value exists, call getType() on it. - *
            - *
          • If this call returns null, assume the output type is String and perform no - * conversion.
          • - *
          • Otherwise, call Application.createConverter(Class) to locate any registered {@link Converter} - * capable of converting data values of the specified type.
          • - *
          - *
        • - *
        - *
      • If a {@link Converter} instance was located, call its getAsObject() method to perform the - * conversion. If conversion fails, the Converter will have thrown - * a ConverterException which is declared as a checked exception on this method, and thus must be handled - * by the caller.
      • - *
      • Otherwise, use the submitted value without any conversion
      • - *
      - *

      - * This method can be overridden by subclasses for more specific behavior. - *

      - * - * @param context the Faces context. - * @param newSubmittedValue the new submitted value. - * @return the converted value. - */ - protected Object getConvertedValue(FacesContext context, Object newSubmittedValue) throws ConverterException { - Renderer renderer = getRenderer(context); - Object newValue; - - if (renderer != null) { - newValue = renderer.getConvertedValue(context, this, newSubmittedValue); - } else if (newSubmittedValue instanceof String) { - // If there's no Renderer, and we've got a String, - // run it through the Converter (if any) - Converter converter = getConverterWithType(context); - if (converter != null) { - newValue = converter.getAsObject(context, this, (String) newSubmittedValue); - } else { - newValue = newSubmittedValue; - } - } else { - newValue = newSubmittedValue; - } - return newValue; - } - - /** - *

      - * Set the "valid" property according to the below algorithm. - *

      - * - *
        - * - *
      • - * - *

        - * If the valid property on this component is still true, and the required - * property is also true, ensure that the local value is not empty (where "empty" is defined as - * null or a zero-length String). If the local value is empty: - *

        - * - *
          - * - *
        • - *

          - * Enqueue an appropriate error message by calling the addMessage() method on the FacesContext - * instance for the current request. If the {@link #getRequiredMessage} returns non-null, use the value as - * the summary and detail in the {@link FacesMessage} that is enqueued on the - * FacesContext, otherwise use the message for the {@link #REQUIRED_MESSAGE_ID}.

        • - * - *
        • Set the valid property on this component to false.
        • - * - *
        • - *

          - * If calling {@link ValidatorException#getFacesMessages} returns non-null, each message should be added to - * the FacesContext. Otherwise the single message returned from {@link ValidatorException#getFacesMessage} - * should be added. - *

          - *
        • - * - *
        - * - *
      • - * - *
      • - * - *

        - * Otherwise, if the valid property on this component is still true, take the following action - * to determine if validation of this component should proceed. - *

        - * - *
          - * - *
        • - *

          - * If the value is not empty, validation should proceed. - *

          - *
        • - * - *
        • - *

          - * If the value is empty, but the system has been directed to validate empty fields, validation should proceed. The - * implementation must obtain the init parameter Map from the ExternalContext and inspect the - * value for the key given by the value of the symbolic constant {@link #VALIDATE_EMPTY_FIELDS_PARAM_NAME}. If there is - * no value under that key, use the same key and look in the application map from the ExternalContext. If - * the value is null or equal to the string “auto” (without the quotes) take - * appropriate action to determine if Bean Validation is present in the runtime environment. If not, validation should - * not proceed. If so, validation should proceed. If the value is equal (ignoring case) to - * “true” (without the quotes) validation should proceed. Otherwise, validation should not - * proceed. - *

          - *
        • - * - *
        - * - *

        - * If the above determination indicates that validation should proceed, call the validate() method of each - * {@link Validator} registered for this {@link UIInput}, followed by the method pointed at by the - * validatorBinding property (if any). If any of these validators or the method throws a - * {@link ValidatorException}, catch the exception, add its message (if any) to the {@link FacesContext}, and set the - * valid property of this component to false.

      • - * - *
      - * - * @param context the Faces context. - * @param newValue the new value. - */ - - protected void validateValue(FacesContext context, Object newValue) { - // If our value is valid, enforce the required property if present - if (isValid() && isRequired() && isEmpty(newValue)) { - String requiredMessageStr = getRequiredMessage(); - FacesMessage message; - if (null != requiredMessageStr) { - message = new FacesMessage(FacesMessage.SEVERITY_ERROR, requiredMessageStr, requiredMessageStr); - } else { - message = MessageFactory.getMessage(context, REQUIRED_MESSAGE_ID, MessageFactory.getLabel(context, this)); - } - context.addMessage(getClientId(context), message); - setValid(false); - } - - // If our value is valid and not empty or empty w/ validate empty fields enabled, call all validators - if (isValid() && (!isEmpty(newValue) || validateEmptyFields(context))) { - if (validators != null) { - Validator[] validators = this.validators.asArray(Validator.class); - for (Validator validator : validators) { - try { - validator.validate(context, this, newValue); - } catch (ValidatorException ve) { - // If the validator throws an exception, we're - // invalid, and we need to add a message - setValid(false); - FacesMessage message; - String validatorMessageString = getValidatorMessage(); - - if (null != validatorMessageString) { - message = new FacesMessage(FacesMessage.SEVERITY_ERROR, validatorMessageString, validatorMessageString); - message.setSeverity(FacesMessage.SEVERITY_ERROR); - } else { - Collection messages = ve.getFacesMessages(); - if (null != messages) { - message = null; - String cid = getClientId(context); - for (FacesMessage m : messages) { - context.addMessage(cid, m); - } - } else { - message = ve.getFacesMessage(); - } - } - if (message != null) { - context.addMessage(getClientId(context), message); - } - } - } - } - } - } - - /** - *

      - * Return true if the new value is different from the previous value. First compare the two values by - * passing value to the equals method on argument previous. If that method returns - * true, return true. If that method returns false, and both arguments implement - * java.lang.Comparable, compare the two values by passing value to the compareTo - * method on argument previous. Return true if this method returns 0, - * false otherwise. - *

      - * - * @param previous old value of this component (if any) - * @param value new value of this component (if any) - * @return true if the new value is different from the previous value, false otherwise. - */ - protected boolean compareValues(Object previous, Object value) { - boolean result = true; - - if (previous == null) { - result = value != null; - } else if (value == null) { - result = true; - } else { - boolean previousEqualsValue = previous.equals(value); - if (!previousEqualsValue && previous instanceof Comparable && value instanceof Comparable) { - try { - result = !(0 == ((Comparable) previous).compareTo(value)); - } catch (ClassCastException cce) { - // Comparable throws CCE if the types prevent a comparison - result = true; - } - } else { - result = !previousEqualsValue; - } - } - return result; - } - - /** - * Executes validation logic. - */ - private void executeValidate(FacesContext context) { - try { - validate(context); - } catch (RuntimeException e) { - context.renderResponse(); - throw e; - } - - if (!isValid()) { - context.validationFailed(); - context.renderResponse(); - } - } - - /** - *

      - * Is the value denoting an empty value. - *

      - * - *

      - * If the value is null, return true. If the value is a String and it is the empty string, return true. If the value is - * an array and the array length is 0, return true. If the value is a List and the List is empty, return true. If the - * value is a Collection and the Collection is empty, return true. If the value is a Map and the Map is empty, return - * true. In all other cases, return false. - *

      - * - * @param value the value to check. - * @return true if it is, false otherwise. - */ - public static boolean isEmpty(Object value) { - - if (value == null) { - return true; - } else if (value instanceof String && ((String) value).length() < 1) { - return true; - } else if (value.getClass().isArray()) { - if (0 == java.lang.reflect.Array.getLength(value)) { - return true; - } - } else if (value instanceof List) { - if (((List) value).isEmpty()) { - return true; - } - } else if (value instanceof Collection) { - if (((Collection) value).isEmpty()) { - return true; - } - } else if (value instanceof Map && ((Map) value).isEmpty()) { - return true; - } - return false; - } - - /** - *

      - * The set of {@link Validator}s associated with this UIComponent. - *

      - */ - AttachedObjectListHolder validators; - - /** - *

      - * Add a {@link Validator} instance to the set associated with this {@link UIInput}. - *

      - * - * @param validator The {@link Validator} to add - * @throws NullPointerException if validator is null - */ - @Override - public void addValidator(Validator validator) { - - if (validator == null) { - throw new NullPointerException(); - } - - if (validators == null) { - validators = new AttachedObjectListHolder<>(); - } - validators.add(validator); - - } - - /** - *

      - * Return the set of registered {@link Validator}s for this {@link UIInput} instance. If there are no registered - * validators, a zero-length array is returned. - *

      - */ - @Override - public Validator[] getValidators() { - - return validators != null ? validators.asArray(Validator.class) : EMPTY_VALIDATOR; - - } - - /** - *

      - * Remove a {@link Validator} instance from the set associated with this {@link UIInput}, if it was previously - * associated. Otherwise, do nothing. - *

      - * - * @param validator The {@link Validator} to remove - */ - @Override - public void removeValidator(Validator validator) { - - if (validator == null) { - return; - } - - if (validators != null) { - validators.remove(validator); - } - - } - - // ------------------------------------------------ Event Processing Methods - - /** - *

      - * Add a new {@link ValueChangeListener} to the set of listeners interested in being notified when - * {@link ValueChangeEvent}s occur. - *

      - * - * @param listener The {@link ValueChangeListener} to be added - * @throws NullPointerException if listener is null - */ - @Override - public void addValueChangeListener(ValueChangeListener listener) { - - addFacesListener(listener); - - } - - /** - *

      - * Return the set of registered {@link ValueChangeListener}s for this {@link UIInput} instance. If there are no - * registered listeners, a zero-length array is returned. - *

      - */ - @Override - public ValueChangeListener[] getValueChangeListeners() { - - return (ValueChangeListener[]) getFacesListeners(ValueChangeListener.class); - } - - /** - *

      - * Remove an existing {@link ValueChangeListener} (if any) from the set of listeners interested in being notified when - * {@link ValueChangeEvent}s occur. - *

      - * - * @param listener The {@link ValueChangeListener} to be removed - * @throws NullPointerException if listener is null - */ - @Override - public void removeValueChangeListener(ValueChangeListener listener) { - - removeFacesListener(listener); - - } - - // ----------------------------------------------------- StateHolder Methods - - @Override - public Object saveState(FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - Object[] result = null; - - Object superState = super.saveState(context); - Object validatorsState = validators != null ? validators.saveState(context) : null; - - if (superState != null || validatorsState != null) { - result = new Object[] { superState, validatorsState }; - } - - return result; - } - - @Override - public void restoreState(FacesContext context, Object state) { - - if (context == null) { - throw new NullPointerException(); - } - - if (state == null) { - return; - } - Object[] values = (Object[]) state; - super.restoreState(context, values[0]); - if (values[1] != null) { - if (validators == null) { - validators = new AttachedObjectListHolder<>(); - } - validators.restoreState(context, values[1]); - } - - } - - private Converter getConverterWithType(FacesContext context) { - Converter converter = getConverter(); - if (converter != null) { - return converter; - } - - ValueExpression valueExpression = getValueExpression("value"); - if (valueExpression == null) { - return null; - } - - Class converterType; - try { - converterType = valueExpression.getType(context.getELContext()); - } catch (ELException e) { - throw new FacesException(e); - } - - // if converterType is null, String, or Object, assume - // no conversion is needed - if (converterType == null || converterType == String.class || converterType == Object.class) { - return null; - } - - // if getType returns a type for which we support a default - // conversion, acquire an appropriate converter instance. - try { - Application application = context.getApplication(); - return application.createConverter(converterType); - } catch (Exception e) { - return null; - } - } - - private void addConversionErrorMessage(FacesContext context, ConverterException ce) { - FacesMessage message; - String converterMessageString = getConverterMessage(); - if (null != converterMessageString) { - message = new FacesMessage(FacesMessage.SEVERITY_ERROR, converterMessageString, converterMessageString); - } else { - message = ce.getFacesMessage(); - if (message == null) { - message = MessageFactory.getMessage(context, CONVERSION_MESSAGE_ID); - if (message.getDetail() == null) { - message.setDetail(ce.getMessage()); - } - } - } - - context.addMessage(getClientId(context), message); - } - - boolean considerEmptyStringNull(FacesContext ctx) { - - if (emptyStringIsNull == null) { - String val = ctx.getExternalContext().getInitParameter(EMPTY_STRING_AS_NULL_PARAM_NAME); - emptyStringIsNull = Boolean.valueOf(val); - } - - return emptyStringIsNull; - - } - - private boolean validateEmptyFields(FacesContext ctx) { - - if (validateEmptyFields == null) { - ExternalContext extCtx = ctx.getExternalContext(); - String val = extCtx.getInitParameter(VALIDATE_EMPTY_FIELDS_PARAM_NAME); - - if (null == val) { - val = (String) extCtx.getApplicationMap().get(VALIDATE_EMPTY_FIELDS_PARAM_NAME); - } - if (val == null || "auto".equals(val)) { - validateEmptyFields = isBeansValidationAvailable(ctx); - } else { - validateEmptyFields = Boolean.valueOf(val); - } - } - - return validateEmptyFields; - - } - - private boolean isBeansValidationAvailable(FacesContext context) { - boolean result = false; - - Map appMap = context.getExternalContext().getApplicationMap(); - - if (appMap.containsKey(BEANS_VALIDATION_AVAILABLE)) { - result = (Boolean) appMap.get(BEANS_VALIDATION_AVAILABLE); - } else { - try { - new BeanValidator(); - appMap.put(BEANS_VALIDATION_AVAILABLE, result = true); - } catch (Throwable t) { - appMap.put(BEANS_VALIDATION_AVAILABLE, Boolean.FALSE); - } - } - - return result; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UIMessage.java b/impl/src/main/java/jakarta/faces/component/UIMessage.java deleted file mode 100644 index 07ee933970..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIMessage.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.faces.context.FacesContext; - -/** - *

      - * This component is responsible for displaying messages for a specific - * {@link UIComponent}, identified by a clientId or component id - * relative to the closest ancestor NamingContainer. The component obtains the messages from the - * {@link FacesContext}. - *

      - * - *

      - * By default, the rendererType property must be set to "jakarta.faces.Message". This value - * can be changed by calling the setRendererType() method. - *

      - * - * - */ - -public class UIMessage extends UIComponentBase { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.Message"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.Message"; - - enum PropertyKeys { - - forValue("for"), showDetail, showSummary, redisplay; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - - } - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UIMessage} instance with default property values. - *

      - */ - public UIMessage() { - - super(); - setRendererType("jakarta.faces.Message"); - - } - - // -------------------------------------------------------------- Properties - - @Override - public String getFamily() { - - return COMPONENT_FAMILY; - - } - - /** - *

      - * Return the Identifier of the component for which to render error messages. - * If this component is within the same NamingContainer as the target component, this must be the component identifier. - * Otherwise, it must be an absolute component identifier (starting with ":"). See the {@link UIComponent#findComponent} - * for more information. - *

      - * - * @return the for client identifier. - */ - public String getFor() { - - return (String) getStateHelper().eval(PropertyKeys.forValue); - - } - - /** - *

      - * Set the identifier of the component for which this component - * represents associated message(s) (if any). This property must be set before the message is displayed. - *

      - * - * @param newFor The new client id - */ - public void setFor(String newFor) { - - getStateHelper().put(PropertyKeys.forValue, newFor); - - } - - /** - *

      - * Return the flag indicating whether the detail property of the associated message(s) should be displayed. - * Defaults to true. - *

      - * - * @return true if detail is to be shown, false otherwise. - */ - public boolean isShowDetail() { - - return (Boolean) getStateHelper().eval(PropertyKeys.showDetail, true); - - } - - /** - *

      - * Set the flag indicating whether the detail property of the associated message(s) should be displayed. - *

      - * - * @param showDetail The new flag - */ - public void setShowDetail(boolean showDetail) { - - getStateHelper().put(PropertyKeys.showDetail, showDetail); - - } - - /** - *

      - * Return the flag indicating whether the summary property of the associated message(s) should be - * displayed. Defaults to false. - *

      - * - * @return true if the summary is to be shown, false otherwise. - */ - public boolean isShowSummary() { - - return (Boolean) getStateHelper().eval(PropertyKeys.showSummary, false); - - } - - /** - *

      - * Set the flag indicating whether the summary property of the associated message(s) should be displayed. - *

      - * - * @param showSummary The new flag value - */ - public void setShowSummary(boolean showSummary) { - - getStateHelper().put(PropertyKeys.showSummary, showSummary); - - } - - /** - * @return true if this UIMessage instance should redisplay - * {@link jakarta.faces.application.FacesMessage}s that have already been handled, otherwise returns false. - * By default this method will always return true if {@link #setRedisplay(boolean)} has not been called. - * - * @since 2.0 - */ - public boolean isRedisplay() { - - return (Boolean) getStateHelper().eval(PropertyKeys.redisplay, true); - - } - - /** - *

      - * Set the flag indicating whether the detail property of the associated message(s) should be displayed. - *

      - * - * @param redisplay flag indicating whether previously handled messages are redisplayed or not - * - * @since 2.0 - */ - public void setRedisplay(boolean redisplay) { - - getStateHelper().put(PropertyKeys.redisplay, redisplay); - - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UIMessages.java b/impl/src/main/java/jakarta/faces/component/UIMessages.java deleted file mode 100644 index 5cc973c525..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIMessages.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.faces.context.FacesContext; - -/** - *

      - * The renderer for this component is responsible for obtaining the messages from the {@link FacesContext} and - * displaying them to the user. - *

      - * - *

      - * This component supports the Messages renderer-type. - *

      - * - *

      - * By default, the rendererType property must be set to "jakarta.faces.Messages". This value - * can be changed by calling the setRendererType() method. - *

      - * - * - */ - -public class UIMessages extends UIComponentBase { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.Messages"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.Messages"; - - enum PropertyKeys { - forValue("for"), globalOnly, showDetail, showSummary, redisplay; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UIMessages} instance with default property values. - *

      - */ - public UIMessages() { - - super(); - setRendererType("jakarta.faces.Messages"); - - } - - // -------------------------------------------------------------- Properties - - @Override - public String getFamily() { - - return COMPONENT_FAMILY; - - } - - /** - *

      - * Return the client identifier of the component for which this component represents associated message(s) (if any). - *

      - * - * @return the for client identifier. - */ - public String getFor() { - - return (String) getStateHelper().eval(PropertyKeys.forValue); - - } - - /** - *

      - * Set the client identifier of the component for which this component represents associated message(s) (if any). This - * property must be set before the message is displayed. - *

      - * - * @param newFor The new client id - */ - public void setFor(String newFor) { - - getStateHelper().put(PropertyKeys.forValue, newFor); - - } - - /** - *

      - * Return the flag indicating whether only global messages (that is, messages with no associated client identifier) - * should be rendered. Mutually exclusive with the "for" property which takes precedence. Defaults to false. - *

      - * - * @return true if only global messages are to be shown, false otherwise. - */ - public boolean isGlobalOnly() { - - return (Boolean) getStateHelper().eval(PropertyKeys.globalOnly, false); - - } - - /** - *

      - * Set the flag indicating whether only global messages (that is, messages with no associated client identifier) should - * be rendered. - *

      - * - * @param globalOnly The new flag value - */ - public void setGlobalOnly(boolean globalOnly) { - - getStateHelper().put(PropertyKeys.globalOnly, globalOnly); - - } - - /** - *

      - * Return the flag indicating whether the detail property of the associated message(s) should be displayed. - * Defaults to false. - *

      - * - * @return true if detail is to be shown, false otherwise. - */ - public boolean isShowDetail() { - - return (Boolean) getStateHelper().eval(PropertyKeys.showDetail, false); - - } - - /** - *

      - * Set the flag indicating whether the detail property of the associated message(s) should be displayed. - *

      - * - * @param showDetail The new flag - */ - public void setShowDetail(boolean showDetail) { - - getStateHelper().put(PropertyKeys.showDetail, showDetail); - } - - /** - *

      - * Return the flag indicating whether the summary property of the associated message(s) should be - * displayed. Defaults to true. - *

      - * - * @return true if the summary is to be shown, false otherwise. - */ - public boolean isShowSummary() { - - return (Boolean) getStateHelper().eval(PropertyKeys.showSummary, true); - - } - - /** - *

      - * Set the flag indicating whether the summary property of the associated message(s) should be displayed. - *

      - * - * @param showSummary The new flag value - */ - public void setShowSummary(boolean showSummary) { - - getStateHelper().put(PropertyKeys.showSummary, showSummary); - - } - - /** - * @return true if this UIMessage instance should redisplay - * {@link jakarta.faces.application.FacesMessage}s that have already been handled, otherwise returns false. - * By default this method will always return true if {@link #setRedisplay(boolean)} has not been called. - * - * @since 2.0 - */ - public boolean isRedisplay() { - - return (Boolean) getStateHelper().eval(PropertyKeys.redisplay, true); - - } - - /** - *

      - * Set the flag indicating whether the detail property of the associated message(s) should be displayed. - *

      - * - * @param redisplay flag indicating whether previously handled messages are redisplayed or not - * - * @since 2.0 - */ - public void setRedisplay(boolean redisplay) { - - getStateHelper().put(PropertyKeys.redisplay, redisplay); - - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UINamingContainer.java b/impl/src/main/java/jakarta/faces/component/UINamingContainer.java deleted file mode 100644 index 8c00a87708..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UINamingContainer.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import static com.sun.faces.util.Util.coalesce; -import static jakarta.faces.component.UIViewRoot.UNIQUE_ID_PREFIX; -import static jakarta.faces.component.visit.VisitResult.COMPLETE; -import static java.util.logging.Level.SEVERE; - -import java.util.Collection; -import java.util.logging.Logger; - -import jakarta.faces.component.visit.VisitCallback; -import jakarta.faces.component.visit.VisitContext; -import jakarta.faces.context.FacesContext; - -/** - *

      - * UINamingContainer is a convenience base class for components that wish - * to implement {@link NamingContainer} functionality. - *

      - */ - -public class UINamingContainer extends UIComponentBase implements NamingContainer, UniqueIdVendor, StateHolder { - - // ------------------------------------------------------ Manifest Constants - - private static Logger LOGGER = Logger.getLogger("jakarta.faces.component", "jakarta.faces.LogStrings"); - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.NamingContainer"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.NamingContainer"; - - /** - *

      - * The context-param that allows the separator char for clientId strings to be set on a per-web application basis. - *

      - * - * @since 2.0 - */ - public static final String SEPARATOR_CHAR_PARAM_NAME = "jakarta.faces.SEPARATOR_CHAR"; - - enum PropertyKeys { - lastId - } - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UINamingContainer} instance with default property values. - *

      - */ - public UINamingContainer() { - super(); - setRendererType(null); - } - - // -------------------------------------------------------------- Properties - - @Override - public String getFamily() { - return COMPONENT_FAMILY; - } - - /** - *

      - * Return the character used to separate segments of a clientId. The implementation must determine if there is a - * <context-param> with the value given by the value of the symbolic constant - * {@link #SEPARATOR_CHAR_PARAM_NAME}. If there is a value for this param, the first character of the value must be - * returned from this method. Otherwise, the value of the symbolic constant {@link NamingContainer#SEPARATOR_CHAR} must - * be returned. - *

      - * - * @param context the {@link FacesContext} for the current request - * @return the separator char. - * @since 2.0 - */ - public static char getSeparatorChar(FacesContext context) { - - if (context == null) { - if (LOGGER.isLoggable(SEVERE)) { - LOGGER.log(SEVERE, "UINamingContainer.getSeparatorChar() called with null FacesContext. This indicates a SEVERE error. Returning {0}", - SEPARATOR_CHAR); - } - - return SEPARATOR_CHAR; - } - - Character separatorChar = (Character) context.getAttributes().get(SEPARATOR_CHAR_PARAM_NAME); - if (separatorChar == null) { - String initParam = context.getExternalContext().getInitParameter(SEPARATOR_CHAR_PARAM_NAME); - separatorChar = SEPARATOR_CHAR; - if (initParam != null) { - initParam = initParam.trim(); - if (initParam.length() != 0) { - separatorChar = initParam.charAt(0); - } - } - - context.getAttributes().put(SEPARATOR_CHAR_PARAM_NAME, separatorChar); - } - - return separatorChar; - } - - /** - * @return true if tree should be visited, false otherwise. - * @see UIComponent#visitTree - */ - @Override - public boolean visitTree(VisitContext context, VisitCallback callback) { - - // NamingContainers can optimize partial tree visits by taking advantage - // of the fact that it is possible to detect whether any ids to visit - // exist underneath the NamingContainer. If no such ids exist, there - // is no need to visit the subtree under the NamingContainer. - Collection idsToVisit = context.getSubtreeIdsToVisit(this); - - // If we have ids to visit, let the superclass implementation - // handle the visit - if (!idsToVisit.isEmpty()) { - return super.visitTree(context, callback); - } - - // If we have no child ids to visit, just visit ourselves, if - // we are visitable. - if (isVisitable(context)) { - FacesContext facesContext = context.getFacesContext(); - pushComponentToEL(facesContext, null); - - try { - return context.invokeVisitCallback(this, callback) == COMPLETE; - } finally { - popComponentFromEL(facesContext); - } - } - - // Done visiting this subtree. Return false to allow - // visit to continue. - return false; - } - - @Override - public String createUniqueId(FacesContext context, String seed) { - int lastId = coalesce(getLastId(), 0); - setLastId(++lastId); - - return UNIQUE_ID_PREFIX + coalesce(seed, lastId); - } - - // ----------------------------------------------------- Private Methods - - private Integer getLastId() { - return (Integer) getStateHelper().get(PropertyKeys.lastId); - } - - private void setLastId(Integer lastId) { - getStateHelper().put(PropertyKeys.lastId, lastId); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UIOutcomeTarget.java b/impl/src/main/java/jakarta/faces/component/UIOutcomeTarget.java deleted file mode 100644 index dbb8b60f13..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIOutcomeTarget.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -/** - *

      - * This component is paired with the jakarta.faces.Button or - * jakarta.faces.Link renderers and encapsulates properties relating to the rendering of outcomes directly - * to the response. This enables bookmarkability in Jakarta Faces applications. - *

      - * - * @since 2.0 - */ -public class UIOutcomeTarget extends UIOutput { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.OutcomeTarget"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.OutcomeTarget"; - - enum PropertyKeys { - includeViewParams, outcome, disableClientWindow - } - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UIOutcomeTarget} instance with default property values. - *

      - */ - public UIOutcomeTarget() { - super(); - setRendererType("jakarta.faces.Link"); - } - - // -------------------------------------------------------------- Properties - - @Override - public String getFamily() { - return COMPONENT_FAMILY; - } - - /** - *

      - * Return whether or not the view parameters should be encoded into the target url. - *

      - * - * @return true if the view parameters should be encoded in the url, false otherwise. - * @since 2.0 - */ - public boolean isIncludeViewParams() { - return (Boolean) getStateHelper().eval(PropertyKeys.includeViewParams, false); - } - - /** - *

      - * Set whether or not the page parameters should be encoded into the target url. - *

      - * - * @param includeViewParams The state of the switch for encoding page parameters - * - * @since 2.0 - */ - public void setIncludeViewParams(boolean includeViewParams) { - getStateHelper().put(PropertyKeys.includeViewParams, includeViewParams); - } - - /** - *

      - * Return whether or not the client window should be encoded into the target url. - *

      - * - * @return true if the client window should NOT be encoded in the url, false otherwise. - * @since 2.0 - */ - public boolean isDisableClientWindow() { - return (Boolean) getStateHelper().eval(PropertyKeys.disableClientWindow, false); - } - - /** - *

      - * Set whether or not the client window should be encoded into the target url. - *

      - * - * @param disableClientWindow if @{code true}, the client window will not be included in this outcome target. - * - * @since 2.2 - */ - public void setDisableClientWindow(boolean disableClientWindow) { - getStateHelper().put(PropertyKeys.disableClientWindow, disableClientWindow); - } - - /** - *

      - * Returns the outcome property of the UIOutcomeTarget. This value is passed to the - * {@link jakarta.faces.application.NavigationHandler} when resolving the target url of this component. - *

      - * - * @return the outcome. - * @since 2.0 - */ - public String getOutcome() { - return (String) getStateHelper().eval(PropertyKeys.outcome); - } - - /** - *

      - * Sets the outcome property of the UIOutcomeTarget. This value is passed to the - * NavigationHandler when resolving the target url of this component. - *

      - * - * @since 2.0 - * - * @param outcome the navigation outcome - */ - public void setOutcome(String outcome) { - getStateHelper().put(PropertyKeys.outcome, outcome); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UIOutput.java b/impl/src/main/java/jakarta/faces/component/UIOutput.java deleted file mode 100644 index bb5be933bd..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIOutput.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.faces.context.FacesContext; -import jakarta.faces.convert.Converter; - -/** - *

      - * UIOutput is a {@link UIComponent} that has a - * value, optionally retrieved from a model tier bean via a value expression, that is displayed to the user. The user - * cannot directly modify the rendered value; it is for display purposes only. - *

      - * - *

      - * During the Render Response phase of the request processing lifecycle, the current value of this component - * must be converted to a String (if it is not already), according to the following rules: - *

      - *
        - *
      • If the current value is not null, and is not already a String, locate a - * {@link Converter} (if any) to use for the conversion, as follows: - *
          - *
        • If getConverter() returns a non-null {@link Converter}, use that one, otherwise
        • - *
        • If Application.createConverter(Class), passing the current value's class, returns a non-null - * {@link Converter}, use that one.
        • - *
        - *
      • - *
      • If the current value is not null and a {@link Converter} was located, call its - * getAsString() method to perform the conversion.
      • - *
      • If the current value is not null but no {@link Converter} was located, call toString() - * on the current value to perform the conversion.
      • - *
      - * - *

      - * By default, the rendererType property must be set to "jakarta.faces.Text". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class UIOutput extends UIComponentBase implements ValueHolder { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.Output"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.Output"; - - private static final String FORCE_FULL_CONVERTER_STATE = "com.sun.faces.component.UIOutput.forceFullConverterState"; - - enum PropertyKeys { - value, converter - } - - private Converter converter; - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UIOutput} instance with default property values. - *

      - */ - public UIOutput() { - super(); - setRendererType("jakarta.faces.Text"); - } - - // -------------------------------------------------------------- Properties - - @Override - public String getFamily() { - return COMPONENT_FAMILY; - } - - // --------------------------------------- EditableValueHolder Properties - - @Override - public Converter getConverter() { - - if (converter != null) { - return converter; - } - - return (Converter) getStateHelper().eval(PropertyKeys.converter); - } - - @Override - public void setConverter(Converter converter) { - - clearInitialState(); - // we don't push the converter to the StateHelper - // if it's been explicitly set (i.e. it's not a ValueExpression - // reference - this.converter = converter; - } - - @Override - public Object getLocalValue() { - return getStateHelper().get(PropertyKeys.value); - } - - /** - *

      - * Return the value property. - *

      - * - * @since 2.2 - */ - @Override - public Object getValue() { - return getStateHelper().eval(PropertyKeys.value); - } - - @Override - public void setValue(Object value) { - getStateHelper().put(PropertyKeys.value, value); - } - - /** - *

      - * Convenience method to reset this component's value to the un-initialized state. - *

      - * - * @since 2.2 - */ - public void resetValue() { - getStateHelper().remove(PropertyKeys.value); - } - - /** - *

      - * In addition to the actions taken in {@link UIComponentBase} when {@link PartialStateHolder#markInitialState()} is - * called, check if the installed {@link Converter} is a PartialStateHolder and if it is, call - * {@link jakarta.faces.component.PartialStateHolder#markInitialState()} on it. - *

      - */ - @Override - public void markInitialState() { - super.markInitialState(); - - Converter c = getConverter(); - if (c instanceof PartialStateHolder) { - ((PartialStateHolder) c).markInitialState(); - } - } - - @Override - public void clearInitialState() { - if (initialStateMarked()) { - super.clearInitialState(); - - Converter c = getConverter(); - if (c != null && c instanceof PartialStateHolder) { - ((PartialStateHolder) c).clearInitialState(); - } - } - } - - @Override - public Object saveState(FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - Object converterState = null; - if (converter != null) { - if (!initialStateMarked() || getAttributes().containsKey(FORCE_FULL_CONVERTER_STATE)) { - /* - * Check if our parent component has its initial state marked and we know we don't. That means we are not using the same - * state saving algorithm. So we are going to ALWAYS force to do FSS for the converter. - */ - if (getParent() != null && getParent().initialStateMarked()) { - getAttributes().put(FORCE_FULL_CONVERTER_STATE, true); - if (converter instanceof PartialStateHolder) { - PartialStateHolder partialStateHolder = (PartialStateHolder) converter; - partialStateHolder.clearInitialState(); - } - } - - converterState = saveAttachedState(context, converter); - } else { - if (converter instanceof StateHolder) { - StateHolder stateHolder = (StateHolder) converter; - if (!stateHolder.isTransient()) { - converterState = ((StateHolder) converter).saveState(context); - } - } - } - } - - Object[] values = (Object[]) super.saveState(context); - - if (converterState != null || values != null) { - return new Object[] { values, converterState }; - } - - return values; - } - - @Override - public void restoreState(FacesContext context, Object state) { - - if (context == null) { - throw new NullPointerException(); - } - - if (state == null) { - return; - } - - Object[] values = (Object[]) state; - super.restoreState(context, values[0]); - Object converterState = values[1]; - if (converterState instanceof StateHolderSaver) { - // this means full state was saved and as such - // overwrite any existing converter with the saved - // converter - converter = (Converter) restoreAttachedState(context, converterState); - } else { - // apply any saved state to the existing converter - if (converterState != null && converter instanceof StateHolder) { - ((StateHolder) converter).restoreState(context, converterState); - } - } - } -} diff --git a/impl/src/main/java/jakarta/faces/component/UIPanel.java b/impl/src/main/java/jakarta/faces/component/UIPanel.java deleted file mode 100644 index 09ef45a835..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIPanel.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -/** - *

      - * UIPanel is a {@link UIComponent} that manages the layout of its child components. - *

      - */ -public class UIPanel extends UIComponentBase { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.Panel"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.Panel"; - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UIPanel} instance with default property values. - *

      - */ - public UIPanel() { - super(); - setRendererType(null); - } - - // -------------------------------------------------- UIComponent Properties - - @Override - public String getFamily() { - return COMPONENT_FAMILY; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UIParameter.java b/impl/src/main/java/jakarta/faces/component/UIParameter.java deleted file mode 100644 index c6f7d02ee4..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIParameter.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -/** - *

      - * UIParameter is a {@link UIComponent} that represents an optionally named configuration parameter for - * a parent component. - *

      - * - *

      - * Parent components should retrieve the value of a parameter by calling getValue(). In this way, the - * parameter value can be set directly on the component (via setValue()), or retrieved indirectly via the - * value binding expression. - *

      - * - *

      - * In some scenarios, it is necessary to provide a parameter name, in addition to the parameter value that is accessible - * via the getValue() method. {@link jakarta.faces.render.Renderer}s that support parameter names on their - * nested {@link UIParameter} child components should document their use of this property. - *

      - * - */ - -public class UIParameter extends UIComponentBase { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.Parameter"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.Parameter"; - - enum PropertyKeys { - name, value, disable - } - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UIParameter} instance with default property values. - *

      - */ - public UIParameter() { - super(); - setRendererType(null); - } - - // -------------------------------------------------------------- Properties - - @Override - public String getFamily() { - return COMPONENT_FAMILY; - } - - /** - *

      - * Return the optional parameter name for this parameter. - *

      - * - * @return the name. - */ - public String getName() { - return (String) getStateHelper().eval(PropertyKeys.name); - } - - /** - *

      - * Set the optional parameter name for this parameter. - *

      - * - * @param name The new parameter name, or null for no name - */ - public void setName(String name) { - getStateHelper().put(PropertyKeys.name, name); - } - - /** - *

      - * Returns the value property of the UIParameter. - *

      - * - * @return the value. - */ - public Object getValue() { - return getStateHelper().eval(PropertyKeys.value); - } - - /** - *

      - * Sets the value property of the\ UIParameter. - *

      - * - * @param value the new value - */ - public void setValue(Object value) { - getStateHelper().put(PropertyKeys.value, value); - } - - /** - *

      - * Return the value of the disable directive for this component. This directive determines whether the - * parameter value should be disabled by assigning it a null value. If true, the value set on this - * component is ignored. - *

      - * - * @return true if disabled, false otherwise. - * @since 2.0 - */ - public boolean isDisable() { - return (Boolean) getStateHelper().eval(PropertyKeys.disable, false); - } - - /** - *

      - * Sets the disable property of the UIParameter. - *

      - * - * @param disable the value for the disable flag. - * @since 2.0 - */ - public void setDisable(boolean disable) { - getStateHelper().put(PropertyKeys.disable, disable); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UISelectBoolean.java b/impl/src/main/java/jakarta/faces/component/UISelectBoolean.java deleted file mode 100644 index 8c6e8e155d..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UISelectBoolean.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.el.ValueExpression; - -/** - *

      - * UISelectBoolean is a {@link UIComponent} that represents a single boolean (true or - * false) value. It is most commonly rendered as a checkbox. - *

      - * - *

      - * By default, the rendererType property must be set to "jakarta.faces.Checkbox". This value - * can be changed by calling the setRendererType() method. - *

      - */ - -public class UISelectBoolean extends UIInput { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.SelectBoolean"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.SelectBoolean"; - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UISelectBoolean} instance with default property values. - *

      - */ - public UISelectBoolean() { - super(); - setRendererType("jakarta.faces.Checkbox"); - } - - // -------------------------------------------------------------- Properties - - @Override - public String getFamily() { - return COMPONENT_FAMILY; - } - - /** - *

      - * Return the local value of the selected state of this component. This method is a typesafe alias for - * getValue(). - *

      - * - * @return true if selected, false otherwise. - */ - public boolean isSelected() { - Boolean value = (Boolean) getValue(); - if (value != null) { - return value.booleanValue(); - } - - return false; - } - - /** - *

      - * Set the local value of the selected state of this component. This method is a typesafe alias for - * setValue(). - *

      - * - * @param selected The new selected state - */ - public void setSelected(boolean selected) { - setValue(selected); - } - - // ---------------------------------------------------------------- Bindings - - /** - *

      - * Return any {@link ValueExpression} set for value if a {@link ValueExpression} for selected - * is requested; otherwise, perform the default superclass processing for this method. - *

      - * - * @param name Name of the attribute or property for which to retrieve a {@link ValueExpression} - * - * @throws NullPointerException if name is null - * @since 1.2 - */ - @Override - public ValueExpression getValueExpression(String name) { - if ("selected".equals(name)) { - return super.getValueExpression("value"); - } - - return super.getValueExpression(name); - } - - /** - *

      - * Store any {@link ValueExpression} specified for selected under value instead; otherwise, - * perform the default superclass processing for this method. - *

      - * - * @param name Name of the attribute or property for which to set a {@link ValueExpression} - * @param binding The {@link ValueExpression} to set, or null to remove any currently set - * {@link ValueExpression} - * - * @throws NullPointerException if name is null - * @since 1.2 - */ - @Override - public void setValueExpression(String name, ValueExpression binding) { - if ("selected".equals(name)) { - super.setValueExpression("value", binding); - } else { - super.setValueExpression(name, binding); - } - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UISelectItem.java b/impl/src/main/java/jakarta/faces/component/UISelectItem.java deleted file mode 100644 index 644068ecbf..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UISelectItem.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.faces.model.SelectItem; - -/** - *

      - * UISelectItem is a component that may be - * nested inside a {@link UISelectMany} or {@link UISelectOne} component, and causes the addition of a - * {@link SelectItem} instance to the list of available options for the parent component. The contents of the - * {@link SelectItem} can be specified in one of the following ways: - *

      - *
        - *
      • The value attribute's value is an instance of {@link SelectItem}.
      • - *
      • The associated {@link jakarta.el.ValueExpression} points at a model data item of type {@link SelectItem}.
      • - *
      • A new {@link SelectItem} instance is synthesized from the values of the itemDescription, - * itemDisabled, itemLabel, itemEscaped, and itemValue attributes.
      • - *
      - */ - -public class UISelectItem extends UIComponentBase { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.SelectItem"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.SelectItem"; - - enum PropertyKeys { - itemDescription, itemDisabled, itemEscaped, itemLabel, itemValue, value, noSelectionOption - } - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UISelectItem} instance with default property values. - *

      - */ - public UISelectItem() { - super(); - setRendererType(null); - } - - // -------------------------------------------------------------- Properties - - @Override - public String getFamily() { - return COMPONENT_FAMILY; - } - - /** - *

      - * Return the description for this selection item. - *

      - * - * @return the item description. - */ - public String getItemDescription() { - return (String) getStateHelper().eval(PropertyKeys.itemDescription); - } - - /** - *

      - * Set the description for this selection item. - *

      - * - * @param itemDescription The new description - */ - public void setItemDescription(String itemDescription) { - getStateHelper().put(PropertyKeys.itemDescription, itemDescription); - } - - /** - *

      - * Return the disabled setting for this selection item. - *

      - * - * @return true is the item disabled, false otherwise. - */ - public boolean isItemDisabled() { - return (Boolean) getStateHelper().eval(PropertyKeys.itemDisabled, false); - } - - /** - *

      - * Set the disabled value for this selection item. - *

      - * - * @param itemDisabled The new disabled flag - */ - public void setItemDisabled(boolean itemDisabled) { - getStateHelper().put(PropertyKeys.itemDisabled, itemDisabled); - } - - /** - *

      - * Return the escape setting for the label of this selection item. - *

      - * - * @return true if the item is escaped, false otherwise. - */ - public boolean isItemEscaped() { - return (Boolean) getStateHelper().eval(PropertyKeys.itemEscaped, true); - } - - /** - *

      - * Set the escape value for the label of this selection item. - *

      - * - * @param itemEscaped The new disabled flag - */ - public void setItemEscaped(boolean itemEscaped) { - getStateHelper().put(PropertyKeys.itemEscaped, itemEscaped); - } - - /** - *

      - * Return the localized label for this selection item. - *

      - * - * @return the item label. - */ - public String getItemLabel() { - return (String) getStateHelper().eval(PropertyKeys.itemLabel); - } - - /** - *

      - * Set the localized label for this selection item. - *

      - * - * @param itemLabel The new localized label - */ - public void setItemLabel(String itemLabel) { - getStateHelper().put(PropertyKeys.itemLabel, itemLabel); - } - - /** - *

      - * Return the server value for this selection item. - *

      - * - * @return the item value. - */ - public Object getItemValue() { - return getStateHelper().eval(PropertyKeys.itemValue); - } - - /** - *

      - * Set the server value for this selection item. - *

      - * - * @param itemValue The new server value - */ - public void setItemValue(Object itemValue) { - getStateHelper().put(PropertyKeys.itemValue, itemValue); - } - - /** - *

      - * Returns the value property of the UISelectItem. - *

      - * - * @return the value. - */ - public Object getValue() { - return getStateHelper().eval(PropertyKeys.value); - } - - /** - *

      - * Sets the value property of the UISelectItem. - *

      - * - * @param value the new value - */ - public void setValue(Object value) { - getStateHelper().put(PropertyKeys.value, value); - } - - /** - *

      - * Return the value of the noSelectionOption property. If the value of this property is true, - * the system interprets the option represented by this UISelectItem instance as representing a "no - * selection" option. See {@link UISelectOne#validateValue} and {@link UISelectMany#validateValue} for usage. - *

      - * - * @return the no selection option. - * @since 2.0 - */ - public boolean isNoSelectionOption() { - return (Boolean) getStateHelper().eval(PropertyKeys.noSelectionOption, false); - } - - /** - *

      - * Set the value of the noSelectionOption property. - *

      - * - * @param noSelectionOption the no selection option. - * @since 2.0 - */ - public void setNoSelectionOption(boolean noSelectionOption) { - getStateHelper().put(PropertyKeys.noSelectionOption, noSelectionOption); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UISelectItemGroup.java b/impl/src/main/java/jakarta/faces/component/UISelectItemGroup.java deleted file mode 100644 index c4928eae6c..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UISelectItemGroup.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import static com.sun.faces.util.SelectItemUtils.collectSelectItems; -import static com.sun.faces.util.SelectItemUtils.createSelectItem; - -import jakarta.faces.model.SelectItem; -import jakarta.faces.model.SelectItemGroup; - -/** - *

      - * UISelectItemGroup is a component that may be nested inside a {@link UISelectMany} or {@link UISelectOne} component, and causes the addition - * of one {@link SelectItemGroup} of one or more {@link SelectItem} instances to the list of available options in the parent component. This component - * accepts only children of type {@link UISelectItems} or {@link UISelectItem}. - *

      - * - * @since 4.0 - */ - -public class UISelectItemGroup extends UISelectItem { - - // -------------------------------------------------------------------------------------------------------------------------------------- Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.SelectItemGroup"; - - // ---------------------------------------------------------------------------------------------------------------------------------- ValueHolder Properties - - /** - *

      - * Return a new {@link SelectItemGroup} instance containing one or more {@link SelectItem} instances represented by any nested {@link UISelectItems} or - * {@link UISelectItem} components. - *

      - */ - @Override - public Object getValue() { - SelectItemGroup group = createSelectItem(this, null, SelectItemGroup::new); - group.setSelectItems(collectSelectItems(getFacesContext(), this)); - return group; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UISelectItemGroups.java b/impl/src/main/java/jakarta/faces/component/UISelectItemGroups.java deleted file mode 100644 index 41cec1fcc2..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UISelectItemGroups.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import static com.sun.faces.util.SelectItemUtils.collectSelectItems; -import static com.sun.faces.util.SelectItemUtils.createSelectItems; - -import java.util.ArrayList; -import java.util.List; - -import jakarta.faces.context.FacesContext; -import jakarta.faces.model.SelectItem; -import jakarta.faces.model.SelectItemGroup; - -/** - *

      - * UISelectItemGroups is a component that may be nested inside a {@link UISelectMany} or {@link UISelectOne} component, and causes the addition - * of one or more {@link SelectItemGroup} of one or more {@link SelectItem} instances to the list of available options in the parent component. This component - * accepts only children of type {@link UISelectItems} or {@link UISelectItem}. The value attribute of this component, set either directly, or - * acquired indirectly via a {@link jakarta.el.ValueExpression}, can be an array or {@link Iterable} of items of any type which is acceptable by the - * value attribute of any nested {@link UISelectItems} or {@link UISelectItem} component. - *

      - * - * @since 4.0 - */ - -public class UISelectItemGroups extends UISelectItems { - - // -------------------------------------------------------------------------------------------------------------------------------------- Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.SelectItemGroups"; - - // ---------------------------------------------------------------------------------------------------------------------------------- ValueHolder Properties - - /** - *

      - * Iterate over the value attribute and wrap each item in a new {@link SelectItemGroup} instance whereby the item is exposed as a request - * attribute under the key specified by the var property. This must allow any nested {@link UISelectItems} or {@link UISelectItem} component - * to access the item via their attributes. Finally return these {@link SelectItemGroup} instances as an ordered collection. - *

      - */ - @Override - public Object getValue() { - FacesContext context = getFacesContext(); - List groups = new ArrayList<>(); - - createSelectItems(context, this, super.getValue(), SelectItemGroup::new, selectItemGroup -> { - selectItemGroup.setSelectItems(collectSelectItems(context, this)); - groups.add(selectItemGroup); - }); - - return groups; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UISelectItems.java b/impl/src/main/java/jakarta/faces/component/UISelectItems.java deleted file mode 100644 index 9c43f18462..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UISelectItems.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.el.ValueExpression; -import jakarta.faces.model.SelectItem; - -/** - *

      - * UISelectItems is a component that may be nested inside a {@link UISelectMany} or {@link UISelectOne} - * component, and causes the addition of one or more {@link SelectItem} instances to the list of available options in - * the parent component. The value of this component (set either directly, or acquired indirectly a - * {@link jakarta.el.ValueExpression}, can be of any of the following types: - *

      - *
        - *
      • Single instance of {@link SelectItem} - This instance is added to the set of available options for the - * parent tag.
      • - *
      • Array of {@link SelectItem} - This set of instances is added to the set of available options for the - * parent component, in ascending subscript order.
      • - *
      • Collection of {@link SelectItem} - This set of instances is added to the set of available options for - * the parent component, in the order provided by an iterator over them.
      • - *
      • Map - The keys of this object (once converted to Strings) are assumed to be labels, and the values of - * this object (once converted to Strings) are assumed to be values, of {@link SelectItem} instances that will be - * constructed dynamically and added to the set of available options for the parent component, in the order provided by - * an iterator over the keys.
      • - *
      - */ - -public class UISelectItems extends UIComponentBase { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.SelectItems"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.SelectItems"; - - enum PropertyKeys { - value - } - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UISelectItems} instance with default property values. - *

      - */ - public UISelectItems() { - - super(); - setRendererType(null); - - } - - // ---------------------------------------------------------------- Bindings - - /** - *

      - * Set the {@link ValueExpression} used to calculate the value for the specified attribute or property name, if any. - * In addition, if a {@link ValueExpression} is set for the var property, regardless of the value, throw an illegal argument exception. - *

      - * - * @throws IllegalArgumentException If name is one of id, parent, or var. - * @throws NullPointerException {@inheritDoc} - */ - @Override - public void setValueExpression(String name, ValueExpression binding) { - - if ("var".equals(name)) { - throw new IllegalArgumentException(); - } - - super.setValueExpression(name, binding); - } - - // -------------------------------------------------------------- Properties - - @Override - public String getFamily() { - - return COMPONENT_FAMILY; - - } - - // -------------------------------------------------- ValueHolder Properties - - /** - *

      - * Returns the value property of the UISelectItems. - *

      - * - * @return the value. - */ - public Object getValue() { - - return getStateHelper().eval(PropertyKeys.value); - - } - - /** - *

      - * Sets the value property of the UISelectItems. - *

      - * - * @param value the new value - */ - public void setValue(Object value) { - - getStateHelper().put(PropertyKeys.value, value); - - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UISelectMany.java b/impl/src/main/java/jakarta/faces/component/UISelectMany.java deleted file mode 100644 index 046e1c1baf..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UISelectMany.java +++ /dev/null @@ -1,614 +0,0 @@ -/* - * Copyright (c) 2022, 2022 Contributors to Eclipse Foundation. - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import java.lang.reflect.Array; -import java.util.Collection; -import java.util.Iterator; -import java.util.NoSuchElementException; - -import jakarta.el.ValueExpression; -import jakarta.faces.application.FacesMessage; -import jakarta.faces.context.FacesContext; -import jakarta.faces.convert.Converter; - -/** - *

      - * UISelectMany is a {@link UIComponent} that - * represents the user's choice of a zero or more items from among a discrete set of available options. The user can - * modify the selected values. Optionally, the component can be preconfigured with zero or more currently selected - * items, by storing them as an array or Collection in the - * value property of the component. - *

      - * - *

      - * This component is generally rendered as a select box or a group of checkboxes. - *

      - * - *

      - * By default, the rendererType property must be set to "jakarta.faces.Listbox". This value - * can be changed by calling the setRendererType() method. - *

      - * - *

      - * The {@link jakarta.faces.render.Renderer} for this component must perform the following logic on - * getConvertedValue(): - *

      - * - *
      - * - *

      - * Obtain the {@link jakarta.faces.convert.Converter} using the following algorithm: - *

      - * - *
      - * - *

      - * If the component has an attached {@link jakarta.faces.convert.Converter}, use it. - *

      - * - *

      - * If not, look for a {@link ValueExpression} for value (if any). The {@link ValueExpression} must point to - * something that is: - *

      - * - *
        - *
      • - *

        - * An array of primitives (such as int[]). Look up the registered by-class - * {@link jakarta.faces.convert.Converter} for this primitive type. - *

        - *
      • - * - *
      • - *

        - * An array of objects (such as Integer[] or String[]). Look up the registered by-class - * {@link jakarta.faces.convert.Converter} for the underlying element type. - *

        - *
      • - * - *
      • - *

        - * A java.util.Collection. Do not convert the values. Instead, convert - * the provided set of available options to string, exactly as done during render response, and for any match with the - * submitted values, add the available option as object to the collection. - *

        - *
      • - *
      - *
      - * - *

      - * If for any reason a Converter cannot be found, assume the type to be a String array. - *

      - * - *
      - * - *

      - * Use the selected {@link jakarta.faces.convert.Converter} (if any) to convert each element in the values array from - * the request to the proper type, and store the result of each conversion in a data - * structure, called targetForConvertedValues for discussion. Create targetForConvertedValues using - * the following algorithm. - *

      - * - *
      - * - *
        - * - *
      • - *

        - * If the component has a ValueExpression for value and the type of the expression is an - * array, let targetForConvertedValues be a new array of the expected type. - *

        - *
      • - * - * - *
      • - *

        - * If the component has a ValueExpression for value, let modelType be the type of the - * value expression. If modelType is a Collection, do the following to arrive at - * targetForConvertedValues: - *

        - * - *
          - * - *
        • - *

          - * Ask the component for its attribute under the key "collectionType", without the quotes. If there is a - * value for that key, the value must be a String that is a fully qualified Java class name, or a Class - * object, or a ValueExpression that evaluates to a String or a Class. In all cases, the value - * serves to identify the concrete type of the class that implements Collection. For discussion, this is - * called collectionType. Let targetForConvertedValues be a new instance of Collection - * implemented by the concrete class specified in collectionType. If, collectionType can not be - * discovered, or an instance of Collection implemented by the concrete class specified in - * collectionType cannot be created, throw a {@link jakarta.faces.FacesException} with a correctly localized - * error message. Note that FacesException is thrown instead of ConverterException because - * this case would only arise from developer error, rather than end-user error. - *

          - *
        • - * - *
        • - *

          - * If there is no "collectionType" attribute, call getValue() on the component. The result - * will implement Collection. If the result also implements Cloneable, let - * targetForConvertedValues be the result of calling its clone() method, then calling - * clear() on the cloned Collection. If unable to clone the value for any reason, log a - * message and proceed to the next step. - *

          - *
        • - * - *
        • - *

          - * If modelType is a concrete class, let targetForConvertedValues be a new instance of that class. - * Otherwise, the concrete type for targetForConvertedValues is taken from the following table. All classes are - * in the java.util package. All collections must be created with an initial capacity equal to the length - * of the values array from the request. - *

          - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
          modelType to targetForConvertedValues mapping
          If modelType is an instance ofthen targetForConvertedValues must be an instance of
          SortedSetTreeSet
          QueueLinkedList
          SetHashSet
          anything elseArrayList
          - * - *
        • - * - *
        - * - *
      • - *

        - * If the component does not have a ValueExpression for value, let - * targetForConvertedValues be an array of type Object. - *

        - * - *
      - * - *
      - * - *

      - * Return targetForConvertedValues after populating it with the converted values. - *

      - * - * - */ -public class UISelectMany extends UIInput { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.SelectMany"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.SelectMany"; - - /** - *

      - * The message identifier of the {@link jakarta.faces.application.FacesMessage} to be created if a value not matching - * the available options is specified. - */ - public static final String INVALID_MESSAGE_ID = "jakarta.faces.component.UISelectMany.INVALID"; - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UISelectMany} instance with default property values. - *

      - */ - public UISelectMany() { - super(); - setRendererType("jakarta.faces.Listbox"); - } - - // -------------------------------------------------------------- Properties - - @Override - public String getFamily() { - return COMPONENT_FAMILY; - } - - private transient Object submittedValue = null; - - @Override - public Object getSubmittedValue() { - if (submittedValue == null && !isValid() && considerEmptyStringNull(FacesContext.getCurrentInstance())) { // JAVASERVERFACES_SPEC_PUBLIC-671 - return new String[0]; // Mojarra#5081 - } - - return submittedValue; - } - - @Override - public void setSubmittedValue(Object submittedValue) { - this.submittedValue = submittedValue; - } - - /** - *

      - * Return the currently selected values, or null if there are no currently selected values. This is a - * typesafe alias for getValue(). - *

      - * - * @return the selected values, or null. - */ - public Object[] getSelectedValues() { - return (Object[]) getValue(); - } - - /** - *

      - * Set the currently selected values, or null to indicate that there are no currently selected values. This - * is a typesafe alias for setValue(). - *

      - * - * @param selectedValues The new selected values (if any) - */ - public void setSelectedValues(Object selectedValues[]) { - setValue(selectedValues); - } - - // ---------------------------------------------------------------- Bindings - - - /** - *

      - * Return any {@link ValueExpression} set for value if a {@link ValueExpression} for - * selectedValues is requested; otherwise, perform the default superclass processing for this method. - *

      - * - * @param name Name of the attribute or property for which to retrieve a {@link ValueExpression} - * @return the value expression, or null. - * @throws NullPointerException if name is null - * @since 1.2 - */ - @Override - public ValueExpression getValueExpression(String name) { - if ("selectedValues".equals(name)) { - return super.getValueExpression("value"); - } else { - return super.getValueExpression(name); - } - - } - - /** - *

      - * Store any {@link ValueExpression} specified for selectedValues under value instead; - * otherwise, perform the default superclass processing for this method. - *

      - * - * @param name Name of the attribute or property for which to set a {@link ValueExpression} - * @param binding The {@link ValueExpression} to set, or null to remove any currently set - * {@link ValueExpression} - * - * @throws NullPointerException if name is null - * @since 1.2 - */ - @Override - public void setValueExpression(String name, ValueExpression binding) { - if ("selectedValues".equals(name)) { - super.setValueExpression("value", binding); - } else { - super.setValueExpression(name, binding); - } - - } - - // --------------------------------------------------------- UIInput Methods - - /** - *

      - * Return true if the new value is different from the previous value. Value comparison must not be - * sensitive to element order. - *

      - * - * @param previous old value of this component - * @param value new value of this component - * @return true if the new value is different from the previous value, false otherwise. - */ - @Override - protected boolean compareValues(Object previous, Object value) { - if (previous == null && value != null) { - return true; - } else if (previous != null && value == null) { - return true; - } else if (previous == null) { - return false; - } - - boolean valueChanged = false; - Object oldarray[]; - Object newarray[]; - - // The arrays may be arrays of primitives; for simplicity, - // perform the boxing here. - if (!(previous instanceof Object[])) { - previous = toObjectArray(previous); - } - - if (!(value instanceof Object[])) { - value = toObjectArray(value); - } - - // If values are still not of the type Object[], it is perhaps a - // mistake by the renderers, so return false, so that - // ValueChangedEvent is not queued in this case. - if (!(previous instanceof Object[]) || !(value instanceof Object[])) { - return false; - } - oldarray = (Object[]) previous; - newarray = (Object[]) value; - - // If we got here then both the arrays cannot be null - // if their lengths vary, return false. - if (oldarray.length != newarray.length) { - return true; - } - - // make sure every element in the previous array occurs the same - // number of times in the current array. This should help us - // to find out the values changed are not. Since we cannot assume - // the browser will send the elements in the same order everytime, - // it will not suffice to just compare the element position and position. - int count1; - int count2; - for (int i = 0; i < oldarray.length; ++i) { - count1 = countElementOccurrence(oldarray[i], oldarray); - count2 = countElementOccurrence(oldarray[i], newarray); - if (count1 != count2) { - valueChanged = true; - break; - } - } - return valueChanged; - - } - - /** - *

      - * Return the number of occurrences of a particular element in the array. - *

      - * - * @param element object whose occurrance is to be counted in the array. - * @param array object representing the old value of this component. - */ - private static int countElementOccurrence(Object element, Object[] array) { - int count = 0; - for (int i = 0; i < array.length; ++i) { - Object arrayElement = array[i]; - if (arrayElement != null && element != null) { - if (arrayElement.equals(element)) { - count++; - } - } - } - return count; - - } - - /** - * Convert an array of primitives to an array of boxed objects. - * - * @param primitiveArray object containing the primitive values - * @return an Object array, or null if the incoming value is not in fact an array at all. - */ - private static Object[] toObjectArray(Object primitiveArray) { - if (primitiveArray == null) { - throw new NullPointerException(); - } - - if (primitiveArray instanceof Object[]) { - return (Object[]) primitiveArray; - } - - if (primitiveArray instanceof Collection) { - return ((Collection) primitiveArray).toArray(); - } - - Class clazz = primitiveArray.getClass(); - if (!clazz.isArray()) { - return null; - } - - int length = Array.getLength(primitiveArray); - Object[] array = new Object[length]; - for (int i = 0; i < length; i++) { - array[i] = Array.get(primitiveArray, i); - } - - return array; - } - - // ------------------------------------------------------ Validation Methods - - /** - *

      - * In addition to the standard validation behavior inherited from - * {@link UIInput}, ensure that any specified values are equal to one of the available options. Before comparing each - * option, coerce the option value type to the type of this component's value following the Expression Language coercion - * rules. If the specified value is not equal to any of the options, enqueue an error message and set the - * valid property to false. - *

      - * - *

      - * This method must explicitly support a value argument that is a single value or a value argument that is a - * Collection or Array of values. - *

      - * - *

      - * If {@link #isRequired} returns true, and the current value is equal to the value of an inner - * {@link UISelectItem} whose {@link UISelectItem#isNoSelectionOption} method returns true, enqueue an - * error message and set the valid property to false. - *

      - * - * @param context The {@link FacesContext} for the current request - * - * @param value The converted value to test for membership. - * - * @throws NullPointerException if context is null - */ - - @Override - protected void validateValue(FacesContext context, Object value) { - super.validateValue(context, value); - - // Skip validation if it is not necessary - if (!isValid() || value == null) { - return; - } - - boolean doAddMessage = false; - - // Ensure that the values match one of the available options - // Don't arrays cast to "Object[]", as we may now be using an array - // of primitives - Converter converter = getConverter(); - for (Iterator i = getValuesIterator(value); i.hasNext();) { - Iterator items = new SelectItemsIterator(context, this); - Object currentValue = i.next(); - if (!SelectUtils.matchValue(context, this, currentValue, items, converter)) { - doAddMessage = true; - break; - } - } - - // Ensure that if the value is noSelection and a - // value is required, a message is queued - if (isRequired()) { - for (Iterator i = getValuesIterator(value); i.hasNext();) { - Iterator items = new SelectItemsIterator(context, this); - Object currentValue = i.next(); - if (SelectUtils.valueIsNoSelectionOption(context, this, currentValue, items, converter)) { - doAddMessage = true; - break; - } - } - } - - if (doAddMessage) { - // Enqueue an error message if an invalid value was specified - FacesMessage message = MessageFactory.getMessage(context, INVALID_MESSAGE_ID, MessageFactory.getLabel(context, this)); - context.addMessage(getClientId(context), message); - setValid(false); - } - - } - - // --------------------------------------------------------- Private Methods - - private Iterator getValuesIterator(Object value) { - if (value instanceof Collection) { - return ((Collection) value).iterator(); - } - - return new ArrayIterator(value); - } - - // ---------------------------------------------------------- Nested Classes - - /** - * Exposes an Array as an Iterator. - */ - private static final class ArrayIterator implements Iterator { - - private int length; - private int idx = 0; - private Object value; - - // -------------------------------------------------------- Constructors - - ArrayIterator(Object value) { - - this.value = value; - length = Array.getLength(value); - - } - - // ------------------------------------------------------------ Iterator - - @Override - public boolean hasNext() { - return idx < length; - } - - @Override - public Object next() { - - if (idx >= length) { - throw new NoSuchElementException(); - } else { - return Array.get(value, idx++); - } - - } - - @Override - public void remove() { - - throw new UnsupportedOperationException(); - - } - - } -} diff --git a/impl/src/main/java/jakarta/faces/component/UISelectOne.java b/impl/src/main/java/jakarta/faces/component/UISelectOne.java deleted file mode 100644 index d6f973374f..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UISelectOne.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.faces.application.FacesMessage; -import jakarta.faces.component.visit.VisitContext; -import jakarta.faces.component.visit.VisitResult; -import jakarta.faces.context.FacesContext; - -/** - *

      - * UISelectOne is a {@link UIComponent} that represents the user's choice - * of zero or one items from among a discrete set of available options. The user can modify the selected value. - * Optionally, the component can be preconfigured with a currently selected item, by storing it as the - * value property of the component. - *

      - * - *

      - * This component is generally rendered as a select box or a group of radio buttons. - *

      - * - *

      - * By default, the rendererType property is set to "jakarta.faces.Menu". This value can be - * changed by calling the setRendererType() method. - *

      - */ - -public class UISelectOne extends UIInput { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.SelectOne"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.SelectOne"; - - /** - *

      - * The message identifier of the {@link jakarta.faces.application.FacesMessage} to be created if a value not matching - * the available options is specified. - */ - public static final String INVALID_MESSAGE_ID = "jakarta.faces.component.UISelectOne.INVALID"; - - enum PropertyKeys { - - /** - *

      - * Specifies the name of the radio button group. - * - * @since 2.3 - */ - group - - } - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UISelectOne} instance with default property values. - *

      - */ - public UISelectOne() { - - super(); - setRendererType("jakarta.faces.Menu"); - - } - - // -------------------------------------------------------------- Properties - - @Override - public String getFamily() { - - return COMPONENT_FAMILY; - - } - - /** - *

      - * Returns the name of the radio button group. - *

      - * Radio button components having the same group within a UIForm parent will uncheck all others when being - * checked. If the value attribute is absent then the one from first component of the group will be used. - * If the UISelectItem child is absent then the one from first component of the group will be used. - * - * @return The name of the radio button group. - * @since 2.3 - */ - public String getGroup() { - - return (String) getStateHelper().eval(PropertyKeys.group); - - } - - /** - *

      - * Sets the name of the radio button group. - * - * @param group The name of the radio button group. - * @since 2.3 - */ - public void setGroup(String group) { - - getStateHelper().put(PropertyKeys.group, group); - - } - - // ------------------------------------------------------ Validation Methods - - /** - *

      - * If {@link #getGroup()} is set, and {@link #getSubmittedValue()} is empty, and at least one other component having the - * same group within a UIForm parent has a non-empty {@link #getSubmittedValue()} or returns - * true on {@link #isLocalValueSet()} or returns false on {@link #isValid()}, then skip - * validation for current component, else perform standard superclass processing by - * super.processValidators(context). - *

      - */ - @Override - public void processValidators(FacesContext context) { - - final String group = getGroup(); - - if (group != null && isEmpty(getSubmittedValue())) { - final String clientId = getClientId(context); - final UIComponent groupContainer = getGroupContainer(context, this); - final boolean[] alreadySubmittedOrValidatedAsGroup = new boolean[1]; - - groupContainer.visitTree(VisitContext.createVisitContext(context), (visitContext, target) -> { - if (target instanceof UISelectOne) { - UISelectOne radio = (UISelectOne) target; - - if (isOtherMemberOfSameGroup(context, group, clientId, radio) && isAlreadySubmittedOrValidated(radio)) { - alreadySubmittedOrValidatedAsGroup[0] = true; - return VisitResult.COMPLETE; - } - } - - return VisitResult.ACCEPT; - }); - - if (alreadySubmittedOrValidatedAsGroup[0]) { - return; - } - } - - super.processValidators(context); - } - - private static UIComponent getGroupContainer(FacesContext context, UISelectOne radio) { - UIComponent namingContainer = radio.getNamingContainer(); - - while (namingContainer != null && !(namingContainer instanceof UIForm) && namingContainer.getParent() != null) { - namingContainer = namingContainer.getParent().getNamingContainer(); - } - - return namingContainer != null ? namingContainer : context.getViewRoot(); - } - - private static boolean isOtherMemberOfSameGroup(FacesContext context, String group, String clientId, UISelectOne radio) { - return group.equals(radio.getGroup()) && !clientId.equals(radio.getClientId(context)); - } - - private static boolean isAlreadySubmittedOrValidated(EditableValueHolder input) { - return !isEmpty(input.getSubmittedValue()) || input.isLocalValueSet() || !input.isValid(); - } - - /** - *

      - * In addition to the standard validation behavior inherited from - * {@link UIInput}, ensure that any specified value is equal to one of the available options. Before comparing each - * option, coerce the option value type to the type of this component's value following the Expression Language coercion - * rules. If the specified value is not equal to any of the options, enqueue an error message and set the - * valid property to false. - *

      - * - *

      - * If {@link #isRequired} returns true, and the current value is equal to the value of an inner - * {@link UISelectItem} whose {@link UISelectItem#isNoSelectionOption} method returns true, enqueue an - * error message and set the valid property to false. - *

      - * - * @param context The {@link FacesContext} for the current request - * - * @param value The converted value to test for membership. - * - * @throws NullPointerException if context is null - */ - @Override - protected void validateValue(FacesContext context, Object value) { - - super.validateValue(context, value); - - // Skip validation if it is not necessary - if (!isValid() || value == null) { - return; - } - - // Ensure that the value matches one of the available options - boolean found = SelectUtils.matchValue(getFacesContext(), this, value, new SelectItemsIterator(context, this), getConverter()); - - boolean isNoSelection = SelectUtils.valueIsNoSelectionOption(getFacesContext(), this, value, new SelectItemsIterator(context, this), getConverter()); - - // Enqueue an error message if an invalid value was specified - if (!found || isRequired() && isNoSelection) { - FacesMessage message = MessageFactory.getMessage(context, INVALID_MESSAGE_ID, MessageFactory.getLabel(context, this)); - context.addMessage(getClientId(context), message); - setValid(false); - } - - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UIViewAction.java b/impl/src/main/java/jakarta/faces/component/UIViewAction.java deleted file mode 100644 index 9157db0f8a..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIViewAction.java +++ /dev/null @@ -1,709 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import java.util.Map; - -import jakarta.el.MethodExpression; -import jakarta.faces.FacesException; -import jakarta.faces.application.NavigationHandler; -import jakarta.faces.context.FacesContext; -import jakarta.faces.context.FacesContextWrapper; -import jakarta.faces.event.AbortProcessingException; -import jakarta.faces.event.ActionEvent; -import jakarta.faces.event.ActionListener; -import jakarta.faces.event.FacesEvent; -import jakarta.faces.event.PhaseId; -import jakarta.faces.event.PreRenderViewEvent; -import jakarta.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 jakarta.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 Jakarta Faces 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 Jakarta Faces 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 navigation will result in a flow transition, the appropriate metadata must be - * included in the query string for the redirect. - * See section 7.4.2 "Default NavigationHandler Algorithm" of the Jakarta Faces Specification Document, for the - * specification of how to handle {@code <redirect />} cases. - *

      - * - *

      - * 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 = "jakarta.faces.ViewAction"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.ViewAction"; - - private static final String UIVIEWACTION_BROADCAST = "jakarta.faces.ViewAction.broadcast"; - - private static final String UIVIEWACTION_EVENT_COUNT = "jakarta.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. - *

      - */ - public UIViewAction() { - super(); - setRendererType(null); - } - - // -------------------------------------------------------------- Properties - @Override - public String getFamily() { - return COMPONENT_FAMILY; - } - - private void incrementEventCount(FacesContext context) { - Map attrs = context.getAttributes(); - Integer count = (Integer) attrs.get(UIVIEWACTION_EVENT_COUNT); - if (null == count) { - attrs.put(UIVIEWACTION_EVENT_COUNT, 1); - } else { - attrs.put(UIVIEWACTION_EVENT_COUNT, count + 1); - } - } - - private boolean decrementEventCountAndReturnTrueIfZero(FacesContext context) { - boolean result = true; - Map attrs = context.getAttributes(); - Integer count = (Integer) attrs.get(UIVIEWACTION_EVENT_COUNT); - if (null != count) { - count = count - 1; - if (count < 1) { - attrs.remove(UIVIEWACTION_EVENT_COUNT); - result = true; - } else { - attrs.put(UIVIEWACTION_EVENT_COUNT, count); - result = false; - } - } - - return result; - } - - /** - *

      - * If the value of the component's immediate attribute is true, the action will be invoked - * during the Apply Request Values Jakarta Faces lifecycle phase. Otherwise, the action will be invoked - * during the Invoke Application phase, the default behavior. The phase can be set explicitly in the - * phase attribute, which takes precedence over the immediate attribute. - *

      - * - * @since 2.2 - */ - @Override - public boolean isImmediate() { - return (Boolean) getStateHelper().eval(PropertyKeys.immediate, false); - } - - /** - * {@inheritDoc} - * - * @since 2.2 - */ - @Override - public void setImmediate(final boolean immediate) { - getStateHelper().put(PropertyKeys.immediate, immediate); - } - - /** - *

      - * Returns the name of the lifecycle phase in which the action is to be queued. - *

      - * - * @return the phase (as string). - * @since 2.2 - */ - public String getPhase() { - PhaseId myPhaseId = getPhaseId(); - String result = null; - if (null != myPhaseId) { - result = myPhaseId.getName(); - } - return result; - } - - /** - *

      - * Attempt to set the lifecycle phase in which this instance will queue its {@link ActionEvent}. Pass the argument - * phase to {@link PhaseId#phaseIdValueOf}. If the result is not one of the following values, - * FacesException must be thrown. - *

      - * - *
        - * - *
      • - *

        - * {@link PhaseId#APPLY_REQUEST_VALUES} - *

        - *
      • - *
      • - *

        - * {@link PhaseId#PROCESS_VALIDATIONS} - *

        - *
      • - *
      • - *

        - * {@link PhaseId#UPDATE_MODEL_VALUES} - *

        - *
      • - *
      • - *

        - * {@link PhaseId#INVOKE_APPLICATION} - *

        - *
      • - * - *
      - * - *

      - * If set, this value takes precedence over the immediate flag. - *

      - * - * @param phase the phase id (as string value). - * @since 2.2 - */ - - public void setPhase(final String phase) { - PhaseId myPhaseId = PhaseId.phaseIdValueOf(phase); - if (PhaseId.ANY_PHASE.equals(myPhaseId) || PhaseId.RESTORE_VIEW.equals(myPhaseId) || PhaseId.RENDER_RESPONSE.equals(myPhaseId)) { - throw new FacesException("View actions cannot be executed in specified phase: [" + myPhaseId.toString() + "]"); - } - getStateHelper().put(PropertyKeys.phase, myPhaseId.getName()); - } - - private void setIsProcessingUIViewActionBroadcast(FacesContext context, boolean value) { - Map attrs = context.getAttributes(); - - if (value) { - attrs.put(UIVIEWACTION_BROADCAST, Boolean.TRUE); - } else { - attrs.remove(UIVIEWACTION_BROADCAST); - } - } - - /** - *

      - * Returns true if the current request processing lifecycle is in the midst of processing the broadcast of - * an event queued during a call to {@link #decode}. The implementation of {@link #broadcast} is responsible for - * ensuring that calls to this method accurately reflect this fact. - *

      - * - * @param context {@link FacesContext} for the current request - * @return true is currently processing broadcast, false otherwise. - * @since 2.2 - * - */ - - public static boolean isProcessingBroadcast(FacesContext context) { - boolean result = context.getAttributes().containsKey(UIVIEWACTION_BROADCAST); - return result; - } - - private PhaseId getPhaseId() { - PhaseId myPhaseId = null; - String phaseIdString = (String) getStateHelper().eval(PropertyKeys.phase); - if (phaseIdString != null) { - myPhaseId = PhaseId.phaseIdValueOf(phaseIdString); - } - return myPhaseId; - } - - /** - * {@inheritDoc} - * - * @since 2.2 - */ - @Override - public void addActionListener(final ActionListener listener) { - addFacesListener(listener); - } - - /** - * {@inheritDoc} - * - * @since 2.2 - */ - @Override - public ActionListener[] getActionListeners() { - ActionListener al[] = (ActionListener[]) getFacesListeners(ActionListener.class); - return al; - } - - /** - * {@inheritDoc} - * - * @since 2.2 - */ - @Override - public void removeActionListener(final ActionListener listener) { - removeFacesListener(listener); - } - - /** - * {@inheritDoc} - * - * @since 2.2 - */ - @Override - public MethodExpression getActionExpression() { - return (MethodExpression) getStateHelper().get(PropertyKeys.actionExpression); - } - - /** - * {@inheritDoc} - * - * @param actionExpression the action expression. - * @since 2.2 - */ - @Override - public void setActionExpression(final MethodExpression actionExpression) { - getStateHelper().put(PropertyKeys.actionExpression, actionExpression); - } - - /** - *

      - * If true this component will operate on postback. - *

      - * - * @return true if operating upon postback, false otherwise. - * @since 2.2 - */ - public boolean isOnPostback() { - return (Boolean) getStateHelper().eval(PropertyKeys.onPostback, false); - } - - /** - *

      - * Controls whether or not this component operates on postback. - *

      - * - * @param onPostback the onPostback flag. - * @since 2.2 - */ - public void setOnPostback(final boolean onPostback) { - getStateHelper().put(PropertyKeys.onPostback, onPostback); - } - - /** - *

      - * Return true if this component should take the actions specified in the {@link #decode} method. - *

      - * - * @return true if it should be rendered, false otherwise. - * @since 2.2 - */ - - @Override - public boolean isRendered() { - return (Boolean) getStateHelper().eval(PropertyKeys.renderedAttr, true); - } - - /** - *

      - * Sets the if property of this component. - *

      - * - * @param condition the new value of the property. - * - * @since 2.2 - */ - @Override - public void setRendered(final boolean condition) { - getStateHelper().put(PropertyKeys.renderedAttr, condition); - } - - // ----------------------------------------------------- UIComponent Methods - - /** - *

      - * Enable the method invocation specified by this component instance to return a value that performs navigation, similar - * in spirit to {@link UICommand#broadcast}. - *

      - * - *
      - * - *

      - * Take no action and return immediately if any of the following conditions are true. - *

      - * - *
        - * - *
      • - *

        - * The response has already been marked as complete. - *

        - *
      • - * - *
      • - *

        - * The current UIViewRoot is different from the event's source's UIViewRoot. - *

        - *
      • - * - *
      - * - *

      - * Save a local reference to the viewId of the current UIViewRoot. For discussion, let this reference be - * viewIdBeforeAction. - *

      - * - *

      - * Obtain the {@link ActionListener} from the {@link jakarta.faces.application.Application}. Wrap the current - * {@link FacesContext} in an implementation of {@link jakarta.faces.context.FacesContextWrapper} that overrides the - * {@link FacesContext#renderResponse} method such that it takes no action. Set the current FacesContext to - * be the FacesContextWrapper instance. Make it so a call to {@link #isProcessingBroadcast} on the current - * FacesContext will return true. This is necessary because the - * {@link jakarta.faces.application.NavigationHandler} will call this method to determine if the navigation is happening - * as the result of a UIViewAction. Invoke {@link ActionListener#processAction}. In a finally - * block, restore the original FacesContext, make it so a call to {@link #isProcessingBroadcast} on the - * current context will return false and discard the wrapper. - *

      - * - *

      - * If the response has been marked as complete during the invocation of processAction(), take no further - * action and return. Otherwise, compare viewIdBeforeAction with the viewId of the UIViewRoot on - * the FacesContext after the invocation of processAction(). If the two viewIds are the same - * and no more UIViewAction events have been queued by a call to {@link #decode}, call - * {@link FacesContext#renderResponse} and return. It is possible to detect the case where no more - * UIViewAction events have been queued because the number of such events queued has been noted in the - * specification for {@link #decode}. Otherwise, execute the lifecycle on the new UIViewRoot. - *

      - * - *
      - * - * @param event {@link FacesEvent} to be broadcast - * - * @throws AbortProcessingException Signal the Jakarta Faces implementation that no further processing on the - * current event should be performed - * @throws IllegalArgumentException if the implementation class of this {@link FacesEvent} is not supported by this - * component - * @throws NullPointerException if event is null - * - * @since 2.2 - */ - @Override - public void broadcast(final FacesEvent event) throws AbortProcessingException { - super.broadcast(event); - - FacesContext context = event.getFacesContext(); - if (!(event instanceof ActionEvent)) { - throw new IllegalArgumentException(); - } - - // OPEN QUESTION: should we consider a navigation to the same view as a - // no-op navigation? - - // only proceed if the response has not been marked complete and - // navigation to another view has not occurred - if (!context.getResponseComplete() && context.getViewRoot() == getViewRootOf(event)) { - ActionListener listener = context.getApplication().getActionListener(); - if (listener != null) { - boolean hasMoreViewActionEvents = false; - UIViewRoot viewRootBefore = context.getViewRoot(); - assert null != viewRootBefore; - InstrumentedFacesContext instrumentedContext = null; - try { - instrumentedContext = new InstrumentedFacesContext(context); - setIsProcessingUIViewActionBroadcast(context, true); - // defer the call to renderResponse() that happens in - // ActionListener#processAction(ActionEvent) - instrumentedContext.disableRenderResponseControl().set(); - listener.processAction((ActionEvent) event); - hasMoreViewActionEvents = !decrementEventCountAndReturnTrueIfZero(context); - } finally { - setIsProcessingUIViewActionBroadcast(context, false); - if (null != instrumentedContext) { - instrumentedContext.restore(); - } - } - // if the response is marked complete, the story is over - if (!context.getResponseComplete()) { - UIViewRoot viewRootAfter = context.getViewRoot(); - assert null != viewRootAfter; - - // if the view id changed as a result of navigation, then - // execute the Jakarta Faces lifecycle for the new view - // id - String viewIdBefore = viewRootBefore.getViewId(); - String viewIdAfter = viewRootAfter.getViewId(); - assert null != viewIdBefore && null != viewIdAfter; - boolean viewIdsSame = viewIdBefore.equals(viewIdAfter); - - if (viewIdsSame && !hasMoreViewActionEvents) { - // apply the deferred call (relevant when immediate is true) - context.renderResponse(); - } - } - } - } - } - - /** - *

      - * Override behavior from the superclass to queue an {@link ActionEvent} that may result in the invocation of the - * action or any actionListeners that may be associated with this instance. - *

      - * - *
      - * - *

      - * Take no action if any of the following conditions are true: - *

      - * - *
        - * - *
      • - *

        - * The current request is a postback and the instance has been configured to not operate on postback. See - * {@link #isOnPostback}. - *

        - *
      • - * - *
      • - *

        - * The condition stated in the if property evaluates to false. See {@link #isRendered} - *

        - * .
      • - * - *
      - * - *

      - * Instantiate an {@link ActionEvent}, passing this component instance as the source. Set the phaseId - * property of the ActionEvent as follows. - *

      - * - *
        - * - *
      • - *

        - * If this component instance has been configured with a specific lifecycle phase with a call to {@link #setPhase} use - * that as the phaseId - *

        - *
      • - * - *
      • - *

        - * If the value of the immediate property is true, use {@link PhaseId#APPLY_REQUEST_VALUES}. - *

        - *
      • - * - *
      • - *

        - * Otherwise, use {@link PhaseId#INVOKE_APPLICATION}. - *

        - *
      • - * - *
      - * - *

      - * Queue the event with a call to {@link #queueEvent}. Keep track of the number of events that are queued in this way on - * this run through the lifecycle. This information is necessary during processing in {@link #broadcast}. - *

      - * - *
      - * - * @since 2.2 - * - */ - @Override - public void decode(final FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - if (context.isPostback() && !isOnPostback() || !isRendered()) { - return; - } - - ActionEvent e = new ActionEvent(context, this); - PhaseId phaseId = getPhaseId(); - if (phaseId != null) { - e.setPhaseId(phaseId); - } else if (isImmediate()) { - e.setPhaseId(PhaseId.APPLY_REQUEST_VALUES); - } else { - e.setPhaseId(PhaseId.INVOKE_APPLICATION); - } - incrementEventCount(context); - queueEvent(e); - } - - private UIViewRoot getViewRootOf(final FacesEvent e) { - UIComponent c = e.getComponent(); - do { - if (c instanceof UIViewRoot) { - return (UIViewRoot) c; - } - c = c.getParent(); - } while (c != null); - return null; - } - - /** - * A FacesContext delegator that gives us the necessary controls over the FacesContext to allow the execution of the - * lifecycle to accomodate the UIViewAction sequence. - */ - private class InstrumentedFacesContext extends FacesContextWrapper { - - private boolean viewRootCleared = false; - private boolean renderedResponseControlDisabled = false; - private Boolean postback = null; - - public InstrumentedFacesContext(final FacesContext wrapped) { - super(wrapped); - } - - @Override - public UIViewRoot getViewRoot() { - if (viewRootCleared) { - return null; - } - - return super.getViewRoot(); - } - - @Override - public void setViewRoot(final UIViewRoot viewRoot) { - viewRootCleared = false; - super.setViewRoot(viewRoot); - } - - @Override - public boolean isPostback() { - return postback == null ? super.isPostback() : postback; - } - - @Override - public void renderResponse() { - if (!renderedResponseControlDisabled) { - super.renderResponse(); - } - } - - /** - * Make it look like we have dispatched a request using the include method. - */ - public InstrumentedFacesContext pushViewIntoRequestMap() { - getExternalContext().getRequestMap().put("jakarta.servlet.include.servlet_path", super.getViewRoot().getViewId()); - return this; - } - - public InstrumentedFacesContext clearPostback() { - postback = false; - return this; - } - - public InstrumentedFacesContext clearViewRoot() { - viewRootCleared = true; - return this; - } - - public InstrumentedFacesContext disableRenderResponseControl() { - renderedResponseControlDisabled = true; - return this; - } - - public void set() { - setCurrentInstance(this); - } - - public void restore() { - setCurrentInstance(getWrapped()); - } - } -} diff --git a/impl/src/main/java/jakarta/faces/component/UIViewParameter.java b/impl/src/main/java/jakarta/faces/component/UIViewParameter.java deleted file mode 100644 index 884efd94f4..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIViewParameter.java +++ /dev/null @@ -1,516 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import java.io.IOException; -import java.util.Iterator; - -import jakarta.el.ValueExpression; -import jakarta.faces.FactoryFinder; -import jakarta.faces.application.FacesMessage; -import jakarta.faces.context.FacesContext; -import jakarta.faces.convert.Converter; -import jakarta.faces.convert.ConverterException; -import jakarta.faces.render.RenderKit; -import jakarta.faces.render.RenderKitFactory; -import jakarta.faces.render.Renderer; -import jakarta.faces.validator.RequiredValidator; -import jakarta.faces.validator.Validator; - -/** - *

      - * UIViewParameter represents a binding between a - * request parameter and a model property or {@link UIViewRoot} property. This is a bi-directional binding. - *

      - * - *
      - * - *

      - * The {@link jakarta.faces.view.ViewDeclarationLanguage} implementation must cause an instance of this component to - * appear in the view for each occurrence of an <f:viewParam /> element placed inside of an - * <f:metadata /> element. The user must place this facet within the UIViewRoot. - *

      - * - *

      - * Because this class extends UIInput any actions that one would normally take on a UIInput - * instance are valid for instances of this class. Instances of this class participate in the regular Jakarta Server - * Faces lifecycle, including on Ajax requests. - *

      - * - *
      - * - * @since 2.0 - */ -public class UIViewParameter extends UIInput { - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.ViewParameter"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.ViewParameter"; - - enum PropertyKeys { - name, submittedValue - } - - // ------------------------------------------------------ Instance Variables - - private Renderer inputTextRenderer = null; - - private transient Boolean emptyStringIsNull; - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UIViewParameter} instance with default property values. - *

      - */ - public UIViewParameter() { - - super(); - setRendererType(null); - - } - - // ------------------------------------------------------ Instance Variables - - /** - *

      - * The raw value is the "implicit" binding for this view parameter. This property maintains the submitted value of the - * view parameter for the duration of the request. If the view parameter does not explicitly specify a value expression, - * then when the request ends, this value is stored with the state of this component to use as the submitted value on an - * ensuing postback. - *

      - */ - private String rawValue; - - // -------------------------------------------------------------- Properties - - @Override - public String getFamily() { - - return COMPONENT_FAMILY; - - } - - /** - *

      - * Return the request parameter name from which the value is retrieved. - *

      - * - * @return the name. - * @since 2.0 - */ - public String getName() { - - return (String) getStateHelper().eval(PropertyKeys.name); - - } - - /** - *

      - * Set the request parameter name from which the value is retrieved. - *

      - * - * @param name The new request parameter name. - * @since 2.0 - */ - public void setName(String name) { - - getStateHelper().put(PropertyKeys.name, name); - - } - - /** - *

      - * Return false. The immediate setting is not relevant for view parameters and must be assumed to be - * false. - *

      - * - * @return true if immediate, false otherwise. - * @since 2.0 - */ - @Override - public boolean isImmediate() { - return false; - } - - /** - *

      - * Assume that the submitted value is always a string, - * but the return type from this method is Object.. - *

      - * - * @return the submitted value. - * @since 2.0 - */ - @Override - public Object getSubmittedValue() { - return getStateHelper().get(PropertyKeys.submittedValue); - } - - /** - * PENDING (docs) Interesting that submitted value isn't saved by the parent - * - * @param submittedValue The new submitted value - */ - @Override - public void setSubmittedValue(Object submittedValue) { - getStateHelper().put(PropertyKeys.submittedValue, submittedValue); - } - - // ----------------------------------------------------- UIComponent Methods - - // This is the "Apply Request Phase" step - // QUESTION should we just override processDecodes() directly? - // ANSWER: In this case, no. We don't want to take responsibility for - // traversing any children we may have in the future. - - /** - *

      - * Override behavior from superclass to pull a value from the incoming request parameter map under the name given by - * {@link #getName} and store it with a call to {@link UIInput#setSubmittedValue}. - *

      - * - * @since 2.0 - */ - @Override - public void decode(FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - // QUESTION can we move forward and support an array? no different than UISelectMany; perhaps need to know - // if the value expression is single or multi-valued - // ANSWER: I'd rather not right now. - String paramValue = context.getExternalContext().getRequestParameterMap().get(getName()); - - // submitted value will stay as previous value (null on initial request) if a parameter is absent - if (paramValue != null) { - setSubmittedValue(paramValue); - } - - rawValue = (String) getSubmittedValue(); - setValid(true); - - } - - /** - *

      - * Specialize superclass behavior to treat null differently. In - * this class, a null value along with the "required" flag being set to true will cause a - * validation failure. Otherwise, If the {@link UIInput#EMPTY_STRING_AS_NULL_PARAM_NAME} - * context parameter is true and the value is {@code null}, call {@link UIInput#setSubmittedValue} passing the empty - * string as the argument. This will cause the normal validation processing to happen, including bean validation. - *

      - * - * @param context the Faces context. - * @since 2.0 - */ - - @Override - public void processValidators(FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - // Skip processing if our rendered flag is false - if (!isRendered()) { - return; - } - - Object submittedValue = getSubmittedValue(); - - // we have to override since UIInput assumes that a null value means don't check - if (submittedValue == null && myIsRequired()) { - String requiredMessageStr = getRequiredMessage(); - FacesMessage message; - if (null != requiredMessageStr) { - message = new FacesMessage(FacesMessage.SEVERITY_ERROR, requiredMessageStr, requiredMessageStr); - } else { - message = MessageFactory.getMessage(context, REQUIRED_MESSAGE_ID, MessageFactory.getLabel(context, this)); - } - context.addMessage(getClientId(context), message); - setValid(false); - context.validationFailed(); - context.renderResponse(); - } else { - super.processValidators(context); - } - } - - private boolean myIsRequired() { - return super.isRequired() || isRequiredViaNestedRequiredValidator(); - } - - /* - * JAVASERVERFACES-3058. Handle the nested requiredValidator case explicitly in the case of . - * - */ - private boolean isRequiredViaNestedRequiredValidator() { - boolean result = false; - if (null == validators) { - return result; - } - Iterator iter = validators.iterator(); - while (iter.hasNext()) { - if (iter.next() instanceof RequiredValidator) { - // See JAVASERVERFACES-2526. Note that we can assume - // that at this point the validator is not disabled, - // so the mere existence of the validator implies it is - // enabled. - result = true; - Object submittedValue = getSubmittedValue(); - if (submittedValue == null) { - // JAVASERVERFACES-3058 asserts that view parameters - // should be treated differently than form parameters - // if they are not submitted. I'm not sure if that's - // correct, but let's put this in and see how - // the community responds. - setSubmittedValue(""); - } - break; - } - } - - return result; - } - - /** - *

      - * Call through to superclass {@link UIInput#updateModel} then take the additional action of pushing the value into - * request scope if and only if the value is not a value expression, is valid, and the local value was set on this - * lifecycle execution. - *

      - * - * @since 2.0 - */ - - @Override - public void updateModel(FacesContext context) { - super.updateModel(context); - if (!hasValueExpression() && isValid() && isLocalValueSet()) { - // QUESTION should this be done even when a value expression is present? - // ANSWER: I don't see why not. - context.getExternalContext().getRequestMap().put(getName(), getLocalValue()); - } - } - - // This is called during the real "Render Response" phase - - /** - *

      - * Called specially by {@link UIViewRoot#encodeEnd}, this method simply sets the submitted value to be the return from - * {@link #getStringValue}. - *

      - * - * @throws IOException when an I/O error occurs. - * @since 2.0 - */ - @Override - public void encodeAll(FacesContext context) throws IOException { - if (context == null) { - throw new NullPointerException(); - } - - // if there is a value expression, update view parameter w/ latest value after render - // QUESTION is it okay that a null string value may be suppressing the view parameter value? - // ANSWER: I'm not sure. - setSubmittedValue(getStringValue(context)); - } - - /** - *

      - * If the value of this parameter comes from a ValueExpression return the value of the expression, - * otherwise, return the local value. - *

      - * - * @param context the Faces context. - * @return the string value. - * @since 2.0 - */ - - public String getStringValue(FacesContext context) { - String result = null; - if (hasValueExpression()) { - result = getStringValueFromModel(context); - } else { - result = null != rawValue ? rawValue : (String) getValue(); - } - return result; - } - - /** - *

      - * Manually perform standard conversion steps to get a string value from the value expression. - *

      - * - * @param context the Faces context. - * @return the string value from the model. - * @since 2.0 - */ - - public String getStringValueFromModel(FacesContext context) throws ConverterException { - ValueExpression ve = getValueExpression("value"); - if (ve == null) { - return null; - } - - Object currentValue = ve.getValue(context.getELContext()); - - // If there is a converter attribute, use it to to ask application - // instance for a converter with this identifer. - Converter c = getConverter(); - - if (c == null) { - // if value is null and no converter attribute is specified, then - // return null (null has meaning for a view parameters; it means remove it). - if (currentValue == null) { - return null; - } - // Do not look for "by-type" converters for Strings - if (currentValue instanceof String) { - return (String) currentValue; - } - - // if converter attribute set, try to acquire a converter - // using its class type. - - Class converterType = currentValue.getClass(); - c = context.getApplication().createConverter(converterType); - - // if there is no default converter available for this identifier, - // assume the model type to be String. - if (c == null) { - return currentValue.toString(); - } - } - - return c.getAsString(context, this, currentValue); - } - - /** - *

      - * Because this class has no {@link Renderer}, leverage the one from the standard HTML_BASIC {@link RenderKit} with - * component-family: jakarta.faces.Input and renderer-type: jakarta.faces.Text and call its - * {@link Renderer#getConvertedValue} method. - *

      - * - * @param submittedValue the submitted value. - * @return the converted value. - * @since 2.0 - */ - @Override - protected Object getConvertedValue(FacesContext context, Object submittedValue) throws ConverterException { - - return getInputTextRenderer(context).getConvertedValue(context, this, submittedValue); - - } - - private Renderer getInputTextRenderer(FacesContext context) { - if (null == inputTextRenderer) { - RenderKitFactory rkf = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY); - RenderKit standard = rkf.getRenderKit(context, RenderKitFactory.HTML_BASIC_RENDER_KIT); - inputTextRenderer = standard.getRenderer("jakarta.faces.Input", "jakarta.faces.Text"); - } - assert null != inputTextRenderer; - return inputTextRenderer; - } - - // ----------------------------------------------------- Helper Methods - - private boolean hasValueExpression() { - return null != getValueExpression("value"); - } - - /** - *

      - * Inner class to encapsulate a UIViewParameter instance so that it may be safely referenced regardless of - * whether or not the current view is the same as the view in which this UIViewParameter resides. - *

      - * - * @since 2.0 - */ - - public static class Reference { - - private StateHolderSaver saver; - private int indexInParent; - private String viewIdAtTimeOfConstruction; - - /** - *

      - * Construct a reference to a UIViewParameter. This constructor cause the {@link StateHolder#saveState} - * method to be called on argument UIViewParameter. - *

      - * - * @param context the FacesContextfor this request - * @param param the UIViewParameter. - * @param indexInParent the index of the UIViewParameter in its parent UIPanel. - * @param viewIdAtTimeOfConstruction the viewId of the view in which the UIViewParameter is included. This - * may not be the same as the viewId from the context argument. - * - * @since 2.0 - */ - public Reference(FacesContext context, UIViewParameter param, int indexInParent, String viewIdAtTimeOfConstruction) { - saver = new StateHolderSaver(context, param); - this.indexInParent = indexInParent; - this.viewIdAtTimeOfConstruction = viewIdAtTimeOfConstruction; - } - - /** - *

      - * Return the UIViewParameter to which this instance refers. If the current viewId is the same as the - * viewId passed to our constructor, use the index passed to the constructor to find the actual - * UIViewParameter instance and return it. Otherwise, call {@link StateHolder#restoreState} on the saved - * state and return the result. - *

      - * - * @param context the FacesContextfor this request - * @return the UIViewParameter. - * @since 2.0 - */ - public UIViewParameter getUIViewParameter(FacesContext context) { - UIViewParameter result = null; - UIViewRoot root = context.getViewRoot(); - // If the view root is the same as when we were constructed... - if (viewIdAtTimeOfConstruction.equals(root.getViewId())) { - // get the actual view parameter from the tree... - UIComponent metadataFacet = root.getFacet(UIViewRoot.METADATA_FACET_NAME); - result = (UIViewParameter) metadataFacet.getChildren().get(indexInParent); - } else { - // otherwise, use the saved one - result = (UIViewParameter) saver.restore(context); - } - - return result; - } - - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UIViewRoot.java b/impl/src/main/java/jakarta/faces/component/UIViewRoot.java deleted file mode 100644 index 4a069f2453..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIViewRoot.java +++ /dev/null @@ -1,1868 +0,0 @@ -/* - * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import static java.util.Collections.unmodifiableList; -import static java.util.logging.Level.WARNING; - -import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.ListIterator; -import java.util.Locale; -import java.util.Map; -import java.util.concurrent.CopyOnWriteArrayList; -import java.util.logging.Level; -import java.util.logging.Logger; - -import jakarta.el.MethodExpression; -import jakarta.faces.FacesException; -import jakarta.faces.FactoryFinder; -import jakarta.faces.application.ProjectStage; -import jakarta.faces.application.ResourceHandler; -import jakarta.faces.component.behavior.ClientBehaviorContext; -import jakarta.faces.component.visit.VisitCallback; -import jakarta.faces.component.visit.VisitContext; -import jakarta.faces.component.visit.VisitResult; -import jakarta.faces.context.FacesContext; -import jakarta.faces.context.PartialViewContext; -import jakarta.faces.event.AbortProcessingException; -import jakarta.faces.event.ComponentSystemEvent; -import jakarta.faces.event.ExceptionQueuedEvent; -import jakarta.faces.event.ExceptionQueuedEventContext; -import jakarta.faces.event.FacesEvent; -import jakarta.faces.event.PhaseEvent; -import jakarta.faces.event.PhaseId; -import jakarta.faces.event.PhaseListener; -import jakarta.faces.event.PostConstructViewMapEvent; -import jakarta.faces.event.PostRestoreStateEvent; -import jakarta.faces.event.PreDestroyViewMapEvent; -import jakarta.faces.event.SystemEvent; -import jakarta.faces.event.SystemEventListener; -import jakarta.faces.lifecycle.Lifecycle; -import jakarta.faces.lifecycle.LifecycleFactory; -import jakarta.faces.render.ResponseStateManager; -import jakarta.faces.view.ViewDeclarationLanguage; -import jakarta.faces.view.ViewMetadata; -import jakarta.faces.webapp.FacesServlet; - -/** - *

      - * UIViewRoot is the UIComponent that represents the root of - * the UIComponent tree. This component renders markup as the response to Ajax requests. It also serves as the root of - * the component tree, and as a place to hang per-view {@link PhaseListener}s. - *

      - * - *

      - * For each of the following lifecycle phase methods: - *

      - * - *
        - * - *
      • - *

        - * {@link #processDecodes} - *

        - *
      • - * - *
      • - *

        - * {@link #processValidators} - *

        - *
      • - * - *
      • - *

        - * {@link #processUpdates} - *

        - *
      • - * - *
      • - *

        - * {@link #processApplication} - *

        - *
      • - * - *
      • - *

        - * RenderResponse, via {@link #encodeBegin} and {@link #encodeEnd} - *

        - *
      • - * - *
      - * - *

      - * Take the following action regarding PhaseListeners. - *

      - * - *
      - * - *

      - * Initialize a state flag to false. - *

      - * - *

      - * If {@link #getBeforePhaseListener} returns non-null, invoke the listener, passing in the correct - * corresponding {@link PhaseId} for this phase. - *

      - * - *

      - * Upon return from the listener, call {@link FacesContext#getResponseComplete} and - * {@link FacesContext#getRenderResponse}. If either return true set the internal state flag to - * true. - *

      - * - *

      - * If or one or more listeners have been added by a call to {@link #addPhaseListener}, invoke the - * beforePhase method on each one whose {@link PhaseListener#getPhaseId} matches the current phaseId, - * passing in the same PhaseId as in the previous step. - *

      - * - *

      - * Upon return from each listener, call {@link FacesContext#getResponseComplete} and - * {@link FacesContext#getRenderResponse}. If either return true set the internal state flag to - * true. - *

      - * - * - *

      - * Execute any processing for this phase if the internal state flag was not set. - *

      - * - *

      - * If {@link #getAfterPhaseListener} returns non-null, invoke the listener, passing in the correct - * corresponding {@link PhaseId} for this phase. - *

      - * - *

      - * If or one or more listeners have been added by a call to {@link #addPhaseListener}, invoke the - * afterPhase method on each one whose {@link PhaseListener#getPhaseId} matches the current phaseId, - * passing in the same PhaseId as in the previous step. - *

      - * - *
      - */ - -public class UIViewRoot extends UIComponentBase implements UniqueIdVendor { - - // ------------------------------------------------------ Manifest Constants - - /** - * The key in the facet collection that contains the meta data of the view root. - * For example, the UIViewParameters are stored here. - */ - public static final String METADATA_FACET_NAME = "jakarta_faces_metadata"; - - /** - *

      - * The key in the value set of the view metadata BeanDescriptor, the value of which is a - * List<{@link UIViewParameter.Reference}>. - *

      - * - * @since 2.0 - */ - public static final String VIEW_PARAMETERS_KEY = "jakarta.faces.component.VIEW_PARAMETERS_KEY"; - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.ViewRoot"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.ViewRoot"; - - /** - *

      - * If this param is set, and calling toLowerCase().equals("true") on a String representation of its value returns true, - * exceptions thrown by {@link PhaseListener}s installed on the {@code UIViewRoot} are queued to the - * {@link jakarta.faces.context.ExceptionHandler} instead of being logged and swallowed. - *

      - * - * @since 2.3 - */ - public static final String VIEWROOT_PHASE_LISTENER_QUEUES_EXCEPTIONS_PARAM_NAME = "jakarta.faces.VIEWROOT_PHASE_LISTENER_QUEUES_EXCEPTIONS"; - - /** - *

      - * The prefix that will be used for identifiers generated by the createUniqueId() method. - */ - static public final String UNIQUE_ID_PREFIX = "j_id"; - - private static Lifecycle lifecycle; - - private static final Logger LOGGER = Logger.getLogger("jakarta.faces", "jakarta.faces.LogStrings"); - - private static final String LOCATION_IDENTIFIER_PREFIX = "jakarta_faces_location_"; - private static final Map LOCATION_IDENTIFIER_MAP = new LinkedHashMap<>(3, 1.0f); - static { - LOCATION_IDENTIFIER_MAP.put("head", LOCATION_IDENTIFIER_PREFIX + "HEAD"); - LOCATION_IDENTIFIER_MAP.put("form", LOCATION_IDENTIFIER_PREFIX + "FORM"); - LOCATION_IDENTIFIER_MAP.put("body", LOCATION_IDENTIFIER_PREFIX + "BODY"); - } - - enum PropertyKeys { - /** - *

      - * The render kit identifier of the {@link jakarta.faces.render.RenderKit} associated wth this view. - *

      - */ - renderKitId, - /** - *

      - * The view identifier of this view. - *

      - */ - viewId, locale, lastId, beforePhase, afterPhase, phaseListeners, resourceLibraryContracts - } - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Create a new {@link UIViewRoot} instance with default property values. - *

      - */ - public UIViewRoot() { - super(); - setRendererType(null); - setId(createUniqueId()); - } - - // ------------------------------------------------------ Instance Variables - - /** - *

      - * Set during view build time. - */ - private Doctype doctype; - - /** - *

      - * Set and cleared during the lifetime of a lifecycle phase. Has no meaning between phases. If true, the - * lifecycle processing for the current phase must not take place. - *

      - */ - private boolean skipPhase; - - /** - *

      - * Set and cleared during the lifetime of a lifecycle phase. Has no meaning between phases. If true, the - * MethodExpression associated with afterPhase will not be invoked nor will any PhaseListeners - * associated with this UIViewRoot. - */ - private boolean beforeMethodException; - - /** - *

      - * Set and cleared during the lifetime of a lifecycle phase. Has no meaning between phases. - */ - private ListIterator phaseListenerIterator; - - // -------------------------------------------------------------- Properties - - /** - *

      - * Override superclass method to always return {@code true} because a {@code UIViewRoot} is defined to always be in a - * view. - *

      - * - * @since 2.0 - */ - @Override - public boolean isInView() { - return true; - } - - /** - *

      - * Overridden to take no action. - *

      - * - * @since 2.0 - * @param isInView ignore the value. - */ - @Override - public void setInView(boolean isInView) { - // no-op - } - - /** - * @see UIComponent#getFamily() - */ - @Override - public String getFamily() { - return COMPONENT_FAMILY; - } - - /** - *

      - * Return the render kit identifier of the {@link jakarta.faces.render.RenderKit} associated with this view. Unless - * explicitly set, as in {@link jakarta.faces.application.ViewHandler#createView}, the returned value will be - * null. - *

      - * - * @return the render kit id, or null. - */ - public String getRenderKitId() { - return (String) getStateHelper().eval(PropertyKeys.renderKitId); - } - - /** - *

      - * Set the render kit identifier of the {@link jakarta.faces.render.RenderKit} associated with this view. This method - * may be called at any time between the end of Apply Request Values phase of the request processing lifecycle - * (i.e. when events are being broadcast) and the beginning of the Render Response phase. - *

      - * - * @param renderKitId The new {@link jakarta.faces.render.RenderKit} identifier, or null to disassociate - * this view with any specific {@link jakarta.faces.render.RenderKit} instance - */ - public void setRenderKitId(String renderKitId) { - getStateHelper().put(PropertyKeys.renderKitId, renderKitId); - } - - /** - *

      - * Return the view identifier for this view. - *

      - * - * @return the view id. - */ - public String getViewId() { - return (String) getStateHelper().get(PropertyKeys.viewId); - } - - /** - *

      - * Set the view identifier for this view. - *

      - * - * @param viewId The new view identifier - */ - public void setViewId(String viewId) { - getStateHelper().put(PropertyKeys.viewId, viewId); - } - - /** - *

      - * Return the doctype of this view. - *

      - * - * @return the doctype of this view. - * - * @since 4.0 - */ - public Doctype getDoctype() { - return doctype; - } - - /** - *

      - * Set the doctype of this view. - *

      - * - * @param doctype The doctype. - * - * @since 4.0 - */ - public void setDoctype(Doctype doctype) { - this.doctype = doctype; - } - - // ------------------------------------------------ Event Management Methods - - /** - *

      - * Return the {@link MethodExpression} that will be invoked before this view is rendered. - *

      - * - * @return the {@link MethodExpression} that will be invoked before this view is rendered. - * @since 1.2 - */ - public MethodExpression getBeforePhaseListener() { - return (MethodExpression) getStateHelper().get(PropertyKeys.beforePhase); - } - - /** - *

      - * Allow an arbitrary method to be called for the - * "beforePhase" event as the UIViewRoot runs through its lifecycle. This method will be called for all phases - * except {@link PhaseId#RESTORE_VIEW}. Unlike a true {@link PhaseListener}, - * this approach doesn't allow for only receiving {@link PhaseEvent}s for a given phase. - *

      - * - *

      - * The method must conform to the signature of {@link PhaseListener#beforePhase}. - *

      - * - * @param newBeforePhase the {@link MethodExpression} that will be invoked before this view is rendered. - * @since 1.2 - */ - public void setBeforePhaseListener(MethodExpression newBeforePhase) { - getStateHelper().put(PropertyKeys.beforePhase, newBeforePhase); - } - - /** - *

      - * Return the {@link MethodExpression} that will be invoked after this view is rendered. - *

      - * - * @return the {@link MethodExpression} that will be invoked after this view is rendered. - * - * @since 1.2 - */ - public MethodExpression getAfterPhaseListener() { - return (MethodExpression) getStateHelper().get(PropertyKeys.afterPhase); - } - - /** - *

      - * Allow an arbitrary method to be called for the "afterPhase" event as the - * UIViewRoot runs through its lifecycle. This method will be called for all phases - * including {@link PhaseId#RESTORE_VIEW}. Unlike a true - * {@link PhaseListener}, this approach doesn't allow for only receiving {@link PhaseEvent}s for a given phase. - *

      - *

      - * The method must conform to the signature of {@link PhaseListener#afterPhase}. - *

      - * - * @param newAfterPhase the {@link MethodExpression} that will be invoked after this view is rendered. - * - * @since 1.2 - */ - public void setAfterPhaseListener(MethodExpression newAfterPhase) { - getStateHelper().put(PropertyKeys.afterPhase, newAfterPhase); - } - - /** - *

      - * If the argument toRemove is in the list of {@link PhaseListener}s for this instance, it must be removed. - *

      - * - * @param toRemove the {@link PhaseListener} to remove. - * - * @since 1.2 - */ - public void removePhaseListener(PhaseListener toRemove) { - getStateHelper().remove(PropertyKeys.phaseListeners, toRemove); - } - - /** - *

      - * Add the argument newPhaseListener to the list of {@link PhaseListener}s on this UIViewRoot. - *

      - * - * @param newPhaseListener the {@link PhaseListener} to add - * - * @since 1.2 - */ - public void addPhaseListener(PhaseListener newPhaseListener) { - getStateHelper().add(PropertyKeys.phaseListeners, newPhaseListener); - } - - /** - * - *

      - * Return an unmodifiable list of the PhaseListener instances attached to this UIViewRoot - * instance. - *

      - * - * @return the list of phase listeners. - * @since 2.0 - */ - @SuppressWarnings("unchecked") - public List getPhaseListeners() { - List result = (List) getStateHelper().get(PropertyKeys.phaseListeners); - - return result != null ? unmodifiableList(result) : unmodifiableList(Collections.emptyList()); - } - - /** - *

      - * Add argument component, which is assumed to represent a resource instance, as a resource to this view. A - * resource instance is rendered by a resource Renderer, as described in the Standard HTML RenderKit. The - * default implementation must call through to - * {@link #addComponentResource(jakarta.faces.context.FacesContext, jakarta.faces.component.UIComponent, java.lang.String)}. - *

      - * - * @param context {@link FacesContext} for the current request - * @param componentResource The {@link UIComponent} representing a {@link jakarta.faces.application.Resource} instance - * - * @since 2.0 - */ - public void addComponentResource(FacesContext context, UIComponent componentResource) { - addComponentResource(context, componentResource, null); - } - - /** - *

      - * Add argument component, which is assumed to represent a resource instance, as a resource to this view. A - * resource instance is rendered by a resource Renderer, as described in the Standard HTML RenderKit. - *

      - * - *
      - * - *

      - * The component must be added using the following algorithm: - *

      - * - *
        - * - *
      • - *

        - * If the target argument is null, look for a target attribute on the - * component. If there is no target attribute, set target to be the default value - * head - *

        - *
      • - * - *
      • - *

        - * Call {@link #getComponentResources} to obtain the child list for the given target. - *

        - *
      • - * - *
      • - *

        - * If the component ID of componentResource matches the the ID of a resource that has allready been added, - * remove the old resource. - *

        - *
      • - * - *
      • - *

        - * Add the component resource to the list. - *

        - *
      • - * - *
      - * - *
      - * - *
      - *

      - * The resource Renderer must ensure of the following: - *

        - *
      • Do not render when {@link ResourceHandler#isResourceRendered(FacesContext, String, String)} returns - * true.
      • - *
      • After rendering, call {@link ResourceHandler#markResourceRendered(FacesContext, String, String)}.
      • - *
      - *
      - * - * @param context {@link FacesContext} for the current request - * @param componentResource The {@link UIComponent} representing a {@link jakarta.faces.application.Resource} instance - * @param target The name of the facet for which the {@link UIComponent} will be added - * - * @since 2.0 - */ - public void addComponentResource(FacesContext context, UIComponent componentResource, String target) { - final Map attributes = componentResource.getAttributes(); - - // look for a target in the component attribute set if arg is not set. - if (target == null) { - target = (String) attributes.get("target"); - } - if (target == null) { - target = "head"; - } - List facetChildren = getComponentResources(context, target, true); - String id = componentResource.getId(); - if (id != null) { - for (UIComponent c : facetChildren) { - if (id.equals(c.getId())) { - facetChildren.remove(c); - } - } - } - - // add the resource to the facet - facetChildren.add(componentResource); - } - - /** - *

      - * Return an unmodifiable List of - * {@link UIComponent}s for the provided target agrument. Each component in the - * List is assumed to represent a resource instance. - *

      - * - *
      - *

      - * The default implementation must use an algorithm equivalent to the the following. - *

      - *
        - *
      • Locate the facet for the component by calling getFacet() using target as - * the argument.
      • - * - *
      • If the facet is not found, create the facet by calling context.getApplication().createComponent(). - * The argument to this method must refer to a component that extends - * {@link UIPanel} and overrides the encodeAll() method to take no action. This is necessary to prevent - * component resources from being inadvertently rendered. - * - *
          - * - *
        • Set the id of the facet to be a string created by prepending the - * literal string “jakarta_faces_location_” (without the quotes) to the value of the - * target argument
        • - * - *
        • Add the facet to the facets Map using target as the key
        • - *
        - *
      • return the children of the facet
      • - *
      - * - *
      - * - * @param context the Faces context. - * @param target The name of the facet for which the components will be returned. - * - * @return A List of {@link UIComponent} children of the facet with the name target. If no - * children are found for the facet, return Collections.emptyList(). - * - * @throws NullPointerException if target or context is null - * - * @since 2.0 - */ - public List getComponentResources(FacesContext context, String target) { - if (target == null) { - throw new NullPointerException(); - } - - List resources = getComponentResources(context, target, false); - - return resources != null ? resources : Collections.emptyList(); - } - - /** - *

      - * Return an unmodifiable ordered List of all {@link UIComponent} resources of all supported targets. Each - * component in the List is assumed to represent a resource instance. The ordering is the same - * as the resources would appear in the component tree. - *

      - * - * @param context The Faces context. - * - * @return A List of all {@link UIComponent} resources of all supported targets. If no resources are found, - * return an empty List. - * - * @throws NullPointerException If context is null. - * - * @since 2.3 - */ - public List getComponentResources(FacesContext context) { - List resources = new ArrayList<>(); - - for (String target : LOCATION_IDENTIFIER_MAP.keySet()) { - resources.addAll(getComponentResources(context, target)); - } - - return unmodifiableList(resources); - } - - /** - *

      - * Remove argument component, which is assumed to represent a resource instance, as a resource to this - * view. - *

      - * - * @param context {@link FacesContext} for the current request - * @param componentResource The {@link UIComponent} representing a {@link jakarta.faces.application.Resource} instance - * - * @since 2.0 - */ - public void removeComponentResource(FacesContext context, UIComponent componentResource) { - removeComponentResource(context, componentResource, null); - } - - /** - *

      - * Remove argument component, which is assumed to represent a resource instance, as a resource to this - * view. A resource instance is rendered by a resource Renderer, as described in the Standard HTML - * RenderKit. - *

      - * - *
      - *

      - * The component must be removed using the following algorithm: - *

        - *
      • If the target argument is null, look for a target attribute on the - * component.
        - * If there is no target attribute, set target to be the default value head
      • - *
      • Call {@link #getComponentResources} to obtain the child list for the given target.
      • - *
      • Remove the component resource from the child list.
      • - *
      - *
      - * - * @param context {@link FacesContext} for the current request - * @param componentResource The {@link UIComponent} representing a {@link jakarta.faces.application.Resource} instance - * @param target The name of the facet for which the {@link UIComponent} will be added - * - * @since 2.0 - */ - public void removeComponentResource(FacesContext context, UIComponent componentResource, String target) { - final Map attributes = componentResource.getAttributes(); - - // look for a target in the component attribute set if arg is not set. - if (target == null) { - target = (String) attributes.get("target"); - } - if (target == null) { - target = "head"; - } - List facetChildren = getComponentResources(context, target, false); - if (facetChildren != null) { - facetChildren.remove(componentResource); - } - } - - /** - *

      - * An array of Lists of events that have been queued for later broadcast, with one List for each lifecycle phase. The - * list indices match the ordinals of the PhaseId instances. This instance is lazily instantiated. This list is - * NOT part of the state that is saved and restored for this component. - *

      - */ - private List> events; - - /** - *

      - * Override the default {@link UIComponentBase#queueEvent} behavior to accumulate the queued events for later - * broadcasting. - *

      - * - * @param event {@link FacesEvent} to be queued - * - * @throws IllegalStateException if this component is not a descendant of a {@link UIViewRoot} - * @throws NullPointerException if event is null - */ - @Override - public void queueEvent(FacesEvent event) { - if (event == null) { - throw new NullPointerException(); - } - - // We are a UIViewRoot, so no need to check for the ISE - if (events == null) { - int len = PhaseId.VALUES.size(); - List> events = new ArrayList<>(len); - for (int i = 0; i < len; i++) { - events.add(new ArrayList<>(5)); - } - this.events = events; - } - - events.get(event.getPhaseId().getOrdinal()).add(event); - } - - /** - *

      - * Broadcast any events that have been queued. First broadcast events that have been queued for - * {@link PhaseId#ANY_PHASE}. Then broadcast ane events that have been queued for the current phase. In both cases, - * {@link UIComponent#pushComponentToEL} must be called before the event is broadcast, and - * {@link UIComponent#popComponentFromEL} must be called after the return from the broadcast, even in the case of an - * exception. - *

      - * - * @param context {@link FacesContext} for the current request - * @param phaseId {@link PhaseId} of the current phase - * - * @since 2.0 - */ - public void broadcastEvents(FacesContext context, PhaseId phaseId) { - if (events == null) { - // no events have been queued - return; - } - - boolean hasMoreAnyPhaseEvents; - boolean hasMoreCurrentPhaseEvents; - - List eventsForPhaseId = events.get(PhaseId.ANY_PHASE.getOrdinal()); - - // keep iterating till we have no more events to broadcast. - // This is necessary for events that cause other events to be - // queued. PENDING(edburns): here's where we'd put in a check - // to prevent infinite event queueing. - do { - // broadcast the ANY_PHASE events first - if (null != eventsForPhaseId) { - // We cannot use an Iterator because we will get - // ConcurrentModificationException errors, so fake it - while (!eventsForPhaseId.isEmpty()) { - FacesEvent event = eventsForPhaseId.get(0); - UIComponent source = event.getComponent(); - UIComponent compositeParent = null; - try { - if (!UIComponent.isCompositeComponent(source)) { - compositeParent = UIComponent.getCompositeComponentParent(source); - } - if (compositeParent != null) { - compositeParent.pushComponentToEL(context, null); - } - source.pushComponentToEL(context, null); - source.broadcast(event); - } catch (AbortProcessingException e) { - context.getApplication().publishEvent(context, ExceptionQueuedEvent.class, - new ExceptionQueuedEventContext(context, e, source, phaseId)); - } finally { - source.popComponentFromEL(context); - if (compositeParent != null) { - compositeParent.popComponentFromEL(context); - } - } - eventsForPhaseId.remove(0); // Stay at current position - } - } - - // then broadcast the events for this phase. - if ((eventsForPhaseId = events.get(phaseId.getOrdinal())) != null) { - // We cannot use an Iterator because we will get - // ConcurrentModificationException errors, so fake it - while (!eventsForPhaseId.isEmpty()) { - FacesEvent event = eventsForPhaseId.get(0); - UIComponent source = event.getComponent(); - UIComponent compositeParent = null; - try { - if (!UIComponent.isCompositeComponent(source)) { - compositeParent = getCompositeComponentParent(source); - } - if (compositeParent != null) { - compositeParent.pushComponentToEL(context, null); - } - source.pushComponentToEL(context, null); - source.broadcast(event); - } catch (AbortProcessingException ape) { - // A "return" here would abort remaining events too - context.getApplication().publishEvent(context, ExceptionQueuedEvent.class, - new ExceptionQueuedEventContext(context, ape, source, phaseId)); - } finally { - source.popComponentFromEL(context); - if (compositeParent != null) { - compositeParent.popComponentFromEL(context); - } - } - eventsForPhaseId.remove(0); // Stay at current position - } - } - - // true if we have any more ANY_PHASE events - hasMoreAnyPhaseEvents = null != (eventsForPhaseId = events.get(PhaseId.ANY_PHASE.getOrdinal())) && !eventsForPhaseId.isEmpty(); - // true if we have any more events for the argument phaseId - hasMoreCurrentPhaseEvents = null != events.get(phaseId.getOrdinal()) && !events.get(phaseId.getOrdinal()).isEmpty(); - - } while (hasMoreAnyPhaseEvents || hasMoreCurrentPhaseEvents); - } - - - // ------------------------------------------------ Lifecycle Phase Handlers - - @SuppressWarnings("unchecked") - private void initState() { - skipPhase = false; - beforeMethodException = false; - List listeners = (List) getStateHelper().get(PropertyKeys.phaseListeners); - phaseListenerIterator = listeners != null ? listeners.listIterator() : null; - } - - // avoid creating the PhaseEvent if possible by doing redundant - // null checks. - private void notifyBefore(FacesContext context, PhaseId phaseId) { - if (getBeforePhaseListener() != null || phaseListenerIterator != null) { - notifyPhaseListeners(context, phaseId, true); - } - } - - // avoid creating the PhaseEvent if possible by doing redundant - // null checks. - private void notifyAfter(FacesContext context, PhaseId phaseId) { - if (getAfterPhaseListener() != null || phaseListenerIterator != null) { - notifyPhaseListeners(context, phaseId, false); - } - } - - /** - *

      - * The default implementation must call - * {@link UIComponentBase#processRestoreState} from within a try block. The try block must - * have a finally block that ensures that no {@link FacesEvent}s remain in the event queue. - * - *

      - * - * @param context the FacesContext for this requets - * @param state the opaque state object obtained from the {@link jakarta.faces.application.StateManager} - */ - @Override - public void processRestoreState(FacesContext context, Object state) { - // hack to work around older state managers that may not set the - // view root early enough - if (context.getViewRoot() == null) { - context.setViewRoot(this); - } - - super.processRestoreState(context, state); - } - - /** - *

      - * If the argument event is an instance of {@link PostRestoreStateEvent} and - * {@link PartialViewContext#isPartialRequest()} returns true, then loop over all component resources and - * call {@link ResourceHandler#markResourceRendered(FacesContext, String, String)} for each of them. Finally, delegate - * to super. - *

      - */ - @Override - public void processEvent(ComponentSystemEvent event) throws AbortProcessingException { - FacesContext context = event.getFacesContext(); - - if (event instanceof PostRestoreStateEvent && context.getPartialViewContext().isPartialRequest() && !context.getPartialViewContext().isRenderAll()) { - ResourceHandler resourceHandler = context.getApplication().getResourceHandler(); - - for (UIComponent resource : getComponentResources(context)) { - String name = (String) resource.getAttributes().get("name"); - String library = (String) resource.getAttributes().get("library"); - resourceHandler.markResourceRendered(context, name, library); - } - } - - super.processEvent(event); - } - - /** - *
      - *

      - * Perform partial processing by calling {@link jakarta.faces.context.PartialViewContext#processPartial} with - * {@link PhaseId#APPLY_REQUEST_VALUES} if: - *

        - *
      • {@link jakarta.faces.context.PartialViewContext#isPartialRequest} returns true and we don't have a - * request to process all components in the view ({@link jakarta.faces.context.PartialViewContext#isExecuteAll} returns - * false)
      • - *
      - * Perform full processing by calling {@link UIComponentBase#processDecodes} if one of the following conditions are met: - *
        - *
      • {@link jakarta.faces.context.PartialViewContext#isPartialRequest} returns true and we have a request - * to process all components in the view ({@link jakarta.faces.context.PartialViewContext#isExecuteAll} returns - * true)
      • - *
      • {@link jakarta.faces.context.PartialViewContext#isPartialRequest} returns false
      • - *
      - *
      - *

      - * Override the default {@link UIComponentBase#processDecodes} behavior to broadcast any queued events after the default - * processing or partial processing has been completed and to clear out any events for later phases if the event - * processing for this phase caused {@link FacesContext#renderResponse} or {@link FacesContext#responseComplete} to be - * called. - *

      - * - * @param context {@link FacesContext} for the request we are processing - * - * @throws NullPointerException if context is null - */ - @Override - public void processDecodes(FacesContext context) { - initState(); - notifyBefore(context, PhaseId.APPLY_REQUEST_VALUES); - - try { - if (!skipPhase) { - if (context.getPartialViewContext().isPartialRequest() && !context.getPartialViewContext().isExecuteAll()) { - context.getPartialViewContext().processPartial(PhaseId.APPLY_REQUEST_VALUES); - } else { - super.processDecodes(context); - } - broadcastEvents(context, PhaseId.APPLY_REQUEST_VALUES); - } - } finally { - clearFacesEvents(context); - notifyAfter(context, PhaseId.APPLY_REQUEST_VALUES); - } - } - - /** - *

      - * Visit the clientIds and, if the component is an instance of {@link EditableValueHolder}, call its - * {@link EditableValueHolder#resetValue} method. Use {@link #visitTree} to do the visiting. - *

      - * - * @since 2.2 - * - * @param context the {@link FacesContext} for the request we are processing. - * @param clientIds The client ids to be visited, on which the described action will be taken. - */ - public void resetValues(FacesContext context, Collection clientIds) { - visitTree(VisitContext.createVisitContext(context, clientIds, null), DoResetValues.INSTANCE); - } - - private static class DoResetValues implements VisitCallback { - - private static final DoResetValues INSTANCE = new DoResetValues(); - - @Override - public VisitResult visit(VisitContext context, UIComponent target) { - if (target instanceof EditableValueHolder) { - ((EditableValueHolder) target).resetValue(); - } - // If render ID didn't specifically point to an EditableValueHolder. Visit all children as well. - else if (!VisitContext.ALL_IDS.equals(context.getIdsToVisit())) { - target.visitTree(VisitContext.createVisitContext(context.getFacesContext(), null, context.getHints()), this); - } - return VisitResult.ACCEPT; - } - } - - /** - *

      - * Override the default {@link UIComponentBase#encodeBegin} - * behavior. If {@link #getBeforePhaseListener} returns non-null, invoke it, passing a {@link PhaseEvent} - * for the {@link PhaseId#RENDER_RESPONSE} phase. If the internal list populated by calls to {@link #addPhaseListener} - * is non-empty, any listeners in that list must have their {@link PhaseListener#beforePhase} method called, passing the - * PhaseEvent. Any {@code Exception}s that occur during invocation of any of the beforePhase listeners must - * be logged and swallowed, unless the - * {@link #VIEWROOT_PHASE_LISTENER_QUEUES_EXCEPTIONS_PARAM_NAME} parameter is set. In that case, the {@code Exception} - * must be passed to the {@link jakarta.faces.context.ExceptionHandler} as well. - *

      - */ - @Override - public void encodeBegin(FacesContext context) throws IOException { - initState(); - notifyBefore(context, PhaseId.RENDER_RESPONSE); - - if (!context.getResponseComplete()) { - super.encodeBegin(context); - } - } - - /** - *

      - * If {@link jakarta.faces.context.PartialViewContext#isAjaxRequest} returns true, perform partial - * rendering by calling {@link jakarta.faces.context.PartialViewContext#processPartial} with - * {@link PhaseId#RENDER_RESPONSE}. If {@link jakarta.faces.context.PartialViewContext#isAjaxRequest} returns - * false, delegate to the parent {@link jakarta.faces.component.UIComponentBase#encodeChildren} method. - *

      - * - *

      - * If this {@link UIViewRoot} is an instance of {@link NamingContainer}, then the Jakarta Faces implementation - * must ensure that all encoded POST request parameter names are prefixed with - * {@link UIViewRoot#getContainerClientId(FacesContext)} as per rules of {@link UIComponent#getClientId(FacesContext)}. - * This also covers all predefined POST request parameters which are listed below: - *

      - *
        - *
      • {@link ResponseStateManager#VIEW_STATE_PARAM}
      • - *
      • {@link ResponseStateManager#CLIENT_WINDOW_PARAM}
      • - *
      • {@link ResponseStateManager#RENDER_KIT_ID_PARAM}
      • - *
      • {@link ClientBehaviorContext#BEHAVIOR_SOURCE_PARAM_NAME}
      • - *
      • {@link ClientBehaviorContext#BEHAVIOR_EVENT_PARAM_NAME}
      • - *
      • {@link PartialViewContext#PARTIAL_EVENT_PARAM_NAME}
      • - *
      • {@link PartialViewContext#PARTIAL_EXECUTE_PARAM_NAME}
      • - *
      • {@link PartialViewContext#PARTIAL_RENDER_PARAM_NAME}
      • - *
      • {@link PartialViewContext#RESET_VALUES_PARAM_NAME}
      • - *
      - * - * @since 2.0 - */ - @Override - public void encodeChildren(FacesContext context) throws IOException { - if (context.getPartialViewContext().isAjaxRequest()) { - context.getPartialViewContext().processPartial(PhaseId.RENDER_RESPONSE); - } else { - super.encodeChildren(context); - } - } - - /** - *

      - * If {@link #getAfterPhaseListener} returns non-null, invoke it, - * passing a {@link PhaseEvent} for the {@link PhaseId#RENDER_RESPONSE} phase. Any {@code Exception}s that occur during - * invocation of the afterPhase listener must be logged and swallowed, unless the - * {@link #VIEWROOT_PHASE_LISTENER_QUEUES_EXCEPTIONS_PARAM_NAME} parameter is set. In that case, the {@code Exception} - * must be passed to the {@link jakarta.faces.context.ExceptionHandler} as well.. If the current view has view - * parameters, as indicated by a non-empty and non-UnsupportedOperationException throwing return from - * {@link jakarta.faces.view.ViewDeclarationLanguage#getViewMetadata(jakarta.faces.context.FacesContext, String)}, call - * {@link UIViewParameter#encodeAll} on each parameter. If calling getViewParameters() causes - * UnsupportedOperationException to be thrown, the exception must be silently swallowed. - *

      - */ - @Override - public void encodeEnd(FacesContext context) throws IOException { - super.encodeEnd(context); - encodeViewParameters(context); - notifyAfter(context, PhaseId.RENDER_RESPONSE); - } - - /** - *

      - * Call {@link UIComponentBase#getRendersChildren} If {@link jakarta.faces.context.PartialViewContext#isAjaxRequest} - * returns true this method must return true. - *

      - * - * @since 2.0 - */ - @Override - public boolean getRendersChildren() { - boolean value = super.getRendersChildren(); - FacesContext context = FacesContext.getCurrentInstance(); - - if (context.getPartialViewContext().isAjaxRequest()) { - value = true; - } - return value; - } - - /** - *

      - * Utility method that notifies phaseListeners for the given phaseId. Assumes that either or both the MethodExpression - * or phaseListeners data structure are non-null. - *

      - * - * @param context the context for this request - * @param phaseId the {@link PhaseId} of the current phase - * @param isBefore if true, notify beforePhase listeners. Notify afterPhase listeners otherwise. - */ - private void notifyPhaseListeners(FacesContext context, PhaseId phaseId, boolean isBefore) { - PhaseEvent event = createPhaseEvent(context, phaseId); - - MethodExpression beforePhase = getBeforePhaseListener(); - MethodExpression afterPhase = getAfterPhaseListener(); - boolean hasPhaseMethodExpression = isBefore && null != beforePhase || !isBefore && null != afterPhase && !beforeMethodException; - MethodExpression expression = isBefore ? beforePhase : afterPhase; - - if (hasPhaseMethodExpression) { - try { - expression.invoke(context.getELContext(), new Object[] { event }); - skipPhase = context.getResponseComplete() || context.getRenderResponse(); - } catch (Exception e) { - if (isBefore) { - beforeMethodException = true; - } - if (LOGGER.isLoggable(Level.SEVERE)) { - LOGGER.log(Level.SEVERE, "severe.component.unable_to_process_expression", - new Object[] { expression.getExpressionString(), isBefore ? "beforePhase" : "afterPhase" }); - } - if (context.getAttributes().containsKey(VIEWROOT_PHASE_LISTENER_QUEUES_EXCEPTIONS_PARAM_NAME)) { - ExceptionQueuedEventContext extx = new ExceptionQueuedEventContext(context, e); - String booleanKey = isBefore ? ExceptionQueuedEventContext.IN_BEFORE_PHASE_KEY : ExceptionQueuedEventContext.IN_AFTER_PHASE_KEY; - extx.getAttributes().put(booleanKey, Boolean.TRUE); - context.getApplication().publishEvent(context, ExceptionQueuedEvent.class, extx); - - } - return; - } - } - if (phaseListenerIterator != null && !beforeMethodException) { - while (isBefore ? phaseListenerIterator.hasNext() : phaseListenerIterator.hasPrevious()) { - PhaseListener curListener = isBefore ? phaseListenerIterator.next() : phaseListenerIterator.previous(); - if (phaseId == curListener.getPhaseId() || PhaseId.ANY_PHASE == curListener.getPhaseId()) { - try { - if (isBefore) { - curListener.beforePhase(event); - } else { - curListener.afterPhase(event); - } - skipPhase = context.getResponseComplete() || context.getRenderResponse(); - } catch (Exception e) { - if (isBefore && phaseListenerIterator.hasPrevious()) { - phaseListenerIterator.previous(); - } - if (LOGGER.isLoggable(Level.SEVERE)) { - LOGGER.log(Level.SEVERE, "severe.component.uiviewroot_error_invoking_phaselistener", curListener.getClass().getName()); - } - if (context.getAttributes().containsKey(VIEWROOT_PHASE_LISTENER_QUEUES_EXCEPTIONS_PARAM_NAME) - && (Boolean) context.getAttributes().get(VIEWROOT_PHASE_LISTENER_QUEUES_EXCEPTIONS_PARAM_NAME)) { - ExceptionQueuedEventContext extx = new ExceptionQueuedEventContext(context, e); - String booleanKey = isBefore ? ExceptionQueuedEventContext.IN_BEFORE_PHASE_KEY : ExceptionQueuedEventContext.IN_AFTER_PHASE_KEY; - extx.getAttributes().put(booleanKey, Boolean.TRUE); - context.getApplication().publishEvent(context, ExceptionQueuedEvent.class, extx); - - } - return; - } - } - } - } - } - - private static PhaseEvent createPhaseEvent(FacesContext context, PhaseId phaseId) throws FacesException { - if (lifecycle == null) { - LifecycleFactory lifecycleFactory = (LifecycleFactory) FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY); - String lifecycleId = context.getExternalContext().getInitParameter(FacesServlet.LIFECYCLE_ID_ATTR); - if (lifecycleId == null) { - lifecycleId = LifecycleFactory.DEFAULT_LIFECYCLE; - } - lifecycle = lifecycleFactory.getLifecycle(lifecycleId); - } - - return new PhaseEvent(context, phaseId, lifecycle); - } - - /** - *
      - *

      - * Perform partial processing by calling {@link jakarta.faces.context.PartialViewContext#processPartial} with - * {@link PhaseId#PROCESS_VALIDATIONS} if: - *

        - *
      • {@link jakarta.faces.context.PartialViewContext#isPartialRequest} returns true and we don't have a - * request to process all components in the view ({@link jakarta.faces.context.PartialViewContext#isExecuteAll} returns - * false)
      • - *
      - * Perform full processing by calling {@link UIComponentBase#processValidators} if one of the following conditions are - * met: - *
        - *
      • {@link jakarta.faces.context.PartialViewContext#isPartialRequest} returns true and we have a request - * to process all components in the view ({@link jakarta.faces.context.PartialViewContext#isExecuteAll} returns - * true)
      • - *
      • {@link jakarta.faces.context.PartialViewContext#isPartialRequest} returns false
      • - *
      - *
      - *

      - * Override the default {@link UIComponentBase#processValidators} behavior to broadcast any queued events after the - * default processing or partial processing has been completed and to clear out any events for later phases if the event - * processing for this phase caused {@link FacesContext#renderResponse} or {@link FacesContext#responseComplete} to be - * called. - *

      - * - * @param context {@link FacesContext} for the request we are processing - * - * @throws NullPointerException if context is null - */ - @Override - public void processValidators(FacesContext context) { - initState(); - notifyBefore(context, PhaseId.PROCESS_VALIDATIONS); - - try { - if (!skipPhase) { - if (context.getPartialViewContext().isPartialRequest() && !context.getPartialViewContext().isExecuteAll()) { - context.getPartialViewContext().processPartial(PhaseId.PROCESS_VALIDATIONS); - } else { - super.processValidators(context); - } - broadcastEvents(context, PhaseId.PROCESS_VALIDATIONS); - } - } finally { - clearFacesEvents(context); - notifyAfter(context, PhaseId.PROCESS_VALIDATIONS); - } - } - - /** - *
      - *

      - * Perform partial processing by calling {@link jakarta.faces.context.PartialViewContext#processPartial} with - * {@link PhaseId#UPDATE_MODEL_VALUES} if: - *

        - *
      • {@link jakarta.faces.context.PartialViewContext#isPartialRequest} returns true and we don't have a - * request to process all components in the view ({@link jakarta.faces.context.PartialViewContext#isExecuteAll} returns - * false)
      • - *
      - * Perform full processing by calling {@link UIComponentBase#processUpdates} if one of the following conditions are met: - *
        - *
      • {@link jakarta.faces.context.PartialViewContext#isPartialRequest} returns true and we have a request - * to process all components in the view ({@link jakarta.faces.context.PartialViewContext#isExecuteAll} returns - * true)
      • - *
      • {@link jakarta.faces.context.PartialViewContext#isPartialRequest} returns false
      • - *
      - *
      - *

      - * Override the default {@link UIComponentBase} behavior to broadcast any queued events after the default processing or - * partial processing has been completed and to clear out any events for later phases if the event processing for this - * phase caused {@link FacesContext#renderResponse} or {@link FacesContext#responseComplete} to be called. - *

      - * - * @param context {@link FacesContext} for the request we are processing - * - * @throws NullPointerException if context is null - */ - @Override - public void processUpdates(FacesContext context) { - initState(); - notifyBefore(context, PhaseId.UPDATE_MODEL_VALUES); - - try { - if (!skipPhase) { - if (context.getPartialViewContext().isPartialRequest() && !context.getPartialViewContext().isExecuteAll()) { - context.getPartialViewContext().processPartial(PhaseId.UPDATE_MODEL_VALUES); - } else { - super.processUpdates(context); - } - broadcastEvents(context, PhaseId.UPDATE_MODEL_VALUES); - } - } finally { - clearFacesEvents(context); - notifyAfter(context, PhaseId.UPDATE_MODEL_VALUES); - } - } - - /** - *

      - * Broadcast any events that have been queued for the Invoke Application phase of the request processing - * lifecycle and to clear out any events for later phases if the event processing for this phase caused - * {@link FacesContext#renderResponse} or {@link FacesContext#responseComplete} to be called. - *

      - * - * @param context {@link FacesContext} for the request we are processing - * - * @throws NullPointerException if context is null - */ - public void processApplication(FacesContext context) { - initState(); - notifyBefore(context, PhaseId.INVOKE_APPLICATION); - try { - if (!skipPhase) { - // NOTE - no tree walk is performed; this is a UIViewRoot-only operation - broadcastEvents(context, PhaseId.INVOKE_APPLICATION); - } - } finally { - clearFacesEvents(context); - notifyAfter(context, PhaseId.INVOKE_APPLICATION); - } - } - - // clear out the events if we're skipping to render-response - // or if there is a response complete signal. - private void clearFacesEvents(FacesContext context) { - if (context.getRenderResponse() || context.getResponseComplete()) { - if (events != null) { - for (List eventList : events) { - if (eventList != null) { - eventList.clear(); - } - } - events = null; - } - } - } - - /** - *

      - * Generate an identifier for a component. The identifier will be prefixed - * with UNIQUE_ID_PREFIX, and will be unique within the non-{@link NamingContainer} - * child sub-trees of this UIViewRoot. - *

      - * - * @return the identifier. - */ - public String createUniqueId() { - return createUniqueId(getFacesContext(), null); - } - - /** - *

      - * Generate an identifier for a component. The identifier will be prefixed with UNIQUE_ID_PREFIX, and will be unique - * within this UIViewRoot. Optionally, a unique seed value can be supplied by component creators which should be - * included in the generated unique id. - *

      - * - * @param context FacesContext - * @param seed an optional seed value - e.g. based on the position of the component in the VDL-template - * @return a unique-id in this component-container - */ - @Override - public String createUniqueId(FacesContext context, String seed) { - if (seed != null) { - return UIViewRoot.UNIQUE_ID_PREFIX + seed; - } - - Integer i = (Integer) getStateHelper().get(PropertyKeys.lastId); - int lastId = i != null ? i : 0; - getStateHelper().put(PropertyKeys.lastId, ++lastId); - - return UIViewRoot.UNIQUE_ID_PREFIX + lastId; - } - - /** - *

      - * Return the Locale to be used in localizing the response being created for this view. - *

      - *

      - * Algorithm: - *

      - *

      - * If we have a locale ivar, return it. If we have a value expression for "locale", get its value. If the - * value is null, return the result of calling - * {@link jakarta.faces.application.ViewHandler#calculateLocale}. If the value is an instance of - * java.util.Locale return it. If the value is a String, convert it to a java.util.Locale and - * return it. If there is no value expression for "locale", return the result of calling - * {@link jakarta.faces.application.ViewHandler#calculateLocale}. - *

      - * - * @return The current Locale obtained by executing the above algorithm. - */ - public Locale getLocale() { - Object result = getStateHelper().eval(PropertyKeys.locale); - - if (result != null) { - Locale locale = null; - if (result instanceof Locale) { - locale = (Locale) result; - } else if (result instanceof String) { - locale = getLocaleFromString((String) result); - } - - return locale; - } - - FacesContext context = getFacesContext(); - return context.getApplication().getViewHandler().calculateLocale(context); - } - - // W3C XML specification refers to IETF RFC 1766 for language code - // structure, therefore the value for the xml:lang attribute should - // be in the form of language or language-country or - // language-country-variant. - - private static Locale getLocaleFromString(String localeStr) throws IllegalArgumentException { - // length must be at least 2. - if (localeStr == null || localeStr.length() < 2) { - throw new IllegalArgumentException("Illegal locale String: " + localeStr); - } - - Locale result = null; - String lang = null; - String country = null; - String variant = null; - char[] seps = { '-', '_' }; - int inputLength = localeStr.length(); - int i = 0; - int j = 0; - - // to have a language, the length must be >= 2 - if (inputLength >= 2 && (i = indexOfSet(localeStr, seps, 0)) == -1) { - // we have only Language, no country or variant - if (2 != localeStr.length()) { - throw new IllegalArgumentException("Illegal locale String: " + localeStr); - } - lang = localeStr.toLowerCase(); - } - - // we have a separator, it must be either '-' or '_' - if (i != -1) { - lang = localeStr.substring(0, i); - // look for the country sep. - // to have a country, the length must be >= 5 - if (inputLength >= 5 && -1 == (j = indexOfSet(localeStr, seps, i + 1))) { - // no further separators, length must be 5 - if (inputLength != 5) { - throw new IllegalArgumentException("Illegal locale String: " + localeStr); - } - country = localeStr.substring(i + 1); - } - if (j != -1) { - country = localeStr.substring(i + 1, j); - // if we have enough separators for language, locale, - // and variant, the length must be >= 8. - if (inputLength >= 8) { - variant = localeStr.substring(j + 1); - } else { - throw new IllegalArgumentException("Illegal locale String: " + localeStr); - } - } - } - if (variant != null && country != null && lang != null) { - result = new Locale(lang, country, variant); - } else if (lang != null && country != null) { - result = new Locale(lang, country); - } else if (lang != null) { - result = new Locale(lang, ""); - } - - return result; - } - - /** - * @param str local string - * @param set the substring - * @param fromIndex starting index - * @return starting at fromIndex, the index of the first occurrence of any substring from set - * in toSearch, or -1 if no such match is found - */ - private static int indexOfSet(String str, char[] set, int fromIndex) { - int result = -1; - for (int i = fromIndex, len = str.length(); i < len; i++) { - for (int j = 0, innerLen = set.length; j < innerLen; j++) { - if (str.charAt(i) == set[j]) { - result = i; - break; - } - } - if (-1 != result) { - break; - } - } - - return result; - } - - /** - *

      - * Set the Locale to be used in localizing the response being created for this view. - *

      - * - * @param locale The new localization Locale - */ - public void setLocale(Locale locale) { - getStateHelper().put(PropertyKeys.locale, locale); - // Make sure to appraise the Jakarta Expression Language of this switch in Locale. - FacesContext.getCurrentInstance().getELContext().setLocale(locale); - } - - /** - *

      - * This implementation simply calls through to {@link #getViewMap(boolean)}, passing true as the argument, - * and returns the result. - *

      - *
      - * - * @return the view map, or null. - * @since 2.0 - */ - public Map getViewMap() { - return getViewMap(true); - } - - /** - *

      - * Returns a Map that acts as the interface - * to the data store that is the "view scope", or, if this instance does not have such a Map and the - * create argument is true, creates one and returns it. This map must be instantiated lazily - * and cached for return from subsequent calls to this method on this UIViewRoot instance. - * {@link jakarta.faces.application.Application#publishEvent} must be called, passing - * the current FacesContext as the first argument, - * {@link PostConstructViewMapEvent}.class as the second argument, - * UIViewRoot.class as the third argument and this - * UIViewRoot instance as the fourth argument. It is necessary to pass the - * UIViewRoot.class argument to account for cases when the UIViewRoot has been extended with a - * custom class. - *

      - * - *

      - * The returned Map must be implemented such that calling clear() on the Map - * causes {@link jakarta.faces.application.Application#publishEvent} to be called, passing - * {@link PreDestroyViewMapEvent}.class as the first argument and this UIViewRoot instance as - * the second argument. - *

      - * - *

      - * Depending upon application configuration, objects stored in the view map may need to be Serializable. In - * general, it is a good idea to ensure that any objects stored in the view map are Serializable. - *

      - * - *

      - * For reasons made clear in {@link jakarta.faces.view.ViewScoped}, this map must ultimately be stored in the session. - * For this reason, a {@code true} value for the {@code create} argument will force the session to be created with a - * call to {@link jakarta.faces.context.ExternalContext#getSession(boolean)}. - * - *

      - * - *

      - * See {@link FacesContext#setViewRoot} for the specification of when the clear() method must be called. - *

      - * - * @param create true to create a new Map for this instance if necessary; false - * to return null if there's no current Map. - * @return the view map, or null. - * @since 2.0 - */ - @SuppressWarnings("unchecked") - public Map getViewMap(boolean create) { - Map viewMap = (Map) getTransientStateHelper().getTransient("com.sun.faces.application.view.viewMap"); - - if (create && viewMap == null) { - viewMap = new ViewMap(getFacesContext().getApplication().getProjectStage()); - getTransientStateHelper().putTransient("com.sun.faces.application.view.viewMap", viewMap); - getFacesContext().getApplication().publishEvent(getFacesContext(), PostConstructViewMapEvent.class, UIViewRoot.class, this); - } - - return viewMap; - } - - Map, List> viewListeners; - - /** - *

      - * Install the listener instance referenced by argument listener into the UIViewRoot as a - * listener for events of type systemEventClass. - *

      - * - *

      - * Note that installed listeners are not maintained as part of the UIViewRoot's state. - *

      - * - * @param systemEvent the Class of event for which listener must be fired. - * - * @param listener the implementation of {@link jakarta.faces.event.SystemEventListener} whose - * {@link jakarta.faces.event.SystemEventListener#processEvent} method must be called when events of type - * systemEventClass are fired. - * - * @throws NullPointerException if systemEventClass or listener are null. - * - * @since 2.0 - */ - public void subscribeToViewEvent(Class systemEvent, SystemEventListener listener) { - if (systemEvent == null) { - throw new NullPointerException(); - } - if (listener == null) { - throw new NullPointerException(); - } - - if (viewListeners == null) { - viewListeners = new HashMap<>(4, 1.0f); - } - List listeners = viewListeners.get(systemEvent); - if (listeners == null) { - listeners = new CopyOnWriteArrayList<>(); - viewListeners.put(systemEvent, listeners); - } - listeners.add(listener); - - } - - /** - *

      - * Remove the listener instance referenced by argument listener from the UIViewRoot as a - * listener for events of type systemEventClass. - * - * @param systemEvent the Class of event for which listener must be fired. - * @param listener the implementation of {@link jakarta.faces.event.SystemEventListener} whose - * {@link jakarta.faces.event.SystemEventListener#processEvent} method must be called when events of type - * systemEventClass are fired. - * - * @throws NullPointerException if systemEventClass or listener are null. - * - * @since 2.0 - */ - public void unsubscribeFromViewEvent(Class systemEvent, SystemEventListener listener) { - if (systemEvent == null) { - throw new NullPointerException(); - } - if (listener == null) { - throw new NullPointerException(); - } - - if (viewListeners != null) { - List listeners = viewListeners.get(systemEvent); - if (listeners != null) { - listeners.remove(listener); - } - } - } - - /** - *

      - * Return the SystemEventListener instances registered on this UIComponent instance that are - * interested in events of type eventClass. - *

      - * - * @param systemEvent the Class of event for which the listeners must be returned. - * - * @return Collection of view listeners. - * - * @throws NullPointerException if argument systemEvent is null. - * - * @since 2.0 - * - */ - public List getViewListenersForEventClass(Class systemEvent) { - if (systemEvent == null) { - throw new NullPointerException(); - } - if (viewListeners != null) { - return viewListeners.get(systemEvent); - } - - return null; - } - - private void encodeViewParameters(FacesContext context) { - ViewDeclarationLanguage vdl = context.getApplication().getViewHandler().getViewDeclarationLanguage(context, getViewId()); - if (vdl == null) { - return; - } - - ViewMetadata metadata = vdl.getViewMetadata(context, getViewId()); - if (metadata != null) { // perhaps it's not supported - Collection params = ViewMetadata.getViewParameters(this); - if (params.isEmpty()) { - return; - } - - try { - for (UIViewParameter param : params) { - param.encodeAll(context); - } - } catch (IOException e) { - // IOException is forced by contract and is not expected to be thrown in this case - throw new RuntimeException("Unexpected IOException", e); - } - } - } - - /** - * - *

      - * Restore ViewScope state. This is needed to allow the use of view scoped beans for EL-expressions in the template from - * which the component tree is built. For example: <ui:include - * src="#{viewScopedBean.includeFileName}"/>. - *

      - * - * - * @param context current FacesContext. - * @param state the state object. - */ - public void restoreViewScopeState(FacesContext context, Object state) { - if (context == null) { - throw new NullPointerException(); - } - if (state == null) { - return; - } - - values = (Object[]) state; - super.restoreState(context, values[0]); - } - - // END TENATIVE - - // ----------------------------------------------------- StateHolder Methods - - private Object[] values; - - @Override - public Object saveState(FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - String viewMapId = (String) getTransientStateHelper().getTransient("com.sun.faces.application.view.viewMapId"); - Object superState = super.saveState(context); - - if (superState != null || viewMapId != null) { - values = new Object[] { superState, viewMapId }; - } - - return values; - } - - @Override - @SuppressWarnings("unchecked") - public void restoreState(FacesContext context, Object state) { - if (context == null) { - throw new NullPointerException(); - } - if (state == null) { - return; - } - - values = (Object[]) state; - - if (!context.getAttributes().containsKey("com.sun.faces.application.view.restoreViewScopeOnly")) { - super.restoreState(context, values[0]); - } - - String viewMapId = (String) values[1]; - - getTransientStateHelper().putTransient("com.sun.faces.application.view.viewMapId", viewMapId); - - Map viewMaps = (Map) context.getExternalContext().getSessionMap().get("com.sun.faces.application.view.activeViewMaps"); - - if (viewMaps != null) { - Map viewMap = (Map) viewMaps.get(viewMapId); - getTransientStateHelper().putTransient("com.sun.faces.application.view.viewMap", viewMap); - } - } - - // --------------------------------------------------------- Private Methods - - private static String getIdentifier(String target) { - // check map - String id = LOCATION_IDENTIFIER_MAP.get(target); - if (id == null) { - id = LOCATION_IDENTIFIER_PREFIX + target; - LOCATION_IDENTIFIER_MAP.put(target, id); - } - - return id; - } - - private List getComponentResources(FacesContext context, String target, boolean create) { - String location = getIdentifier(target); - UIComponent facet = getFacet(location); - if (facet == null && create) { - // Using an implementation specific component type to prevent - // component resources being rendered at the incorrect time if - // a caller calls UIViewRoot.encodeAll(). - facet = context.getApplication().createComponent("jakarta.faces.ComponentResourceContainer"); - facet.setId(location); - getFacets().put(location, facet); - } - - return facet != null ? facet.getChildren() : null; - } - - private static final class ViewMap extends HashMap { - - private static final long serialVersionUID = -1l; - - private ProjectStage stage; - - // -------------------------------------------------------- Constructors - - ViewMap(ProjectStage stage) { - this.stage = stage; - } - - // ---------------------------------------------------- Methods from Map - - @Override - public void clear() { - FacesContext context = FacesContext.getCurrentInstance(); - context.getApplication().publishEvent(context, PreDestroyViewMapEvent.class, UIViewRoot.class, context.getViewRoot()); - super.clear(); - } - - @Override - public Object put(String key, Object value) { - if (value != null && ProjectStage.Development.equals(stage) && !(value instanceof Serializable)) { - LOGGER.log(WARNING, "warning.component.uiviewroot_non_serializable_attribute_viewmap", new Object[] { key, value.getClass().getName() }); - } - return super.put(key, value); - } - - @Override - public void putAll(Map m) { - for (Map.Entry entry : m.entrySet()) { - String k = entry.getKey(); - Object v = entry.getValue(); - put(k, v); - } - } - - } // END ViewMap - -} diff --git a/impl/src/main/java/jakarta/faces/component/UIWebsocket.java b/impl/src/main/java/jakarta/faces/component/UIWebsocket.java deleted file mode 100644 index 735329604c..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UIWebsocket.java +++ /dev/null @@ -1,363 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import static jakarta.faces.push.PushContext.ENABLE_WEBSOCKET_ENDPOINT_PARAM_NAME; -import static java.util.Collections.unmodifiableList; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Collection; -import java.util.regex.Pattern; - -import jakarta.el.ValueExpression; -import jakarta.faces.component.behavior.ClientBehaviorHolder; -import jakarta.faces.context.ExternalContext; -import jakarta.faces.context.FacesContext; -import jakarta.faces.push.Push; -import jakarta.faces.push.PushContext; -import jakarta.websocket.CloseReason.CloseCodes; - -/** - *

      - * The <f:websocket> tag opens an one-way (server to client) websocket based push connection in - * client side which can be reached from server side via {@link PushContext} interface injected in any CDI/container - * managed artifact via @{@link Push} annotation. - *

      - * - *

      - * By default, the rendererType property must be set to "jakarta.faces.Websocket". This value - * can be changed by calling the setRendererType() method. - *

      - * - *

      - * For detailed usage instructions, see @{@link Push} javadoc. - *

      - * - * @see Push - * @since 2.3 - */ -public class UIWebsocket extends UIComponentBase implements ClientBehaviorHolder { - - // ---------------------------------------------------------------------------------------------- Manifest Constants - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.Websocket"; - - /** - *

      - * The standard component family for this component. - *

      - */ - public static final String COMPONENT_FAMILY = "jakarta.faces.Script"; - - /** - *

      - * Properties that are tracked by state saving. - *

      - */ - enum PropertyKeys { - channel, scope, user, onopen, onmessage, onerror, onclose, connected; - } - - private static final Pattern PATTERN_CHANNEL_NAME = Pattern.compile("[\\w.-]+"); - - private static final String ERROR_ENDPOINT_NOT_ENABLED = "f:websocket endpoint is not enabled." + " You need to set web.xml context param '" - + ENABLE_WEBSOCKET_ENDPOINT_PARAM_NAME + "' with value 'true'."; - private static final String ERROR_INVALID_CHANNEL = "f:websocket 'channel' attribute '%s' does not represent a valid channel name. It is required, it may not be an" - + "Jakarta Expression Language expression and it may only contain alphanumeric characters, hyphens, underscores and periods."; - private static final String ERROR_INVALID_USER = "f:websocket 'user' attribute '%s' does not represent a valid user identifier. It must implement Serializable and" - + " preferably have low memory footprint. Suggestion: use #{request.remoteUser} or #{someLoggedInUser.id}."; - - // ---------------------------------------------------------------------------------------------------- Constructors - - /** - *

      - * Create a new {@link UIWebsocket} instance with default property values. - *

      - * - * @throws IllegalStateException When Websocket endpoint is not enabled. - */ - public UIWebsocket() { - ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext(); - - if (!Boolean.parseBoolean(externalContext.getInitParameter(ENABLE_WEBSOCKET_ENDPOINT_PARAM_NAME))) { - throw new IllegalStateException(ERROR_ENDPOINT_NOT_ENABLED); - } - } - - // --------------------------------------------------------------------------------------------- UIComponent Methods - - /** - *

      - * Returns {@link UIWebsocket#COMPONENT_FAMILY}. - *

      - */ - @Override - public String getFamily() { - return COMPONENT_FAMILY; - } - - /** - *

      - * Set the {@link ValueExpression} used to calculate the value for the specified attribute or property name, if any. If - * a {@link ValueExpression} is set for the channel or scope property, regardless of the - * value, throw an illegal argument exception. If a {@link ValueExpression} is set for the user property, - * and the non-null value is not an instance of Serializable, throw an illegal argument exception. - *

      - * - * @throws IllegalArgumentException If name is one of id, parent, - * channel or scope, or it name is user and the non-null value is - * not an instance of Serializable. - * @throws NullPointerException If name is null. - */ - @Override - public void setValueExpression(String name, ValueExpression binding) { - if (PropertyKeys.channel.toString().equals(name) || PropertyKeys.scope.toString().equals(name)) { - throw new IllegalArgumentException(name); - } - - if (PropertyKeys.user.toString().equals(name)) { - Object user = binding.getValue(getFacesContext().getELContext()); - - if (user != null && !(user instanceof Serializable)) { - throw new IllegalArgumentException(String.format(ERROR_INVALID_USER, user)); - } - } - - super.setValueExpression(name, binding); - } - - // ------------------------------------------------------------------------------------ ClientBehaviorHolder Methods - - /** - *

      - * Returns a non-null, empty, unmodifiable Collection which returns true on any - * Collection#contains() invocation, indicating that all client behavior event names are acceptable. - *

      - */ - @Override - public Collection getEventNames() { - return CONTAINS_EVERYTHING; - } - - private static final Collection CONTAINS_EVERYTHING = unmodifiableList(new ArrayList() { - private static final long serialVersionUID = 1L; - - @Override - public boolean contains(Object object) { - return true; - } - }); - - // ------------------------------------------------------------------------------------------------------ Properties - - /** - * Returns the name of the websocket channel. - * - * @return The name of the websocket channel. - */ - public String getChannel() { - return (String) getStateHelper().eval(PropertyKeys.channel); - } - - /** - * Sets the name of the websocket channel. It may not be an Jakarta Expression Language expression and it may only - * contain alphanumeric characters, hyphens, underscores and periods. All open websockets on the same channel will - * receive the same push message from the server. - * - * @param channel The name of the websocket channel. - * @throws IllegalArgumentException When the value does not represent a valid channel name. - */ - public void setChannel(String channel) { - if (channel == null || !PATTERN_CHANNEL_NAME.matcher(channel).matches()) { - throw new IllegalArgumentException(String.format(ERROR_INVALID_CHANNEL, channel)); - } - - getStateHelper().put(PropertyKeys.channel, channel); - } - - /** - * Returns the scope of the websocket channel. - * - * @return The scope of the websocket channel. - */ - public String getScope() { - return (String) getStateHelper().eval(PropertyKeys.scope); - } - - /** - * Sets the scope of the websocket channel. It may not be an Jakarta Expression Language expression and allowed values - * are application, session and view, case insensitive. When the value is - * application, then all channels with the same name throughout the application will receive the same push - * message. When the value is session, then only the channels with the same name in the current user - * session will receive the same push message. When the value is view, then only the channel in the current - * view will receive the push message. The default scope is application. When the user - * attribute is specified, then the default scope is session. - * - * @param scope The scope of the websocket channel. - */ - public void setScope(String scope) { - getStateHelper().put(PropertyKeys.scope, scope); - } - - /** - * Returns the user identifier of the websocket channel. - * - * @return The user identifier of the websocket channel. - */ - public Serializable getUser() { - return (Serializable) getStateHelper().eval(PropertyKeys.user); - } - - /** - * Sets the user identifier of the websocket channel, so that user-targeted push messages can be sent. All open - * websockets on the same channel and user will receive the same push message from the server. It must implement - * Serializable and preferably have low memory footprint. Suggestion: use - * #{request.remoteUser} or #{someLoggedInUser.id}. - * - * @param user The user identifier of the websocket channel. - */ - public void setUser(Serializable user) { - getStateHelper().put(PropertyKeys.user, user); - } - - /** - * Returns the JavaScript event handler function that is invoked when the websocket is opened. - * - * @return The JavaScript event handler function that is invoked when the websocket is opened. - */ - public String getOnopen() { - return (String) getStateHelper().eval(PropertyKeys.onopen); - } - - /** - * Sets the JavaScript event handler function that is invoked when the websocket is opened. The function will be invoked - * with one argument: the channel name. - * - * @param onopen The JavaScript event handler function that is invoked when the websocket is opened. - */ - public void setOnopen(String onopen) { - getStateHelper().put(PropertyKeys.onopen, onopen); - } - - /** - * Returns the JavaScript event handler function that is invoked when a push message is received from the server. - * - * @return The JavaScript event handler function that is invoked when a push message is received from the server. - */ - public String getOnmessage() { - return (String) getStateHelper().eval(PropertyKeys.onmessage); - } - - /** - * Sets the JavaScript event handler function that is invoked when a push message is received from the server. The - * function will be invoked with three arguments: the push message, the channel name and the raw MessageEvent itself. - * - * @param onmessage The JavaScript event handler function that is invoked when a push message is received from the - * server. - */ - public void setOnmessage(String onmessage) { - getStateHelper().put(PropertyKeys.onmessage, onmessage); - } - - /** - * - * Returns the JavaScript event handler function that is invoked when a connection error has occurred and the websocket - * will attempt to reconnect. - * - * - * @return The JavaScript event handler function that is invoked when a connection error has occurred and the websocket - * will attempt to reconnect. - * - * @since 4.0 - */ - public String getOnerror() { - return (String) getStateHelper().get(PropertyKeys.onerror); - } - - /** - * - * Sets the JavaScript event handler function that is invoked when a connection error has occurred and the websocket - * will attempt to reconnect. The function will be invoked with three arguments: the error reason code, the - * channel name and the raw CloseEvent itself. Note that this will not be invoked on final close of the - * websocket, even when the final close is caused by an error. See also - * RFC 6455 section 7.4.1 and {@link CloseCodes} API - * for an elaborate list of all close codes. - * - * - * @param onerror The JavaScript event handler function that is invoked when a reconnection error has occurred. - * - * @since 4.0 - */ - public void setOnerror(String onerror) { - getStateHelper().put(PropertyKeys.onerror, onerror); - } - - /** - * Returns the JavaScript event handler function that is invoked when the websocket is closed - * and will not anymore attempt to reconnect. - * - * @return The JavaScript event handler function that is invoked when the websocket is closed and will not anymore - * attempt to reconnect. - */ - public String getOnclose() { - return (String) getStateHelper().eval(PropertyKeys.onclose); - } - - /** - * Sets the JavaScript event handler function that is invoked when the websocket is closed - * and will not anymore attempt to reconnect. The function will be invoked - * with three arguments: the close reason code, the channel name and the raw CloseEvent itself. - * Note that this will also be invoked when the close is caused by an - * error and that you can inspect the close reason code if an actual connection error occurred and which one (i.e. - * when the code is not 1000 or 1008). See also RFC 6455 - * section 7.4.1 and {@link CloseCodes} API for an elaborate list of all close codes. - * - * @param onclose The JavaScript event handler function that is invoked when the websocket is closed. - */ - public void setOnclose(String onclose) { - getStateHelper().put(PropertyKeys.onclose, onclose); - } - - /** - * Returns whether to (auto)connect the websocket or not. - * - * @return Whether to (auto)connect the websocket or not. - */ - public boolean isConnected() { - return (Boolean) getStateHelper().eval(PropertyKeys.connected, Boolean.TRUE); - } - - /** - * Sets whether to (auto)connect the websocket or not. Defaults to true. It's interpreted as a JavaScript - * instruction whether to open or close the websocket push connection. Note that this attribute is re-evaluated on every - * ajax request. You can also explicitly set it to false and then manually control in JavaScript by - * - * faces.push.open("channelName") and faces.push.close("channelName"). - * - * @param connected Whether to (auto)connect the websocket or not. - */ - public void setConnected(boolean connected) { - getStateHelper().put(PropertyKeys.connected, connected); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/UniqueIdVendor.java b/impl/src/main/java/jakarta/faces/component/UniqueIdVendor.java deleted file mode 100644 index 1e7501d369..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UniqueIdVendor.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.faces.context.FacesContext; - -/** - *

      - * UniqueIdVendor is an interface implemented by UIComponents that also implement - * {@link NamingContainer} so that they can provide unique ids based on their own clientId. This will reduce the amount - * of id generation variance between different renderings of the same view and is helpful for improved state saving. - *

      - * - * @since 2.0 - */ -public interface UniqueIdVendor { - - /** - *

      - * Generate an identifier for a component. The identifier will be prefixed with UNIQUE_ID_PREFIX, and will be unique - * within this component-container. Optionally, a unique seed value can be supplied by component creators which should - * be included in the generated unique id. - *

      - * - * @param context FacesContext - * @param seed an optional seed value - e.g. based on the position of the component in the VDL-template - * @return a unique-id in this component-container - */ - String createUniqueId(FacesContext context, String seed); - -} diff --git a/impl/src/main/java/jakarta/faces/component/UpdateModelException.java b/impl/src/main/java/jakarta/faces/component/UpdateModelException.java deleted file mode 100644 index 6a7ffa4be3..0000000000 --- a/impl/src/main/java/jakarta/faces/component/UpdateModelException.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.faces.FacesException; -import jakarta.faces.application.FacesMessage; - -/** - *

      - * This exception indicates a failure to update the model and is created to wrap any exception that occurs during - * {@link UIInput#updateModel}. The exception is then passed to - * {@link jakarta.faces.context.ExceptionHandler#processEvent}, where the ExceptionHandler has an - * opportunity to handle it. - *

      - * - * @since 2.0 - */ -public class UpdateModelException extends FacesException { - - private static final long serialVersionUID = 6081145672680351218L; - - private FacesMessage facesMessage; - - // ------------------------------------------------------------ Constructors - - /** - *

      - * Store the argument facesMessage so it may be returned from {@link #getFacesMessage} and pass the - * argument cause to the super constructor. - *

      - * - * @param facesMessage the message for the exception - * @param cause the cause of this exception - * - * @since 2.0 - */ - public UpdateModelException(FacesMessage facesMessage, Throwable cause) { - - super(cause); - this.facesMessage = facesMessage; - - } - - // ---------------------------------------------------------- Public Methods - /** - *

      - * Return the FacesMessage passed to the constructor. - *

      - * - * @return the message of this exception. - * - * @since 2.0 - */ - - public FacesMessage getFacesMessage() { - - return facesMessage; - - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/ValueHolder.java b/impl/src/main/java/jakarta/faces/component/ValueHolder.java deleted file mode 100644 index 254801c2dc..0000000000 --- a/impl/src/main/java/jakarta/faces/component/ValueHolder.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component; - -import jakarta.el.ValueExpression; -import jakarta.faces.convert.Converter; - -/** - *

      - * ValueHolder is an interface that may be implemented by any concrete - * {@link UIComponent} that wishes to support a local value, as well as access data in the model tier via a value - * expression, and support conversion between String and the model tier data's native data type. - */ -public interface ValueHolder { - - // -------------------------------------------------------------- Properties - - /** - *

      - * Return the local value of this {@link UIComponent} (if any), without evaluating any associated - * {@link ValueExpression}. - *

      - * - * @return the local value. - */ - Object getLocalValue(); - - /** - *

      - * Gets the value of this {@link UIComponent}. If validation failed, as indicated by - * {@link jakarta.faces.context.FacesContext#isValidationFailed} returning true, always return the local - * value. Otherwise, first, consult the local value property of this component. If non-null return it. If - * null, see if we have a {@link ValueExpression} for the value property. If so, return the - * result of evaluating the property, otherwise return null. - *

      - * - * @return the value. - */ - Object getValue(); - - /** - *

      - * Set the value of this {@link UIComponent} (if any). - *

      - * - * @param value The new local value - */ - void setValue(Object value); - - /** - *

      - * Return the {@link Converter} (if any) that is registered for this {@link UIComponent}. - *

      - * - * @return the converter. - */ - Converter getConverter(); - - /** - *

      - * Set the {@link Converter} (if any) that is registered for this {@link UIComponent}. - *

      - * - * @param converter New {@link Converter} (or null) - */ - void setConverter(Converter converter); -} diff --git a/impl/src/main/java/jakarta/faces/component/behavior/AjaxBehavior.java b/impl/src/main/java/jakarta/faces/component/behavior/AjaxBehavior.java deleted file mode 100644 index e7b1b80186..0000000000 --- a/impl/src/main/java/jakarta/faces/component/behavior/AjaxBehavior.java +++ /dev/null @@ -1,800 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.behavior; - -import static jakarta.faces.component.behavior.ClientBehaviorHint.SUBMITTING; -import static java.util.Collections.unmodifiableSet; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.regex.Pattern; - -import jakarta.el.ELContext; -import jakarta.el.ELException; -import jakarta.el.ValueExpression; -import jakarta.faces.FacesException; -import jakarta.faces.component.UIComponentBase; -import jakarta.faces.context.FacesContext; -import jakarta.faces.event.AjaxBehaviorListener; - -/** - *

      - * An instance of this class is added as a - * {@link ClientBehavior} to a component using the - * {@link jakarta.faces.component.behavior.ClientBehaviorHolder#addClientBehavior} contract that components implement. - * The presence of this {@link ClientBehavior} will cause the rendering of JavaScript that produces an Ajax - * request using the specification public JavaScript API when the component is rendered. - *

      - * - *

      - * If the component is an instance of {@link jakarta.faces.component.EditableValueHolder}, Where at all possible, the - * component must have the UI register the ajax event when the initial value is changed, not when focus is lost on the - * component. - *

      - * - * - * - * @since 2.0 - */ -public class AjaxBehavior extends ClientBehaviorBase { - - /** - *

      - * The standard id for this behavior. - *

      - */ - public static final String BEHAVIOR_ID = "jakarta.faces.behavior.Ajax"; - - private static final Set HINTS = unmodifiableSet(EnumSet.of(SUBMITTING)); - - private String onerror; - private String onevent; - private String delay; - private List execute; - private List render; - private Boolean disabled; - private Boolean immediate; - private Boolean resetValues; - - private Map bindings; - - /** - * Default constructor that just creates this instance. - */ - public AjaxBehavior() { - - } - - // ---------------------------------------------------------- Public Methods - @Override - public String getRendererType() { - // We use the same sring for both the behavior id and the renderer - // type. - return BEHAVIOR_ID; - } - - /** - *

      - * This method returns an unmodifiable Set containing the {@link ClientBehaviorHint} - * SUBMITTING. - *

      - * - * @return unmodifiable set containing the hint {@link ClientBehaviorHint} SUBMITTING. - * - * @since 2.0 - */ - @Override - public Set getHints() { - return HINTS; - } - - /** - *

      - * Return the String of JavaScript function name that will be used to identify the client callback function - * that should be run in the event of an error. - * - * @return the JavaScript function name of ONERROR. - * - * @since 2.0 - */ - public String getOnerror() { - return (String) eval(ONERROR, onerror); - } - - /** - *

      - * Sets the JavaScript function name that will be used to identify the client callback function that should be run in - * the event of an error. - * - * @param onerror the error handling function name - * - * @since 2.0 - */ - public void setOnerror(String onerror) { - this.onerror = onerror; - - clearInitialState(); - } - - /** - *

      - * Return the String of JavaScript function name that will be used to identify the client callback function - * that should be run on the occurance of a client-side event. - * - * @return the JavaScript function name of ONEVENT. - * - * @since 2.0 - */ - public String getOnevent() { - return (String) eval(ONEVENT, onevent); - } - - /** - *

      - * Sets the JavaScript function name that will be used to identify the client callback function that should be run in - * response to event activity. - * - * @param onevent the event handling function name - * - * @since 2.0 - */ - public void setOnevent(String onevent) { - this.onevent = onevent; - - clearInitialState(); - } - - /** - *

      - * Return a non-empty Collection<String> of component identifiers that will be used to identify - * components that should be processed during the execute phase of the request processing lifecycle. - *

      - *

      - * Note that the returned collection may be unmodifiable. Modifications should be performed by calling - * {@link #setExecute}. - *

      - * - * @return the JavaScript function name of EXECUTE. - * - * @since 2.0 - */ - public Collection getExecute() { - return getCollectionValue(EXECUTE, execute); - } - - /** - *

      - * Sets the component identifiers that will be used to identify components that should be processed during the - * execute phase of the request processing lifecycle. - *

      - * - * @param execute the ids of components to execute - * - * @since 2.0 - */ - public void setExecute(Collection execute) { - this.execute = copyToList(execute); - - clearInitialState(); - } - - /** - *

      - * Returns the delay value, or null if no value was set. - *

      - * - * @return the delay value. - * - * @since 2.2 - */ - public String getDelay() { - return (String) eval(DELAY, delay); - } - - /** - *

      - * If less than delay milliseconds elapses between calls to request() only the most recent one is sent - * and all other requests are discarded. The default value of this option is 300. If the value of delay is the - * literal string 'none' without the quotes, no delay is used. - *

      - * - * @param delay the ajax delay value - * - * @since 2.2 - */ - public void setDelay(String delay) { - this.delay = delay; - - clearInitialState(); - } - - /** - *

      - * Return a non-empty Collection<String> of component identifiers that will be used to identify - * components that should be processed during the render phase of the request processing lifecycle. - *

      - *

      - * Note that the returned collection may be unmodifiable. Modifications should be performed by calling - * {@link #setRender}. - *

      - * - * @return the ids of components to render. - * - * @since 2.0 - */ - public Collection getRender() { - return getCollectionValue(RENDER, render); - } - - /** - *

      - * Sets the component identifiers that will be used to identify components that should be processed during the - * render phase of the request processing lifecycle. - *

      - * - * @param render the ids of components to render - * - * @since 2.0 - */ - public void setRender(Collection render) { - this.render = copyToList(render); - - clearInitialState(); - } - - /** - *

      - * Return the resetValues status of this behavior. - *

      - * - * @return the resetValues status. - * - * @since 2.2 - */ - - public boolean isResetValues() { - Boolean result = (Boolean) eval(RESET_VALUES, resetValues); - return result != null ? result : false; - } - - /** - *

      - * Set the resetValues status of this behavior. - *

      - * - * @param resetValues the resetValues status. - * - * @since 2.2 - */ - - public void setResetValues(boolean resetValues) { - this.resetValues = resetValues; - - clearInitialState(); - } - - /** - *

      - * Return the disabled status of this behavior. - *

      - * - * @return the disabled status of this behavior. - * - * @since 2.0 - */ - public boolean isDisabled() { - Boolean result = (Boolean) eval(DISABLED, disabled); - return result != null ? result : false; - } - - /** - *

      - * Sets the disabled status of this behavior. - *

      - * - * @param disabled the flag to be set. - * - * @since 2.0 - */ - public void setDisabled(boolean disabled) { - this.disabled = disabled; - - clearInitialState(); - } - - /** - *

      - * Return the immediate status of this behavior. - *

      - * - * @return the immediate status. - * - * @since 2.0 - */ - public boolean isImmediate() { - Boolean result = (Boolean) eval(IMMEDIATE, immediate); - return result != null ? result : false; - } - - /** - *

      - * Sets the immediate status of this behavior. - *

      - * - * @param immediate the flag to be set. - * - * @since 2.0 - */ - public void setImmediate(boolean immediate) { - this.immediate = immediate; - - clearInitialState(); - } - - /** - *

      - * Tests whether the immediate attribute is specified. Returns true if the immediate attribute is specified, either as a - * locally set property or as a value expression. This information allows an associated client behavior renderer to fall - * back on the parent component's immediate status when immediate is not explicitly specified on the - * AjaxBehavior. - *

      - * - * @return the flag whether the immediate attribute is specified. - * - * @since 2.0 - */ - public boolean isImmediateSet() { - return immediate != null || getValueExpression(IMMEDIATE) != null; - } - - /** - *

      - * Tests whether the resetValues attribute is specified. Returns true if the resetValues attribute is specified, either - * as a locally set property or as a value expression. - *

      - * - * @return the flag whether the resetValues attribute is specified. - * - * @since 2.2 - */ - public boolean isResetValuesSet() { - return resetValues != null || getValueExpression(RESET_VALUES) != null; - } - - /** - *

      - * Returns the {@link ValueExpression} used to calculate the value for the specified property name, if any. - *

      - * - * @param name Name of the property for which to retrieve a {@link ValueExpression} - * - * @return the {@link ValueExpression}. - * - * @throws NullPointerException if name is null - */ - public ValueExpression getValueExpression(String name) { - if (name == null) { - throw new NullPointerException(); - } - - return bindings == null ? null : bindings.get(name); - } - - /** - *

      - * Sets the {@link ValueExpression} used to calculate the value for the specified property name. - *

      - * - * @param name Name of the property for which to set a {@link ValueExpression} - * @param binding The {@link ValueExpression} to set, or null to remove any currently set - * {@link ValueExpression} - * - * @throws NullPointerException if name is null - */ - public void setValueExpression(String name, ValueExpression binding) { - if (name == null) { - throw new NullPointerException(); - } - - if (binding != null) { - - if (binding.isLiteralText()) { - setLiteralValue(name, binding); - } else { - if (bindings == null) { - - // We use a very small initial capacity on this HashMap. - // The goal is not to reduce collisions, but to keep the - // memory footprint small. It is very unlikely that an - // an AjaxBehavior would have more than 1 or 2 bound - // properties - and even if more are present, it's okay - // if we have some collisions - will still be fast. - bindings = new HashMap<>(6, 1.0f); - } - - bindings.put(name, binding); - } - } else { - if (bindings != null) { - bindings.remove(name); - if (bindings.isEmpty()) { - bindings = null; - } - } - } - - clearInitialState(); - } - - /** - *

      - * Add the specified {@link AjaxBehaviorListener} to the set of listeners registered to receive event notifications from - * this {@link AjaxBehavior}. - *

      - * - * @param listener The {@link AjaxBehaviorListener} to be registered - * - * @throws NullPointerException if listener is null - * - * @since 2.0 - */ - public void addAjaxBehaviorListener(AjaxBehaviorListener listener) { - addBehaviorListener(listener); - } - - /** - *

      - * Remove the specified {@link AjaxBehaviorListener} from the set of listeners registered to receive event notifications - * from this {@link AjaxBehavior}. - *

      - * - * @param listener The {@link AjaxBehaviorListener} to be removed - * - * @throws NullPointerException if listener is null - * - * @since 2.0 - */ - public void removeAjaxBehaviorListener(AjaxBehaviorListener listener) { - removeBehaviorListener(listener); - } - - @Override - public Object saveState(FacesContext context) { - if (context == null) { - throw new NullPointerException(); - } - - Object[] values; - - Object superState = super.saveState(context); - - if (initialStateMarked()) { - if (superState == null) { - values = null; - } else { - values = new Object[] { superState }; - } - } else { - values = new Object[10]; - - values[0] = superState; - values[1] = onerror; - values[2] = onevent; - values[3] = disabled; - values[4] = immediate; - values[5] = resetValues; - values[6] = delay; - values[7] = saveList(execute); - values[8] = saveList(render); - values[9] = saveBindings(context, bindings); - } - - return values; - } - - @Override - public void restoreState(FacesContext context, Object state) { - if (context == null) { - throw new NullPointerException(); - } - - if (state != null) { - - Object[] values = (Object[]) state; - super.restoreState(context, values[0]); - - if (values.length != 1) { - onerror = (String) values[1]; - onevent = (String) values[2]; - disabled = (Boolean) values[3]; - immediate = (Boolean) values[4]; - resetValues = (Boolean) values[5]; - delay = (String) values[6]; - execute = restoreList(EXECUTE, values[7]); - render = restoreList(RENDER, values[8]); - bindings = restoreBindings(context, values[9]); - - // If we saved state last time, save state again next time. - clearInitialState(); - } - } - } - - // --------------------------------------------------------- Private Methods - - // Utility for saving bindings state - private static Object saveBindings(FacesContext context, Map bindings) { - - // Note: This code is copied from UIComponentBase. In a future - // version of the Jakarta Faces Specification, it would be useful to define a - // attribute/property/bindings/state helper object that can be - // shared across components/behaviors/validaters/converters. - - if (bindings == null) { - return null; - } - - Object values[] = new Object[2]; - values[0] = bindings.keySet().toArray(new String[bindings.size()]); - - Object[] bindingValues = bindings.values().toArray(); - for (int i = 0; i < bindingValues.length; i++) { - bindingValues[i] = UIComponentBase.saveAttachedState(context, bindingValues[i]); - } - - values[1] = bindingValues; - - return values; - } - - // Utility for restoring bindings from state - private static Map restoreBindings(FacesContext context, Object state) { - - // Note: This code is copied from UIComponentBase. See note above - // in saveBindings(). - - if (state == null) { - return null; - } - Object values[] = (Object[]) state; - String names[] = (String[]) values[0]; - Object states[] = (Object[]) values[1]; - Map bindings = new HashMap<>(names.length); - for (int i = 0; i < names.length; i++) { - bindings.put(names[i], (ValueExpression) UIComponentBase.restoreAttachedState(context, states[i])); - } - return bindings; - } - - // Save the List, either as a String (single element) or as - // a String[] (multiple elements. - private static Object saveList(List list) { - if (list == null || list.isEmpty()) { - return null; - } - - int size = list.size(); - - if (size == 1) { - return list.get(0); - } - - return list.toArray(new String[size]); - } - - // Restore the list from a String (single element) or a String[] - // (multiple elements) - private static List restoreList(String propertyName, Object state) { - if (state == null) { - return null; - } - - List list = null; - - if (state instanceof String) { - list = toSingletonList(propertyName, (String) state); - } else if (state instanceof String[]) { - list = Collections.unmodifiableList(Arrays.asList((String[]) state)); - } - - return list; - } - - private Object eval(String propertyName, Object value) { - if (value != null) { - return value; - } - - ValueExpression expression = getValueExpression(propertyName); - - if (expression != null) { - FacesContext ctx = FacesContext.getCurrentInstance(); - return expression.getValue(ctx.getELContext()); - } - - return null; - } - - @SuppressWarnings("unchecked") - private Collection getCollectionValue(String propertyName, Collection collection) { - if (collection != null) { - return collection; - } - - Collection result = null; - ValueExpression expression = getValueExpression(propertyName); - - if (expression != null) { - - FacesContext ctx = FacesContext.getCurrentInstance(); - Object value = expression.getValue(ctx.getELContext()); - - if (value != null) { - - if (value instanceof Collection) { - // Unchecked cast to Collection - return (Collection) value; - } - - result = toList(propertyName, expression, value); - } - } - - return result == null ? Collections.emptyList() : result; - } - - // Sets a property, converting it from a literal - private void setLiteralValue(String propertyName, ValueExpression expression) { - assert expression.isLiteralText(); - - Object value; - ELContext context = FacesContext.getCurrentInstance().getELContext(); - - try { - value = expression.getValue(context); - } catch (ELException ele) { - throw new FacesException(ele); - } - - if (null != propertyName) { - switch (propertyName) { - case ONEVENT: - onevent = (String) value; - break; - case DELAY: - delay = (String) value; - break; - case ONERROR: - onerror = (String) value; - break; - case IMMEDIATE: - immediate = (Boolean) value; - break; - case RESET_VALUES: - resetValues = (Boolean) value; - break; - case DISABLED: - disabled = (Boolean) value; - break; - case EXECUTE: - execute = toList(propertyName, expression, value); - break; - case RENDER: - render = toList(propertyName, expression, value); - break; - } - } - } - - // Converts the specified object to a List - private static List toList(String propertyName, ValueExpression expression, Object value) { - if (value instanceof String) { - - String strValue = (String) value; - - // If the value contains no spaces, we can optimize. - // This is worthwhile, since the execute/render lists - // will often only contain a single value. - if (strValue.indexOf(' ') == -1) { - return toSingletonList(propertyName, strValue); - } - - // We're stuck splitting up the string. - String[] values = SPLIT_PATTERN.split(strValue); - if (values == null || values.length == 0) { - return null; - } - - // Note that we could create a Set out of the values if - // we care about removing duplicates. However, the - // presence of duplicates does not real harm. They will - // be consolidated during the partial view traversal. So, - // just create an list - garbage in, garbage out. - return Collections.unmodifiableList(Arrays.asList(values)); - } - - // RELEASE_PENDING i18n ; - throw new FacesException(expression.toString() + " : '" + propertyName + "' attribute value must be either a String or a Collection"); - } - - // Converts a String with no spaces to a singleton list - private static List toSingletonList(String propertyName, String value) { - if (null == value || value.length() == 0) { - return null; - } - - if (value.charAt(0) == '@') { - // These are very common, so we use shared copies - // of these collections instead of re-creating. - - if (ALL.equals(value)) { - return ALL_LIST; - } else if (FORM.equals(value)) { - return FORM_LIST; - } else if (THIS.equals(value)) { - return THIS_LIST; - } else if (NONE.equals(value)) { - return NONE_LIST; - } - } - - return Collections.singletonList(value); - } - - // Makes a defensive copy of the collection, converting to a List - // (to make state saving a bit easier). - private List copyToList(Collection collection) { - if (collection == null || collection.isEmpty()) { - return null; - } - - return Collections.unmodifiableList(new ArrayList<>(collection)); - } - - // Property name constants - private static final String ONEVENT = "onevent"; - private static final String ONERROR = "onerror"; - private static final String IMMEDIATE = "immediate"; - private static final String RESET_VALUES = "resetValues"; - private static final String DISABLED = "disabled"; - private static final String EXECUTE = "execute"; - private static final String RENDER = "render"; - private static final String DELAY = "delay"; - - // Id keyword constants - private static String ALL = "@all"; - private static String FORM = "@form"; - private static String THIS = "@this"; - private static String NONE = "@none"; - - // Shared execute/render collections - private static List ALL_LIST = Collections.singletonList("@all"); - private static List FORM_LIST = Collections.singletonList("@form"); - private static List THIS_LIST = Collections.singletonList("@this"); - private static List NONE_LIST = Collections.singletonList("@none"); - - // Pattern used for execute/render string splitting - private static Pattern SPLIT_PATTERN = Pattern.compile(" "); - -} diff --git a/impl/src/main/java/jakarta/faces/component/behavior/Behavior.java b/impl/src/main/java/jakarta/faces/component/behavior/Behavior.java deleted file mode 100644 index 1c5d6c4720..0000000000 --- a/impl/src/main/java/jakarta/faces/component/behavior/Behavior.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.behavior; - -import jakarta.faces.component.UIComponent; -import jakarta.faces.event.BehaviorEvent; - -/** - *

      - * The Behavior interface is the root API of the component behavior model. Behaviors are objects that - * are attached to {@link UIComponent}s in order to enhance components with functionality not explicitly defined by the - * component implementation itself. The component behavior API is intended to support different types of behavior - * contracts, and possibly different types of interactions between behaviors and components. The first such contract is - * the {@link ClientBehavior}, which defines a mechanism by which script-producing behaviors attach scripts to - * components for execution on the client. In the future other types of behavior contracts may be added. - *

      - * - *

      - * Like other attached objects (converters, validators) Behavior instances are created via the - * {@link jakarta.faces.application.Application} object. See - * {@link jakarta.faces.application.Application#createBehavior} for more details. - *

      - * - * @since 2.0 - */ -public interface Behavior { - - /** - *

      - * Broadcast the specified {@link BehaviorEvent} to all registered event listeners who have expressed an interest in - * events of this type. Listeners are called in the order in which they were added. - *

      - * - * @param event The {@link BehaviorEvent} to be broadcast - * - * @throws jakarta.faces.event.AbortProcessingException Signal the Jakarta Faces implementation that no further - * processing on the current event should be performed - * @throws IllegalArgumentException if the implementation class of this {@link BehaviorEvent} is not supported by this - * component - * @throws NullPointerException if event is null - * - * @since 2.0 - */ - void broadcast(BehaviorEvent event); - -} diff --git a/impl/src/main/java/jakarta/faces/component/behavior/BehaviorBase.java b/impl/src/main/java/jakarta/faces/component/behavior/BehaviorBase.java deleted file mode 100644 index 5f6f1e1f05..0000000000 --- a/impl/src/main/java/jakarta/faces/component/behavior/BehaviorBase.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.behavior; - -import java.util.ArrayList; -import java.util.List; - -import jakarta.faces.component.PartialStateHolder; -import jakarta.faces.component.UIComponentBase; -import jakarta.faces.context.FacesContext; -import jakarta.faces.event.AbortProcessingException; -import jakarta.faces.event.BehaviorEvent; -import jakarta.faces.event.BehaviorListener; - -/** - *

      - * BehaviorBase is a convenience base class that provides a default implementation of the - * {@link Behavior} contract. It also provides behavior listener registration and state saving support. - *

      - * - * @since 2.0 - */ -public class BehaviorBase implements Behavior, PartialStateHolder { - - /** - *

      - * Our {@link jakarta.faces.event.BehaviorListener}s. This data structure is lazily instantiated as necessary. - *

      - */ - private List listeners; - - // Flag indicating a desire to not participate in state saving. - private boolean transientFlag = false; - - // Flag indicating that initial state has been marked. - private boolean initialState = false; - - /** - *

      - * Default implementation of {@link Behavior#broadcast}. Delivers the specified {@link BehaviorEvent} to all registered - * {@link BehaviorListener} event listeners who have expressed an interest in events of this type. Listeners are called - * in the order in which they were registered (added). - *

      - * - * @param event The {@link BehaviorEvent} to be broadcast - * - * @throws AbortProcessingException Signal the Jakarta Faces implementation that no further processing on the - * current event should be performed - * @throws IllegalArgumentException if the implementation class of this {@link BehaviorEvent} is not supported by this - * component - * @throws NullPointerException if event is null - * - * @since 2.0 - */ - @Override - public void broadcast(BehaviorEvent event) throws AbortProcessingException { - - if (null == event) { - throw new NullPointerException(); - } - - if (null != listeners) { - for (BehaviorListener listener : listeners) { - if (event.isAppropriateListener(listener)) { - event.processListener(listener); - } - } - } - } - - /** - *

      - * Implementation of {@link jakarta.faces.component.StateHolder#isTransient}. - */ - @Override - public boolean isTransient() { - return transientFlag; - } - - /** - *

      - * Implementation of {@link jakarta.faces.component.StateHolder#setTransient}. - */ - @Override - public void setTransient(boolean transientFlag) { - this.transientFlag = transientFlag; - } - - /** - *

      - * Implementation of {@link jakarta.faces.component.StateHolder#saveState}. - */ - @Override - public Object saveState(FacesContext context) { - - if (context == null) { - throw new NullPointerException(); - } - - // If initial state has been marked, we don't need to - // save any state. - if (initialStateMarked()) { - return null; - } - - // At the moment, the only state we need to save is our listeners - return UIComponentBase.saveAttachedState(context, listeners); - } - - /** - *

      - * Implementation of {@link jakarta.faces.component.StateHolder#restoreState}. - */ - @SuppressWarnings("unchecked") - @Override - public void restoreState(FacesContext context, Object state) { - - if (context == null) { - throw new NullPointerException(); - } - - if (state != null) { - - // Unchecked cast from Object to List - listeners = (List) UIComponentBase.restoreAttachedState(context, state); - - // If we saved state last time, save state again next time. - clearInitialState(); - } - } - - /** - *

      - * Implementation of {@link jakarta.faces.component.PartialStateHolder#markInitialState}. - */ - @Override - public void markInitialState() { - initialState = true; - } - - /** - *

      - * Implementation of {@link jakarta.faces.component.PartialStateHolder#initialStateMarked}. - */ - @Override - public boolean initialStateMarked() { - return initialState; - } - - /** - *

      - * Clears the initial state flag, causing the behavior to revert from partial to full state saving. - *

      - */ - @Override - public void clearInitialState() { - initialState = false; - } - - /** - *

      - * Add the specified {@link BehaviorListener} to the set of listeners registered to receive event notifications from - * this {@link Behavior}. It is expected that {@link Behavior} classes acting as event sources will have corresponding - * typesafe APIs for registering listeners of the required type, and the implementation of those registration methods - * will delegate to this method. For example: - *

      - * - *
      -     * public class AjaxBehaviorEvent extends BehaviorEvent { ... }
      -     *
      -     * public interface AjaxBehaviorListener extends BehaviorListener {
      -     *   public void processAjaxBehavior(FooEvent event);
      -     * }
      -     *
      -     * public class AjaxBehavior extends ClientBehaviorBase {
      -     *   ...
      -     *   public void addAjaxBehaviorListener(AjaxBehaviorListener listener) {
      -     *     addBehaviorListener(listener);
      -     *   }
      -     *   public void removeAjaxBehaviorListener(AjaxBehaviorListener listener) {
      -     *     removeBehaviorListener(listener);
      -     *   }
      -     *   ...
      -     * }
      -     * 
      - * - * @param listener The {@link BehaviorListener} to be registered - * - * @throws NullPointerException if listener is null - * - * @since 2.0 - */ - protected void addBehaviorListener(BehaviorListener listener) { - - if (listener == null) { - throw new NullPointerException(); - } - if (listeners == null) { - // noinspection CollectionWithoutInitialCapacity - listeners = new ArrayList<>(); - } - listeners.add(listener); - - clearInitialState(); - } - - /** - *

      - * Remove the specified {@link BehaviorListener} from the set of listeners registered to receive event notifications - * from this {@link Behavior}. - * - * @param listener The {@link BehaviorListener} to be deregistered - * @throws NullPointerException if listener is null - * - * @since 2.0 - */ - protected void removeBehaviorListener(BehaviorListener listener) { - - if (listener == null) { - throw new NullPointerException(); - } - if (listeners == null) { - return; - } - listeners.remove(listener); - - clearInitialState(); - } -} diff --git a/impl/src/main/java/jakarta/faces/component/behavior/ClientBehavior.java b/impl/src/main/java/jakarta/faces/component/behavior/ClientBehavior.java deleted file mode 100644 index 345f4e62d6..0000000000 --- a/impl/src/main/java/jakarta/faces/component/behavior/ClientBehavior.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.behavior; - -import java.util.Set; - -import jakarta.faces.component.UIComponent; -import jakarta.faces.context.FacesContext; - -/** - *

      - * ClientBehavior is the base contract for {@link Behavior}s that attach script content to client-side - * events exposed by {@link ClientBehaviorHolder} components. Instances of ClientBehavior may be attached - * to components that implement the {@link ClientBehaviorHolder} contract by calling - * {@link ClientBehaviorHolder#addClientBehavior}. Once a ClientBehavior has been attached to a - * {@link ClientBehaviorHolder} component, the component calls {@link #getScript} to obtain the behavior's script and - * the component wires this up to the appropriate client-side event handler. Note that the script content returned by - * this method is always in-line script content. If the implementing class wants to invoke functions defined in other - * script resources, the implementing class must use the {@link jakarta.faces.application.ResourceDependency} or - * {@link jakarta.faces.application.ResourceDependencies} annotation. - *

      - * - * @since 2.0 - */ -public interface ClientBehavior extends Behavior { - - /** - *

      - * Return the script that implements this ClientBehavior's client-side logic. - *

      - * - *
      - * - *

      - * ClientBehavior.getScript() implementations are allowed to return null to indicate that no script is required for this - * particular getScript() call. For example, a ClientBehavior implementation may return null if the Behavior is - * disabled. - *

      - * - *
      - * - * @param behaviorContext the {@link ClientBehaviorContext} that provides properties that might influence this - * getScript() call. Note that ClientBehaviorContext instances are short-lived objects that are only valid for the - * duration of the call to getScript(). ClientBehavior implementations must not hold onto references to - * ClientBehaviorContexts. - * - * @return script that provides the client-side behavior, or null if no script is required. - * @throws NullPointerException if behaviorContext is null - * - * @since 2.0 - */ - String getScript(ClientBehaviorContext behaviorContext); - - /** - *

      - * Decode any new state of this {@link ClientBehavior} from the request contained in the specified {@link FacesContext}. - *

      - * - *
      - * - *

      - * During decoding, events may be enqueued for later processing (by event listeners who have registered an interest), by - * calling queueEvent(). Default implementation delegates decoding to - * {@link jakarta.faces.render.ClientBehaviorRenderer#decode(FacesContext, UIComponent, ClientBehavior)} - *

      - * - *
      - * - * @param context {@link FacesContext} for the request we are processing - * @param component {@link UIComponent} the component associated with this {@link Behavior} - * - * @throws NullPointerException if context or component is null. - * - * @since 2.0 - */ - void decode(FacesContext context, UIComponent component); - - /** - *

      - * Returns hints that describe the behavior of the ClientBehavior implementation. The hints may impact how Renderers - * behave in the presence of Behaviors. For example, when a Behavior that specifies - * ClientBehaviorHint.SUBMITTING is present, the Renderer may choose to alternate the scripts that it - * generates itself. - *

      - * - * @return a non-null, unmodifiable collection of ClientBehaviorHints. - * - * @since 2.0 - */ - Set getHints(); -} diff --git a/impl/src/main/java/jakarta/faces/component/behavior/ClientBehaviorBase.java b/impl/src/main/java/jakarta/faces/component/behavior/ClientBehaviorBase.java deleted file mode 100644 index 74837b029a..0000000000 --- a/impl/src/main/java/jakarta/faces/component/behavior/ClientBehaviorBase.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.behavior; - -import java.util.Collections; -import java.util.Set; -import java.util.logging.Level; -import java.util.logging.Logger; - -import jakarta.faces.component.UIComponent; -import jakarta.faces.context.FacesContext; -import jakarta.faces.render.ClientBehaviorRenderer; -import jakarta.faces.render.RenderKit; - -/** - *

      - * ClientBehaviorBase is a convenience base class that implements the default concrete behavior of all - * methods defined by {@link ClientBehavior}. - *

      - * - *
      - * - *

      - * Subclasses should either override getRendererType() to identify the {@link ClientBehaviorRenderer} to delegate to, or - * they should override getScript() to locally generate the desired Behavior script, and - * decode(). - *

      - * - *
      - * - * @since 2.0 - */ -public class ClientBehaviorBase extends BehaviorBase implements ClientBehavior { - - private static final Logger logger = Logger.getLogger("jakarta.faces.component.behavior", "jakarta.faces.LogStrings"); - - /** - *

      - * Default implementation of of {@link ClientBehavior#getScript}. If a {@link ClientBehaviorRenderer} is available for - * the specified behavior renderer type, this method delegates to the {@link ClientBehaviorRenderer#getScript} method. - * Otherwise, this method returns null. - *

      - * - * @param behaviorContext the {@link ClientBehaviorContext} - * - * @return the script provided by the associated ClientBehaviorRenderer, or null if no ClientBehaviorRenderer is - * available. - * - * @throws NullPointerException if behaviorContext is null - * - * @since 2.0 - */ - @Override - public String getScript(ClientBehaviorContext behaviorContext) { - - if (null == behaviorContext) { - throw new NullPointerException(); - } - - ClientBehaviorRenderer renderer = getRenderer(behaviorContext.getFacesContext()); - String script = null; - if (null != renderer) { - script = renderer.getScript(behaviorContext, this); - } - return script; - } - - /** - *

      - * Default implementation of of {@link ClientBehavior#decode}. If a {@link ClientBehaviorRenderer} is available for the - * specified behavior renderer type, this method delegates to the ClientBehaviorRenderer's decode() method. Otherwise, - * no decoding is performed. - *

      - * - * @param context {@link FacesContext} for the request we are processing - * @param component {@link UIComponent} the component associated with this {@link ClientBehavior} - * - * @throws NullPointerException if context or component is null. - * - * @since 2.0 - */ - @Override - public void decode(FacesContext context, UIComponent component) { - - if (null == context || null == component) { - throw new NullPointerException(); - } - - ClientBehaviorRenderer renderer = getRenderer(context); - if (null != renderer) { - renderer.decode(context, component, this); - } - } - - /** - *

      - * Returns the renderer type of the {@link ClientBehaviorRenderer} to use for the behavior. The default implementation - * returns null. Subclasses should either override this method to return a string that identifies the type of - * {@link ClientBehaviorRenderer} to use, or should override {@link #getScript} and perform script rendering locally in - * the {@link ClientBehavior} implementation. - *

      - * - * @return the default renderer type, which is null. - * - * @since 2.0 - */ - public String getRendererType() { - return null; - } - - /** - *

      - * Default implementation of {@link ClientBehavior#getHints()}. By default, no hints are specified, and this method - * returns an empty, umodifiable set. - *

      - * - * @return an empty, unmodifiable set of {@link ClientBehaviorHint}s. - * - * @since 2.0 - */ - @Override - public Set getHints() { - return Collections.emptySet(); - } - - /** - *

      - * Convenience method to return the {@link ClientBehaviorRenderer} instance associated with this {@link ClientBehavior}, - * if any; otherwise, return null. - *

      - * - * @param context {@link FacesContext} for the request we are processing - * @return {@link ClientBehaviorRenderer} instance from the current {@link RenderKit} or null. - * - * @throws NullPointerException if context is null. - * - * @since 2.0 - */ - protected ClientBehaviorRenderer getRenderer(FacesContext context) { - if (null == context) { - throw new NullPointerException(); - } - ClientBehaviorRenderer renderer = null; - String rendererType = getRendererType(); - if (null != rendererType) { - RenderKit renderKit = context.getRenderKit(); - if (null != renderKit) { - renderer = renderKit.getClientBehaviorRenderer(rendererType); - } - if (null == renderer) { - if (logger.isLoggable(Level.FINE)) { - logger.fine("Can't get behavior renderer for type " + rendererType); - } - } - } else { - if (logger.isLoggable(Level.FINE)) { - logger.fine("No renderer-type for behavior " + this.getClass().getName()); - } - } - return renderer; - } -} diff --git a/impl/src/main/java/jakarta/faces/component/behavior/ClientBehaviorContext.java b/impl/src/main/java/jakarta/faces/component/behavior/ClientBehaviorContext.java deleted file mode 100644 index a5a0ad8c8d..0000000000 --- a/impl/src/main/java/jakarta/faces/component/behavior/ClientBehaviorContext.java +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.behavior; - -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UIComponent; -import jakarta.faces.context.FacesContext; - -/** - *

      - * ClientBehaviorContext provides context information that may be useful - * to {@link jakarta.faces.component.behavior.ClientBehavior#getScript} implementations. - *

      - * - * @since 2.0 - */ -public abstract class ClientBehaviorContext { - - /** - *

      - * The request parameter name whose request parameter value identifies the source component of behavior event. - *

      - * - * @since 2.3 - */ - public static final String BEHAVIOR_SOURCE_PARAM_NAME = "jakarta.faces.source"; - - /** - *

      - * The request parameter name whose request parameter value identifies the type of behavior event. - *

      - * - * @since 2.3 - */ - public static final String BEHAVIOR_EVENT_PARAM_NAME = "jakarta.faces.behavior.event"; - - /** - *

      - * Creates a ClientBehaviorContext instance. - *

      - * - * @param context the FacesContext for the current request. - * @param component the component instance to which the ClientBehavior is attached. - * @param eventName the name of the behavior event to which the ClientBehavior is attached. - * @param sourceId the id to use as the ClientBehavior's "source". - * @param parameters the collection of parameters for submitting ClientBehaviors to include in the request. - * @return a ClientBehaviorContext instance configured with the provided values. - * @throws NullPointerException if context, component or eventName is - * null - * - * @since 2.0 - */ - public static ClientBehaviorContext createClientBehaviorContext(FacesContext context, UIComponent component, String eventName, String sourceId, - Collection parameters) { - - return new ClientBehaviorContextImpl(context, component, eventName, sourceId, parameters); - } - - /** - *

      - * Returns the {@link FacesContext} for the current request. - *

      - * - * @return the {@link FacesContext}. - * - * @since 2.0 - */ - abstract public FacesContext getFacesContext(); - - /** - *

      - * Returns the {@link UIComponent} that is requesting the {@link ClientBehavior} script. - *

      - * - * @return the component. - * - * @since 2.0 - */ - abstract public UIComponent getComponent(); - - /** - *

      - * Returns the name of the behavior event for which the ClientBehavior script is being requested. - *

      - * - * @return the event name. - * - * @since 2.0 - */ - abstract public String getEventName(); - - /** - *

      - * Returns an id for use as the {@link ClientBehavior} source. ClientBehavior implementations that submit back to the - * Faces lifecycle are required to identify which component triggered the ClientBehavior-initiated request via the - * jakarta.faces.source request parameter. In most cases, th source id can be trivially derived from the - * element to which the behavior's client-side script is attached - ie. the source id is typically the id of this - * element. However, in components which produce more complex content, the behavior script may not be able to determine - * the correct id to use for the jakarta.faces.source value. The {@link ClientBehaviorContext#getSourceId} method allows - * the component to pass this information into the {@link ClientBehavior#getScript} implementation. - *

      - * - * @return the id for the behavior's script to use as the "source", or null if the Behavior's script can identify the - * source from the DOM. - * - * @since 2.0 - */ - abstract public String getSourceId(); - - /** - *

      - * Returns parameters that "submitting" {@link ClientBehavior} implementations should include when posting back data - * into the Faces lifecycle. If no parameters are specified, this method returns an empty (non-null) collection. - *

      - * - * @return the parameters. - * - * @since 2.0 - */ - abstract public Collection getParameters(); - - // Little static member class that provides a default implementation - private static final class ClientBehaviorContextImpl extends ClientBehaviorContext { - private FacesContext context; - private UIComponent component; - private String eventName; - private String sourceId; - private Collection parameters; - - private ClientBehaviorContextImpl(FacesContext context, UIComponent component, String eventName, String sourceId, - Collection parameters) { - - if (null == context) { - throw new NullPointerException(); - } - - if (null == component) { - throw new NullPointerException(); - } - - if (null == eventName) { - throw new NullPointerException(); - } - - this.context = context; - this.component = component; - this.eventName = eventName; - this.sourceId = sourceId; - - this.parameters = parameters == null ? Collections.emptyList() : parameters; - } - - @Override - public FacesContext getFacesContext() { - return context; - } - - @Override - public UIComponent getComponent() { - return component; - } - - @Override - public String getEventName() { - return eventName; - } - - @Override - public String getSourceId() { - return sourceId; - } - - @Override - public Collection getParameters() { - return parameters; - } - } - - /** - *

      - * Parameter instances represent name/value pairs that "submitting" ClientBehavior implementations - * should include when posting back into the Faces lifecycle. ClientBehavior implementations can determine which - * Parameters to include by calling ClientBehaviorContext.getParameters(). - *

      - * - * @since 2.0 - */ - public static class Parameter { - - private String name; - private Object value; - - /** - *

      - * Creates a Parameter instance. - *

      - * - * @param name the name of the parameter - * @param value the value of the parameter - * @throws NullPointerException if name is null. - * - * @since 2.0 - */ - public Parameter(String name, Object value) { - - if (null == name) { - throw new NullPointerException(); - } - - this.name = name; - this.value = value; - } - - /** - *

      - * Returns the Parameter's name. - *

      - * - * @return the parameter's name. - * - * @since 2.0 - */ - public String getName() { - return name; - } - - /** - *

      - * Returns the Parameter's value. - *

      - * - * @return the parameter's value. - * - * @since 2.0 - */ - public Object getValue() { - return value; - } - } -} diff --git a/impl/src/main/java/jakarta/faces/component/behavior/ClientBehaviorHint.java b/impl/src/main/java/jakarta/faces/component/behavior/ClientBehaviorHint.java deleted file mode 100644 index 6a24d7a8e4..0000000000 --- a/impl/src/main/java/jakarta/faces/component/behavior/ClientBehaviorHint.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.behavior; - -/** - *

      - * An enum that specifies hints that describes the behavior of ClientBehavior implementations. - *

      - * - * @see ClientBehavior#getHints ClientBehavior.getHints() - * - * @since 2.0 - */ -public enum ClientBehaviorHint { - - /** - * Hint that indicates that ClientBehavior implementation posts back to the server. Renderers that normally attach - * postback-related scripts may choose to omit such scripts when a submitting ClientBehavior is present. - */ - SUBMITTING -} diff --git a/impl/src/main/java/jakarta/faces/component/behavior/ClientBehaviorHolder.java b/impl/src/main/java/jakarta/faces/component/behavior/ClientBehaviorHolder.java deleted file mode 100644 index 60be7f8832..0000000000 --- a/impl/src/main/java/jakarta/faces/component/behavior/ClientBehaviorHolder.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.behavior; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - *

      - * The ClientBehaviorHolder interface may be implemented by any concrete - * {@link jakarta.faces.component.UIComponent} that wishes to support client behaviors as defined by - * {@link ClientBehavior}. - *

      - * - * @since 2.0 - */ -public interface ClientBehaviorHolder { - - /** - *

      - * Attaches a {@link ClientBehavior} to the component implementing this interface for the specified event. Valid event - * names for a UIComponent implementation are defined by {@code ClientBehaviorHolder.getEventNames()}. - *

      - * - * @param eventName the logical name of the client-side event to attach the behavior to. - * @param behavior the {@link ClientBehavior} instance to attach for the specified event name. - * - * @since 2.0 - */ - void addClientBehavior(String eventName, ClientBehavior behavior); - - /** - *

      - * Returns a non-null, unmodifiable Collection containing the names of the logical events supported by the - * component implementing this interface. - *

      - * - * @return an unmodifiable collection of event names. - * @since 2.0 - */ - Collection getEventNames(); - - /** - *

      - * Returns a non-null, unmodifiable Map that contains the the {@link ClientBehavior}s that have been - * attached to the component implementing this interface. The keys in this Map are event names defined by - * {@link #getEventNames}. - *

      - * - * @return an unmodifiable map of client behaviors. - * @since 2.0 - */ - Map> getClientBehaviors(); - - /** - *

      - * Returns the default event name for this ClientBehaviorHolder implementation. This must be one of the - * event names returned by {@link #getEventNames} or null if the component does not have a default event. - * - * @return the default event name. - * @since 2.0 - */ - String getDefaultEventName(); -} diff --git a/impl/src/main/java/jakarta/faces/component/behavior/FacesBehavior.java b/impl/src/main/java/jakarta/faces/component/behavior/FacesBehavior.java deleted file mode 100644 index 23cdbc7aaa..0000000000 --- a/impl/src/main/java/jakarta/faces/component/behavior/FacesBehavior.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2021-2021 Contributors to the Eclipse Foundation - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.behavior; - -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PARAMETER; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import jakarta.enterprise.util.AnnotationLiteral; -import jakarta.inject.Qualifier; - -/** - *

      - * The presence of this annotation on a class automatically registers the class with the runtime as a {@link Behavior}. - * The value of this annotation attribute is taken to be the behavior-id with which instances of this class of - * behavior can be instantiated by calling - * {@link jakarta.faces.application.Application#createBehavior(java.lang.String)} - *

      - * - * @since 2.0 - */ -@Retention(RUNTIME) -@Target({ TYPE, FIELD, METHOD, PARAMETER }) -@Inherited -@Qualifier -public @interface FacesBehavior { - - /** - * The value of this annotation attribute is taken to be the behavior-id with which instances of this class of - * behavior can be instantiated. - * @return the behavior-id - */ - String value(); - - /** - *

      - * The value of this annotation attribute is taken to be an indicator that flags whether or not the given behavior is a - * CDI managed behavior. - *

      - * - * @return true if CDI managed, false otherwise. - */ - boolean managed() default false; - - /** - *

      - * Supports inline instantiation of the {@link FacesBehavior} qualifier. - *

      - * - * @since 4.0 - */ - public static final class Literal extends AnnotationLiteral implements FacesBehavior { - - private static final long serialVersionUID = 1L; - - /** - * Instance of the {@link FacesBehavior} qualifier. - */ - public static final Literal INSTANCE = of("", false); - - private final String value; - private final boolean managed; - - public static Literal of(String value, boolean managed) { - return new Literal(value, managed); - } - - private Literal(String value, boolean managed) { - this.value = value; - this.managed = managed; - } - - @Override - public String value() { - return value; - } - - @Override - public boolean managed() { - return managed; - } - } -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlBody.java b/impl/src/main/java/jakarta/faces/component/html/HtmlBody.java deleted file mode 100644 index 54378293bb..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlBody.java +++ /dev/null @@ -1,592 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UIOutput; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - * NONE - *

      - * By default, the rendererType property must be set to "jakarta.faces.Body". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlBody extends UIOutput implements ClientBehaviorHolder { - - /** - * Default constructor setting the renderer type. - */ - public HtmlBody() { - super(); - setRendererType("jakarta.faces.Body"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.OutputBody"; - - /** - * The property keys. - */ - protected enum PropertyKeys { - dir, lang, onclick, ondblclick, onkeydown, onkeypress, onkeyup, onload, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onunload, role, - style, styleClass, title, xmlns,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onload property. - *

      - * - * @return the property value - */ - public java.lang.String getOnload() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onload); - - } - - /** - *

      - * Set the value of the onload property. - *

      - * - * @param onload the new property value - */ - public void setOnload(java.lang.String onload) { - getStateHelper().put(PropertyKeys.onload, onload); - handleAttribute(this, "onload", onload); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the onunload property. - *

      - * - * @return the property value - */ - public java.lang.String getOnunload() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onunload); - - } - - /** - *

      - * Set the value of the onunload property. - *

      - * - * @param onunload the new property value - */ - public void setOnunload(java.lang.String onunload) { - getStateHelper().put(PropertyKeys.onunload, onunload); - handleAttribute(this, "onunload", onunload); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - /** - *

      - * Return the value of the xmlns property. - *

      - * - * @return the property value - *

      - * Contents:

      An XML Namespace to be passed through to the rendered element
      - */ - public java.lang.String getXmlns() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.xmlns); - - } - - /** - *

      - * Set the value of the xmlns property. - *

      - * - * @param xmlns the new property value - */ - public void setXmlns(java.lang.String xmlns) { - getStateHelper().put(PropertyKeys.xmlns, xmlns); - handleAttribute(this, "xmlns", xmlns); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection( - Arrays.asList("click", "dblclick", "keydown", "keypress", "keyup", "load", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "unload")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return null; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlColumn.java b/impl/src/main/java/jakarta/faces/component/html/HtmlColumn.java deleted file mode 100644 index 36d7fc0aeb..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlColumn.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import jakarta.faces.component.UIColumn; - -/** - *

      - * Represents a column that will be rendered in an HTML table element. - *

      - */ -public class HtmlColumn extends UIColumn { - - public HtmlColumn() { - super(); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlColumn"; - - /** - * The property keys. - */ - protected enum PropertyKeys { - footerClass, headerClass, rowHeader, styleClass,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the footerClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) that will be applied to any footer generated for this column. - */ - public java.lang.String getFooterClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.footerClass); - - } - - /** - *

      - * Set the value of the footerClass property. - *

      - * - * @param footerClass the new property value - */ - public void setFooterClass(java.lang.String footerClass) { - getStateHelper().put(PropertyKeys.footerClass, footerClass); - } - - /** - *

      - * Return the value of the headerClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) that will be applied to any header generated for this column. - */ - public java.lang.String getHeaderClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.headerClass); - - } - - /** - *

      - * Set the value of the headerClass property. - *

      - * - * @param headerClass the new property value - */ - public void setHeaderClass(java.lang.String headerClass) { - getStateHelper().put(PropertyKeys.headerClass, headerClass); - } - - /** - *

      - * Return the value of the rowHeader property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this column is a row header column and therefore cells in this column should be - * rendered with "th" instead of "td" and must have the 'scope="row"' attribute. - */ - public boolean isRowHeader() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.rowHeader, false); - - } - - /** - *

      - * Set the value of the rowHeader property. - *

      - * - * @param rowHeader the new property value - */ - public void setRowHeader(boolean rowHeader) { - getStateHelper().put(PropertyKeys.rowHeader, rowHeader); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) that will be applied to the "td" of this column - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlCommandButton.java b/impl/src/main/java/jakarta/faces/component/html/HtmlCommandButton.java deleted file mode 100644 index f75ad1409a..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlCommandButton.java +++ /dev/null @@ -1,839 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UICommand; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents an HTML input element for a button of type submit or reset. The - * label text is specified by the component value. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Button". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlCommandButton extends UICommand implements ClientBehaviorHolder { - - public HtmlCommandButton() { - super(); - setRendererType("jakarta.faces.Button"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlCommandButton"; - - /** - * Properties used by this component - * - */ - protected enum PropertyKeys { - accesskey, alt, dir, disabled, image, label, lang, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, - onmousemove, onmouseout, onmouseover, onmouseup, onselect, readonly, role, style, styleClass, tabindex, title, type,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accesskey property. - *

      - * - * @return the property value - *

      - * Contents: Access key that, when pressed, transfers focus to this element. - */ - public String getAccesskey() { - return (String) getStateHelper().eval(PropertyKeys.accesskey); - - } - - /** - *

      - * Set the value of the accesskey property. - *

      - * - * @param accesskey the new property value - */ - public void setAccesskey(java.lang.String accesskey) { - getStateHelper().put(PropertyKeys.accesskey, accesskey); - handleAttribute(this, "accesskey", accesskey); - } - - /** - *

      - * Return the value of the alt property. - * This attribute is ignored when the image attribute is not specified. - *

      - * - * @return the property value - *

      - * Contents: Alternate textual description of the element rendered by this component. - */ - public java.lang.String getAlt() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.alt); - - } - - /** - *

      - * Set the value of the alt property. - *

      - * - * @param alt the new property value - */ - public void setAlt(java.lang.String alt) { - getStateHelper().put(PropertyKeys.alt, alt); - handleAttribute(this, "alt", alt); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public String getDir() { - return (String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the disabled property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this element must never receive focus or be included in a subsequent submit. A value - * of false causes no attribute to be rendered, while a value of true causes the attribute to be rendered as - * disabled="disabled". - */ - public boolean isDisabled() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - - } - - /** - *

      - * Set the value of the disabled property. - *

      - * - * @param disabled the new property value - */ - public void setDisabled(boolean disabled) { - getStateHelper().put(PropertyKeys.disabled, disabled); - } - - /** - *

      - * Return the value of the image property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Absolute or relative URL of the image to be displayed for this button. If specified, this "input" element will be of - * type "image". Otherwise, it will be of the type specified by the "type" property with a label specified by the - * "value" property. Note that if the value of this attribute starts with "/", the - * rendered value for this attribute will be prefixed with the context-root for this application. - *

      - */ - public java.lang.String getImage() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.image); - - } - - /** - *

      - * Set the value of the image property. - *

      - * - * @param image the new property value - */ - public void setImage(java.lang.String image) { - getStateHelper().put(PropertyKeys.image, image); - } - - /** - *

      - * Return the value of the label property. - *

      - * - * @return the property value - *

      - * Contents: A localized user presentable name for this component. - */ - public java.lang.String getLabel() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.label); - - } - - /** - *

      - * Set the value of the label property. - *

      - * - * @param label the new property value - */ - public void setLabel(java.lang.String label) { - getStateHelper().put(PropertyKeys.label, label); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the onblur property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus. - */ - public java.lang.String getOnblur() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onblur); - - } - - /** - *

      - * Set the value of the onblur property. - *

      - * - * @param onblur the new property value - */ - public void setOnblur(java.lang.String onblur) { - getStateHelper().put(PropertyKeys.onblur, onblur); - handleAttribute(this, "onblur", onblur); - } - - /** - *

      - * Return the value of the onchange property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus and its value has been modified since gaining focus. - */ - public java.lang.String getOnchange() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onchange); - - } - - /** - *

      - * Set the value of the onchange property. - *

      - * - * @param onchange the new property value - */ - public void setOnchange(java.lang.String onchange) { - getStateHelper().put(PropertyKeys.onchange, onchange); - handleAttribute(this, "onchange", onchange); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onfocus property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element receives focus. - */ - public java.lang.String getOnfocus() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onfocus); - - } - - /** - *

      - * Set the value of the onfocus property. - *

      - * - * @param onfocus the new property value - */ - public void setOnfocus(java.lang.String onfocus) { - getStateHelper().put(PropertyKeys.onfocus, onfocus); - handleAttribute(this, "onfocus", onfocus); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the onselect property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when text within this element is selected by the user. - */ - public java.lang.String getOnselect() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onselect); - - } - - /** - *

      - * Set the value of the onselect property. - *

      - * - * @param onselect the new property value - */ - public void setOnselect(java.lang.String onselect) { - getStateHelper().put(PropertyKeys.onselect, onselect); - handleAttribute(this, "onselect", onselect); - } - - /** - *

      - * Return the value of the readonly property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this component will prohibit changes by the user. The element may receive focus unless - * it has also been disabled. A value of false causes no attribute to be rendered, while a value of true causes the - * attribute to be rendered as readonly="readonly". - */ - public boolean isReadonly() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.readonly, false); - - } - - /** - *

      - * Set the value of the readonly property. - *

      - * - * @param readonly the new property value - */ - public void setReadonly(boolean readonly) { - getStateHelper().put(PropertyKeys.readonly, readonly); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the tabindex property. - *

      - * - * @return the property value - *

      - * Contents: Position of this element in the tabbing order for the current document. This value must be an integer - * between 0 and 32767. - */ - public java.lang.String getTabindex() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.tabindex); - - } - - /** - *

      - * Set the value of the tabindex property. - *

      - * - * @param tabindex the new property value - */ - public void setTabindex(java.lang.String tabindex) { - getStateHelper().put(PropertyKeys.tabindex, tabindex); - handleAttribute(this, "tabindex", tabindex); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - /** - *

      - * Return the value of the type property. - *

      - * - * @return the property value - *

      - * Contents: Type of button to create. Valid values are "submit", "button", and "reset". If not specified, or not a - * valid value, the default value is "submit". - */ - public java.lang.String getType() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.type, "submit"); - - } - - /** - *

      - * Set the value of the type property. - *

      - * - * @param type the new property value - */ - public void setType(java.lang.String type) { - getStateHelper().put(PropertyKeys.type, type); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList("blur", "change", "click", "action", "dblclick", - "focus", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "select")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return "action"; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlCommandLink.java b/impl/src/main/java/jakarta/faces/component/html/HtmlCommandLink.java deleted file mode 100644 index be89e5f976..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlCommandLink.java +++ /dev/null @@ -1,858 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UICommand; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents an HTML a element for a hyperlink that acts like a submit button. This component must be - * placed inside a form, and requires JavaScript to be enabled in the client. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Link". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlCommandLink extends UICommand implements ClientBehaviorHolder { - - public HtmlCommandLink() { - super(); - setRendererType("jakarta.faces.Link"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlCommandLink"; - - /** - * Properties used by this component - * - */ - protected enum PropertyKeys { - accesskey, charset, coords, dir, disabled, hreflang, lang, onblur, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, - onmousemove, onmouseout, onmouseover, onmouseup, rel, rev, role, shape, style, styleClass, tabindex, target, title, type,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accesskey property. - *

      - * - * @return the property value - *

      - * Contents: Access key that, when pressed, transfers focus to this element. - */ - public java.lang.String getAccesskey() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accesskey); - - } - - /** - *

      - * Set the value of the accesskey property. - *

      - * - * @param accesskey the new property value - */ - public void setAccesskey(java.lang.String accesskey) { - getStateHelper().put(PropertyKeys.accesskey, accesskey); - handleAttribute(this, "accesskey", accesskey); - } - - /** - *

      - * Return the value of the charset property. - *

      - * - * @return the property value - *

      - * Contents: The character encoding of the resource designated by this hyperlink. - */ - public java.lang.String getCharset() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.charset); - - } - - /** - *

      - * Set the value of the charset property. - *

      - * - * @param charset the new property value - */ - public void setCharset(java.lang.String charset) { - getStateHelper().put(PropertyKeys.charset, charset); - handleAttribute(this, "charset", charset); - } - - /** - *

      - * Return the value of the coords property. - *

      - * - * @return the property value - *

      - * Contents: The position and shape of the hot spot on the screen (for use in client-side image maps). - */ - public java.lang.String getCoords() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.coords); - - } - - /** - *

      - * Set the value of the coords property. - *

      - * - * @param coords the new property value - */ - public void setCoords(java.lang.String coords) { - getStateHelper().put(PropertyKeys.coords, coords); - handleAttribute(this, "coords", coords); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the disabled property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this element must never receive focus or be included in a subsequent submit. - */ - public boolean isDisabled() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - - } - - /** - *

      - * Set the value of the disabled property. - *

      - * - * @param disabled the new property value - */ - public void setDisabled(boolean disabled) { - getStateHelper().put(PropertyKeys.disabled, disabled); - } - - /** - *

      - * Return the value of the hreflang property. - *

      - * - * @return the property value - *

      - * Contents: The language code of the resource designated by this hyperlink. - */ - public java.lang.String getHreflang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.hreflang); - - } - - /** - *

      - * Set the value of the hreflang property. - *

      - * - * @param hreflang the new property value - */ - public void setHreflang(java.lang.String hreflang) { - getStateHelper().put(PropertyKeys.hreflang, hreflang); - handleAttribute(this, "hreflang", hreflang); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the onblur property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus. - */ - public java.lang.String getOnblur() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onblur); - - } - - /** - *

      - * Set the value of the onblur property. - *

      - * - * @param onblur the new property value - */ - public void setOnblur(java.lang.String onblur) { - getStateHelper().put(PropertyKeys.onblur, onblur); - handleAttribute(this, "onblur", onblur); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onfocus property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element receives focus. - */ - public java.lang.String getOnfocus() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onfocus); - - } - - /** - *

      - * Set the value of the onfocus property. - *

      - * - * @param onfocus the new property value - */ - public void setOnfocus(java.lang.String onfocus) { - getStateHelper().put(PropertyKeys.onfocus, onfocus); - handleAttribute(this, "onfocus", onfocus); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the rel property. - *

      - * - * @return the property value - *

      - * Contents: The relationship from the current document to the anchor specified by this hyperlink. The value of this - * attribute is a space-separated list of link types. - */ - public java.lang.String getRel() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.rel); - - } - - /** - *

      - * Set the value of the rel property. - *

      - * - * @param rel the new property value - */ - public void setRel(java.lang.String rel) { - getStateHelper().put(PropertyKeys.rel, rel); - handleAttribute(this, "rel", rel); - } - - /** - *

      - * Return the value of the rev property. - *

      - * - * @return the property value - *

      - * Contents: A reverse link from the anchor specified by this hyperlink to the current document. The value of this - * attribute is a space-separated list of link types. - */ - public java.lang.String getRev() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.rev); - - } - - /** - *

      - * Set the value of the rev property. - *

      - * - * @param rev the new property value - */ - public void setRev(java.lang.String rev) { - getStateHelper().put(PropertyKeys.rev, rev); - handleAttribute(this, "rev", rev); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the shape property. - *

      - * - * @return the property value - *

      - * Contents: The shape of the hot spot on the screen (for use in client-side image maps). Valid values are: default - * (entire region); rect (rectangular region); circle (circular region); and poly (polygonal region). - */ - public java.lang.String getShape() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.shape); - - } - - /** - *

      - * Set the value of the shape property. - *

      - * - * @param shape the new property value - */ - public void setShape(java.lang.String shape) { - getStateHelper().put(PropertyKeys.shape, shape); - handleAttribute(this, "shape", shape); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the tabindex property. - *

      - * - * @return the property value - *

      - * Contents: Position of this element in the tabbing order for the current document. This value must be an integer - * between 0 and 32767. - */ - public java.lang.String getTabindex() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.tabindex); - - } - - /** - *

      - * Set the value of the tabindex property. - *

      - * - * @param tabindex the new property value - */ - public void setTabindex(java.lang.String tabindex) { - getStateHelper().put(PropertyKeys.tabindex, tabindex); - handleAttribute(this, "tabindex", tabindex); - } - - /** - *

      - * Return the value of the target property. - *

      - * - * @return the property value - *

      - * Contents: Name of a frame where the resource retrieved via this hyperlink is to be displayed. - */ - public java.lang.String getTarget() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.target); - - } - - /** - *

      - * Set the value of the target property. - *

      - * - * @param target the new property value - */ - public void setTarget(java.lang.String target) { - getStateHelper().put(PropertyKeys.target, target); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - /** - *

      - * Return the value of the type property. - *

      - * - * @return the property value - *

      - * Contents: The content type of the resource designated by this hyperlink. - */ - public java.lang.String getType() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.type); - - } - - /** - *

      - * Set the value of the type property. - *

      - * - * @param type the new property value - */ - public void setType(java.lang.String type) { - getStateHelper().put(PropertyKeys.type, type); - handleAttribute(this, "type", type); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList("blur", "click", "action", "dblclick", "focus", - "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return "action"; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlCommandScript.java b/impl/src/main/java/jakarta/faces/component/html/HtmlCommandScript.java deleted file mode 100644 index 7c3ff9689e..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlCommandScript.java +++ /dev/null @@ -1,254 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import jakarta.faces.component.UICommand; - -/** - *

      - * Represents an HTML script element for a function that acts like an ajax form submit. This component must - * be placed inside a form, and requires JavaScript to be enabled in the client. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Script". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlCommandScript extends UICommand { - - public HtmlCommandScript() { - super(); - setRendererType("jakarta.faces.Script"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlCommandScript"; - - /** - * The property keys. - */ - protected enum PropertyKeys { - autorun, execute, name, onerror, onevent, render, resetValues,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the autorun property. - *

      - * - * @return the property value - *

      - * Contents: Whether to execute declared JavaScript function during load event of the window. - * Defaults to false. - */ - public boolean isAutorun() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.autorun, false); - - } - - /** - *

      - * Set the value of the autorun property. - *

      - * - * @param autorun the new property value - */ - public void setAutorun(boolean autorun) { - getStateHelper().put(PropertyKeys.autorun, autorun); - } - - /** - *

      - * Return the value of the execute property. - *

      - * - * @return the property value - *

      - * Contents: This is a space separated list of client identifiers of components that will participate in the "execute" - * portion of the Request Processing Lifecycle. If a literal is specified the identifiers must be space delimited. Any - * of the keywords "@this", "@form", "@all", "@none" may be specified in the identifier list. If not specified, the - * default value of "@this" is assumed. For example, @this clientIdOne clientIdTwo. - */ - public java.lang.String getExecute() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.execute); - - } - - /** - *

      - * Set the value of the execute property. - *

      - * - * @param execute the new property value - */ - public void setExecute(java.lang.String execute) { - getStateHelper().put(PropertyKeys.execute, execute); - } - - /** - *

      - * Return the value of the name property. - *

      - * - * @return the property value - *

      - * Contents: Name of JavaScript function to be declared, e.g. name="functionName". This can be a namespaced - * function name, e.g. name="ez.functionName". - */ - public java.lang.String getName() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.name); - - } - - /** - *

      - * Set the value of the name property. - *

      - * - * @param name the new property value - */ - public void setName(java.lang.String name) { - getStateHelper().put(PropertyKeys.name, name); - } - - /** - *

      - * Return the value of the onerror property. - *

      - * - * @return the property value - *

      - * Contents: The name of the JavaScript function that will handle errors. - */ - public java.lang.String getOnerror() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onerror); - - } - - /** - *

      - * Set the value of the onerror property. - *

      - * - * @param onerror the new property value - */ - public void setOnerror(java.lang.String onerror) { - getStateHelper().put(PropertyKeys.onerror, onerror); - } - - /** - *

      - * Return the value of the onevent property. - *

      - * - * @return the property value - *

      - * Contents: The name of the JavaScript function that will handle UI events. - */ - public java.lang.String getOnevent() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onevent); - - } - - /** - *

      - * Set the value of the onevent property. - *

      - * - * @param onevent the new property value - */ - public void setOnevent(java.lang.String onevent) { - getStateHelper().put(PropertyKeys.onevent, onevent); - } - - /** - *

      - * Return the value of the render property. - *

      - * - * @return the property value - *

      - * Contents: This is a space separated list of client identifiers of components that will participate in the "render" - * portion of the Request Processing Lifecycle. If a literal is specified the identifiers must be space delimited. Any - * of the keywords "@this", "@form", "@all", "@none" may be specified in the identifier list. If not specified, the - * default value of "@none" is assumed. For example, @this clientIdOne clientIdTwo. - */ - public java.lang.String getRender() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.render); - - } - - /** - *

      - * Set the value of the render property. - *

      - * - * @param render the new property value - */ - public void setRender(java.lang.String render) { - getStateHelper().put(PropertyKeys.render, render); - } - - /** - *

      - * Return the value of the resetValues property. - *

      - * - * @return the property value - *

      - * Contents: Reset specific input values. Interpret the value of the render attribute as a space separated - * list of client identifiers suitable for passing directly to UIViewRoot.resetValues(). The implementation - * must cause an ActionListener to be attached to the ActionSource component in which this tag - * is nested that calls UIViewRoot.resetValues() passing the value of the render attribute as - * the argument. - */ - public java.lang.Boolean getResetValues() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.resetValues); - - } - - /** - *

      - * Set the value of the resetValues property. - *

      - * - * @param resetValues the new property value - */ - public void setResetValues(java.lang.Boolean resetValues) { - getStateHelper().put(PropertyKeys.resetValues, resetValues); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlComponentUtils.java b/impl/src/main/java/jakarta/faces/component/html/HtmlComponentUtils.java deleted file mode 100644 index 7aac616edf..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlComponentUtils.java +++ /dev/null @@ -1,41 +0,0 @@ -package jakarta.faces.component.html; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import jakarta.el.ValueExpression; -import jakarta.faces.component.UIComponent; - -class HtmlComponentUtils { - - private static final String ATTRIBUTES_THAT_ARE_SET = "jakarta.faces.component.UIComponentBase.attributesThatAreSet"; - private static final String OPTIMIZED_PACKAGE = "jakarta.faces.component."; - - static void handleAttribute(UIComponent component, String name, Object value) { - final Map attributes = component.getAttributes(); - - @SuppressWarnings("unchecked") - List setAttributes = (List) attributes.get(ATTRIBUTES_THAT_ARE_SET); - - if (setAttributes == null) { - String className = component.getClass().getName(); - if (className.startsWith(OPTIMIZED_PACKAGE)) { - setAttributes = new ArrayList<>(6); - attributes.put(ATTRIBUTES_THAT_ARE_SET, setAttributes); - } - } - - if (setAttributes != null) { - if (value == null) { - ValueExpression ve = component.getValueExpression(name); - if (ve == null) { - setAttributes.remove(name); - } - } else if (!setAttributes.contains(name)) { - setAttributes.add(name); - } - } - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlDataTable.java b/impl/src/main/java/jakarta/faces/component/html/HtmlDataTable.java deleted file mode 100644 index 52c34a18a3..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlDataTable.java +++ /dev/null @@ -1,950 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UIData; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents a set of repeating data (segregated into columns by child UIColumn components) that will be rendered in an - * HTML table element. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Table". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlDataTable extends UIData implements ClientBehaviorHolder { - - public HtmlDataTable() { - super(); - setRendererType("jakarta.faces.Table"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlDataTable"; - - /** - * The property keys. - */ - protected enum PropertyKeys { - bgcolor, bodyrows, border, captionClass, captionStyle, cellpadding, cellspacing, columnClasses, dir, footerClass, frame, headerClass, lang, onclick, - ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, role, rowClass, rowClasses, rules, style, - styleClass, summary, title, width,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the bgcolor property. - *

      - * - * @return the property value - *

      - * Contents: Name or code of the background color for this table. - */ - public java.lang.String getBgcolor() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.bgcolor); - - } - - /** - *

      - * Set the value of the bgcolor property. - *

      - * - * @param bgcolor the new property value - */ - public void setBgcolor(java.lang.String bgcolor) { - getStateHelper().put(PropertyKeys.bgcolor, bgcolor); - handleAttribute(this, "bgcolor", bgcolor); - } - - /** - *

      - * Return the value of the bodyrows property. - *

      - * - * @return the property value - *

      - * Contents: Comma separated list of row indices for which a new "tbody" element should be started (and any previously - * opened one should be ended). - */ - public java.lang.String getBodyrows() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.bodyrows); - - } - - /** - *

      - * Set the value of the bodyrows property. - *

      - * - * @param bodyrows the new property value - */ - public void setBodyrows(java.lang.String bodyrows) { - getStateHelper().put(PropertyKeys.bodyrows, bodyrows); - } - - /** - *

      - * Return the value of the border property. - *

      - * - * @return the property value - *

      - * Contents: Width (in pixels) of the border to be drawn around this table. - */ - public int getBorder() { - return (java.lang.Integer) getStateHelper().eval(PropertyKeys.border, Integer.MIN_VALUE); - - } - - /** - *

      - * Set the value of the border property. - *

      - * - * @param border the new property value - */ - public void setBorder(int border) { - getStateHelper().put(PropertyKeys.border, border); - handleAttribute(this, "border", border); - } - - /** - *

      - * Return the value of the captionClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) that will be applied to any caption generated for this table. - */ - public java.lang.String getCaptionClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.captionClass); - - } - - /** - *

      - * Set the value of the captionClass property. - *

      - * - * @param captionClass the new property value - */ - public void setCaptionClass(java.lang.String captionClass) { - getStateHelper().put(PropertyKeys.captionClass, captionClass); - } - - /** - *

      - * Return the value of the captionStyle property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this caption is rendered. - */ - public java.lang.String getCaptionStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.captionStyle); - - } - - /** - *

      - * Set the value of the captionStyle property. - *

      - * - * @param captionStyle the new property value - */ - public void setCaptionStyle(java.lang.String captionStyle) { - getStateHelper().put(PropertyKeys.captionStyle, captionStyle); - } - - /** - *

      - * Return the value of the cellpadding property. - *

      - * - * @return the property value - *

      - * Contents: Definition of how much space the user agent should leave between the border of each cell and its contents. - */ - public java.lang.String getCellpadding() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.cellpadding); - - } - - /** - *

      - * Set the value of the cellpadding property. - *

      - * - * @param cellpadding the new property value - */ - public void setCellpadding(java.lang.String cellpadding) { - getStateHelper().put(PropertyKeys.cellpadding, cellpadding); - handleAttribute(this, "cellpadding", cellpadding); - } - - /** - *

      - * Return the value of the cellspacing property. - *

      - * - * @return the property value - *

      - * Contents: Definition of how much space the user agent should leave between the left side of the table and the - * leftmost column, the top of the table and the top of the top side of the topmost row, and so on for the right and - * bottom of the table. It also specifies the amount of space to leave between cells. - */ - public java.lang.String getCellspacing() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.cellspacing); - - } - - /** - *

      - * Set the value of the cellspacing property. - *

      - * - * @param cellspacing the new property value - */ - public void setCellspacing(java.lang.String cellspacing) { - getStateHelper().put(PropertyKeys.cellspacing, cellspacing); - handleAttribute(this, "cellspacing", cellspacing); - } - - /** - *

      - * Return the value of the columnClasses property. - *

      - * - * @return the property value - *

      - * Contents: Comma-delimited list of CSS style classes that will be applied to the columns of this table. A space - * separated list of classes may also be specified for any individual column. If the number of elements in this list is - * less than the number of actual column children of the UIData, no "class" attribute is output for each column greater - * than the number of elements in the list. If the number of elements in the list is greater than the number of actual - * column children of the UIData, the elements at the posisiton in the list after the last column are ignored. - */ - public java.lang.String getColumnClasses() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.columnClasses); - - } - - /** - *

      - * Set the value of the columnClasses property. - *

      - * - * @param columnClasses the new property value - */ - public void setColumnClasses(java.lang.String columnClasses) { - getStateHelper().put(PropertyKeys.columnClasses, columnClasses); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the footerClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) that will be applied to any footer generated for this table. - */ - public java.lang.String getFooterClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.footerClass); - - } - - /** - *

      - * Set the value of the footerClass property. - *

      - * - * @param footerClass the new property value - */ - public void setFooterClass(java.lang.String footerClass) { - getStateHelper().put(PropertyKeys.footerClass, footerClass); - } - - /** - *

      - * Return the value of the frame property. - *

      - * - * @return the property value - *

      - * Contents: Code specifying which sides of the frame surrounding this table will be visible. Valid values are: none (no - * sides, default value); above (top side only); below (bottom side only); hsides (top and bottom sides only); vsides - * (right and left sides only); lhs (left hand side only); rhs (right hand side only); box (all four sides); and border - * (all four sides). - */ - public java.lang.String getFrame() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.frame); - - } - - /** - *

      - * Set the value of the frame property. - *

      - * - * @param frame the new property value - */ - public void setFrame(java.lang.String frame) { - getStateHelper().put(PropertyKeys.frame, frame); - handleAttribute(this, "frame", frame); - } - - /** - *

      - * Return the value of the headerClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) that will be applied to any header generated for this table. - */ - public java.lang.String getHeaderClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.headerClass); - - } - - /** - *

      - * Set the value of the headerClass property. - *

      - * - * @param headerClass the new property value - */ - public void setHeaderClass(java.lang.String headerClass) { - getStateHelper().put(PropertyKeys.headerClass, headerClass); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the rowClass property. - *

      - * - * @return the property value - *

      - * Contents:

      - * - *

      - * Assigns one or more space-separated CSS class names to each "tr" - *

      - * - *
      - */ - public java.lang.String getRowClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.rowClass); - - } - - /** - *

      - * Set the value of the rowClass property. - *

      - * - * @param rowClass the new property value - */ - public void setRowClass(java.lang.String rowClass) { - getStateHelper().put(PropertyKeys.rowClass, rowClass); - } - - /** - *

      - * Return the value of the rowClasses property. - *

      - * - * @return the property value - *

      - * Contents: Comma-delimited list of CSS style classes that will be applied to the rows of this table. A space separated - * list of classes may also be specified for any individual row. Thes styles are applied, in turn, to each row in the - * table. For example, if the list has two elements, the first style class in the list is applied to the first row, the - * second to the second row, the first to the third row, the second to the fourth row, etc. In other words, we keep - * iterating through the list until we reach the end, and then we start at the beginning again. - */ - public java.lang.String getRowClasses() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.rowClasses); - - } - - /** - *

      - * Set the value of the rowClasses property. - *

      - * - * @param rowClasses the new property value - */ - public void setRowClasses(java.lang.String rowClasses) { - getStateHelper().put(PropertyKeys.rowClasses, rowClasses); - } - - /** - *

      - * Return the value of the rules property. - *

      - * - * @return the property value - *

      - * Contents: Code specifying which rules will appear between cells within this table. Valid values are: none (no rules, - * default value); groups (between row groups); rows (between rows only); cols (between columns only); and all (between - * all rows and columns). - */ - public java.lang.String getRules() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.rules); - - } - - /** - *

      - * Set the value of the rules property. - *

      - * - * @param rules the new property value - */ - public void setRules(java.lang.String rules) { - getStateHelper().put(PropertyKeys.rules, rules); - handleAttribute(this, "rules", rules); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the summary property. - *

      - * - * @return the property value - *

      - * Contents: Summary of this table's purpose and structure, for user agents rendering to non-visual media such as speech - * and Braille. - */ - public java.lang.String getSummary() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.summary); - - } - - /** - *

      - * Set the value of the summary property. - *

      - * - * @param summary the new property value - */ - public void setSummary(java.lang.String summary) { - getStateHelper().put(PropertyKeys.summary, summary); - handleAttribute(this, "summary", summary); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - /** - *

      - * Return the value of the width property. - *

      - * - * @return the property value - *

      - * Contents: Width of the entire table, for visual user agents. - */ - public java.lang.String getWidth() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.width); - - } - - /** - *

      - * Set the value of the width property. - *

      - * - * @param width the new property value - */ - public void setWidth(java.lang.String width) { - getStateHelper().put(PropertyKeys.width, width); - handleAttribute(this, "width", width); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection( - Arrays.asList("click", "dblclick", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return null; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlDoctype.java b/impl/src/main/java/jakarta/faces/component/html/HtmlDoctype.java deleted file mode 100644 index 587fceb683..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlDoctype.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import jakarta.faces.component.Doctype; -import jakarta.faces.component.UIOutput; - -/** - * NONE - *

      - * By default, the rendererType property must be set to "jakarta.faces.Doctype". This value - * can be changed by calling the setRendererType() method. - *

      - */ -public class HtmlDoctype extends UIOutput implements Doctype { - - public HtmlDoctype() { - super(); - setRendererType("jakarta.faces.Doctype"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.OutputDoctype"; - - /** - * The property keys. - */ - protected enum PropertyKeys { - publicVal("public"), rootElement, system,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the public property. - *

      - * - * @return the property value - *

      - * Contents:

      Will be output as the public part of the DOCTYPE
      - */ - @Override - public java.lang.String getPublic() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.publicVal); - - } - - /** - *

      - * Set the value of the public property. - *

      - * - * @param _public the new property value - */ - public void setPublic(java.lang.String _public) { - getStateHelper().put(PropertyKeys.publicVal, _public); - handleAttribute(this, "public", _public); - } - - /** - *

      - * Return the value of the rootElement property. - *

      - * - * @return the property value - *

      - * Contents:

      The root XML element
      - */ - @Override - public java.lang.String getRootElement() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.rootElement); - - } - - /** - *

      - * Set the value of the rootElement property. - *

      - * - * @param rootElement the new property value - */ - public void setRootElement(java.lang.String rootElement) { - getStateHelper().put(PropertyKeys.rootElement, rootElement); - handleAttribute(this, "rootElement", rootElement); - } - - /** - *

      - * Return the value of the system property. - *

      - * - * @return the property value - *

      - * Contents:

      Will be output as the system part of the DOCTYPE
      - */ - @Override - public java.lang.String getSystem() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.system); - - } - - /** - *

      - * Set the value of the system property. - *

      - * - * @param system the new property value - */ - public void setSystem(java.lang.String system) { - getStateHelper().put(PropertyKeys.system, system); - handleAttribute(this, "system", system); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlForm.java b/impl/src/main/java/jakarta/faces/component/html/HtmlForm.java deleted file mode 100644 index dfa2357cdb..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlForm.java +++ /dev/null @@ -1,675 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UIForm; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents an HTML form element. Child input components will be submitted unless they have been - * disabled. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Form". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlForm extends UIForm implements ClientBehaviorHolder { - - public HtmlForm() { - super(); - setRendererType("jakarta.faces.Form"); - handleAttribute(this, "enctype", "application/x-www-form-urlencoded"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlForm"; - - /** - * Properties used by this component - * - */ - protected enum PropertyKeys { - accept, acceptcharset, dir, enctype, lang, onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, - onmouseup, onreset, onsubmit, role, style, styleClass, target, title,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accept property. - *

      - * - * @return the property value - *

      - * Contents: List of content types that a server processing this form will handle correctly - */ - public java.lang.String getAccept() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accept); - - } - - /** - *

      - * Set the value of the accept property. - *

      - * - * @param accept the new property value - */ - public void setAccept(java.lang.String accept) { - getStateHelper().put(PropertyKeys.accept, accept); - handleAttribute(this, "accept", accept); - } - - /** - *

      - * Return the value of the acceptcharset property. - *

      - * - * @return the property value - *

      - * Contents: List of character encodings for input data that are accepted by the server processing this form. - */ - public java.lang.String getAcceptcharset() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.acceptcharset); - - } - - /** - *

      - * Set the value of the acceptcharset property. - *

      - * - * @param acceptcharset the new property value - */ - public void setAcceptcharset(java.lang.String acceptcharset) { - getStateHelper().put(PropertyKeys.acceptcharset, acceptcharset); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the enctype property. - *

      - * - * @return the property value - *

      - * Contents: Content type used to submit the form to the server. If not specified, the default value is - * "application/x-www-form-urlencoded". - */ - public java.lang.String getEnctype() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.enctype, "application/x-www-form-urlencoded"); - - } - - /** - *

      - * Set the value of the enctype property. - *

      - * - * @param enctype the new property value - */ - public void setEnctype(java.lang.String enctype) { - getStateHelper().put(PropertyKeys.enctype, enctype); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the onreset property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this form is reset. - */ - public java.lang.String getOnreset() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onreset); - - } - - /** - *

      - * Set the value of the onreset property. - *

      - * - * @param onreset the new property value - */ - public void setOnreset(java.lang.String onreset) { - getStateHelper().put(PropertyKeys.onreset, onreset); - handleAttribute(this, "onreset", onreset); - } - - /** - *

      - * Return the value of the onsubmit property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this form is submitted. - */ - public java.lang.String getOnsubmit() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onsubmit); - - } - - /** - *

      - * Set the value of the onsubmit property. - *

      - * - * @param onsubmit the new property value - */ - public void setOnsubmit(java.lang.String onsubmit) { - getStateHelper().put(PropertyKeys.onsubmit, onsubmit); - handleAttribute(this, "onsubmit", onsubmit); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the target property. - *

      - * - * @return the property value - *

      - * Contents: Name of a frame where the response retrieved after this form submit is to be displayed. - */ - public java.lang.String getTarget() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.target); - - } - - /** - *

      - * Set the value of the target property. - *

      - * - * @param target the new property value - */ - public void setTarget(java.lang.String target) { - getStateHelper().put(PropertyKeys.target, target); - handleAttribute(this, "target", target); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection( - Arrays.asList("click", "dblclick", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return null; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlGraphicImage.java b/impl/src/main/java/jakarta/faces/component/html/HtmlGraphicImage.java deleted file mode 100644 index 8e60aefbb3..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlGraphicImage.java +++ /dev/null @@ -1,674 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UIGraphic; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents an HTML img element, used to retrieve and render a graphical image. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Image". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlGraphicImage extends UIGraphic implements ClientBehaviorHolder { - - public HtmlGraphicImage() { - super(); - setRendererType("jakarta.faces.Image"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlGraphicImage"; - - /** - * Properties used by this component - * - */ - protected enum PropertyKeys { - alt, dir, height, ismap, lang, longdesc, onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, - onmouseup, role, style, styleClass, title, usemap, width,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the alt property. - *

      - * - * @return the property value - *

      - * Contents: Alternate textual description of the element rendered by this component. - */ - public java.lang.String getAlt() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.alt); - - } - - /** - *

      - * Set the value of the alt property. - *

      - * - * @param alt the new property value - */ - public void setAlt(java.lang.String alt) { - getStateHelper().put(PropertyKeys.alt, alt); - handleAttribute(this, "alt", alt); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the height property. - *

      - * - * @return the property value - *

      - * Contents: Override for the height of this image. - */ - public java.lang.String getHeight() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.height); - - } - - /** - *

      - * Set the value of the height property. - *

      - * - * @param height the new property value - */ - public void setHeight(java.lang.String height) { - getStateHelper().put(PropertyKeys.height, height); - handleAttribute(this, "height", height); - } - - /** - *

      - * Return the value of the ismap property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this image is to be used as a server side image map. Such an image must be enclosed - * within a hyperlink ("a"). A value of false causes no attribute to be rendered, while a value of true causes the - * attribute to be rendered as ismap="ismap". - */ - public boolean isIsmap() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.ismap, false); - - } - - /** - *

      - * Set the value of the ismap property. - *

      - * - * @param ismap the new property value - */ - public void setIsmap(boolean ismap) { - getStateHelper().put(PropertyKeys.ismap, ismap); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the longdesc property. - *

      - * - * @return the property value - *

      - * Contents: URI to a long description of the image represented by this element. - */ - public java.lang.String getLongdesc() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.longdesc); - - } - - /** - *

      - * Set the value of the longdesc property. - *

      - * - * @param longdesc the new property value - */ - public void setLongdesc(java.lang.String longdesc) { - getStateHelper().put(PropertyKeys.longdesc, longdesc); - handleAttribute(this, "longdesc", longdesc); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - /** - *

      - * Return the value of the usemap property. - *

      - * - * @return the property value - *

      - * Contents: The name of a client side image map (an HTML "map" element) for which this element provides the image. - */ - public java.lang.String getUsemap() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.usemap); - - } - - /** - *

      - * Set the value of the usemap property. - *

      - * - * @param usemap the new property value - */ - public void setUsemap(java.lang.String usemap) { - getStateHelper().put(PropertyKeys.usemap, usemap); - handleAttribute(this, "usemap", usemap); - } - - /** - *

      - * Return the value of the width property. - *

      - * - * @return the property value - *

      - * Contents: Override for the width of this image. - */ - public java.lang.String getWidth() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.width); - - } - - /** - *

      - * Set the value of the width property. - *

      - * - * @param width the new property value - */ - public void setWidth(java.lang.String width) { - getStateHelper().put(PropertyKeys.width, width); - handleAttribute(this, "width", width); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection( - Arrays.asList("click", "dblclick", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return null; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlHead.java b/impl/src/main/java/jakarta/faces/component/html/HtmlHead.java deleted file mode 100644 index 4570b52095..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlHead.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import jakarta.faces.component.UIOutput; - -/** - * NONE - *

      - * By default, the rendererType property must be set to "jakarta.faces.Head". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlHead extends UIOutput { - - public HtmlHead() { - super(); - setRendererType("jakarta.faces.Head"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.OutputHead"; - - /** - * The property keys. - */ - protected enum PropertyKeys { - dir, lang, xmlns,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the xmlns property. - *

      - * - * @return the property value - *

      - * Contents:

      An XML Namespace to be passed through to the rendered element
      - */ - public java.lang.String getXmlns() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.xmlns); - - } - - /** - *

      - * Set the value of the xmlns property. - *

      - * - * @param xmlns the new property value - */ - public void setXmlns(java.lang.String xmlns) { - getStateHelper().put(PropertyKeys.xmlns, xmlns); - handleAttribute(this, "xmlns", xmlns); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlInputFile.java b/impl/src/main/java/jakarta/faces/component/html/HtmlInputFile.java deleted file mode 100644 index 676fb0f57a..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlInputFile.java +++ /dev/null @@ -1,991 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UIInput; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - * Represents an HTML input element of type file. - * - */ -public class HtmlInputFile extends UIInput implements ClientBehaviorHolder { - - public HtmlInputFile() { - super(); - setRendererType("jakarta.faces.File"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlInputFile"; - - /** - * Properties used by this component - * - */ - protected enum PropertyKeys { - accept, accesskey, dir, disabled, label, lang, multiple, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, - onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, role, style, styleClass, tabindex, title, - @Deprecated(since = "4.0", forRemoval = true) alt, - @Deprecated(since = "4.0", forRemoval = true) autocomplete, - @Deprecated(since = "4.0", forRemoval = true) maxlength, - @Deprecated(since = "4.0", forRemoval = true) readonly, - @Deprecated (since = "4.0", forRemoval = true)size, - ; - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accesskey property. - *

      - *

      - * Contents: Access key that, when pressed, transfers focus to this element. - * - * @return the value of the property - * - */ - public java.lang.String getAccesskey() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accesskey); - - } - - /** - *

      - * Set the value of the accesskey property. - *

      - * - * @param accesskey the new property value - * - */ - public void setAccesskey(java.lang.String accesskey) { - getStateHelper().put(PropertyKeys.accesskey, accesskey); - handleAttribute(this, "accesskey", accesskey); - } - - /** - *

      - * Return the value of the accept property. - *

      - *

      - * Contents: Comma separated string of mime types of files to filter in client side file browse dialog. - *

      - *

      - * Note: This is not validated in server side. - * - * @return the value of the property - * - * @since 4.0 - */ - public java.lang.String getAccept() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accept); - - } - - /** - *

      - * Set the value of the accept property. - *

      - * - * @param accept the new property value - * - * @since 4.0 - */ - public void setAccept(java.lang.String accept) { - getStateHelper().put(PropertyKeys.accept, accept); - handleAttribute(this, "accept", accept); - } - - /** - *

      - * Return the value of the alt property. - *

      - *

      - * Contents: Alternate textual description of the element rendered by this component. - * - * @return the value of the property - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public java.lang.String getAlt() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.alt); - - } - - /** - *

      - * Set the value of the alt property. - *

      - * - * @param alt the new property value - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public void setAlt(java.lang.String alt) { - getStateHelper().put(PropertyKeys.alt, alt); - handleAttribute(this, "alt", alt); - } - - /** - *

      - * Return the value of the autocomplete property. - *

      - *

      - * Contents: If the value of this attribute is "off", render "off" as the value of the attribute. This indicates that - * the browser should disable its autocomplete feature for this component. This is useful for components that perform - * autocompletion and do not want the browser interfering. If this attribute is not set or the value is "on", render - * nothing. - * - * @return the value of the property - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public java.lang.String getAutocomplete() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.autocomplete); - - } - - /** - *

      - * Set the value of the autocomplete property. - *

      - * - * @param autocomplete the new property value - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public void setAutocomplete(java.lang.String autocomplete) { - getStateHelper().put(PropertyKeys.autocomplete, autocomplete); - } - - /** - *

      - * Return the value of the dir property. - *

      - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - * - * @return the value of the property - * - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - * - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the disabled property. - *

      - *

      - * Contents: Flag indicating that this element must never receive focus or be included in a subsequent submit. A value - * of false causes no attribute to be rendered, while a value of true causes the attribute to be rendered as - * disabled="disabled". - * - * @return the value of the property - * - */ - public boolean isDisabled() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - - } - - /** - *

      - * Set the value of the disabled property. - *

      - * - * @param disabled the new property value - * - */ - public void setDisabled(boolean disabled) { - getStateHelper().put(PropertyKeys.disabled, disabled); - } - - /** - *

      - * Return the value of the label property. - *

      - *

      - * Contents: A localized user presentable name for this component. - * - * @return the value of the property - * - */ - public java.lang.String getLabel() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.label); - - } - - /** - *

      - * Set the value of the label property. - *

      - * - * @param label the new property value - * - */ - public void setLabel(java.lang.String label) { - getStateHelper().put(PropertyKeys.label, label); - } - - /** - *

      - * Return the value of the lang property. - *

      - *

      - * Contents: Code describing the language used in the generated markup for this component. - * - * @return the value of the property - * - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - * - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the multiple property. - *

      - *

      - * Contents: Flag indicating that this element must allow multiple file selection. A value - * of false causes no attribute to be rendered, while a value of true causes the attribute to be rendered as - * multiple="multiple". - * - * @return the value of the property - * - * @since 4.0 - */ - public boolean isMultiple() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.multiple, false); - - } - - /** - *

      - * Set the value of the multiple property. - *

      - * - * @param multiple the new property value - * - * @since 4.0 - */ - public void setMultiple(boolean multiple) { - getStateHelper().put(PropertyKeys.multiple, multiple); - handleAttribute(this, "multiple", multiple); - } - - /** - *

      - * Return the value of the maxlength property. - *

      - *

      - * Contents: The maximum number of characters that may be entered in this field. - * - * @return the value of the property - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public int getMaxlength() { - return (java.lang.Integer) getStateHelper().eval(PropertyKeys.maxlength, Integer.MIN_VALUE); - - } - - /** - *

      - * Set the value of the maxlength property. - *

      - * - * @param maxlength the new property value - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public void setMaxlength(int maxlength) { - getStateHelper().put(PropertyKeys.maxlength, maxlength); - handleAttribute(this, "maxlength", maxlength); - } - - /** - *

      - * Return the value of the onblur property. - *

      - *

      - * Contents: JavaScript code executed when this element loses focus. - * - * @return the value of the property - * - */ - public java.lang.String getOnblur() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onblur); - - } - - /** - *

      - * Set the value of the onblur property. - *

      - * - * @param onblur the new property value - * - */ - public void setOnblur(java.lang.String onblur) { - getStateHelper().put(PropertyKeys.onblur, onblur); - handleAttribute(this, "onblur", onblur); - } - - /** - *

      - * Return the value of the onchange property. - *

      - *

      - * Contents: JavaScript code executed when this element loses focus and its value has been modified since gaining focus. - * - * @return the value of the property - * - */ - public java.lang.String getOnchange() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onchange); - - } - - /** - *

      - * Set the value of the onchange property. - *

      - * - * @param onchange the new property value - * - */ - public void setOnchange(java.lang.String onchange) { - getStateHelper().put(PropertyKeys.onchange, onchange); - } - - /** - *

      - * Return the value of the onclick property. - *

      - *

      - * Contents: JavaScript code executed when a pointer button is clicked over this element. - * - * @return the value of the property - * - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - * - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - *

      - * Contents: JavaScript code executed when a pointer button is double clicked over this element. - * - * @return the value of the property - * - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - * - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onfocus property. - *

      - *

      - * Contents: JavaScript code executed when this element receives focus. - * - * @return the value of the property - * - */ - public java.lang.String getOnfocus() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onfocus); - - } - - /** - *

      - * Set the value of the onfocus property. - *

      - * - * @param onfocus the new property value - * - */ - public void setOnfocus(java.lang.String onfocus) { - getStateHelper().put(PropertyKeys.onfocus, onfocus); - handleAttribute(this, "onfocus", onfocus); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - *

      - * Contents: JavaScript code executed when a key is pressed down over this element. - * - * @return the value of the property - * - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - * - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - *

      - * Contents: JavaScript code executed when a key is pressed and released over this element. - * - * @return the value of the property - * - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - * - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - *

      - * Contents: JavaScript code executed when a key is released over this element. - * - * @return the value of the property - * - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - * - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - *

      - * Contents: JavaScript code executed when a pointer button is pressed down over this element. - * - * @return the value of the property - * - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - * - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - *

      - * Contents: JavaScript code executed when a pointer button is moved within this element. - * - * @return the value of the property - * - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - * - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - *

      - * Contents: JavaScript code executed when a pointer button is moved away from this element. - * - * @return the value of the property - * - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - * - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - *

      - * Contents: JavaScript code executed when a pointer button is moved onto this element. - * - * @return the value of the property - * - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - * - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - *

      - * Contents: JavaScript code executed when a pointer button is released over this element. - * - * @return the value of the property - * - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - * - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the onselect property. - *

      - *

      - * Contents: JavaScript code executed when text within this element is selected by the user. - * - * @return the value of the property - * - */ - public java.lang.String getOnselect() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onselect); - - } - - /** - *

      - * Set the value of the onselect property. - *

      - * - * @param onselect the new property value - * - */ - public void setOnselect(java.lang.String onselect) { - getStateHelper().put(PropertyKeys.onselect, onselect); - handleAttribute(this, "onselect", onselect); - } - - /** - *

      - * Return the value of the readonly property. - *

      - *

      - * Contents: Flag indicating that this component will prohibit changes by the user. The element may receive focus unless - * it has also been disabled. A value of false causes no attribute to be rendered, while a value of true causes the - * attribute to be rendered as readonly="readonly". - * - * @return the value of the property - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public boolean isReadonly() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.readonly, false); - - } - - /** - *

      - * Set the value of the readonly property. - *

      - * - * @param readonly the new property value - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public void setReadonly(boolean readonly) { - getStateHelper().put(PropertyKeys.readonly, readonly); - } - - /** - *

      - * Return the value of the role property. - *

      - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or a Jakarta - * Expression Language Expression that evaluates to, a set of space-separated tokens representing the various WAI-ARIA - * roles that the element belongs to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - * - * @return the value of the property - * - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - * - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the size property. - *

      - *

      - * Contents: The number of characters used to determine the width of this field. - * - * @return the value of the property - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public int getSize() { - return (java.lang.Integer) getStateHelper().eval(PropertyKeys.size, Integer.MIN_VALUE); - - } - - /** - *

      - * Set the value of the size property. - *

      - * - * @param size the new property value - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public void setSize(int size) { - getStateHelper().put(PropertyKeys.size, size); - handleAttribute(this, "size", size); - } - - /** - *

      - * Return the value of the style property. - *

      - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - * - * @return the value of the property - * - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - * - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - * - * @return the value of the property - * - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - * - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the tabindex property. - *

      - *

      - * Contents: Position of this element in the tabbing order for the current document. This value must be an integer - * between 0 and 32767. - * - * @return the value of the property - * - */ - public java.lang.String getTabindex() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.tabindex); - - } - - /** - *

      - * Set the value of the tabindex property. - *

      - * - * @param tabindex the new property value - * - */ - public void setTabindex(java.lang.String tabindex) { - getStateHelper().put(PropertyKeys.tabindex, tabindex); - handleAttribute(this, "tabindex", tabindex); - } - - /** - *

      - * Return the value of the title property. - *

      - *

      - * Contents: Advisory title information about markup elements generated for this component. - * - * @return the value of the property - * - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - * - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList("blur", "change", "valueChange", "click", "dblclick", - "focus", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "select")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return "valueChange"; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlInputHidden.java b/impl/src/main/java/jakarta/faces/component/html/HtmlInputHidden.java deleted file mode 100644 index 927b59da09..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlInputHidden.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import jakarta.faces.component.UIInput; - -/** - *

      - * Represents an HTML input element of type hidden. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Hidden". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlInputHidden extends UIInput { - - public HtmlInputHidden() { - super(); - setRendererType("jakarta.faces.Hidden"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlInputHidden"; - - /** - * Properties used by this component - * - */ - protected enum PropertyKeys { - ; - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlInputSecret.java b/impl/src/main/java/jakarta/faces/component/html/HtmlInputSecret.java deleted file mode 100644 index e7a7bc3b39..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlInputSecret.java +++ /dev/null @@ -1,894 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UIInput; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents an HTML input element of type password. On a redisplay, any previously entered - * value will not be rendered (for security reasons) unless the redisplay property is set to - * true. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Secret". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlInputSecret extends UIInput implements ClientBehaviorHolder { - - public HtmlInputSecret() { - super(); - setRendererType("jakarta.faces.Secret"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlInputSecret"; - - /** - * Properties used by this component - * - */ - protected enum PropertyKeys { - accesskey, autocomplete, dir, disabled, label, lang, maxlength, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, - onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, readonly, redisplay, role, size, style, styleClass, tabindex, title, - @Deprecated(since = "4.0", forRemoval = true) alt, - ; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accesskey property. - *

      - * - * @return the property value - *

      - * Contents: Access key that, when pressed, transfers focus to this element. - */ - public java.lang.String getAccesskey() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accesskey); - - } - - /** - *

      - * Set the value of the accesskey property. - *

      - * - * @param accesskey the new property value - */ - public void setAccesskey(java.lang.String accesskey) { - getStateHelper().put(PropertyKeys.accesskey, accesskey); - handleAttribute(this, "accesskey", accesskey); - } - - /** - *

      - * Return the value of the alt property. - *

      - * - * @return the property value - *

      - * Contents: Alternate textual description of the element rendered by this component. - * - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public java.lang.String getAlt() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.alt); - - } - - /** - *

      - * Set the value of the alt property. - *

      - * - * @param alt the new property value - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public void setAlt(java.lang.String alt) { - getStateHelper().put(PropertyKeys.alt, alt); - handleAttribute(this, "alt", alt); - } - - /** - *

      - * Return the value of the autocomplete property. - *

      - * - * @return the property value - *

      - * Contents: If the value of this attribute is "off", render "off" as the value of the attribute. This indicates that - * the browser should disable its autocomplete feature for this component. This is useful for components that perform - * autocompletion and do not want the browser interfering. If this attribute is not set or the value is "on", render - * nothing. - */ - public java.lang.String getAutocomplete() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.autocomplete); - - } - - /** - *

      - * Set the value of the autocomplete property. - *

      - * - * @param autocomplete the new property value - */ - public void setAutocomplete(java.lang.String autocomplete) { - getStateHelper().put(PropertyKeys.autocomplete, autocomplete); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the disabled property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this element must never receive focus or be included in a subsequent submit. A value - * of false causes no attribute to be rendered, while a value of true causes the attribute to be rendered as - * disabled="disabled". - */ - public boolean isDisabled() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - - } - - /** - *

      - * Set the value of the disabled property. - *

      - * - * @param disabled the new property value - */ - public void setDisabled(boolean disabled) { - getStateHelper().put(PropertyKeys.disabled, disabled); - } - - /** - *

      - * Return the value of the label property. - *

      - * - * @return the property value - *

      - * Contents: A localized user presentable name for this component. - */ - public java.lang.String getLabel() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.label); - - } - - /** - *

      - * Set the value of the label property. - *

      - * - * @param label the new property value - */ - public void setLabel(java.lang.String label) { - getStateHelper().put(PropertyKeys.label, label); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the maxlength property. - *

      - * - * @return the property value - *

      - * Contents: The maximum number of characters that may be entered in this field. - */ - public int getMaxlength() { - return (java.lang.Integer) getStateHelper().eval(PropertyKeys.maxlength, Integer.MIN_VALUE); - - } - - /** - *

      - * Set the value of the maxlength property. - *

      - * - * @param maxlength the new property value - */ - public void setMaxlength(int maxlength) { - getStateHelper().put(PropertyKeys.maxlength, maxlength); - handleAttribute(this, "maxlength", maxlength); - } - - /** - *

      - * Return the value of the onblur property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus. - */ - public java.lang.String getOnblur() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onblur); - - } - - /** - *

      - * Set the value of the onblur property. - *

      - * - * @param onblur the new property value - */ - public void setOnblur(java.lang.String onblur) { - getStateHelper().put(PropertyKeys.onblur, onblur); - handleAttribute(this, "onblur", onblur); - } - - /** - *

      - * Return the value of the onchange property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus and its value has been modified since gaining focus. - */ - public java.lang.String getOnchange() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onchange); - - } - - /** - *

      - * Set the value of the onchange property. - *

      - * - * @param onchange the new property value - */ - public void setOnchange(java.lang.String onchange) { - getStateHelper().put(PropertyKeys.onchange, onchange); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onfocus property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element receives focus. - */ - public java.lang.String getOnfocus() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onfocus); - - } - - /** - *

      - * Set the value of the onfocus property. - *

      - * - * @param onfocus the new property value - */ - public void setOnfocus(java.lang.String onfocus) { - getStateHelper().put(PropertyKeys.onfocus, onfocus); - handleAttribute(this, "onfocus", onfocus); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the onselect property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when text within this element is selected by the user. - */ - public java.lang.String getOnselect() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onselect); - - } - - /** - *

      - * Set the value of the onselect property. - *

      - * - * @param onselect the new property value - */ - public void setOnselect(java.lang.String onselect) { - getStateHelper().put(PropertyKeys.onselect, onselect); - handleAttribute(this, "onselect", onselect); - } - - /** - *

      - * Return the value of the readonly property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this component will prohibit changes by the user. The element may receive focus unless - * it has also been disabled. A value of false causes no attribute to be rendered, while a value of true causes the - * attribute to be rendered as readonly="readonly". - */ - public boolean isReadonly() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.readonly, false); - - } - - /** - *

      - * Set the value of the readonly property. - *

      - * - * @param readonly the new property value - */ - public void setReadonly(boolean readonly) { - getStateHelper().put(PropertyKeys.readonly, readonly); - } - - /** - *

      - * Return the value of the redisplay property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that any existing value in this field should be rendered when the form is created. Because - * this is a potential security risk, password values are not displayed by default. - */ - public boolean isRedisplay() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.redisplay, false); - - } - - /** - *

      - * Set the value of the redisplay property. - *

      - * - * @param redisplay the new property value - */ - public void setRedisplay(boolean redisplay) { - getStateHelper().put(PropertyKeys.redisplay, redisplay); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the size property. - *

      - * - * @return the property value - *

      - * Contents: The number of characters used to determine the width of this field. - */ - public int getSize() { - return (java.lang.Integer) getStateHelper().eval(PropertyKeys.size, Integer.MIN_VALUE); - - } - - /** - *

      - * Set the value of the size property. - *

      - * - * @param size the new property value - */ - public void setSize(int size) { - getStateHelper().put(PropertyKeys.size, size); - handleAttribute(this, "size", size); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the tabindex property. - *

      - * - * @return the property value - *

      - * Contents: Position of this element in the tabbing order for the current document. This value must be an integer - * between 0 and 32767. - */ - public java.lang.String getTabindex() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.tabindex); - - } - - /** - *

      - * Set the value of the tabindex property. - *

      - * - * @param tabindex the new property value - */ - public void setTabindex(java.lang.String tabindex) { - getStateHelper().put(PropertyKeys.tabindex, tabindex); - handleAttribute(this, "tabindex", tabindex); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList("blur", "change", "valueChange", "click", "dblclick", - "focus", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "select")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return "valueChange"; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlInputText.java b/impl/src/main/java/jakarta/faces/component/html/HtmlInputText.java deleted file mode 100644 index 720c08ea15..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlInputText.java +++ /dev/null @@ -1,892 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UIInput; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents an HTML input element of type text. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Text". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlInputText extends UIInput implements ClientBehaviorHolder { - - public HtmlInputText() { - super(); - setRendererType("jakarta.faces.Text"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlInputText"; - - /** - * The property keys. - */ - protected enum PropertyKeys { - accesskey, alt, autocomplete, dir, disabled, label, lang, maxlength, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, - onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, readonly, role, size, style, styleClass, tabindex, title, type; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accesskey property. - *

      - * - * @return the property value - *

      - * Contents: Access key that, when pressed, transfers focus to this element. - */ - public java.lang.String getAccesskey() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accesskey); - - } - - /** - *

      - * Set the value of the accesskey property. - *

      - * - * @param accesskey the new property value - */ - public void setAccesskey(java.lang.String accesskey) { - getStateHelper().put(PropertyKeys.accesskey, accesskey); - handleAttribute(this, "accesskey", accesskey); - } - - /** - *

      - * Return the value of the alt property. - *

      - * - * @return the property value - *

      - * Contents: Alternate textual description of the element rendered by this component. - */ - public java.lang.String getAlt() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.alt); - - } - - /** - *

      - * Set the value of the alt property. - *

      - * - * @param alt the new property value - */ - public void setAlt(java.lang.String alt) { - getStateHelper().put(PropertyKeys.alt, alt); - handleAttribute(this, "alt", alt); - } - - /** - *

      - * Return the value of the autocomplete property. - *

      - * - * @return the property value - *

      - * Contents: If the value of this attribute is "off", render "off" as the value of the attribute. This indicates that - * the browser should disable its autocomplete feature for this component. This is useful for components that perform - * autocompletion and do not want the browser interfering. If this attribute is not set or the value is "on", render - * nothing. - */ - public java.lang.String getAutocomplete() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.autocomplete); - - } - - /** - *

      - * Set the value of the autocomplete property. - *

      - * - * @param autocomplete the new property value - */ - public void setAutocomplete(java.lang.String autocomplete) { - getStateHelper().put(PropertyKeys.autocomplete, autocomplete); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the disabled property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this element must never receive focus or be included in a subsequent submit. A value - * of false causes no attribute to be rendered, while a value of true causes the attribute to be rendered as - * disabled="disabled". - */ - public boolean isDisabled() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - - } - - /** - *

      - * Set the value of the disabled property. - *

      - * - * @param disabled the new property value - */ - public void setDisabled(boolean disabled) { - getStateHelper().put(PropertyKeys.disabled, disabled); - } - - /** - *

      - * Return the value of the label property. - *

      - * - * @return the property value - *

      - * Contents: A localized user presentable name for this component. - */ - public java.lang.String getLabel() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.label); - - } - - /** - *

      - * Set the value of the label property. - *

      - * - * @param label the new property value - */ - public void setLabel(java.lang.String label) { - getStateHelper().put(PropertyKeys.label, label); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the maxlength property. - *

      - * - * @return the property value - *

      - * Contents: The maximum number of characters that may be entered in this field. - */ - public int getMaxlength() { - return (java.lang.Integer) getStateHelper().eval(PropertyKeys.maxlength, Integer.MIN_VALUE); - - } - - /** - *

      - * Set the value of the maxlength property. - *

      - * - * @param maxlength the new property value - */ - public void setMaxlength(int maxlength) { - getStateHelper().put(PropertyKeys.maxlength, maxlength); - handleAttribute(this, "maxlength", maxlength); - } - - /** - *

      - * Return the value of the onblur property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus. - */ - public java.lang.String getOnblur() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onblur); - - } - - /** - *

      - * Set the value of the onblur property. - *

      - * - * @param onblur the new property value - */ - public void setOnblur(java.lang.String onblur) { - getStateHelper().put(PropertyKeys.onblur, onblur); - handleAttribute(this, "onblur", onblur); - } - - /** - *

      - * Return the value of the onchange property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus and its value has been modified since gaining focus. - */ - public java.lang.String getOnchange() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onchange); - - } - - /** - *

      - * Set the value of the onchange property. - *

      - * - * @param onchange the new property value - */ - public void setOnchange(java.lang.String onchange) { - getStateHelper().put(PropertyKeys.onchange, onchange); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onfocus property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element receives focus. - */ - public java.lang.String getOnfocus() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onfocus); - - } - - /** - *

      - * Set the value of the onfocus property. - *

      - * - * @param onfocus the new property value - */ - public void setOnfocus(java.lang.String onfocus) { - getStateHelper().put(PropertyKeys.onfocus, onfocus); - handleAttribute(this, "onfocus", onfocus); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the onselect property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when text within this element is selected by the user. - */ - public java.lang.String getOnselect() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onselect); - - } - - /** - *

      - * Set the value of the onselect property. - *

      - * - * @param onselect the new property value - */ - public void setOnselect(java.lang.String onselect) { - getStateHelper().put(PropertyKeys.onselect, onselect); - handleAttribute(this, "onselect", onselect); - } - - /** - *

      - * Return the value of the readonly property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this component will prohibit changes by the user. The element may receive focus unless - * it has also been disabled. A value of false causes no attribute to be rendered, while a value of true causes the - * attribute to be rendered as readonly="readonly". - */ - public boolean isReadonly() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.readonly, false); - - } - - /** - *

      - * Set the value of the readonly property. - *

      - * - * @param readonly the new property value - */ - public void setReadonly(boolean readonly) { - getStateHelper().put(PropertyKeys.readonly, readonly); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the size property. - *

      - * - * @return the property value - *

      - * Contents: The number of characters used to determine the width of this field. - */ - public int getSize() { - return (java.lang.Integer) getStateHelper().eval(PropertyKeys.size, Integer.MIN_VALUE); - - } - - /** - *

      - * Set the value of the size property. - *

      - * - * @param size the new property value - */ - public void setSize(int size) { - getStateHelper().put(PropertyKeys.size, size); - handleAttribute(this, "size", size); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the tabindex property. - *

      - * - * @return the property value - *

      - * Contents: Position of this element in the tabbing order for the current document. This value must be an integer - * between 0 and 32767. - */ - public java.lang.String getTabindex() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.tabindex); - - } - - /** - *

      - * Set the value of the tabindex property. - *

      - * - * @param tabindex the new property value - */ - public void setTabindex(java.lang.String tabindex) { - getStateHelper().put(PropertyKeys.tabindex, tabindex); - handleAttribute(this, "tabindex", tabindex); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - /** - *

      - * Return the value of the type property. - *

      - * - * @return the property value - *

      - * Contents: Controls the data type and associated control of the element. Default value is text. - *

      - * If a value is specified for which already a more specific component exist, such as - * hidden, password, checkbox, radio, file, submit, image, reset and button, - * and the ProjectStage is set to Development, then the renderer must add a warning message stating that the more specific component should be preferred. - * - * @since 4.0 - */ - public String getType() { - return (String) getStateHelper().eval(PropertyKeys.type, "text"); - - } - - /** - *

      - * Set the value of the type property. - *

      - * - * @param type the new property value - * - * @since 4.0 - */ - public void setType(String type) { - getStateHelper().put(PropertyKeys.type, type); - handleAttribute(this, "type", type); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList("blur", "change", "valueChange", "click", "dblclick", - "focus", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "select")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return "valueChange"; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlInputTextarea.java b/impl/src/main/java/jakarta/faces/component/html/HtmlInputTextarea.java deleted file mode 100644 index a4a415fce2..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlInputTextarea.java +++ /dev/null @@ -1,805 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UIInput; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents an HTML textarea element. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Textarea". This value - * can be changed by calling the setRendererType() method. - *

      - */ -public class HtmlInputTextarea extends UIInput implements ClientBehaviorHolder { - - public HtmlInputTextarea() { - super(); - setRendererType("jakarta.faces.Textarea"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlInputTextarea"; - - /** - * Properties used by this component - * - */ - protected enum PropertyKeys { - accesskey, cols, dir, disabled, label, lang, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, - onmouseout, onmouseover, onmouseup, onselect, readonly, role, rows, style, styleClass, tabindex, title,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accesskey property. - *

      - * - * @return the property value - *

      - * Contents: Access key that, when pressed, transfers focus to this element. - */ - public java.lang.String getAccesskey() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accesskey); - - } - - /** - *

      - * Set the value of the accesskey property. - *

      - * - * @param accesskey the new property value - */ - public void setAccesskey(java.lang.String accesskey) { - getStateHelper().put(PropertyKeys.accesskey, accesskey); - handleAttribute(this, "accesskey", accesskey); - } - - /** - *

      - * Return the value of the cols property. - *

      - * - * @return the property value - *

      - * Contents: The number of columns to be displayed. - */ - public int getCols() { - return (java.lang.Integer) getStateHelper().eval(PropertyKeys.cols, Integer.MIN_VALUE); - - } - - /** - *

      - * Set the value of the cols property. - *

      - * - * @param cols the new property value - */ - public void setCols(int cols) { - getStateHelper().put(PropertyKeys.cols, cols); - handleAttribute(this, "cols", cols); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the disabled property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this element must never receive focus or be included in a subsequent submit. A value - * of false causes no attribute to be rendered, while a value of true causes the attribute to be rendered as - * disabled="disabled". - */ - public boolean isDisabled() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - - } - - /** - *

      - * Set the value of the disabled property. - *

      - * - * @param disabled the new property value - */ - public void setDisabled(boolean disabled) { - getStateHelper().put(PropertyKeys.disabled, disabled); - } - - /** - *

      - * Return the value of the label property. - *

      - * - * @return the property value - *

      - * Contents: A localized user presentable name for this component. - */ - public java.lang.String getLabel() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.label); - - } - - /** - *

      - * Set the value of the label property. - *

      - * - * @param label the new property value - */ - public void setLabel(java.lang.String label) { - getStateHelper().put(PropertyKeys.label, label); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the onblur property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus. - */ - public java.lang.String getOnblur() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onblur); - - } - - /** - *

      - * Set the value of the onblur property. - *

      - * - * @param onblur the new property value - */ - public void setOnblur(java.lang.String onblur) { - getStateHelper().put(PropertyKeys.onblur, onblur); - handleAttribute(this, "onblur", onblur); - } - - /** - *

      - * Return the value of the onchange property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus and its value has been modified since gaining focus. - */ - public java.lang.String getOnchange() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onchange); - - } - - /** - *

      - * Set the value of the onchange property. - *

      - * - * @param onchange the new property value - */ - public void setOnchange(java.lang.String onchange) { - getStateHelper().put(PropertyKeys.onchange, onchange); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onfocus property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element receives focus. - */ - public java.lang.String getOnfocus() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onfocus); - - } - - /** - *

      - * Set the value of the onfocus property. - *

      - * - * @param onfocus the new property value - */ - public void setOnfocus(java.lang.String onfocus) { - getStateHelper().put(PropertyKeys.onfocus, onfocus); - handleAttribute(this, "onfocus", onfocus); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the onselect property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when text within this element is selected by the user. - */ - public java.lang.String getOnselect() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onselect); - - } - - /** - *

      - * Set the value of the onselect property. - *

      - * - * @param onselect the new property value - */ - public void setOnselect(java.lang.String onselect) { - getStateHelper().put(PropertyKeys.onselect, onselect); - handleAttribute(this, "onselect", onselect); - } - - /** - *

      - * Return the value of the readonly property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this component will prohibit changes by the user. The element may receive focus unless - * it has also been disabled. A value of false causes no attribute to be rendered, while a value of true causes the - * attribute to be rendered as readonly="readonly". - */ - public boolean isReadonly() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.readonly, false); - - } - - /** - *

      - * Set the value of the readonly property. - *

      - * - * @param readonly the new property value - */ - public void setReadonly(boolean readonly) { - getStateHelper().put(PropertyKeys.readonly, readonly); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the rows property. - *

      - * - * @return the property value - *

      - * Contents: The number of rows to be displayed. - */ - public int getRows() { - return (java.lang.Integer) getStateHelper().eval(PropertyKeys.rows, Integer.MIN_VALUE); - - } - - /** - *

      - * Set the value of the rows property. - *

      - * - * @param rows the new property value - */ - public void setRows(int rows) { - getStateHelper().put(PropertyKeys.rows, rows); - handleAttribute(this, "rows", rows); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the tabindex property. - *

      - * - * @return the property value - *

      - * Contents: Position of this element in the tabbing order for the current document. This value must be an integer - * between 0 and 32767. - */ - public java.lang.String getTabindex() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.tabindex); - - } - - /** - *

      - * Set the value of the tabindex property. - *

      - * - * @param tabindex the new property value - */ - public void setTabindex(java.lang.String tabindex) { - getStateHelper().put(PropertyKeys.tabindex, tabindex); - handleAttribute(this, "tabindex", tabindex); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList("blur", "change", "valueChange", "click", "dblclick", - "focus", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "select")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return "valueChange"; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlMessage.java b/impl/src/main/java/jakarta/faces/component/html/HtmlMessage.java deleted file mode 100644 index ce908f7ddd..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlMessage.java +++ /dev/null @@ -1,462 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import jakarta.faces.component.UIMessage; - -/** - * - *

      - * By default, the rendererType property must be set to "jakarta.faces.Message". This value - * can be changed by calling the setRendererType() method. - *

      - */ -public class HtmlMessage extends UIMessage { - - public HtmlMessage() { - super(); - setRendererType("jakarta.faces.Message"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlMessage"; - - /** - * Properties used by this component - * - */ - protected enum PropertyKeys { - dir, errorClass, errorStyle, fatalClass, fatalStyle, infoClass, infoStyle, lang, role, style, styleClass, title, tooltip, warnClass, warnStyle,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the errorClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to any message with a severity class of "ERROR". - */ - public java.lang.String getErrorClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.errorClass); - - } - - /** - *

      - * Set the value of the errorClass property. - *

      - * - * @param errorClass the new property value - */ - public void setErrorClass(java.lang.String errorClass) { - getStateHelper().put(PropertyKeys.errorClass, errorClass); - } - - /** - *

      - * Return the value of the errorStyle property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to apply to any message with a severity class of "ERROR". - */ - public java.lang.String getErrorStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.errorStyle); - - } - - /** - *

      - * Set the value of the errorStyle property. - *

      - * - * @param errorStyle the new property value - */ - public void setErrorStyle(java.lang.String errorStyle) { - getStateHelper().put(PropertyKeys.errorStyle, errorStyle); - } - - /** - *

      - * Return the value of the fatalClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to any message with a severity class of "FATAL". - */ - public java.lang.String getFatalClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.fatalClass); - - } - - /** - *

      - * Set the value of the fatalClass property. - *

      - * - * @param fatalClass the new property value - */ - public void setFatalClass(java.lang.String fatalClass) { - getStateHelper().put(PropertyKeys.fatalClass, fatalClass); - } - - /** - *

      - * Return the value of the fatalStyle property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to apply to any message with a severity class of "FATAL". - */ - public java.lang.String getFatalStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.fatalStyle); - - } - - /** - *

      - * Set the value of the fatalStyle property. - *

      - * - * @param fatalStyle the new property value - */ - public void setFatalStyle(java.lang.String fatalStyle) { - getStateHelper().put(PropertyKeys.fatalStyle, fatalStyle); - } - - /** - *

      - * Return the value of the infoClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to any message with a severity class of "INFO". - */ - public java.lang.String getInfoClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.infoClass); - - } - - /** - *

      - * Set the value of the infoClass property. - *

      - * - * @param infoClass the new property value - */ - public void setInfoClass(java.lang.String infoClass) { - getStateHelper().put(PropertyKeys.infoClass, infoClass); - } - - /** - *

      - * Return the value of the infoStyle property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to apply to any message with a severity class of "INFO". - */ - public java.lang.String getInfoStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.infoStyle); - - } - - /** - *

      - * Set the value of the infoStyle property. - *

      - * - * @param infoStyle the new property value - */ - public void setInfoStyle(java.lang.String infoStyle) { - getStateHelper().put(PropertyKeys.infoStyle, infoStyle); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - /** - *

      - * Return the value of the tooltip property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating whether the detail portion of the message should be displayed as a tooltip. - */ - public boolean isTooltip() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.tooltip, false); - - } - - /** - *

      - * Set the value of the tooltip property. - *

      - * - * @param tooltip the new property value - */ - public void setTooltip(boolean tooltip) { - getStateHelper().put(PropertyKeys.tooltip, tooltip); - } - - /** - *

      - * Return the value of the warnClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to any message with a severity class of "WARN". - */ - public java.lang.String getWarnClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.warnClass); - - } - - /** - *

      - * Set the value of the warnClass property. - *

      - * - * @param warnClass the new property value - */ - public void setWarnClass(java.lang.String warnClass) { - getStateHelper().put(PropertyKeys.warnClass, warnClass); - } - - /** - *

      - * Return the value of the warnStyle property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to apply to any message with a severity class of "WARN". - */ - public java.lang.String getWarnStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.warnStyle); - - } - - /** - *

      - * Set the value of the warnStyle property. - *

      - * - * @param warnStyle the new property value - */ - public void setWarnStyle(java.lang.String warnStyle) { - getStateHelper().put(PropertyKeys.warnStyle, warnStyle); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlMessages.java b/impl/src/main/java/jakarta/faces/component/html/HtmlMessages.java deleted file mode 100644 index 1bc31c2b8c..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlMessages.java +++ /dev/null @@ -1,487 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import jakarta.faces.component.UIMessages; - -/** - * - *

      - * By default, the rendererType property must be set to "jakarta.faces.Messages". This value - * can be changed by calling the setRendererType() method. - *

      - */ -public class HtmlMessages extends UIMessages { - - public HtmlMessages() { - super(); - setRendererType("jakarta.faces.Messages"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlMessages"; - - /** - * The property keys. - */ - protected enum PropertyKeys { - dir, errorClass, errorStyle, fatalClass, fatalStyle, infoClass, infoStyle, lang, layout, role, style, styleClass, title, tooltip, warnClass, warnStyle,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the errorClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to any message with a severity class of "ERROR". - */ - public java.lang.String getErrorClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.errorClass); - - } - - /** - *

      - * Set the value of the errorClass property. - *

      - * - * @param errorClass the new property value - */ - public void setErrorClass(java.lang.String errorClass) { - getStateHelper().put(PropertyKeys.errorClass, errorClass); - } - - /** - *

      - * Return the value of the errorStyle property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to apply to any message with a severity class of "ERROR". - */ - public java.lang.String getErrorStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.errorStyle); - - } - - /** - *

      - * Set the value of the errorStyle property. - *

      - * - * @param errorStyle the new property value - */ - public void setErrorStyle(java.lang.String errorStyle) { - getStateHelper().put(PropertyKeys.errorStyle, errorStyle); - } - - /** - *

      - * Return the value of the fatalClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to any message with a severity class of "FATAL". - */ - public java.lang.String getFatalClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.fatalClass); - - } - - /** - *

      - * Set the value of the fatalClass property. - *

      - * - * @param fatalClass the new property value - */ - public void setFatalClass(java.lang.String fatalClass) { - getStateHelper().put(PropertyKeys.fatalClass, fatalClass); - } - - /** - *

      - * Return the value of the fatalStyle property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to apply to any message with a severity class of "FATAL". - */ - public java.lang.String getFatalStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.fatalStyle); - - } - - /** - *

      - * Set the value of the fatalStyle property. - *

      - * - * @param fatalStyle the new property value - */ - public void setFatalStyle(java.lang.String fatalStyle) { - getStateHelper().put(PropertyKeys.fatalStyle, fatalStyle); - } - - /** - *

      - * Return the value of the infoClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to any message with a severity class of "INFO". - */ - public java.lang.String getInfoClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.infoClass); - - } - - /** - *

      - * Set the value of the infoClass property. - *

      - * - * @param infoClass the new property value - */ - public void setInfoClass(java.lang.String infoClass) { - getStateHelper().put(PropertyKeys.infoClass, infoClass); - } - - /** - *

      - * Return the value of the infoStyle property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to apply to any message with a severity class of "INFO". - */ - public java.lang.String getInfoStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.infoStyle); - - } - - /** - *

      - * Set the value of the infoStyle property. - *

      - * - * @param infoStyle the new property value - */ - public void setInfoStyle(java.lang.String infoStyle) { - getStateHelper().put(PropertyKeys.infoStyle, infoStyle); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the layout property. - *

      - * - * @return the property value - *

      - * Contents: The type of layout markup to use when rendering error messages. Valid values are "table" (an HTML table) - * and "list" (an HTML list). If not specified, the default value is "list". - */ - public java.lang.String getLayout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.layout, "list"); - - } - - /** - *

      - * Set the value of the layout property. - *

      - * - * @param layout the new property value - */ - public void setLayout(java.lang.String layout) { - getStateHelper().put(PropertyKeys.layout, layout); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - /** - *

      - * Return the value of the tooltip property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating whether the detail portion of the message should be displayed as a tooltip. - */ - public boolean isTooltip() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.tooltip, false); - - } - - /** - *

      - * Set the value of the tooltip property. - *

      - * - * @param tooltip the new property value - */ - public void setTooltip(boolean tooltip) { - getStateHelper().put(PropertyKeys.tooltip, tooltip); - } - - /** - *

      - * Return the value of the warnClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to any message with a severity class of "WARN". - */ - public java.lang.String getWarnClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.warnClass); - - } - - /** - *

      - * Set the value of the warnClass property. - *

      - * - * @param warnClass the new property value - */ - public void setWarnClass(java.lang.String warnClass) { - getStateHelper().put(PropertyKeys.warnClass, warnClass); - } - - /** - *

      - * Return the value of the warnStyle property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to apply to any message with a severity class of "WARN". - */ - public java.lang.String getWarnStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.warnStyle); - - } - - /** - *

      - * Set the value of the warnStyle property. - *

      - * - * @param warnStyle the new property value - */ - public void setWarnStyle(java.lang.String warnStyle) { - getStateHelper().put(PropertyKeys.warnStyle, warnStyle); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlOutcomeTargetButton.java b/impl/src/main/java/jakarta/faces/component/html/HtmlOutcomeTargetButton.java deleted file mode 100644 index 661d6a8358..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlOutcomeTargetButton.java +++ /dev/null @@ -1,709 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UIOutcomeTarget; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents an HTML input element of type "button" or image that may be used to link to a URL handled by - * the Faces Servlet resolved preemptively using the logical outcome defined by the outcome property. The - * button behaves like a link, so the current form is not submitted when it is activated (the transitive of how the - * UICommandLink behaves like a submit button). - *

      - * By default, the rendererType property must be set to "jakarta.faces.Button". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlOutcomeTargetButton extends UIOutcomeTarget implements ClientBehaviorHolder { - - public HtmlOutcomeTargetButton() { - super(); - setRendererType("jakarta.faces.Button"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlOutcomeTargetButton"; - - /** - * The property keys. - */ - protected enum PropertyKeys { - accesskey, alt, dir, disabled, image, lang, onblur, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, - onmouseover, onmouseup, role, style, styleClass, tabindex, title,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accesskey property. - *

      - * - * @return the property value - *

      - * Contents: Access key that, when pressed, transfers focus to this element. - */ - public java.lang.String getAccesskey() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accesskey); - - } - - /** - *

      - * Set the value of the accesskey property. - *

      - * - * @param accesskey the new property value - */ - public void setAccesskey(java.lang.String accesskey) { - getStateHelper().put(PropertyKeys.accesskey, accesskey); - handleAttribute(this, "accesskey", accesskey); - } - - /** - *

      - * Return the value of the alt property. - * This attribute is ignored when the image attribute is not specified. - *

      - * - * @return the property value - *

      - * Contents: Alternate textual description of the element rendered by this component. - */ - public java.lang.String getAlt() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.alt); - - } - - /** - *

      - * Set the value of the alt property. - *

      - * - * @param alt the new property value - */ - public void setAlt(java.lang.String alt) { - getStateHelper().put(PropertyKeys.alt, alt); - handleAttribute(this, "alt", alt); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the disabled property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this element must never receive focus or be included in a subsequent submit. A value - * of false causes no attribute to be rendered, while a value of true causes the attribute to be rendered as - * disabled="disabled". - */ - public boolean isDisabled() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - - } - - /** - *

      - * Set the value of the disabled property. - *

      - * - * @param disabled the new property value - */ - public void setDisabled(boolean disabled) { - getStateHelper().put(PropertyKeys.disabled, disabled); - } - - /** - *

      - * Return the value of the image property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Absolute or relative URL of the image to be displayed for this button. If specified, this "input" element will be of - * type "image". Otherwise, it will be of the type specified by the "type" property with a label specified by the - * "value" property. Note that if the value of this attribute starts with "/", the - * rendered value for this attribute will be prefixed with the context-root for this application. - *

      - */ - public java.lang.String getImage() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.image); - - } - - /** - *

      - * Set the value of the image property. - *

      - * - * @param image the new property value - */ - public void setImage(java.lang.String image) { - getStateHelper().put(PropertyKeys.image, image); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the onblur property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus. - */ - public java.lang.String getOnblur() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onblur); - - } - - /** - *

      - * Set the value of the onblur property. - *

      - * - * @param onblur the new property value - */ - public void setOnblur(java.lang.String onblur) { - getStateHelper().put(PropertyKeys.onblur, onblur); - handleAttribute(this, "onblur", onblur); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onfocus property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element receives focus. - */ - public java.lang.String getOnfocus() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onfocus); - - } - - /** - *

      - * Set the value of the onfocus property. - *

      - * - * @param onfocus the new property value - */ - public void setOnfocus(java.lang.String onfocus) { - getStateHelper().put(PropertyKeys.onfocus, onfocus); - handleAttribute(this, "onfocus", onfocus); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the tabindex property. - *

      - * - * @return the property value - *

      - * Contents: Position of this element in the tabbing order for the current document. This value must be an integer - * between 0 and 32767. - */ - public java.lang.String getTabindex() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.tabindex); - - } - - /** - *

      - * Set the value of the tabindex property. - *

      - * - * @param tabindex the new property value - */ - public void setTabindex(java.lang.String tabindex) { - getStateHelper().put(PropertyKeys.tabindex, tabindex); - handleAttribute(this, "tabindex", tabindex); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection( - Arrays.asList("blur", "click", "dblclick", "focus", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return null; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlOutcomeTargetLink.java b/impl/src/main/java/jakarta/faces/component/html/HtmlOutcomeTargetLink.java deleted file mode 100644 index 1d7aa385a3..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlOutcomeTargetLink.java +++ /dev/null @@ -1,856 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UIOutcomeTarget; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents an HTML a (hyperlink) element that may be used to link to a URL handled by the Faces Servlet - * resolved preemptively using the logical outcome defined by the outcome property. - *

      - * By default, the rendererType property must be set to "jakarta.faces.Link". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlOutcomeTargetLink extends UIOutcomeTarget implements ClientBehaviorHolder { - - public HtmlOutcomeTargetLink() { - super(); - setRendererType("jakarta.faces.Link"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlOutcomeTargetLink"; - - /** - * The property keys. - */ - protected enum PropertyKeys { - accesskey, charset, coords, dir, disabled, hreflang, lang, onblur, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, - onmousemove, onmouseout, onmouseover, onmouseup, rel, rev, role, shape, style, styleClass, tabindex, target, title, type,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accesskey property. - *

      - * - * @return the property value - *

      - * Contents: Access key that, when pressed, transfers focus to this element. - */ - public java.lang.String getAccesskey() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accesskey); - - } - - /** - *

      - * Set the value of the accesskey property. - *

      - * - * @param accesskey the new property value - */ - public void setAccesskey(java.lang.String accesskey) { - getStateHelper().put(PropertyKeys.accesskey, accesskey); - handleAttribute(this, "accesskey", accesskey); - } - - /** - *

      - * Return the value of the charset property. - *

      - * - * @return the property value - *

      - * Contents: The character encoding of the resource designated by this hyperlink. - */ - public java.lang.String getCharset() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.charset); - - } - - /** - *

      - * Set the value of the charset property. - *

      - * - * @param charset the new property value - */ - public void setCharset(java.lang.String charset) { - getStateHelper().put(PropertyKeys.charset, charset); - handleAttribute(this, "charset", charset); - } - - /** - *

      - * Return the value of the coords property. - *

      - * - * @return the property value - *

      - * Contents: The position and shape of the hot spot on the screen (for use in client-side image maps). - */ - public java.lang.String getCoords() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.coords); - - } - - /** - *

      - * Set the value of the coords property. - *

      - * - * @param coords the new property value - */ - public void setCoords(java.lang.String coords) { - getStateHelper().put(PropertyKeys.coords, coords); - handleAttribute(this, "coords", coords); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the disabled property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this element must never receive focus or be included in a subsequent submit. - */ - public boolean isDisabled() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - - } - - /** - *

      - * Set the value of the disabled property. - *

      - * - * @param disabled the new property value - */ - public void setDisabled(boolean disabled) { - getStateHelper().put(PropertyKeys.disabled, disabled); - } - - /** - *

      - * Return the value of the hreflang property. - *

      - * - * @return the property value - *

      - * Contents: The language code of the resource designated by this hyperlink. - */ - public java.lang.String getHreflang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.hreflang); - - } - - /** - *

      - * Set the value of the hreflang property. - *

      - * - * @param hreflang the new property value - */ - public void setHreflang(java.lang.String hreflang) { - getStateHelper().put(PropertyKeys.hreflang, hreflang); - handleAttribute(this, "hreflang", hreflang); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the onblur property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus. - */ - public java.lang.String getOnblur() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onblur); - - } - - /** - *

      - * Set the value of the onblur property. - *

      - * - * @param onblur the new property value - */ - public void setOnblur(java.lang.String onblur) { - getStateHelper().put(PropertyKeys.onblur, onblur); - handleAttribute(this, "onblur", onblur); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onfocus property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element receives focus. - */ - public java.lang.String getOnfocus() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onfocus); - - } - - /** - *

      - * Set the value of the onfocus property. - *

      - * - * @param onfocus the new property value - */ - public void setOnfocus(java.lang.String onfocus) { - getStateHelper().put(PropertyKeys.onfocus, onfocus); - handleAttribute(this, "onfocus", onfocus); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the rel property. - *

      - * - * @return the property value - *

      - * Contents: The relationship from the current document to the anchor specified by this hyperlink. The value of this - * attribute is a space-separated list of link types. - */ - public java.lang.String getRel() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.rel); - - } - - /** - *

      - * Set the value of the rel property. - *

      - * - * @param rel the new property value - */ - public void setRel(java.lang.String rel) { - getStateHelper().put(PropertyKeys.rel, rel); - handleAttribute(this, "rel", rel); - } - - /** - *

      - * Return the value of the rev property. - *

      - * - * @return the property value - *

      - * Contents: A reverse link from the anchor specified by this hyperlink to the current document. The value of this - * attribute is a space-separated list of link types. - */ - public java.lang.String getRev() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.rev); - - } - - /** - *

      - * Set the value of the rev property. - *

      - * - * @param rev the new property value - */ - public void setRev(java.lang.String rev) { - getStateHelper().put(PropertyKeys.rev, rev); - handleAttribute(this, "rev", rev); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the shape property. - *

      - * - * @return the property value - *

      - * Contents: The shape of the hot spot on the screen (for use in client-side image maps). Valid values are: default - * (entire region); rect (rectangular region); circle (circular region); and poly (polygonal region). - */ - public java.lang.String getShape() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.shape); - - } - - /** - *

      - * Set the value of the shape property. - *

      - * - * @param shape the new property value - */ - public void setShape(java.lang.String shape) { - getStateHelper().put(PropertyKeys.shape, shape); - handleAttribute(this, "shape", shape); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the tabindex property. - *

      - * - * @return the property value - *

      - * Contents: Position of this element in the tabbing order for the current document. This value must be an integer - * between 0 and 32767. - */ - public java.lang.String getTabindex() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.tabindex); - - } - - /** - *

      - * Set the value of the tabindex property. - *

      - * - * @param tabindex the new property value - */ - public void setTabindex(java.lang.String tabindex) { - getStateHelper().put(PropertyKeys.tabindex, tabindex); - handleAttribute(this, "tabindex", tabindex); - } - - /** - *

      - * Return the value of the target property. - *

      - * - * @return the property value - *

      - * Contents: Name of a frame where the resource retrieved via this hyperlink is to be displayed. - */ - public java.lang.String getTarget() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.target); - - } - - /** - *

      - * Set the value of the target property. - *

      - * - * @param target the new property value - */ - public void setTarget(java.lang.String target) { - getStateHelper().put(PropertyKeys.target, target); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - /** - *

      - * Return the value of the type property. - *

      - * - * @return the property value - *

      - * Contents: The content type of the resource designated by this hyperlink. - */ - public java.lang.String getType() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.type); - - } - - /** - *

      - * Set the value of the type property. - *

      - * - * @param type the new property value - */ - public void setType(java.lang.String type) { - getStateHelper().put(PropertyKeys.type, type); - handleAttribute(this, "type", type); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList("blur", "click", "action", "dblclick", "focus", - "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return "action"; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlOutputFormat.java b/impl/src/main/java/jakarta/faces/component/html/HtmlOutputFormat.java deleted file mode 100644 index 86236bb72a..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlOutputFormat.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import jakarta.faces.component.UIOutput; - -/** - *

      - * Represents a component that looks up a localized message in a resource bundle, optionally uses it as a - * MessageFormat pattern string and substitutes in parameter values from nested UIParameter - * components, and renders the result. If the "dir" or "lang" attributes are present, render a span element - * and pass them through as attributes on the span. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Format". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlOutputFormat extends UIOutput { - - public HtmlOutputFormat() { - super(); - setRendererType("jakarta.faces.Format"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlOutputFormat"; - - /** - * The property keys. - */ - protected enum PropertyKeys { - dir, escape, lang, role, style, styleClass, title,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the escape property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that characters that are sensitive in HTML and XML markup must be escaped. This flag is set - * to "true" by default. - */ - public boolean isEscape() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.escape, true); - - } - - /** - *

      - * Set the value of the escape property. - *

      - * - * @param escape the new property value - */ - public void setEscape(boolean escape) { - getStateHelper().put(PropertyKeys.escape, escape); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlOutputLabel.java b/impl/src/main/java/jakarta/faces/component/html/HtmlOutputLabel.java deleted file mode 100644 index 62fd088880..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlOutputLabel.java +++ /dev/null @@ -1,676 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UIOutput; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents an HTML label element, used to define an accessible label for a corresponding input element. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Label". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlOutputLabel extends UIOutput implements ClientBehaviorHolder { - - public HtmlOutputLabel() { - super(); - setRendererType("jakarta.faces.Label"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlOutputLabel"; - - /** - * The property keys. - */ - protected enum PropertyKeys { - accesskey, dir, escape, forVal("for"), lang, onblur, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, - onmouseover, onmouseup, role, style, styleClass, tabindex, title,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accesskey property. - *

      - * - * @return the property value - *

      - * Contents: Access key that, when pressed, transfers focus to this element. - */ - public java.lang.String getAccesskey() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accesskey); - - } - - /** - *

      - * Set the value of the accesskey property. - *

      - * - * @param accesskey the new property value - */ - public void setAccesskey(java.lang.String accesskey) { - getStateHelper().put(PropertyKeys.accesskey, accesskey); - handleAttribute(this, "accesskey", accesskey); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the escape property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that characters that are sensitive in HTML and XML markup must be escaped. If omitted, this - * flag is assumed to be "true". - */ - public boolean isEscape() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.escape, true); - - } - - /** - *

      - * Set the value of the escape property. - *

      - * - * @param escape the new property value - */ - public void setEscape(boolean escape) { - getStateHelper().put(PropertyKeys.escape, escape); - } - - /** - *

      - * Return the value of the for property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Search expression to the component for which this element is a label. - *

      - */ - public java.lang.String getFor() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.forVal); - - } - - /** - *

      - * Set the value of the for property. - *

      - * - * @param _for the new property value - */ - public void setFor(java.lang.String _for) { - getStateHelper().put(PropertyKeys.forVal, _for); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the onblur property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus. - */ - public java.lang.String getOnblur() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onblur); - - } - - /** - *

      - * Set the value of the onblur property. - *

      - * - * @param onblur the new property value - */ - public void setOnblur(java.lang.String onblur) { - getStateHelper().put(PropertyKeys.onblur, onblur); - handleAttribute(this, "onblur", onblur); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onfocus property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element receives focus. - */ - public java.lang.String getOnfocus() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onfocus); - - } - - /** - *

      - * Set the value of the onfocus property. - *

      - * - * @param onfocus the new property value - */ - public void setOnfocus(java.lang.String onfocus) { - getStateHelper().put(PropertyKeys.onfocus, onfocus); - handleAttribute(this, "onfocus", onfocus); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the tabindex property. - *

      - * - * @return the property value - *

      - * Contents: Position of this element in the tabbing order for the current document. This value must be an integer - * between 0 and 32767. - */ - public java.lang.String getTabindex() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.tabindex); - - } - - /** - *

      - * Set the value of the tabindex property. - *

      - * - * @param tabindex the new property value - */ - public void setTabindex(java.lang.String tabindex) { - getStateHelper().put(PropertyKeys.tabindex, tabindex); - handleAttribute(this, "tabindex", tabindex); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection( - Arrays.asList("blur", "click", "dblclick", "focus", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return null; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlOutputLink.java b/impl/src/main/java/jakarta/faces/component/html/HtmlOutputLink.java deleted file mode 100644 index 0034ef3a9a..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlOutputLink.java +++ /dev/null @@ -1,885 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UIOutput; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents an HTML a (hyperlink) element that may be used to link to an arbitrary URL defined by the - * value property. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Link". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlOutputLink extends UIOutput implements ClientBehaviorHolder { - - public HtmlOutputLink() { - super(); - setRendererType("jakarta.faces.Link"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlOutputLink"; - - /** - * The property keys. - */ - protected enum PropertyKeys { - accesskey, charset, coords, dir, disabled, fragment, hreflang, lang, onblur, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, - onmousemove, onmouseout, onmouseover, onmouseup, rel, rev, role, shape, style, styleClass, tabindex, target, title, type,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accesskey property. - *

      - * - * @return the property value - *

      - * Contents: Access key that, when pressed, transfers focus to this element. - */ - public java.lang.String getAccesskey() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accesskey); - - } - - /** - *

      - * Set the value of the accesskey property. - *

      - * - * @param accesskey the new property value - */ - public void setAccesskey(java.lang.String accesskey) { - getStateHelper().put(PropertyKeys.accesskey, accesskey); - handleAttribute(this, "accesskey", accesskey); - } - - /** - *

      - * Return the value of the charset property. - *

      - * - * @return the property value - *

      - * Contents: The character encoding of the resource designated by this hyperlink. - */ - public java.lang.String getCharset() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.charset); - - } - - /** - *

      - * Set the value of the charset property. - *

      - * - * @param charset the new property value - */ - public void setCharset(java.lang.String charset) { - getStateHelper().put(PropertyKeys.charset, charset); - handleAttribute(this, "charset", charset); - } - - /** - *

      - * Return the value of the coords property. - *

      - * - * @return the property value - *

      - * Contents: The position and shape of the hot spot on the screen (for use in client-side image maps). - */ - public java.lang.String getCoords() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.coords); - - } - - /** - *

      - * Set the value of the coords property. - *

      - * - * @param coords the new property value - */ - public void setCoords(java.lang.String coords) { - getStateHelper().put(PropertyKeys.coords, coords); - handleAttribute(this, "coords", coords); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the disabled property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this element must never receive focus or be included in a subsequent submit. - */ - public boolean isDisabled() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - - } - - /** - *

      - * Set the value of the disabled property. - *

      - * - * @param disabled the new property value - */ - public void setDisabled(boolean disabled) { - getStateHelper().put(PropertyKeys.disabled, disabled); - } - - /** - *

      - * Return the value of the fragment property. - *

      - * - * @return the property value - *

      - * Contents: The identifier of the page fragment which should be brought into focus when the target page is rendered. - * The value of this attribute is appended to the end of target URL following a hash (#) mark. This notation is part of - * the standard URL syntax. - */ - public java.lang.String getFragment() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.fragment); - - } - - /** - *

      - * Set the value of the fragment property. - *

      - * - * @param fragment the new property value - */ - public void setFragment(java.lang.String fragment) { - getStateHelper().put(PropertyKeys.fragment, fragment); - } - - /** - *

      - * Return the value of the hreflang property. - *

      - * - * @return the property value - *

      - * Contents: The language code of the resource designated by this hyperlink. - */ - public java.lang.String getHreflang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.hreflang); - - } - - /** - *

      - * Set the value of the hreflang property. - *

      - * - * @param hreflang the new property value - */ - public void setHreflang(java.lang.String hreflang) { - getStateHelper().put(PropertyKeys.hreflang, hreflang); - handleAttribute(this, "hreflang", hreflang); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the onblur property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus. - */ - public java.lang.String getOnblur() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onblur); - - } - - /** - *

      - * Set the value of the onblur property. - *

      - * - * @param onblur the new property value - */ - public void setOnblur(java.lang.String onblur) { - getStateHelper().put(PropertyKeys.onblur, onblur); - handleAttribute(this, "onblur", onblur); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onfocus property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element receives focus. - */ - public java.lang.String getOnfocus() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onfocus); - - } - - /** - *

      - * Set the value of the onfocus property. - *

      - * - * @param onfocus the new property value - */ - public void setOnfocus(java.lang.String onfocus) { - getStateHelper().put(PropertyKeys.onfocus, onfocus); - handleAttribute(this, "onfocus", onfocus); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the rel property. - *

      - * - * @return the property value - *

      - * Contents: The relationship from the current document to the anchor specified by this hyperlink. The value of this - * attribute is a space-separated list of link types. - */ - public java.lang.String getRel() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.rel); - - } - - /** - *

      - * Set the value of the rel property. - *

      - * - * @param rel the new property value - */ - public void setRel(java.lang.String rel) { - getStateHelper().put(PropertyKeys.rel, rel); - handleAttribute(this, "rel", rel); - } - - /** - *

      - * Return the value of the rev property. - *

      - * - * @return the property value - *

      - * Contents: A reverse link from the anchor specified by this hyperlink to the current document. The value of this - * attribute is a space-separated list of link types. - */ - public java.lang.String getRev() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.rev); - - } - - /** - *

      - * Set the value of the rev property. - *

      - * - * @param rev the new property value - */ - public void setRev(java.lang.String rev) { - getStateHelper().put(PropertyKeys.rev, rev); - handleAttribute(this, "rev", rev); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the shape property. - *

      - * - * @return the property value - *

      - * Contents: The shape of the hot spot on the screen (for use in client-side image maps). Valid values are: default - * (entire region); rect (rectangular region); circle (circular region); and poly (polygonal region). - */ - public java.lang.String getShape() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.shape); - - } - - /** - *

      - * Set the value of the shape property. - *

      - * - * @param shape the new property value - */ - public void setShape(java.lang.String shape) { - getStateHelper().put(PropertyKeys.shape, shape); - handleAttribute(this, "shape", shape); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the tabindex property. - *

      - * - * @return the property value - *

      - * Contents: Position of this element in the tabbing order for the current document. This value must be an integer - * between 0 and 32767. - */ - public java.lang.String getTabindex() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.tabindex); - - } - - /** - *

      - * Set the value of the tabindex property. - *

      - * - * @param tabindex the new property value - */ - public void setTabindex(java.lang.String tabindex) { - getStateHelper().put(PropertyKeys.tabindex, tabindex); - handleAttribute(this, "tabindex", tabindex); - } - - /** - *

      - * Return the value of the target property. - *

      - * - * @return the property value - *

      - * Contents: Name of a frame where the resource retrieved via this hyperlink is to be displayed. - */ - public java.lang.String getTarget() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.target); - - } - - /** - *

      - * Set the value of the target property. - *

      - * - * @param target the new property value - */ - public void setTarget(java.lang.String target) { - getStateHelper().put(PropertyKeys.target, target); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - /** - *

      - * Return the value of the type property. - *

      - * - * @return the property value - *

      - * Contents: The content type of the resource designated by this hyperlink. - */ - public java.lang.String getType() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.type); - - } - - /** - *

      - * Set the value of the type property. - *

      - * - * @param type the new property value - */ - public void setType(java.lang.String type) { - getStateHelper().put(PropertyKeys.type, type); - handleAttribute(this, "type", type); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList("blur", "click", "action", "dblclick", "focus", - "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return "action"; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlOutputText.java b/impl/src/main/java/jakarta/faces/component/html/HtmlOutputText.java deleted file mode 100644 index 453a9dba81..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlOutputText.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import jakarta.faces.component.UIOutput; - -/** - *

      - * Renders the component value as text, optionally wrapping in a span element if I18N attributes, CSS - * styles or style classes are specified. - *

      - *

      - * If you are using h:outputText (or an equivalent inline EL expression) within a script or style block the value is NOT - * escaped by default. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Text". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlOutputText extends UIOutput { - - public HtmlOutputText() { - super(); - setRendererType("jakarta.faces.Text"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlOutputText"; - - /** - * The property keys. - */ - protected enum PropertyKeys { - dir, escape, lang, role, style, styleClass, title,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the escape property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that characters that are sensitive in HTML and XML markup must be escaped. This flag is set - * to "true" by default. - */ - public boolean isEscape() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.escape, true); - - } - - /** - *

      - * Set the value of the escape property. - *

      - * - * @param escape the new property value - */ - public void setEscape(boolean escape) { - getStateHelper().put(PropertyKeys.escape, escape); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlPanelGrid.java b/impl/src/main/java/jakarta/faces/component/html/HtmlPanelGrid.java deleted file mode 100644 index 59692f8d80..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlPanelGrid.java +++ /dev/null @@ -1,975 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UIPanel; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Renders child components in a table, starting a new row after the specified number of columns. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Grid". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlPanelGrid extends UIPanel implements ClientBehaviorHolder { - - public HtmlPanelGrid() { - super(); - setRendererType("jakarta.faces.Grid"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlPanelGrid"; - - /** - * Properties used by this component - * - */ - protected enum PropertyKeys { - bgcolor, bodyrows, border, captionClass, captionStyle, cellpadding, cellspacing, columnClasses, columns, dir, footerClass, frame, headerClass, lang, - onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, role, rowClass, rowClasses, rules, - style, styleClass, summary, title, width,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the bgcolor property. - *

      - * - * @return the property value - *

      - * Contents: Name or code of the background color for this table. - */ - public java.lang.String getBgcolor() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.bgcolor); - - } - - /** - *

      - * Set the value of the bgcolor property. - *

      - * - * @param bgcolor the new property value - */ - public void setBgcolor(java.lang.String bgcolor) { - getStateHelper().put(PropertyKeys.bgcolor, bgcolor); - handleAttribute(this, "bgcolor", bgcolor); - } - - /** - *

      - * Return the value of the bodyrows property. - *

      - * - * @return the property value - *

      - * Contents: Comma separated list of row indices for which a new "tbody" element should be started (and any previously - * opened one should be ended). - */ - public java.lang.String getBodyrows() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.bodyrows); - - } - - /** - *

      - * Set the value of the bodyrows property. - *

      - * - * @param bodyrows the new property value - */ - public void setBodyrows(java.lang.String bodyrows) { - getStateHelper().put(PropertyKeys.bodyrows, bodyrows); - } - - /** - *

      - * Return the value of the border property. - *

      - * - * @return the property value - *

      - * Contents: Width (in pixels) of the border to be drawn around this table. - */ - public int getBorder() { - return (java.lang.Integer) getStateHelper().eval(PropertyKeys.border, Integer.MIN_VALUE); - - } - - /** - *

      - * Set the value of the border property. - *

      - * - * @param border the new property value - */ - public void setBorder(int border) { - getStateHelper().put(PropertyKeys.border, border); - handleAttribute(this, "border", border); - } - - /** - *

      - * Return the value of the captionClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) that will be applied to any caption generated for this table. - */ - public java.lang.String getCaptionClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.captionClass); - - } - - /** - *

      - * Set the value of the captionClass property. - *

      - * - * @param captionClass the new property value - */ - public void setCaptionClass(java.lang.String captionClass) { - getStateHelper().put(PropertyKeys.captionClass, captionClass); - } - - /** - *

      - * Return the value of the captionStyle property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this caption is rendered. - */ - public java.lang.String getCaptionStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.captionStyle); - - } - - /** - *

      - * Set the value of the captionStyle property. - *

      - * - * @param captionStyle the new property value - */ - public void setCaptionStyle(java.lang.String captionStyle) { - getStateHelper().put(PropertyKeys.captionStyle, captionStyle); - } - - /** - *

      - * Return the value of the cellpadding property. - *

      - * - * @return the property value - *

      - * Contents: Definition of how much space the user agent should leave between the border of each cell and its contents. - */ - public java.lang.String getCellpadding() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.cellpadding); - - } - - /** - *

      - * Set the value of the cellpadding property. - *

      - * - * @param cellpadding the new property value - */ - public void setCellpadding(java.lang.String cellpadding) { - getStateHelper().put(PropertyKeys.cellpadding, cellpadding); - handleAttribute(this, "cellpadding", cellpadding); - } - - /** - *

      - * Return the value of the cellspacing property. - *

      - * - * @return the property value - *

      - * Contents: Definition of how much space the user agent should leave between the left side of the table and the - * leftmost column, the top of the table and the top of the top side of the topmost row, and so on for the right and - * bottom of the table. It also specifies the amount of space to leave between cells. - */ - public java.lang.String getCellspacing() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.cellspacing); - - } - - /** - *

      - * Set the value of the cellspacing property. - *

      - * - * @param cellspacing the new property value - */ - public void setCellspacing(java.lang.String cellspacing) { - getStateHelper().put(PropertyKeys.cellspacing, cellspacing); - handleAttribute(this, "cellspacing", cellspacing); - } - - /** - *

      - * Return the value of the columnClasses property. - *

      - * - * @return the property value - *

      - * Contents: Comma-delimited list of CSS style classes that will be applied to the columns of this table. A space - * separated list of classes may also be specified for any individual column. If the number of elements in this list is - * less than the number of actual column children of the UIData, no "class" attribute is output for each column greater - * than the number of elements in the list. If the number of elements in the list is greater than the number of actual - * column children of the UIData, the elements at the posisiton in the list after the last column are ignored. - */ - public java.lang.String getColumnClasses() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.columnClasses); - - } - - /** - *

      - * Set the value of the columnClasses property. - *

      - * - * @param columnClasses the new property value - */ - public void setColumnClasses(java.lang.String columnClasses) { - getStateHelper().put(PropertyKeys.columnClasses, columnClasses); - } - - /** - *

      - * Return the value of the columns property. - *

      - * - * @return the property value - *

      - * Contents: The number of columns to render before starting a new row. - */ - public int getColumns() { - return (java.lang.Integer) getStateHelper().eval(PropertyKeys.columns, Integer.MIN_VALUE); - - } - - /** - *

      - * Set the value of the columns property. - *

      - * - * @param columns the new property value - */ - public void setColumns(int columns) { - getStateHelper().put(PropertyKeys.columns, columns); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the footerClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) that will be applied to any footer generated for this table. - */ - public java.lang.String getFooterClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.footerClass); - - } - - /** - *

      - * Set the value of the footerClass property. - *

      - * - * @param footerClass the new property value - */ - public void setFooterClass(java.lang.String footerClass) { - getStateHelper().put(PropertyKeys.footerClass, footerClass); - } - - /** - *

      - * Return the value of the frame property. - *

      - * - * @return the property value - *

      - * Contents: Code specifying which sides of the frame surrounding this table will be visible. Valid values are: none (no - * sides, default value); above (top side only); below (bottom side only); hsides (top and bottom sides only); vsides - * (right and left sides only); lhs (left hand side only); rhs (right hand side only); box (all four sides); and border - * (all four sides). - */ - public java.lang.String getFrame() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.frame); - - } - - /** - *

      - * Set the value of the frame property. - *

      - * - * @param frame the new property value - */ - public void setFrame(java.lang.String frame) { - getStateHelper().put(PropertyKeys.frame, frame); - handleAttribute(this, "frame", frame); - } - - /** - *

      - * Return the value of the headerClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) that will be applied to any header generated for this table. - */ - public java.lang.String getHeaderClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.headerClass); - - } - - /** - *

      - * Set the value of the headerClass property. - *

      - * - * @param headerClass the new property value - */ - public void setHeaderClass(java.lang.String headerClass) { - getStateHelper().put(PropertyKeys.headerClass, headerClass); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the rowClass property. - *

      - * - * @return the property value - *

      - * Contents:

      - * - *

      - * Assigns one or more space-separated CSS class names to each "tr" - *

      - * - *
      - */ - public java.lang.String getRowClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.rowClass); - - } - - /** - *

      - * Set the value of the rowClass property. - *

      - * - * @param rowClass the new property value - */ - public void setRowClass(java.lang.String rowClass) { - getStateHelper().put(PropertyKeys.rowClass, rowClass); - } - - /** - *

      - * Return the value of the rowClasses property. - *

      - * - * @return the property value - *

      - * Contents: Comma-delimited list of CSS style classes that will be applied to the rows of this table. A space separated - * list of classes may also be specified for any individual row. Thes styles are applied, in turn, to each row in the - * table. For example, if the list has two elements, the first style class in the list is applied to the first row, the - * second to the second row, the first to the third row, the second to the fourth row, etc. In other words, we keep - * iterating through the list until we reach the end, and then we start at the beginning again. - */ - public java.lang.String getRowClasses() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.rowClasses); - - } - - /** - *

      - * Set the value of the rowClasses property. - *

      - * - * @param rowClasses the new property value - */ - public void setRowClasses(java.lang.String rowClasses) { - getStateHelper().put(PropertyKeys.rowClasses, rowClasses); - } - - /** - *

      - * Return the value of the rules property. - *

      - * - * @return the property value - *

      - * Contents: Code specifying which rules will appear between cells within this table. Valid values are: none (no rules, - * default value); groups (between row groups); rows (between rows only); cols (between columns only); and all (between - * all rows and columns). - */ - public java.lang.String getRules() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.rules); - - } - - /** - *

      - * Set the value of the rules property. - *

      - * - * @param rules the new property value - */ - public void setRules(java.lang.String rules) { - getStateHelper().put(PropertyKeys.rules, rules); - handleAttribute(this, "rules", rules); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the summary property. - *

      - * - * @return the property value - *

      - * Contents: Summary of this table's purpose and structure, for user agents rendering to non-visual media such as speech - * and Braille. - */ - public java.lang.String getSummary() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.summary); - - } - - /** - *

      - * Set the value of the summary property. - *

      - * - * @param summary the new property value - */ - public void setSummary(java.lang.String summary) { - getStateHelper().put(PropertyKeys.summary, summary); - handleAttribute(this, "summary", summary); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - /** - *

      - * Return the value of the width property. - *

      - * - * @return the property value - *

      - * Contents: Width of the entire table, for visual user agents. - */ - public java.lang.String getWidth() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.width); - - } - - /** - *

      - * Set the value of the width property. - *

      - * - * @param width the new property value - */ - public void setWidth(java.lang.String width) { - getStateHelper().put(PropertyKeys.width, width); - handleAttribute(this, "width", width); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection( - Arrays.asList("click", "dblclick", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return null; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlPanelGroup.java b/impl/src/main/java/jakarta/faces/component/html/HtmlPanelGroup.java deleted file mode 100644 index 2213639b5d..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlPanelGroup.java +++ /dev/null @@ -1,426 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UIPanel; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Causes all child components of this component to be rendered. This is useful in scenarios where a parent component is - * expecting a single component to be present, but the application wishes to render more than one. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Group". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlPanelGroup extends UIPanel implements ClientBehaviorHolder { - - public HtmlPanelGroup() { - super(); - setRendererType("jakarta.faces.Group"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlPanelGroup"; - - /** - * Properties used by this component - * - */ - protected enum PropertyKeys { - layout, onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, style, styleClass,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the layout property. - *

      - * - * @return the property value - *

      - * Contents: The type of layout markup to use when rendering this group. If the value is "block" the renderer must - * produce an HTML "div" element. Otherwise HTML "span" element must be produced. - */ - public java.lang.String getLayout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.layout); - - } - - /** - *

      - * Set the value of the layout property. - *

      - * - * @param layout the new property value - */ - public void setLayout(java.lang.String layout) { - getStateHelper().put(PropertyKeys.layout, layout); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" property on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection( - Arrays.asList("click", "dblclick", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return null; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlSelectBooleanCheckbox.java b/impl/src/main/java/jakarta/faces/component/html/HtmlSelectBooleanCheckbox.java deleted file mode 100644 index f1643c8bfe..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlSelectBooleanCheckbox.java +++ /dev/null @@ -1,754 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UISelectBoolean; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents an HTML input element of type - * checkbox. The checkbox will be rendered as checked, or not, based on the value of the value - * property. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Checkbox". This value - * can be changed by calling the setRendererType() method. - *

      - */ -public class HtmlSelectBooleanCheckbox extends UISelectBoolean implements ClientBehaviorHolder { - - public HtmlSelectBooleanCheckbox() { - super(); - setRendererType("jakarta.faces.Checkbox"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlSelectBooleanCheckbox"; - - /** - * The property keys. - */ - protected enum PropertyKeys { - accesskey, dir, disabled, label, lang, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, - onmouseout, onmouseover, onmouseup, onselect, readonly, role, style, styleClass, tabindex, title,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accesskey property. - *

      - * - * @return the property value - *

      - * Contents: Access key that, when pressed, transfers focus to this element. - */ - public java.lang.String getAccesskey() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accesskey); - - } - - /** - *

      - * Set the value of the accesskey property. - *

      - * - * @param accesskey the new property value - */ - public void setAccesskey(java.lang.String accesskey) { - getStateHelper().put(PropertyKeys.accesskey, accesskey); - handleAttribute(this, "accesskey", accesskey); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the disabled property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this element must never receive focus or be included in a subsequent submit. A value - * of false causes no attribute to be rendered, while a value of true causes the attribute to be rendered as - * disabled="disabled". - */ - public boolean isDisabled() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - - } - - /** - *

      - * Set the value of the disabled property. - *

      - * - * @param disabled the new property value - */ - public void setDisabled(boolean disabled) { - getStateHelper().put(PropertyKeys.disabled, disabled); - } - - /** - *

      - * Return the value of the label property. - *

      - * - * @return the property value - *

      - * Contents: A localized user presentable name for this component. - */ - public java.lang.String getLabel() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.label); - - } - - /** - *

      - * Set the value of the label property. - *

      - * - * @param label the new property value - */ - public void setLabel(java.lang.String label) { - getStateHelper().put(PropertyKeys.label, label); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the onblur property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus. - */ - public java.lang.String getOnblur() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onblur); - - } - - /** - *

      - * Set the value of the onblur property. - *

      - * - * @param onblur the new property value - */ - public void setOnblur(java.lang.String onblur) { - getStateHelper().put(PropertyKeys.onblur, onblur); - handleAttribute(this, "onblur", onblur); - } - - /** - *

      - * Return the value of the onchange property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus and its value has been modified since gaining focus. - */ - public java.lang.String getOnchange() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onchange); - - } - - /** - *

      - * Set the value of the onchange property. - *

      - * - * @param onchange the new property value - */ - public void setOnchange(java.lang.String onchange) { - getStateHelper().put(PropertyKeys.onchange, onchange); - handleAttribute(this, "onchange", onchange); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onfocus property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element receives focus. - */ - public java.lang.String getOnfocus() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onfocus); - - } - - /** - *

      - * Set the value of the onfocus property. - *

      - * - * @param onfocus the new property value - */ - public void setOnfocus(java.lang.String onfocus) { - getStateHelper().put(PropertyKeys.onfocus, onfocus); - handleAttribute(this, "onfocus", onfocus); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the onselect property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when text within this element is selected by the user. - */ - public java.lang.String getOnselect() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onselect); - - } - - /** - *

      - * Set the value of the onselect property. - *

      - * - * @param onselect the new property value - */ - public void setOnselect(java.lang.String onselect) { - getStateHelper().put(PropertyKeys.onselect, onselect); - handleAttribute(this, "onselect", onselect); - } - - /** - *

      - * Return the value of the readonly property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this component will prohibit changes by the user. The element may receive focus unless - * it has also been disabled. A value of false causes no attribute to be rendered, while a value of true causes the - * attribute to be rendered as readonly="readonly". - */ - public boolean isReadonly() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.readonly, false); - - } - - /** - *

      - * Set the value of the readonly property. - *

      - * - * @param readonly the new property value - */ - public void setReadonly(boolean readonly) { - getStateHelper().put(PropertyKeys.readonly, readonly); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the tabindex property. - *

      - * - * @return the property value - *

      - * Contents: Position of this element in the tabbing order for the current document. This value must be an integer - * between 0 and 32767. - */ - public java.lang.String getTabindex() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.tabindex); - - } - - /** - *

      - * Set the value of the tabindex property. - *

      - * - * @param tabindex the new property value - */ - public void setTabindex(java.lang.String tabindex) { - getStateHelper().put(PropertyKeys.tabindex, tabindex); - handleAttribute(this, "tabindex", tabindex); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList("blur", "change", "click", "valueChange", "dblclick", - "focus", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "select")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return "valueChange"; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlSelectManyCheckbox.java b/impl/src/main/java/jakarta/faces/component/html/HtmlSelectManyCheckbox.java deleted file mode 100644 index 45cab1c88d..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlSelectManyCheckbox.java +++ /dev/null @@ -1,908 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UISelectMany; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents a multiple-selection component that is rendered as a set - * of HTML input elements of type checkbox. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Checkbox". This value - * can be changed by calling the setRendererType() method. - *

      - */ -public class HtmlSelectManyCheckbox extends UISelectMany implements ClientBehaviorHolder { - - public HtmlSelectManyCheckbox() { - super(); - setRendererType("jakarta.faces.Checkbox"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlSelectManyCheckbox"; - - /** - * Properties used by this component - * - */ - protected enum PropertyKeys { - accesskey, border, dir, disabled, disabledClass, enabledClass, label, lang, layout, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, - onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, readonly, role, selectedClass, style, styleClass, tabindex, - title, unselectedClass,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accesskey property. - *

      - * - * @return the property value - *

      - * Contents: Access key that, when pressed, transfers focus to this element. - */ - public java.lang.String getAccesskey() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accesskey); - - } - - /** - *

      - * Set the value of the accesskey property. - *

      - * - * @param accesskey the new property value - */ - public void setAccesskey(java.lang.String accesskey) { - getStateHelper().put(PropertyKeys.accesskey, accesskey); - handleAttribute(this, "accesskey", accesskey); - } - - /** - *

      - * Return the value of the border property. - *

      - * - * @return the property value - *

      - * Contents: Width (in pixels) of the border to be drawn around the table containing the options list. - */ - public int getBorder() { - return (java.lang.Integer) getStateHelper().eval(PropertyKeys.border, Integer.MIN_VALUE); - - } - - /** - *

      - * Set the value of the border property. - *

      - * - * @param border the new property value - */ - public void setBorder(int border) { - getStateHelper().put(PropertyKeys.border, border); - handleAttribute(this, "border", border); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the disabled property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this element must never receive focus or be included in a subsequent submit. A value - * of false causes no attribute to be rendered, while a value of true causes the attribute to be rendered as - * disabled="disabled". - */ - public boolean isDisabled() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - - } - - /** - *

      - * Set the value of the disabled property. - *

      - * - * @param disabled the new property value - */ - public void setDisabled(boolean disabled) { - getStateHelper().put(PropertyKeys.disabled, disabled); - } - - /** - *

      - * Return the value of the disabledClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to the rendered label on disabled options. - */ - public java.lang.String getDisabledClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.disabledClass); - - } - - /** - *

      - * Set the value of the disabledClass property. - *

      - * - * @param disabledClass the new property value - */ - public void setDisabledClass(java.lang.String disabledClass) { - getStateHelper().put(PropertyKeys.disabledClass, disabledClass); - } - - /** - *

      - * Return the value of the enabledClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to the rendered label on enabled options. - */ - public java.lang.String getEnabledClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.enabledClass); - - } - - /** - *

      - * Set the value of the enabledClass property. - *

      - * - * @param enabledClass the new property value - */ - public void setEnabledClass(java.lang.String enabledClass) { - getStateHelper().put(PropertyKeys.enabledClass, enabledClass); - } - - /** - *

      - * Return the value of the label property. - *

      - * - * @return the property value - *

      - * Contents: A localized user presentable name for this component. - */ - public java.lang.String getLabel() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.label); - - } - - /** - *

      - * Set the value of the label property. - *

      - * - * @param label the new property value - */ - public void setLabel(java.lang.String label) { - getStateHelper().put(PropertyKeys.label, label); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the layout property. - *

      - * - * @return the property value - *

      - * Contents: Orientation of the options list to be created. Valid values are "pageDirection" (list is laid out - * vertically), or "lineDirection" (list is laid out horizontally), or "list" (list is laid out in list format). - * If not specified, the default value is "lineDirection". - */ - public java.lang.String getLayout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.layout); - - } - - /** - *

      - * Set the value of the layout property. - *

      - * - * @param layout the new property value - */ - public void setLayout(java.lang.String layout) { - getStateHelper().put(PropertyKeys.layout, layout); - } - - /** - *

      - * Return the value of the onblur property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus. - */ - public java.lang.String getOnblur() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onblur); - - } - - /** - *

      - * Set the value of the onblur property. - *

      - * - * @param onblur the new property value - */ - public void setOnblur(java.lang.String onblur) { - getStateHelper().put(PropertyKeys.onblur, onblur); - handleAttribute(this, "onblur", onblur); - } - - /** - *

      - * Return the value of the onchange property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus and its value has been modified since gaining focus. - */ - public java.lang.String getOnchange() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onchange); - - } - - /** - *

      - * Set the value of the onchange property. - *

      - * - * @param onchange the new property value - */ - public void setOnchange(java.lang.String onchange) { - getStateHelper().put(PropertyKeys.onchange, onchange); - handleAttribute(this, "onchange", onchange); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onfocus property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element receives focus. - */ - public java.lang.String getOnfocus() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onfocus); - - } - - /** - *

      - * Set the value of the onfocus property. - *

      - * - * @param onfocus the new property value - */ - public void setOnfocus(java.lang.String onfocus) { - getStateHelper().put(PropertyKeys.onfocus, onfocus); - handleAttribute(this, "onfocus", onfocus); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the onselect property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when text within this element is selected by the user. - */ - public java.lang.String getOnselect() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onselect); - - } - - /** - *

      - * Set the value of the onselect property. - *

      - * - * @param onselect the new property value - */ - public void setOnselect(java.lang.String onselect) { - getStateHelper().put(PropertyKeys.onselect, onselect); - handleAttribute(this, "onselect", onselect); - } - - /** - *

      - * Return the value of the readonly property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this component will prohibit changes by the user. The element may receive focus unless - * it has also been disabled. A value of false causes no attribute to be rendered, while a value of true causes the - * attribute to be rendered as readonly="readonly". - */ - public boolean isReadonly() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.readonly, false); - - } - - /** - *

      - * Set the value of the readonly property. - *

      - * - * @param readonly the new property value - */ - public void setReadonly(boolean readonly) { - getStateHelper().put(PropertyKeys.readonly, readonly); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the selectedClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to the rendered label on selected options. - */ - public java.lang.String getSelectedClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.selectedClass); - - } - - /** - *

      - * Set the value of the selectedClass property. - *

      - * - * @param selectedClass the new property value - */ - public void setSelectedClass(java.lang.String selectedClass) { - getStateHelper().put(PropertyKeys.selectedClass, selectedClass); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the tabindex property. - *

      - * - * @return the property value - *

      - * Contents: Position of this element in the tabbing order for the current document. This value must be an integer - * between 0 and 32767. - */ - public java.lang.String getTabindex() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.tabindex); - - } - - /** - *

      - * Set the value of the tabindex property. - *

      - * - * @param tabindex the new property value - */ - public void setTabindex(java.lang.String tabindex) { - getStateHelper().put(PropertyKeys.tabindex, tabindex); - handleAttribute(this, "tabindex", tabindex); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - /** - *

      - * Return the value of the unselectedClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to the rendered label on unselected options. - */ - public java.lang.String getUnselectedClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.unselectedClass); - - } - - /** - *

      - * Set the value of the unselectedClass property. - *

      - * - * @param unselectedClass the new property value - */ - public void setUnselectedClass(java.lang.String unselectedClass) { - getStateHelper().put(PropertyKeys.unselectedClass, unselectedClass); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList("blur", "change", "click", "valueChange", "dblclick", - "focus", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "select")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return "valueChange"; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlSelectManyListbox.java b/impl/src/main/java/jakarta/faces/component/html/HtmlSelectManyListbox.java deleted file mode 100644 index d3b6e57a0c..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlSelectManyListbox.java +++ /dev/null @@ -1,803 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UISelectMany; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents a multiple-selection component that is rendered as an HTML select element, showing either all - * available options or the specified number of options. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Listbox". This value - * can be changed by calling the setRendererType() method. - *

      - */ -public class HtmlSelectManyListbox extends UISelectMany implements ClientBehaviorHolder { - - public HtmlSelectManyListbox() { - super(); - setRendererType("jakarta.faces.Listbox"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlSelectManyListbox"; - - /** - * Properties used by this component - * - */ - protected enum PropertyKeys { - accesskey, dir, disabled, disabledClass, enabledClass, label, lang, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, - onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, readonly, role, size, style, styleClass, tabindex, title,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accesskey property. - *

      - * - * @return the property value - *

      - * Contents: Access key that, when pressed, transfers focus to this element. - */ - public java.lang.String getAccesskey() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accesskey); - - } - - /** - *

      - * Set the value of the accesskey property. - *

      - * - * @param accesskey the new property value - */ - public void setAccesskey(java.lang.String accesskey) { - getStateHelper().put(PropertyKeys.accesskey, accesskey); - handleAttribute(this, "accesskey", accesskey); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the disabled property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this element must never receive focus or be included in a subsequent submit. A value - * of false causes no attribute to be rendered, while a value of true causes the attribute to be rendered as - * disabled="disabled". - */ - public boolean isDisabled() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - - } - - /** - *

      - * Set the value of the disabled property. - *

      - * - * @param disabled the new property value - */ - public void setDisabled(boolean disabled) { - getStateHelper().put(PropertyKeys.disabled, disabled); - } - - /** - *

      - * Return the value of the disabledClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to the rendered label on disabled options. - */ - public java.lang.String getDisabledClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.disabledClass); - - } - - /** - *

      - * Set the value of the disabledClass property. - *

      - * - * @param disabledClass the new property value - */ - public void setDisabledClass(java.lang.String disabledClass) { - getStateHelper().put(PropertyKeys.disabledClass, disabledClass); - } - - /** - *

      - * Return the value of the enabledClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to the rendered label on enabled options. - */ - public java.lang.String getEnabledClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.enabledClass); - - } - - /** - *

      - * Set the value of the enabledClass property. - *

      - * - * @param enabledClass the new property value - */ - public void setEnabledClass(java.lang.String enabledClass) { - getStateHelper().put(PropertyKeys.enabledClass, enabledClass); - } - - /** - *

      - * Return the value of the label property. - *

      - * - * @return the property value - *

      - * Contents: A localized user presentable name for this component. - */ - public java.lang.String getLabel() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.label); - - } - - /** - *

      - * Set the value of the label property. - *

      - * - * @param label the new property value - */ - public void setLabel(java.lang.String label) { - getStateHelper().put(PropertyKeys.label, label); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the onblur property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus. - */ - public java.lang.String getOnblur() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onblur); - - } - - /** - *

      - * Set the value of the onblur property. - *

      - * - * @param onblur the new property value - */ - public void setOnblur(java.lang.String onblur) { - getStateHelper().put(PropertyKeys.onblur, onblur); - handleAttribute(this, "onblur", onblur); - } - - /** - *

      - * Return the value of the onchange property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus and its value has been modified since gaining focus. - */ - public java.lang.String getOnchange() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onchange); - - } - - /** - *

      - * Set the value of the onchange property. - *

      - * - * @param onchange the new property value - */ - public void setOnchange(java.lang.String onchange) { - getStateHelper().put(PropertyKeys.onchange, onchange); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onfocus property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element receives focus. - */ - public java.lang.String getOnfocus() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onfocus); - - } - - /** - *

      - * Set the value of the onfocus property. - *

      - * - * @param onfocus the new property value - */ - public void setOnfocus(java.lang.String onfocus) { - getStateHelper().put(PropertyKeys.onfocus, onfocus); - handleAttribute(this, "onfocus", onfocus); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the readonly property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this component will prohibit changes by the user. The element may receive focus unless - * it has also been disabled. A value of false causes no attribute to be rendered, while a value of true causes the - * attribute to be rendered as readonly="readonly". - */ - public boolean isReadonly() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.readonly, false); - - } - - /** - *

      - * Set the value of the readonly property. - *

      - * - * @param readonly the new property value - */ - public void setReadonly(boolean readonly) { - getStateHelper().put(PropertyKeys.readonly, readonly); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the size property. - *

      - * - * @return the property value - *

      - * Contents: Number of available options to be shown at all times. If not specified, all available options are shown. - */ - public int getSize() { - return (java.lang.Integer) getStateHelper().eval(PropertyKeys.size, Integer.MIN_VALUE); - - } - - /** - *

      - * Set the value of the size property. - *

      - * - * @param size the new property value - */ - public void setSize(int size) { - getStateHelper().put(PropertyKeys.size, size); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the tabindex property. - *

      - * - * @return the property value - *

      - * Contents: Position of this element in the tabbing order for the current document. This value must be an integer - * between 0 and 32767. - */ - public java.lang.String getTabindex() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.tabindex); - - } - - /** - *

      - * Set the value of the tabindex property. - *

      - * - * @param tabindex the new property value - */ - public void setTabindex(java.lang.String tabindex) { - getStateHelper().put(PropertyKeys.tabindex, tabindex); - handleAttribute(this, "tabindex", tabindex); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList("blur", "change", "valueChange", "click", "dblclick", - "focus", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return "valueChange"; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlSelectManyMenu.java b/impl/src/main/java/jakarta/faces/component/html/HtmlSelectManyMenu.java deleted file mode 100644 index 82a302acbe..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlSelectManyMenu.java +++ /dev/null @@ -1,777 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UISelectMany; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents a multiple-selection component that is rendered as an HTML select element, showing a single - * available option at a time. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Menu". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlSelectManyMenu extends UISelectMany implements ClientBehaviorHolder { - - public HtmlSelectManyMenu() { - super(); - setRendererType("jakarta.faces.Menu"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlSelectManyMenu"; - - /** - * The property keys. - */ - protected enum PropertyKeys { - accesskey, dir, disabled, disabledClass, enabledClass, label, lang, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, - onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, readonly, role, style, styleClass, tabindex, title,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accesskey property. - *

      - * - * @return the property value - *

      - * Contents: Access key that, when pressed, transfers focus to this element. - */ - public java.lang.String getAccesskey() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accesskey); - - } - - /** - *

      - * Set the value of the accesskey property. - *

      - * - * @param accesskey the new property value - */ - public void setAccesskey(java.lang.String accesskey) { - getStateHelper().put(PropertyKeys.accesskey, accesskey); - handleAttribute(this, "accesskey", accesskey); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the disabled property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this element must never receive focus or be included in a subsequent submit. A value - * of false causes no attribute to be rendered, while a value of true causes the attribute to be rendered as - * disabled="disabled". - */ - public boolean isDisabled() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - - } - - /** - *

      - * Set the value of the disabled property. - *

      - * - * @param disabled the new property value - */ - public void setDisabled(boolean disabled) { - getStateHelper().put(PropertyKeys.disabled, disabled); - } - - /** - *

      - * Return the value of the disabledClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to the rendered label on disabled options. - */ - public java.lang.String getDisabledClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.disabledClass); - - } - - /** - *

      - * Set the value of the disabledClass property. - *

      - * - * @param disabledClass the new property value - */ - public void setDisabledClass(java.lang.String disabledClass) { - getStateHelper().put(PropertyKeys.disabledClass, disabledClass); - } - - /** - *

      - * Return the value of the enabledClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to the rendered label on enabled options. - */ - public java.lang.String getEnabledClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.enabledClass); - - } - - /** - *

      - * Set the value of the enabledClass property. - *

      - * - * @param enabledClass the new property value - */ - public void setEnabledClass(java.lang.String enabledClass) { - getStateHelper().put(PropertyKeys.enabledClass, enabledClass); - } - - /** - *

      - * Return the value of the label property. - *

      - * - * @return the property value - *

      - * Contents: A localized user presentable name for this component. - */ - public java.lang.String getLabel() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.label); - - } - - /** - *

      - * Set the value of the label property. - *

      - * - * @param label the new property value - */ - public void setLabel(java.lang.String label) { - getStateHelper().put(PropertyKeys.label, label); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the onblur property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus. - */ - public java.lang.String getOnblur() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onblur); - - } - - /** - *

      - * Set the value of the onblur property. - *

      - * - * @param onblur the new property value - */ - public void setOnblur(java.lang.String onblur) { - getStateHelper().put(PropertyKeys.onblur, onblur); - handleAttribute(this, "onblur", onblur); - } - - /** - *

      - * Return the value of the onchange property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus and its value has been modified since gaining focus. - */ - public java.lang.String getOnchange() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onchange); - - } - - /** - *

      - * Set the value of the onchange property. - *

      - * - * @param onchange the new property value - */ - public void setOnchange(java.lang.String onchange) { - getStateHelper().put(PropertyKeys.onchange, onchange); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onfocus property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element receives focus. - */ - public java.lang.String getOnfocus() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onfocus); - - } - - /** - *

      - * Set the value of the onfocus property. - *

      - * - * @param onfocus the new property value - */ - public void setOnfocus(java.lang.String onfocus) { - getStateHelper().put(PropertyKeys.onfocus, onfocus); - handleAttribute(this, "onfocus", onfocus); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the readonly property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this component will prohibit changes by the user. The element may receive focus unless - * it has also been disabled. A value of false causes no attribute to be rendered, while a value of true causes the - * attribute to be rendered as readonly="readonly". - */ - public boolean isReadonly() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.readonly, false); - - } - - /** - *

      - * Set the value of the readonly property. - *

      - * - * @param readonly the new property value - */ - public void setReadonly(boolean readonly) { - getStateHelper().put(PropertyKeys.readonly, readonly); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the tabindex property. - *

      - * - * @return the property value - *

      - * Contents: Position of this element in the tabbing order for the current document. This value must be an integer - * between 0 and 32767. - */ - public java.lang.String getTabindex() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.tabindex); - - } - - /** - *

      - * Set the value of the tabindex property. - *

      - * - * @param tabindex the new property value - */ - public void setTabindex(java.lang.String tabindex) { - getStateHelper().put(PropertyKeys.tabindex, tabindex); - handleAttribute(this, "tabindex", tabindex); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList("blur", "change", "valueChange", "click", "dblclick", - "focus", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return "valueChange"; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlSelectOneListbox.java b/impl/src/main/java/jakarta/faces/component/html/HtmlSelectOneListbox.java deleted file mode 100644 index cd3623ee56..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlSelectOneListbox.java +++ /dev/null @@ -1,803 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UISelectOne; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents a single-selection component that is rendered as an HTML select element, showing either all - * available options or the specified number of options. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Listbox". This value - * can be changed by calling the setRendererType() method. - *

      - */ -public class HtmlSelectOneListbox extends UISelectOne implements ClientBehaviorHolder { - - public HtmlSelectOneListbox() { - super(); - setRendererType("jakarta.faces.Listbox"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlSelectOneListbox"; - - /** - * Properties used by this component - * - */ - protected enum PropertyKeys { - accesskey, dir, disabled, disabledClass, enabledClass, label, lang, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, - onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, readonly, role, size, style, styleClass, tabindex, title,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accesskey property. - *

      - * - * @return the property value - *

      - * Contents: Access key that, when pressed, transfers focus to this element. - */ - public java.lang.String getAccesskey() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accesskey); - - } - - /** - *

      - * Set the value of the accesskey property. - *

      - * - * @param accesskey the new property value - */ - public void setAccesskey(java.lang.String accesskey) { - getStateHelper().put(PropertyKeys.accesskey, accesskey); - handleAttribute(this, "accesskey", accesskey); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the disabled property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this element must never receive focus or be included in a subsequent submit. A value - * of false causes no attribute to be rendered, while a value of true causes the attribute to be rendered as - * disabled="disabled". - */ - public boolean isDisabled() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - - } - - /** - *

      - * Set the value of the disabled property. - *

      - * - * @param disabled the new property value - */ - public void setDisabled(boolean disabled) { - getStateHelper().put(PropertyKeys.disabled, disabled); - } - - /** - *

      - * Return the value of the disabledClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to the rendered label on disabled options. - */ - public java.lang.String getDisabledClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.disabledClass); - - } - - /** - *

      - * Set the value of the disabledClass property. - *

      - * - * @param disabledClass the new property value - */ - public void setDisabledClass(java.lang.String disabledClass) { - getStateHelper().put(PropertyKeys.disabledClass, disabledClass); - } - - /** - *

      - * Return the value of the enabledClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to the rendered label on enabled options. - */ - public java.lang.String getEnabledClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.enabledClass); - - } - - /** - *

      - * Set the value of the enabledClass property. - *

      - * - * @param enabledClass the new property value - */ - public void setEnabledClass(java.lang.String enabledClass) { - getStateHelper().put(PropertyKeys.enabledClass, enabledClass); - } - - /** - *

      - * Return the value of the label property. - *

      - * - * @return the property value - *

      - * Contents: A localized user presentable name for this component. - */ - public java.lang.String getLabel() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.label); - - } - - /** - *

      - * Set the value of the label property. - *

      - * - * @param label the new property value - */ - public void setLabel(java.lang.String label) { - getStateHelper().put(PropertyKeys.label, label); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the onblur property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus. - */ - public java.lang.String getOnblur() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onblur); - - } - - /** - *

      - * Set the value of the onblur property. - *

      - * - * @param onblur the new property value - */ - public void setOnblur(java.lang.String onblur) { - getStateHelper().put(PropertyKeys.onblur, onblur); - handleAttribute(this, "onblur", onblur); - } - - /** - *

      - * Return the value of the onchange property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus and its value has been modified since gaining focus. - */ - public java.lang.String getOnchange() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onchange); - - } - - /** - *

      - * Set the value of the onchange property. - *

      - * - * @param onchange the new property value - */ - public void setOnchange(java.lang.String onchange) { - getStateHelper().put(PropertyKeys.onchange, onchange); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onfocus property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element receives focus. - */ - public java.lang.String getOnfocus() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onfocus); - - } - - /** - *

      - * Set the value of the onfocus property. - *

      - * - * @param onfocus the new property value - */ - public void setOnfocus(java.lang.String onfocus) { - getStateHelper().put(PropertyKeys.onfocus, onfocus); - handleAttribute(this, "onfocus", onfocus); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the readonly property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this component will prohibit changes by the user. The element may receive focus unless - * it has also been disabled. A value of false causes no attribute to be rendered, while a value of true causes the - * attribute to be rendered as readonly="readonly". - */ - public boolean isReadonly() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.readonly, false); - - } - - /** - *

      - * Set the value of the readonly property. - *

      - * - * @param readonly the new property value - */ - public void setReadonly(boolean readonly) { - getStateHelper().put(PropertyKeys.readonly, readonly); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the size property. - *

      - * - * @return the property value - *

      - * Contents: Number of available options to be shown at all times. If not specified, all available options are shown. - */ - public int getSize() { - return (java.lang.Integer) getStateHelper().eval(PropertyKeys.size, Integer.MIN_VALUE); - - } - - /** - *

      - * Set the value of the size property. - *

      - * - * @param size the new property value - */ - public void setSize(int size) { - getStateHelper().put(PropertyKeys.size, size); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the tabindex property. - *

      - * - * @return the property value - *

      - * Contents: Position of this element in the tabbing order for the current document. This value must be an integer - * between 0 and 32767. - */ - public java.lang.String getTabindex() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.tabindex); - - } - - /** - *

      - * Set the value of the tabindex property. - *

      - * - * @param tabindex the new property value - */ - public void setTabindex(java.lang.String tabindex) { - getStateHelper().put(PropertyKeys.tabindex, tabindex); - handleAttribute(this, "tabindex", tabindex); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList("blur", "change", "valueChange", "click", "dblclick", - "focus", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return "valueChange"; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlSelectOneMenu.java b/impl/src/main/java/jakarta/faces/component/html/HtmlSelectOneMenu.java deleted file mode 100644 index 8197f0bf9f..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlSelectOneMenu.java +++ /dev/null @@ -1,778 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UISelectOne; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents a single-selection component that is rendered as an HTML select element, showing a single - * available option at a time. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Menu". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlSelectOneMenu extends UISelectOne implements ClientBehaviorHolder { - - public HtmlSelectOneMenu() { - super(); - setRendererType("jakarta.faces.Menu"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlSelectOneMenu"; - - /** - * Properties used by this component - * - */ - protected enum PropertyKeys { - accesskey, dir, disabled, disabledClass, enabledClass, label, lang, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, - onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, readonly, role, style, styleClass, tabindex, title,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accesskey property. - *

      - * - * @return the property value - *

      - * Contents: Access key that, when pressed, transfers focus to this element. - */ - public java.lang.String getAccesskey() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accesskey); - - } - - /** - *

      - * Set the value of the accesskey property. - *

      - * - * @param accesskey the new property value - */ - public void setAccesskey(java.lang.String accesskey) { - getStateHelper().put(PropertyKeys.accesskey, accesskey); - handleAttribute(this, "accesskey", accesskey); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the disabled property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this element must never receive focus or be included in a subsequent submit. A value - * of false causes no attribute to be rendered, while a value of true causes the attribute to be rendered as - * disabled="disabled". - */ - public boolean isDisabled() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - - } - - /** - *

      - * Set the value of the disabled property. - *

      - * - * @param disabled the new property value - */ - public void setDisabled(boolean disabled) { - getStateHelper().put(PropertyKeys.disabled, disabled); - } - - /** - *

      - * Return the value of the disabledClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to the rendered label on disabled options. - */ - public java.lang.String getDisabledClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.disabledClass); - - } - - /** - *

      - * Set the value of the disabledClass property. - *

      - * - * @param disabledClass the new property value - */ - public void setDisabledClass(java.lang.String disabledClass) { - getStateHelper().put(PropertyKeys.disabledClass, disabledClass); - } - - /** - *

      - * Return the value of the enabledClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to the rendered label on enabled options. - */ - public java.lang.String getEnabledClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.enabledClass); - - } - - /** - *

      - * Set the value of the enabledClass property. - *

      - * - * @param enabledClass the new property value - */ - public void setEnabledClass(java.lang.String enabledClass) { - getStateHelper().put(PropertyKeys.enabledClass, enabledClass); - } - - /** - *

      - * Return the value of the label property. - *

      - * - * @return the property value - *

      - * Contents: A localized user presentable name for this component. - */ - public java.lang.String getLabel() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.label); - - } - - /** - *

      - * Set the value of the label property. - *

      - * - * @param label the new property value - */ - public void setLabel(java.lang.String label) { - getStateHelper().put(PropertyKeys.label, label); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the onblur property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus. - */ - public java.lang.String getOnblur() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onblur); - - } - - /** - *

      - * Set the value of the onblur property. - *

      - * - * @param onblur the new property value - */ - public void setOnblur(java.lang.String onblur) { - getStateHelper().put(PropertyKeys.onblur, onblur); - handleAttribute(this, "onblur", onblur); - } - - /** - *

      - * Return the value of the onchange property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus and its value has been modified since gaining focus. - */ - public java.lang.String getOnchange() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onchange); - - } - - /** - *

      - * Set the value of the onchange property. - *

      - * - * @param onchange the new property value - */ - public void setOnchange(java.lang.String onchange) { - getStateHelper().put(PropertyKeys.onchange, onchange); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - handleAttribute(this, "onclick", onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onfocus property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element receives focus. - */ - public java.lang.String getOnfocus() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onfocus); - - } - - /** - *

      - * Set the value of the onfocus property. - *

      - * - * @param onfocus the new property value - */ - public void setOnfocus(java.lang.String onfocus) { - getStateHelper().put(PropertyKeys.onfocus, onfocus); - handleAttribute(this, "onfocus", onfocus); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the readonly property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this component will prohibit changes by the user. The element may receive focus unless - * it has also been disabled. A value of false causes no attribute to be rendered, while a value of true causes the - * attribute to be rendered as readonly="readonly". - */ - public boolean isReadonly() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.readonly, false); - - } - - /** - *

      - * Set the value of the readonly property. - *

      - * - * @param readonly the new property value - */ - public void setReadonly(boolean readonly) { - getStateHelper().put(PropertyKeys.readonly, readonly); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the tabindex property. - *

      - * - * @return the property value - *

      - * Contents: Position of this element in the tabbing order for the current document. This value must be an integer - * between 0 and 32767. - */ - public java.lang.String getTabindex() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.tabindex); - - } - - /** - *

      - * Set the value of the tabindex property. - *

      - * - * @param tabindex the new property value - */ - public void setTabindex(java.lang.String tabindex) { - getStateHelper().put(PropertyKeys.tabindex, tabindex); - handleAttribute(this, "tabindex", tabindex); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList("blur", "change", "valueChange", "click", "dblclick", - "focus", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return "valueChange"; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlSelectOneRadio.java b/impl/src/main/java/jakarta/faces/component/html/HtmlSelectOneRadio.java deleted file mode 100644 index 5db40a2bce..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlSelectOneRadio.java +++ /dev/null @@ -1,891 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package jakarta.faces.component.html; - -import static jakarta.faces.component.html.HtmlComponentUtils.handleAttribute; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; - -import jakarta.faces.component.UISelectOne; -import jakarta.faces.component.behavior.ClientBehaviorHolder; - -/** - *

      - * Represents a single-selection component that is rendered as a set of - * HTML input elements of type radio. - *

      - *

      - * By default, the rendererType property must be set to "jakarta.faces.Radio". This value can - * be changed by calling the setRendererType() method. - *

      - */ -public class HtmlSelectOneRadio extends UISelectOne implements ClientBehaviorHolder { - - public HtmlSelectOneRadio() { - super(); - setRendererType("jakarta.faces.Radio"); - } - - /** - *

      - * The standard component type for this component. - *

      - */ - public static final String COMPONENT_TYPE = "jakarta.faces.HtmlSelectOneRadio"; - - /** - * The property keys. - */ - protected enum PropertyKeys { - accesskey, border, dir, disabled, disabledClass, enabledClass, group, label, lang, layout, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, - onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, readonly, role, style, styleClass, tabindex, title,; - - String toString; - - PropertyKeys(String toString) { - this.toString = toString; - } - - PropertyKeys() { - } - - @Override - public String toString() { - return toString != null ? toString : super.toString(); - } - } - - /** - *

      - * Return the value of the accesskey property. - *

      - * - * @return the property value - *

      - * Contents: Access key that, when pressed, transfers focus to this element. - */ - public java.lang.String getAccesskey() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.accesskey); - - } - - /** - *

      - * Set the value of the accesskey property. - *

      - * - * @param accesskey the new property value - */ - public void setAccesskey(java.lang.String accesskey) { - getStateHelper().put(PropertyKeys.accesskey, accesskey); - handleAttribute(this, "accesskey", accesskey); - } - - /** - *

      - * Return the value of the border property. - *

      - * - * @return the property value - *

      - * Contents: Width (in pixels) of the border to be drawn around the table containing the options list. This attribute is - * ignored when "group" attribute is specified. - */ - public int getBorder() { - return (java.lang.Integer) getStateHelper().eval(PropertyKeys.border, Integer.MIN_VALUE); - - } - - /** - *

      - * Set the value of the border property. - *

      - * - * @param border the new property value - */ - public void setBorder(int border) { - getStateHelper().put(PropertyKeys.border, border); - handleAttribute(this, "border", border); - } - - /** - *

      - * Return the value of the dir property. - *

      - * - * @return the property value - *

      - * Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) - * and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have - * the correct case. - */ - public java.lang.String getDir() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.dir); - - } - - /** - *

      - * Set the value of the dir property. - *

      - * - * @param dir the new property value - */ - public void setDir(java.lang.String dir) { - getStateHelper().put(PropertyKeys.dir, dir); - handleAttribute(this, "dir", dir); - } - - /** - *

      - * Return the value of the disabled property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this element must never receive focus or be included in a subsequent submit. A value - * of false causes no attribute to be rendered, while a value of true causes the attribute to be rendered as - * disabled="disabled". - */ - public boolean isDisabled() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.disabled, false); - - } - - /** - *

      - * Set the value of the disabled property. - *

      - * - * @param disabled the new property value - */ - public void setDisabled(boolean disabled) { - getStateHelper().put(PropertyKeys.disabled, disabled); - } - - /** - *

      - * Return the value of the disabledClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to the rendered label on disabled options. This attribute is ignored when "group" - * attribute is specified. - */ - public java.lang.String getDisabledClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.disabledClass); - - } - - /** - *

      - * Set the value of the disabledClass property. - *

      - * - * @param disabledClass the new property value - */ - public void setDisabledClass(java.lang.String disabledClass) { - getStateHelper().put(PropertyKeys.disabledClass, disabledClass); - } - - /** - *

      - * Return the value of the enabledClass property. - *

      - * - * @return the property value - *

      - * Contents: CSS style class to apply to the rendered label on enabled options. This attribute is ignored when "group" - * attribute is specified. - */ - public java.lang.String getEnabledClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.enabledClass); - - } - - /** - *

      - * Set the value of the enabledClass property. - *

      - * - * @param enabledClass the new property value - */ - public void setEnabledClass(java.lang.String enabledClass) { - getStateHelper().put(PropertyKeys.enabledClass, enabledClass); - } - - /** - *

      - * Return the value of the group property. - *

      - * - * @return the property value - *

      - * Contents: Specifies the name of the radio button group. Radio button components having the same group within a - * UIForm parent will uncheck all others when being checked. If the value attribute is absent - * then the one from first component of the group will be used. If the UISelectItem child is absent then - * the one from first component of the group will be used. When specified, the group attribute disables the - * default rendering of the "table" element and any attribute related to the rendering of the "table" element, such as - * "border", is ignored. - */ - @Override - public java.lang.String getGroup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.group); - - } - - /** - *

      - * Set the value of the group property. - *

      - * - * @param group the new property value - */ - @Override - public void setGroup(java.lang.String group) { - getStateHelper().put(PropertyKeys.group, group); - } - - /** - *

      - * Return the value of the label property. - *

      - * - * @return the property value - *

      - * Contents: A localized user presentable name for this component. - */ - public java.lang.String getLabel() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.label); - - } - - /** - *

      - * Set the value of the label property. - *

      - * - * @param label the new property value - */ - public void setLabel(java.lang.String label) { - getStateHelper().put(PropertyKeys.label, label); - } - - /** - *

      - * Return the value of the lang property. - *

      - * - * @return the property value - *

      - * Contents: Code describing the language used in the generated markup for this component. - */ - public java.lang.String getLang() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.lang); - - } - - /** - *

      - * Set the value of the lang property. - *

      - * - * @param lang the new property value - */ - public void setLang(java.lang.String lang) { - getStateHelper().put(PropertyKeys.lang, lang); - handleAttribute(this, "lang", lang); - } - - /** - *

      - * Return the value of the layout property. - *

      - * - * @return the property value - *

      - * Contents: Orientation of the options list to be created. Valid values are "pageDirection" (list is laid out - * vertically), or "lineDirection" (list is laid out horizontally), or "list" (list is laid out in list format). - * If not specified, the default value is "lineDirection". This attribute is ignored when "group" attribute is specified. - */ - public java.lang.String getLayout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.layout); - - } - - /** - *

      - * Set the value of the layout property. - *

      - * - * @param layout the new property value - */ - public void setLayout(java.lang.String layout) { - getStateHelper().put(PropertyKeys.layout, layout); - } - - /** - *

      - * Return the value of the onblur property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus. - */ - public java.lang.String getOnblur() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onblur); - - } - - /** - *

      - * Set the value of the onblur property. - *

      - * - * @param onblur the new property value - */ - public void setOnblur(java.lang.String onblur) { - getStateHelper().put(PropertyKeys.onblur, onblur); - handleAttribute(this, "onblur", onblur); - } - - /** - *

      - * Return the value of the onchange property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element loses focus and its value has been modified since gaining focus. - */ - public java.lang.String getOnchange() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onchange); - - } - - /** - *

      - * Set the value of the onchange property. - *

      - * - * @param onchange the new property value - */ - public void setOnchange(java.lang.String onchange) { - getStateHelper().put(PropertyKeys.onchange, onchange); - handleAttribute(this, "onchange", onchange); - } - - /** - *

      - * Return the value of the onclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is clicked over this element. - */ - public java.lang.String getOnclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onclick); - - } - - /** - *

      - * Set the value of the onclick property. - *

      - * - * @param onclick the new property value - */ - public void setOnclick(java.lang.String onclick) { - getStateHelper().put(PropertyKeys.onclick, onclick); - } - - /** - *

      - * Return the value of the ondblclick property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is double clicked over this element. - */ - public java.lang.String getOndblclick() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.ondblclick); - - } - - /** - *

      - * Set the value of the ondblclick property. - *

      - * - * @param ondblclick the new property value - */ - public void setOndblclick(java.lang.String ondblclick) { - getStateHelper().put(PropertyKeys.ondblclick, ondblclick); - handleAttribute(this, "ondblclick", ondblclick); - } - - /** - *

      - * Return the value of the onfocus property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when this element receives focus. - */ - public java.lang.String getOnfocus() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onfocus); - - } - - /** - *

      - * Set the value of the onfocus property. - *

      - * - * @param onfocus the new property value - */ - public void setOnfocus(java.lang.String onfocus) { - getStateHelper().put(PropertyKeys.onfocus, onfocus); - handleAttribute(this, "onfocus", onfocus); - } - - /** - *

      - * Return the value of the onkeydown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed down over this element. - */ - public java.lang.String getOnkeydown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeydown); - - } - - /** - *

      - * Set the value of the onkeydown property. - *

      - * - * @param onkeydown the new property value - */ - public void setOnkeydown(java.lang.String onkeydown) { - getStateHelper().put(PropertyKeys.onkeydown, onkeydown); - handleAttribute(this, "onkeydown", onkeydown); - } - - /** - *

      - * Return the value of the onkeypress property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is pressed and released over this element. - */ - public java.lang.String getOnkeypress() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress); - - } - - /** - *

      - * Set the value of the onkeypress property. - *

      - * - * @param onkeypress the new property value - */ - public void setOnkeypress(java.lang.String onkeypress) { - getStateHelper().put(PropertyKeys.onkeypress, onkeypress); - handleAttribute(this, "onkeypress", onkeypress); - } - - /** - *

      - * Return the value of the onkeyup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a key is released over this element. - */ - public java.lang.String getOnkeyup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeyup); - - } - - /** - *

      - * Set the value of the onkeyup property. - *

      - * - * @param onkeyup the new property value - */ - public void setOnkeyup(java.lang.String onkeyup) { - getStateHelper().put(PropertyKeys.onkeyup, onkeyup); - handleAttribute(this, "onkeyup", onkeyup); - } - - /** - *

      - * Return the value of the onmousedown property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is pressed down over this element. - */ - public java.lang.String getOnmousedown() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousedown); - - } - - /** - *

      - * Set the value of the onmousedown property. - *

      - * - * @param onmousedown the new property value - */ - public void setOnmousedown(java.lang.String onmousedown) { - getStateHelper().put(PropertyKeys.onmousedown, onmousedown); - handleAttribute(this, "onmousedown", onmousedown); - } - - /** - *

      - * Return the value of the onmousemove property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved within this element. - */ - public java.lang.String getOnmousemove() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmousemove); - - } - - /** - *

      - * Set the value of the onmousemove property. - *

      - * - * @param onmousemove the new property value - */ - public void setOnmousemove(java.lang.String onmousemove) { - getStateHelper().put(PropertyKeys.onmousemove, onmousemove); - handleAttribute(this, "onmousemove", onmousemove); - } - - /** - *

      - * Return the value of the onmouseout property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved away from this element. - */ - public java.lang.String getOnmouseout() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseout); - - } - - /** - *

      - * Set the value of the onmouseout property. - *

      - * - * @param onmouseout the new property value - */ - public void setOnmouseout(java.lang.String onmouseout) { - getStateHelper().put(PropertyKeys.onmouseout, onmouseout); - handleAttribute(this, "onmouseout", onmouseout); - } - - /** - *

      - * Return the value of the onmouseover property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is moved onto this element. - */ - public java.lang.String getOnmouseover() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); - - } - - /** - *

      - * Set the value of the onmouseover property. - *

      - * - * @param onmouseover the new property value - */ - public void setOnmouseover(java.lang.String onmouseover) { - getStateHelper().put(PropertyKeys.onmouseover, onmouseover); - handleAttribute(this, "onmouseover", onmouseover); - } - - /** - *

      - * Return the value of the onmouseup property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when a pointer button is released over this element. - */ - public java.lang.String getOnmouseup() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseup); - - } - - /** - *

      - * Set the value of the onmouseup property. - *

      - * - * @param onmouseup the new property value - */ - public void setOnmouseup(java.lang.String onmouseup) { - getStateHelper().put(PropertyKeys.onmouseup, onmouseup); - handleAttribute(this, "onmouseup", onmouseup); - } - - /** - *

      - * Return the value of the onselect property. - *

      - * - * @return the property value - *

      - * Contents: Javascript code executed when text within this element is selected by the user. - */ - public java.lang.String getOnselect() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.onselect); - - } - - /** - *

      - * Set the value of the onselect property. - *

      - * - * @param onselect the new property value - */ - public void setOnselect(java.lang.String onselect) { - getStateHelper().put(PropertyKeys.onselect, onselect); - handleAttribute(this, "onselect", onselect); - } - - /** - *

      - * Return the value of the readonly property. - *

      - * - * @return the property value - *

      - * Contents: Flag indicating that this component will prohibit changes by the user. The element may receive focus unless - * it has also been disabled. A value of false causes no attribute to be rendered, while a value of true causes the - * attribute to be rendered as readonly="readonly". - */ - public boolean isReadonly() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.readonly, false); - - } - - /** - *

      - * Set the value of the readonly property. - *

      - * - * @param readonly the new property value - */ - public void setReadonly(boolean readonly) { - getStateHelper().put(PropertyKeys.readonly, readonly); - } - - /** - *

      - * Return the value of the role property. - *

      - * - * @return the property value - *

      - * Contents: - *

      - * Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have - * a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final - * rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression - * that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs - * to. - *

      - * - *

      - * It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value - * of this attribute. - *

      - */ - public java.lang.String getRole() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.role); - - } - - /** - *

      - * Set the value of the role property. - *

      - * - * @param role the new property value - */ - public void setRole(java.lang.String role) { - getStateHelper().put(PropertyKeys.role, role); - handleAttribute(this, "role", role); - } - - /** - *

      - * Return the value of the style property. - *

      - * - * @return the property value - *

      - * Contents: CSS style(s) to be applied when this component is rendered. - */ - public java.lang.String getStyle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.style); - - } - - /** - *

      - * Set the value of the style property. - *

      - * - * @param style the new property value - */ - public void setStyle(java.lang.String style) { - getStateHelper().put(PropertyKeys.style, style); - handleAttribute(this, "style", style); - } - - /** - *

      - * Return the value of the styleClass property. - *

      - * - * @return the property value - *

      - * Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be - * passed through as the "class" attribute on generated markup. - */ - public java.lang.String getStyleClass() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass); - - } - - /** - *

      - * Set the value of the styleClass property. - *

      - * - * @param styleClass the new property value - */ - public void setStyleClass(java.lang.String styleClass) { - getStateHelper().put(PropertyKeys.styleClass, styleClass); - } - - /** - *

      - * Return the value of the tabindex property. - *

      - * - * @return the property value - *

      - * Contents: Position of this element in the tabbing order for the current document. This value must be an integer - * between 0 and 32767. - */ - public java.lang.String getTabindex() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.tabindex); - - } - - /** - *

      - * Set the value of the tabindex property. - *

      - * - * @param tabindex the new property value - */ - public void setTabindex(java.lang.String tabindex) { - getStateHelper().put(PropertyKeys.tabindex, tabindex); - handleAttribute(this, "tabindex", tabindex); - } - - /** - *

      - * Return the value of the title property. - *

      - * - * @return the property value - *

      - * Contents: Advisory title information about markup elements generated for this component. - */ - public java.lang.String getTitle() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.title); - - } - - /** - *

      - * Set the value of the title property. - *

      - * - * @param title the new property value - */ - public void setTitle(java.lang.String title) { - getStateHelper().put(PropertyKeys.title, title); - handleAttribute(this, "title", title); - } - - private static final Collection EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList("blur", "change", "click", "valueChange", "dblclick", - "focus", "keydown", "keypress", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "select")); - - @Override - public Collection getEventNames() { - return EVENT_NAMES; - } - - @Override - public String getDefaultEventName() { - return "valueChange"; - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/html/package-info.java b/impl/src/main/java/jakarta/faces/component/html/package-info.java deleted file mode 100644 index bedf39a44c..0000000000 --- a/impl/src/main/java/jakarta/faces/component/html/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/** - *

      - * Specialized user interface component classes for HTML. - *

      - */ -package jakarta.faces.component.html; diff --git a/impl/src/main/java/jakarta/faces/component/search/ComponentNotFoundException.java b/impl/src/main/java/jakarta/faces/component/search/ComponentNotFoundException.java deleted file mode 100644 index faddfc73cc..0000000000 --- a/impl/src/main/java/jakarta/faces/component/search/ComponentNotFoundException.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.search; - -import jakarta.faces.FacesException; - -/** - *

      - * Typed {@link FacesException} for the {@link SearchExpressionHandler}, if a component can't be resolved. - *

      - * - * @since 2.3 - */ -public class ComponentNotFoundException extends FacesException { - - private static final long serialVersionUID = -8962632721771880921L; - - /** - *

      - * Construct a new exception with no detail message or root cause. - *

      - * - * @since 2.3 - */ - public ComponentNotFoundException() { - super(); - } - - /** - *

      - * Construct a new exception with the specified detail message and no root cause. - *

      - * - * @param message The detail message for this exception - * - * @since 2.3 - */ - public ComponentNotFoundException(String message) { - super(message); - } - - /** - *

      - * Construct a new exception with the specified root cause. The detail message will be set to - * (cause == null ? null : - * cause.toString() - * - * @param cause The root cause for this exception - * - * @since 2.3 - */ - public ComponentNotFoundException(Throwable cause) { - super(cause); - } - - /** - *

      - * Construct a new exception with the specified detail message and root cause. - *

      - * - * @param message The detail message for this exception - * @param cause The root cause for this exception - * - * @since 2.3 - */ - public ComponentNotFoundException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/impl/src/main/java/jakarta/faces/component/search/SearchExpressionContext.java b/impl/src/main/java/jakarta/faces/component/search/SearchExpressionContext.java deleted file mode 100644 index 7223ea3ecc..0000000000 --- a/impl/src/main/java/jakarta/faces/component/search/SearchExpressionContext.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.search; - -import java.util.Set; - -import jakarta.faces.FactoryFinder; -import jakarta.faces.component.UIComponent; -import jakarta.faces.component.visit.VisitHint; -import jakarta.faces.context.FacesContext; - -/** - *

      - * A context object that is used to hold state relating to resolve a search expression. - *

      - * - * @see SearchExpressionHandler - * - * @since 2.3 - */ -public abstract class SearchExpressionContext { - - /** - *

      - * Returns the source / base component from which we will start to perform our search. - *

      - * - * @return the source component. - * - * @since 2.3 - */ - public abstract UIComponent getSource(); - - /** - *

      - * Returns hints that influence the behavior of the tree visit, if it's used by an {@link SearchKeywordResolver} - * implementation. - *

      - * - * @return a non-empty, unmodifiable collection of {@link VisitHint}s - * - * @since 2.3 - * @see jakarta.faces.component.visit.VisitContext#getHints() - */ - public abstract Set getVisitHints(); - - /** - *

      - * Returns hints that influence the behavior of resolving the expression. - *

      - * - * @return a non-empty, unmodifiable collection of {@link SearchExpressionHint}s - * - * @since 2.3 - */ - public abstract Set getExpressionHints(); - - /** - *

      - * Returns the FacesContext for the current request. - *

      - * - * @return the FacesContext. - * - * @since 2.3 - */ - public abstract FacesContext getFacesContext(); - - /** - *

      - * Creates a {@link SearchExpressionContext} instance for use with the {@link SearchExpressionHandler}. This method can - * be used to obtain a SearchExpressionContext instance without any {@link VisitHint} or {@link SearchExpressionHint}. - *

      - * - * @param context the FacesContext for the current request - * @param source the source / base component from which we will start to perform our search. - * - * @return a {@link SearchExpressionContext} instance - * - * @since 2.3 - */ - public static SearchExpressionContext createSearchExpressionContext(FacesContext context, UIComponent source) { - return createSearchExpressionContext(context, source, null, null); - } - - /** - *

      - * Creates a {@link SearchExpressionContext} instance for use with the {@link SearchExpressionHandler}. - *

      - * - * @param context the FacesContext for the current request - * @param source the source / base component from which we will start to perform our search. - * @param expressionHints the SearchExpressionHint to apply to the search. If null, no hints are applied. - * @param visitHints the VisitHints to apply to the visit, if used by a {@link SearchKeywordResolver}. If - * null, no hints are applied. - * - * @return a {@link SearchExpressionContext} instance - * - * @since 2.3 - */ - public static SearchExpressionContext createSearchExpressionContext(FacesContext context, UIComponent source, Set expressionHints, - Set visitHints) { - - SearchExpressionContextFactory factory = (SearchExpressionContextFactory) FactoryFinder.getFactory(FactoryFinder.SEARCH_EXPRESSION_CONTEXT_FACTORY); - return factory.getSearchExpressionContext(context, source, expressionHints, visitHints); - } -} diff --git a/impl/src/main/java/jakarta/faces/component/search/SearchExpressionContextFactory.java b/impl/src/main/java/jakarta/faces/component/search/SearchExpressionContextFactory.java deleted file mode 100644 index e945d01acc..0000000000 --- a/impl/src/main/java/jakarta/faces/component/search/SearchExpressionContextFactory.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.search; - -import java.util.Set; - -import jakarta.faces.FacesWrapper; -import jakarta.faces.component.UIComponent; -import jakarta.faces.component.visit.VisitHint; -import jakarta.faces.context.FacesContext; - -/** - *

      - * Provide for separation of interface and implementation for the {@link SearchExpressionContext} contract. Usage: - * extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to access - * the instance being wrapped. - *

      - * - * @since 2.3 - */ -public abstract class SearchExpressionContextFactory implements FacesWrapper { - - private final SearchExpressionContextFactory wrapped; - - /** - *

      - * If this factory has been decorated, the implementation doing the decorating should push the implementation being - * wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - */ - public SearchExpressionContextFactory(SearchExpressionContextFactory wrapped) { - this.wrapped = wrapped; - } - - /** - *

      - * If this factory has been decorated, the implementation doing the decorating may override this method to provide - * access to the implementation being wrapped. - *

      - */ - @Override - public SearchExpressionContextFactory getWrapped() { - return wrapped; - } - - /** - *

      - * Creates a {@link SearchExpressionContext} instance for use with the {@link SearchExpressionHandler}. - *

      - * - * @param context the FacesContext for the current request - * @param source the source / base component from which we will start to perform our search. - * @param expressionHints the SearchExpressionHint to apply to the search. If null, no hints are applied. - * @param visitHints the VisitHints to apply to the visit, if used by a {@link SearchKeywordResolver}. If - * null, no hints are applied. - * - * @return a {@link SearchExpressionContext} instance - * - * @since 2.3 - */ - public abstract SearchExpressionContext getSearchExpressionContext(FacesContext context, UIComponent source, Set expressionHints, - Set visitHints); -} diff --git a/impl/src/main/java/jakarta/faces/component/search/SearchExpressionHandler.java b/impl/src/main/java/jakarta/faces/component/search/SearchExpressionHandler.java deleted file mode 100644 index bdbad5f445..0000000000 --- a/impl/src/main/java/jakarta/faces/component/search/SearchExpressionHandler.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.search; - -import java.util.List; - -import jakarta.faces.FacesException; -import jakarta.faces.component.ContextCallback; -import jakarta.faces.component.UIComponent; -import jakarta.faces.context.FacesContext; - -/** - *
      The SearchExpressionHandler is responsible for resolving search - * expression(s) - * - *

      - * A search expression consists of either an identifier (which is matched exactly against the id - * property of a {@link UIComponent}, or a keyword (like @this or @form), or a series of such - * identifiers and keywords linked by the {@link jakarta.faces.component.UINamingContainer#getSeparatorChar} character - * value. See {@link SearchKeywordResolver} for the list of supported keywords. The search algorithm must operate as - * follows, though alternate alogrithms may be used as long as the end result is the same: - *

      - * - *
        - *
      • Identify the {@link UIComponent} that will be the base for searching: - *
          - *
        • If the search expression begins with the separator character (called an "absolute" search expression), the base - * will be the {@link jakarta.faces.component.UIViewRoot}. The leading separator character will be stripped off, and the - * remainder of the search expression will be treated as a "relative" search expression as described below.
        • - *
        • Otherwise, the {@link SearchExpressionContext#getSource()} will be used.
        • - *
        - *
      • - *
      • The search expression (possibly modified in the previous step) is now a "relative" search expression that will be - * used to locate the component (if any) based on the identifier and/or keywords: - *
          - *
        • The expression will be splitted by {@link jakarta.faces.component.UINamingContainer#getSeparatorChar} into - * "commands". The commands will be resolved one by one. For the first command, the source component, like mentioned - * above, will be used to start the lookup. For all further commands, the previous resolved component, from the previous - * command, will be used the start the lookup.
        • - *
        • If the command starts with the {@link #KEYWORD_PREFIX}, then it is considered as a keyword and the - * {@link SearchKeywordResolver}s will be used the resolve the keyword.
        • - *
        • Otherwise, if the command does not start with {@link #KEYWORD_PREFIX}, then the component will be resolved based - * on the component ID.
        • - *
        - *
      • - *
      - *
      - * - * @since 2.3 - */ -public abstract class SearchExpressionHandler { - - /** - *

      - * The prefix to identify a keyword. - *

      - * - * @since 2.3 - */ - public static final String KEYWORD_PREFIX = "@"; - - /** - *

      - * The default characters used to separate expressions in a series of expressions. Expressions are per default separated - * by space and comma. - *

      - * - * @since 2.3 - */ - protected static final char[] EXPRESSION_SEPARATOR_CHARS = new char[] { ',', ' ' }; - - /** - *

      - * Resolves to a single clientId or passthrough expression for the given expression. - *

      - * - * @param searchExpressionContext the {@link SearchExpressionContext} - * @param expression the search expression - * - * @throws ComponentNotFoundException if the expression can not be resolved and if - * {@link SearchExpressionHint#IGNORE_NO_RESULT} was not passed. - * @throws FacesException if the expression is not valid. - * - * @return The resolved clientId or passtrough expression. If the expression can not be resolved and if - * {@link SearchExpressionHint#IGNORE_NO_RESULT} was passed, null will be returned. - * - * @since 2.3 - */ - public abstract String resolveClientId(SearchExpressionContext searchExpressionContext, String expression); - - /** - *

      - * Resolves to a {@link List} with clientIds or passthrough expressions for the given expressions. The expressions will - * be splitted by {@link #splitExpressions(jakarta.faces.context.FacesContext, java.lang.String)} and resolved one by - * one. - *

      - * - * @param searchExpressionContext the {@link SearchExpressionContext} - * @param expressions the search expressions - * - * @throws ComponentNotFoundException if one of the expression can not be resolved and if - * {@link SearchExpressionHint#IGNORE_NO_RESULT} was not passed. - * @throws FacesException if the expression is not valid. - * - * @return The resolved clientIds and passtrough expressions. - * - * @since 2.3 - */ - public abstract List resolveClientIds(SearchExpressionContext searchExpressionContext, String expressions); - - /** - *

      - * Resolves a single {@link UIComponent}s for the given expression. If the component is resolved, the - * {@link ContextCallback} will be invoked. - *

      - * - * @param searchExpressionContext the {@link SearchExpressionContext} - * @param expression the search expression - * @param callback the callback for the resolved component - * - * @throws ComponentNotFoundException if the expression can not be resolved and if - * {@link SearchExpressionHint#IGNORE_NO_RESULT} was not passed. - * @throws FacesException if the expression is not valid. - * - * @since 2.3 - */ - public abstract void resolveComponent(SearchExpressionContext searchExpressionContext, String expression, ContextCallback callback); - - /** - *

      - * Resolves multiple {@link UIComponent}s for the given expression(s). The expressions will be splitted by - * {@link #splitExpressions(jakarta.faces.context.FacesContext, java.lang.String)} and resolved one by one. For each - * resolved component, the {@link ContextCallback} will be invoked. - *

      - * - * @param searchExpressionContext the {@link SearchExpressionContext} - * @param expressions the search expression(s) - * @param callback the callback for each resolved component - * - * @throws ComponentNotFoundException if any of the expressions can not be resolved and if - * {@link SearchExpressionHint#IGNORE_NO_RESULT} was not passed. - * @throws FacesException if the expression is not valid. - * - * @since 2.3 - */ - public abstract void resolveComponents(SearchExpressionContext searchExpressionContext, String expressions, ContextCallback callback); - - /** - *

      - * Resolves multiple {@link UIComponent}s for the given expression. For each resolved component, the - * {@link ContextCallback} will be invoked. - * - * This method is the most essential method in the API. It implements the algorithm which handles the recursion of the - * keywords and id's. - *

      - * - * @param searchExpressionContext the {@link SearchExpressionContext} - * @param expression the search expression - * @param callback the callback for the resolved component - * - * @throws FacesException if the expression is not valid. - * - * @since 2.3 - */ - public void invokeOnComponent(SearchExpressionContext searchExpressionContext, String expression, ContextCallback callback) { - invokeOnComponent(searchExpressionContext, searchExpressionContext.getSource(), expression, callback); - } - - /** - *

      - * Resolves multiple {@link UIComponent}s for the given expression. For each resolved component, the - * {@link ContextCallback} will be invoked. - * - * This method is the most essential method in the API. It implements the algorithm which handles the recursion of the - * keywords and id's. - *

      - * - * @param searchExpressionContext the {@link SearchExpressionContext} - * @param previous The previous resolved component, that will be the base for searching - * @param expression the search expression - * @param callback the callback for the resolved component - * - * @throws FacesException if the expression is not valid. - * - * @since 2.3 - */ - public abstract void invokeOnComponent(SearchExpressionContext searchExpressionContext, UIComponent previous, String expression, ContextCallback callback); - - /** - *

      - * Splits an string, based on {@link #getExpressionSeperatorChars(jakarta.faces.context.FacesContext)} with possible - * multiple expressions into an array. - *

      - * - * @param context the {@link FacesContext} for the current request - * @param expressions The expressions as string - * @return the expression(s) as array - * - * @since 2.3 - */ - public abstract String[] splitExpressions(FacesContext context, String expressions); - - /** - *

      - * Checks if the given expression is a "passtrough expression". A passthrough expression must only be a keyword. This - * keyword will not be resolved by the {@link SearchKeywordResolver} and will be returned untouched. - * - * The client is responsible to resolve it later. - *

      - * - * @param searchExpressionContext the {@link SearchExpressionContext} - * @param expression the expression - * @return If the given expression is a passtrough expression - * - * @since 2.3 - */ - public abstract boolean isPassthroughExpression(SearchExpressionContext searchExpressionContext, String expression); - - /** - *

      - * Checks if the given expression is a valid expression. - *

      - * - *
      A expression is invalid if: - *
        - *
      • No {@link SearchKeywordResolver} matches the requested keyword
      • - *
      • A keyword or id is placed after a leaf keyword (@none:@form)
      • - *
      - *
      - * - * @param searchExpressionContext the {@link SearchExpressionContext} - * @param expression the expression - * - * @return If the given expression is a valid expression - * - * @since 2.3 - */ - public abstract boolean isValidExpression(SearchExpressionContext searchExpressionContext, String expression); - - /** - *

      - * Return the characters used to separate expressions in a series of expressions. The default implementation returns - * {@link SearchExpressionHandler#EXPRESSION_SEPARATOR_CHARS}. - *

      - * - * @param context the {@link FacesContext} for the current request - * @return the separator chars - * - * @since 2.3 - */ - public char[] getExpressionSeperatorChars(FacesContext context) { - return EXPRESSION_SEPARATOR_CHARS; - } -} diff --git a/impl/src/main/java/jakarta/faces/component/search/SearchExpressionHandlerWrapper.java b/impl/src/main/java/jakarta/faces/component/search/SearchExpressionHandlerWrapper.java deleted file mode 100644 index 1758626309..0000000000 --- a/impl/src/main/java/jakarta/faces/component/search/SearchExpressionHandlerWrapper.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.search; - -import java.util.List; - -import jakarta.faces.FacesWrapper; -import jakarta.faces.component.ContextCallback; -import jakarta.faces.component.UIComponent; -import jakarta.faces.context.FacesContext; - -/** - *

      - * Provides a simple implementation of {@link SearchExpressionHandler} that can be subclassed by developers wishing to - * provide specialized behavior to an existing {@link SearchExpressionHandler} instance. The default implementation of - * all methods is to call through to the wrapped {@link SearchExpressionHandler} instance. Usage: extend this class and - * push the implementation being wrapped to the constructor and use {@link #getWrapped} to access the instance being - * wrapped. - *

      - * - * @since 2.3 - */ -public abstract class SearchExpressionHandlerWrapper extends SearchExpressionHandler implements FacesWrapper { - - private final SearchExpressionHandler wrapped; - - /** - *

      - * If this search expression handler has been decorated, the implementation doing the decorating should push the - * implementation being wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being - * wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - * @since 2.3 - */ - public SearchExpressionHandlerWrapper(SearchExpressionHandler wrapped) { - this.wrapped = wrapped; - } - - @Override - public SearchExpressionHandler getWrapped() { - return wrapped; - } - - @Override - public String resolveClientId(SearchExpressionContext searchExpressionContext, String expression) { - return getWrapped().resolveClientId(searchExpressionContext, expression); - } - - @Override - public List resolveClientIds(SearchExpressionContext searchExpressionContext, String expressions) { - return getWrapped().resolveClientIds(searchExpressionContext, expressions); - } - - @Override - public void resolveComponent(SearchExpressionContext searchExpressionContext, String expression, ContextCallback callback) { - getWrapped().resolveComponent(searchExpressionContext, expression, callback); - } - - @Override - public void resolveComponents(SearchExpressionContext searchExpressionContext, String expressions, ContextCallback callback) { - getWrapped().resolveComponents(searchExpressionContext, expressions, callback); - } - - @Override - public void invokeOnComponent(SearchExpressionContext searchExpressionContext, String expression, ContextCallback callback) { - getWrapped().invokeOnComponent(searchExpressionContext, expression, callback); - } - - @Override - public void invokeOnComponent(SearchExpressionContext searchExpressionContext, UIComponent previous, String expression, ContextCallback callback) { - getWrapped().invokeOnComponent(searchExpressionContext, previous, expression, callback); - } - - @Override - public boolean isValidExpression(SearchExpressionContext searchExpressionContext, String expression) { - return getWrapped().isValidExpression(searchExpressionContext, expression); - } - - @Override - public boolean isPassthroughExpression(SearchExpressionContext searchExpressionContext, String expression) { - return getWrapped().isPassthroughExpression(searchExpressionContext, expression); - } - - @Override - public String[] splitExpressions(FacesContext context, String expressions) { - return getWrapped().splitExpressions(context, expressions); - } - - @Override - public char[] getExpressionSeperatorChars(FacesContext context) { - return getWrapped().getExpressionSeperatorChars(context); - } -} diff --git a/impl/src/main/java/jakarta/faces/component/search/SearchExpressionHint.java b/impl/src/main/java/jakarta/faces/component/search/SearchExpressionHint.java deleted file mode 100644 index 4b4bb2aab4..0000000000 --- a/impl/src/main/java/jakarta/faces/component/search/SearchExpressionHint.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.search; - -import jakarta.faces.component.UIComponent; - -/** - *

      - * An enum that specifies hints that impact the behavior of a component tree search. - *

      - * - * @since 2.3 - */ -public enum SearchExpressionHint { - - /** - *

      - * Hint that indicates that if a expression resolves to null, null will be returned. Otherwise - * a {@link ComponentNotFoundException} will be thrown. - *

      - * - * @since 2.3 - */ - IGNORE_NO_RESULT, - - /** - *

      - * Hint that indicates that only real {@link UIComponent}s should be resolved. Virtual components are components, which - * are reused in repeatable components like {@link jakarta.faces.component.UIData} or ui:repeat. - *

      - * - * @since 2.3 - */ - SKIP_VIRTUAL_COMPONENTS, - - /** - *

      - * Hint that indicates that only one component should be resolved. - * - * This hint is important if a {@link SearchKeywordResolver} uses {@link UIComponent#visitTree}, as the tree visit can - * be terminated after the first component was resolved. - * - * This hint will be automatically added internally if - * {@link SearchExpressionHandler#resolveClientId(jakarta.faces.component.search.SearchExpressionContext, java.lang.String)} - * or - * {@link SearchExpressionHandler#resolveComponent(jakarta.faces.component.search.SearchExpressionContext, java.lang.String, jakarta.faces.component.ContextCallback)} - * is used. - *

      - * - * @since 2.3 - */ - RESOLVE_SINGLE_COMPONENT, - - /** - *

      - * Hint that indicates that a keyword can be resolved later and will just be returned as passthrough, if supported by - * the keyword. For example: The AJAX client- and server-side is able to handle @all or @form. So it's not necessary at - * all to resolve them to their clientId's on the server side. - *

      - * - * @see SearchKeywordResolver#isPassthrough(jakarta.faces.component.search.SearchExpressionContext, java.lang.String) - * - * @since 2.3 - */ - RESOLVE_CLIENT_SIDE -} diff --git a/impl/src/main/java/jakarta/faces/component/search/SearchKeywordContext.java b/impl/src/main/java/jakarta/faces/component/search/SearchKeywordContext.java deleted file mode 100644 index 7090d7b572..0000000000 --- a/impl/src/main/java/jakarta/faces/component/search/SearchKeywordContext.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.search; - -import jakarta.faces.component.ContextCallback; -import jakarta.faces.component.UIComponent; - -/** - *

      - * SearchKeywordContext provides context information that may be useful to - * {@link SearchKeywordResolver#resolve} implementations. - *

      - * - * @since 2.3 - */ -public class SearchKeywordContext { - - private final SearchExpressionContext searchExpressionContext; - private final ContextCallback callback; - private final String remainingExpression; - - private boolean keywordResolved; - - /** - *

      - * Construct a new context with the given arguments. - *

      - * - * @param searchExpressionContext the {@link SearchExpressionContext} for the current request. - * @param callback the {@link ContextCallback}. - * @param remainingExpression the remaining expression. - */ - public SearchKeywordContext(SearchExpressionContext searchExpressionContext, ContextCallback callback, String remainingExpression) { - this.searchExpressionContext = searchExpressionContext; - this.callback = callback; - this.remainingExpression = remainingExpression; - } - - /** - *

      - * This method will be called by an implementation of {@link SearchKeywordResolver#resolve} with the resolved component - * for the keyword. - *

      - * - * @param target the resolved {@link UIComponent}. - * - * @since 2.3 - */ - public void invokeContextCallback(UIComponent target) { - keywordResolved = true; - callback.invokeContextCallback(searchExpressionContext.getFacesContext(), target); - } - - /** - *

      - * Returns the {@link SearchExpressionContext} for the current request. - *

      - * - * @return the {@link SearchExpressionContext}. - * - * @since 2.3 - */ - public SearchExpressionContext getSearchExpressionContext() { - return searchExpressionContext; - } - - /** - *

      - * Returns the {@link ContextCallback} for the current request. - *

      - * - * @return the {@link ContextCallback}. - * - * @since 2.3 - */ - public ContextCallback getCallback() { - return callback; - } - - /** - *

      - * Returns the remaining expression for the current request. - *

      - * - * @return the remaining expression. - * - * @since 2.3 - */ - public String getRemainingExpression() { - return remainingExpression; - } - - /** - *

      - * Returns if the keyword was resolved. - *

      - * - * @return if the keyword was resolved. - * - * @since 2.3 - */ - public boolean isKeywordResolved() { - return keywordResolved; - } - - /** - *

      - * Sets if the keyword was resolved. - *

      - * - * @param keywordResolved if the keyword was resolved. - * - * @since 2.3 - */ - public void setKeywordResolved(boolean keywordResolved) { - this.keywordResolved = keywordResolved; - } -} diff --git a/impl/src/main/java/jakarta/faces/component/search/SearchKeywordResolver.java b/impl/src/main/java/jakarta/faces/component/search/SearchKeywordResolver.java deleted file mode 100644 index c0ef0c2396..0000000000 --- a/impl/src/main/java/jakarta/faces/component/search/SearchKeywordResolver.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.search; - -import jakarta.faces.component.UIComponent; - -/** - *

      - * A SearchKeywordResolver is responsible for resolving a single keyword. Implementations must support - * the following set of {@code SearchKeywordResolver} implementations, each with the associated behavior. - *

      - * - *
      - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
      List of required supported keywords and their behaviors
      Search KeywordBehavior
      @allAll components in the view
      @child(n)The nth child of the base component
      @compositeThe composite component parent of the base component
      @formThe closest form ancestor of the base component
      @id(id)Resolves to the components with the specified component id (not clientId). This is useful when the exact location - * of the component tree is unknown, but must be used with caution when there multiple occurrences of the given id - * within the view.
      @namingcontainerThe closest {@link jakarta.faces.component.NamingContainer} ancestor component of the base component
      @nextThe next component in the view after the base component
      @noneNo component
      @parentThe parent of the base component
      @previousThe previous component to the base component
      @rootThe {@link jakarta.faces.component.UIViewRoot}
      @thisThe base component
      - * - *

      - * New {@link SearchKeywordResolver}s can be registered via - * {@link jakarta.faces.application.Application#addSearchKeywordResolver(jakarta.faces.component.search.SearchKeywordResolver)} - * or in the application configuration resources. - *

      - * - *
      - * 
      - * <application>
      - *   <search-keyword-resolver>...</search-keyword-resolver>
      - * </application>
      - * 
      - * 
      - * - *
      - * - * @since 2.3 - */ -public abstract class SearchKeywordResolver { - - /** - *

      - * Try to resolve one or multiple {@link UIComponent}s based on the keyword and calls - * {@link SearchKeywordContext#invokeContextCallback(jakarta.faces.component.UIComponent)} for each resolved component. - *

      - * - * @param searchKeywordContext the {@code SearchKeywordContext} - * @param current the previous resolved component or the source component (if called for the first keyword in the chain) - * @param keyword the keyword - * - * @since 2.3 - */ - public abstract void resolve(SearchKeywordContext searchKeywordContext, UIComponent current, String keyword); - - /** - *

      - * Checks if the current instance of the {@link SearchKeywordResolver} is responsible for resolving the keyword. - *

      - * - * @param searchExpressionContext the {@link SearchExpressionContext} - * @param keyword the keyword - * - * @return true if it's responsible for resolving this keyword - * - * @since 2.3 - */ - public abstract boolean isResolverForKeyword(SearchExpressionContext searchExpressionContext, String keyword); - - /** - *

      - * A passthrough keyword is a keyword, that according to the context, does not require to be resolved on the server, and - * can be passed "unresolved" to the client. - *

      - * - * @param searchExpressionContext the {@link SearchExpressionContext} - * @param keyword the keyword - * - * @return true if it's passthrough keyword. - * - * @since 2.3 - */ - public boolean isPassthrough(SearchExpressionContext searchExpressionContext, String keyword) { - return false; - } - - /** - *

      - * A leaf keyword is a keyword that does not allow to be combined with keywords or id chains to the right. For - * example: @none:@parent. - *

      - * - * @param searchExpressionContext the {@link SearchExpressionContext} - * @param keyword the keyword - * - * @return true if it's leaf keyword. - * - * @since 2.3 - */ - public boolean isLeaf(SearchExpressionContext searchExpressionContext, String keyword) { - return false; - } -} diff --git a/impl/src/main/java/jakarta/faces/component/search/UntargetableComponent.java b/impl/src/main/java/jakarta/faces/component/search/UntargetableComponent.java deleted file mode 100644 index b60ea3f772..0000000000 --- a/impl/src/main/java/jakarta/faces/component/search/UntargetableComponent.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.search; - -/** - *
      Components implementing this interface are ignored by the algorithm - especially in - * the implementation of @child(n), @next and @previous. - * - * If you suppose this case, markup/literal components must implement {@link UntargetableComponent}: - * - *
      - * <table>
      - *      <tr>
      - *          <td>
      - *              <h:outputLabel for="@next" value="Name:" />
      - *          </td>
      - *          <td>
      - *              <h:inputText id="input" value="#{bean.name} />
      - *          </td>
      - *      </tr>
      - * </table>
      - * 
      - * - * @next would otherwise actually target the markup: - * - *
      - *  </td>
      - *  <td>
      - * 
      - * - * and not desired component: - * - *
      - *  <h:inputText id="input" value="#{bean.name} />
      - * 
      - * - *
      - * - * @since 2.3 - */ -public interface UntargetableComponent { - -} diff --git a/impl/src/main/java/jakarta/faces/component/visit/VisitCallback.java b/impl/src/main/java/jakarta/faces/component/visit/VisitCallback.java deleted file mode 100644 index dd30f1ac54..0000000000 --- a/impl/src/main/java/jakarta/faces/component/visit/VisitCallback.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.visit; - -import jakarta.faces.component.UIComponent; - -/** - * - *

      - * A simple callback interface that enables taking action on a specific UIComponent (either facet or child) during a - * component tree visit. - *

      - * - * @see UIComponent#visitTree UIComponent.visitTree() - * - * @since 2.0 - */ -public interface VisitCallback { - - /** - *

      - * This method is called during component tree visits by {@link VisitContext#invokeVisitCallback - * VisitContext.invokeVisitCallback()} to visit the specified component. At the point in time when this method is - * called, the argument {@code target} is guaranteed to be in the proper state with respect to its ancestors in the - * View. - *

      - * - * @param context the {@link VisitContext} for this tree visit. - * - * @param target the {@link UIComponent} to visit - * - * @return a {@link VisitResult} that indicates whether to continue visiting the component's subtree, skip visiting the - * component's subtree or end the visit. - */ - VisitResult visit(VisitContext context, UIComponent target); -} diff --git a/impl/src/main/java/jakarta/faces/component/visit/VisitContext.java b/impl/src/main/java/jakarta/faces/component/visit/VisitContext.java deleted file mode 100644 index 33d5ef7e76..0000000000 --- a/impl/src/main/java/jakarta/faces/component/visit/VisitContext.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.visit; - -import java.util.AbstractCollection; -import java.util.Collection; -import java.util.Iterator; -import java.util.Set; - -import jakarta.faces.FactoryFinder; -import jakarta.faces.component.UIComponent; -import jakarta.faces.context.FacesContext; - -/** - * - *

      - * A context object that is used to hold state relating to performing a component tree visit. - *

      - * - *
      - * - *

      - * Component tree visits are initiated by calling {@link UIComponent#visitTree}, at which point both a - * {@link VisitContext} and a {@link VisitCallback} must be provided. - *

      - *
      - * - * @see UIComponent#visitTree UIComponent.visitTree() - * @see VisitCallback - * - * @since 2.0 - */ -abstract public class VisitContext { - - // Design notes: The VisitContext contract could be defined - // as an interface. However, there is the potential that we - // may need to add new methods in the future, so leaving as - // an abstract class in order to have room to grow. - // - // Since we are an abstract class rather than an interface, - // we could provide implementations of of some of the simpler - // methods (eg. getFacesContext() and getHints()) to avoid - // duplicating this code in VisitContext implementations. - // However, doing so would mean that "wrapping" VisitContext - // implementations would be forced to pick up such implementations, - // so going with a pure contract (no implementation). - - /** - *

      - * This unmodifiable Collection is returned by getIdsToVisit() and getSubtreeIdsToVisit() in - * cases where all ids should be visited. - *

      - * - *

      - * To simplify logic for visitTree() implementations, this Collection always returns false for - * isEmpty. All other methods throw UnsupportedOperationException. - *

      - * - * @since 2.0 - */ - // Note: We cannot use Collections.emptyList() as that returns - // a shared instance - we want to unique instance to allow for - // identity tests. - static public final Collection ALL_IDS = new AbstractCollection() { - - @Override - public Iterator iterator() { - throw new UnsupportedOperationException("VisitContext.ALL_IDS does not support this operation"); - } - - @Override - public int size() { - throw new UnsupportedOperationException("VisitContext.ALL_IDS does not support this operation"); - } - - @Override - public boolean isEmpty() { - return false; - } - }; - - /** - *

      - * Returns the FacesContext for the current request. - *

      - * - * @return the FacesContext. - * - * @since 2.0 - */ - abstract public FacesContext getFacesContext(); - - /** - *

      - * Returns the ids of the components to visit. - *

      - * - *

      - * In the case of a full tree visit, this method returns the ALL_IDS collection. Otherwise, if a partial visit is beign - * performed, returns a modifiable collection containing the client ids of the components that should be visited. - *

      - * - * @return the ids of the components to visit - * - */ - abstract public Collection getIdsToVisit(); - - /** - *

      - * Given a {@link jakarta.faces.component.NamingContainer} component, returns the client ids of any components - * underneath the NamingContainer that should be visited. - *

      - * - *
      - * - *

      - * This method is called by NamingContainer visitTree() implementations to determine whether the NamingContainer - * contains components to be visited. In the case where no such components exist, the NamingContainer can short-circuit - * the tree visit and avoid descending into child subtrees. - *

      - * - *

      - * In addition, iterating components such as UIData may be able to use the returned ids to determine which iterated - * states (ie. rows) need to be visited. This allows the visit traversal to be contstrained such only those rows that - * contain visit targets need to be traversed. - *

      - * - *
      - * - * @param component a NamingContainer component - * @return an unmodifiable Collection containing the client ids of any components underneath the NamingContainer that - * are known to be targets of the tree visit. If no such components exist, returns an empty Collection. If all - * components underneath the NamingContainer should be visited, returns the {@code VisitContext.ALL_IDS} collection. - * @throws IllegalArgumentException if {@code component} is not an instance of NamingContainer - */ - abstract public Collection getSubtreeIdsToVisit(UIComponent component); - - /** - *

      - * Called by {@link UIComponent#visitTree UIComponent.visitTree()} to visit a single component. - *

      - * - * @param component the component to visit - * @param callback the VisitCallback to call - * @return a VisitResult value that indicates whether to continue visiting the component's subtree, skip visiting the - * component's subtree or abort the visit altogether. - */ - abstract public VisitResult invokeVisitCallback(UIComponent component, VisitCallback callback); - - /** - *

      - * Returns hints that influence the behavior of the tree visit. - *

      - * - *

      - * Interested parties, such as {@link UIComponent#visitTree UIComponent.visitTree()} implementations, may check to see - * whether a particular hint is present by calling {@code VisitContext.getHints().contains()}, passing in one of the - * hints defined by {@link VisitHint}. - * - * @return a non-empty, unmodifiable collection of VisitHints - */ - abstract public Set getHints(); - - /** - *

      - * Returns a VisitContext instance that is initialized with the specified ids and hintsfor use with - * {@link UIComponent#visitTree}. - *

      - * - * @param context the FacesContext for the current request - * @param ids the client ids of the components to visit. If null, all components will be visited. - * @param hints the VisitHints to apply to the visit. If null, no hints are applied. - * - * @return a VisitContext instance that is initialized with the specified ids and hints. - */ - public static VisitContext createVisitContext(FacesContext context, Collection ids, Set hints) { - - VisitContextFactory factory = (VisitContextFactory) FactoryFinder.getFactory(FactoryFinder.VISIT_CONTEXT_FACTORY); - return factory.getVisitContext(context, ids, hints); - - } - - /** - *

      - * Creates a VisitContext instance for use with {@link UIComponent#visitTree UIComponent.visitTree()}. This method can - * be used to obtain a VisitContext instance when all components should be visited with the default visit hints. - *

      - * - * @param context the FacesContext for the current request - * @return a VisitContext instance - */ - public static VisitContext createVisitContext(FacesContext context) { - - return createVisitContext(context, null, null); - - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/visit/VisitContextFactory.java b/impl/src/main/java/jakarta/faces/component/visit/VisitContextFactory.java deleted file mode 100644 index 23dc9e527f..0000000000 --- a/impl/src/main/java/jakarta/faces/component/visit/VisitContextFactory.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.visit; - -import java.util.Collection; -import java.util.Set; - -import jakarta.faces.FacesWrapper; -import jakarta.faces.context.FacesContext; - -/** - *

      - * Provide for separation of interface and implementation for the - * {@link VisitContext} contract. - *

      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - * @since 2.0 - */ -public abstract class VisitContextFactory implements FacesWrapper { - - private VisitContextFactory wrapped; - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public VisitContextFactory() { - - } - - /** - *

      - * If this factory has been decorated, the implementation doing the decorating should push the implementation being - * wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - */ - public VisitContextFactory(VisitContextFactory wrapped) { - this.wrapped = wrapped; - } - - /** - *

      - * If this factory has been decorated, the implementation doing the decorating may override this method to provide - * access to the implementation being wrapped. - *

      - */ - @Override - public VisitContextFactory getWrapped() { - return wrapped; - } - - /** - *

      - * Return a new {@link VisitContext} instance. - *

      - * - * @param context the FacesContext for this request. - * @param ids a Collection of clientIds to visit. If null all components will be visited. - * @param hints the VisitHints that apply to this visit. - * - * @return the instance of VisitContext. - * - * @since 2.0 - */ - public abstract VisitContext getVisitContext(FacesContext context, Collection ids, Set hints); - -} diff --git a/impl/src/main/java/jakarta/faces/component/visit/VisitContextWrapper.java b/impl/src/main/java/jakarta/faces/component/visit/VisitContextWrapper.java deleted file mode 100644 index 2839b26f9f..0000000000 --- a/impl/src/main/java/jakarta/faces/component/visit/VisitContextWrapper.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.visit; - -import java.util.Collection; -import java.util.Set; - -import jakarta.faces.FacesWrapper; -import jakarta.faces.component.UIComponent; -import jakarta.faces.context.FacesContext; - -/** - *

      - * Provides a simple implementation of {@link VisitContext} that can be - * subclassed by developers wishing to provide specialized behavior to an existing {@link VisitContext} instance. The - * default implementation of all methods is to call through to the wrapped {@link VisitContext} instance. - *

      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - * @since 2.0 - */ -public abstract class VisitContextWrapper extends VisitContext implements FacesWrapper { - - private VisitContext wrapped; - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public VisitContextWrapper() { - - } - - /** - *

      - * If this visit context has been decorated, the implementation doing the decorating should push the implementation - * being wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - * @since 2.3 - */ - public VisitContextWrapper(VisitContext wrapped) { - this.wrapped = wrapped; - } - - @Override - public VisitContext getWrapped() { - return wrapped; - } - - @Override - public FacesContext getFacesContext() { - return getWrapped().getFacesContext(); - } - - @Override - public Set getHints() { - return getWrapped().getHints(); - } - - @Override - public Collection getIdsToVisit() { - return getWrapped().getIdsToVisit(); - } - - @Override - public Collection getSubtreeIdsToVisit(UIComponent component) { - return getWrapped().getSubtreeIdsToVisit(component); - } - - @Override - public VisitResult invokeVisitCallback(UIComponent component, VisitCallback callback) { - return getWrapped().invokeVisitCallback(component, callback); - } - -} diff --git a/impl/src/main/java/jakarta/faces/component/visit/VisitHint.java b/impl/src/main/java/jakarta/faces/component/visit/VisitHint.java deleted file mode 100644 index 410fe3197c..0000000000 --- a/impl/src/main/java/jakarta/faces/component/visit/VisitHint.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.visit; - -/** - *

      - * An enum that specifies hints that impact the behavior of a component tree - * visit. - *

      - * - * @since 2.0 - */ -public enum VisitHint { - - /** - *

      - * Hint that indicates that only the rendered subtrees should be visited. - *

      - * - * @since 2.0 - */ - SKIP_UNRENDERED, - - /** - *

      - * Hint that indicates that only non-transient subtrees should be visited. - *

      - * - * @since 2.0 - */ - SKIP_TRANSIENT, - - /** - *

      - * Hint that indicates that components that normally visit children multiple times (eg. UIData) in an - * iterative fashion should instead visit each child only one time. - *

      - * - * @since 2.1 - */ - SKIP_ITERATION, - - /** - *

      - * Hint that indicates that the visit is being performed as part of lifecycle phase execution. - *

      - * - * @since 2.0 - */ - EXECUTE_LIFECYCLE, - -} diff --git a/impl/src/main/java/jakarta/faces/component/visit/VisitResult.java b/impl/src/main/java/jakarta/faces/component/visit/VisitResult.java deleted file mode 100644 index 49c47febb4..0000000000 --- a/impl/src/main/java/jakarta/faces/component/visit/VisitResult.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.component.visit; - -/** - * - *

      - * An enum that specifies the possible results of a call to {@link VisitCallback#visit}. - *

      - * - * @see VisitCallback#visit VisitCallback.visit() - * - * @since 2.0 - */ -public enum VisitResult { - - /** - *

      - * This result indicates that the tree visit should descend into current component's subtree. - *

      - * - * @since 2.0 - */ - ACCEPT, - - /** - *

      - * This result indicates that the tree visit should continue, but should skip the current component's subtree. - *

      - */ - REJECT, - - /** - *

      - * This result indicates that the tree visit should be terminated. - *

      - */ - COMPLETE -} diff --git a/impl/src/main/java/jakarta/faces/context/ExceptionHandler.java b/impl/src/main/java/jakarta/faces/context/ExceptionHandler.java deleted file mode 100644 index ec59b8e91c..0000000000 --- a/impl/src/main/java/jakarta/faces/context/ExceptionHandler.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.context; - -import jakarta.faces.FacesException; -import jakarta.faces.event.AbortProcessingException; -import jakarta.faces.event.ExceptionQueuedEvent; -import jakarta.faces.event.SystemEvent; -import jakarta.faces.event.SystemEventListener; - -/** - *

      - * ExceptionHandler is the central point for handling unexpected - * Exceptions that are thrown during the Faces lifecycle. The ExceptionHandler must not be - * notified of any Exceptions that occur during application startup or shutdown. - *

      - * - *
      - * - *

      - * See the Jakarta Faces Specification Document for the requirements for the default implementation. Exceptions may - * be passed to the ExceptionHandler in one of two ways: - *

      - * - *
        - * - *
      • - *

        - * by ensuring that Exceptions are not caught, or are caught and re-thrown. - *

        - * - *

        - * This approach allows the ExceptionHandler facility specified in - * section 6.2 "ExceptionHandler" of the Jakarta Faces Specification Document to - * operate on the Exception. - *

        - * - *
      • - * - *
      • - *

        - * By using the system event facility to publish an {@link ExceptionQueuedEvent} that wraps the Exception. - *

        - * - *

        - * This approach requires manually publishing the {@link ExceptionQueuedEvent}, but allows more information about the - * Exceptionto be stored in the event. The following code is an example of how to do this. - *

        - * - *
        - * 
        - *
        - * //...
        - * } catch (Exception e) {
        - *   FacesContext ctx = FacesContext.getCurrentInstance();
        - *   ExceptionQueuedEventContext eventContext = new ExceptionQueuedEventContext(ctx, e);
        - *   eventContext.getAttributes().put("key", "value");
        - *   ctx.getApplication().publishEvent(ExceptionQueuedEvent.class, eventContext);
        - * }
        - *
        - * 
        - * 
        - * - *

        - * Because the Exception must not be re-thrown when using this approach, lifecycle processing may continue - * as normal, allowing more Exceptions to be published if necessary. - *

        - * - *
      • - *
      - * - *

      - * With either approach, any ExceptionQueuedEvent instances that are published in this way are accessible - * to the {@link #handle} method, which is called at the end of each lifecycle phase, as specified in - * section 6.2 "ExceptionHandler" of the Jakarta Faces Specification Document. - *

      - * - *

      - * Note that if {@link #handle} happens to be invoked during {@link jakarta.faces.event.PhaseId#RENDER_RESPONSE}, the - * recovery options are more limited than when it is invoked during other phases. Specifically, it is not valid to call - * {@link jakarta.faces.application.NavigationHandler#handleNavigation} during {@code RENDER_RESPONSE}. - *

      - * - *

      - * Instances of this class are request scoped and are created by virtue of {@link FacesContextFactory#getFacesContext} - * calling {@link ExceptionHandlerFactory#getExceptionHandler}. - *

      - * - *
      - * - * @since 2.0 - */ -public abstract class ExceptionHandler implements SystemEventListener { - - /** - *

      - * Take action to handle the Exception instances residing inside the {@link ExceptionQueuedEvent} instances - * that have been queued by calls to Application().publishEvent(ExceptionQueuedEvent.class, - * eventContext). The requirements of the default implementation are detailed in - * section 6.2.1 "Default ExceptionHandler implementation" of the Jakarta Faces Specification Document. - *

      - * - * @throws FacesException if and only if a problem occurs while performing the algorithm to handle the - * Exception, not as a means of conveying a handled Exception itself. - * - * @since 2.0 - */ - public abstract void handle() throws FacesException; - - /** - *

      - * Return the first ExceptionQueuedEvent handled by this handler. - *

      - * - * @return instance of ExceptionQueuedEvent. - * - */ - public abstract ExceptionQueuedEvent getHandledExceptionQueuedEvent(); - - /** - *

      - * Return an Iterable over all ExceptionQueuedEvents that have not yet been handled by the - * {@link #handle} method. - *

      - * - * @return the unhandled set of ExceptionQueuedEvents. - * - */ - public abstract Iterable getUnhandledExceptionQueuedEvents(); - - /** - *

      - * The default implementation must return an Iterable over all ExceptionQueuedEvents that have - * been handled by the {@link #handle} method. - *

      - * - * @return an Iterable over all ExceptionQueuedEvents. - * - */ - public abstract Iterable getHandledExceptionQueuedEvents(); - - /** - * {@inheritDoc} - */ - @Override - public abstract void processEvent(SystemEvent exceptionQueuedEvent) throws AbortProcessingException; - - /** - * {@inheritDoc} - */ - @Override - public abstract boolean isListenerForSource(Object source); - - /** - *

      - * Unwrap the argument t until the unwrapping encounters an Object whose getClass() is not - * equal to FacesException.class or jakarta.el.ELException.class. If there is no root cause, - * null is returned. - *

      - * - * @param t passed-in wrapped Throwable. - * - * @return unwrapped object. - * - * @throws NullPointerException if argument t is null. - * - * @since 2.0 - */ - public abstract Throwable getRootCause(Throwable t); - -} diff --git a/impl/src/main/java/jakarta/faces/context/ExceptionHandlerFactory.java b/impl/src/main/java/jakarta/faces/context/ExceptionHandlerFactory.java deleted file mode 100644 index 77718ae786..0000000000 --- a/impl/src/main/java/jakarta/faces/context/ExceptionHandlerFactory.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.context; - -import jakarta.faces.FacesWrapper; - -/** - *

      - * ExceptionHandlerFactory is a factory object that creates (if needed) - * and returns a new {@link ExceptionHandler} instance. - *

      - * - *
      - * - *

      - * There must be one ExceptionHandlerFactory instance per web application that is utilizing Jakarta Server - * Faces. This instance can be acquired, in a portable manner, by calling: - *

      - * - *
      - * 
      - *   ExceptionHandlerFactory factory = (ExceptionHandlerFactory)
      - *    FactoryFinder.getFactory(FactoryFinder.EXCEPTION_HANDLER_FACTORY);
      - * 
      - * 
      - * - * - *
      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - * @since 2.0 - */ - -public abstract class ExceptionHandlerFactory implements FacesWrapper { - - private ExceptionHandlerFactory wrapped; - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public ExceptionHandlerFactory() { - - } - - /** - *

      - * If this factory has been decorated, the implementation doing the decorating should push the implementation being - * wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - */ - public ExceptionHandlerFactory(ExceptionHandlerFactory wrapped) { - this.wrapped = wrapped; - } - - /** - *

      - * If this factory has been decorated, the implementation doing the decorating may override this method to provide - * access to the implementation being wrapped. - *

      - */ - @Override - public ExceptionHandlerFactory getWrapped() { - return wrapped; - } - - /** - *

      - * Create and return a A new ExceptionHandler instance. The implementation must return an - * ExceptionHandler instance suitable for the environment. For example, in some cases it may be desirable - * for an ExceptionHandler to write error information to the response instead of throwing exceptions as in - * the case of Ajax applications. - *

      - * - * @return newly created ExceptionHandler. - * - */ - public abstract ExceptionHandler getExceptionHandler(); - -} diff --git a/impl/src/main/java/jakarta/faces/context/ExceptionHandlerWrapper.java b/impl/src/main/java/jakarta/faces/context/ExceptionHandlerWrapper.java deleted file mode 100644 index 30df102768..0000000000 --- a/impl/src/main/java/jakarta/faces/context/ExceptionHandlerWrapper.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.context; - -import jakarta.faces.FacesException; -import jakarta.faces.FacesWrapper; -import jakarta.faces.event.AbortProcessingException; -import jakarta.faces.event.ExceptionQueuedEvent; -import jakarta.faces.event.SystemEvent; - -/** - *

      - * Provides a simple implementation of {@link ExceptionHandler} that can be - * subclassed by developers wishing to provide specialized behavior to an existing {@link ExceptionHandler} instance. - * The default implementation of all methods is to call through to the wrapped {@link ExceptionHandler} instance. - *

      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - * @since 2.0 - */ -public abstract class ExceptionHandlerWrapper extends ExceptionHandler implements FacesWrapper { - - private ExceptionHandler wrapped; - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public ExceptionHandlerWrapper() { - - } - - /** - *

      - * If this exception handler has been decorated, the implementation doing the decorating should push the implementation - * being wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - * @since 2.3 - */ - public ExceptionHandlerWrapper(ExceptionHandler wrapped) { - this.wrapped = wrapped; - } - - @Override - public ExceptionHandler getWrapped() { - return wrapped; - } - - // ------------------------------------------- Methods from ExceptionHandler - - /** - *

      - * The default behavior of this method is to call {@link ExceptionHandler#getHandledExceptionQueuedEvent()} on the - * wrapped {@link ExceptionHandler} object. - *

      - * - * @see ExceptionHandler#getHandledExceptionQueuedEvent() - */ - @Override - public ExceptionQueuedEvent getHandledExceptionQueuedEvent() { - return getWrapped().getHandledExceptionQueuedEvent(); - } - - /** - *

      - * The default behavior of this method is to call {@link jakarta.faces.context.ExceptionHandler#handle()} on the wrapped - * {@link ExceptionHandler} object. - *

      - * - * @see jakarta.faces.context.ExceptionHandler#handle() - */ - @Override - public void handle() throws FacesException { - getWrapped().handle(); - } - - /** - *

      - * The default behavior of this method is to call - * {@link jakarta.faces.context.ExceptionHandler#isListenerForSource(Object)} on the wrapped {@link ExceptionHandler} - * object. - *

      - * - * @see jakarta.faces.context.ExceptionHandler#isListenerForSource(Object) () - */ - @Override - public boolean isListenerForSource(Object source) { - return getWrapped().isListenerForSource(source); - } - - /** - *

      - * The default behavior of this method is to call - * {@link jakarta.faces.context.ExceptionHandler#processEvent(jakarta.faces.event.SystemEvent)} on the wrapped - * {@link ExceptionHandler} object. - *

      - * - * @see jakarta.faces.context.ExceptionHandler#processEvent(jakarta.faces.event.SystemEvent) - */ - @Override - public void processEvent(SystemEvent event) throws AbortProcessingException { - getWrapped().processEvent(event); - } - - /** - *

      - * The default behavior of this method is to call {@link jakarta.faces.context.ExceptionHandler#getRootCause(Throwable)} - * on the wrapped {@link ExceptionHandler} object. - *

      - * - * @see jakarta.faces.context.ExceptionHandler#getRootCause(Throwable) - */ - @Override - public Throwable getRootCause(Throwable t) { - return getWrapped().getRootCause(t); - } - - /** - *

      - * The default behavior of this method is to call {@link ExceptionHandler#getHandledExceptionQueuedEvents()} on the - * wrapped {@link ExceptionHandler} object. - *

      - * - * @see ExceptionHandler#getHandledExceptionQueuedEvents() - */ - @Override - public Iterable getHandledExceptionQueuedEvents() { - return getWrapped().getHandledExceptionQueuedEvents(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExceptionHandler#getUnhandledExceptionQueuedEvents()} on the - * wrapped {@link ExceptionHandler} object. - *

      - * - * @see ExceptionHandler#getUnhandledExceptionQueuedEvents() - */ - @Override - public Iterable getUnhandledExceptionQueuedEvents() { - return getWrapped().getUnhandledExceptionQueuedEvents(); - } - -} diff --git a/impl/src/main/java/jakarta/faces/context/ExternalContext.java b/impl/src/main/java/jakarta/faces/context/ExternalContext.java deleted file mode 100644 index ca9a3fab01..0000000000 --- a/impl/src/main/java/jakarta/faces/context/ExternalContext.java +++ /dev/null @@ -1,2208 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.context; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.UnsupportedEncodingException; -import java.io.Writer; -import java.net.MalformedURLException; -import java.net.URL; -import java.security.Principal; -import java.util.Iterator; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Set; - -import jakarta.faces.lifecycle.ClientWindow; - -/** - *

      - * This class - * allows the Faces API to be unaware of the nature of its containing application environment. In particular, this class - * allows Jakarta Faces based applications to run in either a Jakarta Servlet or a Portlet environment. - *

      - * - *

      - * The documentation for this class only specifies the behavior for the Jakarta Servlet implementation of - * ExternalContext. The Portlet implementation of ExternalContext is specified under - * the revision of the Portlet Bridge Specification for JavaServer - * Faces JSR that corresponds to this version of the Jakarta Faces Specification. - * See the Preface of the Jakarta Faces Specification Document, for a reference. - *

      - * - *

      - * If a reference to an ExternalContext is obtained during application startup or shutdown time, any method - * documented as "valid to call this method during application startup or shutdown" must be supported during application - * startup or shutdown time. The result of calling a method during application startup or shutdown time that does not - * have this designation is undefined. - *

      - * - *

      - * An ExternalContext can be injected into a CDI managed bean using - * @Inject ExternalContext externalContext; - *

      - */ - -public abstract class ExternalContext { - - @SuppressWarnings({ "UnusedDeclaration" }) - private ExternalContext defaultExternalContext; - - // ------------------------------------------------------ Manifest Constants - - /** - *

      - * String identifier for BASIC authentication. - *

      - */ - public static final String BASIC_AUTH = "BASIC"; - - /** - *

      - * String identifier for CLIENT_CERT authentication. - *

      - */ - public static final String CLIENT_CERT_AUTH = "CLIENT_CERT"; - - /** - *

      - * String identifier for DIGEST authentication. - *

      - */ - public static final String DIGEST_AUTH = "DIGEST"; - - /** - *

      - * String identifier for FORM authentication. - *

      - */ - public static final String FORM_AUTH = "FORM"; - - // ---------------------------------------------------------- Public Methods - - /** - *

      - * Adds the cookie represented by the arguments to the response. - *

      - * - *
      - * - *

      - * Jakarta Servlet: This must be accomplished by calling the - * jakarta.servlet.http.HttpServletResponse method addCookie(). The Cookie - * argument must be constructed by passing the name and value parameters. If the - * properties arugument is non-null and not empty, the Cookie instance must be - * initialized as described below. - *

      - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
      Cookie handling table
      Key in "values" Map (case sensitive)Expected type of value.Name of setter method on Cookie instance to be set with the value from the Map.
      commentStringsetComment
      domainStringsetDomain
      maxAgeIntegersetMaxAge
      secureBooleansetSecure
      pathStringsetPath
      httpOnlyBooleansetHttpOnly
      any other attribute (e.g. SameSite)StringsetAttribute
      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - *
      - * - * @param name To be passed as the first argument to the Cookie constructor. - * - * @param value To be passed as the second argument to the Cookie constructor. - * - * @param properties A Map containg key/value pairs to be passed as arguments to the setter methods as - * described above. - * - * @since 2.0 - */ - - public void addResponseCookie(String name, String value, Map properties) { - - if (defaultExternalContext != null) { - defaultExternalContext.addResponseCookie(name, value, properties); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Dispatch a request to the specified resource to create output for this - * response. - *

      - * - *

      - * Jakarta Servlet: This must be accomplished by calling the jakarta.servlet.ServletContext method - * getRequestDispatcher(path), and calling the forward() method on the resulting object. - *

      - *

      - * If the call to getRequestDisatcher(path) returns null, send - * aServletResponse SC_NOT_FOUND error code. - *

      - * - * @param path Context relative path to the specified resource, which must start with a slash ("/") character - * - * @throws jakarta.faces.FacesException thrown if a ServletException occurs - * @throws IOException if an input/output error occurs - */ - public abstract void dispatch(String path) throws IOException; - - /** - *

      - * Return the input URL, after performing any rewriting needed to ensure that - * it will correctly identify an addressable action in the current application. - *

      - * - *

      - * Encoding the {@link jakarta.faces.lifecycle.ClientWindow} - *

      - * - *
      - * - *

      - * Call - * {@link jakarta.faces.lifecycle.ClientWindow#isClientWindowRenderModeEnabled(jakarta.faces.context.FacesContext) }. If - * the result is false take no further action and return the rewritten URL. If the result is - * true, call {@link #getClientWindow()}. If the result is non-null, call - * {@link jakarta.faces.lifecycle.ClientWindow#getId()} and append the id to the query string of the URL, making the - * necessary allowances for a pre-existing query string or no query-string. - *

      - * - *

      - * Call {@link jakarta.faces.lifecycle.ClientWindow#getQueryURLParameters}. If the result is non-{@code null}, for each - * parameter in the map, unconditionally add that parameter to the URL. - *

      - * - *

      - * The name of the query string parameter is given by the value of the constant - * {@link jakarta.faces.render.ResponseStateManager#CLIENT_WINDOW_URL_PARAM}. - *

      - * - *
      - * - *

      - * Jakarta Servlet: This must be the value returned by the - * jakarta.servlet.http.HttpServletResponse method encodeURL(url). - *

      - * - * @param url The input URL to be encoded - * - * @return the encoded URL. - * - * @throws NullPointerException if url is null - */ - public abstract String encodeActionURL(String url); - - /** - *

      - * Return the specified name, after prefixing it with a namespace that ensures - * that it will be unique within the context of a particular page. - *

      - * - *

      - * Jakarta Servlet: The input value must be returned unchanged. - *

      - * - * @param name Name to be encoded - * - * @return the unique name prefixed with namespace. - * - * - * - */ - public abstract String encodeNamespace(String name); - - /** - *

      - * Return the input URL, after performing any rewriting needed to ensure that it will correctly identify an addressable - * resource in the current application. - *

      - * - *

      - * Jakarta Servlet: This must be the value returned by the - * jakarta.servlet.http.HttpServletResponse method encodeURL(url). - *

      - * - * @param url The input URL to be encoded - * - * @return the encoded resource URL. - * - * @throws NullPointerException if url is null - */ - // PENDING(craigmcc) - Currently identical to encodeActionURL() - public abstract String encodeResourceURL(String url); - - /** - *

      - * Return the websocket URL, after performing any rewriting needed to ensure that it will correctly identify an - * addressable websocket in the current application. - *

      - * - *

      - * Jakarta Servlet: This must ensure that the input URL is prefixed with the correct websocket scheme, domain - * and port and then encoded by {@link #encodeResourceURL(String)}. - *

      - * - * @param url The input URL to be encoded. - * - * @return the encoded websocket URL. - * - * @throws NullPointerException if url is null. - * - * @since 2.3 - */ - public abstract String encodeWebsocketURL(String url); - - /** - *

      - * Return a mutable Map representing the application scope - * attributes for the current application. The returned Map must implement the entire contract for a - * modifiable map as described in the JavaDocs for java.util.Map. Modifications made in the - * Map must cause the corresponding changes in the set of application scope attributes. Particularly the - * clear(), remove(), put(), putAll(), and get() - * operations must take the appropriate action on the underlying data structure. - *

      - * - *

      - * It is valid to call this method during application startup or shutdown. If called at startup or shutdown time, this - * method returns a Map that is backed by the same container context instance (ServletContext - * or PortletContext) as the one returned by calling getApplicationMap() on the - * ExternalContext returned by the FacesContext during an actual request. - *

      - * - *

      - * Jakarta Servlet: This must be the set of attributes available via the - * jakarta.servlet.ServletContext methods getAttribute(), getAttributeNames(), - * removeAttribute(), and setAttribute(). - *

      - * - * @return the map associated with the backed ServletContext. - * - */ - public abstract Map getApplicationMap(); - - /** - *

      - * Return the name of the authentication scheme used to authenticate the current user, if any; otherwise, return - * null. For standard authentication schemes, the returned value will match one of the following constants: - * BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, or FORM_AUTH. - *

      - * - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.http.HttpServletRequest - * method getAuthType(). - *

      - * - * @return the authentication type. - */ - public abstract String getAuthType(); - - /** - *

      - * Return the threadsafe {@link Flash} for this application. The default implementation will throw - * UnsupportedOperationException. Compliant Jakarta Faces runtimes must provide an implementation of - * this method. - *

      - * - * @return the Flash for this application. - * - * @since 2.0 - */ - - public Flash getFlash() { - - if (defaultExternalContext != null) { - return defaultExternalContext.getFlash(); - } - - throw new UnsupportedOperationException(); - - } - - /** - *

      - * Returns the MIME type of the specified file or null if the MIME type is not known. The MIME type is - * determined by the container. - *

      - * - *

      - * It is valid to call this method during application startup or shutdown. If called during application startup or - * shutdown, this method calls through to the getMimeType() method on the same container context instance - * (ServletContext or PortletContext) as the one used when calling getMimeType() - * on the ExternalContext returned by the FacesContext during an actual request. - *

      - * - *
      - * - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.ServletContext method - * getMimeType(). - *

      - * - *
      - * - * @param file The file for which the mime type should be obtained. - * - * @return the MIME type of the file. - * - * @since 2.0 - */ - public String getMimeType(String file) { - - if (defaultExternalContext != null) { - return defaultExternalContext.getMimeType(file); - } - - throw new UnsupportedOperationException(); - - } - - /** - *

      - * Return the application environment object instance for the current - * appication. - *

      - * - *

      - * It is valid to call this method during application startup or shutdown. If called during application startup or - * shutdown, this returns the same container context instance (ServletContext or - * PortletContext) as the one returned when calling getContext() on the - * ExternalContext returned by the FacesContext during an actual request. - *

      - * - * - *

      - * Jakarta Servlet: This must be the current application's jakarta.servlet.ServletContext - * instance. - *

      - * - * @return the object of the ServletContext. - * - */ - public abstract Object getContext(); - - /** - * - *

      - * Return the name of the container context for this application. - *

      - * - *

      - * Return the result of calling getServletContextName() on the ServletContext instance for - * this application. It is valid to call this method during application startup or shutdown. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @return the name the ServletContext. - * - */ - public String getContextName() { - - if (defaultExternalContext != null) { - return defaultExternalContext.getContextName(); - } - - throw new UnsupportedOperationException(); - - } - - /** - * - *

      - * Return the name of the container context for this application. - *

      - * - *

      - * Jakarta Servlet: Return the result of calling getContextPath() on the - * ServletContext instance for this application. - *

      - * - *

      - * It is valid to call this method during application startup or shutdown. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @return the context path of this application. - * - * @since 2.2 - */ - - public String getApplicationContextPath() { - - if (defaultExternalContext != null) { - return defaultExternalContext.getApplicationContextPath(); - } - - throw new UnsupportedOperationException(); - - } - - /** - *

      - * Return the value of the specified application initialization parameter (if - * any). - *

      - * - *

      - * Jakarta Servlet: This must be the result of the jakarta.servlet.ServletContext method - * getInitParameter(name). - *

      - * - *

      - * It is valid to call this method during application startup or shutdown. If called during application startup or - * shutdown, this method calls through to the actual container context to return the init parameter value. - *

      - * - * @param name Name of the requested initialization parameter - * - * @throws NullPointerException if name is null - * - * @return the value of the specified parameter. - * - */ - public abstract String getInitParameter(String name); - - /** - *

      - * Return an immutable Map whose keys are the set of application - * initialization parameter names configured for this application, and whose values are the corresponding parameter - * values. The returned Map must implement the entire contract for an unmodifiable map as described in the - * JavaDocs for java.util.Map. - *

      - * - *

      - * It is valid to call this method during application startup or shutdown. If called during application startup or - * shutdown, this method returns a Map that is backed by the same container context instance - * (ServletContext or PortletContext) as the one returned by calling - * getInitParameterMap() on the ExternalContext returned by the FacesContext - * during an actual request. - *

      - * - *

      - * Jakarta Servlet: This result must be as if it were synthesized by calling the - * jakarta.servlet.ServletContext method getInitParameterNames, and putting each configured - * parameter name/value pair into the result. - *

      - * - * @return the init parameter map for this application. - * - */ - public abstract Map getInitParameterMap(); - - /** - *

      - * Return the login name of the user making the current request if any; otherwise, return null. - *

      - * - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.http.HttpServletRequest - * method getRemoteUser(). - *

      - * - * @return the user name of the current request. - * - */ - public abstract String getRemoteUser(); - - /** - *

      - * Return the environment-specific object instance for the current request. - *

      - * - *

      - * Jakarta Servlet: This must be the current request's jakarta.servlet.http.HttpServletRequest - * instance. - *

      - * - * @return the instance of the current request. - * - */ - public abstract Object getRequest(); - - /** - *

      - * Set the environment-specific request to be returned by subsequent calls to {@link #getRequest}. This may be used to - * install a wrapper for the request. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @param request the request object to be set. - * - * @since 1.2 - */ - public void setRequest(Object request) { - - if (defaultExternalContext != null) { - defaultExternalContext.setRequest(request); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Returns the name of the scheme used to make this request, for example, http, https, or ftp. - *

      - * - *
      - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.ServletRequest method - * getScheme(). - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - *
      - * - * @return the name of the scheme. - * - * @since 2.0 - */ - public String getRequestScheme() { - - if (defaultExternalContext != null) { - return defaultExternalContext.getRequestScheme(); - } - - throw new UnsupportedOperationException(); - } - - /** - *

      - * Returns the host name of the server to which the request was sent. - *

      - * - *
      - * - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.ServletRequest method - * getServerName(). - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - *
      - * - * @return the host name of the server. - * - * @since 2.0 - */ - public String getRequestServerName() { - - if (defaultExternalContext != null) { - return defaultExternalContext.getRequestServerName(); - } - - throw new UnsupportedOperationException(); - - } - - /** - *

      - * Returns the port number to which the request was sent. - *

      - * - *
      - * - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.ServletRequest method - * getServerPort(). - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - *
      - * - * @return the port number to which the request was sent. - * - * @since 2.0 - */ - public int getRequestServerPort() { - - if (defaultExternalContext != null) { - return defaultExternalContext.getRequestServerPort(); - } - - throw new UnsupportedOperationException(); - } - - /** - * - *

      - * Overrides the name of the character encoding used in the body of this request. - *

      - * - *

      - * Calling this method after the request has been accessed will have no no effect, unless a Reader or - * Stream has been obtained from the request, in which case an IllegalStateException is - * thrown. - *

      - * - *

      - * Jakarta Servlet: This must call through to the jakarta.servlet.ServletRequest method - * setCharacterEncoding(). - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @param encoding the encoding name to be set. - * - * @throws java.io.UnsupportedEncodingException if this is not a valid encoding - * - * @since 1.2 - * - */ - public void setRequestCharacterEncoding(String encoding) throws UnsupportedEncodingException { - - if (defaultExternalContext != null) { - defaultExternalContext.setRequestCharacterEncoding(encoding); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Returns a String containing the real path for a given virtual path. - *

      - * - *

      - * It is valid to call this method during application startup or shutdown. If called during application startup or - * shutdown, this method calls through to the getRealPath() method on the same container context instance - * (ServletContext or PortletContext) as the one used when calling getRealPath() - * on the ExternalContext returned by the FacesContext during an actual request. - *

      - * - *
      - * - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.ServletContext method - * getRealPath(). - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - *
      - * - * @param path The context of the requested initialization parameter - * - * @return the real path for the specified virtual path. - * - * @since 2.0 - */ - public String getRealPath(String path) { - - if (defaultExternalContext != null) { - return defaultExternalContext.getRealPath(path); - } - - throw new UnsupportedOperationException(); - - } - - /** - *

      - * Return the portion of the request URI that identifies the web application context for this request. - *

      - * - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.http.HttpServletRequest - * method getContextPath(). - *

      - * - * @return the context path for this request. - */ - public abstract String getRequestContextPath(); - - /** - *

      - * Return an immutable Map whose keys are the set of cookie names included in the current request, and - * whose values (of type jakarta.servlet.http.Cookie) are the first (or only) cookie for each cookie name - * returned by the underlying request. The returned Map must implement the entire contract for an - * unmodifiable map as described in the JavaDocs for java.util.Map. - *

      - * - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.http.HttpServletRequest - * method getCookies(), unless null was returned, in which case this must be a zero-length - * array. - *

      - * - * @return the cookie map in the current request. - * - */ - public abstract Map getRequestCookieMap(); - - /** - *

      - * Return an immutable Map whose keys are the set of request header names included in the current request, - * and whose values (of type String) are the first (or only) value for each header name returned by the underlying - * request. The returned Map must implement the entire contract for an unmodifiable map as described in the - * JavaDocs for java.util.Map. In addition, key comparisons must be performed in a case insensitive manner. - *

      - * - *

      - * Jakarta Servlet: This must be the set of headers available via the - * jakarta.servlet.http.HttpServletRequest methods getHeader() and - * getHeaderNames(). - *

      - * - * @return the header map in the current request. - * - */ - public abstract Map getRequestHeaderMap(); - - /** - *

      - * Return an immutable Map whose keys are the set of request header names included in the current request, - * and whose values (of type String[]) are all of the value for each header name returned by the underlying request. The - * returned Map must implement the entire contract for an unmodifiable map as described in the JavaDocs for - * java.util.Map. In addition, key comparisons must be performed in a case insensitive manner. - *

      - * - *

      - * Jakarta Servlet: This must be the set of headers available via the - * jakarta.servlet.http.HttpServletRequest methods getHeaders() and - * getHeaderNames(). - *

      - * - * @return the header values map in the current request. - */ - public abstract Map getRequestHeaderValuesMap(); - - /** - *

      - * Return the preferred Locale in which the client will accept content. - *

      - * - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.ServletRequest method - * getLocale(). - *

      - * - * @return the Locale of the current request. - */ - public abstract Locale getRequestLocale(); - - /** - *

      - * Return an Iterator over the preferred Locales specified in the request, in decreasing order - * of preference. - *

      - * - *

      - * Jakarta Servlet: This must be an Iterator over the values returned by the - * jakarta.servlet.ServletRequest method getLocales(). - *

      - * - * @return the Iterator of Locales of the current request. - * - */ - public abstract Iterator getRequestLocales(); - - /** - *

      - * Return a mutable Map representing the request scope attributes for the current application. The returned - * Map must implement the entire contract for a modifiable map as described in the JavaDocs for - * java.util.Map. Modifications made in the Map must cause the corresponding changes in the - * set of request scope attributes. Particularly the clear(), remove(), put(), - * putAll(), and get() operations must take the appropriate action on the underlying data - * structure. - *

      - * - *

      - * Jakarta Servlet: This must be the set of attributes available via the - * jakarta.servlet.ServletRequest methods getAttribute(), getAttributeNames(), - * removeAttribute(), and setAttribute(). - *

      - * - * @return the map including the attributes of the current request. - * - */ - public abstract Map getRequestMap(); - - /** - *

      - * Return an immutable Map whose keys are the set of request parameters names included in the current - * request, and whose values (of type String) are the first (or only) value for each parameter name returned by the - * underlying request. The returned Map must implement the entire contract for an unmodifiable map as - * described in the JavaDocs for java.util.Map. - *

      - * - *

      - * Jakarta Servlet: This must be the set of parameters available via the - * jakarta.servlet.ServletRequest methods getParameter() and getParameterNames(). - *

      - * - * @return the map for the current request parameters. - * - */ - public abstract Map getRequestParameterMap(); - - /** - *

      - * Return an Iterator over the names of all request parameters included in the current request. - *

      - * - *

      - * Jakarta Servlet: This must be an Iterator over the values returned by the - * jakarta.servlet.ServletRequest method getParameterNames(). - *

      - * - * @return the Iterator for the names of the current request parameters. - * - */ - public abstract Iterator getRequestParameterNames(); - - /** - *

      - * Return an immutable Map whose keys are the set of request parameters names included in the current - * request, and whose values (of type String[]) are all of the values for each parameter name returned by the underlying - * request. The returned Map must implement the entire contract for an unmodifiable map as described in the - * JavaDocs for java.util.Map. - *

      - * - *

      - * Jakarta Servlet: This must be the set of parameters available via the - * jakarta.servlet.ServletRequest methods getParameterValues() and - * getParameterNames(). - *

      - * - * @return the map for the parameter values of the current request. - * - */ - public abstract Map getRequestParameterValuesMap(); - - /** - *

      - * Return the extra path information (if any) included in the request URI; otherwise, return null. - *

      - * - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.http.HttpServletRequest - * method getPathInfo(). - *

      - * - * @return the path information of the current request. - * - */ - public abstract String getRequestPathInfo(); - - /** - *

      - * Return the Jakarta Servlet path information (if any) included in the request URI; otherwise, return - * null. - *

      - * - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.http.HttpServletRequest - * method getServletPath(). - *

      - * - * @return the Jakarta Servlet path information of the current request. - */ - public abstract String getRequestServletPath(); - - /** - * - *

      - * Return the character encoding currently being used to interpret this request. - *

      - * - *

      - * Jakarta Servlet: This must return the value returned by the jakarta.servlet.ServletRequest - * method getCharacterEncoding(). - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @return the character encoding currently being used. - * - * @since 1.2 - * - */ - public String getRequestCharacterEncoding() { - - if (defaultExternalContext != null) { - return defaultExternalContext.getRequestCharacterEncoding(); - } - throw new UnsupportedOperationException(); - - } - - /** - * - *

      - * Return the MIME Content-Type for this request. If not available, return null. - *

      - * - *

      - * Jakarta Servlet: This must return the value returned by the jakarta.servlet.ServletRequest - * method getContentType(). - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @return the Content-Type for this request. - * - * @since 1.2 - */ - public String getRequestContentType() { - - if (defaultExternalContext != null) { - return defaultExternalContext.getRequestContentType(); - } - - throw new UnsupportedOperationException(); - - } - - /** - *

      - * Return the result of calling getContentLenth() on the ServletRequest instance for this - * request. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @return the content length of the current request. - * - * @since 2.0 - */ - - public int getRequestContentLength() { - - if (defaultExternalContext != null) { - return defaultExternalContext.getRequestContentLength(); - } - - throw new UnsupportedOperationException(); - - } - - /** - * - *

      - * Returns the name of the character encoding (MIME charset) used for the body - * sent in this response. - *

      - * - *

      - * Jakarta Servlet: This must return the value returned by the jakarta.servlet.ServletResponse - * method getCharacterEncoding(). - *

      - * - *

      - * Portlet: if this method is called during a lifecycle phase other than RENDER_RESPONSE, this must return - * null. If called during RENDER_RESPONSE, return the response encoding of the portlet response. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @return the name of the character encoding. - * - * @since 1.2 - */ - public String getResponseCharacterEncoding() { - - if (defaultExternalContext != null) { - return defaultExternalContext.getResponseCharacterEncoding(); - } - - throw new UnsupportedOperationException(); - - } - - /** - * - *

      - * Return the MIME Content-Type for this response. If not available, return null. - *

      - * - *

      - * Jakarta Servlet: This must return the value returned by the jakarta.servlet.ServletResponse - * method getContentType(). - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @return the MIME Content-Type for this response. - * - * @since 1.2 - */ - public String getResponseContentType() { - - if (defaultExternalContext != null) { - return defaultExternalContext.getResponseContentType(); - } - - throw new UnsupportedOperationException(); - - } - - /** - *

      - * Return a URL for the application resource mapped to the - * specified path, if it exists; otherwise, return null. - *

      - * - *

      - * It is valid to call this method during application startup or shutdown. If called during application startup or - * shutdown, this method calls through to the getResource() method on the same container context instance - * (ServletContext or PortletContext) as the one used when calling getResource() - * on the ExternalContext returned by the FacesContext during an actual request. - *

      - * - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.ServletContext method - * getResource(path). - *

      - * - * @param path The path to the requested resource, which must start with a slash ("/" character - * - * @return the URL of the resource. - * - * @throws MalformedURLException if the specified path is not in the correct form - * @throws NullPointerException if path is null - */ - public abstract URL getResource(String path) throws MalformedURLException; - - /** - *

      - * Return an InputStream for an application resource mapped to - * the specified path, if it exists; otherwise, return null. - *

      - * - *

      - * It is valid to call this method during application startup or shutdown. If called during application startup or - * shutdown, this method calls through to the getResourceAsStream() method on the same container context - * instance (ServletContext or PortletContext) as the one used when calling - * getResourceAsStream() on the ExternalContext returned by the FacesContext - * during an actual request. - *

      - * - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.ServletContext method - * getResourceAsStream(path). - *

      - * - * @param path The path to the requested resource, which must start with a slash ("/" character - * - * @return the InputStream for the application resource. - * - * @throws NullPointerException if path is null - */ - public abstract InputStream getResourceAsStream(String path); - - /** - *

      - * Return the Set of resource paths for all application resources - * whose resource path starts with the specified argument. - *

      - * - *

      - * It is valid to call this method during application startup or shutdown. If called during application startup or - * shutdown, this method calls through to the getResourcePaths() method on the same container context - * instance (ServletContext or PortletContext) as the one used when calling - * getResourcePaths() on the ExternalContext returned by the FacesContext during - * an actual request. - *

      - * - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.ServletContext method - * getResourcePaths(path). - *

      - * - * @param path Partial path used to match resources, which must start with a slash ("/") character - * - * @return the Set of resource paths for the application resources. - * - * @throws NullPointerException if path is null - */ - public abstract Set getResourcePaths(String path); - - /** - *

      - * Return the environment-specific object instance for the current response. - *

      - * - *

      - * Jakarta Servlet: This is the current request's jakarta.servlet.http.HttpServletResponse - * instance. - *

      - * - * @return the instance of the current jakarta.servlet.http.HttpServletResponse. - */ - public abstract Object getResponse(); - - /** - *

      - * Set the environment-specific response to be returned by subsequent calls to {@link #getResponse}. This may be used to - * install a wrapper for the response. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @param response the response instance to be set. - * - * @since 1.2 - */ - public void setResponse(Object response) { - - if (defaultExternalContext != null) { - defaultExternalContext.setResponse(response); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Returns an OutputStream suitable for writing binary data to the user-agent. - *

      - * - *
      - * - *

      - * Jakarta Servlet: This must return the value returned by the jakarta.servlet.ServletResponse - * method getOutputStream(). - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - *
      - * - * @return the OutputStream for the current response. - * - * @throws IOException any IO related exception. - * - * @since 2.0 - */ - public OutputStream getResponseOutputStream() throws IOException { - - if (defaultExternalContext != null) { - return defaultExternalContext.getResponseOutputStream(); - } - - throw new UnsupportedOperationException(); - - } - - /** - *

      - * Returns a Writer suitable for writing character data to the user-agent. - *

      - * - *
      - * - *

      - * Jakarta Servlet: This must return the value returned by the - * {@link jakarta.servlet.ServletResponse#getWriter}. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - *
      - * - * @return the Writer for the current response. - * - * @throws IOException any IO related exception. - * - * @since 2.0 - */ - public Writer getResponseOutputWriter() throws IOException { - - if (defaultExternalContext != null) { - return defaultExternalContext.getResponseOutputWriter(); - } - - throw new UnsupportedOperationException(); - - } - - /** - * - *

      - * Sets the character encoding (MIME charset) of the response being sent to the client, for example, to UTF-8. - *

      - * - *

      - * Jakarta Servlet: This must call through to the jakarta.servlet.ServletResponse method - * setCharacterEncoding(). - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @param encoding the character encoding to be sent by the current response. - * - * @since 1.2 - * - */ - public void setResponseCharacterEncoding(String encoding) { - - if (defaultExternalContext != null) { - defaultExternalContext.setResponseCharacterEncoding(encoding); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Sets the content type of the response being sent to the client, if the response has not been committed yet. - *

      - * - *
      - * - *

      - * Jakarta Servlet: This must call setContentType() on the underlying - * jakarta.servlet.ServletResponse instance. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - *
      - * - * @param contentType The content type to be set as the contentType of the response. - * - * @since 2.0 - */ - public void setResponseContentType(String contentType) { - - if (defaultExternalContext != null) { - defaultExternalContext.setResponseContentType(contentType); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * If the create parameter is true, create (if necessary) and return a session instance - * associated with the current request. If the create parameter is false return any existing - * session instance associated with the current request, or return null if there is no such session. - *

      - * - *

      - * Jakarta Servlet: This must return the result of calling getSession(create) on the underlying - * jakarta.servlet.http.HttpServletRequest instance. - *

      - * - * @param create Flag indicating whether or not a new session should be created if there is no session associated with - * the current request - * - * @return the session object of the current request. - */ - public abstract Object getSession(boolean create); - - /** - *

      - * Return the id of the current session or the empty string if no session has been created and the create - * parameter is false. - *

      - * - *
      - * - *

      - * Jakarta Servlet: If create is true, obtain a reference to the HttpSession for the - * current request (creating the session if necessary) and return its id. If create is false, - * obtain a reference to the current session, if one exists, and return its id. If no session exists, return the empty - * string. - *

      - * - *
      - * - * @since 2.2 - * - * @param create Flag indicating whether or not a new session should be created if there is no session associated with - * the current request - * - * @return the session id for the current request. - */ - public String getSessionId(boolean create) { - String result = ""; - if (defaultExternalContext != null) { - result = defaultExternalContext.getSessionId(create); - } else { - throw new UnsupportedOperationException(); - } - return result; - } - - /** - *

      - * Returns the maximum time interval, in seconds, that the Jakarta Servlet container will keep this session open between - * client accesses. After this interval, the Jakarta Servlet container will invalidate the session. The maximum time - * interval can be set with the {@link #setSessionMaxInactiveInterval} method. - *

      - * - *

      - * A return value of zero or less indicates that the session will never timeout. - *

      - * - *

      - * Jakarta Servlet: This must return the result of calling getMaxInactiveInterval on the - * underlying jakarta.servlet.http.HttpSession instance. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @return the session maximum inactive interval. - * @since 2.1 - */ - public int getSessionMaxInactiveInterval() { - int result = 0; - if (defaultExternalContext != null) { - result = defaultExternalContext.getSessionMaxInactiveInterval(); - } else { - throw new UnsupportedOperationException(); - } - - return result; - } - - /** - *

      - * Return a mutable Map representing the session scope attributes for the current application. The returned - * Map must implement the entire contract for a modifiable map as described in the JavaDocs for - * java.util.Map. Modifications made in the Map must cause the corresponding changes in the - * set of session scope attributes. Particularly the clear(), remove(), put(), - * and get() operations must take the appropriate action on the underlying data structure. Accessing - * attributes via this Map must cause the creation of a session associated with the current request, if - * such a session does not already exist. - *

      - * - *

      - * Jakarta Servlet: This must be the set of attributes available via the - * jakarta.servlet.http.HttpSession methods getAttribute(), getAttributeNames(), - * removeAttribute(), and setAttribute(). - *

      - * - * @return the session map for the current application. - * - */ - public abstract Map getSessionMap(); - - /** - *

      - * Return the Principal object containing the name of the current authenticated user, if any; otherwise, - * return null. - *

      - * - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.http.HttpServletRequest - * method getUserPrincipal(). - *

      - * - * @return the Principal object. - */ - public abstract Principal getUserPrincipal(); - - /** - *

      - * Return the {@link ClientWindow} set in a preceding call to {@link #setClientWindow}, or null if no such - * call has been made. - *

      - * - * @since 2.2 - * - * @return the instance of the ClientWindow. - */ - public ClientWindow getClientWindow() { - if (defaultExternalContext != null) { - return defaultExternalContext.getClientWindow(); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Invalidates this session then unbinds any objects bound to it. - *

      - * - *
      - * - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.http.HttpSession method - * invalidate(). - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - *
      - * - * @since 2.0 - */ - public void invalidateSession() { - - if (defaultExternalContext != null) { - defaultExternalContext.invalidateSession(); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Return true if the currently authenticated user is included in the specified role. Otherwise, return - * false. - *

      - * - *

      - * Jakarta Servlet: This must be the value returned by the jakarta.servlet.http.HttpServletRequest - * method isUserInRole(role). - *

      - * - * @param role Logical role name to be checked - * - * @return the flag indicating whether the current user is in the specified role. - * - * @throws NullPointerException if role is null - */ - public abstract boolean isUserInRole(String role); - - /** - *

      - * Log the specified message to the application object. - *

      - * - *

      - * It is valid to call this method during application startup or shutdown. If called during application startup or - * shutdown, this calls the log() method on the same container context instance - * (ServletContext or PortletContext) as the one used during a call to log() on - * the ExternalContext returned by the FacesContext during an actual request. - *

      - * - * - *

      - * Jakarta Servlet: This must be performed by calling the jakarta.servlet.ServletContext method - * log(String). - *

      - * - * @param message Message to be logged - * - * @throws NullPointerException if message is null - */ - public abstract void log(String message); - - /** - *

      - * Log the specified message and exception to the application object. - *

      - * - *

      - * It is valid to call this method during application startup or shutdown. If called during application startup or - * shutdown, this calls the log() method on the same container context instance - * (ServletContext or PortletContext) as the one used when calling log() on the - * ExternalContext returned by the FacesContext during an actual request. - *

      - * - *

      - * Jakarta Servlet: This must be performed by calling the jakarta.servlet.ServletContext method - * log(String,Throwable). - *

      - * - * @param message Message to be logged - * @param exception Exception to be logged - * - * @throws NullPointerException if message or exception is null - */ - public abstract void log(String message, Throwable exception); - - /** - *

      - * Redirect a request to the specified URL, and cause the - * responseComplete() method to be called on the {@link FacesContext} instance for the current request. - *

      - * - *

      - * The implementation must determine if the request is an Ajax request by obtaining a - * {@link PartialViewContext} instance from the {@link FacesContext} and calling - * {@link PartialViewContext#isAjaxRequest()}. - *

      - * - *

      - * Jakarta Servlet: For non Ajax requests, this must be - * accomplished by calling the jakarta.servlet.http.HttpServletResponse method - * sendRedirect().

      For Ajax requests, the implementation must: - *
      - *
        - *
      • Get a {@link PartialResponseWriter} instance from the {@link FacesContext}.
      • - *
      • Call {@link #setResponseContentType} with text/xml
      • - *
      • Call {@link #setResponseCharacterEncoding} with UTF-8
      • - *
      • Call {@link #addResponseHeader} with Cache-Control, no-cache
      • - *
      • Call {@link PartialResponseWriter#startDocument}
      • - *
      • Call {@link PartialResponseWriter#redirect} with the url argument.
      • - *
      • Call {@link PartialResponseWriter#endDocument}
      • - *
      - * - * @param url Absolute URL to which the client should be redirected - * - * @throws IllegalArgumentException if the specified url is relative - * @throws IllegalStateException if, in a portlet environment, the current response object is a - * RenderResponse instead of an ActionResponse - * @throws IllegalStateException if, in a Jakarta Servlet environment, the current response has already been committed - * @throws IOException if an input/output error occurs - */ - public abstract void redirect(String url) throws IOException; - - /** - *

      - * Set the response header with the given name and value. - *

      - * - *

      - * Jakarta Servlet:This must be performed by calling the jakarta.servlet.http.HttpServletResponse - * setHeader method. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @param name The name of the response header. - * @param value The value of the response header. - * - * @since 2.0 - */ - public void setResponseHeader(String name, String value) { - - if (defaultExternalContext != null) { - defaultExternalContext.setResponseHeader(name, value); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Add the given name and value to the response header. - *

      - * - *

      - * Jakarta Servlet:This must be performed by calling the jakarta.servlet.http.HttpServletResponse - * addHeader method. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @param name The name of the response header. - * @param value The value of the response header. - * - * @since 2.0 - */ - public void addResponseHeader(String name, String value) { - - if (defaultExternalContext != null) { - defaultExternalContext.addResponseHeader(name, value); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Set the buffer size for the current response. - *

      - * - *

      - * Jakarta Servlet: This must be performed by calling the jakarta.servlet.http.HttpServletResponse - * setBufferSize method. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @param size the new buffer size - * - * @since 2.0 - */ - public void setResponseBufferSize(int size) { - - if (defaultExternalContext != null) { - defaultExternalContext.setResponseBufferSize(size); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Return the buffer size for the current response. - *

      - * - *

      - * Jakarta Servlet: This must be performed by calling the jakarta.servlet.http.HttpServletResponse - * getBufferSize method. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @since 2.0 - * - * @return the buffer size of the response. - */ - public int getResponseBufferSize() { - - if (defaultExternalContext != null) { - return defaultExternalContext.getResponseBufferSize(); - } - - throw new UnsupportedOperationException(); - - } - - /** - *

      - * Check if the current response has been committed. - *

      - * - *

      - * Jakarta Servlet: This must be performed by calling the jakarta.servlet.http.HttpServletResponse - * isCommitted method. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @since 2.0 - * - * @return the flag indicating whether the current response has been committed. - */ - public boolean isResponseCommitted() { - - if (defaultExternalContext != null) { - return defaultExternalContext.isResponseCommitted(); - } - throw new UnsupportedOperationException(); - - } - - /** - *

      - * Resets the current response. - *

      - * - *

      - * Jakarta Servlet: This must be performed by calling the jakarta.servlet.http.HttpServletResponse - * reset method. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @since 2.0 - */ - public void responseReset() { - - if (defaultExternalContext != null) { - defaultExternalContext.responseReset(); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Sends an HTTP status code with message. - *

      - * - *

      - * Jakarta Servlet: This must be performed by calling the jakarta.servlet.http.HttpServletResponse - * sendError method. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @param statusCode an HTTP status code - * @param message an option message to detail the cause of the code - * - * @since 2.0 - * - * @throws IOException any IO related exceptions. - */ - public void responseSendError(int statusCode, String message) throws IOException { - - if (defaultExternalContext != null) { - defaultExternalContext.responseSendError(statusCode, message); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Sets the HTTP status code for the response. - *

      - * - *

      - * Jakarta Servlet: This must be performed by calling the jakarta.servlet.http.HttpServletResponse - * setStatus method. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @param statusCode an HTTP status code - * - * @since 2.0 - */ - public void setResponseStatus(int statusCode) { - - if (defaultExternalContext != null) { - defaultExternalContext.setResponseStatus(statusCode); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Specifies the time, in seconds, between client requests before the Jakarta Servlet container will invalidate this - * session. - *

      - * - *

      - * An interval value of zero or less indicates that the session should never timeout. - *

      - * - *

      - * Jakarta Servlet: This must call setMaxInactiveInterval on the underlying - * jakarta.servlet.http.HttpServletRequest instance. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @param interval the value to be set. - * - * @since 2.1 - */ - public void setSessionMaxInactiveInterval(int interval) { - if (defaultExternalContext != null) { - defaultExternalContext.setSessionMaxInactiveInterval(interval); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Associate this instance with a {@link ClientWindow}. - *

      - * - * @param window the window with which this instance is associated. - * - * @since 2.2 - */ - - public void setClientWindow(ClientWindow window) { - if (defaultExternalContext != null) { - defaultExternalContext.setClientWindow(window); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Flushes the buffered response content to the client. - *

      - * - *

      - * Jakarta Servlet: This must be performed by calling the jakarta.servlet.http.HttpServletResponse - * flushBuffer method. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @since 2.0 - * - * @throws IOException any IO related exception. - */ - public void responseFlushBuffer() throws IOException { - - if (defaultExternalContext != null) { - defaultExternalContext.responseFlushBuffer(); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Set the content length of the response. - *

      - * - *

      - * Jakarta Servlet: This must be performed by calling the jakarta.servlet.http.HttpServletResponse - * setContentLength method. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @param length the value to be set. - * - * @since 2.0 - */ - public void setResponseContentLength(int length) { - - if (defaultExternalContext != null) { - defaultExternalContext.setResponseContentLength(length); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * The purpose of this method is to generate a query string from the - * collection of Parameter objects provided by the parameters argument and append that query string to the baseUrl. This - * method must be able to encode the parameters to a baseUrl that may or may not have existing query parameters. The - * parameter values should be encoded appropriately for the environment so that the resulting URL can be used as the - * target of a link (e.g., in an href attribute) in a Jakarta Faces response. It's possible for an - * ExternalContext implementation to override this method in any way that would make the URL bookmarkable in that - * environment. - *

      - * - *

      - * See {@link #encodeActionURL(java.lang.String)} for the required specification of how to encode the - * {@link jakarta.faces.lifecycle.ClientWindow}. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @param baseUrl The base URL onto which the query string generated by this method will be appended. The URL may - * contain query parameters. - * @param parameters The collection of Parameter objects, representing name=value pairs that are used to produce a query - * string - * - * @return the result of encoding. - * - * @since 2.0 - */ - public String encodeBookmarkableURL(String baseUrl, Map> parameters) { - - if (defaultExternalContext != null) { - return defaultExternalContext.encodeBookmarkableURL(baseUrl, parameters); - } - throw new UnsupportedOperationException(); - - } - - /** - * The purpose of this method is to generate a query string from the - * collection of Parameter objects provided by the parameters argument and append that query string to the baseUrl. This - * method must be able to encode the parameters to a baseUrl that may or may not have existing query parameters. The - * parameter values should be encoded appropriately for the environment so that the resulting URL can be used as the - * target of a redirect. It's possible for an ExternalContext implementation to override this method to accomodate the - * definition of redirect for that environment. - * - *

      - * See {@link #encodeActionURL(java.lang.String)} for the required specification of how to encode the - * {@link jakarta.faces.lifecycle.ClientWindow}. - *

      - * - * @param baseUrl The base URL onto which the query string generated by this method will be appended. The URL may - * contain query parameters. - * @param parameters The collection of Parameter objects, representing name=value pairs that are used to produce a query - * string - * - * @return the result of encoding. - * @since 2.0 - */ - public String encodeRedirectURL(String baseUrl, Map> parameters) { - - if (defaultExternalContext != null) { - return defaultExternalContext.encodeRedirectURL(baseUrl, parameters); - } - throw new UnsupportedOperationException(); - - } - - /** - *

      - * Return the input URL, after performing any rewriting needed to ensure that - * it can be used in a partial page submission (ajax request) to correctly identify an addressable action in the current - * application. - *

      - * - *

      - * See {@link #encodeActionURL(java.lang.String)} for the required specification of how to encode the - * {@link jakarta.faces.lifecycle.ClientWindow}. - *

      - * - *
      - * - *

      - * Jakarta Servlet:Returns the same encoded URL as the {@link #encodeActionURL(String url)} method. - *

      - * - *

      - * Portlet:Returns an encoded URL that, upon HTTP POST, will invoke the RESOURCE_PHASE of the portlet - * lifecycle. - *

      - * - *
      - * - * @param url The input URL to be encoded - * - * @return the encoded URL. - * - * @throws NullPointerException if url is null - * - * @since 2.0 - */ - public String encodePartialActionURL(String url) { - if (defaultExternalContext != null) { - return defaultExternalContext.encodePartialActionURL(url); - } - throw new UnsupportedOperationException(); - } - - /** - *

      - * Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS. - * - * - *

      - * Jakarta Servlet: This must return the result of calling isSecure on the underlying - * jakarta.servlet.http.HttpServletRequest instance. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @return the boolean indicating whether this request is secured. - * - * @since 2.1 - */ - public boolean isSecure() { - if (defaultExternalContext != null) { - return defaultExternalContext.isSecure(); - } else { - throw new UnsupportedOperationException(); - } - } - - /** - *

      - * Release any resources associated with this ExternalContext - * instance. This method is called during during destruction of the associated FacesContext. - *

      - * - * @since 4.0 - */ - public abstract void release(); -} diff --git a/impl/src/main/java/jakarta/faces/context/ExternalContextFactory.java b/impl/src/main/java/jakarta/faces/context/ExternalContextFactory.java deleted file mode 100644 index 66292725e7..0000000000 --- a/impl/src/main/java/jakarta/faces/context/ExternalContextFactory.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.context; - -import jakarta.faces.FacesException; -import jakarta.faces.FacesWrapper; - -/** - *

      - * ExternalContextFactory is a factory object that - * creates (if needed) and returns new {@link ExternalContext} instances, initialized for the processing of the - * specified request and response objects. - *

      - * - *

      - * There must be one ExternalContextFactory instance per web application that is utilizing Jakarta Server - * Faces. This instance can be acquired, in a portable manner, by calling: - *

      - * - *
      - * ExternalContextFactory factory = (ExternalContextFactory) FactoryFinder.getFactory(FactoryFinder.EXTERNAL_CONTEXT_FACTORY);
      - * 
      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - */ - -public abstract class ExternalContextFactory implements FacesWrapper { - - private ExternalContextFactory wrapped; - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public ExternalContextFactory() { - - } - - /** - *

      - * If this factory has been decorated, the implementation doing the decorating should push the implementation being - * wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - */ - public ExternalContextFactory(ExternalContextFactory wrapped) { - this.wrapped = wrapped; - } - - /** - *

      - * If this factory has been decorated, the implementation doing the decorating may override this method to provide - * access to the implementation being wrapped. - *

      - * - * @since 2.0 - */ - @Override - public ExternalContextFactory getWrapped() { - return wrapped; - } - - /** - *

      - * Create (if needed) and return an {@link ExternalContext} instance that is - * initialized for the processing of the specified request and response objects, for this web application. - *

      - * - * @param context In Jakarta Servlet environments, the ServletContext that is associated with this web - * application - * @param request In Jakarta Servlet environments, the ServletRequest that is to be processed - * @param response In Jakarta Servlet environments, the ServletResponse that is to be processed - * - * @return the instance of ExternalContext. - * - * @throws FacesException if a {@link ExternalContext} cannot be constructed for the specified parameters - * @throws NullPointerException if any of the parameters are null - * - */ - public abstract ExternalContext getExternalContext(Object context, Object request, Object response) throws FacesException; - -} diff --git a/impl/src/main/java/jakarta/faces/context/ExternalContextWrapper.java b/impl/src/main/java/jakarta/faces/context/ExternalContextWrapper.java deleted file mode 100644 index 3808ac21ad..0000000000 --- a/impl/src/main/java/jakarta/faces/context/ExternalContextWrapper.java +++ /dev/null @@ -1,1092 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.context; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.UnsupportedEncodingException; -import java.io.Writer; -import java.net.MalformedURLException; -import java.net.URL; -import java.security.Principal; -import java.util.Iterator; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Set; - -import jakarta.faces.FacesWrapper; -import jakarta.faces.lifecycle.ClientWindow; - -/** - *

      - * Provides a simple implementation of - * {@link ExternalContext} that can be subclassed by developers wishing to provide specialized behavior to an existing - * {@link ExternalContext} instance. The default implementation of all methods is to call through to the wrapped - * {@link ExternalContext} instance. - *

      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - * @since 2.0 - */ -public abstract class ExternalContextWrapper extends ExternalContext implements FacesWrapper { - - private ExternalContext wrapped; - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public ExternalContextWrapper() { - - } - - /** - *

      - * If this external context has been decorated, the implementation doing the decorating should push the implementation - * being wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - * @since 2.3 - */ - public ExternalContextWrapper(ExternalContext wrapped) { - this.wrapped = wrapped; - } - - @Override - public ExternalContext getWrapped() { - return wrapped; - } - - // -------------------------------------------- Methods from ExternalContext - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#dispatch(String)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#dispatch(String) - */ - @Override - public void dispatch(String path) throws IOException { - getWrapped().dispatch(path); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#encodeActionURL(String)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#encodeActionURL(String) - */ - @Override - public String encodeActionURL(String url) { - return getWrapped().encodeActionURL(url); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#encodeNamespace(String)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#encodeNamespace(String) - */ - @Override - public String encodeNamespace(String name) { - return getWrapped().encodeNamespace(name); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#encodePartialActionURL(String)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#encodePartialActionURL(String) - */ - @Override - public String encodePartialActionURL(String url) { - return getWrapped().encodePartialActionURL(url); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#encodeResourceURL(String)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#encodeResourceURL(String) - */ - @Override - public String encodeResourceURL(String url) { - return getWrapped().encodeResourceURL(url); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#encodeWebsocketURL(String)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#encodeWebsocketURL(String) - */ - @Override - public String encodeWebsocketURL(String url) { - return getWrapped().encodeWebsocketURL(url); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getApplicationMap} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getApplicationMap() - */ - @Override - public Map getApplicationMap() { - return getWrapped().getApplicationMap(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getApplicationContextPath} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getApplicationContextPath() - */ - @Override - public String getApplicationContextPath() { - return getWrapped().getApplicationContextPath(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getAuthType} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getAuthType() - */ - @Override - public String getAuthType() { - return getWrapped().getAuthType(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getContext} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getContext() - */ - @Override - public Object getContext() { - return getWrapped().getContext(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getInitParameter(String)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getInitParameter(String) - */ - @Override - public String getInitParameter(String name) { - return getWrapped().getInitParameter(name); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getInitParameterMap} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getInitParameterMap() - */ - @Override - public Map getInitParameterMap() { - return getWrapped().getInitParameterMap(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRemoteUser} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRemoteUser() - */ - @Override - public String getRemoteUser() { - return getWrapped().getRemoteUser(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequest} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequest() - */ - @Override - public Object getRequest() { - return getWrapped().getRequest(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestContextPath} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestContextPath() - */ - @Override - public String getRequestContextPath() { - return getWrapped().getRequestContextPath(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestCookieMap} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestCookieMap() - */ - @Override - public Map getRequestCookieMap() { - return getWrapped().getRequestCookieMap(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestHeaderMap} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestHeaderMap() - */ - @Override - public Map getRequestHeaderMap() { - return getWrapped().getRequestHeaderMap(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestHeaderValuesMap} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestHeaderValuesMap() - */ - @Override - public Map getRequestHeaderValuesMap() { - return getWrapped().getRequestHeaderValuesMap(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestLocale} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestLocale() - */ - @Override - public Locale getRequestLocale() { - return getWrapped().getRequestLocale(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestLocales} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestLocales() - */ - @Override - public Iterator getRequestLocales() { - return getWrapped().getRequestLocales(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestMap} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestMap() - */ - @Override - public Map getRequestMap() { - return getWrapped().getRequestMap(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestParameterMap} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestParameterMap() - */ - @Override - public Map getRequestParameterMap() { - return getWrapped().getRequestParameterMap(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestParameterNames} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestParameterNames() - */ - @Override - public Iterator getRequestParameterNames() { - return getWrapped().getRequestParameterNames(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestParameterValuesMap} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestParameterValuesMap() - */ - @Override - public Map getRequestParameterValuesMap() { - return getWrapped().getRequestParameterValuesMap(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestPathInfo} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestPathInfo() - */ - @Override - public String getRequestPathInfo() { - return getWrapped().getRequestPathInfo(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestServletPath} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestServletPath() - */ - @Override - public String getRequestServletPath() { - return getWrapped().getRequestServletPath(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getResource(String)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getResource(String) - */ - @Override - public URL getResource(String path) throws MalformedURLException { - return getWrapped().getResource(path); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getResourceAsStream(String)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getResourceAsStream(String) - */ - @Override - public InputStream getResourceAsStream(String path) { - return getWrapped().getResourceAsStream(path); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getResourcePaths(String)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getResourcePaths(String) - */ - @Override - public Set getResourcePaths(String path) { - return getWrapped().getResourcePaths(path); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getResponse} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getResponse() - */ - @Override - public Object getResponse() { - return getWrapped().getResponse(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getSession(boolean)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getSession(boolean) - */ - @Override - public Object getSession(boolean create) { - return getWrapped().getSession(create); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getSessionId(boolean)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @since 2.2 - * - * @see jakarta.faces.context.ExternalContext#getSessionId(boolean) - */ - @Override - public String getSessionId(boolean create) { - return getWrapped().getSessionId(create); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getSessionMap()} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getSessionMap() - */ - @Override - public Map getSessionMap() { - return getWrapped().getSessionMap(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getSessionMaxInactiveInterval()} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getSessionMaxInactiveInterval() - */ - @Override - public int getSessionMaxInactiveInterval() { - return getWrapped().getSessionMaxInactiveInterval(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#setSessionMaxInactiveInterval(int)} on the - * wrapped {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#setSessionMaxInactiveInterval(int) - */ - @Override - public void setSessionMaxInactiveInterval(int interval) { - getWrapped().setSessionMaxInactiveInterval(interval); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#setClientWindow} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @since 2.2 - * - * @param window the window associated with this request. - */ - - @Override - public void setClientWindow(ClientWindow window) { - getWrapped().setClientWindow(window); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getUserPrincipal} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getUserPrincipal() - */ - @Override - public Principal getUserPrincipal() { - return getWrapped().getUserPrincipal(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getClientWindow} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @since 2.2 - * - * @see jakarta.faces.context.ExternalContext#getClientWindow() - */ - @Override - public ClientWindow getClientWindow() { - return getWrapped().getClientWindow(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#isUserInRole(String)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#isUserInRole(String) - */ - @Override - public boolean isUserInRole(String role) { - return getWrapped().isUserInRole(role); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#log(String)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#log(String) - */ - @Override - public void log(String message) { - getWrapped().log(message); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#log(String, Throwable)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#log(String, Throwable) - */ - @Override - public void log(String message, Throwable exception) { - getWrapped().log(message, exception); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#redirect(String)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#redirect(String) - */ - @Override - public void redirect(String url) throws IOException { - getWrapped().redirect(url); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#addResponseCookie(String, String, Map)} on the - * wrapped {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#addResponseCookie(String, String, Map) - */ - @Override - public void addResponseCookie(String name, String value, Map properties) { - getWrapped().addResponseCookie(name, value, properties); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getMimeType(String)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getMimeType(String) - */ - @Override - public String getMimeType(String file) { - return getWrapped().getMimeType(file); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getContextName} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getContextName() - */ - @Override - public String getContextName() { - return getWrapped().getContextName(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#setRequest(Object)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#setRequest(Object) - */ - @Override - public void setRequest(Object request) { - getWrapped().setRequest(request); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestScheme} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestScheme() - */ - @Override - public String getRequestScheme() { - return getWrapped().getRequestScheme(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestServerName} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestServerName() - */ - @Override - public String getRequestServerName() { - return getWrapped().getRequestServerName(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestServerPort} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestServerPort() - */ - @Override - public int getRequestServerPort() { - return getWrapped().getRequestServerPort(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#setRequestCharacterEncoding(String)} on the - * wrapped {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#setRequestCharacterEncoding(String) - */ - @Override - public void setRequestCharacterEncoding(String encoding) throws UnsupportedEncodingException { - getWrapped().setRequestCharacterEncoding(encoding); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRealPath(String)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRealPath(String) - */ - @Override - public String getRealPath(String path) { - return getWrapped().getRealPath(path); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestCharacterEncoding} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestCharacterEncoding() - */ - @Override - public String getRequestCharacterEncoding() { - return getWrapped().getRequestCharacterEncoding(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestContentType} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestContentType() - */ - @Override - public String getRequestContentType() { - return getWrapped().getRequestContentType(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getRequestContentLength} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getRequestContentLength() - */ - @Override - public int getRequestContentLength() { - return getWrapped().getRequestContentLength(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getResponseCharacterEncoding} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getResponseCharacterEncoding() - */ - @Override - public String getResponseCharacterEncoding() { - return getWrapped().getResponseCharacterEncoding(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getResponseContentType} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getResponseContentType() - */ - @Override - public String getResponseContentType() { - return getWrapped().getResponseContentType(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#setResponse(Object)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#setResponse(Object) - */ - @Override - public void setResponse(Object response) { - getWrapped().setResponse(response); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getResponseOutputStream} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getResponseOutputStream() - */ - @Override - public OutputStream getResponseOutputStream() throws IOException { - return getWrapped().getResponseOutputStream(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getResponseOutputWriter} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getResponseOutputWriter() - */ - @Override - public Writer getResponseOutputWriter() throws IOException { - return getWrapped().getResponseOutputWriter(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getResponseCharacterEncoding} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getResponseCharacterEncoding() - */ - @Override - public void setResponseCharacterEncoding(String encoding) { - getWrapped().setResponseCharacterEncoding(encoding); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#setResponseContentType(String)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#setResponseContentType(String) - */ - @Override - public void setResponseContentType(String contentType) { - getWrapped().setResponseContentType(contentType); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#invalidateSession} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#invalidateSession() - */ - @Override - public void invalidateSession() { - getWrapped().invalidateSession(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#setResponseHeader(String,String)} on the - * wrapped {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#setResponseHeader(String,String) - */ - @Override - public void setResponseHeader(String name, String value) { - getWrapped().setResponseHeader(name, value); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#addResponseHeader(String,String)} on the - * wrapped {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#addResponseHeader(String,String) - */ - @Override - public void addResponseHeader(String name, String value) { - getWrapped().addResponseHeader(name, value); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#setResponseBufferSize(int)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#setResponseBufferSize(int) - */ - @Override - public void setResponseBufferSize(int size) { - getWrapped().setResponseBufferSize(size); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getResponseBufferSize()} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getResponseBufferSize() - */ - @Override - public int getResponseBufferSize() { - return getWrapped().getResponseBufferSize(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#isResponseCommitted()} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#isResponseCommitted() - */ - @Override - public boolean isResponseCommitted() { - return getWrapped().isResponseCommitted(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#isSecure} on the wrapped - * {@link ExternalContext} object. - *

      - * - */ - @Override - public boolean isSecure() { - return getWrapped().isSecure(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#responseReset()} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#responseReset() - */ - @Override - public void responseReset() { - getWrapped().responseReset(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#responseSendError(int,String)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#responseSendError(int,String) - */ - @Override - public void responseSendError(int statusCode, String message) throws IOException { - getWrapped().responseSendError(statusCode, message); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#setResponseStatus(int)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#setResponseStatus(int) - */ - @Override - public void setResponseStatus(int statusCode) { - getWrapped().setResponseStatus(statusCode); - } - - /** - *

      - * The default behavior of this method is to call {@link jakarta.faces.context.ExternalContext#responseFlushBuffer()} on - * the wrapped {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#responseFlushBuffer() - */ - @Override - public void responseFlushBuffer() throws IOException { - getWrapped().responseFlushBuffer(); - } - - /** - *

      - * The default behavior of this method is to call - * {@link jakarta.faces.context.ExternalContext#setResponseContentLength(int)} on the wrapped {@link ExternalContext} - * object. - *

      - * - * @see jakarta.faces.context.ExternalContext#setResponseContentLength(int) - */ - @Override - public void setResponseContentLength(int length) { - getWrapped().setResponseContentLength(length); - } - - /** - *

      - * The default behavior of this method is to call - * {@link jakarta.faces.context.ExternalContext#encodeBookmarkableURL(String, java.util.Map)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#encodeBookmarkableURL(String, java.util.Map) - */ - @Override - public String encodeBookmarkableURL(String baseUrl, Map> parameters) { - return getWrapped().encodeBookmarkableURL(baseUrl, parameters); - } - - /** - *

      - * The default behavior of this method is to call - * {@link jakarta.faces.context.ExternalContext#encodeRedirectURL(String, java.util.Map)} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#encodeRedirectURL(String, java.util.Map) - */ - @Override - public String encodeRedirectURL(String baseUrl, Map> parameters) { - return getWrapped().encodeRedirectURL(baseUrl, parameters); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#getFlash()} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#getFlash() - */ - @Override - public Flash getFlash() { - return getWrapped().getFlash(); - } - - /** - *

      - * The default behavior of this method is to call {@link ExternalContext#release()} on the wrapped - * {@link ExternalContext} object. - *

      - * - * @see jakarta.faces.context.ExternalContext#release() - */ - @Override - public void release() { - getWrapped().release(); - } -} diff --git a/impl/src/main/java/jakarta/faces/context/FacesContext.java b/impl/src/main/java/jakarta/faces/context/FacesContext.java deleted file mode 100644 index 4f034cb69c..0000000000 --- a/impl/src/main/java/jakarta/faces/context/FacesContext.java +++ /dev/null @@ -1,906 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.context; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -import jakarta.el.ELContext; -import jakarta.faces.FactoryFinder; -import jakarta.faces.application.Application; -import jakarta.faces.application.FacesMessage; -import jakarta.faces.application.FacesMessage.Severity; -import jakarta.faces.application.ProjectStage; -import jakarta.faces.component.UINamingContainer; -import jakarta.faces.component.UIViewRoot; -import jakarta.faces.event.PhaseId; -import jakarta.faces.lifecycle.Lifecycle; -import jakarta.faces.render.RenderKit; - -/** - *

      - * FacesContext contains all of - * the per-request state information related to the processing of a single Jakarta Faces request, and the - * rendering of the corresponding response. It is passed to, and potentially modified by, each phase of the request - * processing lifecycle. - *

      - * - *

      - * A {@link FacesContext} instance is associated with a particular request at the beginning of request processing, by a - * call to the getFacesContext() method of the {@link FacesContextFactory} instance associated with the - * current web application. The instance remains active until its release() method is called, after which - * no further references to this instance are allowed. While a {@link FacesContext} instance is active, it must not be - * referenced from any thread other than the one upon which the Jakarta Servlet container executing this web application - * utilizes for the processing of this request. - *

      - * - *

      - * A FacesContext can be injected into a request scoped bean using @Inject FacesContext facesContext; - *

      - */ -public abstract class FacesContext { - - private FacesContext defaultFacesContext; - private boolean processingEvents = true; - private boolean isCreatedFromValidFactory = true; - - private static ConcurrentHashMap threadInitContext = new ConcurrentHashMap(2); - private static ConcurrentHashMap initContextServletContext = new ConcurrentHashMap(2); - - /** - * Default constructor. - *

      - * This looks at the callstack to see if we're created from a factory. - *

      - */ - public FacesContext() { - Thread curThread = Thread.currentThread(); - StackTraceElement[] callstack = curThread.getStackTrace(); - if (null != callstack) { - String declaringClassName = callstack[3].getClassName(); - try { - ClassLoader curLoader = curThread.getContextClassLoader(); - Class declaringClass = curLoader.loadClass(declaringClassName); - if (!FacesContextFactory.class.isAssignableFrom(declaringClass)) { - isCreatedFromValidFactory = false; - } - } catch (ClassNotFoundException cnfe) { - - } - } - - } - - // -------------------------------------------------------------- Properties - - /** - *

      - * Return the {@link Application} instance associated with this web - * application. - *

      - * - *

      - * It is valid to call this method during application startup or shutdown. If called during application startup or - * shutdown, returns the correct current {@link jakarta.faces.application.Application} instance. - *

      - * - * @return the Application instance associated with this web application. - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public abstract Application getApplication(); - - /** - *

      - * Return a mutable Map representing the attributes associated wth this FacesContext instance. - * This Map is useful to store attributes that you want to go out of scope when the Faces lifecycle for the - * current request ends, which is not always the same as the request ending, especially in the case of Jakarta Servlet - * filters that are invoked after the Faces lifecycle for this request completes. Accessing this - * Map does not cause any events to fire, as is the case with the other maps: for request, session, and - * application scope. When {@link #release()} is invoked, the attributes must be cleared. - *

      - * - *
      - * - *

      - * The Map returned by this method is not associated with the request. If you would like to get or set - * request attributes, see {@link ExternalContext#getRequestMap}. - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - *
      - * - * @return mutable Map representing the attributes associated wth this FacesContext instance. - * - * @throws IllegalStateException if this method is called after this instance has been released - * - * @since 2.0 - */ - public Map getAttributes() { - if (defaultFacesContext != null) { - return defaultFacesContext.getAttributes(); - } - - if (!isCreatedFromValidFactory) { - if (attributesForInvalidFactoryConstruction == null) { - attributesForInvalidFactoryConstruction = new HashMap<>(); - } - return attributesForInvalidFactoryConstruction; - } - - throw new UnsupportedOperationException(); - } - - private Map attributesForInvalidFactoryConstruction; - - /** - *

      - * Return the {@link PartialViewContext} for this request. The {@link PartialViewContext} is used to control the - * processing of specified components during the execute portion of the request processing lifecycle (known as partial - * processing) and the rendering of specified components (known as partial rendering). This method must return a new - * {@link PartialViewContext} if one does not already exist. - *

      - * - * @return the instance of PartialViewContext for this request. - * - * @throws IllegalStateException if this method is called after this instance has been released - * - * @since 2.0 - */ - public PartialViewContext getPartialViewContext() { - if (defaultFacesContext != null) { - return defaultFacesContext.getPartialViewContext(); - } - - if (!isCreatedFromValidFactory) { - if (partialViewContextForInvalidFactoryConstruction == null) { - PartialViewContextFactory f = (PartialViewContextFactory) FactoryFinder.getFactory(FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY); - partialViewContextForInvalidFactoryConstruction = f.getPartialViewContext(FacesContext.getCurrentInstance()); - } - return partialViewContextForInvalidFactoryConstruction; - } - - throw new UnsupportedOperationException(); - } - - private PartialViewContext partialViewContextForInvalidFactoryConstruction; - - /** - *

      - * Return an Iterator over the client identifiers for which at least one - * {@link jakarta.faces.application.FacesMessage} has been queued. If there are no such client identifiers, an empty - * Iterator is returned. If any messages have been queued that were not associated with any specific client - * identifier, a null value will be included in the iterated values. The elements in the - * Iterator must be returned in the order in which they were added with {@link #addMessage}. - *

      - * - * @return the Iterator over the client identifiers for which at least one - * {@link jakarta.faces.application.FacesMessage} has been queued. - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public abstract Iterator getClientIdsWithMessages(); - - /** - *

      - * Return the ELContext instance for this FacesContext instance. This ELContext - * instance has the same lifetime and scope as the FacesContext instance with which it is associated, and - * may be created lazily the first time this method is called for a given FacesContext instance. Upon - * creation of the ELContext instance, the implementation must take the following action: - *

      - * - *
        - * - *
      • - *

        - * Call the {@link ELContext#putContext} method on the instance, passing in FacesContext.class and the - * this reference for the FacesContext instance itself. - *

        - *
      • - * - *
      • - *

        - * If the Collection returned by {@link jakarta.faces.application.Application#getELContextListeners} is - * non-empty, create an instance of {@link jakarta.el.ELContextEvent} and pass it to each - * {@link jakarta.el.ELContextListener} instance in the Collection by calling the - * {@link jakarta.el.ELContextListener#contextCreated} method. - *

        - *
      • - * - *
      - * - * @return instance of ELContext. - * - * @throws IllegalStateException if this method is called after this instance has been released - * - * @since 1.2 - */ - public ELContext getELContext() { - if (defaultFacesContext != null) { - return defaultFacesContext.getELContext(); - } - - throw new UnsupportedOperationException(); - - } - - /** - *

      - * Return the {@link ExceptionHandler} for this request. - *

      - * - * @return instance of ExceptionHandler. - */ - public ExceptionHandler getExceptionHandler() { - if (defaultFacesContext != null) { - return defaultFacesContext.getExceptionHandler(); - } - - throw new UnsupportedOperationException(); - } - - /** - *

      - * Set the {@link ExceptionHandler} for this request. - *

      - * - * @param exceptionHandler the ExceptionHandler for this request. - */ - public void setExceptionHandler(ExceptionHandler exceptionHandler) { - if (defaultFacesContext != null) { - defaultFacesContext.setExceptionHandler(exceptionHandler); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Return the {@link Lifecycle} instance for this - * FacesContext instance. - *

      - * - * @return instance of Lifecycle - * - * @throws IllegalStateException if this method is called after this instance has been released - * - * @since 4.0 - */ - public abstract Lifecycle getLifecycle(); - - /** - *

      - * Return the {@link ExternalContext} instance for this - * FacesContext instance. - *

      - * - *

      - * It is valid to call this method during application startup or shutdown. If called during application startup or - * shutdown, this method returns an {@link ExternalContext} instance with the special behaviors indicated in the javadoc - * for that class. Methods document as being valid to call during application startup or shutdown must be supported. - *

      - * - * @return instance of ExternalContext - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public abstract ExternalContext getExternalContext(); - - /** - *

      - * Return the maximum severity level recorded on any {@link jakarta.faces.application.FacesMessage}s that has been - * queued, whether or not they are associated with any specific {@link jakarta.faces.component.UIComponent}. If no such - * messages have been queued, return null. - *

      - * - * @return the maximum severity level. - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public abstract Severity getMaximumSeverity(); - - /** - *

      - * Return an Iterator over the {@link jakarta.faces.application.FacesMessage}s that have been queued, - * whether or not they are associated with any specific client identifier. If no such messages have been queued, return - * an empty Iterator. The elements of the Iterator must be returned in the order in which they - * were added with calls to {@link #addMessage}. - *

      - * - * @return Iterator over the FacesMessages that have been queued. - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public abstract Iterator getMessages(); - - /** - *

      - * Like {@link #getMessages}, but returns a List<FacesMessage>, enabling use from Jakarta Expression - * Language expressions. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @return an immutable List which is effectively a snapshot of the messages present at the time of - * invocation. - * - * @throws IllegalStateException if this method is called after this instance has been released - * - * @since 2.0 - */ - public List getMessageList() { - - if (defaultFacesContext != null) { - return defaultFacesContext.getMessageList(); - } - throw new UnsupportedOperationException(); - - } - - /** - *

      - * Like {@link #getMessages(java.lang.String)}, but returns a List<FacesMessage> of messages for the - * component with client id matching argument clientId. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @param clientId the client id of a component. - * - * @return an immutable List which is effectively a snapshot of the messages present at the time of - * invocation. - * - * @throws IllegalStateException if this method is called after this instance has been released - * - * @since 2.0 - */ - - public List getMessageList(String clientId) { - if (defaultFacesContext != null) { - return defaultFacesContext.getMessageList(clientId); - } - throw new UnsupportedOperationException(); - } - - /** - *

      - * Return an Iterator over the {@link jakarta.faces.application.FacesMessage}s that have been queued that - * are associated with the specified client identifier (if clientId is not null), or over the - * {@link jakarta.faces.application.FacesMessage}s that have been queued that are not associated with any specific - * client identifier (if clientId is null). If no such messages have been queued, return an - * empty Iterator. The elements of the Iterator must be returned in the order in which they - * were added with calls to {@link #addMessage}. - *

      - * - * @param clientId The client identifier for which messages are requested, or null for messages not - * associated with any client identifier - * - * @return Iterator over the FacesMessages. - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public abstract Iterator getMessages(String clientId); - - /** - *

      - * Return the result of calling {@link UINamingContainer#getSeparatorChar}, passing this as the argument. - * Note that this enables accessing the value of this property from the Jakarta Expression Language expression - * #{facesContext.namingContainerSeparatorChar}. - *

      - * - * @return the separator char. - * - */ - - public char getNamingContainerSeparatorChar() { - return UINamingContainer.getSeparatorChar(this); - } - - /** - *

      - * Return the {@link RenderKit} instance for the render kit identifier specified on our {@link UIViewRoot}, if there is - * one. If there is no current {@link UIViewRoot}, if the {@link UIViewRoot} does not have a specified - * renderKitId, or if there is no {@link RenderKit} for the specified identifier, return null - * instead. - *

      - * - * @return instance of RenderKit associated with the UIViewRoot. - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public abstract RenderKit getRenderKit(); - - /** - *

      - * Return true if the renderResponse() method has been called for the current request. - *

      - * - * @return flag indicating whether the renderResponse() has been called. - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public abstract boolean getRenderResponse(); - - /** - *

      - * Return true if the responseComplete() method has been called for the current request. - *

      - * - * @return the boolean indicating whether responseComplete() method has been called. - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public abstract boolean getResponseComplete(); - - /** - *

      - * Return the list of resource library contracts that have been calculated to be appropriate for use with this view, or - * an empty list if there are no such resource library contracts. The list returned by this method must be immutable. - * For backward compatibility with implementations of the specification prior to when this method was introduced, an - * implementation is provided that returns an empty list. Implementations compliant with the version in which this - * method was introduced must implement this method as specified. - *

      - * - * @return the list of resource library contracts. - * - * @throws IllegalStateException if this method is called after this instance has been released - * - * @since 2.2 - */ - public List getResourceLibraryContracts() { - return Collections.emptyList(); - } - - /** - *

      - * Set the resource library contracts calculated as valid to use with this view. The implementation must copy the - * contents of the incoming {@code List} into an immutable {@code List} for return from - * {@link #getResourceLibraryContracts}. If the argument is {@code null} or empty, the action taken is the same as if - * the argument is {@code null}: a subsequent call to {@code getResourceLibraryContracts} returns {@code null}. This - * method may only be called during the processing of {@link jakarta.faces.view.ViewDeclarationLanguage#createView} and - * during the VDL tag handler for the tag corresponding to an instance of {@code UIViewRoot}. For backward compatibility - * with implementations of the specification prior to when this method was introduced, an implementation is provided - * that takes no action. Implementations compliant with the version in which this method was introduced must implement - * this method as specified. - * - *

      - * - * @param contracts The new contracts to be returned, as an immutable {@code List}. from a subsequent call to - * {@link #getResourceLibraryContracts}. - * - * @throws IllegalStateException if this method is called after this instance has been released - * - * @since 2.2 - * - */ - - public void setResourceLibraryContracts(List contracts) { - } - - /** - *

      - * Return true if the validationFailed() method has been called for the current request. - *

      - * - * @return boolean indicating if the validationFailed() method has been called for the current request - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public boolean isValidationFailed() { - if (defaultFacesContext != null) { - return defaultFacesContext.isValidationFailed(); - } - - throw new UnsupportedOperationException(); - - } - - /** - *

      - * Return the {@link ResponseStream} to which components should direct their binary output. Within a given response, - * components can use either the ResponseStream or the ResponseWriter, but not both. - * - * @return ResponseStream instance. - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public abstract ResponseStream getResponseStream(); - - /** - *

      - * Set the {@link ResponseStream} to which components should direct their binary output. - * - * @param responseStream The new ResponseStream for this response - * - * @throws NullPointerException if responseStream is null - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public abstract void setResponseStream(ResponseStream responseStream); - - /** - *

      - * Return the {@link ResponseWriter} to which components should direct their character-based output. Within a given - * response, components can use either the ResponseStream or the ResponseWriter, but not both. - *

      - * - * @return ResponseWriter instance. - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public abstract ResponseWriter getResponseWriter(); - - /** - *

      - * Set the {@link ResponseWriter} to which components should direct their character-based output. - * - * @param responseWriter The new ResponseWriter for this response - * - * @throws IllegalStateException if this method is called after this instance has been released - * @throws NullPointerException if responseWriter is null - */ - public abstract void setResponseWriter(ResponseWriter responseWriter); - - /** - *

      - * Return the root component that is associated with the this request. - *

      - * - *

      - * It is valid to call this method during application startup or shutdown. If called during application startup or - * shutdown, this method returns a new UIViewRoot with its locale set to Locale.getDefault(). - *

      - * - * @return UIViewRoot instance. - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public abstract UIViewRoot getViewRoot(); - - /** - *

      - * Set the root component that is associated with this - * request. - * - *

      - * This method can be called by the application handler (or a class that the handler calls), during the Invoke - * Application phase of the request processing lifecycle and during the Restore View phase of the request - * processing lifecycle (especially when a new root component is created). In the present version of the specification, - * implementations are not required to enforce this restriction, though a future version of the specification may - * require enforcement. - *

      - * - *

      - * If the current UIViewRoot is non-null, and calling equals() on the argument - * root, passing the current UIViewRoot returns false, the clear - * method must be called on the Map returned from {@link UIViewRoot#getViewMap}. - *

      - * - * @param root The new component {@link UIViewRoot} component - * - * @throws IllegalStateException if this method is called after this instance has been released - * @throws NullPointerException if root is null - */ - public abstract void setViewRoot(UIViewRoot root); - - // ---------------------------------------------------------- Public Methods - - /** - *

      - * Append a {@link jakarta.faces.application.FacesMessage} to the set of messages associated with the specified client - * identifier, if clientId is not null. If clientId is null, this - * {@link jakarta.faces.application.FacesMessage} is assumed to not be associated with any specific component instance. - *

      - * - * @param clientId The client identifier with which this message is associated (if any) - * @param message The message to be appended - * - * @throws IllegalStateException if this method is called after this instance has been released - * @throws NullPointerException if message is null - */ - public abstract void addMessage(String clientId, FacesMessage message); - - /** - *

      - * Return a flag indicating if the resources associated with this FacesContext instance have been released. - *

      - * - * @return true if the resources have been released. - * - * @since 2.1 - */ - public boolean isReleased() { - if (defaultFacesContext != null) { - return defaultFacesContext.isReleased(); - } - - throw new UnsupportedOperationException(); - } - - /** - *

      - * Release any resources associated with this FacesContext - * instance. Faces implementations may choose to pool instances in the associated {@link FacesContextFactory} to avoid - * repeated object creation and garbage collection. After release() is called on a - * FacesContext instance (until the FacesContext instance has been recycled by the - * implementation for re-use), calling any other methods will cause an IllegalStateException to be thrown. - *

      - * - *

      - * If a call was made to {@link #getAttributes} during the processing for this request, the implementation must call - * clear() on the Map returned from getAttributes(), and then de-allocate the - * data-structure behind that Map. - *

      - * - *

      - * The implementation must call {@link #setCurrentInstance} passing null to remove the association between - * this thread and this dead FacesContext instance. - *

      - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public abstract void release(); - - /** - *

      - * Signal the Jakarta Faces implementation that, as soon as the current phase of the request processing lifecycle - * has been completed, control should be passed to the Render Response phase, bypassing any phases that have - * not been executed yet. - *

      - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public abstract void renderResponse(); - - /** - *

      - * This utility method simply returns the result of - * {@link jakarta.faces.render.ResponseStateManager#isPostback(FacesContext)}. - *

      - * - *

      - * The default implementation throws UnsupportedOperationException and is provided for the sole purpose of - * not breaking existing applications that extend this class. - *

      - * - * @return the boolean indicating whether this request is a post one. - * - * @throws IllegalStateException if this method is called after this instance has been released - * - * @since 2.0 - */ - public boolean isPostback() { - - if (defaultFacesContext != null) { - return defaultFacesContext.isPostback(); - } - - throw new UnsupportedOperationException(); - - } - - /** - *

      - * Signal the Jakarta Faces implementation that the HTTP response for this request has already been generated - * (such as an HTTP redirect), and that the request processing lifecycle should be terminated as soon as the current - * phase is completed. - *

      - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public abstract void responseComplete(); - - /** - *

      - * Sets a flag which indicates that a conversion or validation error occurred while processing the inputs. Inputs - * consist of either page parameters or form bindings. This flag can be read using {@link #isValidationFailed}. - *

      - * - * @throws IllegalStateException if this method is called after this instance has been released - */ - public void validationFailed() { - - if (defaultFacesContext != null) { - defaultFacesContext.validationFailed(); - } else { - throw new UnsupportedOperationException(); - } - - } - - /** - *

      - * Return the value last set on this FacesContext instance when {@link #setCurrentPhaseId} was called. - *

      - * - * @return the current phase id. - * - * @throws IllegalStateException if this method is called after this instance has been released - * - * @since 2.0 - */ - public PhaseId getCurrentPhaseId() { - - if (defaultFacesContext != null) { - return defaultFacesContext.getCurrentPhaseId(); - } - if (!isCreatedFromValidFactory) { - return currentPhaseIdForInvalidFactoryConstruction; - } - throw new UnsupportedOperationException(); - - } - - /** - *

      - * The implementation must call this method at the earliest possble point in time after entering into a new phase in the - * request processing lifecycle. - *

      - * - * @param currentPhaseId The {@link jakarta.faces.event.PhaseId} for the current phase. - * - * @throws IllegalStateException if this method is called after this instance has been released - * - * @since 2.0 - */ - public void setCurrentPhaseId(PhaseId currentPhaseId) { - - if (defaultFacesContext != null) { - defaultFacesContext.setCurrentPhaseId(currentPhaseId); - } else if (!isCreatedFromValidFactory) { - currentPhaseIdForInvalidFactoryConstruction = currentPhaseId; - } else { - throw new UnsupportedOperationException(); - } - - } - - private PhaseId currentPhaseIdForInvalidFactoryConstruction; - - /** - *

      - * Allows control of wheter or not the runtime will publish events when - * {@link Application#publishEvent(FacesContext, Class, Object)} or - * {@link Application#publishEvent(FacesContext, Class, Class, Object)} is called. - *

      - * - * @param processingEvents flag indicating events should be processed or not - */ - public void setProcessingEvents(boolean processingEvents) { - this.processingEvents = processingEvents; - } - - /** - *

      - * Returns a flag indicating whether or not the runtime should publish events when asked to do so. - *

      - * - * @return true if events should be published, otherwise false - */ - public boolean isProcessingEvents() { - return processingEvents; - } - - /** - *

      - * Return true if the current {@link ProjectStage} as returned by the {@link Application} instance is equal - * to stage, otherwise return false - *

      - * - * @param stage the {@link ProjectStage} to check - * - * @return boolean indicating whether the application has the same stage. - * - * @throws IllegalStateException if this method is called after this instance has been released - * @throws NullPointerException if stage is null - */ - public boolean isProjectStage(ProjectStage stage) { - - if (stage == null) { - throw new NullPointerException(); - } - return stage.equals(getApplication().getProjectStage()); - - } - - // ---------------------------------------------------------- Static Methods - - /** - *

      - * The ThreadLocal variable used to record the {@link FacesContext} instance for each processing thread. - *

      - */ - private static ThreadLocal instance = new ThreadLocal<>() { - @Override - protected FacesContext initialValue() { - return null; - } - }; - - /** - *

      - * Return the {@link FacesContext} instance for the request that is being processed by the current thread. If called - * during application initialization or shutdown, any method documented as "valid to call this method during application - * startup or shutdown" must be supported during application startup or shutdown time. The result of calling a method - * during application startup or shutdown time that does not have this designation is undefined. - *

      - * - * @return the instance of FacesContext. - */ - public static FacesContext getCurrentInstance() { - FacesContext facesContext = instance.get(); - - if (null == facesContext) { - facesContext = (FacesContext) threadInitContext.get(Thread.currentThread()); - } - // Bug 20458755: If not found in the threadInitContext, use - // a special FacesContextFactory implementation that knows how to - // use the initContextServletContext map to obtain current ServletContext - // out of thin air (actually, using the current ClassLoader), and use it - // to obtain the init FacesContext corresponding to that ServletContext. - if (null == facesContext) { - // In the non-init case, this will immediately return null. - // In the init case, this will return null if Jakarta Faces hasn't been - // initialized in the ServletContext corresponding to this - // Thread's context ClassLoader. - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - if (cl == null) { - return null; - } - - FacesContextFactory privateFacesContextFactory = (FacesContextFactory) FactoryFinder.getFactory("com.sun.faces.ServletContextFacesContextFactory"); - if (null != privateFacesContextFactory) { - facesContext = privateFacesContextFactory.getFacesContext(null, null, null, null); - } - } - return facesContext; - } - - /** - *

      - * Set the {@link FacesContext} instance for the request that is being processed by the current thread. - *

      - * - * @param context The {@link FacesContext} instance for the current thread, or null if this thread no - * longer has a FacesContext instance. - * - */ - protected static void setCurrentInstance(FacesContext context) { - - if (context == null) { - instance.remove(); - } else { - instance.set(context); - } - - } - -} diff --git a/impl/src/main/java/jakarta/faces/context/FacesContextFactory.java b/impl/src/main/java/jakarta/faces/context/FacesContextFactory.java deleted file mode 100644 index 6b3fb99522..0000000000 --- a/impl/src/main/java/jakarta/faces/context/FacesContextFactory.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.context; - -import jakarta.faces.FacesException; -import jakarta.faces.FacesWrapper; -import jakarta.faces.lifecycle.Lifecycle; - -/** - *

      - * FacesContextFactory is a - * factory object that creates (if needed) and returns new {@link FacesContext} instances, initialized for the - * processing of the specified request and response objects. Implementations may take advantage of the calls to the - * release() method of the allocated {@link FacesContext} instances to pool and recycle them, rather than - * creating a new instance every time. - *

      - * - *

      - * There must be one FacesContextFactory instance per web application that is utilizing Jakarta Server - * Faces. This instance can be acquired, in a portable manner, by calling: - *

      - * - *
      - * FacesContextFactory factory = (FacesContextFactory) FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
      - * 
      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - */ -public abstract class FacesContextFactory implements FacesWrapper { - - private FacesContextFactory wrapped; - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public FacesContextFactory() { - - } - - /** - *

      - * If this factory has been decorated, the implementation doing the decorating should push the implementation being - * wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - */ - public FacesContextFactory(FacesContextFactory wrapped) { - this.wrapped = wrapped; - } - - /** - *

      - * If this factory has been decorated, the implementation doing the decorating may override this method to provide - * access to the implementation being wrapped. - *

      - * - * @since 2.0 - */ - @Override - public FacesContextFactory getWrapped() { - return wrapped; - } - - /** - *

      - * Create (if needed) and return a {@link FacesContext} - * instance that is initialized for the processing of the specified request and response objects, utilizing the - * specified {@link Lifecycle} instance, for this web application. - *

      - * - *

      - * The implementation of this method must ensure that calls to the getCurrentInstance() method of - * {@link FacesContext}, from the same thread that called this method, will return the same {@link FacesContext} - * instance until the release() method is called on that instance. - *

      - * - *

      - * The implementation must call {@link ExternalContextFactory#getExternalContext} to produce the {@link ExternalContext} - * for the {@link FacesContext} instance. - *

      - * - *

      - * The default implementation must call {@link ExceptionHandlerFactory#getExceptionHandler} and make it so the return - * from that method is what gets returned from a call to {@link FacesContext#getExceptionHandler} on the returned - * FacesContext instance. - *

      - * - *

      - * The default implementation must call {@link jakarta.faces.lifecycle.ClientWindowFactory#getClientWindow} and make it - * so the return from that method is what gets returned from a call to {@link ExternalContext#getClientWindow()} on the - * returned ExternalContext instance. - *

      - * - * @param context In Jakarta Servlet environments, the ServletContext that is associated with this web - * application - * @param request In Jakarta Servlet environments, the ServletRequest that is to be processed - * @param response In Jakarta Servlet environments, the ServletResponse that is to be processed - * @param lifecycle The {@link Lifecycle} instance being used to process this request - * - * @return the instance of FacesContext. - * - * @throws FacesException if a {@link FacesContext} cannot be constructed for the specified parameters - * @throws NullPointerException if any of the parameters are null - */ - public abstract FacesContext getFacesContext(Object context, Object request, Object response, Lifecycle lifecycle) throws FacesException; - -} diff --git a/impl/src/main/java/jakarta/faces/context/FacesContextWrapper.java b/impl/src/main/java/jakarta/faces/context/FacesContextWrapper.java deleted file mode 100644 index c743d439a5..0000000000 --- a/impl/src/main/java/jakarta/faces/context/FacesContextWrapper.java +++ /dev/null @@ -1,593 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.context; - -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import jakarta.el.ELContext; -import jakarta.faces.FacesWrapper; -import jakarta.faces.application.Application; -import jakarta.faces.application.FacesMessage; -import jakarta.faces.application.ProjectStage; -import jakarta.faces.component.UIViewRoot; -import jakarta.faces.event.PhaseId; -import jakarta.faces.lifecycle.Lifecycle; -import jakarta.faces.render.RenderKit; - -/** - *

      - * Provides a simple implementation - * of {@link FacesContext} that can be subclassed by developers wishing to provide specialized behavior to an existing - * {@link FacesContext} instance. The default implementation of all methods is to call through to the wrapped - * {@link FacesContext} instance. - *

      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - * @since 2.0 - */ -public abstract class FacesContextWrapper extends FacesContext implements FacesWrapper { - - private FacesContext wrapped; - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public FacesContextWrapper() { - - } - - /** - *

      - * If this faces context has been decorated, the implementation doing the decorating should push the implementation - * being wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - * @since 2.3 - */ - public FacesContextWrapper(FacesContext wrapped) { - this.wrapped = wrapped; - } - - @Override - public FacesContext getWrapped() { - return wrapped; - } - - // ----------------------------------------------- Methods from FacesContext - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getLifecycle()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getLifecycle() - */ - @Override - public Lifecycle getLifecycle() { - return getWrapped().getLifecycle(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getApplication()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getApplication() - */ - @Override - public Application getApplication() { - return getWrapped().getApplication(); - } - - /** - *

      - * The default behavior of this method is to call {@link jakarta.faces.context.FacesContext#getClientIdsWithMessages()} - * on the wrapped {@link FacesContext} object. - *

      - * - * @see FacesContext#getClientIdsWithMessages() - */ - @Override - public Iterator getClientIdsWithMessages() { - return getWrapped().getClientIdsWithMessages(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getExternalContext()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getExternalContext() - */ - @Override - public ExternalContext getExternalContext() { - return getWrapped().getExternalContext(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getMaximumSeverity()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getMaximumSeverity() - */ - @Override - public FacesMessage.Severity getMaximumSeverity() { - return getWrapped().getMaximumSeverity(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getMessages()} on the wrapped {@link FacesContext} - * object. - *

      - * - * @see jakarta.faces.context.FacesContext#getMessages() - */ - @Override - public Iterator getMessages() { - return getWrapped().getMessages(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getMessages(String)} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getMessages(String) - */ - @Override - public Iterator getMessages(String clientId) { - return getWrapped().getMessages(clientId); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getRenderKit()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getRenderKit() - */ - @Override - public RenderKit getRenderKit() { - return getWrapped().getRenderKit(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getRenderResponse()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getRenderResponse() - */ - @Override - public boolean getRenderResponse() { - return getWrapped().getRenderResponse(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getResourceLibraryContracts} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getResourceLibraryContracts - */ - @Override - public List getResourceLibraryContracts() { - return getWrapped().getResourceLibraryContracts(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#setResourceLibraryContracts} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#setResourceLibraryContracts - */ - @Override - public void setResourceLibraryContracts(List contracts) { - getWrapped().setResourceLibraryContracts(contracts); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getResponseComplete()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getResponseComplete() - */ - @Override - public boolean getResponseComplete() { - return getWrapped().getResponseComplete(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getResponseStream()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getResponseStream() - */ - @Override - public ResponseStream getResponseStream() { - return getWrapped().getResponseStream(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#setResponseStream(ResponseStream)} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#setResponseStream(ResponseStream) - */ - @Override - public void setResponseStream(ResponseStream responseStream) { - getWrapped().setResponseStream(responseStream); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getResponseWriter()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getResponseWriter() - */ - @Override - public ResponseWriter getResponseWriter() { - return getWrapped().getResponseWriter(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#setResponseWriter(ResponseWriter)} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#setResponseWriter(ResponseWriter) - */ - @Override - public void setResponseWriter(ResponseWriter responseWriter) { - getWrapped().setResponseWriter(responseWriter); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getViewRoot()} on the wrapped {@link FacesContext} - * object. - *

      - * - * @see jakarta.faces.context.FacesContext#getViewRoot() - */ - @Override - public UIViewRoot getViewRoot() { - return getWrapped().getViewRoot(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#setViewRoot(UIViewRoot)} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#setViewRoot(UIViewRoot) - */ - @Override - public void setViewRoot(UIViewRoot root) { - getWrapped().setViewRoot(root); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#addMessage(String, FacesMessage)} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#addMessage(String, FacesMessage) - */ - @Override - public void addMessage(String clientId, FacesMessage message) { - getWrapped().addMessage(clientId, message); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#isReleased} on the wrapped {@link FacesContext} - * object. - *

      - * - * @see jakarta.faces.context.FacesContext#isReleased - * - * @since 2.1 - */ - @Override - public boolean isReleased() { - return getWrapped().isReleased(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#release()} on the wrapped {@link FacesContext} - * object. - *

      - * - * @see jakarta.faces.context.FacesContext#release() - */ - @Override - public void release() { - getWrapped().release(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#renderResponse()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#renderResponse() - */ - @Override - public void renderResponse() { - getWrapped().renderResponse(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#responseComplete()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#responseComplete() - */ - @Override - public void responseComplete() { - getWrapped().responseComplete(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getAttributes()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getAttributes() - */ - @Override - public Map getAttributes() { - return getWrapped().getAttributes(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getNamingContainerSeparatorChar()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getNamingContainerSeparatorChar() - */ - @Override - public char getNamingContainerSeparatorChar() { - return getWrapped().getNamingContainerSeparatorChar(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getPartialViewContext()} ()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getPartialViewContext() - */ - @Override - public PartialViewContext getPartialViewContext() { - return getWrapped().getPartialViewContext(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getELContext()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getELContext() - */ - @Override - public ELContext getELContext() { - return getWrapped().getELContext(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getExceptionHandler()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getExceptionHandler() - */ - @Override - public ExceptionHandler getExceptionHandler() { - return getWrapped().getExceptionHandler(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#setExceptionHandler(ExceptionHandler)} on the - * wrapped {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#setExceptionHandler(ExceptionHandler) - */ - @Override - public void setExceptionHandler(ExceptionHandler exceptionHandler) { - getWrapped().setExceptionHandler(exceptionHandler); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getMessageList()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getMessageList() - */ - @Override - public List getMessageList() { - return getWrapped().getMessageList(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getMessageList(String)} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getMessageList(String) - */ - @Override - public List getMessageList(String clientId) { - return getWrapped().getMessageList(clientId); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#isPostback()} on the wrapped {@link FacesContext} - * object. - *

      - * - * @see jakarta.faces.context.FacesContext#isPostback() - */ - @Override - public boolean isPostback() { - return getWrapped().isPostback(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#getCurrentPhaseId()} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#getCurrentPhaseId() - */ - @Override - public PhaseId getCurrentPhaseId() { - return getWrapped().getCurrentPhaseId(); - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#setCurrentPhaseId(PhaseId)} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#setCurrentPhaseId(PhaseId) - */ - @Override - public void setCurrentPhaseId(PhaseId currentPhaseId) { - getWrapped().setCurrentPhaseId(currentPhaseId); - } - - /** - *

      - * The default behavior of this method is to call {@link jakarta.faces.context.FacesContext#isValidationFailed} on the - * wrapped {@link FacesContext} object. - *

      - * - * @see FacesContext#isValidationFailed - */ - @Override - public boolean isValidationFailed() { - - return getWrapped().isValidationFailed(); - - } - - /** - *

      - * The default behavior of this method is to call {@link jakarta.faces.context.FacesContext#validationFailed()} on the - * wrapped {@link FacesContext} object. - *

      - * - * @see FacesContext#validationFailed() - */ - @Override - public void validationFailed() { - - getWrapped().validationFailed(); - - } - - /** - *

      - * The default behavior of this method is to call {@link FacesContext#setProcessingEvents(boolean)} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see jakarta.faces.context.FacesContext#setProcessingEvents(boolean) - */ - @Override - public void setProcessingEvents(boolean processingEvents) { - getWrapped().setProcessingEvents(processingEvents); - } - - /** - *

      - * The default behavior of this method is to call {@link jakarta.faces.context.FacesContext#isProcessingEvents()} on the - * wrapped {@link FacesContext} object. - *

      - * - * @see FacesContext#isProcessingEvents() - */ - @Override - public boolean isProcessingEvents() { - return getWrapped().isProcessingEvents(); - } - - /** - *

      - * The default behavior of this method is to call - * {@link jakarta.faces.context.FacesContext#isProjectStage(jakarta.faces.application.ProjectStage)} on the wrapped - * {@link FacesContext} object. - *

      - * - * @see FacesContext#isProjectStage(jakarta.faces.application.ProjectStage) - */ - @Override - public boolean isProjectStage(ProjectStage stage) { - return getWrapped().isProjectStage(stage); - } -} diff --git a/impl/src/main/java/jakarta/faces/context/Flash.java b/impl/src/main/java/jakarta/faces/context/Flash.java deleted file mode 100644 index ba9c0ece65..0000000000 --- a/impl/src/main/java/jakarta/faces/context/Flash.java +++ /dev/null @@ -1,411 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.context; - -import java.util.Map; - -import jakarta.faces.event.PostKeepFlashValueEvent; -import jakarta.faces.event.PostPutFlashValueEvent; - -/** - *

      - * The Flash concept is taken from Ruby on Rails and provides - * a way to pass temporary objects between the user views generated by the faces lifecycle. As in Rails, anything one - * places in the flash will be exposed to the next view encountered by the same user session and then cleared out. It is - * important to note that “next view” may have the same view id as the previous view. - *

      - * - *
      - * - *

      - * Implementation Requirements - *

      - * - *

      - * The flash is a session scoped object that must be thread safe. - *

      - * - *

      - * The implementation requirements will be described in terms of the runtime traversing the Jakarta Faces - * lifecycle. The flash exposes a Map interface over two logical maps. The choice of which logical map is - * accessed depends on the current faces lifecycle phase. One logical map is for the current traversal and the other is - * for the next traversal. During the execute portion of the lifecycle, all flash accesses are sent to the current - * traversal map. During the render portion of the lifecycle, all flash accesses are sent to the next traversal map. On - * the next traversal through the lifecycle, the implementation must ensure that the current traversal map is the next - * traversal map of the previous traversal. Here is an example for illustration purposes only. - *

      - * - *
      - * - *

      - * Consider an initial request to the faces lifecycle - *

      - * - *

      - * Traversal N, execute phase: skipped on initial request. - *

      - * - *

      - * Traversal N, render phase: flash access goes to flash[N]. - *

      - * - *

      - * Traversal N+1, execute phase: flash access goes to flash[N]. - *

      - * - *

      - * Traversal N+1, render phase: flash access goes to flash[N+1]. - *

      - * - *
      - * - *

      - * The implementation must ensure the proper behaviour of the flash is preserved even in the case of a - * <navigation-case> that contains a <redirect />. The implementation must ensure - * the proper behavior of the flash is preserved even in the case of adjacent GET requests on the same session. This - * allows Faces applications to fully utilize the “Post/Redirect/Get” design pattern. - *

      - * - *

      - * The implementation must allow the user to access the flash via the Jakarta Expression Language implicit object - * flash and also via {@link jakarta.faces.context.ExternalContext#getFlash}. The implementation must - * ensure that the flash is usable from both Jakarta Server Pages and from Facelets for Jakarta Faces 2. In - * addition to exposing the Map interface, there are several features exposed as methods on the - * Flash itself. Each of these features may be accessed via Jakarta Expression Language as well, as - * described in the javadocs. - *

      - * - *

      - * Jakarta Expression Language Usage Example - *

      - * - *
      - * - *

      - * First page - *

      - * - *
      - * 
      -<html xmlns="http://www.w3.org/1999/xhtml"
      -      xmlns:c="jakarta.tags.core">
      -<!-- extra code removed -->
      -  <c:set target="#{flash}" property="foo" value="fooValue" />
      -
      -
      - * 
      - * - *

      - * Next page - *

      - * - *
      - * 
      -<html xmlns="http://www.w3.org/1999/xhtml"
      -      xmlns:h="jakarta.faces.html">
      -<!-- extra code removed -->
      -  <h:outputText value="#{flash.foo}" /> will be "fooValue"
      -  without the quotes.
      -
      -
      - * 
      - * - *
      - * - *

      - * The same usage syntax must be available in Jakarta Server Pages. - *

      - * - *

      - * Note that extra action must be taken when using the flash in concert with output components that cause the browser to - * issue a GET request when clicked, such as h:button and h:link. The following example - * illustrates one way to use the flash in such circumstances. - *

      - * - *
      - * - *

      - * First page - *

      - * - *
      - * 
      -<h:button id="nextButton" value="Next (button)" outcome="next.xhtml">
      -  <f:param name="foo" value="bar"/>
      -</h:button>
      -
      - * 
      - * - *

      - * Next page - *

      - * - *
      - * 
      -<html xmlns="http://www.w3.org/1999/xhtml"
      -      xmlns:f="jakarta.faces.core"
      -      xmlns:h="jakarta.faces.html">
      -<f:metadata>
      -  <f:viewParam name="foo" id="foo" value="#{flash.now.foo}" />
      -</f:metadata>
      -<head /><body>
      -foo = #{flash.foo}
      -</body>
      -</html>
      -
      - * 
      - * - *
      - * - *

      - * Note that this example uses #{flash.now} on the second page. This is because the value doesn't actuall - * enter the flash until the server is processing the GET request sent by the browser due to the button being clicked. - *

      - * - *
      - * - * @since 2.0 - * - */ -public abstract class Flash implements Map { - - /** - *

      - * Because null values are not allowed as the source for subclasses of EventObject, such as - * {@link PostKeepFlashValueEvent} and {@link PostPutFlashValueEvent}, this value is substituted for null - * as the source in the case when a null value is put to or kept in the flash. - */ - public static final String NULL_VALUE = "jakarta.faces.context.Flash.NULL_VALUE"; - - /** - *

      - * Return the value of this JavaBeans property for the flash for this session. This value determines whether or not any - * {@link jakarta.faces.application.FacesMessage} instances queued in the current - * {@link jakarta.faces.context.FacesContext} must be preserved so they are accessible on the next traversal of the - * lifecycle on this session, regardless of the request being a redirect after post, or a normal postback. - * Map accesses for the special key “keepMessages” must return the value of this - * JavaBeans property. - *

      - * - *
      - * - * - *

      - * Jakarta Expression Language Usage Example - *

      - * - *
      - * - *

      - * First page - *

      - * - *
      -     * 
      -    <html xmlns="http://www.w3.org/1999/xhtml"
      -          xmlns:c="jakarta.tags.core">
      -    <!-- extra code removed -->
      -      <c:set target="#{flash}" property="keepMessages" value="true" />
      -
      -    
      -     * 
      - * - *

      - * Next page - *

      - * - *
      -     * 
      -    <html xmlns="http://www.w3.org/1999/xhtml"
      -          xmlns:h="jakarta.faces.html">
      -    <!-- extra code removed -->
      -      <h:messages /> Any messages present on the first page must be displayed on
      -      this page.
      -
      -    
      -     * 
      - * - *
      - * - *
      - * - * @return the boolean flag whether keeping messages or not. - * - * @since 2.0 - * - */ - public abstract boolean isKeepMessages(); - - /** - *

      - * Setter for keepMessages JavaBeans property. See {@link #isKeepMessages}. - *

      - * - * @param newValue the new value for this property on this session. - * - * @since 2.0 - */ - public abstract void setKeepMessages(boolean newValue); - - /** - *

      - * Return the value of this property for the flash for this session. This must be false unless: - *

      - * - *
      - * - * - *
        - * - *
      • - *

        - * {@link #setRedirect} was called for the current lifecycle traversal with true as the argument. - *

        - *
      • - * - *
      • - *

        - * The current lifecycle traversal for this session is in the “execute” phase and the previous traversal had - * {@link #setRedirect} called with true as the argument. - *

        - *
      • - *
      - *
      - * - * @return the value of this property for the flash for this session. - * - */ - - public abstract boolean isRedirect(); - - /** - *

      - * Setting this property to true indicates that the next request on this session will be a redirect. Recall - * that on a redirect, the server sends a special response to the client instructing it to issue a new request to a - * specific URI. The implementation must insure that reading the value of this property on that request will return - * true. - *

      - * - *
      - * - *

      - * Jakarta Expression Language Usage Example - *

      - * - *
      - * - *
      -     * 
      -    <html xmlns="http://www.w3.org/1999/xhtml"
      -          xmlns:c="jakarta.tags.core">
      -    <!-- extra code removed -->
      -      <c:set target="#{flash}" property="redirect" value="true" />
      -
      -    
      -     * 
      - * - *
      - * - *
      - * - * - * @param newValue the new value for this property on this session. - * - * @since 2.0 - * - */ - - public abstract void setRedirect(boolean newValue); - - /** - *

      - * Puts a value in the flash so that it can be accessed on this traversal of the lifecycle, rather than on the next - * traversal. This is simply an alias for putting a value in the request map. - *

      - * - *
      - * - *

      - * Jakarta Expression Language Usage Example - *

      - * - *
      - * - *
      -     * 
      -    <html xmlns="http://www.w3.org/1999/xhtml"
      -          xmlns:c="jakarta.tags.core">
      -    <!-- extra code removed -->
      -      <c:set target="#{flash.now}" property="bar" value="barValue" />
      -
      -      <p>Value of \#{flash.now.bar}, should be barValue.</p>
      -
      -      <h:outputText value="#{flash.now.bar}" />
      -
      -    
      -     * 
      - * - *
      - * - *
      - * - * @param key the key for this entry - * - * @param value the value for this entry - * - * @since 2.0 - * - */ - - public abstract void putNow(String key, Object value); - - /** - *

      - * Causes a value stored with a previous call to {@link #putNow}, its Jakarta Expression Language equivalent, or to the - * request Map, to be promoted to the flash so that is available on the next traversal through the - * lifecycle on this session. - *

      - * - * @param key if argument key is the name of an entry previously stored to the flash on this traversal - * through the lifecycle via a call to {@link #putNow}, or to a set to the EL expression - * #{flash.now.<key>}, or to the request Map, to be promoted to the flash as if a - * call to put() or a set to the expression #{flash.<key>} was being called. - */ - - public abstract void keep(String key); - - /** - *

      - * Called before the execution of every lifecycle phase, this method allows implementations to take the necessary - * actions to provide the Flash scope contract as it applies to the request procesing lifecycle. - *

      - * - * @param ctx the FacesContext for this request. - */ - public abstract void doPrePhaseActions(FacesContext ctx); - - /** - *

      - * Called after the execution of every lifecycle phase, this method allows implementations to take the necessary actions - * to provide the Flash scope contract as it applies to the request procesing lifecycle. - *

      - * - * @param ctx the FacesContext for this request. - */ - public abstract void doPostPhaseActions(FacesContext ctx); - -} diff --git a/impl/src/main/java/jakarta/faces/context/FlashFactory.java b/impl/src/main/java/jakarta/faces/context/FlashFactory.java deleted file mode 100644 index 06e3996fd4..0000000000 --- a/impl/src/main/java/jakarta/faces/context/FlashFactory.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.context; - -import jakarta.faces.FacesWrapper; - -/** - *

      - * FlashFactory is a factory object that creates (if - * needed) and returns {@link Flash} instances. Implementations of Jakarta Faces must provide at least a default - * implementation of {@link Flash}. - *

      - * - *
      - * - *

      - * There must be one {@link FlashFactory} instance per web application that is utilizing Jakarta Faces. This - * instance can be acquired, in a portable manner, by calling: - *

      - * - *
      - * FlashFactory factory = (FlashFactory) FactoryFinder.getFactory(FactoryFinder.FLASH_FACTORY);
      - * 
      - * - *

      - * The common way to access the flash instance from Java code is still via {@link ExternalContext#getFlash}. The common - * way to access the flash from Faces views is the implicit Jakarta Expression Language object "flash". The runtime must - * ensure that the FlashFactory is used to instantiate the flash. - *

      - * - *
      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - * @since 2.2 - */ -public abstract class FlashFactory implements FacesWrapper { - - private FlashFactory wrapped; - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public FlashFactory() { - - } - - /** - *

      - * If this factory has been decorated, the implementation doing the decorating should push the implementation being - * wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - */ - public FlashFactory(FlashFactory wrapped) { - this.wrapped = wrapped; - } - - /** - *

      - * If this factory has been decorated, the implementation doing the decorating may override this method to provide - * access to the implementation being wrapped. - *

      - */ - @Override - public FlashFactory getWrapped() { - return wrapped; - } - - /** - *

      - * Create (if needed) and return a {@link Flash} instance for this web application. - *

      - * - * @param create true to create a new instance for this request if necessary; false to return - * null if there's no instance in the current session. - * - * @return the instance of Flash. - * - * @since 2.2 - */ - public abstract Flash getFlash(boolean create); - -} diff --git a/impl/src/main/java/jakarta/faces/context/FlashWrapper.java b/impl/src/main/java/jakarta/faces/context/FlashWrapper.java deleted file mode 100644 index a8d351b346..0000000000 --- a/impl/src/main/java/jakarta/faces/context/FlashWrapper.java +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.context; - -import java.util.Collection; -import java.util.Map; -import java.util.Set; - -import jakarta.faces.FacesWrapper; - -/** - *

      - * Provides a simple implementation of {@link Flash} that can be subclassed by - * developers wishing to provide specialized behavior to an existing {@link Flash} instance. The default implementation - * of all methods is to call through to the wrapped {@link Flash}. - *

      - * - *

      - * Usage: extend this class and push the implementation being wrapped to the constructor and use {@link #getWrapped} to - * access the instance being wrapped. - *

      - * - * @since 2.2 - */ -public abstract class FlashWrapper extends Flash implements FacesWrapper { - - private Flash wrapped; - - /** - * @deprecated Use the other constructor taking the implementation being wrapped. - */ - @Deprecated - public FlashWrapper() { - - } - - /** - *

      - * If this flash has been decorated, the implementation doing the decorating should push the implementation being - * wrapped to this constructor. The {@link #getWrapped()} will then return the implementation being wrapped. - *

      - * - * @param wrapped The implementation being wrapped. - * @since 2.3 - */ - public FlashWrapper(Flash wrapped) { - this.wrapped = wrapped; - } - - @Override - public Flash getWrapped() { - return wrapped; - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#doPostPhaseActions(FacesContext)} on the wrapped - * {@link Flash} object. - *

      - * - * @since 2.2 - */ - @Override - public void doPostPhaseActions(FacesContext ctx) { - getWrapped().doPostPhaseActions(ctx); - - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#doPrePhaseActions(FacesContext)} on the wrapped - * {@link Flash} object. - *

      - * - * @since 2.2 - */ - @Override - public void doPrePhaseActions(FacesContext ctx) { - getWrapped().doPrePhaseActions(ctx); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#isKeepMessages()} on the wrapped {@link Flash} object. - *

      - * - * @since 2.2 - */ - @Override - public boolean isKeepMessages() { - return getWrapped().isKeepMessages(); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#isRedirect()} on the wrapped {@link Flash} object. - *

      - * - * @since 2.2 - */ - @Override - public boolean isRedirect() { - return getWrapped().isRedirect(); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#keep(String)} on the wrapped {@link Flash} object. - *

      - * - * @since 2.2 - */ - @Override - public void keep(String key) { - getWrapped().keep(key); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#putNow(String, Object)} on the wrapped {@link Flash} - * object. - *

      - * - * @since 2.2 - */ - @Override - public void putNow(String key, Object value) { - getWrapped().putNow(key, value); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#setKeepMessages(boolean)} on the wrapped {@link Flash} - * object. - *

      - * - * @since 2.2 - */ - @Override - public void setKeepMessages(boolean newValue) { - getWrapped().setKeepMessages(newValue); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#setRedirect(boolean)} on the wrapped {@link Flash} - * object. - *

      - * - * @since 2.2 - */ - @Override - public void setRedirect(boolean newValue) { - getWrapped().setRedirect(newValue); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#clear()} on the wrapped {@link Flash} object. - *

      - * - * @since 2.2 - */ - @Override - public void clear() { - getWrapped().clear(); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#containsKey(Object)} on the wrapped {@link Flash} object. - *

      - * - * @since 2.2 - */ - @Override - public boolean containsKey(Object key) { - return getWrapped().containsKey(key); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#containsValue(Object)} on the wrapped {@link Flash} - * object. - *

      - * - * @since 2.2 - */ - @Override - public boolean containsValue(Object value) { - return getWrapped().containsValue(value); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#entrySet()} on the wrapped {@link Flash} object. - *

      - * - * @since 2.2 - */ - @Override - public Set> entrySet() { - return getWrapped().entrySet(); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#get(Object)} on the wrapped {@link Flash} object. - *

      - * - * @since 2.2 - */ - @Override - public Object get(Object key) { - return getWrapped().get(key); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#isEmpty()} on the wrapped {@link Flash} object. - *

      - * - * @since 2.2 - */ - @Override - public boolean isEmpty() { - return getWrapped().isEmpty(); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#keySet()} on the wrapped {@link Flash} object. - *

      - * - * @since 2.2 - */ - @Override - public Set keySet() { - return getWrapped().keySet(); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#put} on the wrapped {@link Flash} object. - *

      - * - * @since 2.2 - */ - @Override - public Object put(String key, Object value) { - return getWrapped().put(key, value); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#putAll(Map)} on the wrapped {@link Flash} object. - *

      - * - * @since 2.2 - */ - @Override - public void putAll(Map m) { - getWrapped().putAll(m); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#remove(Object)} on the wrapped {@link Flash} object. - *

      - * - * @since 2.2 - */ - @Override - public Object remove(Object key) { - return getWrapped().remove(key); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#size()} on the wrapped {@link Flash} object. - *

      - * - * @since 2.2 - */ - @Override - public int size() { - return getWrapped().size(); - } - - /** - *

      - * The default behavior of this method is to call {@link Flash#values()} on the wrapped {@link Flash} object. - *

      - * - * @since 2.2 - */ - @Override - public Collection values() { - return getWrapped().values(); - } - -} diff --git a/impl/src/main/java/jakarta/faces/context/PartialResponseWriter.java b/impl/src/main/java/jakarta/faces/context/PartialResponseWriter.java deleted file mode 100644 index 49a6427519..0000000000 --- a/impl/src/main/java/jakarta/faces/context/PartialResponseWriter.java +++ /dev/null @@ -1,407 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.context; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.Map; - -import com.sun.faces.RIConstants; - -import jakarta.faces.component.NamingContainer; -import jakarta.faces.component.UIViewRoot; -import jakarta.faces.render.ResponseStateManager; - -/** - *

      - * PartialResponseWriter decorates an existing ResponseWriter to support the generation of - * a partial response suitable for Ajax operations. In addition to the markup generation methods inherited from - * jakarta.faces.context.ResponseWriter, this class provides methods for constructing the standard partial - * response elements. - *

      - * - * @since 2.0 - */ -public class PartialResponseWriter extends ResponseWriterWrapper { - // True when we need to close a changes tag - // - private boolean inChanges = false; - - // True when we need to close a before insert tag - // - private boolean inInsertBefore = false; - - // True when we need to close afer insert tag - // - private boolean inInsertAfter = false; - - // True when we need to close an update tag - // - private boolean inUpdate = false; - - /** - *

      - * Reserved ID value to indicate entire ViewRoot. - *

      - * - * @since 2.0 - */ - public static final String RENDER_ALL_MARKER = "jakarta.faces.ViewRoot"; - - /** - *

      - * Reserved ID value to indicate serialized ViewState. - *

      - * - * @since 2.0 - */ - public static final String VIEW_STATE_MARKER = ResponseStateManager.VIEW_STATE_PARAM; - - /** - *

      - * Create a PartialResponseWriter. - *

      - * - * @param writer The writer to wrap. - * @since 2.0 - */ - public PartialResponseWriter(ResponseWriter writer) { - super(writer); - } - - /** - *

      - * Write the start of a partial response. - *

      - *

      - * If {@link UIViewRoot} is an instance of {@link NamingContainer}, then write - * {@link UIViewRoot#getContainerClientId(FacesContext)} as value of the id attribute of the root element. - *

      - * - * @throws IOException if an input/output error occurs - * @since 2.0 - */ - @Override - public void startDocument() throws IOException { - ResponseWriter writer = getWrapped(); - String encoding = writer.getCharacterEncoding(); - if (encoding == null) { - encoding = RIConstants.CHAR_ENCODING; - } - writer.writePreamble("\n"); - writer.startElement("partial-response", null); - FacesContext ctx = FacesContext.getCurrentInstance(); - if (null != ctx && ctx.getViewRoot() instanceof NamingContainer) { - String id = ctx.getViewRoot().getContainerClientId(ctx); - writer.writeAttribute("id", id, "id"); - } - } - - /** - *

      - * Write the end of a partial response. - *

      - * - * @throws IOException if an input/output error occurs - * @since 2.0 - */ - @Override - public void endDocument() throws IOException { - endChangesIfNecessary(); - ResponseWriter writer = getWrapped(); - /* - * Because during a "; - var tempElement = document.createElement('span'); - tempElement.innerHTML = autoExecTestString; - var body = document.getElementsByTagName('body')[0]; - var tempNode = body.appendChild(tempElement); - if (mojarra && mojarra.autoExecTest) { - isAutoExecCache = true; - delete mojarra.autoExecTest; - } else { - isAutoExecCache = false; - } - deleteNode(tempNode); - return isAutoExecCache; - } catch (ex) { - // OK, that didn't work, we'll have to make an assumption - if (typeof isAutoExecCache === "undefined") { - isAutoExecCache = false; - } - return isAutoExecCache; - } - }; - var isAutoExecCache; + const isAutoExec = function isAutoExec() { return false; }; /** + * Utility function that determines if a file control exists for the form. * @ignore */ - var getTransport = function getTransport(context) { - var returnVal; - // Here we check for encoding type for file upload(s). - // This is where we would also include a check for the existence of - // input file control for the current form (see hasInputFileControl - // function) but IE9 (at least) seems to render controls outside of - // form. - if (typeof context !== 'undefined' && context !== null && - context.includesInputFile && - context.form.enctype === "multipart/form-data") { - returnVal = new FrameTransport(context); - return returnVal; - } - var methods = [ - function() { - return new XMLHttpRequest(); - }, - function() { - return new ActiveXObject('Msxml2.XMLHTTP'); - }, - function() { - return new ActiveXObject('Microsoft.XMLHTTP'); - } - ]; - - for (var i = 0, len = methods.length; i < len; i++) { - try { - returnVal = methods[i](); - } catch(e) { - continue; - } - return returnVal; - } - throw new Error('Could not create an XHR object.'); - }; - - /** - * Used for iframe based communication (instead of XHR). - * @ignore - */ - var FrameTransport = function FrameTransport(context) { - this.context = context; - this.frame = null; - this.FRAME_ID = "FacesFrameId"; - this.FRAME_PARTIAL_ID = "Faces-Request"; - this.partial = null; - this.aborted = false; - this.responseText = null; - this.responseXML = null; - this.readyState = 0; - this.requestHeader = {}; - this.status = null; - this.method = null; - this.url = null; - this.requestParams = null; - }; - - /** - * Extends FrameTransport an adds method functionality. - * @ignore - */ - FrameTransport.prototype = { - - /** - *@ignore - */ - setRequestHeader:function(key, value) { - if (typeof(value) !== "undefined") { - this.requestHeader[key] = value; - } - }, - - /** - * Creates the hidden iframe and sets readystate. - * @ignore - */ - open:function(method, url, async) { - this.method = method; - this.url = url; - this.async = async; - this.frame = document.getElementById(this.FRAME_ID); - if (this.frame) { - this.frame.parentNode.removeChild(this.frame); - this.frame = null; - } - if (!this.frame) { - if ((!isIE() && !isIE9Plus())) { - this.frame = document.createElement('iframe'); - this.frame.src = "about:blank"; - this.frame.id = this.FRAME_ID; - this.frame.name = this.FRAME_ID; - this.frame.type = "content"; - this.frame.collapsed = "true"; - this.frame.style = "visibility:hidden"; - this.frame.width = "0"; - this.frame.height = "0"; - this.frame.style = "border:0"; - this.frame.frameBorder = 0; - document.body.appendChild(this.frame); - this.frame.onload = bind(this, this.callback); - } else { - var div = document.createElement("div"); - div.id = "frameDiv"; - div.innerHTML = ""; - document.body.appendChild(div); - this.frame = document.getElementById(this.FRAME_ID); - this.frame.onload_cb = bind(this, this.callback); - } - } - // Create to send "Faces-Request" param with value "partial/ajax" - // For iframe approach we are sending as request parameter - // For non-iframe (xhr ajax) it is sent in the request header - this.partial = document.createElement("input"); - this.partial.setAttribute("type", "hidden"); - this.partial.setAttribute("id", this.FRAME_PARTIAL_ID); - this.partial.setAttribute("name", this.FRAME_PARTIAL_ID); - this.partial.setAttribute("value", "partial/ajax"); - this.context.form.appendChild(this.partial); - - this.readyState = 1; - }, - - /** - * Sets the form target to iframe, sets up request parameters - * and submits the form. - * @ignore - */ - send: function(data) { - var evt = {}; - this.context.form.target = this.frame.name; - this.context.form.method = this.method; - if (this.url) { - this.context.form.action = this.url; - } - - this.readyState = 3; - - this.onreadystatechange(evt); - - var ddata = decodeURIComponent(data); - var dataArray = ddata.split("&"); - var input; - this.requestParams = new Array(); - for (var i=0; i 1 ? results : results[0]; - }; + + // --- FACES input processing functions --------------------------------------------------------------------------------------- /** * Get the form element which encloses the supplied element. @@ -398,81 +151,56 @@ if (!((faces && faces.specversion && faces.specversion >= 23000 ) && * @returns form element representing enclosing form, or first form if none found. * @ignore */ - var getForm = function getForm(element) { - if (element) { - var form = $(element); - while (form) { - - if (form.nodeName && (form.nodeName.toLowerCase() == 'form')) { - return form; - } - if (form.form) { - return form.form; - } - if (form.parentNode) { - form = form.parentNode; - } else { - form = null; - } - } - return document.forms[0]; - } - return null; + const getForm = function(element) { + const form = element.closest(FORM); + return form ? form : document.forms[0]; }; /** * Get an array of all Faces form elements which need their view state to be updated. * This covers at least the form that submitted the request and any form that is covered in the render target list. - * + * * @param context An object containing the request context, including the following properties: * the source element, per call onerror callback function, per call onevent callback function, the render * instructions, the submitting form ID, the naming container ID and naming container prefix. */ - var getFormsToUpdate = function getFormsToUpdate(context) { - var formsToUpdate = []; + const getFormsToUpdate = function getFormsToUpdate(context) { + const formsToUpdate = []; - var add = function(element) { + const add = function(element) { if (element) { - if (element.nodeName - && element.nodeName.toLowerCase() == "form" - && element.method == "post" - && element.id - && element.elements - && element.id.indexOf(context.namingContainerPrefix) == 0) - { - formsToUpdate.push(element); + if (element.nodeName + && element.nodeName.toLowerCase() === FORM + && element.method === "post" + && element.id + && element.elements + && element.id.startsWith(context.namingContainerPrefix) ) { + formsToUpdate.push(element); } else { - var forms = element.getElementsByTagName("form"); - - for (var i = 0; i < forms.length; i++) { - add(forms[i]); - } + const forms = element.getElementsByTagName(FORM); + for ( const form of forms ) + add(form); } } - } + }; if (context.formId) { add(document.getElementById(context.formId)); } if (context.render) { - if (context.render.indexOf("@all") >= 0) { + if ( contains(context.render,"@all") ) { add(document); - } - else { - var clientIds = context.render.split(" "); - - for (var i = 0; i < clientIds.length; i++) { - if (clientIds.hasOwnProperty(i)) { - add(document.getElementById(clientIds[i])); - } - } + } else { + const clientIds = context.render.split(SPACE); + for ( const clientId of clientIds ) + add(document.getElementById(clientId)); } } return formsToUpdate; - } + }; /** *

      Namespace given space separated parameters if necessary (only @@ -480,7 +208,7 @@ if (!((faces && faces.specversion && faces.specversion >= 23000 ) && * function is here for backwards compatibility with manual * faces.ajax.request() calls written before Spec790 changes.

      - * @param parameters Spaceseparated string of parameters as + * @param parameters Space separated string of parameters as * usually specified in f:ajax execute and render attributes. * @param sourceClientId The client ID of the f:ajax @@ -496,96 +224,67 @@ if (!((faces && faces.specversion && faces.specversion >= 23000 ) && * This is to be used for prefixing absolute target client IDs. * @ignore */ - var namespaceParametersIfNecessary = function namespaceParametersIfNecessary(parameters, sourceClientId, namingContainerPrefix) { - if (sourceClientId.indexOf(namingContainerPrefix) != 0) { + const namespaceParametersIfNecessary = function namespaceParametersIfNecessary(parameters, sourceClientId, namingContainerPrefix) { + if (sourceClientId.indexOf(namingContainerPrefix) !== 0) { return parameters; // Unexpected source client ID; let's silently do nothing. } - var targetClientIds = parameters.replace(/^\s+|\s+$/g, '').split(/\s+/g); + const targetClientIds = parameters.replace(/^\s+|\s+$/g, '').split(/\s+/g); - for (var i = 0; i < targetClientIds.length; i++) { - var targetClientId = targetClientIds[i]; + // adapt each targetClientId and replace the modified version inside the original array + for ( let i = 0; i < targetClientIds.length; i++) { + let targetClientId = targetClientIds[i]; - if (targetClientId.indexOf(faces.separatorchar) == 0) { - targetClientId = targetClientId.substring(1); + if (targetClientId.indexOf(faces.separatorchar) === 0) { + targetClientId = targetClientId.substring(1); - if (targetClientId.indexOf(namingContainerPrefix) != 0) { + if (targetClientId.indexOf(namingContainerPrefix) !== 0) { targetClientId = namingContainerPrefix + targetClientId; } - } - else if (targetClientId.indexOf(namingContainerPrefix) != 0) { - var parentClientId = sourceClientId.substring(0, sourceClientId.lastIndexOf(faces.separatorchar)); - - if (namingContainerPrefix + targetClientId == parentClientId) { - targetClientId = parentClientId; - } - else { - targetClientId = parentClientId + faces.separatorchar + targetClientId; - } - } - - targetClientIds[i] = targetClientId; - } - - return targetClientIds.join(' '); - }; + } else if (targetClientId.indexOf(namingContainerPrefix) !== 0) { + const parentClientId = sourceClientId.substring(0, sourceClientId.lastIndexOf(faces.separatorchar)); - /** - * Check if a value exists in an array - * @ignore - */ - var isInArray = function isInArray(array, value) { - for (var i = 0; i < array.length; i++) { - if (array[i] === value) { - return true; + if (namingContainerPrefix + targetClientId === parentClientId) { + targetClientId = parentClientId; + } else { + targetClientId = parentClientId + faces.separatorchar + targetClientId; + } } + + // replace the modified target client inside the array + targetClientIds[i] = targetClientId; } - return false; + + // return a space separated string of all the target client id + return targetClientIds.join(SPACE); }; - /** - * Evaluate JavaScript code in a global context. - * @param src JavaScript code to evaluate - * @ignore - */ - var globalEval = function globalEval(src) { - if (window.execScript) { - window.execScript(src); - return; - } - // We have to wrap the call in an anon function because of a firefox bug, where this is incorrectly set - // We need to explicitly call window.eval because of a Chrome peculiarity - /** - * @ignore - */ - var fn = function() { - window.eval.call(window,src); - }; - fn(); - }; + // --- HTML as String processing functions ---------------------------------------------------------------------------- + + // Regex to find all scripts in a string + const SCRIPT_TAG_REGEX = /]*>([\S\s]*?)<\/script>/igm; + + // Regex to find one script, to isolate it's content [2] and attributes [1] + const SINGLE_SCRIPT_TAG_REGEX = /]*)>([\S\s]*?)<\/script>/im; + + // Regex to find type attribute + const TAG_ATTRIBUTE_TYPE_REGEX = /type="([\S]*?)"/im; /** * Get all scripts from supplied string, return them as an array for later processing. - * @param str + * @param html a String containing a portion of html * @returns {array} of script text * @ignore */ - var getScripts = function getScripts(str) { - // Regex to find all scripts in a string - var findscripts = /]*>([\S\s]*?)<\/script>/igm; - // Regex to find one script, to isolate it's content [2] and attributes [1] - var findscript = /]*)>([\S\s]*?)<\/script>/im; - // Regex to find type attribute - var findtype = /type="([\S]*?)"/im; - var initialnodes = []; - var scripts = []; - initialnodes = str.match(findscripts); + const getScripts = function getScripts(html) { + const scripts = []; + const initialnodes = html.match(SCRIPT_TAG_REGEX); while (!!initialnodes && initialnodes.length > 0) { - var scriptStr = []; - scriptStr = initialnodes.shift().match(findscript); + let scriptStr = []; + scriptStr = initialnodes.shift().match(SINGLE_SCRIPT_TAG_REGEX); // todo: multiple shift array ... rewrite this algo // check the type - skip if specified but not text/javascript - var type = scriptStr[1].match(findtype); + const type = scriptStr[1].match(TAG_ATTRIBUTE_TYPE_REGEX); if (!!type && type[1] !== "text/javascript") { continue; } @@ -594,8 +293,13 @@ if (!((faces && faces.specversion && faces.specversion >= 23000 ) && return scripts; }; - var removeScripts = function removeScripts(str) { - return str.replace(/]*type="text\/javascript"[^>]*>([\S\s]*?)<\/script>/igm,""); + /** + * Remove all the portion of code matching the script pattern from the passed string + * @param html a String containing a portion of html + * @ignore + */ + const removeScripts = function removeScripts(html) { + return html.replace(/]*type="text\/javascript"[^>]*>([\S\s]*?)<\/script>/igm, EMPTY); }; /** @@ -603,24 +307,20 @@ if (!((faces && faces.specversion && faces.specversion >= 23000 ) && * @param scripts Array of script nodes. * @ignore */ - var runScripts = function runScripts(scripts) { + const runScripts = function runScripts(scripts) { if (!scripts || scripts.length === 0) { return; } - var loadedScripts = document.getElementsByTagName("script"); - var loadedScriptUrls = []; - - for (var i = 0; i < loadedScripts.length; i++) { - var scriptNode = loadedScripts[i]; - var url = scriptNode.getAttribute("src"); + const loadedScripts = document.getElementsByTagName("script"); + const loadedScriptUrls = []; - if (url) { - loadedScriptUrls.push(url); - } + for ( const scriptNode of loadedScripts ) { + const url = scriptNode.getAttribute("src"); + if (url) loadedScriptUrls.push(url); } - var head = document.head || document.getElementsByTagName('head')[0] || document.documentElement; + const head = document.head || document.getElementsByTagName('head')[0] || document.documentElement; runScript(head, loadedScriptUrls, scripts, 0); }; @@ -632,52 +332,53 @@ if (!((faces && faces.specversion && faces.specversion >= 23000 ) && * @param index Index of script to be loaded. * @ignore */ - var runScript = function runScript(head, loadedScriptUrls, scripts, index) { + const runScript = function runScript(head, loadedScriptUrls, scripts, index) { if (index >= scripts.length) { return; } // Regex to find src attribute - var findsrc = /src="([\S]*?)"/im; + const findsrc = /src="([\S]*?)"/im; // Regex to remove leading cruft - var stripStart = /^\s*( + + + + + + Configuration of an administered object. + + + + + + + + + Description of this administered object. + + + + + + + + + The name element specifies the JNDI name of the + administered object being defined. + + + + + + + + + The administered object's interface type. + + + + + + + + + The administered object's class name. + + + + + + + + + Resource adapter name. + + + + + + + + + Property of the administered object property. This may be a + vendor-specific property. + + + + + + + + + + + + + + + + Configuration of a Connector Connection Factory resource. + + + + + + + + + Description of this resource. + + + + + + + + + The name element specifies the JNDI name of the + resource being defined. + + + + + + + + + The fully qualified class name of the connection factory + interface. + + + + + + + + + Resource adapter name. + + + + + + + + + Maximum number of connections that should be concurrently + allocated for a connection pool. + + + + + + + + + Minimum number of connections that should be concurrently + allocated for a connection pool. + + + + + + + + + The level of transaction support the connection factory + needs to support. + + + + + + + + + Resource property. This may be a vendor-specific + property. + + + + + + + + + + + + + + + + Configuration of a DataSource. + + + + + + + + + Description of this DataSource. + + + + + + + + + The name element specifies the JNDI name of the + data source being defined. + + + + + + + + + DataSource, XADataSource or ConnectionPoolDataSource + implementation class. + + + + + + + + + Database server name. + + + + + + + + + Port number where a server is listening for requests. + + + + + + + + + Name of a database on a server. + + + + + + + + url property is specified + along with other standard DataSource properties + such as serverName, databaseName + and portNumber, the more specific properties will + take precedence and url will be ignored. + + ]]> + + + + + + + + User name to use for connection authentication. + + + + + + + + + Password to use for connection authentication. + + + + + + + + + JDBC DataSource property. This may be a vendor-specific + property or a less commonly used DataSource property. + + + + + + + + + Sets the maximum time in seconds that this data source + will wait while attempting to connect to a database. + + + + + + + + + Set to false if connections should not participate in + transactions. + + + + + + + + + Isolation level for connections. + + + + + + + + + Number of connections that should be created when a + connection pool is initialized. + + + + + + + + + Maximum number of connections that should be concurrently + allocated for a connection pool. + + + + + + + + + Minimum number of connections that should be concurrently + allocated for a connection pool. + + + + + + + + + The number of seconds that a physical connection should + remain unused in the pool before the connection is + closed for a connection pool. + + + + + + + + + The total number of statements that a connection pool + should keep open. + + + + + + + + + + + + + + + + The description type is used by a description element to + provide text describing the parent element. The elements + that use this type should include any information that the + Deployment Component's Deployment File file producer wants + to provide to the consumer of the Deployment Component's + Deployment File (i.e., to the Deployer). Typically, the + tools used by such a Deployment File consumer will display + the description when processing the parent element that + contains the description. + + The lang attribute defines the language that the + description is provided in. The default value is "en" (English). + + + + + + + + + + + + + + + This type defines a dewey decimal that is used + to describe versions of documents. + + + + + + + + + + + + + + + + Employee Self Service + + + The value of the xml:lang attribute is "en" (English) by default. + + ]]> + + + + + + + + + + + + + + + + EmployeeRecord + + ../products/product.jar#ProductEJB + + ]]> + + + + + + + + + + + + + + + The ejb-local-refType is used by ejb-local-ref elements for + the declaration of a reference to an enterprise bean's local + home or to the local business interface of a 3.0 bean. + The declaration consists of: + + - an optional description + - the enterprise bean's reference name used in the code of the + Deployment Component that's referencing the enterprise bean. + - the optional expected type of the referenced enterprise bean + - the optional expected local interface of the referenced + enterprise bean or the local business interface of the + referenced enterprise bean. + - the optional expected local home interface of the referenced + enterprise bean. Not applicable if this ejb-local-ref refers + to the local business interface of a 3.0 bean. + - optional ejb-link information, used to specify the + referenced enterprise bean + - optional elements to define injection of the named enterprise + bean into a component field or property. + + + + + + + + + + + + + + + + + + + + + + ejb/Payroll + + ]]> + + + + + + + + + + + + + + + The ejb-refType is used by ejb-ref elements for the + declaration of a reference to an enterprise bean's home or + to the remote business interface of a 3.0 bean. + The declaration consists of: + + - an optional description + - the enterprise bean's reference name used in the code of + the Deployment Component that's referencing the enterprise + bean. + - the optional expected type of the referenced enterprise bean + - the optional remote interface of the referenced enterprise bean + or the remote business interface of the referenced enterprise + bean + - the optional expected home interface of the referenced + enterprise bean. Not applicable if this ejb-ref + refers to the remote business interface of a 3.0 bean. + - optional ejb-link information, used to specify the + referenced enterprise bean + - optional elements to define injection of the named enterprise + bean into a component field or property + + + + + + + + + + + + + + + + + + + + + + + The ejb-ref-typeType contains the expected type of the + referenced enterprise bean. + + The ejb-ref-type designates a value + that must be one of the following: + + Entity + Session + + + + + + + + + + + + + + + + + + + This type is used to designate an empty + element when used. + + + + + + + + + + + + + + The env-entryType is used to declare an application's + environment entry. The declaration consists of an optional + description, the name of the environment entry, a type + (optional if the value is injected, otherwise required), and + an optional value. + + It also includes optional elements to define injection of + the named resource into fields or JavaBeans properties. + + If a value is not specified and injection is requested, + no injection will occur and no entry of the specified name + will be created. This allows an initial value to be + specified in the source code without being incorrectly + changed when no override has been specified. + + If a value is not specified and no injection is requested, + a value must be supplied during deployment. + + This type is used by env-entry elements. + + + + + + + + + minAmount + + ]]> + + + + + + + java.lang.Integer + + ]]> + + + + + + + 100.00 + + ]]> + + + + + + + + + + + + + + + java.lang.Boolean + java.lang.Class + com.example.Color + + ]]> + + + + + + + + + + + + + + + The elements that use this type designate the name of a + Java class or interface. The name is in the form of a + "binary name", as defined in the JLS. This is the form + of name used in Class.forName(). Tools that need the + canonical name (the name used in source code) will need + to convert this binary name to the canonical name. + + + + + + + + + + + + + + + + This type defines four different values which can designate + boolean values. This includes values yes and no which are + not designated by xsd:boolean + + + + + + + + + + + + + + + + + + + + + The icon type contains small-icon and large-icon elements + that specify the file names for small and large GIF, JPEG, + or PNG icon images used to represent the parent element in a + GUI tool. + + The xml:lang attribute defines the language that the + icon file names are provided in. Its value is "en" (English) + by default. + + + + + + + + employee-service-icon16x16.jpg + + ]]> + + + + + + + employee-service-icon32x32.jpg + + ]]> + + + + + + + + + + + + + + + + An injection target specifies a class and a name within + that class into which a resource should be injected. + + The injection target class specifies the fully qualified + class name that is the target of the injection. The + Jakarta EE specifications describe which classes can be an + injection target. + + The injection target name specifies the target within + the specified class. The target is first looked for as a + JavaBeans property name. If not found, the target is + looked for as a field name. + + The specified resource will be injected into the target + during initialization of the class by either calling the + set method for the target property or by setting a value + into the named field. + + + + + + + + + + + + + + The following transaction isolation levels are allowed + (see documentation for the java.sql.Connection interface): + TRANSACTION_READ_UNCOMMITTED + TRANSACTION_READ_COMMITTED + TRANSACTION_REPEATABLE_READ + TRANSACTION_SERIALIZABLE + + + + + + + + + + + + + + + + + + + The java-identifierType defines a Java identifier. + The users of this type should further verify that + the content does not contain Java reserved keywords. + + + + + + + + + + + + + + + + + + This is a generic type that designates a Java primitive + type or a fully qualified name of a Java interface/type, + or an array of such types. + + + + + + + + + + + + + + + + + : + + Example: + + jdbc:mysql://localhost:3307/testdb + + ]]> + + + + + + + + + + + + + + + + + Configuration of a Messaging Connection Factory. + + + + + + + + + Description of this Messaging Connection Factory. + + + + + + + + + The name element specifies the JNDI name of the + messaging connection factory being defined. + + + + + + + + + Fully-qualified name of the messaging connection factory + interface. Permitted values are jakarta.jms.ConnectionFactory, + jakarta.jms.QueueConnectionFactory, or + jakarta.jms.TopicConnectionFactory. If not specified, + jakarta.jms.ConnectionFactory will be used. + + + + + + + + + Fully-qualified name of the messaging connection factory + implementation class. Ignored if a resource adapter + is used. + + + + + + + + + Resource adapter name. If not specified, the application + server will define the default behavior, which may or may + not involve the use of a resource adapter. + + + + + + + + + User name to use for connection authentication. + + + + + + + + + Password to use for connection authentication. + + + + + + + + + Client id to use for connection. + + + + + + + + + Messaging Connection Factory property. This may be a vendor-specific + property or a less commonly used ConnectionFactory property. + + + + + + + + + Set to false if connections should not participate in + transactions. + + + + + + + + + Maximum number of connections that should be concurrently + allocated for a connection pool. + + + + + + + + + Minimum number of connections that should be concurrently + allocated for a connection pool. + + + + + + + + + + + + + + + + Configuration of a Messaging Destination. + + + + + + + + + Description of this Messaging Destination. + + + + + + + + + The name element specifies the JNDI name of the + messaging destination being defined. + + + + + + + + + Fully-qualified name of the messaging destination interface. + Permitted values are jakarta.jms.Queue and jakarta.jms.Topic + + + + + + + + + Fully-qualified name of the messaging destination implementation + class. Ignored if a resource adapter is used unless the + resource adapter defines more than one destination implementation + class for the specified interface. + + + + + + + + + Resource adapter name. If not specified, the application + server will define the default behavior, which may or may + not involve the use of a resource adapter. + + + + + + + + + Name of the queue or topic. + + + + + + + + + Messaging Destination property. This may be a vendor-specific + property or a less commonly used Destination property. + + + + + + + + + + + + + + + + The jndi-nameType type designates a JNDI name in the + Deployment Component's environment and is relative to the + java:comp/env context. A JNDI name must be unique within the + Deployment Component. + + + + + + + + + + + + + + + com.aardvark.payroll.PayrollHome + + ]]> + + + + + + + + + + + + + + + The lifecycle-callback type specifies a method on a + class to be called when a lifecycle event occurs. + Note that each class may have only one lifecycle callback + method for any given event and that the method may not + be overloaded. + + If the lifefycle-callback-class element is missing then + the class defining the callback is assumed to be the + component class in scope at the place in the descriptor + in which the callback definition appears. + + + + + + + + + + + + + + + + + The listenerType indicates the deployment properties for a web + application listener bean. + + + + + + + + + + The listener-class element declares a class in the + application must be registered as a web + application listener bean. The value is the fully + qualified classname of the listener class. + + + + + + + + + + + + + + + + The localType defines the fully-qualified name of an + enterprise bean's local interface. + + + + + + + + + + + + + + + + The local-homeType defines the fully-qualified + name of an enterprise bean's local home interface. + + + + + + + + + + + + + + + + Configuration of a Mail Session resource. + + + + + + + + + Description of this Mail Session resource. + + + + + + + + + The name element specifies the JNDI name of the + Mail Session resource being defined. + + + + + + + + + Storage protocol. + + + + + + + + + Service provider store protocol implementation class + + + + + + + + + Transport protocol. + + + + + + + + + Service provider transport protocol implementation class + + + + + + + + + Mail server host name. + + + + + + + + + Mail server user name. + + + + + + + + + Password. + + + + + + + + + Email address to indicate the message sender. + + + + + + + + + Mail server property. This may be a vendor-specific + property. + + + + + + + + + + + + + + + + This type is a general type that can be used to declare + parameter/value lists. + + + + + + + + + + The param-name element contains the name of a + parameter. + + + + + + + + + The param-value element contains the value of a + parameter. + + + + + + + + + + + + + + + + The elements that use this type designate either a relative + path or an absolute path starting with a "/". + + In elements that specify a pathname to a file within the + same Deployment File, relative filenames (i.e., those not + starting with "/") are considered relative to the root of + the Deployment File's namespace. Absolute filenames (i.e., + those starting with "/") also specify names in the root of + the Deployment File's namespace. In general, relative names + are preferred. The exception is .war files where absolute + names are preferred for consistency with the Servlet API. + + + + + + + + + + + + + + + + myPersistenceContext + + + + + myPersistenceContext + + PersistenceUnit1 + + Extended + + + ]]> + + + + + + + + + The persistence-context-ref-name element specifies + the name of a persistence context reference; its + value is the environment entry name used in + Deployment Component code. The name is a JNDI name + relative to the java:comp/env context. + + + + + + + + + The Application Assembler(or BeanProvider) may use the + following syntax to avoid the need to rename persistence + units to have unique names within a Jakarta EE application. + + The Application Assembler specifies the pathname of the + root of the persistence.xml file for the referenced + persistence unit and appends the name of the persistence + unit separated from the pathname by #. The pathname is + relative to the referencing application component jar file. + In this manner, multiple persistence units with the same + persistence unit name may be uniquely identified when the + Application Assembler cannot change persistence unit names. + + + + + + + + + + + Used to specify properties for the container or persistence + provider. Vendor-specific properties may be included in + the set of properties. Properties that are not recognized + by a vendor must be ignored. Entries that make use of the + namespace jakarta.persistence and its subnamespaces must not + be used for vendor-specific properties. The namespace + jakarta.persistence is reserved for use by the specification. + + + + + + + + + + + + + + + + + The persistence-context-synchronizationType specifies + whether a container-managed persistence context is automatically + synchronized with the current transaction. + + The value of the persistence-context-synchronization element + must be one of the following: + Synchronized + Unsynchronized + + + + + + + + + + + + + + + + + + + The persistence-context-typeType specifies the transactional + nature of a persistence context reference. + + The value of the persistence-context-type element must be + one of the following: + Transaction + Extended + + + + + + + + + + + + + + + + + + + Specifies a name/value pair. + + + + + + + + + + + + + + + + + + + + myPersistenceUnit + + + + + myPersistenceUnit + + PersistenceUnit1 + + + + ]]> + + + + + + + + + The persistence-unit-ref-name element specifies + the name of a persistence unit reference; its + value is the environment entry name used in + Deployment Component code. The name is a JNDI name + relative to the java:comp/env context. + + + + + + + + + The Application Assembler(or BeanProvider) may use the + following syntax to avoid the need to rename persistence + units to have unique names within a Jakarta EE application. + + The Application Assembler specifies the pathname of the + root of the persistence.xml file for the referenced + persistence unit and appends the name of the persistence + unit separated from the pathname by #. The pathname is + relative to the referencing application component jar file. + In this manner, multiple persistence units with the same + persistence unit name may be uniquely identified when the + Application Assembler cannot change persistence unit names. + + + + + + + + + + + + + + + + com.wombat.empl.EmployeeService + + ]]> + + + + + + + + + + + + + + + jms/StockQueue + + jakarta.jms.Queue + + + + ]]> + + + + + + + + + The resource-env-ref-name element specifies the name + of a resource environment reference; its value is + the environment entry name used in + the Deployment Component code. The name is a JNDI + name relative to the java:comp/env context and must + be unique within a Deployment Component. + + + + + + + + + The resource-env-ref-type element specifies the type + of a resource environment reference. It is the + fully qualified name of a Java language class or + interface. + + + + + + + + + + + + + + + + + jdbc/EmployeeAppDB + javax.sql.DataSource + Container + Shareable + + + ]]> + + + + + + + + + The res-ref-name element specifies the name of a + resource manager connection factory reference. + The name is a JNDI name relative to the + java:comp/env context. + The name must be unique within a Deployment File. + + + + + + + + + The res-type element specifies the type of the data + source. The type is specified by the fully qualified + Java language class or interface + expected to be implemented by the data source. + + + + + + + + + + + + + + + + + + + The res-authType specifies whether the Deployment Component + code signs on programmatically to the resource manager, or + whether the Container will sign on to the resource manager + on behalf of the Deployment Component. In the latter case, + the Container uses information that is supplied by the + Deployer. + + The value must be one of the two following: + + Application + Container + + + + + + + + + + + + + + + + + + + The res-sharing-scope type specifies whether connections + obtained through the given resource manager connection + factory reference can be shared. The value, if specified, + must be one of the two following: + + Shareable + Unshareable + + The default value is Shareable. + + + + + + + + + + + + + + + + + + + The run-asType specifies the run-as identity to be + used for the execution of a component. It contains an + optional description, and the name of a security role. + + + + + + + + + + + + + + + + + + The role-nameType designates the name of a security role. + + The name must conform to the lexical rules for a token. + + + + + + + + + + + + + + + + + This role includes all employees who are authorized + to access the employee service application. + + employee + + + ]]> + + + + + + + + + + + + + + + + + The security-role-refType contains the declaration of a + security role reference in a component's or a + Deployment Component's code. The declaration consists of an + optional description, the security role name used in the + code, and an optional link to a security role. If the + security role is not specified, the Deployer must choose an + appropriate security role. + + + + + + + + + + The value of the role-name element must be the String used + as the parameter to the + EJBContext.isCallerInRole(String roleName) method or the + HttpServletRequest.isUserInRole(String role) method. + + + + + + + + + The role-link element is a reference to a defined + security role. The role-link element must contain + the name of one of the security roles defined in the + security-role elements. + + + + + + + + + + + + + + + + This type adds an "id" attribute to xsd:QName. + + + + + + + + + + + + + + + + + + This type adds an "id" attribute to xsd:boolean. + + + + + + + + + + + + + + + + + + This type adds an "id" attribute to xsd:NMTOKEN. + + + + + + + + + + + + + + + + + + This type adds an "id" attribute to xsd:anyURI. + + + + + + + + + + + + + + + + + + This type adds an "id" attribute to xsd:integer. + + + + + + + + + + + + + + + + + + This type adds an "id" attribute to xsd:positiveInteger. + + + + + + + + + + + + + + + + + + This type adds an "id" attribute to xsd:nonNegativeInteger. + + + + + + + + + + + + + + + + + + This type adds an "id" attribute to xsd:string. + + + + + + + + + + + + + + + + + + This is a special string datatype that is defined by Jakarta EE as + a base type for defining collapsed strings. When schemas + require trailing/leading space elimination as well as + collapsing the existing whitespace, this base type may be + used. + + + + + + + + + + + + + + + + + + This simple type designates a boolean with only two + permissible values + + - true + - false + + + + + + + + + + + + + + + + + + The url-patternType contains the url pattern of the mapping. + It must follow the rules specified in Section 11.2 of the + Servlet API Specification. This pattern is assumed to be in + URL-decoded form and must not contain CR(#xD) or LF(#xA). + If it contains those characters, the container must inform + the developer with a descriptive error message. + The container must preserve all characters including whitespaces. + + + + + + + + + + + + + + + + CorporateStocks + + + + ]]> + + + + + + + + + The message-destination-name element specifies a + name for a message destination. This name must be + unique among the names of message destinations + within the Deployment File. + + + + + + + + + A product specific name that this message destination + should be mapped to. Each message-destination-ref + element that references this message destination will + define a name in the namespace of the referencing + component or in one of the other predefined namespaces. + Many application servers provide a way to map these + local names to names of resources known to the + application server. This mapped name is often a global + JNDI name, but may be a name of any form. Each of the + local names should be mapped to this same global name. + + Application servers are not required to support any + particular form or type of mapped name, nor the ability + to use mapped names. The mapped name is + product-dependent and often installation-dependent. No + use of a mapped name is portable. + + + + + + + + + The JNDI name to be looked up to resolve the message destination. + + + + + + + + + + + + + + + + jms/StockQueue + + jakarta.jms.Queue + + Consumes + + CorporateStocks + + + + ]]> + + + + + + + + + The message-destination-ref-name element specifies + the name of a message destination reference; its + value is the environment entry name used in + Deployment Component code. + + + + + + + + + + + + + + + + + + + + The message-destination-usageType specifies the use of the + message destination indicated by the reference. The value + indicates whether messages are consumed from the message + destination, produced for the destination, or both. The + Assembler makes use of this information in linking producers + of a destination with its consumers. + + The value of the message-destination-usage element must be + one of the following: + Consumes + Produces + ConsumesProduces + + + + + + + + + + + + + + + + + + + jakarta.jms.Queue + + + ]]> + + + + + + + + + + + + + + + The message-destination-linkType is used to link a message + destination reference or message-driven bean to a message + destination. + + The Assembler sets the value to reflect the flow of messages + between producers and consumers in the application. + + The value must be the message-destination-name of a message + destination in the same Deployment File or in another + Deployment File in the same Jakarta EE application unit. + + Alternatively, the value may be composed of a path name + specifying a Deployment File containing the referenced + message destination with the message-destination-name of the + destination appended and separated from the path name by + "#". The path name is relative to the Deployment File + containing Deployment Component that is referencing the + message destination. This allows multiple message + destinations with the same name to be uniquely identified. + + + + + + + + + + + + + + + + The transaction-supportType specifies the level of + transaction support provided by the resource adapter. It is + used by transaction-support elements. + + The value must be one of the following: + + NoTransaction + LocalTransaction + XATransaction + + + + + + + + + + + + + diff --git a/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.composite.taglib.xml b/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.composite.taglib.xml deleted file mode 100644 index 039e119e0f..0000000000 --- a/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.composite.taglib.xml +++ /dev/null @@ -1,1449 +0,0 @@ - - - - - Jakarta Faces Composite Components Tag Library

      - -
      - -

      Describes the tag library used for declaring and defining - the usage contract for composite UI Components. When authoring a - composite component, use of this tag library is largely optional, - though always recommended. Declaring and defining a composite - component with this taglib provides valuable information about the - component that can be used by tools and users of the composite - component. In most cases, a composite component can be authored - without declaring and defining its usage contract with this taglib. -

      - - - -

      Creating a Composite Component

      - -

      A composite component is declared by creating a Facelets file - inside of a resource library. (See section 2.6 "Resource Handling" of the Jakarta Faces Specification Document - for more information about resource - libraries.) A composite component must reside within a resource - library. It is not possible to create a composite component without - putting it inside of a resource library.

      - -

      The default XML namespace URI of the taglib that contains the - composite component, for use in the using page, is - jakarta.faces.composite/<composite-library-name>, - where <composite-library-name> is the name of the - resource library. For example:

      - -
      <!DOCTYPE html>
      -<html xmlns:ui="jakarta.faces.facelets"
      -      xmlns:f="jakarta.faces.core"
      -      xmlns:h="jakarta.faces.html"
      -      xmlns:ez="jakarta.faces.composite/ezcomp">
      -    ...
      -</html>
      - -

      This declares that any Facelets file in the resource -library called ezcomp can be used as a regular Faces UI -component in a view with the above namespace declaration by using the -"ez" prefix. For example, placing a file called -foo.xhtml in a resource library called ezcomp -would make that file accessible like this.

      - -
      <ez:foo />
      - - -

      The implementation must also support declaring the - namespace of the tag library in a Faces VDL tag library descriptor. - This descriptor file is optional and is useful for component vendors - that do not want to use the default XML namespace. This version of - the proposal currently uses the facelet taglib descriptor syntax. For - example:

      - -
      <facelet-taglib id="ez">
      -    <namespace>http://example.com/path</namespace>
      -    <composite-library-name>ezcomp</composite-library-name>
      -</facelet-taglib>
      - -

      Components from that taglibrary may be used in a using page by - declaring them in the XML namespace for that view:

      - -
      <!DOCTYPE html>
      -<html xmlns:ui="jakarta.faces.facelets"
      -      xmlns:f="jakarta.faces.core"
      -      xmlns:h="jakarta.faces.html"
      -      xmlns:ez="http://example.com/path">
      -    ...
      -</html>
      - - -

      Below is an example of a fairly - involved composite component declaration. Such a declaration might - appear in foo.xhtml.

      - -
        -
      1. <cc:interface name="foo"
      2. -
      3.               displayName="Very Simple Login Panel"
      4. -
      5.               preferred="true"
      6. -
      7.               expert="false"
      8. -
      9.               shortDescription="An illustration of the composite component feature">
      10. -
      11.   <cc:attribute name="model" required="true">
      12. -
      13.     <cc:attribute name="loginAction" required="true" method-signature="java.lang.Object action()"/ >
      14. -
      15.   </cc:attribute>
      16. -
      17.   <cc:attribute name="valueChangeListener" targets="username" />
      18. -
      19.   <cc:attribute name="specialMethodExpression"
      20. -
      21.                        method-signature="com.foo.User validateCurrentUser()" />
      22. -
      23.   <cc:attribute name="loginButtonLabel" default="Login" />
      24. -
      25.   <cc:editableValueHolder name="username" />
      26. -
      27.   <cc:actionSource name="loginEvent" />
      28. -
      29.   <cc:actionSource name="cancelEvent" />
      30. -
      31.   <cc:actionSource name="allEvents" targets="loginEvent cancelEvent" />
      32. -
      33. </cc:interface>
      34. -
      35. -
      36.   <ui:decorate template="fooTemplate.xhtml">
      37. -
      38.     <ui:define name="header">
      39. -
      40.       <p>This is the login panel header</p>
      41. -
      42.     </ui:define>
      43. -
      44.     <ui:define name="body">
      45. -
      46.       <p>
      47. -
      48.          <h:inputText id="username" />
      49. -
      50.       </p>
      51. -
      52.       <p>
      53. -
      54.         <h:commandButton id="loginEvent"
      55. -
      56.                          value="#{cc.attrs.loginButtonLabel}">
      57. -
      58.         </h:commandButton>
      59. -
      60.         <h:commandButton id="cancelEvent" value="Cancel" action="cancel">
      61. -
      62.         </h:commandButton>
      63. -
      64.         <special:validateUserButton
      65. -
      66.           validateUser="#{cc.attrs.specialMethodExpression}" />
      67. -
      68.       </p>
      69. -
      70.     </ui:define>
      71. -
      72.     <ui:define name="footer">
      73. -
      74.      <p>This is the login panel footer</p>
      75. -
      76.     </ui:define>
      77. -
      78.   </ui:decorate>
      79. -
      80. </cc:implementation>
      - -

      The values for attributes in a composite component VDL file can be -fully localized by putting them inside a ResourceBundle in the same -directory as the VDL view and accessing them with the per-component -resource bundle syntax. Consider the file foo.xhtml, in -the resource library ezcomp. The -shortDescription element could be changed to be:

      - -
      <cc:interface shortDescription="#{cc.resourceBundleMap.shortDescription}" >
      - -

      In this case, In the same ezcomp directory as -foo.xhtml, there would be a foo.properties -file that would contain this entry:

      - -
      shortDescription=A really nifty login panel.
      - -

      The normal localization rules for ResourceBundle would -apply.

      - -

      Refer to the composite tag for the details of defining the interface and implementation for composite components.

      - -
      - - - -
      -
      -]]>
      -    jakarta.faces.composite
      -    
      -        
      -
      -            
      -

      Declares that the -composite component whose contract is declared by the -<cc:interface> in which this element is nested -exposes an implementation of ActionSource2 suitable for use -as the target of attached objects in the using page. -Any attached objects suitable for implementations of -ActionSource2 may be attached to the composite component. -Consider this excerpt from the using page: -

      - -
      1. <ez:loginPanel id="loginPanel" model="#{bean}">
      2. -
      3.   <f:valueChangeListener for="username"
      4. -
      5.                          binding="#{bean.useridValueChangeListener}" />
      6. -
      7.   <f:actionListener for="loginEvent"
      8. -
      9.                     binding="#{bean.loginEventListener}" />
      10. -
      11.   <f:actionListener for="cancelEvent"
      12. -
      13.                     binding="#{bean.cancelEventListener}" />
      14. -
      15.   <f:actionListener for="allEvents"
      16. -
      17.                     binding="#{bean.allEventsListener}" />
      18. -
      19. </ez:loginPanel>
      - -

      The <f:actionListener> elements on lines 4, 7, and 10 -refer to the attached objects declared on lines 2, 3 and 4 below.

      - -
      1. <cc:interface name="loginPanel">
      2. -
      3.   <cc:actionSource name="loginEvent" />
      4. -
      5.   <cc:actionSource name="cancelEvent" />
      6. -
      7.   <cc:actionSource name="allEvents" targets="loginEvent cancelEvent" />
      8. -
      9. </cc:interface>
      - -

      Most of the concepts from example content from <cc:valueHolder> -also applies in the case of -<cc:actionSource>.

      - -

      Please see <cc:interface> for a usage -example.

      - - -]]> -
      - actionSource - com.sun.faces.facelets.tag.composite.ActionSource2AttachedObjectTargetHandler - - - - -

      - The value of this attribute maps back to the "for" attribute on an attachable object - nested within a composite component. If the "targets" attribute is not specified, - this value also represents the component ID of the target component within the - that the <cc:implementation> - ActionListener should be mapped to. -

      -]]> - -
      - name - true - java.lang.String -
      - - - - -

      If present, this must be a space (not tab) separated list of client -ids (relative to the top level component) of components within -the <cc:implementation> section. Space is -used as the delimiter for compatibility with the IDREFS and NMTOKENS -data types from the XML Schema.

      ]]> - -
      - targets - false - java.lang.String -
      - - - - -

      The "hidden" flag is used to identify features that are intended only for tool use, and which should not be exposed to humans.

      - -]]> - -
      - hidden - false - boolean -
      -
      - - - - -

      Declares an attribute that may be given to an instance of the -composite component tag for this composite component. There -may be zero or many of these inside of the -<cc:interface> section. This element may be -nested within other <cc:attribute> elements to -convey a usage contract that includes nested properties.

      - -

      Please see summary -page for a usage example.

      - -

      The top level component in which this element is - ultimately nested must be a NamingContainer. - There are certain component properties that must not be - exposed using this element. The motivation for this - restriction is that the mapping of markup attributes to - component properties/attributes does not allow for these - attributes to be set. The following properties must not be - exposed using this element.

      - -
        -
      • binding
      • -
      • id
      • -
      • inView
      • -
      • parent
      • -
      • rendered
      • -
      • rendererType
      • -
      • transient
      • -
      - -]]> -
      - attribute - com.sun.faces.facelets.tag.composite.AttributeHandler - - - - -

      If this attribute is not required, and a - value is not supplied by the page author, use this as - the default value.

      ]]> - -
      - default - false - java.lang.String -
      - - - - -

      The name to display in a tool palette - containing this component. The value of this attribute will be set as - the value for this property on the composite - component bean descriptor.

      ]]> - -
      - displayName - false - java.lang.String -
      - - - - -

      Is this component only for expert users? - The value of this attribute will be set as the value for - this property on the composite component bean - descriptor.

      ]]> - -
      - expert - false - boolean -
      - - - -

      The "hidden" flag is used to identify features that are intended only - for tool use, and which should not be exposed to humans. The value of - this attribute will be set as the value for this property on the - composite component bean descriptor.

      - - ]]> -
      - hidden - false - boolean -
      - - - - -

      Declares that this attribute must be a MethodExpression -whose method signature is described by the value of this attribute. The -signature must be described using fully qualified class names wherever a -type is required. This attribute is mutually exclusive with the "type" -attribute. If both attributes are present, the "method-signature" -attribute is ignored.

      - -

      Provides the signature of the Java method. The syntax of - the method-signature element is as follows (taken from - function-signature in web-jsptaglibrary_2_1.xsd):

      - -

      MethodSignature ::= ReturnType S MethodName S? - '(' S? Parameters? S? ')'

      - -

      ReturnType ::= Type

      - -

      MethodName ::= Identifier

      - -

      Parameters ::= Parameter - | ( Parameter S? ',' S? Parameters )

      - -

      Parameter ::= Type

      - -

      Where:

      - -
        - -
      • Type is a basic type or a fully qualified - Java class name (including package name), - as per the 'Type' production in the Java - Language Specification, Second Edition, - Chapter 18.

      • - -
      • Identifier is a Java identifier, as per - the 'Identifier' production in the Java - Language Specification, Second - Edition, Chapter 18.

      • - -
      - -

      Example:

      - -

      java.lang.String nickName( java.lang.String, int )

      -]]> - -
      - method-signature - false - java.lang.String -
      - - - - -

      The name of the attribute as it must appear on the composite -component tag in the using page. If the value of the -name attribute is equal to (without the quotes) -“action”, “actionListener”, -“validator”, or “valueChangeListener”, the -action described in ViewHandler.retargetMethodExpressions() -must be taken to handle the attribute. In these cases, the -method-signature attribute, if present, must be ignored as -its value is derived as described in -retargetMethodExpressions().]]> - - - name - true - java.lang.String - - - - - -

      Is this a "preferred" component. The value - of this attribute will be set as the value for this - property on the composite component bean - descriptor.

      ]]> - -
      - preferred - false - boolean -
      - - - - -

      True if the page author must supply a value - for this attribute. The default value is false.

      ]]> - -
      - required - false - boolean -
      - - - - -

      A short description of the purpose of this - component. The value of this attribute will be set as - the value for this property on the composite - component bean descriptor.

      ]]> - -
      - shortDescription - false - java.lang.String -
      - - - - -

      This attribute allows the name of the attribute exposed to the using -page to differ from the one actually used in the implementation. For -example, consider a composite component that contains two buttons, one -that means "submit" and one that means "cancel". It is natural to want -to declare two composite component attributes to allow these buttons to -be customized, for example, "submitAction" and "cancelAction". For both -of these buttons, the method expression should be retargeted to the -inner button's "action" attribute. This scenario would be expressed as -follows.

      - - -<cc:interface>
      -  <cc:attribute name="submitAction" targetAttributeName="action"
      -                method-signature="java.lang.Object action()"/>
      -  <cc:attribute name="cancelAction" targetAttributeName="action"
      -                method-signature="java.lang.Object action()"/>
      -  <cc:actionSource name="submitAction"/>
      -  <cc:actionSource name="cancelAction"/>
      -</cc:interface>
      -<cc:implementation>
      -  <h:commandButton id="submitAction" value="submit" />
      -  <h:commandButton id="cancelAction" value="cancel" />
      -</cc:implementation>
      -
      - -]]> - -
      - - targetAttributeName - - - false - - - java.lang.String - -
      - - - -

      If this element has a method-signature attribute, the -value of the targets attribute must be interpreted as a -space (not tab) separated list of client ids (relative to the top -level component) of components within the -<cc:implementation> section. Space is used as -the delimiter for compatibility with the IDREFS and NMTOKENS data types -from the XML Schema. Each entry in the list must be interpreted as the -id of an inner component to which the MethodExpression from -the composite component tag in the using page must be -applied. If this element has a method-signature attribute, -but no targets attribute, the value of the -name attribute is used as the single entry in the list. If -the value of the name attribute is not one -of the special values listed in the description of the name -attribute, targets (or its derived value) need not -correspond to the id of an inner component.

      - -]]>
      - targets - false - java.lang.String -
      - - -

      Declares that this attribute must be a ValueExpression - whose expected type is given by the value of this attribute. If - not - specified, and no "method-signature" attribute is present, - java.lang.Object is assumed. This - attribute is mutually - exclusive with the "method-signature" attribute. If both attributes are - present, the - "method-signature" attribute is ignored.

      - - ]]>
      - type - false - java.lang.String -
      -
      - - -

      Declares that the composite component whose contract is declared by -the <cc:interface> in which this element is -nested exposes an implementation of ClientBehaviorHolder -suitable for use as the target of attached objects in the -using page. Any attached objects suitable for implementations of -ClientBehaviorHolder may be attached to the composite -component.

      - - ]]>
      - clientBehavior - com.sun.faces.facelets.tag.composite.BehaviorHolderAttachedObjectTargetHandler - - -If the evaluated value of this attribute is true, the page -author may omit the the "event" attribute when specifying the behavior -in the using page. This is analogous to "action" being the default -event for commandLink. The usage of this attribute assumes -only one clientBehavior is declared in this composite -component. If more than one is specified, only the first one is used in -the case of a using page with no event attribute. - - ]]> - default - false - boolean - - - - -

      The evaluated value of this attribute will be passed as the first -argument to the addClientBehavior() method on -ClientBehaviorHolder.

      - - ]]>
      - event - false - java.lang.String -
      - - -

      - The value of this attribute maps back to the "for" attribute on an attachable object - nested within a composite component. If the "targets" attribute is not specified, - this value also represents the component ID of the target component within the - that the <cc:implementation> - to which the ActionListener should be mapped. -

      - - ]]>
      - name - true - java.lang.String -
      - - - -

      If present, this must be a space (not tab) separated list of client -ids (relative to the top level component) of components within -the <cc:implementation> section. Space is -used as the delimiter for compatibility with the IDREFS and NMTOKENS -data types from the XML Schema.

      - ]]>
      - targets - false - java.lang.String -
      -
      - - -

      Declares that the -composite component whose contract is declared by the -<cc:interface> in which this element is nested -exposes an implementation of EditableValueHolder suitable -for use as the target of attached objects in the using -page. Any attached objects suitable for implementations of -EditableValueHolder may be attached to the composite -component.The example from <cc:valueHolder> -still applies. -

      - -

      Please see <cc:interface> for a usage -example.

      - - - ]]>
      - editableValueHolder - com.sun.faces.facelets.tag.composite.EditableValueHolderAttachedObjectTargetHandler - - -

      - The value of this attribute maps back to the "for" attribute on - an attachable object - nested within a composite component. If the "targets" attribute - is not specified, - this value also represents the component ID of the target - component within the - that the <cc:implementation> - to which the ActionListener should be mapped. -

      - - - ]]>
      - name - true - java.lang.String -
      - - -

      If present, this must be a space (not tab) separated - list of client - ids (relative to the top level component) - of components within - the <cc:implementation> - section. Space is - used as the delimiter for compatibility with the IDREFS and - NMTOKENS - data types from the XML Schema.

      - - ]]>
      - targets - false - java.lang.String -
      -
      - - -

      Used within a <cc:interface> - section, - within any sub-element of that section, to include XML content not - defined by this specification. This element can be used to - incorporate - JSR-276 - metadata into a composite component.

      - - - ]]>
      - extension - com.sun.faces.facelets.tag.composite.ExtensionHandler -
      - - - -

      Declares that this composite component supports a facet - with the - name given by the value of the "name" attribute.

      - -

      Please see <cc:interface> - for a usage - example.

      - - - - ]]>
      - facet - com.sun.faces.facelets.tag.composite.DeclareFacetHandler - - -

      The name to display in a tool palette - containing this component. The value of this attribute will be - set as - the value for this property on the composite - component bean descriptor.

      - - ]]>
      - displayName - false - java.lang.String -
      - - -

      Is this facet only for expert users? - The value of this attribute will be set as the value for - this property on the composite component bean - descriptor.

      - - ]]>
      - expert - false - boolean -
      - - The "hidden" flag is used to identify features that are intended only - for tool use, and which should not be exposed to humans.

      - - ]]>
      - hidden - false - boolean -
      - - - -

      The name of the attribute as it must appear - on the composite component tag in the - using page.

      - - ]]>
      - name - true - java.lang.String -
      - - -

      Is this a "preferred" facet. The value - of this attribute will be set as the value for this - property on the composite component bean - descriptor.

      - - ]]>
      - preferred - false - boolean -
      - - -

      True if the page author must supply a facet with this - name.

      - - ]]>
      - required - false - boolean -
      - - -

      A short description of the purpose of this - facet. The value of this attribute will be set as - the value for this property on the composite - component bean descriptor.

      - - ]]>
      - shortDescription - false - java.lang.String -
      -
      - - -

      Defines the implementation of the composite - component. There must be zero or one of these in a - composite component markup file. If a - <cc:interface> element appears, - there must be a corresponding - <composite-implementation> element. If no - <cc:interface> element appears, - the <composite-implementation> element is - optional.

      - - ]]>
      - implementation - com.sun.faces.facelets.tag.composite.ImplementationHandler -
      - - - -

      This element is used in the - <cc:implementation> - section. Any child - components or template text within the composite component tag in - the - using page will be re-parented into the composite component at the - point - indicated by this tag's placement within the - <cc:implementation> - section. The normal - use-case for this element is to have only one occurrence within the - <cc:implementation> - section. Inserting - multiple occurrences may cause duplicate id errors. The results are - undefined if there are multiple occurrences of this element in the - <cc:implementation> - section.

      - - - ]]>
      - insertChildren - com.sun.faces.facelets.tag.composite.InsertChildrenHandler -
      - - - -

      The presence of this tag in -a <cc:implementation> section must cause the -named facet to be taken from the facet map of the top level -component and inserted as a facet child of the component in which -this element is nested. The results are -undefined if there are facets in the composite component tag in the -using page, but there is no correspondingly named occurrence of this -element in the <cc:implementation> -section.

      - - ]]>
      - insertFacet - com.sun.faces.facelets.tag.composite.InsertFacetHandler - - - -

      The name of the facet child on the top level - component which - must be inserted as a facet child of the component in which this - element - is nested.

      - - - - ]]>
      - name - true - java.lang.String -
      - - - -

      If true, and there is no such - facet present on the top - level component, a TagException must be - thrown, containing - the Location, the facet name, and a - localized descriptive - error message.

      - - - - ]]>
      - required - false - boolean -
      -
      - - - -

      This - element declares the usage contract for a composite - component. Optionally, and at the component author's - discretion, this contract exposes the features of one or - more inner components to the page author. The page author - can work with the composite component as a single component - whose feature set is the union of the features declared in - the usage contract.

      - -

      For example, consider a composite component that - implements the functionality of a "login panel". Such a - component would likely have two text fields and one button. - The user of such a component might like to do one or more of - the following.

      - -
        - -
      • Be able to listen for the ActionEvent - on the button.

        - -

        In this case, a - <cc:actionSource> element is - included in the usage contract that refers to the inner - button in the <cc:implementation> - section.

        - -
      • - -
      • Provide an "action" to invoke when the button is pressed. -

        - -

        In this case, a - <cc:attribute> element is included - in the usage contract that refers to the inner button in the - <cc:implementation> section and - declares the proper method signature for an "action".

        - -
      • - -
      • Provide parameters to the composite component for - labels and other rendering specific aspects of the composite - component.

        - -

        In this case, one or more - <cc:attribute> elements are included - in the usage contract and those parameters are referred to in - the <cc:implementation> section - using EL expressions like - #{cc.attrs.usernameLabel}, - assuming usernameLabel is the name - of one of the <cc:attribute> - elements in the usage contract.

        - -
      • - - -
      • Add ValueChangeListeners, - Converters, or Validators to either - or both text fields. -

        - -

        In this case, a - <cc:editableValueHolder> element is - included in the usage contract that refers to the inner text - field in the <cc:implementation> - section. In the case of wanting to enable only adding a - Converter (and not a - ValueChangeListener or Validator, a - <cc:valueHolder> element would be - used.

        - -
      • - -
      • Add facet children to the login panel.

        - -

        In this case, a <cc:facet> - element is included in the usage contract that refers to the - inner <cc:renderFacet> element in - the <cc:implementation> section. -

        - -
      • - - -
      - -

      For each of the behaviorial interfaces in - section 3.2 "Component Behavioral Interfaces" of the Jakarta Faces Specification Document, - there is a tag in the - cc: library to nest inside of the - <cc:interface> section. -

      - - -

      If the <cc:interface> section - is not present in a VDL view, the contract will be - inferred as described in the specification. There must be - zero or one of these elements in a composite component VDL - file. If a <cc:interface> element - does appear, there must be an accompanying - <cc:implementation> element in the - same VDL file.

      - -

      Nesting of composite components

      - -

      The implementation must support nesting of composite - components. Specifically, it must be possible for the - <cc:implementation> section of a - composite component to act as the using page for - another composite component. When a composite component - exposes a behavioral interface to the using page, - such as a <cc:actionSource>, - <cc:editableValueHolder>, - <cc:valueHolder> or other - behavioral interface, it must be possible to - “propogate” the exposure of such an interface in - the case of a nested composite component. The composite - component author must ensure that the value of the - name attributes exactly match at all levels of - the nesting to enable this exposure to work. The - implementation is not required to support - “re-mapping” of names in a nested composite - component.

      - -

      For example, consider this nested composite component.

      - -

      Using page

      - -
      1. <ez:actionSourceOuter>
      2. -
      3.   <f:actionListener for="button1" />
      4. -
      5. </ez:actionSourceOuter>
      - -

      actionSourceOuter.xhtml: Outer composite component

      - -
      1. <cc:interface>
      2. -
      3.   <cc:actionSource name="button1" />
      4. -
      5. </cc:interface>
      6. -
      7. <cc:implementation>
      8. -
      9.   <ez:actionSourceInner />
      10. -
      11. </cc:implementation>
      - -

      actionSourceInner.xhtml: the composite component used within a -composite component.

      - -
      1. <cc:interface>
      2. -
      3.   <cc:actionSource name="button1" />
      4. -
      5. </cc:interface>
      6. -
      7. <cc:implementation>
      8. -
      9.   <h:commandButton id="button1" value="the real button" />
      10. -
      11. </cc:implementation>
      - -

      The id of the <h:commandButton> on -line 6 of actionSourceInner.xhtml must match the name on -line 2 of that file (this is a standard requirement for all composite -components, nested or not). That id must also match the -name on line 2 of actionSourceOuter.xhtml, and the -for on line 2 of the using page.

      - -

      The implementation must support any level of nesting as long as the -for, name, and id values match -up. Furthermore, the targets attribute is also valid for -use in this nested fashion.

      - -

      Naming containers within composite components

      - -

      Composite components are themselves naming containers so that any -possible id conflicts between inner components and components in the -using page are avoided. However, special care must be taken when using -naming containers in the <cc:implementation> -section. In such cases the value of the “name” attribute, -or the values of the “targets” attribute must be used with a -clientId relative to the top level component to expose any -attached object targets to the using page. For example:

      - -

      Using page

      - -
      1. <ez:loginButton>
      2. -
      3.   <f:actionListener for="button" binding="#{foo.actionListener}" />
      4. -
      5. </ez:loginButton>
      - - -

      loginButton.xhtml

      - -
      1. <cc:interface>
      2. -
      3.   <cc:actionSource name="button" targets="form:button" />
      4. -
      5. </cc:interface>
      6. -
      7. <cc:implementation>
      8. -
      9.   <h:form id="form">
      10. -
      11.     <h:commandButton id="button" value="Submit" />
      12. -
      13.   </h:form>
      14. -
      15. </cc:implementation>
      - -

      Because the button on line 8 resides within a form, it must be -referred to using a client id, relative to the top level -component, in the "targets" attribute on line 2. Using a relative -clientId is required due to the semantics of -UIComponent.findComponent().

      - - - - - - - ]]>
      - interface - com.sun.faces.facelets.tag.composite.InterfaceHandler - - -

      The component-type of the UIComponent - that - will serve as the composite component root - for this composite - component. The declared component-family - for this - component must be jakarta.faces.NamingContainer.

      - - ]]>
      - componentType - false - java.lang.String -
      - - -

      The name to display in a tool palette - containing this component. The value of this attribute will be - set as - the value for this property on the composite - component bean descriptor.

      - - ]]>
      - displayName - false - java.lang.String -
      - - -

      Is this component only for expert users? - The value of this attribute will be set as the value for - this property on the composite component bean - descriptor.

      - - ]]>
      - expert - false - boolean -
      - - -

      The "hidden" flag is used to identify features that are - intended only for tool use, and which should not be exposed to humans.

      - - ]]>
      - hidden - false - boolean -
      - - -

      The name of this composite component. - Advisory only. The real name is taken from the - filename. The value of this attribute will be set as - the value for this property on the composite - component bean descriptor.

      - - ]]>
      - name - false - java.lang.String -
      - - -

      Is this a "preferred" component. The value - of this attribute will be set as the value for this - property on the composite component bean - descriptor.

      - - ]]>
      - preferred - false - boolean -
      - - -

      A short description of the purpose of this - component. The value of this attribute will be set as - the value for this property on the composite - component bean descriptor.

      - - ]]>
      - shortDescription - false - java.lang.String -
      -
      - - - -

      This element is used in the -<cc:implementation> section. The facet with -the name equal to the value of the name attribute, given by the page -author in the using page, will be rendered at this point in the -composite component VDL view.

      - - -

      The implementation of this tag handler must insert a - component with component-type - jakarta.faces.Output and renderer-type - jakarta.faces.CompositeFacet as a - child at this point in the component tree.

      - -

      The implementation of this tag handler must store an attribute into -the created component's attribute map under the key given by the value -of the symbolic constant UIComponent.FACETS_KEY. The value -for this key must be the evaluated value of the "name" attribute.

      - ]]>
      - renderFacet - com.sun.faces.facelets.tag.composite.RenderFacetHandler - - -

      The value of the name attribute as it must appear on an -<f:facet> tag nested within the composite -component tag in the using page.

      - - ]]>
      - name - true - java.lang.String -
      - - - -

      If true, and there is no such - facet present on the top - level component, a TagException must be - thrown, containing - the Location, the facet name, and a - localized descriptive - error message.

      - - - - ]]>
      - required - false - boolean -
      -
      - - -

      Declares that the -composite component whose contract is declared by the -<cc:interface> in which this element is nested -exposes an implementation of ValueHolder suitable for use -as the target of attached objects in the using page. -Any attached objects suitable for implementations of -ValueHolder may be attached to the composite component. -Consider this excerpt from the using page: -

      - -
      1. <ez:foo>
      2. -
      3.   <f:converter for="userid" binding="#{bean.converter}" />
      4. -
      5. </ez:foo>
      - -

      Line 2 refers to the - <cc:valueHolder> declaration on - line 2 of foo.xhtml:

      - -
      1. <cc:interface>
      2. -
      3.   <cc:valueHolder name="userid" />
      4. -
      5. </cc:interface>
      6. -
      7. <cc:implementation>
      8. -
      9.   <h:inputText id="userid" />
      10. -
      11. </cc:implementation>
      - -

      - -

      It is possible to declare that a single -<cc:valueHolder> element should cause multiple -components within the <cc:implementation> -section to be the targets of an attached object in the -using page. Assuming the same using page excerpt as -above, the revised VDL view is:

      - -
      1. <cc:interface>
      2. -
      3.   <cc:valueHolder name="inputs" targets="userid,password" />
      4. -
      5. </cc:interface>
      6. -
      7. <cc:implementation>
      8. -
      9.   <h:inputText id="userid" />
      10. -
      11.   <h:inputText id="password" />
      12. -
      13. </cc:implementation>
      - -

      In this case, the "targets" attribute on the -<cc:valueHolder> element, on line 2 above, -replaces the "name" attribute in the previous example. "targets" is a -list of ids of client ids (relative to the top level component) -within the <cc:implementation> section. In -this case, "targets" refers to the <h:inputText> -components on lines 6 and 7 above.

      - -

      Please see <cc:interface> for a usage -example.

      - - - ]]>
      - valueHolder - com.sun.faces.facelets.tag.composite.ValueHolderAttachedObjectTargetHandler - - -

      The "hidden" flag is used to identify features that are - intended only for tool use, and which should not be exposed to humans.

      - - ]]>
      - hidden - false - boolean -
      - - -

      - The value of this attribute maps back to the "for" attribute on an attachable object - nested within a composite component. If the "targets" attribute is not specified, - this value also represents the component ID of the target component within the - that the <cc:implementation> - ActionListener should be mapped to. -

      - ]]>
      - name - true - java.lang.String -
      - - -

      If present, this must be a space (not tab) separated list of client -ids (relative to the top level component) of components within -the <cc:implementation> section. Space is -used as the delimiter for compatibility with the IDREFS and NMTOKENS -data types from the XML Schema.

      - - ]]>
      - targets - false - java.lang.String -
      -
      - diff --git a/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.core.taglib.xml b/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.core.taglib.xml deleted file mode 100644 index db866ecf66..0000000000 --- a/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.core.taglib.xml +++ /dev/null @@ -1,3031 +0,0 @@ - - - - - Jakarta Faces Core Tag Library

      - -

      The core Jakarta Faces - tags that are independent of any particular - RenderKit.

      - ]]>
      - jakarta.faces.core - - Register an ActionListener instance on the - UIComponent associated with the closest parent UIComponent - tag.

      - ]]>
      - actionListener - com.sun.faces.facelets.tag.faces.core.ActionListenerHandler - - - binding - false - jakarta.faces.event.ActionListener - - - If present, this attribute - refers - to the value of one of the exposed attached objects within the - composite component inside of which this tag is nested.

      - - ]]>
      - for - false - java.lang.String -
      - - - type - false - java.lang.String - -
      - - - Register an - AjaxBehavior instance on one or more UIComponents implementing - the ClientBehaviorHolder interface. This tag may be nested - witin a single component (enabling Ajax for a single component), - or it may be "wrapped" around multiple components (enabling Ajax - for many components).

      - -

      The String value for ids - specified for execute and render may be specified as a search - expression as outlined in the JavaDocs for - UIComponent.findComponent(). The implementation - must resolve these ids as specified for - UIComponent.findComponent(). For example, consider - the following Facelets code.

      - -
      1. <h:form id="form_1">
      2. -
      3.   <h:panelGrid id="panel_1" rows="2">
      4. -
      5.     <!-- content irrelevant -->
      6. -
      7.   </h:panelGrid>
      8. -
      9. </h:form>
      10. -
      11.  
      12. -
      13. <h:form id="form_2">
      14. -
      15.   <h:commandButton id="button">
      16. -
      17.     <f:ajax render=":form1:panel_1 panel_2" />
      18. -
      19.   </h:commandButton>
      20. -
      21.   <h:panelGrid id="panel_2">
      22. -
      23.     <!-- content irrelevant -->
      24. -
      25.   </h:panelGrid>
      26. -
      27. </h:form>
      28. -
      - -

      When the button is pressed, - panel_1, in form_1 will be re-rendered, along with panel_2 in - form_2.

      - - ]]>
      - ajax - com.sun.faces.facelets.tag.faces.core.AjaxHandler - - If less than - delay milliseconds elapses between calls to - request() only the most recent one is sent and all other - requests are discarded. If this option is not specified, or if the - value of delay is the literal string 'none' - without the quotes, no delay is used.

      - - ]]>
      - delay - false - java.lang.String -
      - - - A value of "true" indicates - the - AjaxBehavior should not be rendered. A value of "false" - indicates - the AjaxBehavior should be rendered. "false" is the default.

      - - ]]>
      - disabled - false - java.lang.Boolean -
      - - A String or - ValueExpression (that evalulates to a String) identifying the type of event - the Ajax action will apply to. If specified, it must be one of the - events supported by the component the Ajax behavior is being applied to. - For HTML components this would be the set of supported DOM events for the - component, plus "action" for Faces ActionSource components and "valueChange" - for Faces EditableValueHolder components. If not specified, the default - event is determined for the component. The DOM event name is the actual DOM - event name (for example: "click") as opposed to (for example: "onclick").

      - - - ]]>
      - event - false - java.lang.String -
      - - Evaluates to - Collection<String>. This is a space separated list of - search expressions to - components that will participate in the "execute" - portion of the Request Processing Lifecycle. See the javadoc for - SearchKeywordResolver for the complete list of - keywords. If a literal is specified the ids must be - space delimited. If - not specified, the default value of "@this" is assumed. For - example, @this clientIdOne clientIdTwo.

      - -

      When nested within a composite component, - and the value contains or implies the keyword @this, - then the keyword must be remapped to the targets attribute of the associated <composite:clientBehavior> declaration, if any, - else if the value is not an absolute search expression, - then it must be reinterpreted relative to the location of the <f:ajax> declaration.

      - - ]]>
      - execute - false - java.util.Collection -
      - - If "true" behavior events - generated from this behavior - are broadcast during Apply Request Values phase. Otherwise, the - events will be - broadcast during Invoke Aplications phase

      - ]]>
      - immediate - false - java.lang.Boolean -
      - - Method expression referencing - a method - that will be called when an AjaxBehaviorEvent has been - broadcast for the listener.

      - ]]>
      - listener - false - public void - processAjaxBehavior(jakarta.faces.event.AjaxBehaviorEvent event) - throws jakarta.faces.event.AbortProcessingException - -
      - - - The name of the JavaScript - function that will handle errors.

      - - ]]>
      - onerror - false - java.lang.String -
      - - The name of the JavaScript - function that will handle UI events.

      - ]]>
      - onevent - false - java.lang.String -
      - - Evaluates to - Collection<String>. The search expressions to - components that will participate in the "render" portion - of the Request Processing Lifecycle. See the javadoc for - SearchKeywordResolver for the complete list of - keywords. If a literal is specified the identifiers must - be space delimited. If not specified, the - default value of "@none" is assumed. For example, @this - clientIdOne clientIdTwo.

      - -

      When nested within a composite component, - and the value contains or implies the keyword @this, - then the keyword must be remapped to the client ID of the associated <composite:implementation>, - else if the value is not an absolute search expression, - then it must be reinterpreted relative to the location of the <f:ajax> declaration.

      - - ]]>
      - render - false - java.util.Collection -
      - - Reset specific input values. - Interpret the value of the render attribute as - a space separated list of client identifiers suitable for - passing directly to UIViewRoot.resetValues(). - The implementation must cause an ActionListener - to be attached to the ActionSource component - in which this tag is nested that calls - UIViewRoot.resetValues() passing the value of - the render attribute as the argument.

      - - ]]>
      - resetValues - false - java.lang.Boolean -
      - -
      - - - Add an attribute to the UIComponent associated with the closest - parent UIComponent tag.

      - ]]>
      - attribute - com.sun.faces.facelets.tag.faces.core.AttributeHandler - - The name of the component attribute to be set.

      - ]]>
      - name - java.lang.String -
      - - The value of the component attribute to be set.

      - ]]>
      - value - java.lang.Object -
      -
      - - - - Add attributes to the UIComponent associated with the closest - parent UIComponent tag. - For each Map.Entry in the Map<String, Object> - referenced by the value attribute of this tag, take the following action. - If parent.getAttributes().containsKey(entry.getKey()) returns - true, take no action for this entry. Otherwise, if - entry.getValue() is a ValueExpression call - parent.setValueExpression(entry.getKey(), entry.getValue()). - Otherwise, call parent.getAttributes.put(entry.getKey(), entry.getValue()). -

      - -]]> -
      - attributes - com.sun.faces.facelets.tag.faces.core.AttributesHandler - - An EL ValueExpression that evaluates to a Map<String, Object>.

      ]]>
      - value - true - java.util.Map -
      -
      - - Register a - DateTimeConverter instance on the UIComponent associated - with the closest parent UIComponent tag.

      - - ]]>
      - convertDateTime - - jakarta.faces.DateTime - com.sun.faces.facelets.tag.faces.core.ConvertDateTimeHandler - - - A ValueExpression that evaluates to an instance of - jakarta.faces.convert.DateTimeConverter.

      - ]]>
      - binding - jakarta.faces.convert.DateTimeConverter -
      - - - Predefined - formatting style which determines how the date component - of a date string is to be formatted and parsed. Applied - only if type is "date", "both", "localDate", - "localDateTime", or "zonedDateTime". Valid values - are "default", "short", "medium", "long", and "full". - Default value is "default". If a java.time - formatter is being used, yet the dateStyle is set to "default", - the value "medium" is assumed.

      - - ]]>
      - dateStyle - java.lang.String -
      - - If present, this attribute - refers - to the value of one of the exposed attached objects within the - composite component inside of which this tag is nested.

      - - ]]>
      - for - false - java.lang.String -
      - - - Locale whose predefined styles for dates and times are used - during formatting or parsing. If not specified, the Locale - returned by FacesContext.getViewRoot().getLocale() will be used. - Value must be either a VB expression that evaluates to a - java.util.Locale instance, or a String that is valid to pass as - the first argument to the constructor java.util.Locale(String - language, String country). The empty string is passed as the - second argument.

      - ]]>
      - locale - false - java.lang.Object -
      - - Custom formatting pattern which determines how the - date/time string should be formatted and parsed.

      - ]]>
      - pattern - java.lang.String -
      - - Predefined - formatting style which determines how the time component of a - date string is to be formatted and - parsed. Applied only if type is "time", "both", - "localTime" or - "offsetTime". - Valid values are "default", "short", "medium", "long", - and "full". Default value is "default". If a java.time - formatter is being used, yet the timeStyle is set to "default", - the value "medium" is assumed.

      - - ]]>
      - timeStyle - java.lang.String -
      - - Time zone in which to interpret any time information in the date - String. Value must be either a ValueExpression that evaluates to - a java.util.TimeZone instance, or a String that is a timezone ID - as described in the javadocs for - java.util.TimeZone.getTimeZone().

      - ]]>
      - timeZone - java.lang.Object -
      - - Specifies what - contents the string value will be formatted to include, or - parsed expecting. Valid values are "date", "time", - "both", "localDate", - "localDateTime", "localTime", "offsetTime", - "offsetDateTime", and "zonedDateTime". The values starting - with "local", "offset" and "zoned" correspond to Java SE 8 - Date Time API classes in package java.time with - the name derived by upper casing the first letter. For - example, java.time.LocalDate for the value - "localDate". Default value is "date".

      - - ]]>
      - type - java.lang.String -
      -
      - - - tag. - ]]> - convertNumber - - jakarta.faces.Number - com.sun.faces.facelets.tag.faces.core.ConvertNumberHandler - - - A ValueExpression that evaluates to an instance of - jakarta.faces.convert.NumberConverter.

      - ]]>
      - binding - jakarta.faces.convert.NumberConverter -
      - - - ISO 4217 currency code, applied only when - formatting currencies.

      - ]]>
      - currencyCode - java.lang.String -
      - - Currency symbol, applied only when formatting - currencies.

      - ]]>
      - currencySymbol - java.lang.String -
      - - If present, this attribute - refers - to the value of one of the exposed attached objects within the - composite component inside of which this tag is nested.

      - - ]]>
      - for - false - java.lang.String -
      - - - Flag specifying whether formatted output will - contain grouping separators. Expressions must - evaluate to a boolean. Default value - is true.

      - ]]>
      - groupingUsed - java.lang.Boolean -
      - - Flag specifying whether only the integer part - of the value will be formatted and parsed. - Expressions must evaluate to a boolean. - Default value is false.

      - ]]>
      - integerOnly - java.lang.Boolean -
      - - - -

      Locale - whose - predefined styles for numbers are used during formatting - and parsing. If not specified, the Locale returned by - FacesContext.getViewRoot().getLocale() will be used. - Expressions must evaluate to a java.util.Locale or a String that is valid to - pass as the first argument to the constructor - java.util.Locale(String language, String country). The - empty string is passed as the second argument.

      - -

      ]]>
      - locale - java.lang.Object -
      - - Maximum number of digits that will be formatted - in the fractional portion of the output. Expressions - must evaluate to an int.

      - ]]>
      - maxFractionDigits - java.lang.Integer -
      - - Maximum number of digits that will be formatted - in the integer portion of the output. Expressions - must evaluate to an int.

      - ]]>
      - maxIntegerDigits - java.lang.Integer -
      - - Minimum number of digits that will be formatted - in the fractional portion of the output. Expressions - must evaluate to an int.

      - ]]>
      - minFractionDigits - java.lang.Integer -
      - - Minimum number of digits that will be formatted - in the integer portion of the output. Expressions - must evaluate to an int.

      - ]]>
      - minIntegerDigits - java.lang.Integer -
      - - Custom formatting pattern which determins how the - number string should be formatted and parsed.

      - ]]>
      - pattern - java.lang.String -
      - - Specifies how the number string will be formatted - and parsed. Valid values are "number", "currency", - and "percent". Default value is "number".

      - ]]>
      - type - java.lang.String -
      -
      - - - Register a named Converter instance on the UIComponent - associated with the closest parent UIComponent tag.

      - ]]>
      - converter - com.sun.faces.facelets.tag.faces.core.ConvertDelegateHandler - - A ValueExpression that evaluates to an object that - implements jakarta.faces.convert.Converter.

      - ]]>
      - binding - jakarta.faces.convert.Converter -
      - - Converter identifier of the Converter instance to be - created and registered. - ]]> - converterId - java.lang.String - - - If present, this attribute - refers - to the value of one of the exposed attached objects within the - composite component inside of which this tag is nested.

      - - ]]>
      - for - false - java.lang.String -
      -
      - - Allow Jakarta Faces page authors to - install ComponentSystemEventListener - instances - on a component in a page.

      - -
      - -

      - -
      - - ]]>
      - event - com.sun.faces.facelets.tag.faces.core.EventHandler - - The expression must - evaluate to a public method that takes a - ComponentSystemEvent parameter, with a return - type of void, or to a public method that takes no - arguments with a return type of void. In the latter case, - the method has no way of easily knowing where the event - came from, but this can be useful in cases where a - notification is needed that "an event happened".

      - ]]>
      - listener - true - public void - listener(jakarta.faces.event.ComponentSystemEvent event) throws - jakarta.faces.event.AbortProcessingException - -
      - - - Name of the event for which - to install a listener. The following table lists the - valid values for this attribute, and the corresponding - event type for which the listener action is - registered.

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      value for "type" tag -attributeType of event sent to listener method -
      preRenderComponent -jakarta.faces.event.PreRenderComponentEvent -
      preRenderView -jakarta.faces.event.PreRenderViewEvent -
      postAddToView -jakarta.faces.event.PostAddToViewEvent -
      preValidate -jakarta.faces.event.PreValidateEvent -
      postValidate -jakarta.faces.event.PostValidateEvent -
      - -
      - -

      In addition to these values, the fully qualified class name of any -java class that extends -jakarta.faces.event.ComponentSystemEvent may be used as the -value of the "type" attribute.

      - -

      Also, the @jakarta.faces.event.NamedEvent annotation may -be attached to any java class that extends -jakarta.faces.event.ComponentSystemEvent. This enables that -event to be referenced from this attribute, as descibed in the javadocs -for @NamedEvent.

      - -
      - - - ]]>
      - type - true - java.lang.String -
      -
      - - - Register a named - facet on the UIComponent associated with the closest parent - UIComponent tag.

      - -

      - When the facet contains more than one child the children will be - automatically put in a container UIPanel. -

      - - ]]>
      - facet - com.sun.faces.facelets.tag.faces.core.FacetHandler - - Name of the facet to be created.

      - ]]>
      - name - true - java.lang.String -
      -
      - - - - Used inside of the metadata facet of a view, this tag will import a mapping of all constant field values of the given type in the current view. - Constant field values are all public static final fields of the given type. - The map key represents the constant field name as String. - The map value represents the actual constant field value. - This works for classes, interfaces and enums. -

      - ]]>
      - importConstants - - jakarta.faces.ImportConstants - - - - The fully qualified name of the type to import the constant field values for. -

      - ]]>
      - type - true - java.lang.String -
      - - - Name of request scope attribute under which constants will be exposed as a Map. - Defaults to the simple name of the given type. -

      - ]]>
      - var - false -
      -
      - - - Load a resource bundle localized for the Locale of the current - view, and expose it as a java.util.Map in the request attributes - of the current request under the key specified by the value of the - "var" attribute of this tag. The Map must behave such that if a - get() call is made for a key that does not exist in the Map, the - literal string ???KEY??? is returned from the Map, where KEY is - the key being looked up in the Map, instead of a - MissingResourceException being thrown. If the ResourceBundle does - not exist, a TagAttributeException must be thrown.

      - ]]>
      - loadBundle - com.sun.faces.facelets.tag.faces.core.LoadBundleHandler - - Base name of the resource bundle - to be loaded.

      - ]]>
      - basename - java.lang.String -
      - - Name of a request scope attribute under which - the resource bundle will be exposed as a Map.

      - ]]>
      - var - true - java.lang.String -
      -
      - - Declare the metadata - facet for this view. This must be a child of the - <f:view>. This tag - must reside within the top level XHTML file for the given - viewId, or in a - template client, but not in a template. The - implementation must insure that the direct child of the - facet is a UIPanel, even if there - is only one child of the facet. The implementation must set - the id of the UIPanel to be the - value of the - UIViewRoot.METADATA_FACET_NAME - symbolic constant.

      - -
      - -

      The implementation must allow templating for this element - according - to the following pattern.

      - -

      template client XHTML view, view01.xhtml

      - -
      - -
      1. <ui:composition - template="template.xhtml">
      2. -
      3.     - <ui:define name="metadata">
      4. -
      5.     -   <f:metadata>
      6. -
      7.     -     <f:viewParam - name="id"/>
      8. -
      9.     -   </f:metadata>
      10. -
      11.     - </ui:define>
      12. -
      13.     - <ui:define name="content">
      14. -
      15.     -     <h1>The - big news stories of the day</h1>
      16. -
      17.     - </ui:define>
      18. -
      19. </ui:composition> -
      - -
      -

      Note line 4. The page author must ensure that the - <f:metadata> element does not - appear on a template or - included page. It must reside on the root page that corresponds to - the - viewId.

      - -

      The template page, template.xhtml

      - -
      - - -
      1. <html xmlns="http://www.w3.org/1999/xhtml"
      2. -
      3.     -   xmlns:ui="jakarta.faces.facelets"
      4. -
      5.     -   xmlns:f="jakarta.faces.core"
      6. -
      7.     -   xml:lang="en" lang="en">
      8. -
      9.  
      10. -
      11. <body>
      12. -
      13. <f:view>
      14. -
      15.     -
      16. -
      17.     -     <ui:insert name="metadata"/>
      18. -
      19.    
      20. -
      21.     - <div - id="container">
      22. -
      23.     -     <ui:insert name="content"/>
      24. -
      25.     - </div>
      26. -
      27. </f:view>
      28. -
      29. </body>
      30. -
      31. </html>
      - -

      The page author is not required to use - templating, but if - they do, it must be done as shown above, (or with - <ui:include> in a similar - manner).

      - - - - - ]]>
      - metadata - com.sun.faces.facelets.tag.faces.core.MetadataHandler -
      - - - Add a child UIParameter - component to the UIComponent associated with the closest parent - UIComponent tag.

      - ]]>
      - param - - jakarta.faces.Parameter - - - - ValueExpression to a backing bean - property bound to the component instance for - the UIComponent created by this tag.

      - ]]>
      - binding - jakarta.faces.component.UIComponent -
      - - Flag enabling or disabling the inclusion of the - parameter. This flag is - consulted by renderers that consider the - UIParameter component associated with this - during their rendering. - Such renderers include jakarta.faces.Output - jakarta.faces.Link and - jakarta.faces.OutcomeTarget - jakarta.faces.Link.

      - - - ]]>
      - disable - boolean -
      - - - Component identifier of the UIParameter component - to be created.

      - ]]>
      - id - false - java.lang.String -
      - - Name of the parameter to be created.

      - ]]>
      - name - java.lang.String -
      - - Value of the parameter to be set.

      - ]]>
      - value - java.lang.String -
      -
      - - - Add an attribute to the - passThroughAttributes Map of the UIComponent - associated with the closest parent UIComponent tag.

      - - ]]>
      - passThroughAttribute - com.sun.faces.facelets.tag.faces.core.PassThroughAttributeHandler - - The name - of the pass through attribute. An attribute with this name, - and the corresponding value will appear on the outer most - markup element in the rendered markup for the component, as - specified in the overview for the HTML_BASIC RenderKit. If - the name of this attribute conflicts with - Renderer specific attribute, the value - specified here supercedes the one that would otherwise be - rendered by the Renderer

      ]]>
      - name - true - java.lang.String -
      - - - The value - of the pass through attribute.

      ]]>
      - value - true - java.lang.Object -
      -
      - - - Add attributes to the - passThroughAttributes Map of the UIComponent - associated with the closest parent UIComponent tag. - For each Map.Entry in the Map<String, Object> - referenced by the value attribute of this tag, take the following action. - Call component.getPassThroughAttributes().put(entry.getKey(), entry.getValue()).

      - -]]> -
      - passThroughAttributes - com.sun.faces.facelets.tag.faces.core.PassThroughAttributesHandler - - An EL ValueExpression that evaluates to a Map<String, Object>.

      ]]>
      - value - true - java.util.Map -
      -
      - - - Register a PhaseListener instance on the UIViewRoot in which - this tag is nested.

      - ]]>
      - phaseListener - com.sun.faces.facelets.tag.faces.core.PhaseListenerHandler - - Value binding expression that evaluates to an object that - implements jakarta.faces.event.PhaseListener.

      - ]]>
      - binding - false - jakarta.faces.event.PhaseListener -
      - - - Fully qualified Java class name of a PhaseListener to be - created and registered.

      - ]]>
      - type - false - java.lang.String -
      -
      - - Add a child UISelectItem component to the UIComponent - associated with the closest parent UIComponent tag.

      - ]]>
      - selectItem - - jakarta.faces.SelectItem - - - - Value binding expression to a backing bean - property bound to the component instance for - the UIComponent created by this tag.

      - ]]>
      - binding - jakarta.faces.component.UIComponent -
      - - Component identifier of the UISelectItem - component to be created.

      - ]]>
      - id - false - java.lang.String -
      - - Description of this option, for use in - development tools.

      - ]]>
      - itemDescription - java.lang.String -
      - - Flag indicating whether the option created - by this component is disabled. Expressions - must evaluate to a boolean. Default value - is false.

      - ]]>
      - itemDisabled - java.lang.Boolean -
      - - Flag indicating that characters that are sensitive in - the value of the itemLabel - attribute must be escaped. This flag is set to "true" by - default.

      - ]]>
      - itemEscaped - java.lang.String -
      - - Label to be displayed to the user - for this option.

      - ]]>
      - itemLabel - java.lang.String -
      - - Value to be returned to the server if this - option is selected by the user.

      - ]]>
      - itemValue - java.lang.String -
      - - Flag indicating whether the option created by this - component represents the special "no selection" - option. Expressions must evaluate to a boolean. - Default value is false.

      - ]]>
      - noSelectionOption - java.lang.Boolean -
      - - Value binding expression pointing at a - SelectItem instance containing the - information for this option.

      - ]]>
      - value - jakarta.faces.model.SelectItem -
      -
      - - - Add a - child UISelectItems component to the UIComponent associated - with the closed parent UIComponent tag.

      - -

      When iterating over the - select items, toString() must be called on - the - string rendered attribute values.

      - -

      Version 2 of the specification - introduces - several new attributes, described below. These are: var, itemValue, - itemLabel, itemDescription, itemDisabled, and itemLabelEscaped.

      - - - ]]>
      - selectItems - - jakarta.faces.SelectItems - - - - Value binding expression to a backing bean - property bound to the component instance for - the UIComponent created by this tag.

      - ]]>
      - binding - jakarta.faces.component.UIComponent -
      - - - id - false - java.lang.String - - - evaluates to a String that - will - serve as the description to be shown for the item.

      - - ]]>
      - itemDescription - java.lang.String -
      - - evaluates to a boolean that - will - determine if the item value is selectable or not.

      - - ]]>
      - itemDisabled - java.lang.Boolean -
      - - evaluates to a String that - will - serve as the label to be shown for the item.

      - - ]]>
      - itemLabel - java.lang.String -
      - - evaluates to a boolean that will -determine if the rendered markup for the item receives normal Faces HTML -escaping or not. If not specified, the -runtime must behave as if the value were true.

      - - ]]>
      - itemLabelEscaped - java.lang.Boolean -
      - - This attribute lets you refer - to a property of the current member of the collection - referenced by the "value" attribute, using the value of the - "var" attribute as the base. For example, - #{n.id}.

      - - ]]>
      - itemValue - java.lang.Object -
      - - Is either an EL - expression pointing to the element in the value collection - whose value should be marked as a “no selection” - item, or a literal string that exactly matches the value of - the item in the collection that must be marked as the - “no selection” item. If the user selects such - an item and the field is marked as - required, then it will not pass validation.

      - - - ]]>
      - noSelectionValue - java.lang.Boolean -
      - - - Value expression pointing at any Collection - or array. The member elements may be instances of - SelectItem or any Java Object. In the - case where the member elements are plain Java Objects, - several additional attributes must be used by the page - author to correctly identify the data to the enclosing - UISelectOne or UISelectMany - component, as shown in the following example. - -
      1. <h:selectOneListbox size="1" id="escape02" value="#{select05NoSelection.initialCollectionValues}">
      2. -
      3.   <f:selectItems value="#{select05NoSelection.hobbitList}"
      4. -
      5.                  var="n"
      6. -
      7.                  itemValue="#{n.id}"
      8. -
      9.                  itemLabel="#{n.bio}"
      10. -
      11.                  itemDescription="#{n.description}"
      12. -
      13.                  itemDisabled="#{n.disabled}"
      14. -
      15.                  itemLabelEscaped="true"
      16. -
      17.                  noSelectionValue="#{select05NoSelection.hobbitList[0]}"/>
      18. -
      19. </h:selectOneListbox>
      - -

      In the preceding example, the -value attribute on line 1 points to a -Collection<HobbitBean>. HobbitBean is -just a regular Java Object (POJO) that conforms to JavaBeans naming -conventions for its properties. The value attribute on -line 2 points to a List<HobbitBean>, though it could -just as well point to a Collection, array, or -jakarta.faces.model.DataModel. The attributes on lines 3 -through 9, inclusive, leverage the fact that the value is a collection -of POJOs. -

      - - -

      - - - - ]]>
      - value - java.lang.Object -
      - - Expose the value from the - value attribute under this request - scoped key so that it - may be referred to in EL for the value of other attributes.

      - - - ]]>
      - var - false -
      -
      - - - - UISelectItemGroup is a component that may be nested inside a UISelectMany or UISelectOne component, - and causes the addition of one SelectItemGroup of one or more SelectItem instances to the list of available options in the parent component. - This component accepts only children of type UISelectItems or UISelectItem. -

      - ]]>
      - selectItemGroup - - jakarta.faces.SelectItemGroup - - - - UISelectItemGroup component to be created. - ]]> - id - java.lang.String - - - UIComponent created by this tag. - ]]> - binding - jakarta.faces.component.UIComponent - - - - itemLabel - java.lang.String - -
      - - - - UISelectItemGroups is a component that may be nested inside a UISelectMany or UISelectOne component, - and causes the addition of one or more SelectItemGroup of one or more SelectItem instances to the list of available options in the parent component. - This component accepts only children of type UISelectItems or UISelectItem. -

      - ]]>
      - selectItemGroups - - jakarta.faces.SelectItemGroups - - - - UISelectItemGroups component to be created. - ]]> - id - java.lang.String - - - UIComponent created by this tag. - ]]> - binding - jakarta.faces.component.UIComponent - - - Iterable. - The member elements may be instances of any type which is acceptable by the value attribute of any nested UISelectItems or UISelectItem component. - ]]> - value - java.lang.Object - - - value attribute under this request scoped key, - so that it may be referred to in EL for the value of other attributes of any nested component. - ]]> - var - - - - itemLabel - java.lang.String - - - boolean. - Default value is false. - ]]> - itemDisabled - java.lang.Boolean - -
      - - - Register an ActionListener instance on the UIComponent - associated with the closest parent UIComponent tag. - This actionListener will cause the value given by the "value" - attribute to be set into the ValueExpression given by the "target" - attribute.

      - -

      The implementation of this tag creates a special - ActionListener instance and registers it on - the - ActionSource associated with our most - immediate surrounding - instance of a tag whose implementation class is a subclass of - UIComponentTag. This tag creates no output - to the page - currently being created.

      - -

      The ActionListener instance - created and installed by - this tag has the following behavior and contract.

      - -
        - -
      • Only create and register the ActionListener - instance - the first time the component for this tag is created
      • - -
      • The "target" and "value" tag attributes are - ValueExpression - instances and are stored unevaluated as instance variables of the - listener.
      • - -
      • When the listener executes, perform the following: -
          - Call getValue() on the "value" ValueExpression. -
        -
          - If value of the "value" expression is null, call setValue() on - the "target" ValueExpression with the null value. -
        -
          - If the value of the "value" expression is not null, call getType() - on the "value" and "target" ValueExpressions to determine their - property types. -
        -
          - Coerce the value of the "value" expression to the "target" - expression value type following the Expression Language coercion - rules. Call setValue() on the "target" ValueExpression with the - resulting value. -
        -
          - If either coercion or the execution of setValue() fails throw an - AbortProcessingException. -
        -
      • - -
      - ]]>
      - setPropertyActionListener - com.sun.faces.facelets.tag.faces.core.SetPropertyActionListenerHandler - - If present, this attribute - refers - to the value of one of the exposed attached objects within the - composite component inside of which this tag is nested.

      - - ]]>
      - for - false - java.lang.String -
      - - ValueExpression that is the destination of the value - attribute.

      - ]]>
      - target - true - java.lang.String -
      - - ValueExpression to be stored as the value of the target - attribute.

      - ]]>
      - value - true - java.lang.String -
      -
      - - - Naming Container tag for all Jakarta Faces core and - component tags. It is particularly useful when a nested section included via - <ui:include> or any tag that dynamically includes another - page is included more than once, potentially causing duplicate component IDs. - Each of those nested sections can then be wrapped in its own <f:subview> - with each an unique id.

      - ]]>
      - subview - - jakarta.faces.NamingContainer - - - - Value binding expression to a backing bean - property bound to the component instance for - the UIComponent created by this tag.

      - ]]>
      - binding - jakarta.faces.component.UIComponent -
      - - Component identifier of the UINamingContainer - component to be created.

      - ]]>
      - id - true - java.lang.String -
      - - Flag indicating whether this component (and its - children) should be rendered. Expressions must - evaluate to a boolean.

      - ]]>
      - rendered - java.lang.Boolean -
      -
      - - - - - - -

      A validator that - delegates the validation of the local value to the Bean - Validation API. The validationGroups attribute serves as a - filter that instructs the Bean Validation API which - contraints to enforce. If there are any constraint - violations reported by Bean Validation, the value is - considered invalid. An - instance of this validator can participate in class-level - validation provided the preconditions mentioned in - <f:validateWholeBean /> are met. Please - see the documentation for <f:validateWholeBean - /> and - jakarta.faces.validator.BeanValidator.validate() for - the specification and usage example.

      - - ]]>
      - validateBean - - jakarta.faces.Bean - com.sun.faces.facelets.tag.faces.core.ValidateDelegateHandler - - - A ValueExpression that evaluates to an instance of - BeanValidator.

      - ]]>
      - binding - jakarta.faces.validator.BeanValidator -
      - - A boolean value - enabling page level determination of whether or not this - validator is enabled on the enclosing component.

      - - - ]]>
      - disabled - java.lang.Boolean -
      - - If present, this attribute - refers - to the value of one of the exposed attached objects within the - composite component inside of which this tag is nested.

      - - ]]>
      - for - false - java.lang.String -
      - - A comma-separated list of validation groups. A validation group - is a fully-qualified class name.

      - ]]>
      - validationGroups - false - java.lang.String -
      -
      - - - Register a DoubleRangeValidator instance on the - UIComponent associated with the closest parent - UIComponent tag.

      - ]]>
      - validateDoubleRange - - jakarta.faces.DoubleRange - com.sun.faces.facelets.tag.faces.core.ValidateDelegateHandler - - - A ValueExpression that evaluates to an instance of - DoubleRangeValidator.

      - ]]>
      - binding - jakarta.faces.validator.DoubleRangeValidator -
      - - A boolean value - enabling page level determination of whether or not this - validator is enabled on the enclosing component.

      - - ]]>
      - disabled - java.lang.Boolean -
      - - If present, this attribute - refers - to the value of one of the exposed attached objects within the - composite component inside of which this tag is nested.

      - - ]]>
      - for - false - java.lang.String -
      - - Maximum value allowed for this component.

      - ]]>
      - maximum - java.lang.Double -
      - - Minimum value allowed for this component.

      - ]]>
      - minimum - java.lang.Double -
      -
      - - - Register a LengthValidator instance on the - UIComponent associated with the closest parent - UIComponent tag.

      - ]]>
      - validateLength - - jakarta.faces.Length - com.sun.faces.facelets.tag.faces.core.ValidateDelegateHandler - - - A ValueExpression that evaluates to an instance of - LengthValidator.

      - ]]>
      - binding - jakarta.faces.validator.LengthValidator -
      - - A boolean value - enabling page level determination of whether or not this - validator is enabled on the enclosing component.

      - - - ]]>
      - disabled - java.lang.Boolean -
      - - If present, this attribute - refers - to the value of one of the exposed attached objects within the - composite component inside of which this tag is nested.

      - - ]]>
      - for - false - java.lang.String -
      - - Maximum length allowed for this component.

      - ]]>
      - maximum - java.lang.Integer -
      - - Minimum length allowed for this component.

      - ]]>
      - minimum - java.lang.Integer -
      -
      - - Register a LongRangeValidator instance on the - UIComponent associated with the closest parent - UIComponent tag.

      - ]]>
      - validateLongRange - - jakarta.faces.LongRange - com.sun.faces.facelets.tag.faces.core.ValidateDelegateHandler - - - - binding - jakarta.faces.validator.LongRangeValidator - - - A boolean value - enabling page level determination of whether or not this - validator is enabled on the enclosing component.

      - - - ]]>
      - disabled - java.lang.Boolean -
      - - If present, this attribute - refers - to the value of one of the exposed attached objects within the - composite component inside of which this tag is nested.

      - - ]]>
      - for - false - java.lang.String -
      - - Maximum value allowed for this component.

      - ]]>
      - maximum - java.lang.Long -
      - - Minimum value allowed for this component.

      - ]]>
      - minimum - java.lang.Long -
      -
      - - - - - - A validator that uses the pattern attribute to validate the - wrapping component. The entire pattern is matched against - the String value of the component. If it matches, it's - valid. - -

      - ]]>
      - validateRegex - - jakarta.faces.RegularExpression - com.sun.faces.facelets.tag.faces.core.ValidateDelegateHandler - - - A ValueExpression that evaluates to an instance of - RegexValidator.

      - ]]>
      - binding - jakarta.faces.validator.RegexValidator -
      - - If present, this attribute - refers - to the value of one of the exposed attached objects within the - composite component inside of which this tag is nested.

      - - ]]>
      - for - false - java.lang.String -
      - - A boolean value - enabling page level determination of whether or not this - validator is enabled on the enclosing component.

      - - - ]]>
      - disabled - java.lang.Boolean -
      - - A regular expression pattern. Remember that, like in - all Java strings, backslash must be escaped with another - backslash.

      - ]]>
      - pattern - true - java.lang.String -
      -
      - - - A validator that enforces - the presence of a value. It has the same affect as setting the - required attribute on a UIInput to true.

      - - ]]>
      - validateRequired - - jakarta.faces.Required - com.sun.faces.facelets.tag.faces.core.ValidateDelegateHandler - - - - binding - jakarta.faces.validator.RequiredValidator - - - A boolean value - enabling page level determination of whether or not this - validator is enabled on the enclosing component.

      - - - ]]>
      - disabled - java.lang.Boolean -
      - - If present, this attribute - refers - to the value of one of the exposed attached objects within the - composite component inside of which this tag is nested.

      - - ]]>
      - for - false - java.lang.String -
      -
      - - - Support multi-field validation - by enabling class-level bean validation on CDI based backing - beans. This feature causes a temporary copy of the bean - referenced by the value attribute, for the sole - purpose of populating the bean with field values already - validated by <f:validateBean /> and then - performing class-level validation on the copy. Regardless - of the result of the class-level validation, the copy is - discarded. This feature must explicitly be enabled by - setting the application parameter specified in the javadoc - for the symbolic constant - jakarta.faces.validator.BeanValidator.ENABLE_VALIDATE_WHOLE_BEAN_PARAM_NAME. - If this parameter is not set, or is set to false, this tag - must be a no-op. A non-normative example follows the - specification of the feature.

      - -
      - -

      At a high level, the feature provides for - a UIInput subclass that maintains its own - special private Validator that uses information - from one or more <f:validateBean />s to - perform class-level bean validation. For discussion, this - special Validator is called - the wholeBeanValidator.

      - -

      This tag must be backed by a UIInput - component with the following specializations.

      - -
        - -
      • Override getSubmittedValue() to return a - non-null non empty String. This - allows UIInput.validate() to - call wholeBeanValidator.validate().

      • - -
      • Override setConverter() to be a no-op. - It does not make sense to allow a converter to be - installed.

      • - - -
      • Override addValidator() to be a no-op - unless the argument is an instance - of wholeBeanValidator. It does not make sense to - allow additional validators to be installed.

      • - -
      • Override validate() to take the - following actions.

        - -
          - -
        • If the feature is not enabled, return - immediately.

        • - -
        • If the wholeBeanValidator has not yet - been installed, instantiate and pass it to - this.addValidator().

        • - -
        • Call super.validate().

        • - -
        - -
      • - -
      - -

      The wholeBeanValidator must have - a validate() method that performs the following - actions. Due to the above specification, this method will - only ever be passed the special UIInput - component.

      - -
        - -

        Resolve the value of the component to - its Object. Assume that - this value is the bean whose properties are - intended to be populated by components whose values are each - validated by <f:validateBean /> tags. - For discussion, this bean is called the candidate - bean and the properties and their respective values are - called the candidate values. If the candidate - bean cannot be referenced, return immediately - from validate(). Use the information recorded - by each of those <f:validateBean /> tags - to ensure that none of the candidate values are - invalid. If any of them are invalid, return immediately - from validate(). This ensures class-level - validation is only performed on an instance whose fields are - all individually valid.

        - -

        Otherwise it can be assumed that all field-level - validations for this class-level validation have passed.

        - -

        Class-level bean validation must operate on a - sufficiently populated bean instance. This differs from Faces - field-level validation, which prevents beans from being - populated with invalid values. To accomodate this - difference, the candidate bean must be copied, - populated with the already-validated candidate - values, and then subjected to class-level validation. - The copying must proceed in the following order.

        - -
          - -
        1. Invoke the newInstance() method on the - bean's Class. If this throws - any Exception, swallow it and - continue.

        2. - -
        3. If the bean implements Serializable, use - that to copy the bean instance.

        4. - -
        5. Otherwise, if the bean - implements Cloneable, clone the bean - instance.

        6. - -
        7. Otherwise, if the bean has a copy constructor, use - that to copy the bean instance.

        8. - -
        9. If none of these techniques yields a copy, - throw FacesException.

        10. - -
        - -

        Populate the copied bean with the candidate - values.

        - -

        Obtain a reference to - a jakarta.validation.Validator instance using the - same steps described in the javadoc - for jakarta.faces.validator.BeanValidator.validate(). - Let the instance be called beanValidator for - discussion.

        - -

        Obtain the value of the validationGroups - attribute using the same steps described in the javadoc - for jakarta.faces.validator.BeanValidator.validate(). - If this value is not present or not valid, - throw FacesException.

        - -

        Call the validate method on - beanValidator, passing the populated copied bean - and the validation groups as arguments. The copied bean can - be discarded at this point.

        - -

        If the - returned Set<ConstraintViolation> is - non-empty, for each element in the Set, create - a FacesMessage where the summary and detail are - the return from - calling ConstraintViolation.getMessage(). - Capture all such FacesMessage instances into - a Collection and pass them - to ValidatorException. Using information - recorded by the <f:validateBean /> - tag(s), call setValid(false) on all of the - components whose values contributed to this class-level - validation. This is essential to prevent the invalid value - from being set into the model during the update model values - phase. Finally, throw the exception.

        - -
      - -

      This tag must be placed in the component tree after all - of the fields that are to be included in the multi-field - validation. If this precondition is not met, the results - of applying this tag are unspecified.

      - -

      This tag must be used in concert - with <f:validateBean /> and Bean - Validation. Here is a brief example of the common case of - ensuring two password fields are individually valid and also - both the same. The feature requires the use of - the validationGroups attribute on all of - the <f:validateBean /> tags and - the <f:validateWholeBean /> tag.

      - -

      First, the ConstraintValidator - implementation.

      - -
      
      -public class PasswordValidator implements ConstraintValidator<Password, PasswordHolder> {
      -
      -  @Override
      -  public void initialize(Password constraintAnnotation) { }
      -
      -  @Override
      -  public boolean isValid(PasswordHolder value, ConstraintValidatorContext context) {
      -    boolean result;
      -    
      -    result = value.getPassword1().equals(value.getPassword2());
      -
      -    return result;
      -  }
      -
      -}
      -
      - -

      Note that a PasswordHolder instance is - passed to the isValid() method. This method - will only be called if the individual properties of - the PasswordHolder are valid. This fact allows - the isValid() method to inspect the properties - and perform effective class-level validtion.

      - -

      Next, the Constraint.

      - -
      
      -@Constraint(validatedBy=PasswordValidator.class)
      -@Target(TYPE)
      -@Retention(RUNTIME)
      -@interface Password {
      -
      -    String message() default "Password fields must match";
      -    Class[] groups() default {};
      -    Class[] payload() default {};
      -}
      -
      - -

      Now the backing bean constrained by - this Constraint. Note the use - of groups. Note the fact that the bean - implements Cloneable.

      - -
      
      -@Named
      -@RequestScoped
      -@Password(groups = PasswordValidationGroup.class)
      -public class BackingBean implements PasswordHolder, Cloneable {
      -    
      -    private String password1;
      -    
      -    private String password2;
      -
      -    public BackingBean() {
      -        password1="";
      -        password2="";
      -    }
      -
      -    @Override
      -    protected Object clone() throws CloneNotSupportedException {
      -        BackingBean other = (BackingBean) super.clone();
      -        other.setPassword1(this.getPassword1());
      -        other.setPassword2(this.getPassword2());
      -        return other;
      -    }
      -    
      -    @NotNull(groups=PasswordValidationGroup.class)
      -    @Size(max=16, min=8, message="Password must be between 8 and 16 characters long",
      -            groups = PasswordValidationGroup.class)
      -    @Override
      -    public String getPassword1() {
      -        return password1;
      -    }
      -
      -    public void setPassword1(String password1) {
      -        this.password1 = password1;
      -    }
      -
      -    @NotNull(groups=PasswordValidationGroup.class)
      -    @Size(max=16, min=8, message="Password must be between 8 and 16 characters long",
      -            groups = PasswordValidationGroup.class)
      -    @Override
      -    public String getPassword2() {
      -        return password2;
      -    }
      -
      -    public void setPassword2(String password2) {
      -        this.password2 = password2;
      -    }
      -    
      -}
      -
      - -

      Finally, the Facelets view.

      -
      
      -<h:panelGrid columns="2">
      -
      -    <h:outputText value="Password" />  
      -    <h:inputSecret id="password1" value='#{backingBean.password1}'>
      -        <f:validateBean validationGroups="PasswordValidationGroup" />
      -    </h:inputSecret>
      -    
      -    <h:outputText value="Password again" /> 
      -    <h:inputSecret id="password2" value='#{backingBean.password2}'>
      -        <f:validateBean validationGroups="PasswordValidationGroup" />
      -    </h:inputSecret>
      -    
      -</h:panelGrid>
      -
      -<f:validateWholeBean value='#{backingBean}' 
      -   validationGroups="PasswordValidationGroup" />
      -
      - -
      - - -]]>
      - validateWholeBean - - com.sun.faces.ext.validateWholeBean - - - - - A boolean value enabling or - disabling this validation component.

      - - - ]]>
      - disabled - false - java.lang.Boolean -
      - - Component identifier of the - UIInput component to be created.

      - ]]>
      - id - false - java.lang.String -
      - - A comma-separated list of - validation groups. A validation group is a - fully-qualified class name.

      - - ]]>
      - validationGroups - true - java.lang.String -
      - - A ValueExpression referencing the bean to be validated.

      - - ]]>
      - value - true - java.lang.Object -
      - -
      - - - - Register - a named - Validator instance on the UIComponent associated with the - closest parent UIComponent tag.

      - -
      - -

      Usage outside of an EditableValueHolder - parent

      - -

      If this element is nested within a - UIComponent tag that has other - UIComponent children, the validator will be - automatically added to all the child components as well as - this one. The implementation must ensure this occurs even if - the parent of this element is not an instance of - EditableValueHolder.

      - -
      - - ]]>
      - validator - com.sun.faces.facelets.tag.faces.core.ValidateDelegateHandler - - A ValueExpression that evaluates to an object that implements - the jakarta.faces.validator.Validator interface.

      - ]]>
      - binding - jakarta.faces.validator.Validator -
      - - A boolean value - enabling page level determination of whether or not this - validator is enabled on the enclosing component.

      - - - ]]>
      - disabled - java.lang.Boolean -
      - - If present, this attribute - refers - to the value of one of the exposed attached objects within the - composite component inside of which this tag is nested.

      - - ]]>
      - for - false - java.lang.String -
      - - Validator identifier of the Validator - to be created and registered.

      - ]]>
      - validatorId - java.lang.String -
      -
      - - - Register a ValueChangeListener instance on the UIComponent - associated with the closest parent UIComponent tag.

      - ]]>
      - valueChangeListener - com.sun.faces.facelets.tag.faces.core.ValueChangeListenerHandler - - Value binding expression that evaluates to an object that - implements jakarta.faces.event.ValueChangeListener.

      - ]]>
      - binding - false - jakarta.faces.event.ValueChangeListener -
      - - If present, this attribute - refers - to the value of one of the exposed attached objects within the - composite component inside of which this tag is nested.

      - - ]]>
      - for - false - java.lang.String -
      - - Fully qualified Java class name of a - ValueChangeListener to be created and registered.

      - ]]>
      - type - java.lang.String -
      -
      - - - Container for all Jakarta Faces - core and component tags used on a - page.

      ]]>
      - view - - jakarta.faces.ViewRoot - - - - MethodBinding pointing to a method that takes a - jakarta.faces.event.PhaseEvent and returns void. This - method will be called after every phase except for - restore view on an initial request.

      - - ]]>
      - afterPhase - false - void afterPhase(jakarta.faces.event.PhaseEvent) - -
      - - MethodBinding pointing to a method that takes a - jakarta.faces.event.PhaseEvent and returns void. This method - will be called before every phase except for restore view.

      - - ]]>
      - beforePhase - false - void beforePhase(jakarta.faces.event.PhaseEvent) - -
      - - Specifies the - content-type of the response.

      - ]]>
      - contentType - false - java.lang.String -
      - - A comma separated list of - resource library contracts that may be used from within - the Facelets chain. If this attribute is present, it - must only be on the outer-most file in the chain of - files that started ultimately with a call to - ViewDeclarationLanguage.createView(). Any - use of this attribute on a non-outer-most file is undefined.

      - -

      If this attribute exists on the tag, - empty or not, the tag handler must create a - List<String> for the value of the attribute and - unconditionally call - FacesContext.setRresourceLibraryContracts() passing - that list value.

      - - ]]>
      - contracts - false - java.lang.String -
      - - Specifies the - character encoding that should be used for the - response.

      - ]]>
      - encoding - false - java.lang.String -
      - - Locale to use for localizing this page. Expressions - must evaluate to a java.util.Locale or to a String - that is converted to a Locale.

      - ]]>
      - locale - java.lang.Object -
      - - - renderKitId - false - java.lang.String - - - - If - true, this view must not participate in - state saving or restoring. Note that transient views - may not be used with @ViewScoped managed - beans. The implementation must call - setTransient() on the - UIViewRoot, passing the value of the - attribute as specified in the markup.

      ]]> -
      - transient - false - java.lang.Boolean -
      - - -
      - - - This action component specifies - an application-specific command (or action), using an EL - method expression, to be invoked during one of the Faces - lifecycle phases, by default Invoke Application.

      - - ]]>
      - viewAction - - jakarta.faces.ViewAction - - - MethodExpression representing the application action - to invoke when this component is activated by the user. The - expression must evaluate to a public method that takes no - parameters, and returns an Object (the toString() of which - is called to derive the logical outcome) which is passed to - the NavigationHandler for this application.

      - - ]]>
      - action - true - public - java.lang.Object action() - - -
      - - - - MethodExpression representing an action listener method that - will be notified when this component is activated by the user. - The expression must evaluate to a public method that takes an - ActionEvent parameter, with a return type of void, or to a public method that takes no - arguments with a return type of void. In the latter case, the - method has no way of easily knowing where the event came from, - but this can be useful in cases where a notification is needed - that "some action happened". - -

      - ]]>
      - actionListener - false - public void - actionListener(jakarta.faces.event.ActionEvent) - -
      - - Flag indicating that, if this component is activated - by the user, notifications should be delivered to - interested listeners and actions immediately (that is, - during Apply Request Values phase) rather than waiting - until Invoke Application phase.

      - ]]>
      - immediate - false - java.lang.Boolean -
      - - View actions are most commonly used on the initial - view request. Therefore, view actions do not operate on - postback, by default. This attribute enables a view action - to operate on postback.

      - ]]>
      - onPostback - false - java.lang.Boolean -
      - - Specifies the phase in which the action invocation - should occur using the name of the phase constant in the - PhaseId class (the case does not matter). The value must - be one of APPLY_REQUEST_VALUES, PROCESS_VALIDATIONS, - UPDATE_MODEL_VALUES, or INVOKE_APPLICATION. The default - is INVOKE_APPLICATION.

      - ]]>
      - phase - false - java.lang.String -
      - - Like all children of <f:metadata>, - a view action has no visual representation in the view. - This attribute has exactly the same effect on a view action - as the rendered attribute has on a visual - component. Specifically, if the value of this attribute - evaluates to false the component has no - effect.

      - ]]>
      - rendered - false - java.lang.Boolean -
      -
      - - - Used inside of the - metadata facet of a view, this tag causes a UIViewParameter - to be attached as metadata for the current view. Because - UIViewParameter extends UIInput - all of the attributes and nested child content for any - UIInput tags are valid on this tag as well.

      - - ]]>
      - viewParam - - jakarta.faces.Parameter - - - - The ValueExpression linking this component to a property in a - backing bean.

      - ]]>
      - binding - false - jakarta.faces.component.UIComponent -
      - - Converter instance registered with this component.

      - ]]>
      - converter - false - jakarta.faces.convert.Converter -
      - - A ValueExpression enabled attribute that, if present, will be - used as the text of the converter message, replacing any message - that comes from the converter.

      - ]]>
      - converterMessage - false - java.lang.String -
      - - If present, this - attribute refers to the value of one of the exposed - attached objects within the composite component inside - of which this tag is nested.

      - - ]]>
      - for - false - java.lang.String -
      - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container.

      - ]]>
      - id - false - java.lang.String -
      - - The name - of the request parameter from which the value for this - component is retrieved on an initial request or to - override the stored value on a postback.

      - ]]>
      - name - true - java.lang.String -
      - - - Flag indicating that the user is required to provide a submitted - value for this input component.

      - ]]>
      - required - false - boolean -
      - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validation message for the "required" - facility, if the "required" facility is used.

      - ]]>
      - requiredMessage - false - java.lang.String -
      - - MethodExpression representing a validator method that will be - called - during Process Validations to perform correctness checks on the - value of this component. The expression must evaluate to a - public - method that takes FacesContext, UIComponent, and Object - parameters, - with a return type of void.

      - ]]>
      - validator - false - void validate(jakarta.faces.context.FacesContext, - jakarta.faces.component.UIComponent, java.lang.Object) - -
      - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validator message, replacing any - message that comes from the validator.

      - ]]>
      - validatorMessage - false - java.lang.String -
      - - A ValueExpression to which the value of the request parameter, as - determined by the name attribute, is bound. The resolved value of this - expression is used when encoding the view parameter into a bookmarkable link or - redirect URL with view parameter encoding enabled. If this attribute is omitted, - the value of the request parameter will instead be the local value of the - UIViewParameter.

      - ]]>
      - value - false - java.lang.Object -
      - - - - MethodExpression representing a value change listener method - that will be notified when a new value has been set for this - input component. The expression must evaluate to a public - method that takes a ValueChangeEvent - parameter, - with a return type of void, or - to a public method that takes no arguments with a return type - of void. In the latter case, the method has no way of easily - knowing what the new value is, but this can be useful in cases - where a notification is needed that "this value - changed". - -

      - ]]>
      - valueChangeListener - false - void - valueChange(jakarta.faces.event.ValueChangeEvent) - -
      - - - maxlength - false - int - -
      - - - Registers a websocket push - connection in client side by rendering the necessary scripts. - Push messages can be sent from server side via - jakarta.faces.push.PushContext interface. See also - jakarta.faces.push.Push API documentation for an - elaborate instruction on how to use - <f:websocket>.

      - - ]]>
      - websocket - - jakarta.faces.Websocket - - - - - Value binding expression to a backing bean property bound to the component instance for the UIComponent created by this tag. -

      - ]]>
      - binding - false - jakarta.faces.component.UIComponent -
      - - - - Component identifier of the UIWebsocket component to be created. -

      - ]]>
      - id - false - java.lang.String -
      - - - - The name of the websocket channel. - It may not be an EL expression and it may only contain alphanumeric characters, hyphens, underscores and periods. - All open websockets on the same channel name will receive the same push notification from the server. -

      - ]]>
      - channel - true -
      - - - - The scope of the websocket channel. - It may not be an EL expression and allowed values are application, session and view, case insensitive. - When the value is application, then all channels with the same name throughout the application will receive the same push message. - When the value is session, then only the channels with the same name in the current user session will receive the same push message. - When the value is view, then only the channel in the current view will receive the push message. - The default scope is application. - When the user attribute is specified, then the default scope is session. -

      - ]]>
      - scope - false -
      - - - - The user identifier of the websocket channel, so that user-targeted push messages can be sent. - It must implement Serializable and preferably have low memory footprint. - Suggestion: use #{request.remoteUser} or #{someLoggedInUser.id}. - All open websockets on the same channel and user will receive the same push message from the server. -

      - ]]>
      - user - false - java.io.Serializable -
      - - - - The JavaScript event handler function that is invoked when the websocket is opened. - The function will be invoked with one argument: the channel name. -

      - ]]>
      - onopen - false - java.lang.String -
      - - - - The JavaScript event handler function that is invoked when a push message is received from the server. - The function will be invoked with three arguments: the push message, the channel name and the raw MessageEvent itself. -

      - ]]>
      - onmessage - false - java.lang.String -
      - - - - The JavaScript event handler function that is invoked when a connection error has occurred and the websocket will attempt to reconnect. - The function will be invoked with three arguments: the error reason code, the channel name and the raw CloseEvent itself. - Note that this will not be invoked on final close of the websocket, even when the final close is caused by an error. - See also - RFC 6455 section 7.4.1 - and - CloseCodes - API for an elaborate list of all close codes. -

      - ]]>
      - onerror - false - java.lang.String -
      - - - - The JavaScript event handler function that is invoked when the websocket is closed and will not anymore attempt to reconnect. - The function will be invoked with three arguments: the close reason code, the channel name and the raw CloseEvent itself. - Note that this will also be invoked when the close is caused by an error and that you can inspect the close reason code if an actual connection error occurred and which one (i.e. when the code is not 1000 or 1008). - See also - RFC 6455 section 7.4.1 - and - CloseCodes - API for an elaborate list of all close codes. -

      - ]]>
      - onclose - false - java.lang.String -
      - - - - Whether to (auto)connect the websocket or not. - Defaults to true. - It's interpreted as a JavaScript instruction whether to open or close the websocket push connection. - This attribute is implicitly re-evaluated on every ajax request by a PreRenderViewEvent listener on the UIViewRoot. - You can also explicitly set it to false and then manually control in JavaScript by faces.push.open(clientId) and faces.push.close(clientId). -

      - ]]>
      - connected - false - java.lang.Boolean -
      - - - - Whether to render the websocket scripts or not. - Defaults to true. - This attribute is implicitly re-evaluated on every ajax request by a PreRenderViewEvent listener on the UIViewRoot. - If the value changes to false while the websocket is already opened, then the websocket will implicitly be closed. -

      - ]]>
      - rendered - false - java.lang.Boolean -
      -
      - - - -
      diff --git a/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.facelets.taglib.xml b/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.facelets.taglib.xml deleted file mode 100644 index 5501fd677e..0000000000 --- a/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.facelets.taglib.xml +++ /dev/null @@ -1,1015 +0,0 @@ - - - - - Jakarta Faces Facelets Tag Library

      - -
      - -

      The tags in this - library add templating — a powerful view composition - technique — to Faces. Templating is so useful that there - are entire frameworks, such as Tiles and SiteMesh, that are - built around the concept of templating. So what is templating, - how can you benefit from it, and how does this tag library - implement it?

      - -

      If you've used Jakarta Server Pages before, you've probably used jsp:include. - The prototypical example for - jsp:include is a header on each page in a web - application. One Jakarta Server Pages page, say header.jsp, - encapsulates the header content, and the header is included by each - page. You encapsulate and reuse - content, so that changes to one file, header.jsp, affect the - header on every page. -

      - -

      This tab library contains a tag —ui:include — - that's analagous to jsp:include, - but encapsulating and reusing content is only half the templating story, - because templating also lets you - encapsulate and reuse layout. - You define a single template (meaning layout), and - you reuse - that template with multiple compositions. So now - you can control the layout of many pages with a single - template (layout). Let's take a look at an example. -

      - -

      A Templating Example

      - -

      - First, we define a template: -

      -
      1. <!DOCTYPE html>
      2. -
      3. <html xmlns:ui="jakarta.faces.facelets">
      4. - -
      5.     <head>
      6. -
      7.       - <link - href="styles.css" - rel="stylesheet" - type="text/css"/>
      8. - -
      9.       - <title><ui:insert - name="title">Default Title</ui:insert></title>
      10. -
      11.     </head>
      12. - -
      13.  
      14. -
      15.     <body>
      16. -
      17.       - <ui:debug/>
      18. -
      19.       - <div - class="heading">
      20. - -
      21.       -   <ui:insert - name="heading"/>
      22. -
      23.       - </div>
      24. -
      25.  
      26. - -
      27.       - <div - class="content">
      28. -
      29.       -   <ui:insert - name="content"/>
      30. - -
      31.       - </div>
      32. -
      33.     </body>
      34. -
      35. </html> -
      - -

      - In the preceeding listing, we've defined a layout, also known as a - template. That template uses the - ui:insert tag to insert pieces of a page — namely, - title, heading, and content — - defined in a composition. Notice that on line 8, we - define a default title, in case one isn't provided - by the composition. Also note that on line 12 we have the ui:debug - tag, which lets the user activate - a popup window with debugging information by typing CTRL + Shift + d. -

      - -

      - The title, heading, and content pieces of the page referenced in the - template are defined in a separate XHTML - file in a composition, like this: -

      - -
      1. <!DOCTYPE html>
      2. -
      3. <html xmlns:ui="jakarta.faces.facelets">
      4. - -
      5.   <body>
      6. -
      7.     <ui:composition - template="/layout.xhtml">
      8. -
      9.  
      10. -
      11.       - <ui:define - name="title">A List of Contacts</ui:define>
      12. - -
      13.       - <ui:define - name="heading">Contacts</ui:define>
      14. -
      15.  
      16. -
      17.       - <ui:define - name="content">
      18. - -
      19.       -   <ui:include - src="contactsTable.xhtml" - />
      20. -
      21.       - </ui:define>
      22. - -
      23.       -    
      24. -
      25.     </ui:composition>
      26. -
      27.   </body>
      28. -
      29. </html> -
      - -

      - At runtime, Faces synthesizes the two previous XHTML pages to create a - single Faces view by inserting the - pieces defined in the composition into the template (that template is - layout.xhtml, which is the first - listing above). Faces also disregards everything outside of the composition - tag so that we don't - wind up with two body elements in the view. - Also, note that we use the ui:include - tag on line 14 to include content (which happens to be a table) from - another XHTML page, so that we can reuse - that table in other views. -

      - -

      - So why do we have two XHTML pages to define a single view? Why not - simply take the pieces and manually insert - them into the layout so that we have only a single XHTML page? The - answer is simple: we have separated layout - from the content so that we can reuse that layout - among multiple compositions. For example, now we can - define another composition that uses the same layout: -

      - -
      1. <!DOCTYPE html>
      2. -
      3. <html xmlns:ui="jakarta.faces.facelets">
      4. - -
      5.   <body>
      6. -
      7.     <ui:composition - template="/layout.xhtml">
      8. - -
      9.  
      10. - -
      11.       - <ui:define - name="title">Create a Contact</ui:define>
      12. - -
      13.       - <ui:define - name="heading">Create Contact</ui:define>
      14. - -
      15.  
      16. -
      17.       - <ui:define - name="content">
      18. -
      19.       -   <ui:include - src="createContactForm.xhtml"/>
      20. - -
      21.       - </ui:define>
      22. - -
      23.  
      24. - -
      25.     </ui:composition>
      26. -
      27.   </body>
      28. -
      29. </html> -
      - -

      - By encapsulating the layout, we can reuse that layout among multiple - compositions. Just like - ui:include lets us encapsulate and reuse - conent, Faces compositions let us encapsulate and reuse - layout, so that changes to a single layout can affect multiple views. - Fundamentally, that's what this - tag library is all about. -

      - -
      -
      -
      -]]>
      -    jakarta.faces.facelets
      -    
      -        This tag is the same as 
      -  ui:composition, except for two things: Faces creates a
      -  component and adds it directly to the tree, and there's no associated
      -  template.
      -  

      - -

      Use this tag to create a component and - specify a filename for the component as either the source of a - ui:include, or the source of a Facelets tag. -

      - - ]]>
      - component - com.sun.faces.facelets.tag.ui.ComponentRefHandler - - -

      - The identifier of the component that Faces inserts into the - component tree. If an identifier is - not explicitly specified by the page author, Faces will assign an - identifier based on the algorithm - that it uses for all components. -

      - - - ]]>
      - id - false - java.lang.String -
      - - -

      - - Binds the component to a backing bean property, as specified in - section 3.1.5 "Component Bindings" of the Jakarta Faces Specification Document. - The - Java language type of this property must be a class that extends - jakarta.faces.component.UIComponent. The scope of - the bean on which this property resides must be no wider than - request scope. If either of these conditions are not met, the - results are undefined. - -

      - - ]]>
      - binding - false - java.lang.String -
      - - -

      - Controls whether the component is rendered. Valid values for this attribute are either the strings "true" or "false" or an EL expression that evaluates to either "true" or "false".

      If this attribute's value is "false" or the value is an EL expression that evaluates to "false", the component is not rendered in the page.

      -

      - - - ]]>
      - rendered - false - boolean -
      - -
      - - -

      - -Defines a composition that -optionally uses a template, as outlined in the description of the ui tag -library. Multiple compositions can use the same template, thus -encapsulating and reusing layout. Faces disregards everything outside of -the composition, which lets developers embed compositions in well-formed -XHTML pages that can be viewed in an XHTML viewer, such as Dreamweaver -or a browser, without including extraneous elements such as -head and body. - -

      -
      1. <!DOCTYPE html>
      2. -
      3. <html xmlns:ui="jakarta.faces.facelets">
      4. -
      5.   <body>
      6. -
      7.  
      8. -
      9.     THIS LINE, AND EVERYTHING ABOVE IT IS DISREGARDED BY FACELETS
      10. -
      11.     <ui:composition template="/layout.xhtml">
      12. - -
      13.  
      14. -
      15.       <ui:define name="title">#{msgs.contactsWindowTitle}</ui:define>
      16. -
      17.       <ui:define name="heading">#{msgs.contactsHeading}</ui:define>
      18. - -
      19.  
      20. -
      21.       <ui:define name="content">
      22. -
      23.         <ui:include src="contactsTable.xhtml" />
      24. - -
      25.       </ui:define>
      26. -
      27.          
      28. -
      29.     </ui:composition>
      30. -
      31.     THIS LINE, AND EVERYTHING BELOW IT IS DISREGARDED BY FACELETS
      32. - -
      33.  
      34. -
      35.   </body>
      36. -
      37. </html>
      - - - - - ]]>
      - composition - com.sun.faces.facelets.tag.ui.CompositionHandler - - -

      - -A URI that points to a -template, also known as a layout, that inserts pieces of the page -defined in the composition. If the URI -cannot be resolved a TagAttributeException must be thrown, -including accurate location information to help the page author resolve -the problem. When the template is intended to come from a resource -library contract, the value of this attribute must be an absolute path -starting with "/". - -

      - - ]]>
      - template - false - java.lang.String -
      -
      - - -

      - When the ui:debug tag is placed in an XHTML - page, it creates a component and adds it to the - component tree. That debug component captures debugging information, - namely the current state of the component - tree and the scoped variables in the application, when the component - is rendered. If the user presses CTRL + SHIFT + d, - Faces opens a window that shows the debugging information captured by - the debug component. -

      - -

      - Typically, the best place to put the ui:debug - tag is in an application's main template, which - lets developers enable or disable viewing of debugging information - in one central location. Additionally, page - authors can change the hotkey (which by default is CTRL + SHIFT + d, - where the d stands for debug) to CTRL + SHIFT + ?, - where ? represents the key specified as the value of the hotkey - attribute. -

      - -

      - You can use the rendered attribute to - control whether the debug component is rendered. - Using an EL expression as the value for the rendered - attribute lets you control whether - debug output is enabled for multiple views based on a single bean - property. -

      - -

      - Note ui:debug only works when the ProjectStage is set to Development. -

      - - - ]]>
      - debug - com.sun.faces.facelets.tag.ui.UIDebug - - -

      - Defines a single character, that, pressed in conjunction with - CTRL and SHIFT, will display the Faces debug window. - By default, the hotkey is 'd'. The value for the - hotkey attribute cannot be an EL expression. -

      - - - - ]]>
      - hotkey - false - java.lang.String -
      - - -

      - Controls whether the debug component is rendered. Valid values - for this attribute are either the strings "true" or "false" or - an EL expression that evaluates to either "true" or "false".

      If - this attribute's value is "false" or the value is an EL - expression that evaluates to "false", the debug component is not - rendered in the page, the hotkey attribute is disregarded, and - users cannot open the debugging information window with a - hotkey.

      -

      - - - - ]]>
      - rendered - false - java.lang.String -
      -
      - - - -

      The define tag defines content - that is inserted into a page by a template. The define - tag can be used inside ui:composition, ui:component, - ui:decorate, and ui:fragment - tags.

      - -

      Content defined by the define tag - can be inserted into a page by using ui:insert. -

      - - - - ]]>
      - define - com.sun.faces.facelets.tag.ui.DefineHandler - - - -

      Assigns a name to the content inside a define - tag. That name is used by corresponding ui:insert - tags in a template that insert the named content into a page.

      - - - ]]>
      - name - true - java.lang.String -
      -
      - - - -

      -The decorate tag -is identical to the composition tag, except that -ui:decorate, unlike ui:composition, does not -disregard all content outside of the tag. The decorate is -useful when you want to decorate some content in a page, for example, -you might want to decorate a list of items, like this: - -

      1. - -<ui:decorate template="/layout.xhtml" xmlns:ui="jakarta.faces.facelets">
      2. -
      3.   <ui:define name="listHeading">
      4. - -
      5.     <ui:include src="shared/listHeading.xhtml"/>
      6. -
      7.   </ui:define>
      8. -
      9.        
      10. -
      11.   <c:forEach items="#{items}" var="item">
      12. - -
      13.     ...
      14. -
      15.   </c:forEach>
      16. -
      17.   ...
      18. -
      19. </ui:decorate>
      -

      - -Because Faces does not disregard everything outside of the ui:decorate tag, ui:decorate can -be used to decorate pieces of a page. - - - ]]>
      - decorate - com.sun.faces.facelets.tag.ui.DecorateHandler - - - -A URI that points to a -template, also known as a layout, that inserts pieces of the page -defined in the decorator. If the URI -cannot be resolved a TagAttributeException must be thrown, -including accurate location information to help the page author resolve -the problem. When the template is intended to come from a resource -library contract, the value of this attribute must be an absolute path -starting with "/". - - - - ]]> - template - false - java.lang.String - -
      - - - -

      The fragment - tag is identical to the component tag, except - that ui:fragment, unlike - ui:component, Faces does not disregard all content - outside of the tag.

      - - - - ]]>
      - fragment - com.sun.faces.facelets.tag.ui.ComponentRefHandler - - - The identifier of the component that Faces inserts into the - component tree. If an identifier is - not explicitly specified by the page author, Faces will assign an - identifier based on the algorithm - that it uses for all components. - - - ]]> - id - false - java.lang.String - - - - -

      Binds the component to a backing bean property, as specified - in section 3.1.5 "Component Bindings" of the Jakarta Faces Specification Document. - The - Java language type of this property must be a class that extends - jakarta.faces.component.UIComponent. The scope of - the bean on which this property resides must be no wider than - request scope. If either of these conditions are not met, the - results are undefined.

      - - - ]]>
      - binding - false - java.lang.String -
      - - - -

      - Controls whether the fragment component is rendered. - Valid values for this attribute are either the strings - "true" or "false" or an EL expression that evaluates to - either "true" or "false". -

      -

      - If this attribute's value is "false" or the value is an - EL expression that evaluates to "false", the fragment - is not rendered in the page. -

      - - ]]> -
      - rendered - false - java.lang.String -
      -
      - -

      Use this tag —which - is very similar to JSP's jsp:include — to - encapsulate and reuse content among multiple XHTML - pages. There are three things this tag can include: plain - XHTML, and XHTML pages that have either a - composition tag or a component - tag.

      You supply a filename, through - ui:include's src attribute for Faces - to include. That filename is relative to the XHTML file that - was rendered as a result of the last request. So, for - example, if Faces loaded the view login.xhtml, - and that file included - pageDecorations/header.xhtml, and - pageDecorations/header.xhtml included - companyLogo.xhtml, then - companyLogo.xhtml will not be found if it's in - the pageDecorations directory, because - companyLogo.xhtml has to be in the same - directory as login.xhtml.

      - - - - ]]>
      - include - com.sun.faces.facelets.tag.ui.IncludeHandler - - - -The filename of an XHTML page to -include. The filename is relative to the XHTML page that was originally -loaded. When the included file is -intended to come from a resource library contract, the value of this -attribute must be an absolute path starting with "/". - -

      - ]]>
      - src - true - java.lang.String -
      -
      - - -

      Inserts content into a template. That content is defined —with - the ui:define tag — in either a - ui:composition, ui:component, - ui:decorate, or ui:fragment.

      - - - ]]>
      - insert - com.sun.faces.facelets.tag.ui.IncludeHandler - - - - The optional name attribute matches the associated <ui:define/> - tag in this template's client. If no name is specified, it's - expected - that the whole template client will be inserted. - - - - ]]> - name - false - java.lang.String - -
      - - -

      Use this tag to pass parameters to an included file (using - ui:include), or a template - (linked to either a composition or decorator). Embed ui:param - tags in either ui:include, - ui:composition, or ui:decorate - to pass the parameters. - - - ]]> - param - com.sun.faces.facelets.tag.ui.ParamHandler - - -The name of the parameter. - - ]]> - name - true - java.lang.String - - - - The value of the - parameter. Notice that this attribute's value can be an EL expression, - which means that you can pass objects to either an included file or a - template. - - ]]> - value - true - java.lang.String - - - - - -

      Use this tag as an alternative to - h:dataTable or c:forEach

      - - ]]>
      - repeat - com.sun.faces.facelets.tag.ui.RepeatHandler - - - -

      - If value specified: Iteration begins at the item located at the specified index. - First item of the collection has index 0. - If value not specified: Iteration begins with index set at the specified value. -

      - - ]]> -
      - begin - false - int -
      - - - -

      - If value specified: Iteration ends at the item located at the specified index (inclusive). - If value not specified: Iteration ends when index reaches the specified value (inclusive). -

      - - ]]> -
      - end - false - int -
      - - - -

      Read-write property setting the offset from the - beginning of the - collection from which to start the iteration. If not set, this - offset - is not considered and iteration will start at the beginning of - the - collection.

      - - - - ]]>
      - offset - false - int -
      - - - -

      Read-write property setting the size of the collection - to iterate. - If this value is less than the actual size of the collection, a - FacesException must be thrown.

      - - - - ]]>
      - size - false - int -
      - -

      Iteration - will only process every step items of the collection, - starting with the first one.

      - - ]]>
      - step - false - int -
      - - - -

      The name of a collection of items that this tag - iterates over. The - collection may be a List, array, - java.sql.ResultSet, java.lang.Iterable, - java.util.Map or an individual java Object. If the - collection is null, this tag does nothing.

      - - - - ]]>
      - value - true - java.lang.Object -
      - - - -

      - Name of the exported scoped variable for the current item of - the iteration. This scoped variable has nested visibility. -

      - - ]]> -
      - var - true - java.lang.String -
      - - - -

      - Name of the exported request scoped variable for the status - of the iteration. The object the name points to is a POJO - with the following read-only JavaBeans properties. This - scoped variable has nested visibility. -

      -

      begin of type Integer

      -

      end of type Integer

      -

      index of type int

      -

      step of type Integer

      -

      even of type boolean

      -

      odd of type boolean

      -

      first of type boolean

      -

      last of type boolean

      - - ]]> -
      - varStatus - false - java.lang.String -
      - - - -

      - Controls whether the repeat component is rendered. - Valid values for this attribute are either the strings - "true" or "false" or an EL expression that evaluates to - either "true" or "false". -

      -

      - If this attribute's value is "false" or the value is an - EL expression that evaluates to "false", the repeat - is not rendered in the page. -

      - - ]]> -
      - rendered - false - java.lang.String -
      -
      - - -

      Remove content from a page.

      - - - ]]>
      - remove - com.sun.faces.facelets.tag.ui.SchemaCompliantRemoveHandler - -
      - diff --git a/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.html.taglib.xml b/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.html.taglib.xml deleted file mode 100644 index b5d62f9db4..0000000000 --- a/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.html.taglib.xml +++ /dev/null @@ -1,11756 +0,0 @@ - - - - - Jakarta Faces HTML Tag Library

      - -

      This tag library contains Jakarta Faces component tags for all - UIComponent + HTML RenderKit Renderer combinations as defined in - section 9.5 "Standard HTML RenderKit Tag Library" of the Jakarta Faces Specification Document.

      - ]]>
      - jakarta.faces.html - - - Render an HTML "input" element of type "button". - The value of the component is rendered as the button text and the outcome of the - component is used to determine the target URL which is activated by onclick. If - "image" attribute is specified, render it as the value of the "src" attribute after - passing it to the getResourceURL() method of the ViewHandler - for this application, and passing the result through the encodeResourceURL() - method of the ExternalContext. Any child UIParameter components - are appended to the String to be used as the target URL as query parameters before rendering. - The entire target URL string must be passed through a call to the encodeResourceURL() - method of the ExternalContext. The name of the UIParameter goes on the - left hand side, and the value of the UIParameter on the right hand side. The name - and the value must be URLEncoded. Each UIParameter instance is separeted by an - ampersand, as dictated in the URL spec. The final encoded result will be written out to the - onclick attribute of the button as "window.location.href = ''". - If the developer has specified a custom onlclick the window.location.href name/value - pair will be appended at the end of the developer specified script. - If the "fragment" attribute is specified, the value will be included at the end - of the resulting URL preceded by a hash mark. If the "styleClass" attribute is specified, - render its value as the value of the "class" attribute. If the "id" attribute is specified, - follow the same steps as mentioned in the "General - Notes on Encoding" regarding the "id" attribute for UIInput components. If the - "disabled" attribute is specified, do not render the "onclick" element and assign the - "disabled" attribute a value of true.]]> - - button - - jakarta.faces.HtmlOutcomeTargetButton - jakarta.faces.Button - - - - Flag indicating that this element must never - receive focus or be included in a subsequent - submit.

      ]]> -
      - - disabled - - - false - - - boolean - -
      - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

      - -

      It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

      ]]> -
      - role - false - java.lang.String -
      - - - - - - - id - - - false - - - java.lang.String - - - - - - - - includeViewParams - - - false - - - java.lang.Boolean - - - - - - - - outcome - - - false - - - java.lang.String - - - - - - - - rendered - - - false - - - boolean - - - - - - - - value - - - false - - - java.lang.Object - - - - - - - - accesskey - - - false - - - java.lang.String - - - - - This attribute is ignored when the image attribute is not specified.]]> - - - alt - - - false - - - java.lang.String - - - - - - - - dir - - - false - - - java.lang.String - - - - - - - - fragment - - - false - - - java.lang.String - - - - - - Absolute or relative URL of the - image to be displayed for this - button. If specified, this - "input" element will be of type - "image". Otherwise, it will be - of the type specified by the - "type" property with a label - specified by the "value" - property. Note - that if the value of this - attribute starts with "/", the - rendered value for this - attribute will be prefixed with - the context-root for this - application. -

      ]]> -
      - - image - - - false - - - java.lang.String - -
      - - - - - - lang - - - false - - - java.lang.String - - - - - - - - onblur - - - false - - - java.lang.String - - - - - - - - onclick - - - false - - - java.lang.String - - - - - - - - ondblclick - - - false - - - java.lang.String - - - - - - - - onfocus - - - false - - - java.lang.String - - - - - - - - onkeydown - - - false - - - java.lang.String - - - - - - - - onkeypress - - - false - - - java.lang.String - - - - - - - - onkeyup - - - false - - - java.lang.String - - - - - - - - onmousedown - - - false - - - java.lang.String - - - - - - - - onmousemove - - - false - - - java.lang.String - - - - - - - - onmouseout - - - false - - - java.lang.String - - - - - - - - onmouseover - - - false - - - java.lang.String - - - - - - - - onmouseup - - - false - - - java.lang.String - - - - - - - - style - - - false - - - java.lang.String - - - - - - - - styleClass - - - false - - - java.lang.String - - - - - - - - tabindex - - - false - - - java.lang.String - - - - - - - - title - - - false - - - java.lang.String - - - - - The ValueExpression linking this component to a property in a - backing bean - - - binding - - - false - - - jakarta.faces.component.UIComponent - - - - - Disable appending the ClientWindow on the rendering of this element.

      ]]> -
      - disableClientWindow - false - java.lang.Boolean -
      - -
      - - - Render an HTML "a" anchor element. The value of the - component is rendered as the anchor text and the outcome of the component is used - to determine the target URL rendered in the "href" attribute. Any - child UIParameter components are appended to the String to be - output as the value of the "href" attribute as query parameters - before rendering. The entire "href" string must be passed through - a call to the encodeResourceURL() method of the - ExternalContext. The name of the UIParameter goes on - the left hand side, and the value of the UIParameter on the right - hand side. The name and the value must be URLEncoded. Each - UIParameter instance is separated by an ampersand, as dictated in - the URL spec. If the "fragment" attribute is specified, the value will be - included at the end of the resulting URL preceded by a hash mark. - If the "styleClass" attribute is specified, render - its value as the value of the "class" attribute. If the "id" attribute - is specified, follow the same steps as mentioned in the - "General - Notes on Encoding" regarding the "id" attribute for UIInput components. - If the "disabled" attribute is specified, do not render the HTML "a" - anchor element or the "href" element. Instead, render a "span" element. - If the "styleClass" attribute is specified, render its value as the value - of the "class" attribute on the "span". Render any pass-through attributes - on the "span".]]> - - link - - jakarta.faces.HtmlOutcomeTargetLink - jakarta.faces.Link - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

      - -

      It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

      ]]> -
      - role - false - java.lang.String -
      - - - Disable appending the ClientWindow on the rendering of this element.

      ]]> -
      - disableClientWindow - false - java.lang.Boolean -
      - - - - - - id - - - false - - - java.lang.String - - - - - - - - includeViewParams - - - false - - - java.lang.Boolean - - - - - - - - outcome - - - false - - - java.lang.String - - - - - - - - rendered - - - false - - - boolean - - - - - - - - value - - - false - - - java.lang.Object - - - - - - - - accesskey - - - false - - - java.lang.String - - - - - - - - charset - - - false - - - java.lang.String - - - - - - - - coords - - - false - - - java.lang.String - - - - - - - - dir - - - false - - - java.lang.String - - - - - - - - disabled - - - false - - - boolean - - - - - - - - fragment - - - false - - - java.lang.String - - - - - - - - hreflang - - - false - - - java.lang.String - - - - - - - - lang - - - false - - - java.lang.String - - - - - - - - onblur - - - false - - - java.lang.String - - - - - - - - onclick - - - false - - - java.lang.String - - - - - - - - ondblclick - - - false - - - java.lang.String - - - - - - - - onfocus - - - false - - - java.lang.String - - - - - - - - onkeydown - - - false - - - java.lang.String - - - - - - - - onkeypress - - - false - - - java.lang.String - - - - - - - - onkeyup - - - false - - - java.lang.String - - - - - - - - onmousedown - - - false - - - java.lang.String - - - - - - - - onmousemove - - - false - - - java.lang.String - - - - - - - - onmouseout - - - false - - - java.lang.String - - - - - - - - onmouseover - - - false - - - java.lang.String - - - - - - - - onmouseup - - - false - - - java.lang.String - - - - - - - - rel - - - false - - - java.lang.String - - - - - - - - rev - - - false - - - java.lang.String - - - - - - - - shape - - - false - - - java.lang.String - - - - - - - - style - - - false - - - java.lang.String - - - - - - - - styleClass - - - false - - - java.lang.String - - - - - - - - tabindex - - - false - - - java.lang.String - - - - - - - - target - - - false - - - java.lang.String - - - - - - - - title - - - false - - - java.lang.String - - - - - - - - type - - - false - - - java.lang.String - - - - - The ValueExpression linking this component to a property in a - backing bean - - - binding - - - false - - - jakarta.faces.component.UIComponent - - -
      - - - Render the markup for a <head> element.

      - -

      Decode Behavior

      - -
        - -

        No action is required during decode for this renderer.

        - -
      - -

      Encode Behavior

      - -
        - -

        Render the starting <head> element tag. Any attributes declared on the element must be passed through - unmodified to the rendered output. - Just before rendering the - closing </head> element tag, render any resources that have been targeted - for this "head" element: -

          -
        • Obtain a UIViewRoot instance.
        • -
        • Obtain a List of component resources targeted for - this "head" element with a call to UIViewRoot.getComponentResources() - with the String "head" as the argument.
        • -
        • Iterate over the returned List of UIComponent instances - and call encodeAll on each UIComponent instance. - -

          Any attributes declared on the element must be passed through - unmodified to the rendered output.

          - -
        - Render the ending </head> element tag.

        - - ]]> - - head - - jakarta.faces.Output - jakarta.faces.Head - - - - - - - dir - - - false - - - java.lang.String - - - - - - - - lang - - - false - - - java.lang.String - - - - - The ValueExpression linking this component to a property in a - backing bean - - - binding - - - false - - - jakarta.faces.component.UIComponent - - - - - - Render the markup for a <body> element.

        - -

        Decode Behavior

        - -
          - -

          No action is required during decode for this renderer.

          - -
        - -

        Encode Behavior

        - -
          - -

          Render the starting <body> element tag. Just before rendering the - closing </body> element tag, render any resources that have been targeted - for this "body" element: -

            -
          • Obtain a UIViewRoot instance.
          • - -
          • Obtain a List of component resources targeted for - this "body" element with a call to - UIViewRoot.getComponentResources() with the - String "body" as the argument. Render the ending - </body> element tag.
          • - -
          • Iterate over the returned List of UIComponent instances - and call encodeAll on each UIComponent instance. -
          - -

          Any attributes declared on the element must be passed through - unmodified to the rendered output.

          - - ]]> - - body - - jakarta.faces.Output - jakarta.faces.Body - - - - - - - dir - - - false - - - java.lang.String - - - - - - - - lang - - - false - - - java.lang.String - - - - - - - - onclick - - - false - - - java.lang.String - - - - - - - - ondblclick - - - false - - - java.lang.String - - - - - - - - onkeydown - - - false - - - java.lang.String - - - - - - - - onkeypress - - - false - - - java.lang.String - - - - - - - - onkeyup - - - false - - - java.lang.String - - - - - - - - onload - - - false - - - java.lang.String - - - - - - - - onmousedown - - - false - - - java.lang.String - - - - - - - - onmousemove - - - false - - - java.lang.String - - - - - - - - onmouseout - - - false - - - java.lang.String - - - - - - - - onmouseover - - - false - - - java.lang.String - - - - - - - - onmouseup - - - false - - - java.lang.String - - - - - - - - onunload - - - false - - - java.lang.String - - - - - - - - style - - - false - - - java.lang.String - - - - - - - - styleClass - - - false - - - java.lang.String - - - - - - - - title - - - false - - - java.lang.String - - - - - The ValueExpression linking this component to a property in a - backing bean - - - binding - - - false - - - jakarta.faces.component.UIComponent - - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

          - -

          It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

          ]]> -
          - role - false - java.lang.String -
          - - - - <p><span - class="changed_modified_2_0">Renders an HTML "input" - element.</p> - <p>Decode Behavior</p> - <ul> - <p>Obtain the <code>Map</code> from the - "requestParameterMap" - property of the <code>ExternalContext</code>. If the - value in the - <code>Map</code> for the value of the "clientId" - property of the - component is <code>null</code>, create a String by - concatenating - the value of the "clientId" property of the component with the - String ".x" (without the quotes). Create another String in the - same manner, but concatenate ".y" (without the quotes). If - <code>null</code> is the value in the <code>Map</code> - for both - Strings, return from <code>decode()</code>. If the value - in the - <code>Map</code> for the value of the "clientId" - property of the - component is not <code>null</code>, get the value of the - "type" - attribute, and convert it to lower case. If the result is equal - to the String "reset" (without the quotes), return from - <code>decode()</code>. Otherwise, create a - <code>jakarta.faces.event.ActionEvent</code> around the - component, - and pass it to the <code>queueEvent()</code> method of - the - component, which must be an instance of - <code>UICommand</code>.</p> - </ul> - <p>Encode Behavior</p> - <ul> - <p>Render the clientId of the component as the value of the - "name" - attribute. Render the current value of the component as the value - of the "value" attribute. If "image" attribute is specified render - it as the value of the "src" attribute after passing it to the - <code>getResourceURL()</code> method of the - <code>ViewHandler</code> for this application, and - passing the - result through the <code>encodeResourceURL()</code> - method of the - <code>ExternalContext</code>. <span - class="changed_added_2_0">Note that calling - <code>getResourceURL()</code> will prefix the - context-root of the - current application if the value of the "src" attribute starts - with "/".</span> When handling the "image" attribute, the - value must not - be escaped. For example, <code>&</code> must not be - turned into - <code>&amp;amp;</code>. If the "styleClass" - attribute is - specified, render its value as the value of the "class" attribute. - If the user has specified an "onclick" attribute, append that - JavaScript to any existing JavaScript before rendering.</p> - <p class="changed_added_2_0">If the component being rendered - by - this renderer has any <code>UIParameter</code> children, - each one - of them must be rendered using the renderer for component-family: - "jakarta.faces.Input" and renderer-type: "jakarta.faces.Hidden". For - discussion, this is called the hiddenRenderer. A component with - component-type "jakarta.faces.Input" must be created for local use - in rendering each <code>UIParameter</code> child. The - "id" - property of the temporary component must be set to the "name" of - the <code>UIParameter</code>. The "value" property of - the - temporary component must be set to the "value" of the - <code>UIParameter</code>. For each <code>UIParameter</code> - child, the hiddenRenderer must have its - <code>encodeBegin()</code>, <code>encodeChildren()</code>, - and - <code>encodeEnd()</code> methods called, in order, - passing the - temporary component as the second argument.</p> - </ul> - - commandButton - - jakarta.faces.HtmlCommandButton - jakarta.faces.Button - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

          - -

          It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

          ]]> -
          - role - false - java.lang.String -
          - - - MethodExpression representing the application action to invoke - when this component is activated by the user. The expression - must evaluate to a public method that takes no parameters, and - returns an Object (the toString() of which is called to derive - the logical outcome) which is passed to the NavigationHandler - for this application. - - action - false - java.lang.Object action() - - - - <p> - MethodExpression representing an action listener method that - will be notified when this component is activated by the user. - The expression must evaluate to a public method that takes an - ActionEvent parameter, with a return type of void, <span - class="changed_added_2_0">or to a public method that takes no - arguments with a return type of void. In the latter case, the - method has no way of easily knowing where the event came from, - but this can be useful in cases where a notification is needed - that "some action happened".</span> - </p> - - actionListener - false - void actionListener(jakarta.faces.event.ActionEvent) - - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating that, if this component is activated by the - user, - notifications should be delivered to interested listeners and - actions - immediately (that is, during Apply Request Values phase) rather - than - waiting until Invoke Application phase. - - immediate - false - java.lang.Boolean - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - The current value of this component. - - value - false - java.lang.Object - - - - Access key that, when pressed, transfers focus - to this element. - - accesskey - false - java.lang.String - - - This attribute is ignored when the image attribute is not specified. - ]]> - alt - false - java.lang.String - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - disabled - false - java.lang.Boolean - - - - <p> - Absolute or relative URL of the - image to be displayed for this - button. If specified, this - "input" element will be of type - "image". Otherwise, it will be - of the type specified by the - "type" property with a label - specified by the "value" - property. <span - class="changed_added_2_0">Note - that if the value of this - attribute starts with "/", the - rendered value for this - attribute will be prefixed with - the context-root for this - application.</span> - </p> - - image - false - java.lang.String - - - - A localized user presentable name for this component. - - label - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - Javascript code executed when this element loses focus. - - onblur - false - java.lang.String - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - onchange - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when this element receives focus. - - onfocus - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - Javascript code executed when text within this - element is selected by the user. - - onselect - false - java.lang.String - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - readonly - false - java.lang.Boolean - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - tabindex - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - Type of button to create. Valid values are "submit", "button", - and "reset". If not specified, or not a valid value, the default - value is "submit". - - type - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - -
          - - - <p><span - class="changed_modified_2_0">Render</span> an HTML "a" - anchor - element that acts like a form submit button when - clicked.</p> - <p>General Behaviour</p> - <p>Both the encode and decode behavior require the ability to - get - the id/name for a hidden field, <span - class="changed_added_2_0">which may be rendered in markup or - which - may be programmatically added via client DOM manipulation</span>, - whose value is set by the JavaScript form submit. This name must - be constructed as follows:</p> - <ul> - <li><p>Get the clientId for the form of which this - component is a - child.</p></li> - <li><p>Append - <code>NamingContainer.SEPARATOR_CHAR</code>.</p></li> - <li><p>Append a constant string that is the same for all - command - link components in the tree.</p></li> - </ul> - <p>In the following text, this String is called - hiddenFieldName.</p> - <p>Decode Behavior</p> - <ul> - <p>Obtain the "clientId" property of the component. Obtain the - <code>Map</code> from the "requestParameterMap" property - of the - <code>ExternalContext</code>. Derive hiddenFieldName as - above. - Get the entry in the <code>Map</code> under the key that - is the - hiddenFieldName. If the there is no entry, or the entry is the - empty String, or the entry is not equal to the value of the - "clientId" property, return immediately. If there is an entry, - and its value is equal to the value of the "clientId" property, - create a new <code>jakarta.faces.event.ActionEvent</code> - instance - around the component and call <code>queueActionEvent()</code> - on - the component, passing the event.</p> - </ul> - <p>Encode Behavior</p> - <ul> - <p>If the value of the <code>disabled</code> - attribute is - <code>true</code>, render a span element. Render all the - passthru - attributes and the <code>target</code> attribute as - pass-through - attributes on the span, even though the <code>target</code> - attribute will have no effect on a span. Render the current value - of the component as the content of the span. Return.</p> - <p>If the <code>disabled</code> attribute is not - present, or its - value is <code>false</code>, render an HTML <code>a</code> - element. Render "#" as the value of the "href" attribute. Render - the current value of the component as the link text if it is - specified. Render JavaScript that is functionally equivalent to - the following as the value of the "onclick" attribute:</p> - <p><code>document.forms['CLIENT_ID']['hiddenFieldName'].value='CLIENT_ID'; - document.forms['CLIENT_ID']['PARAM1_NAME'].value='PARAM1_VALUE'; - document.forms['CLIENT_ID']['PARAM2_NAME'].value='PARAM2_VALUE'; - return false;</code></p> - <p>document.forms['CLIENT_ID'].submit()" where hiddenFieldName - is - as described above, CLIENT_ID is the clientId of the UICommand - component, PARAM*_NAME and PARAM*_VALUE are the names and values, - respectively, of any nested UIParameter children. The name and - the value must be URLEncoded. If an "onclick" attribute was - specified by the user, render this JavaScript in a function, - and render the user's JavaScript in a function. Render both - functions - in a choice function as follows:</p> - <p><code>var a=function(){#USER_FUNCTION#}; - var b=function(){#JSF_FUNCTION#}; - return (a()==false) ? false : b();</code></p> - <p>where #USER_FUNCTION# is the user's JavaScript and - #JSF_FUNCTION# is the JavaScript rendered by Faces. The choice - function should operate such that if the user's JavaScript returns - true, then the rendered JavaScript will also execute.</p> - <p>If the "styleClass" attribute is specified, render its - value as - the value of the "class" attribute. Render any non-UIParameter - output children as normal inside of the "a" element. These will - appear as the link text. Allow the form renderer to output a - single "input" element (for the entire page, regardless of how - many command link components are in the page) of "type" "hidden" - whose "name" is the value of hiddenFieldName, and which must not - have a "value" attribute. Multiple occurrences of command link - components in the tree should not cause multiple hiddenFieldName - hidden fields. Allow the form renderer to output an "input" - element of "type" "hidden" for each of the nested UIParameter - children, taking the name property (but not the value) from each - one in turn. If the "disabled" attribute is specified, do not - render the HTML "a" anchor element or its "href" attribute. - Instead, render a "span" element. If the "styleClass" attribute - is specified, render its value as the value of the "class" - attribute on the "span". Render any pass-through attributes on - the "span". The content of the span element comes from the value - of the component or its children as specified above.</p> - <p>If the user specified a <code>target</code> - attribute, its - value must be set using javascript since the <code>onclick</code> - handler will prevent the target attribute from being generated. - This must be accomplished using JavaScript that is equivalent to - the following.</p> - <p><code>document.forms['CLIENT_ID'].target='TARGET';</code></p> - <p>Where TARGET is the value of the target attribute on the - JSP - tag.</p> - </ul> - - commandLink - - jakarta.faces.HtmlCommandLink - jakarta.faces.Link - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

          - -

          It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

          ]]> -
          - role - false - java.lang.String -
          - - - MethodExpression representing the application action to invoke - when this component is activated by the user. The expression - must evaluate to a public method that takes no parameters, and - returns an Object (the toString() of which is called to derive - the logical outcome) which is passed to the NavigationHandler - for this application. - - action - false - java.lang.Object action() - - - - <p> - MethodExpression representing an action listener method that - will be notified when this component is activated by the user. - The expression must evaluate to a public method that takes an - ActionEvent parameter, with a return type of void, <span - class="changed_added_2_0">or to a public method that takes no - arguments with a return type of void. In the latter case, the - method has no way of easily knowing where the event came from, - but this can be useful in cases where a notification is needed - that "some action happened".</span> - </p> - - actionListener - false - void actionListener(jakarta.faces.event.ActionEvent) - - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating that, if this component is activated by the - user, - notifications should be delivered to interested listeners and - actions - immediately (that is, during Apply Request Values phase) rather - than - waiting until Invoke Application phase. - - immediate - false - java.lang.Boolean - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - The current value of this component. - - value - false - java.lang.Object - - - - Access key that, when pressed, transfers focus - to this element. - - accesskey - false - java.lang.String - - - - The character encoding of the resource designated - by this hyperlink. - - charset - false - java.lang.String - - - - The position and shape of the hot spot on the screen - (for use in client-side image maps). - - coords - false - java.lang.String - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Flag indicating that this element must never - receive focus or be included in a subsequent - submit. - - disabled - false - java.lang.Boolean - - - - The language code of the resource designated - by this hyperlink. - - hreflang - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - Javascript code executed when this element loses focus. - - onblur - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when this element receives focus. - - onfocus - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - The relationship from the current document - to the anchor specified by this hyperlink. - The value of this attribute is a space-separated - list of link types. - - rel - false - java.lang.String - - - - A reverse link from the anchor specified - by this hyperlink to the current document. - The value of this attribute is a space-separated - list of link types. - - rev - false - java.lang.String - - - - The shape of the hot spot on the screen - (for use in client-side image maps). Valid - values are: default (entire region); rect - (rectangular region); circle (circular region); - and poly (polygonal region). - - shape - false - java.lang.String - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - tabindex - false - java.lang.String - - - - Name of a frame where the resource - retrieved via this hyperlink is to - be displayed. - - target - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - The content type of the resource designated - by this hyperlink. - - type - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - -
          - - - - Render a JavaScript function that invokes faces.ajax.request() function. -

          - -

          Encode Behavior

          -

          - Render an HTML script element. If the value of the "name" attribute does not contain a - period . indicating a namespaced function name, then render JavaScript var - keyword, followed by a space character. Render the value of the "name" attribute, followed by - JavaScript assignment operator. Render JavaScript function which invokes faces.ajax.request() - with data provided by execute, render, onbegin, - oncomplete, onsuccess and onerror arguments, if any. -

          -

          - If the component being rendered has any UIParameter children, each one of them must be - encoded into params object of the options object of the faces.ajax.request() - function. -

          -

          - If the rendered JavaScript function is invoked with an object argument, each property must be - encoded into params object of the options object of the faces.ajax.request() - function. This will override any property with the same key. -

          - -

          Decode Behavior

          -

          - Obtain the Map from the "requestParameterMap" property of the ExternalContext. - If the value in the Map for the value of the "jakarta.faces.source" equals to the "clientId" property of the component, - create a jakarta.faces.event.ActionEvent around the component, and pass it to the queueEvent() method of the component, - which must be an instance of UICommand. -

          - ]]> -
          - commandScript - - jakarta.faces.HtmlCommandScript - jakarta.faces.Script - - - - The component identifier for this component. - This value must be unique within the closest parent component that is a naming container. - - id - false - java.lang.String - - - name="functionName". - This can be a namespaced function name, e.g. name="ez.functionName". - ]]> - name - true - java.lang.String - - - load event of the window. - Defaults to false. - ]]> - autorun - false - boolean - - - Object. - The toString() of the returned Object is called to derive the logical outcome. - This outcome is passed to the NavigationHandler for this application. - ]]> - action - false - java.lang.Object action() - - - ActionEvent parameter, - with a return type of void, - or to a public method that takes no arguments with a return type of void. - In the latter case, - the method has no way of easily knowing where the event came from, - but this can be useful in cases where a notification is needed that "some action happened". - ]]> - actionListener - false - void actionListener(jakarta.faces.event.ActionEvent) - - - - @this clientIdOne clientIdTwo. - ]]> - execute - false - java.lang.String - - - @this clientIdOne clientIdTwo. - ]]> - render - false - java.lang.String - - - render attribute as a space separated list of client identifiers - suitable for passing directly to UIViewRoot.resetValues(). - The implementation must cause an ActionListener to be attached to the ActionSource - component in which this tag is nested that calls UIViewRoot.resetValues() passing the value - of the render attribute as the argument. - ]]> - resetValues - false - java.lang.Boolean - - - - The name of the JavaScript function that will handle UI events. - - onevent - false - java.lang.String - - - - The name of the JavaScript function that will handle errors. - - onerror - false - java.lang.String - - - - Flag indicating that, if this component is activated by the user, notifications should be delivered to - interested listeners and actions immediately (that is, during Apply Request Values phase) rather than - waiting until Invoke Application phase. - - immediate - false - java.lang.Boolean - - - true. - ]]> - rendered - false - java.lang.Boolean - - - - The ValueExpression linking this component to a property in a backing bean. - - binding - false - jakarta.faces.component.UIComponent - -
          - - - <p>Renders an HTML "table" element compliant with the HTML 401 - specification. Render the "caption" facet, if present, inside a - "caption" element immediately below the "table" element. If the - "captionClass" attribute is specified, render its value as the - value of the "class" attribute on the "caption" element. If the - "captionStyle" attribute is specified, render its value as the - value of the "style" attribute on the "caption" element.</p> - <p>Please consult the javadoc for <code>UIData</code> - to - supplement this specification. If the "styleClass" attribute is - specified, render its value as the value of the "class" attribute - on the "table" element. Any pass-through attributes are also - rendered on the "table" element. </p> - <p>Column Groups</p> - <ul> - <p>If the <code>UIData</code> component has a - "colgroups" facet, - render its contents. Consistent with the rules of facets in - general, this facet must have only one child. In general, this - will be a <code>panel group</code> component that will - contain - <code>colgroup</code> and <code>col</code> - elements per the HTML - Table specification. Use of column grouping can improve - accessibility. This facet must be rendered before the table - header and footer.</p> - </ul> - <p>Rendering the header</p> - <ul> - <p>If the <code>UIData</code> component has a - "header" facet, or - any of the child <code>UIColumn</code> components has a - "header" - facet, render a "thead" element. If the <code>UIData</code> - component has a "header" facet, encode its contents inside of "tr" - and "th" elements, respectively. Output the value of the - "headerClass" attribute of the <code>UIData</code> - component, if - present, as the value of the "class" attribute on the "th". - Output the number of child <code>UIColumn</code> - components of the - <code>UIData</code> component as the value of the - "colspan" - attribute on the "th". Output "colgroup" as the value of the - "scope" attribute on the "th" element. </p> - <p>If any of the child <code>UIColumn</code> - components has a - "header" facet render a "tr" element. For each - <code>UIColumn</code> that actually has a "header" - facet, render - it inside of a "th" element. Columns that don't have a "header" - facet cause an empty "th" element to be rendered. Output the - value of the "headerClass" attribute of the <code>UIColumn</code> - component, if present, as the value of the "class" attribute on - the "th". If the "headerClass" attribute of the <code>UIColumn</code> - component is not present, output the value of the "headerClass" - attribute of the <code>UIData</code> component, if - present, as - the value of the "class" attribute on the "th". Output "col" as - the value of the "scope" attribute on the "th" element. - </p> - <p>Close out the "thead" element.</p> - </ul> - <p>Rendering the footer</p> - <ul> - <p>Follow the same process as for the header, except replace - "header" with "footer", "th" with "td", "thead" with "tfoot", and - "headerClass" with "footerClass". Do not render any "scope" - attribute for the footer.</p> - </ul> - <p>Rendering the table body</p> - <ul> - <p>Look at the value of the "bodyrows" attribute. If present, - this must be a comma separated list of integers. Each entry in - this list is the row index of the row before which a "tbody" - element should be rendered.</p> - <p>If there was no "bodyrows" attribute, or it was empty, - render a - "tbody" element. Keep track of the result of the "rows" property - on the <code>UIData</code> component. Keep track of the - number of - rows we have rendered so far. Iterate through the rows. Set the - "rowIndex" property of the <code>UIData</code> component - to be - correct as we iterate through the rows. Stop rendering children - and close out the "tbody" element if the "rowAvailable" property - of the <code>UIData</code> returned false. If the - current row - index is contained in the "bodyrows" attribute, check if a "tbody" - start element was rendered that needs to be closed, and if so, - close the "tbody" element. Then render a "tbody" element start. - Otherwise, do not render a "tbody" element.</p> - <p>Output a "tr" element. Output the value of the "rowClasses" - per the attribute description below. For each - <code>UIColumn</code> child, if the column component has - a - "rowHeader" attribute with a value of "true", output a "th" - element with a "scope" attribute with the value of "row". - Otherwise, if the column component has no "rowHeader" attribute, - or its value is false, output a "td" element. In either case - attach the value of the "columnClasses" attribute of the - <code>UIData</code> component per the attribute - description below. - Recursively encode each child of each <code>UIColumn</code> - child. - Close out the "td" or "th" element. When done with the row, close - out the "tr" element. When done with all the rows, close out the - "tbody" element.</p> - </ul> - <p>When done rendering all the rows, set the "rowIndex" - property of - the <code>UIData</code> to -1, and close out the "table" - element.</p> - - dataTable - - jakarta.faces.HtmlDataTable - jakarta.faces.Table - - - - Zero-relative row number of the first row to be displayed. If - this - property is set to zero, rendering will begin with the first row - of - the underlying data. - - first - false - int - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - The number of rows to display, starting with the one identified - by the - "first" property. If this value is set to zero, all available - rows in - the underlying data model will be displayed. - - rows - false - int - - - - The current value of this component. - - value - false - java.lang.Object - - - - Name of a request-scope attribute under which the model data for - the - row selected by the current value of the "rowIndex" property - (i.e. - also the current value of the "rowData" property) will be - exposed. - - var - false - - - - Name or code of the background color for this table. - - bgcolor - false - java.lang.String - - - - Comma separated list of row indices for which a new - "tbody" element should be started (and any - previously opened one should be ended). - - bodyrows - false - java.lang.String - - - - Width (in pixels) of the border to be drawn - around this table. - - border - false - int - - - - Space-separated list of CSS style class(es) that will be - applied to any caption generated for this table. - - captionClass - false - java.lang.String - - - - CSS style(s) to be applied when this caption is rendered. - - captionStyle - false - java.lang.String - - - - Definition of how much space the user agent should - leave between the border of each cell and its contents. - - cellpadding - false - java.lang.String - - - - Definition of how much space the user agent should - leave between the left side of the table and the - leftmost column, the top of the table and the top of - the top side of the topmost row, and so on for the - right and bottom of the table. It also specifies - the amount of space to leave between cells. - - cellspacing - false - java.lang.String - - - - Comma-delimited list of CSS style classes that will be applied - to the columns of this table. A space separated list of - classes may also be specified for any individual column. If - the number of elements in this list is less than the number of - actual column children of the UIData, no "class" - attribute is output for each column greater than the number of - elements in the list. If the number of elements in the list - is greater than the number of actual column children of the - UIData, the elements at the posisiton in the list - after the last column are ignored. - - columnClasses - false - java.lang.String - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Space-separated list of CSS style class(es) that will be - applied to any footer generated for this table. - - footerClass - false - java.lang.String - - - - Code specifying which sides of the frame surrounding - this table will be visible. Valid values are: - none (no sides, default value); above (top side only); - below (bottom side only); hsides (top and bottom sides - only); vsides (right and left sides only); lhs (left - hand side only); rhs (right hand side only); box - (all four sides); and border (all four sides). - - frame - false - java.lang.String - - - - Space-separated list of CSS style class(es) that will be - applied to any header generated for this table. - - headerClass - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - Comma-delimited list of CSS style classes that will be applied - to the rows of this table. A space separated list of classes - may also be specified for any individual row. Thes styles are - applied, in turn, to each row in the table. For example, if - the list has two elements, the first style class in the list - is applied to the first row, the second to the second row, the - first to the third row, the second to the fourth row, etc. In - other words, we keep iterating through the list until we reach - the end, and then we start at the beginning again. - - rowClasses - false - java.lang.String - - - - Code specifying which rules will appear between cells - within this table. Valid values are: none (no rules, - default value); groups (between row groups); rows - (between rows only); cols (between columns only); and - all (between all rows and columns). - - rules - false - java.lang.String - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Summary of this table's purpose and structure, for - user agents rendering to non-visual media such as - speech and Braille. - - summary - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - Width of the entire table, for visual user agents. - - width - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

          - -

          It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

          ]]> -
          - role - false - java.lang.String -
          -
          - - - <span class="changed_modified_2_0"> - Renders</span> an HTML "form" element. - <p>Decode Behavior</p> - <ul> - <p>Obtain the <code>Map</code> from the - "requestParameterMap" - property of the <code>ExternalContext</code>. If the map - contains - an entry for the "clientId" of this <code>UIForm</code> - component, - call <code>setSubmitted(true)</code> on the form, - otherwise call - <code>setSubmitted(false)</code> on the form.</p> - </ul> - <p>Encode Behavior</p> - <ul> - <p>The value of the "method" attribute must be "post". The - value - of the "action" attribute must be the result of passing the view - identifier of the current view to the <code>getActionURL()</code> - method of the <code>ViewHandler</code> for this - application, then - passing that String to the <code>encodeActionURL()</code> - method - on the <code>ExternalContext</code>. The value of the - acceptcharset - attribute must be rendered as the value of "accept-charset". - If the "styleClass" attribute is specified, render its value as the - value of the "class" attribute. Render a "name" - attribute with a value the same as the "id" attribute as described - in "<a - href="../../../renderkitdocs/HTML_BASIC/renderkit-summary.html#general_encoding">General - Notes on - Encoding</a>" regarding the "id" attribute for UIInput - components. <p class="changed_added_2_0">Obtain the <code>UIViewRoot - view identifier</code> and - use it to obtain an <code>action URL</code> by calling - <code>ViewHandler.getActionURL</code>. - Use the <code>action URL</code> to obtain an <code>encoded - action URL</code> by calling - <code>ExternalContext.encodeActionURL</code>. Obtain an - <code>encoded partial action URL</code> by calling - <code>ExternalContext.encodePartialActionURL</code> - using <code>action URL</code> as the argument. - Compare the result from <code>ExternalContext.encodePartialActionURL</code> - with the - value from <code>ExternalContext.encodeActionURL()</code>. - If they are different, - render a hidden field with the name <code>jakarta.faces.encodedURL</code> - and the value - of this hidden field as the value from <code>ExternalContext.encodePartialActionURL</code>.</p> - Call <code>ViewHandler.writeState()</code> - before the the close of the "form" element. Render all the - necessary hidden fields for all commandLink instances in the page - just before the close of the "form" element. - <div class="changed_modified_2_0"> - Just before rendering the closing <code>&lt;/form&gt;</code> - element tag, render - any resources that have been targeted for this form: - <ul> - <li>Obtain a <code>UIViewRoot</code> instance.</li> - <li>Obtain a <code>List</code> of component - resources targeted for - this form with a call to <code>UIViewRoot.getComponentResources()</code> - with the <code>String "form"</code> as the argument.</li> - <li>Iterate over the returned <code>List</code> of - <code>UIComponent</code> instances - and call <code>encodeAll</code> on each <code>UIComponent</code> - instance. - </ul> - </div> - </p> - </ul> - </div> - - form - - jakarta.faces.HtmlForm - jakarta.faces.Form - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating whether or not this form should prepend its id - to its descendent's id during the clientId generation process. - If this flag is not set, the default value is true. - - prependId - false - java.lang.Boolean - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - List of content types that a server processing this form - will handle correctly - - accept - false - java.lang.String - - - - List of character encodings for input data - that are accepted by the server processing - this form. - - acceptcharset - false - java.lang.String - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Content type used to submit the form to the server. If not - specified, the default value is - "application/x-www-form-urlencoded". - - enctype - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - Javascript code executed when this form is reset. - - onreset - false - java.lang.String - - - - Javascript code executed when this form is submitted. - - onsubmit - false - java.lang.String - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Name of a frame where the response - retrieved after this form submit is to - be displayed. - - target - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

          - -

          It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

          ]]> -
          - role - false - java.lang.String -
          -
          - - - <p><span - class="changed_modified_2_0">Renders</span> an HTML "img" - element. Render the clientId as the value of the "id" - attribute.</p> - <div class="changed_modified_2_0"> - <p>Handling the Value</p> - <ul> - <p>If the "name" attribute is present, execute algorithm <a - href="../../../renderkitdocs/HTML_BASIC/jakarta.faces.Outputjakarta.faces.resource.Script.html#ResourceCommonGetResource">Common - Algorithm for Obtaining A Resource to Render</a> to obtain a - <code>Resource</code> instance. Call - <code>Resource.getRequestPath()</code> and output the - result as the - value of the "src" attribute on the rendered markup.</p> - <p>Otherwise, if the "url" attribute is present, treat its - value as - if it was the value of the "value" attribute. Otherwise, if the - "value" attribute is present, render the value of the component as - the value of the "src" attribute, after passing it to the - <code>getResourceURL()</code> method of the <code>ViewHandler</code> - for this application, and passing the result through the - <code>encodeResourceURL()</code> method of the - <code>ExternalContext</code>.</p> - <p>When handling the "src" attribute, - the value must not be escaped. For example, <code>&</code> - must not - be turned into <code>&amp;amp;</code>. If the - "styleClass" - attribute is specified, render its value as the value of the "class" - attribute.</p> - </ul> - </div> - - graphicImage - - jakarta.faces.HtmlGraphicImage - jakarta.faces.Image - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - Context-relative URL to retrieve the resource associated with - this component. This is an alias for the "value" property. - - url - false - java.lang.String - - - - The current value of this component. - - value - false - java.lang.Object - - - - Alternate textual description of the - element rendered by this component. - - alt - false - java.lang.String - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Override for the height of this image. - - height - false - java.lang.String - - - - Flag indicating that this image is to be used as a server side - image map. Such an image must be enclosed within a hyperlink - ("a"). A value of false causes no attribute to be rendered, - while a value of true causes the attribute to be rendered as - ismap="ismap". - - ismap - false - java.lang.Boolean - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - <div class="changed_added_2_0"><p>The <em>libraryName</em> - for this resource.</p></div> - - library - false - java.lang.String - - - - URI to a long description of the image - represented by this element. - - longdesc - false - java.lang.String - - - - <div class="changed_added_2_0"><p>The <em>resourceName</em> - for this resource.</p></div> - - name - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - The name of a client side image map (an HTML "map" - element) for which this element provides the image. - - usemap - false - java.lang.String - - - - Override for the width of this image. - - width - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

          - -

          It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

          ]]> -
          - role - false - java.lang.String -
          -
          - - - <p>Renders an HTML "input" element of type - "hidden".</p> - <p>Decode Behavior</p> - <ul> - <p>See the decode description for the <a - href="jakarta.faces.Inputjakarta.faces.Text.html#encode">Input - Text</a> renderer.</p> - </ul> - <p>Encode Behavior</p> - <ul> - <p>Render the clientId of the component as the value of the - "name" attribute. Render the current value of the component as - the value of the "value" attribute.</p> - </ul> - - inputHidden - - jakarta.faces.HtmlInputHidden - jakarta.faces.Hidden - - - - Converter instance registered with this component. - - converter - false - jakarta.faces.convert.Converter - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the converter message, replacing any message - that comes from the converter. - - converterMessage - false - java.lang.String - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating that this component's value must be - converted and validated immediately (that is, during - Apply Request Values phase), rather than waiting - until Process Validations phase. - - immediate - false - java.lang.Boolean - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - Flag indicating that the user is required to provide a submitted - value for this input component. - - required - false - java.lang.Boolean - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validation message for the "required" - facility, if the "required" facility is used. - - requiredMessage - false - java.lang.String - - - - MethodExpression representing a validator method that will be - called - during Process Validations to perform correctness checks on the - value of this component. The expression must evaluate to a - public - method that takes FacesContext, UIComponent, and Object - parameters, - with a return type of void. - - validator - false - void validate(jakarta.faces.context.FacesContext, - jakarta.faces.component.UIComponent, java.lang.Object) - - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validator message, replacing any - message that comes from the validator. - - validatorMessage - false - java.lang.String - - - - The current value of this component. - - value - false - java.lang.Object - - - - <p> - MethodExpression representing a value change listener method - that will be notified when a new value has been set for this - input component. The expression must evaluate to a public - method that takes a <code>ValueChangeEvent</code> - parameter, - with a return type of void, <span class="changed_added_2_0">or - to a public method that takes no arguments with a return type - of void. In the latter case, the method has no way of easily - knowing what the new value is, but this can be useful in cases - where a notification is needed that "this value - changed".</span> - </p> - - valueChangeListener - false - void - valueChange(jakarta.faces.event.ValueChangeEvent) - - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - - <p>Renders an HTML "input" element of "type" "password".</p> - <p>Decode Behavior</p> - <ul> - <p>See the decode description for the <a - href="jakarta.faces.Inputjakarta.faces.Text.html#encode">Input - Text</a> renderer.</p> - </ul> - <p>Encode Behavior</p> - <ul> - <p> - Render the clientId of the component as the value of the "name" - attribute. Render the current value of the component as the value - of the "value" attribute, if and only if the "redisplay" component - attribute is the string "true". If the "styleClass" attribute is - specified, render its value as the value of the "class" - attribute.</p> - </ul> - - inputSecret - - jakarta.faces.HtmlInputSecret - jakarta.faces.Secret - - - - Converter instance registered with this component. - - converter - false - jakarta.faces.convert.Converter - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the converter message, replacing any message - that comes from the converter. - - converterMessage - false - java.lang.String - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating that this component's value must be - converted and validated immediately (that is, during - Apply Request Values phase), rather than waiting - until Process Validations phase. - - immediate - false - java.lang.Boolean - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - Flag indicating that the user is required to provide a submitted - value for this input component. - - required - false - java.lang.Boolean - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validation message for the "required" - facility, if the "required" facility is used. - - requiredMessage - false - java.lang.String - - - - MethodExpression representing a validator method that will be - called - during Process Validations to perform correctness checks on the - value of this component. The expression must evaluate to a - public - method that takes FacesContext, UIComponent, and Object - parameters, - with a return type of void. - - validator - false - void validate(jakarta.faces.context.FacesContext, - jakarta.faces.component.UIComponent, java.lang.Object) - - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validator message, replacing any - message that comes from the validator. - - validatorMessage - false - java.lang.String - - - - The current value of this component. - - value - false - java.lang.Object - - - - <p> - MethodExpression representing a value change listener method - that will be notified when a new value has been set for this - input component. The expression must evaluate to a public - method that takes a <code>ValueChangeEvent</code> - parameter, - with a return type of void, <span class="changed_added_2_0">or - to a public method that takes no arguments with a return type - of void. In the latter case, the method has no way of easily - knowing what the new value is, but this can be useful in cases - where a notification is needed that "this value - changed".</span> - </p> - - valueChangeListener - false - void - valueChange(jakarta.faces.event.ValueChangeEvent) - - - - - Access key that, when pressed, transfers focus - to this element. - - accesskey - false - java.lang.String - - - - If the value of this attribute is "off", render "off" as the - value - of the attribute. This indicates that the browser should - disable its autocomplete feature for this component. This is - useful for components that perform autocompletion and do not - want the browser interfering. If this attribute is not set or - the value - is "on", render nothing. - - autocomplete - false - java.lang.String - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - disabled - false - java.lang.Boolean - - - - A localized user presentable name for this component. - - label - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - The maximum number of characters that may - be entered in this field. - - maxlength - false - int - - - - Javascript code executed when this element loses focus. - - onblur - false - java.lang.String - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - onchange - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when this element receives focus. - - onfocus - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - Javascript code executed when text within this - element is selected by the user. - - onselect - false - java.lang.String - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - readonly - false - java.lang.Boolean - - - - Flag indicating that any existing value - in this field should be rendered when the - form is created. Because this is a potential - security risk, password values are not - displayed by default. - - redisplay - false - java.lang.Boolean - - - - The number of characters used to determine - the width of this field. - - size - false - int - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - tabindex - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

          - -

          It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

          ]]> -
          - role - false - java.lang.String -
          -
          - - - <p>Renders an HTML "input" - element of "type" "text".</p> - <p><a name="decode">Decode Behavior</a></p> - <ul> - <p>Obtain the <code>Map</code> from the - "requestParameterMap" - property of the <code>ExternalContext</code>. If the - <code>Map</code> contains an entry for the "clientId" of - the - component, pass the value of the entry to the - <code>setSubmittedValue()</code> method of the - component, which - must be an instance of <code>EditableValueHolder</code>.</p> - </ul> - <p>Encode Behavior</p> - <ul> - <p> Render the clientId of the component as - the value of the "name" attribute. Render the current value of - the component as the value of the "value" attribute. If the - "styleClass" attribute is specified, render its value as the value - of the "class" attribute. - </p> - </ul> - - inputText - - jakarta.faces.HtmlInputText - jakarta.faces.Text - - - - Converter instance registered with this component. - - converter - false - jakarta.faces.convert.Converter - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the converter message, replacing any message - that comes from the converter. - - converterMessage - false - java.lang.String - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating that this component's value must be - converted and validated immediately (that is, during - Apply Request Values phase), rather than waiting - until Process Validations phase. - - immediate - false - java.lang.Boolean - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - Flag indicating that the user is required to provide a submitted - value for this input component. - - required - false - java.lang.Boolean - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validation message for the "required" - facility, if the "required" facility is used. - - requiredMessage - false - java.lang.String - - - - MethodExpression representing a validator method that will be - called - during Process Validations to perform correctness checks on the - value of this component. The expression must evaluate to a - public - method that takes FacesContext, UIComponent, and Object - parameters, - with a return type of void. - - validator - false - void validate(jakarta.faces.context.FacesContext, - jakarta.faces.component.UIComponent, java.lang.Object) - - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validator message, replacing any - message that comes from the validator. - - validatorMessage - false - java.lang.String - - - - - Controls the data type and associated control of the element. - Default value is text. - If a value is specified for which already a more specific component exist, such as - hidden, password, checkbox, radio, file, submit, image, reset and button, - and the ProjectStage is set to Development, then the renderer must add a warning message stating that the more specific component should be preferred. - ]]> - - type - false - java.lang.String - - - - The current value of this component. - - value - false - java.lang.Object - - - - <p> - MethodExpression representing a value change listener method - that will be notified when a new value has been set for this - input component. The expression must evaluate to a public - method that takes a <code>ValueChangeEvent</code> - parameter, - with a return type of void, <span class="changed_added_2_0">or - to a public method that takes no arguments with a return type - of void. In the latter case, the method has no way of easily - knowing what the new value is, but this can be useful in cases - where a notification is needed that "this value - changed".</span> - </p> - - valueChangeListener - false - void - valueChange(jakarta.faces.event.ValueChangeEvent) - - - - - Access key that, when pressed, transfers focus - to this element. - - accesskey - false - java.lang.String - - - - Alternate textual description of the - element rendered by this component. - - alt - false - java.lang.String - - - - If the value of this attribute is "off", render "off" as the - value - of the attribute. This indicates that the browser should - disable its autocomplete feature for this component. This is - useful for components that perform autocompletion and do not - want the browser interfering. If this attribute is not set or - the value - is "on", render nothing. - - autocomplete - false - java.lang.String - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - disabled - false - java.lang.Boolean - - - - A localized user presentable name for this component. - - label - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - The maximum number of characters that may - be entered in this field. - - maxlength - false - int - - - - Javascript code executed when this element loses focus. - - onblur - false - java.lang.String - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - onchange - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when this element receives focus. - - onfocus - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - Javascript code executed when text within this - element is selected by the user. - - onselect - false - java.lang.String - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - readonly - false - java.lang.Boolean - - - - The number of characters used to determine - the width of this field. - - size - false - int - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - tabindex - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

          - -

          It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

          ]]> -
          - role - false - java.lang.String -
          -
          - - - <p>Renders an HTML "textarea" element.</p> - <p>Decode Behavior</p> - <ul> - <p>See the encode description for the <a - href="jakarta.faces.Inputjakarta.faces.Text.html#encode">Input - Text</a> renderer.</p> - </ul> - <p>Encode Behavior</p> - <ul> - <p> Render the - clientId as the value of the "name" attribute. Render the current - valu eof the component inside the "textarea" - element.</p> </ul> - - inputTextarea - - jakarta.faces.HtmlInputTextarea - jakarta.faces.Textarea - - - - Converter instance registered with this component. - - converter - false - jakarta.faces.convert.Converter - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the converter message, replacing any message - that comes from the converter. - - converterMessage - false - java.lang.String - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating that this component's value must be - converted and validated immediately (that is, during - Apply Request Values phase), rather than waiting - until Process Validations phase. - - immediate - false - java.lang.Boolean - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - Flag indicating that the user is required to provide a submitted - value for this input component. - - required - false - java.lang.Boolean - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validation message for the "required" - facility, if the "required" facility is used. - - requiredMessage - false - java.lang.String - - - - MethodExpression representing a validator method that will be - called - during Process Validations to perform correctness checks on the - value of this component. The expression must evaluate to a - public - method that takes FacesContext, UIComponent, and Object - parameters, - with a return type of void. - - validator - false - void validate(jakarta.faces.context.FacesContext, - jakarta.faces.component.UIComponent, java.lang.Object) - - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validator message, replacing any - message that comes from the validator. - - validatorMessage - false - java.lang.String - - - - The current value of this component. - - value - false - java.lang.Object - - - - <p> - MethodExpression representing a value change listener method - that will be notified when a new value has been set for this - input component. The expression must evaluate to a public - method that takes a <code>ValueChangeEvent</code> - parameter, - with a return type of void, <span class="changed_added_2_0">or - to a public method that takes no arguments with a return type - of void. In the latter case, the method has no way of easily - knowing what the new value is, but this can be useful in cases - where a notification is needed that "this value - changed".</span> - </p> - - valueChangeListener - false - void - valueChange(jakarta.faces.event.ValueChangeEvent) - - - - - Access key that, when pressed, transfers focus - to this element. - - accesskey - false - java.lang.String - - - - The number of columns to be displayed. - - cols - false - int - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - disabled - false - java.lang.Boolean - - - - A localized user presentable name for this component. - - label - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - Javascript code executed when this element loses focus. - - onblur - false - java.lang.String - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - onchange - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when this element receives focus. - - onfocus - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - Javascript code executed when text within this - element is selected by the user. - - onselect - false - java.lang.String - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - readonly - false - java.lang.Boolean - - - - The number of rows to be displayed. - - rows - false - int - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - tabindex - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

          - -

          It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

          ]]> -
          - role - false - java.lang.String -
          -
          - - - <p>Render a single message for a specific component.</p> - <p>Set-up for Rendering</p> - <ul> - <p>Obtain the "summary" and "detail" properties from - <code>UIMessage</code> component. If not present, keep - the - empty string as the value, respectively. Obtain the first - <code>FacesMessage</code> to render from the component, - using - the "for" property of the <code>UIMessage</code>. This - will be - the only message we render. Obtain the severity style for this - message. If the severity of the message is - <code>FacesMessage.SEVERITY_INFO</code>, the severity - style - comes from the value of the "infoStyle" attribute. If the - severity of the message is - <code>FacesMessage.SEVERITY_WARN</code>, the severity - style - comes from the value of the "warnStyle" attribute, and so on for - each of the severities, <code>INFO, WARN, ERROR</code> - and - <code>FATAL</code>. The same rules apply for obtaining - the - severity style class, but instead of "infoStyle, warnStyle", etc - use "infoClass, warnClass", etc. Obtain the "style", - "styleClass" and "layout" attributes from the - <code>UIMessage</code> component. If we have a "style" - attribute and a severity style attribute, use the severity style - attribute as the value of the "style" attribute. If we have no - "style" attribute, but do have a severity style, use the - severity style as the value of the "style" attribute. The same - precedence rules apply for the style class. Obtain the value of - the <code>dir</code> and <code>lang</code> - attributes.</p> - </ul> - <p>Rendering</p> - <ul> - <p>For the message renderer, we only render one row, for the - first - message. For the messages renderer, we render as many rows as we - have messages. If any of the "dir", "lang", "style" or - "styleClass" attributes has a non-null value (as determined - above), render a "span" element, outputting the value of the - "style" attribute as the the value of the "style" attribute, and - outputting the value of the "styleClass" attribute as the value of - the "class" attribute on the "span" element. Output the "dir" and - "lang" attributes as well, if they are present. If the - <code>UIMessage</code> has a "tooltip" attribute with - the value of - "true", and the <code>UIMessage</code> has "showSummary" - and - "showDetail" properties with the value "true", if we haven't - already written out the "span", output the "summary" as the value - of the "title" attribute on the "span". If we haven't already - written out a "title" attribute, and "showSummary" is true, output - the summary. If "showDetail" is true, output the detail. Close - out the span if necessary.</p> - </ul> - - message - - jakarta.faces.HtmlMessage - jakarta.faces.Message - - - - Client identifier of the component for which to display - messages. - - for - true - java.lang.String - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - Flag indicating whether the detail portion of displayed messages - should be included. Default value is "true". - - showDetail - false - java.lang.Boolean - - - - Flag indicating whether the summary portion of displayed - messages - should be included. Default value is "false". - - showSummary - false - java.lang.Boolean - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - CSS style class to apply to any message - with a severity class of "ERROR". - - errorClass - false - java.lang.String - - - - CSS style(s) to apply to any message - with a severity class of "ERROR". - - errorStyle - false - java.lang.String - - - - CSS style class to apply to any message - with a severity class of "FATAL". - - fatalClass - false - java.lang.String - - - - CSS style(s) to apply to any message - with a severity class of "FATAL". - - fatalStyle - false - java.lang.String - - - - CSS style class to apply to any message - with a severity class of "INFO". - - infoClass - false - java.lang.String - - - - CSS style(s) to apply to any message - with a severity class of "INFO". - - infoStyle - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - Flag indicating whether the detail portion of the - message should be displayed as a tooltip. - - tooltip - false - java.lang.Boolean - - - - CSS style class to apply to any message - with a severity class of "WARN". - - warnClass - false - java.lang.String - - - - CSS style(s) to apply to any message - with a severity class of "WARN". - - warnStyle - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

          - -

          It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

          ]]> -
          - role - false - java.lang.String -
          -
          - - - <p><span class="changed_modified_2_0 changed_modified_2_3">The</span> - same as for the - Message renderer, but output all the messages. <span - class="changed_added_2_0">If an "id" attribute has been - specified, - it must be rendered on the outermost markup corresponding to this - component.</span> If the value of the "layout" attribute is - "table", render nested "table", "tr", and "td" elements, in that - order. If the value of the "layout" attribute is "list", or the - "layout" attribute is not specified, render nested "ul", "li" - elements, in that order. Output the value of the "style" attribute - as the value of the "style" attribute, output the value of the - "styleClass" attribute as the value of the "class" attribute, and - output the dir and lang attributes. Output these values on the - "table" element or the "ul" element. Output the values of the - "errorStyle", "fatalStyle", "infoStyle", "warnStyle" attributes as - the value of the "style" attribute on either the "tr" element or - the "li" element. Output the values of the "errorClass", - "fatalClass", "infoClass", "warnClass" attributes as the value of - the "class" attribute on either the "tr" element or the "li" - element. The component is a <code>UIMessages</code>, and - there is - no "for" attribute. Therefore, use either <code>null</code> - to - obtain the messages from the <code>FacesContext</code> - or the empty - string if the components "globalOnly" property is - <code>true</code>. If the layout was "table" close out - the table - elements, otherwise, close out the list elements.</p> - <p> - If an h:form does not contain a h:messages tag and the ProjectStage - is set to Development the runtime will automatically add h:messages - for debugging purposes. - </p> - - messages - - jakarta.faces.HtmlMessages - jakarta.faces.Messages - - - - Client identifier of the component for which to display - messages. This - attribute is mutually exclusive with globalOnly and take - precedence - if used. - - for - false - java.lang.String - - - - Flag indicating that only global messages (that is, messages not - associated with any client identifier) are to be displayed. - Default value is "false". - - globalOnly - false - java.lang.Boolean - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - Flag indicating whether the detail portion of displayed messages - should be included. Default value is "false". - - showDetail - false - java.lang.Boolean - - - - Flag indicating whether the summary portion of displayed - messages - should be included. Default value is "true". - - showSummary - false - java.lang.Boolean - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - CSS style class to apply to any message - with a severity class of "ERROR". - - errorClass - false - java.lang.String - - - - CSS style(s) to apply to any message - with a severity class of "ERROR". - - errorStyle - false - java.lang.String - - - - CSS style class to apply to any message - with a severity class of "FATAL". - - fatalClass - false - java.lang.String - - - - CSS style(s) to apply to any message - with a severity class of "FATAL". - - fatalStyle - false - java.lang.String - - - - CSS style class to apply to any message - with a severity class of "INFO". - - infoClass - false - java.lang.String - - - - CSS style(s) to apply to any message - with a severity class of "INFO". - - infoStyle - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - The type of layout markup to use when rendering - error messages. Valid values are "table" (an HTML - table) and "list" (an HTML list). If not specified, - the default value is "list". - - layout - false - java.lang.String - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - Flag indicating whether the detail portion of the - message should be displayed as a tooltip. - - tooltip - false - java.lang.Boolean - - - - CSS style class to apply to any message - with a severity class of "WARN". - - warnClass - false - java.lang.String - - - - CSS style(s) to apply to any message - with a severity class of "WARN". - - warnStyle - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - - <p>Render parameterized text. Obtain the - <code>style</code>, <code>styleClass</code>, - <code>dir</code>, and - <code>lang</code> attributees from this component. If - any are - present, render a "span" element. Output the - <code>styleClass</code> attribute (if present) as the - value of the - <code>class</code> attribute. Output the <code>style</code> - attribute as the value of the <code>style</code> - attribute. - Output the <code>dir</code> and <code>lang</code> - attributes as - pass through attributes. Accrue a list of the values of all child - <code>UIParameter</code> components of this component. - If there - are one or more accumulated parameter values, convert the list of - parameter values to an <code>Object</code> array, call - <code>MessageFormat.format()</code>, passing the - <code>value</code> of this component as the first - argument, and - the array of parameter values as the second argument, and render - the result. Otherwise, render the <code>value</code> of - this - component unmodified.</p> - - outputFormat - - jakarta.faces.HtmlOutputFormat - jakarta.faces.Format - - - - Converter instance registered with this component. - - converter - false - jakarta.faces.convert.Converter - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - The current value of this component. - - value - false - java.lang.Object - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Flag indicating that characters that are sensitive - in HTML and XML markup must be escaped. This flag - is set to "true" by default. - - escape - false - java.lang.Boolean - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

          - -

          It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

          ]]> -
          - role - false - java.lang.String -
          -
          - - - Renders an HTML "label" element. Render the current value - of the component as label text if it is specified. If a "for" - attribute is - specified, find the component specified by the value of the "for" - attribute, and render its client id as the value of the "for" - attribute. - If "styleClass" attribute is specified, render its value as the - value - of the "class" attribute. - - outputLabel - - jakarta.faces.HtmlOutputLabel - jakarta.faces.Label - - - - Converter instance registered with this component. - - converter - false - jakarta.faces.convert.Converter - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - The current value of this component. - - value - false - java.lang.Object - - - - Access key that, when pressed, transfers focus - to this element. - - accesskey - false - java.lang.String - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Flag indicating that characters that are sensitive - in HTML and XML markup must be escaped. If omitted, this - flag is assumed to be "true". - - escape - false - java.lang.Boolean - - - - Client identifier of the component for which this element - is a label. - - for - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - Javascript code executed when this element loses focus. - - onblur - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when this element receives focus. - - onfocus - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - tabindex - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

          - -

          It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

          ]]> -
          - role - false - java.lang.String -
          -
          - - - Render an HTML "a" anchor element. The value of the - component is rendered as the value of the "href" attribute. Any - child UIParameter components are appended to the String to be - output as the value of the "href" attribute as query parameters - before rendering. The entire "href" string must be passed through - a call to the <code>encodeResourceURL()</code> method of - the - <code>ExternalContext</code>. The name of the - UIParameter goes on - the left hand side, and the value of the UIParameter on the right - hand side. The name and the value must be URLEncoded. Each - UIParameter instance is separeted by an ampersand, as dictated in - the URL spec. If the "styleClass" attribute is specified, render - its value as the value of the "class" attribute. If the "id" - attribute - is specified, follow the same steps as mentioned in the - "<a - href="../../../renderkitdocs/HTML_BASIC/renderkit-summary.html#general_encoding">General - Notes on Encoding</a>" regarding the "id" attribute for - UIInput components. - If the "disabled" attribute is specified, do not render the HTML "a" - anchor element or the "href" element. Instead, render a "span" - element. - If the "styleClass" attribute is specified, render its value as the - value - of the "class" attribute on the "span". Render any pass-through - attributes - on the "span". - - outputLink - - jakarta.faces.HtmlOutputLink - jakarta.faces.Link - - - - Converter instance registered with this component. - - converter - false - jakarta.faces.convert.Converter - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - The current value of this component. - - value - false - java.lang.Object - - - - Access key that, when pressed, transfers focus - to this element. - - accesskey - false - java.lang.String - - - - The character encoding of the resource designated - by this hyperlink. - - charset - false - java.lang.String - - - - The position and shape of the hot spot on the screen - (for use in client-side image maps). - - coords - false - java.lang.String - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Flag indicating that this element must never - receive focus or be included in a subsequent - submit. - - disabled - false - java.lang.Boolean - - - - The language code of the resource designated - by this hyperlink. - - hreflang - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - Javascript code executed when this element loses focus. - - onblur - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when this element receives focus. - - onfocus - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - The relationship from the current document - to the anchor specified by this hyperlink. - The value of this attribute is a space-separated - list of link types. - - rel - false - java.lang.String - - - - A reverse link from the anchor specified - by this hyperlink to the current document. - The value of this attribute is a space-separated - list of link types. - - rev - false - java.lang.String - - - - The shape of the hot spot on the screen - (for use in client-side image maps). Valid - values are: default (entire region); rect - (rectangular region); circle (circular region); - and poly (polygonal region). - - shape - false - java.lang.String - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - tabindex - false - java.lang.String - - - - Name of a frame where the resource - retrieved via this hyperlink is to - be displayed. - - target - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - The content type of the resource designated - by this hyperlink. - - type - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

          - -

          It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

          ]]> -
          - role - false - java.lang.String -
          -
          - - - - -

          Render the markup for a <link> element that - renders the style Resource specified by the optional - name and library attributes.

          - -

          Decode Behavior

          - -
            - -

            No action is required during decode for this renderer.

            - -
          - -

          Encode Behavior

          - -
            - -

            Use the algorithm Common Encode Behavior for - encodeBegin(), encodeChildren() and - getRendersChildren().

            - -

            For encodeEnd(), use the algorithm Common - Algorithm for Obtaining A Resource to Render to obtain a - reference to the Resource to be encoded.

            - -

            Output a <link> element. Use the result from - calling resource.getRequestPath() as the value of the - "href" attribute. Use the result from calling - resource.getContentType() as the value of the "type" - attribute, unless the value equals text/css and the current doctype is a HTML5 doctype.. - Use the literal string "stylesheet" as the value of the "rel" - attribute, and the literal string "screen" as the value of the "media" - attribute.

            - -

            The implementation of this renderer must have a @ListenerFor - annotation attached to it, at the class level, declaring PostAddToViewEvent.class - as the value of the systemEventClass attribute. The presence of - this annotation on a renderer implies the renderer implements ComponentSystemEventListener, - which this renderer must do. The implementation of - processEvent() must extract the UIComponent - from the argument event pass it to UIViewRoot.addComponentResource(), specifying - the literal string "head" as the last argument.

            - -

            The stylsheet renderer must ensure that any stylesheets are included in the <head> of the document. -

            - - ]]> - - outputStylesheet - - jakarta.faces.Output - jakarta.faces.resource.Stylesheet - - - - - - - converter - - - false - - - jakarta.faces.convert.Converter - - - - - - - - id - - - false - - - java.lang.String - - - - - - - - rendered - - - false - - - boolean - - - - - - - - value - - - false - - - java.lang.Object - - - - -

            The libraryName for this resource.

            ]]> -
            - - library - - - false - - - java.lang.String - -
            - - -

            The resourceName for this resource.

            -
            -

            - This attribute is required if the stylesheet is NOT inline. -

            -
            ]]> -
            - - name - - - false - - - java.lang.String - -
            - - - The ValueExpression linking this component to a property in a - backing bean - - - binding - - - false - - - jakarta.faces.component.UIComponent - - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]> -
            - role - false - java.lang.String -
            - - - - If the "styleClass", "style", "dir" or "lang" - attributes are present, render a "span" element. If the - "styleClass" attribute is present, render its value as the value - of the "class" attribute. If the "style" attribute is present, - pass it thru. If the "escape" attribute is not present, or it is - present and its value is "true" all angle brackets should be - converted to the ampersand xx semicolon syntax when rendering the - value of the "value" attribute as the value of the component. If - the "escape" attribute is present and is "false" the value of the - component should be rendered as text without escaping. - - outputText - - jakarta.faces.HtmlOutputText - jakarta.faces.Text - - - - Converter instance registered with this component. - - converter - false - jakarta.faces.convert.Converter - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - The current value of this component. - - value - false - java.lang.Object - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Flag indicating that characters that are sensitive - in HTML and XML markup must be escaped. This flag - is set to "true" by default. - - escape - false - java.lang.Boolean - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]> -
            - role - false - java.lang.String -
            -
            - - - - -

            Render the markup for a <script> element that - renders the script Resource specified by the optional - name attribute and library attributes.

            - -

            The implementation of this renderer must have a @ListenerFor - annotation attached to it, at the class level, declaring PostAddToViewEvent.class - as the value of the systemEventClass attribute. The presence of - this annotation on a renderer implies the renderer implements ComponentSystemEventListener, - which this renderer must do. The implementation of - processEvent() must extract the UIComponent - from the argument event and look for the presence of the key - "target" in the component's attribute Map. If - and only if such a key is present, the implementation of - processEvent() must pass the component to UIViewRoot.addComponentResource().

            - -

            Decode Behavior

            - -
              - -

              No action is required during decode for this renderer.

              - -
            - -

            Encode Behavior

            - -
              - -

              Common Algorithm for Obtaining A Resource to Render

              - -
                - -

                This algorithm is used by all resource renderers to obtain - a Resource instance which is then rendered in a - specific way depending on what kind of renderer is doing the - encoding.

                - -
                  - -
                • Look in the component attribute Map for a - value under the key name.

                • - -
                • Look in the component attribute Map for a - value under the key library. This attribute is - optional, therefore, library may be - null.

                • - -
                • Create the resource by calling - Application.getResourceHandler.createResource(name, - library);.

                • - -

                  - -
                - -
              - -

              Common Encode Behavior

              - -
                - -

                This algorithm is used by all resource renderers to render the - resource.

                - -

                encodeBegin() must take no action.

                - -

                Because this renderer returns true from - getRendersChildren(), the encodeChildren() - method must take the following action.

                - -
                  - -
                • If there is no name attribute, and the - argument component has no children, and - ProjectStage is not - ProjectStage.Production, add a - FacesMessage for this component's clientId to the - FacesContext stating that if no name attribute is - present, and no body content is present either, then the user - should take action to correct this problem. In this case, - encodeChildren() must take no further - action.

                • - -
                • If there is no name attribute and the argument - component does have children, the renderer - must ensure that those children are encoded as usual.

                • - -
                • If there is a name attribute and the - argument component does have children, the - renderer must log a descriptive localized message stating that - the child content will be ignored. The resource referenced by - the name attribute will be rendered in - encodeEnd().

                • - -
                • If there is a name attribute and the - argument component does not have children, - encodeChildren() must take no action.

                • - -
                - -

                encodeEnd() must take specific action based on - the specific kind of resource being rendered.

                - -
              - -

              Use the algorithm Common Encode Behavior for - encodeBegin(), encodeChildren() and - getRendersChildren().

              - -

              For encodeEnd(), use the algorithm Common - Algorithm for Obtaining A Resource to Render above to - obtain a reference to the Resource to be - encoded.

              - -

              If this is NOT the first time this Resource has - been referenced on this request take no action and return.

              - -

              Render a script element. Use the result from calling - resource.getRequestPath() as the value of the "src" - attribue. Use the result from calling - resource.getContentType() as the value of the "type" - attribute, unless the value equals text/javascript and the current doctype is a HTML5 doctype.

              - -

              - - - -
            - - - - ]]> -
            - outputScript - - jakarta.faces.Output - jakarta.faces.resource.Script - - - - - - - converter - - - false - - - jakarta.faces.convert.Converter - - - - - - - - id - - - false - - - java.lang.String - - - - - - - - rendered - - - false - - - boolean - - - - - - - - value - - - false - - - java.lang.Object - - - - -

            The libraryName for this resource.

            ]]> -
            - - library - - - false - - - java.lang.String - -
            - - -

            The resourceName for this resource.

            -
            -

            - This attribute is required if the script is NOT inline. -

            -
            ]]> -
            - - name - - - false - - - java.lang.String - -
            - - -

            The target area for which this resource will be rendered. For example, target="head" would cause the resource to be rendered within the head element.

            ]]> -
            - - target - - - false - - - java.lang.String - -
            - - - The ValueExpression linking this component to a property in a - backing bean - - - binding - - - false - - - jakarta.faces.component.UIComponent - - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]> -
            - role - false - java.lang.String -
            -
            - - - - Renders an HTML "table" element, conforming to the - rules in the HTML 401 specification. Render the "caption" facet, - if present, inside a "caption" element immediately below the "table" - element. - If the "captionClass" attribute is specified, render its value as - the value - of the "class" attribute on the "caption" element. If the - "captionStyle" attribute - is specified, render its value as the value of the "style" attribute - on the "caption" element. If the "styleClass" attribute is - specified, render - its value as the value of the "class" attribute. Render the - pass-through - attributes in the table below. Render the "header" facet, if - present, inside of - "thead", "tr", and "th" elements, nested in that order. If the - "headerClass" attribute is specifed, render its value as the value - of the "class" attribute on the "th" element. Render "colgroup" - as the value of the "scope" attribute. Render the value of the - "columns" attribute as the value of the "colspan" attribute on the - "th" element. Render the "footer" facet if present, using similar - logic to the rendering of the "header", but replacing "thead" with - "tfoot", "th" with "td", and "headerClass" with "footerClass". - Render the children of the <code>UIPanel</code> - component inside - of a "tbody" element. Render the children based on the value of - the "columns" attribute, creating a new row each time a "columns" - worth of children have been rendered. For the start of each row, - render a "tr" element. Output the value of the "rowClasses" per - the attribute description below. For each child, output a "td" - element, attaching the value of the "columnClasses" attribute per - the attribute description below. Recursively encode each child. - Close out the "td" element. When done with the row, close out the - "tr" element. If a child has "rendered==false" it is not rendered, - and the column counter must not be incremented. - - panelGrid - - jakarta.faces.HtmlPanelGrid - jakarta.faces.Grid - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - Name or code of the background color for this table. - - bgcolor - false - java.lang.String - - - - Comma separated list of row indices for which a new - "tbody" element should be started (and any - previously opened one should be ended). - - bodyrows - false - java.lang.String - - - - Width (in pixels) of the border to be drawn - around this table. - - border - false - int - - - - Space-separated list of CSS style class(es) that will be - applied to any caption generated for this table. - - captionClass - false - java.lang.String - - - - CSS style(s) to be applied when this caption is rendered. - - captionStyle - false - java.lang.String - - - - Definition of how much space the user agent should - leave between the border of each cell and its contents. - - cellpadding - false - java.lang.String - - - - Definition of how much space the user agent should - leave between the left side of the table and the - leftmost column, the top of the table and the top of - the top side of the topmost row, and so on for the - right and bottom of the table. It also specifies - the amount of space to leave between cells. - - cellspacing - false - java.lang.String - - - - Comma-delimited list of CSS style classes that will be applied - to the columns of this table. A space separated list of - classes may also be specified for any individual column. If - the number of elements in this list is less than the number of - actual column children of the UIData, no "class" - attribute is output for each column greater than the number of - elements in the list. If the number of elements in the list - is greater than the number of actual column children of the - UIData, the elements at the posisiton in the list - after the last column are ignored. - - columnClasses - false - java.lang.String - - - - The number of columns to render before - starting a new row. - - columns - false - int - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Space-separated list of CSS style class(es) that will be - applied to any footer generated for this table. - - footerClass - false - java.lang.String - - - - Code specifying which sides of the frame surrounding - this table will be visible. Valid values are: - none (no sides, default value); above (top side only); - below (bottom side only); hsides (top and bottom sides - only); vsides (right and left sides only); lhs (left - hand side only); rhs (right hand side only); box - (all four sides); and border (all four sides). - - frame - false - java.lang.String - - - - Space-separated list of CSS style class(es) that will be - applied to any header generated for this table. - - headerClass - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - Comma-delimited list of CSS style classes that will be applied - to the rows of this table. A space separated list of classes - may also be specified for any individual row. Thes styles are - applied, in turn, to each row in the table. For example, if - the list has two elements, the first style class in the list - is applied to the first row, the second to the second row, the - first to the third row, the second to the fourth row, etc. In - other words, we keep iterating through the list until we reach - the end, and then we start at the beginning again. - - rowClasses - false - java.lang.String - - - - Code specifying which rules will appear between cells - within this table. Valid values are: none (no rules, - default value); groups (between row groups); rows - (between rows only); cols (between columns only); and - all (between all rows and columns). - - rules - false - java.lang.String - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Summary of this table's purpose and structure, for - user agents rendering to non-visual media such as - speech and Braille. - - summary - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - Width of the entire table, for visual user agents. - - width - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]> -
            - role - false - java.lang.String -
            -
            - - - Intended for use in situations when only one - UIComponent child can be nested, such as in the case of facets. - If the "style" or "styleClass" attributes are present, and the - "layout" - attribute is present with a value of "block", render a "div" - element, - outputting the value of the "style" attribute as the value of the - "style" attribute and the value of the "styleClass" attribute as the - value of the "class" attribute. Otherwise, if the "layout" attribute - is not present, or the "layout" attribute contains a value other - than - "block", render a "span" element, outputting the value of the - "style" attribute as the value of the "style" attribute, and the - value - of the "styleClass" attribute as the value of the "class" - attribute. - - panelGroup - - jakarta.faces.HtmlPanelGroup - jakarta.faces.Group - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - The type of layout markup to use when rendering this group. - If the value is "block" the renderer must produce an HTML - "div" element. Otherwise HTML "span" element must - be produced. - - layout - false - java.lang.String - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" property on generated markup. - - styleClass - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - - <p>Renders an HTML "input" element of type "checkbox".</p> - <p>Decode Behavior</p> - <ul> - <p>Obtain the <code>Map</code> from the - "requestParameterMap" - property of the <code>ExternalContext</code>. If there - is no - entry in the <code>Map</code> for the "clientId" of this - component, pass "false" to the <code>setSubmittedValue()</code> - method of the component, which must be an instance of - <code>EditableValueHolder</code>. If there is an entry, - and its - value is equal, ignoring case and without quotes, to any of the - Strings: "on", "yes" or "true" pass true to the - <code>setSubmittedValue()</code> method of the - component.</p> - </ul> - <p>Encode Behavior</p> - <ul> - <p> - Render the clientId of the component as the value of the "name" - attribute. If the current value of the component is "true", - output the "checked" attribute (must be rendered as - checked="checked"). - If the "styleClass" attribute is specified, render its value as the - value - of the "class" attribute.</p> </ul> - - selectBooleanCheckbox - - jakarta.faces.HtmlSelectBooleanCheckbox - - jakarta.faces.Checkbox - - - - Converter instance registered with this component. - - converter - false - jakarta.faces.convert.Converter - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the converter message, replacing any message - that comes from the converter. - - converterMessage - false - java.lang.String - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating that this component's value must be - converted and validated immediately (that is, during - Apply Request Values phase), rather than waiting - until Process Validations phase. - - immediate - false - java.lang.Boolean - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - Flag indicating that the user is required to provide a submitted - value for this input component. - - required - false - java.lang.Boolean - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validation message for the "required" - facility, if the "required" facility is used. - - requiredMessage - false - java.lang.String - - - - MethodExpression representing a validator method that will be - called - during Process Validations to perform correctness checks on the - value of this component. The expression must evaluate to a - public - method that takes FacesContext, UIComponent, and Object - parameters, - with a return type of void. - - validator - false - void validate(jakarta.faces.context.FacesContext, - jakarta.faces.component.UIComponent, java.lang.Object) - - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validator message, replacing any - message that comes from the validator. - - validatorMessage - false - java.lang.String - - - - The current value of this component. - - value - false - java.lang.Boolean - - - - <p> - MethodExpression representing a value change listener method - that will be notified when a new value has been set for this - input component. The expression must evaluate to a public - method that takes a <code>ValueChangeEvent</code> - parameter, - with a return type of void, <span class="changed_added_2_0">or - to a public method that takes no arguments with a return type - of void. In the latter case, the method has no way of easily - knowing what the new value is, but this can be useful in cases - where a notification is needed that "this value - changed".</span> - </p> - - valueChangeListener - false - void - valueChange(jakarta.faces.event.ValueChangeEvent) - - - - - Access key that, when pressed, transfers focus - to this element. - - accesskey - false - java.lang.String - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - disabled - false - java.lang.Boolean - - - - A localized user presentable name for this component. - - label - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - Javascript code executed when this element loses focus. - - onblur - false - java.lang.String - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - onchange - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when this element receives focus. - - onfocus - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - Javascript code executed when text within this - element is selected by the user. - - onselect - false - java.lang.String - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - readonly - false - java.lang.Boolean - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - tabindex - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]> -
            - role - false - java.lang.String -
            -
            - - - <p><span - class="changed_modified_2_0">Render</span> an HTML checkbox - list.</p> - <p><a name="decode">Decode Behavior</a></p> - <ul> - <p>See the <a - href="SelectManyListbox.html">"Decode - Behavior for UISelectMany Components"</a> section.</p> - </ul> - <p>Encode Behavior</p> - <ul> - <p><span class="changed_added_4_0">If the "layout" - attribute is specified, and its value is "list", render a "ul" - element as root element, otherwise</span> - render a "table" element. If the "styleClass" is specified, - render the value of the "styleClass" attribute as the value of the - "class" attribute on the <span class="changed_modified_4_0">root</span> element. If the "style", or - "border" attributes are specified, pass them thru <span - class="changed_added_2_0">and render their values as the "style" - and "border" attributes on the <span class="changed_modified_4_0">root element</span>, respectively.</span> - If - the "layout" attribute is specified, and its value is - "pageDirection", render the children elements vertically, - otherwise horizontally, in the <span class="changed_modified_4_0">root element</span>. If any of the children are - an instance of SelectItemGroup, render them as a nested <span class="changed_modified_4_0">root element</span>. - Each of the children are ultimately rendererd as follows. Render - an "input" element of "type" "checkbox" for each child component. - Render the "name" attribute on the "input" element with the value - of the <code>clientId</code> of the component. Render an - "id" - attribute on the "input" element. Each "id" value must be unique. - If the current SelectItem.isDisabled() returns true, render - "disabled" as the value of the "disabled" attribute. Close out - the "input" element. Render a "label" element. Render the "for" - attribute of the "label" element whose value is the corresponding - "input" element's "id" value. Render any "style" as the "class" - attribute on the "label" element. <span - class="changed_added_2_0">If the current checkbox would be - rendered as being checked, and there is a "selectedClass" - attribute, append a space, followed by the value of the - "selectedClass" attribute to any existing "class" attribute value - on the label element. Otherwise, render the value of the - "selectedClass" attribute as the value of the "class" attribute on - the label element. If the current checkbox would be rendered as - being not checked, and there is a "unselectedClass" attribute, - append a space, followed by the value of the "unselectedClass" - attribute to any existing "class" attribute value on the label - element. Otherwise, render the value of the "unselectedClass" - attribute as the value of the "class" attribute on the label - element.</span> Close out the starting "label" element and - render - the label value from SelectItem.getLabel(). Close out the "label" - element. As an exception to the general rules about how to handle - the "id" attribute, render it as an attribute on the outer "table" - element, the value of which is the <code>clientId</code> - of the - component per the rules at the beginning of this specification. - The value of the current SelectItem is rendered as the value of - the "value" attribute. Coerce the value of the currently rendered - child to the type of the parent UISelectMany value following the - Expression Language coercion rules, before comparing the values. - If the value of the enclosing UISelectMany matches the current - value, render "checked" as the value of the "checked" attribute. - See the <a - href="SelectManyListbox.html">"Rendering - the option elements" </a> specification for - <code>ListboxRenderer</code> for more detail on how to - render the - "option" elements in this renderer.</p> - </ul> - - selectManyCheckbox - - jakarta.faces.HtmlSelectManyCheckbox - jakarta.faces.Checkbox - - - - Converter instance registered with this component. - - converter - false - jakarta.faces.convert.Converter - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the converter message, replacing any message - that comes from the converter. - - converterMessage - false - java.lang.String - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating that this component's value must be - converted and validated immediately (that is, during - Apply Request Values phase), rather than waiting - until Process Validations phase. - - immediate - false - java.lang.Boolean - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - Flag indicating that the user is required to provide a submitted - value for this input component. - - required - false - java.lang.Boolean - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validation message for the "required" - facility, if the "required" facility is used. - - requiredMessage - false - java.lang.String - - - - MethodExpression representing a validator method that will be - called - during Process Validations to perform correctness checks on the - value of this component. The expression must evaluate to a - public - method that takes FacesContext, UIComponent, and Object - parameters, - with a return type of void. - - validator - false - void validate(jakarta.faces.context.FacesContext, - jakarta.faces.component.UIComponent, java.lang.Object) - - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validator message, replacing any - message that comes from the validator. - - validatorMessage - false - java.lang.String - - - - The current value of this component. - - value - false - java.lang.Object - - - - <p> - MethodExpression representing a value change listener method - that will be notified when a new value has been set for this - input component. The expression must evaluate to a public - method that takes a <code>ValueChangeEvent</code> - parameter, - with a return type of void, <span class="changed_added_2_0">or - to a public method that takes no arguments with a return type - of void. In the latter case, the method has no way of easily - knowing what the new value is, but this can be useful in cases - where a notification is needed that "this value - changed".</span> - </p> - - valueChangeListener - false - void - valueChange(jakarta.faces.event.ValueChangeEvent) - - - - - Access key that, when pressed, transfers focus - to this element. - - accesskey - false - java.lang.String - - - - Width (in pixels) of the border to be drawn - around the table containing the options list. - <p class="changed_added_4_0">This attribute is ignored when the "layout" attribute equals to "list".<span> - - border - false - int - - - - <p class="changed_modified_2_0"> Optional - attribute that is a literal string that is the fully qualified - class name of a concrete class that implements - <code>java.util.Collection</code>, or an EL - expression that - evaluates to either 1. such a String, or 2. the - <code>Class</code> object itself. </p> - - collectionType - false - java.lang.String - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - disabled - false - java.lang.Boolean - - - - CSS style class to apply to the rendered label - on disabled options. - - disabledClass - false - java.lang.String - - - - CSS style class to apply to the rendered label - on enabled options. - - enabledClass - false - java.lang.String - - - - <p class="changed_modified_2_0"> - Flag indicating that, if this component is activated by the - user, - The "no selection option", if any, must be hidden.</p> - - hideNoSelectionOption - false - java.lang.Boolean - - - - A localized user presentable name for this component. - - label - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - Orientation of the options list to be created. - Valid values are "pageDirection" (list is laid - out vertically), or "lineDirection" (list is - laid out horizontally). If not specified, the - default value is "lineDirection". - - layout - false - java.lang.String - - - - Javascript code executed when this element loses focus. - - onblur - false - java.lang.String - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - onchange - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when this element receives focus. - - onfocus - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - Javascript code executed when text within this - element is selected by the user. - - onselect - false - java.lang.String - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - readonly - false - java.lang.Boolean - - - - CSS style class to apply to the rendered label - on selected options. - - selectedClass - false - java.lang.String - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - tabindex - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - CSS style class to apply to the rendered label - on unselected options. - - unselectedClass - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]> -
            - role - false - java.lang.String -
            -
            - - - <p><span - class="changed_modified_2_0">Render</span> an HTML option - list.</p> - <p>Decode Behavior</p> - <p>This section documents the decode behavior for all - renderers - that handle <code>UISelectMany</code> or <code>UISelectOne</code> - components.</p> - <ul> - <p><a name="decodeMany">Decode Behavior for - <code>UISelectMany</code> components</a></p> - <ul> - <p>Obtain the <code>Map</code> from the - "requestParameterValuesMap" property of the - <code>ExternalContext</code>. If the <code>Map</code> - contains - an entry for the "clientId" of the component, pass the value of - the entry, cast to a <code>String []</code>, to the - <code>setSubmittedValue()</code> method of the - component, which - must be an <code>EditableValueHolder</code>. If the - <code>Map</code> does not contain an entry, create an - empty - <code>String</code> array and call - <code>setSubmittedValue()</code> with it.</p> - <p class="changed_modified_2_0">Please check the javadoc for - <a - href="../../javadocs/jakarta/faces/component/UISelectMany.html#getConvertedvalue">UISelectMany.getConvertedValue()</a> - for additional requirements for renderers that render this kind - of component.</p> - </ul> - <p><a name="decodeOne">Decode Behavior for - <code>UISelectOne</code> components</a></p> - <ul> - <p>Obtain the <code>Map</code> from the - "requestParameterMap" - property of the <code>ExternalContext</code>. If there - is a - <code>Map</code> entry for the "clientId" property of - the - component, pass it to the <code>setSubmittedValue()</code> - method - of the component. <span class="changed_added_2_0">If the - <code>Map</code> does not contain an entry, call - <code>setSubmittedValue()</code> passing an empty - <code>String</code> as the argument.</span> </p> - </ul> - <p>Encode Behavior</p> - <ul> - <p>Render an HTML "select" element. Render the clientId of - the component as the value of the "name" attribute. If the - "styleClass" - attribute is specified, render its value as the value of the "class" - attribute on the "select" element. If the component is a - <code>UISelectMany</code> instance, render "multiple" as - the value of the - "multiple" attribute. If the "size" attribute is specified, render - its - value as the value of the "size" attribute. Otherwise use the number - of - items as the value of the "size" attribute.</p> - </ul> - <p><a name="option">Rendering the "option" elements</a></p> - <ul> - <p>The only valid children of this component are - <code>UISelectItem</code> or <code>UISelectItems</code> - instances. Iterate over the children of this component, and accrue - a list of <code>jakarta.faces.model.SelectItem</code> - instances. - <span class="changed_added_2_0">If the current child is a - <code>SelectItem</code> whose <code>noSelctionProperty</code> - is - <code>true</code>, <b>and</b> the <code>UISelectOne</code> - or - <code>UISelectMany</code> parent of this option has one - or more - selected values that <b>are not</b> the "no selection" - <code>SelectItem</code>, <b>and</b> the - component has a - "hideNoSelectionLabel" attribute whose value is <code>true</code>, - then the current option, which is the "no selection" option, must - not be rendered.</span> If the current child is a - <code>UISelectItem</code> create a <code>SelectItem</code>instance - from its <code>itemValue, itemLabel</code>, <code - class="changed_added_2_0">itemEscaped</code>, and - <code>itemDescription</code> properties, add it to the - list. If - the current child is a <code>UISelectItems</code> - instance, call - its <code>getValue()</code> method. If the result is a - <code>SelectItem</code> bean, add it to the list. If the - result - is an array of <code>SelectItem</code> beans, add each - one to the - list. If the result is a <code>Collection</code> of - <code>SelectItem</code> beans, add each one to the list. - If the - result is a <code>Map</code>, create a <code>SelectItem</code> - bean for each entry in the <code>Map</code> using the - key as the - label, the value as the value, and <code>null</code> as - the - description.</p> - <p>Iterate over the list of <code>SelectItem</code> - beans. If the - current element is a <code>SelectItemGroup</code>, - render an - "optgroup" element with a "label" attribute, the value of which is - the "label" property from the current element, then call - <code>getSelectItems()</code> and render each element as - below. - If the current element is not a <code>SelectItemGroup</code>, - render an "option" element. Follow the conversion rules in the - spec to obtain a renderable <code>String</code> from the - "value" - property of the current element, render that as the value of the - "value" atribute. Now it is time to see if the current element is - the selected value. Call its <code>getSubmittedValue()</code> - method, casting the result to an <code>Object []</code>, - otherwise - the component must be a <code>UISelectOne</code> - instance, call - its <code>getSubmittedValue()</code> method and create - an - <code>Object []</code> around the result. Determine the - type of - the resultant array, if the resultant array is non-null, otherwise - the type is <code>String</code>. Coerce the current item - value to - this type following the Expression Language coercion rules. If - the resultant array is non-null, we look in the array for a value - that, when we pass the renderable value to its - <code>equals()</code> method, it returns <code>true</code>, - meaning the current element is selected. If the resultant array - is <code>null</code>, if the component is a - <code>UISelectMany</code>, call its <code>getValue()</code> - method. If the result is a <code>List</code> obtain the - values in - the list as an array. Otherwise, the component must be a - <code>UISelectOne</code> instance. Call its - <code>getValue()</code> method, which must be an Object - array. - Look for an element in the resultant array that, 1. when we pass - the renderable value to its <code>equals()</code> - method, it - returns <code>true</code> , or 2. if the renderable - value is null, - and there is a null element in the array, also conclude that the - current element is selected. Otherwise the current element is not - selected. Now, if the current value is selected, write out an - HTML boolean property "selected". If the current - SelectItem.isDisabled() returns true, render "disabled" as the - value of the "disabled" attribute. <span - class="changed_added_2_0">If the value of the <code>escape</code> - property is true, use the <code>writeText()</code> - method of - <code>ResponseWriter</code> to write out the value of - the - <code>label</code> property. Otherwise, use the - <code>write()</code> method of the <code>ResponseWriter</code> - to - do so.</span></p> - </ul> - </ul> - - selectManyListbox - - jakarta.faces.HtmlSelectManyListbox - jakarta.faces.Listbox - - - - Converter instance registered with this component. - - converter - false - jakarta.faces.convert.Converter - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the converter message, replacing any message - that comes from the converter. - - converterMessage - false - java.lang.String - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating that this component's value must be - converted and validated immediately (that is, during - Apply Request Values phase), rather than waiting - until Process Validations phase. - - immediate - false - java.lang.Boolean - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - Flag indicating that the user is required to provide a submitted - value for this input component. - - required - false - java.lang.Boolean - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validation message for the "required" - facility, if the "required" facility is used. - - requiredMessage - false - java.lang.String - - - - MethodExpression representing a validator method that will be - called - during Process Validations to perform correctness checks on the - value of this component. The expression must evaluate to a - public - method that takes FacesContext, UIComponent, and Object - parameters, - with a return type of void. - - validator - false - void validate(jakarta.faces.context.FacesContext, - jakarta.faces.component.UIComponent, java.lang.Object) - - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validator message, replacing any - message that comes from the validator. - - validatorMessage - false - java.lang.String - - - - The current value of this component. - - value - false - java.lang.Object - - - - <p> - MethodExpression representing a value change listener method - that will be notified when a new value has been set for this - input component. The expression must evaluate to a public - method that takes a <code>ValueChangeEvent</code> - parameter, - with a return type of void, <span class="changed_added_2_0">or - to a public method that takes no arguments with a return type - of void. In the latter case, the method has no way of easily - knowing what the new value is, but this can be useful in cases - where a notification is needed that "this value - changed".</span> - </p> - - valueChangeListener - false - void - valueChange(jakarta.faces.event.ValueChangeEvent) - - - - - Access key that, when pressed, transfers focus - to this element. - - accesskey - false - java.lang.String - - - - <p class="changed_modified_2_0"> Optional - attribute that is a literal string that is the fully qualified - class name of a concrete class that implements - <code>java.util.Collection</code>, or an EL - expression that - evaluates to either 1. such a String, or 2. the - <code>Class</code> object itself. </p> - - collectionType - false - java.lang.String - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - disabled - false - java.lang.Boolean - - - - CSS style class to apply to the rendered label - on disabled options. - - disabledClass - false - java.lang.String - - - - CSS style class to apply to the rendered label - on enabled options. - - enabledClass - false - java.lang.String - - - - <p class="changed_modified_2_0"> - Flag indicating that, if this component is activated by the - user, - The "no selection option", if any, must be hidden.</p> - - hideNoSelectionOption - false - java.lang.Boolean - - - - A localized user presentable name for this component. - - label - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - Javascript code executed when this element loses focus. - - onblur - false - java.lang.String - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - onchange - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when this element receives focus. - - onfocus - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - readonly - false - java.lang.Boolean - - - - Number of available options to be shown at all times. - If not specified, all available options are shown. - - size - false - int - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - tabindex - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]> -
            - role - false - java.lang.String -
            -
            - - - <p><span - class="changed_modified_2_0">Render</span> an HTML option - list.</p> - <p><a name="decode">Decode Behavior</a></p> - <ul> - <p>See the <a - href="SelectManyListbox.html">"Decode - Behavior for UISelectMany Components"</a> section.</p> - </ul> - <p>Encode Behavior</p> - <ul> - <p>Render an HTML "select" element. Render the clientId of - the component as the value of the "name" attribute. If the - "styleClass" - attribute is specified, render its value as the value of the "class" - attribute on the "select" element. If the component - to be rendered is a UISelectMany, render "multiple" as the value of - the "multiple" attribute. Render "1" as the value of the "size" - attribute. See the <a - href="SelectManyListbox.html">"Rendering the option - elements" </a> specification for <code>ListboxRenderer</code> - for - more detail on how to render the "option" elements in this - renderer.</p> - </ul> - - selectManyMenu - - jakarta.faces.HtmlSelectManyMenu - jakarta.faces.Menu - - - - Converter instance registered with this component. - - converter - false - jakarta.faces.convert.Converter - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the converter message, replacing any message - that comes from the converter. - - converterMessage - false - java.lang.String - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating that this component's value must be - converted and validated immediately (that is, during - Apply Request Values phase), rather than waiting - until Process Validations phase. - - immediate - false - java.lang.Boolean - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - Flag indicating that the user is required to provide a submitted - value for this input component. - - required - false - java.lang.Boolean - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validation message for the "required" - facility, if the "required" facility is used. - - requiredMessage - false - java.lang.String - - - - MethodExpression representing a validator method that will be - called - during Process Validations to perform correctness checks on the - value of this component. The expression must evaluate to a - public - method that takes FacesContext, UIComponent, and Object - parameters, - with a return type of void. - - validator - false - void validate(jakarta.faces.context.FacesContext, - jakarta.faces.component.UIComponent, java.lang.Object) - - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validator message, replacing any - message that comes from the validator. - - validatorMessage - false - java.lang.String - - - - The current value of this component. - - value - false - java.lang.Object - - - - <p> - MethodExpression representing a value change listener method - that will be notified when a new value has been set for this - input component. The expression must evaluate to a public - method that takes a <code>ValueChangeEvent</code> - parameter, - with a return type of void, <span class="changed_added_2_0">or - to a public method that takes no arguments with a return type - of void. In the latter case, the method has no way of easily - knowing what the new value is, but this can be useful in cases - where a notification is needed that "this value - changed".</span> - </p> - - valueChangeListener - false - void - valueChange(jakarta.faces.event.ValueChangeEvent) - - - - - Access key that, when pressed, transfers focus - to this element. - - accesskey - false - java.lang.String - - - - <p class="changed_modified_2_0"> Optional - attribute that is a literal string that is the fully qualified - class name of a concrete class that implements - <code>java.util.Collection</code>, or an EL - expression that - evaluates to either 1. such a String, or 2. the - <code>Class</code> object itself. </p> - - collectionType - false - java.lang.String - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - disabled - false - java.lang.Boolean - - - - CSS style class to apply to the rendered label - on disabled options. - - disabledClass - false - java.lang.String - - - - CSS style class to apply to the rendered label - on enabled options. - - enabledClass - false - java.lang.String - - - - <p class="changed_modified_2_0"> - Flag indicating that, if this component is activated by the - user, - The "no selection option", if any, must be hidden.</p> - - hideNoSelectionOption - false - java.lang.Boolean - - - - A localized user presentable name for this component. - - label - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - Javascript code executed when this element loses focus. - - onblur - false - java.lang.String - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - onchange - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when this element receives focus. - - onfocus - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - readonly - false - java.lang.Boolean - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - tabindex - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]> -
            - role - false - java.lang.String -
            -
            - - - <p>Render an HTML option list.</p> - <p><a name="decode">Decode Behavior</a></p> - <ul> - <p>See the <a - href="SelectManyListbox.html">"Decode - Behavior for UISelectOne Components"</a> section.</p> - </ul> - <p>Encode Behavior</p> - <ul> - <p>Render an HTML "select" element. Render the clientId of - the component as the value of the "name" attribute. If the - "styleClass" - attribute is specified, render its value as the value of the "class" - attribute on the "select" element. If the component - to be rendered is a UISelectMany, render "multiple" as the value of - the "multiple" attribute. If the "size" attribute is specified, - render its value as the value of the "size" attribute. Otherwise - use the number of items as the value of the "size" attribute. See - the <a href="SelectManyListbox.html">"Rendering the option - elements" </a> specification for <code>ListboxRenderer</code> - for - more detail on how to render the "option" elements in this - renderer.</p> - </ul> - - selectOneListbox - - jakarta.faces.HtmlSelectOneListbox - jakarta.faces.Listbox - - - - Converter instance registered with this component. - - converter - false - jakarta.faces.convert.Converter - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the converter message, replacing any message - that comes from the converter. - - converterMessage - false - java.lang.String - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating that this component's value must be - converted and validated immediately (that is, during - Apply Request Values phase), rather than waiting - until Process Validations phase. - - immediate - false - java.lang.Boolean - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - Flag indicating that the user is required to provide a submitted - value for this input component. - - required - false - java.lang.Boolean - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validation message for the "required" - facility, if the "required" facility is used. - - requiredMessage - false - java.lang.String - - - - MethodExpression representing a validator method that will be - called - during Process Validations to perform correctness checks on the - value of this component. The expression must evaluate to a - public - method that takes FacesContext, UIComponent, and Object - parameters, - with a return type of void. - - validator - false - void validate(jakarta.faces.context.FacesContext, - jakarta.faces.component.UIComponent, java.lang.Object) - - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validator message, replacing any - message that comes from the validator. - - validatorMessage - false - java.lang.String - - - - The current value of this component. - - value - false - java.lang.Object - - - - <p> - MethodExpression representing a value change listener method - that will be notified when a new value has been set for this - input component. The expression must evaluate to a public - method that takes a <code>ValueChangeEvent</code> - parameter, - with a return type of void, <span class="changed_added_2_0">or - to a public method that takes no arguments with a return type - of void. In the latter case, the method has no way of easily - knowing what the new value is, but this can be useful in cases - where a notification is needed that "this value - changed".</span> - </p> - - valueChangeListener - false - void - valueChange(jakarta.faces.event.ValueChangeEvent) - - - - - Access key that, when pressed, transfers focus - to this element. - - accesskey - false - java.lang.String - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - disabled - false - java.lang.Boolean - - - - CSS style class to apply to the rendered label - on disabled options. - - disabledClass - false - java.lang.String - - - - CSS style class to apply to the rendered label - on enabled options. - - enabledClass - false - java.lang.String - - - - <p class="changed_modified_2_0"> - Flag indicating that, if this component is activated by the - user, - The "no selection option", if any, must be hidden.</p> - - hideNoSelectionOption - false - java.lang.Boolean - - - - A localized user presentable name for this component. - - label - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - Javascript code executed when this element loses focus. - - onblur - false - java.lang.String - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - onchange - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when this element receives focus. - - onfocus - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - readonly - false - java.lang.Boolean - - - - Number of available options to be shown at all times. - If not specified, all available options are shown. - - size - false - int - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - tabindex - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]> -
            - role - false - java.lang.String -
            -
            - - - <p>Render an HTML option list.</p> - <p><a name="decode">Decode Behavior</a></p> - <ul> - <p>See the <a - href="SelectManyListbox.html">"Decode - Behavior for UISelectOne Components"</a> section.</p> - </ul> - <p>Encode Behavior</p> - <ul> - <p>Render an HTML "select" element. Render the clientId of the - component as the value of the "name" attribute. If the - "styleClass" attribute is specified, render its value as the value - of the "class" attribute on the "select" element. If the component - to be rendered is a UISelectMany, render "true" as the value of - the "multiple" attribute. Use the number of items as the value of - the "size" attribute. See the <a - href="SelectManyListbox.html">"Rendering - the option elements" </a> specification for - <code>ListboxRenderer</code> for more detail on how to - render the - "option" elements in this renderer.</p> - </ul> - - selectOneMenu - - jakarta.faces.HtmlSelectOneMenu - jakarta.faces.Menu - - - - Converter instance registered with this component. - - converter - false - jakarta.faces.convert.Converter - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the converter message, replacing any message - that comes from the converter. - - converterMessage - false - java.lang.String - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating that this component's value must be - converted and validated immediately (that is, during - Apply Request Values phase), rather than waiting - until Process Validations phase. - - immediate - false - java.lang.Boolean - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - Flag indicating that the user is required to provide a submitted - value for this input component. - - required - false - java.lang.Boolean - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validation message for the "required" - facility, if the "required" facility is used. - - requiredMessage - false - java.lang.String - - - - MethodExpression representing a validator method that will be - called - during Process Validations to perform correctness checks on the - value of this component. The expression must evaluate to a - public - method that takes FacesContext, UIComponent, and Object - parameters, - with a return type of void. - - validator - false - void validate(jakarta.faces.context.FacesContext, - jakarta.faces.component.UIComponent, java.lang.Object) - - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validator message, replacing any - message that comes from the validator. - - validatorMessage - false - java.lang.String - - - - The current value of this component. - - value - false - java.lang.Object - - - - <p> - MethodExpression representing a value change listener method - that will be notified when a new value has been set for this - input component. The expression must evaluate to a public - method that takes a <code>ValueChangeEvent</code> - parameter, - with a return type of void, <span class="changed_added_2_0">or - to a public method that takes no arguments with a return type - of void. In the latter case, the method has no way of easily - knowing what the new value is, but this can be useful in cases - where a notification is needed that "this value - changed".</span> - </p> - - valueChangeListener - false - void - valueChange(jakarta.faces.event.ValueChangeEvent) - - - - - Access key that, when pressed, transfers focus - to this element. - - accesskey - false - java.lang.String - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - disabled - false - java.lang.Boolean - - - - CSS style class to apply to the rendered label - on disabled options. - - disabledClass - false - java.lang.String - - - - CSS style class to apply to the rendered label - on enabled options. - - enabledClass - false - java.lang.String - - - - <p class="changed_modified_2_0"> - Flag indicating that, if this component is activated by the - user, - The "no selection option", if any, must be hidden.</p> - - hideNoSelectionOption - false - java.lang.Boolean - - - - A localized user presentable name for this component. - - label - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - Javascript code executed when this element loses focus. - - onblur - false - java.lang.String - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - onchange - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when this element receives focus. - - onfocus - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - readonly - false - java.lang.Boolean - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - tabindex - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]> -
            - role - false - java.lang.String -
            -
            - - Render a set of html "input" elements of type "radio".

            - -

            Decode Behavior

            - - -

            Encode Behavior

            -
              -
            • If the "group" attribute is not specified, render as follows. -
                -
              • If the "layout" attribute is specified, and its value is "list", render a "ul" element as root element, otherwise render a "table" element.
              • -
              • As an exception to the general rules about how to handle the "id" attribute, render it as an attribute on the outer root element, the value of which is the clientId of the component per the rules at the beginning of this specification.
              • -
              • If the "styleClass" attribute is specified, render the value of the "styleClass" attribute as the value of the "class" attribute on the root element.
              • -
              • If the "style", "border" attributes are specified, pass them thru and render their values as the "style" and "border" attributes on the root element, respectively..
              • -
              • If the "layout" attribute is specified, and its value is "pageDirection", render the children elements vertically, otherwise horizontally, in the root element.
              • -
              • If any of the children are an instance of SelectItemGroup, render them as a nested root element.
              • -
              -
            • -
            • Each of the SelectItem children are ultimately rendered as follows. -
                -
              • If the SelectItem.getLabel() is specified, and the group attribute is specified, render as follows. -
                  -
                • Render a "label" element.
                • -
                • Render the "for" attribute of the "label" element whose value is the corresponding "input" element's "id" value.
                • -
                • Render any "class" attribute as the "class" attribute on the "label" element.
                • -
                • Render the label value from SelectItem.getLabel().
                • -
                • Close out the "label" element.
                • -
                -
              • -
              • Render an "input" element of "type" "radio" for each child component.
              • -
              • Render an "id" attribute on the "input" element. Each "id" value must be unique.
              • -
              • If the "group" attribute is not specified, render the "name" attribute on the "input" element with the value of the clientId of the component.
              • -
              • If the "group" attribute is specified, render as follows. -
                  -
                • Render the "name" attribute on the "input" element with the value of the "group" attribute.
                • -
                • If the "styleClass" attribute is specified, render the value of the "styleClass" attribute as the value of the "class" attribute on the "input" element.
                • -
                • If the "style" attribute is specified, pass it thru and render its value as the "style" attribute on the "input" element.
                • -
                -
              • -
              • Render the input value from SelectItem.getValue().
              • -
              • Coerce the select item value to the type of the parent UISelectOne value using the Expression Language coercion rules before comparing the values. - If the select item value is equal to the value of the parent UISelectOne, render an appropriate HTML boolean value indicating "checked" for the enclosing "input".
              • -
              • If the current SelectItem.isDisabled() returns true, render "disabled" as the value of the "disabled" attribute.
              • -
              • Close out the "input" element.
              • -
              • If the SelectItem.getLabel() is specified, and the group attribute is not specified, render as follows. -
                  -
                • Render a "label" element.
                • -
                • Render the "for" attribute of the "label" element whose value is the corresponding "input" element's "id" value.
                • -
                • Render any "class" attribute as the "class" attribute on the "label" element.
                • -
                • Render the label value from SelectItem.getLabel().
                • -
                • Close out the "label" element.
                • -
                -
              • -
              -
            • -
            • See the "Rendering the option elements" specification for ListboxRenderer for more detail on how to render the "option" elements in this renderer.
            • -
            - ]]>
            - selectOneRadio - - jakarta.faces.HtmlSelectOneRadio - jakarta.faces.Radio - - - - Converter instance registered with this component. - - converter - false - jakarta.faces.convert.Converter - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the converter message, replacing any message - that comes from the converter. - - converterMessage - false - java.lang.String - - - - The component identifier for this component. This value must be - unique within the closest parent component that is a naming - container. - - id - false - java.lang.String - - - - Flag indicating that this component's value must be - converted and validated immediately (that is, during - Apply Request Values phase), rather than waiting - until Process Validations phase. - - immediate - false - java.lang.Boolean - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. The default value for this property is true. - - rendered - false - java.lang.Boolean - - - - Flag indicating that the user is required to provide a submitted - value for this input component. - - required - false - java.lang.Boolean - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validation message for the "required" - facility, if the "required" facility is used. - - requiredMessage - false - java.lang.String - - - - MethodExpression representing a validator method that will be - called - during Process Validations to perform correctness checks on the - value of this component. The expression must evaluate to a - public - method that takes FacesContext, UIComponent, and Object - parameters, - with a return type of void. - - validator - false - void validate(jakarta.faces.context.FacesContext, - jakarta.faces.component.UIComponent, java.lang.Object) - - - - - A ValueExpression enabled attribute that, if present, will be - used as the text of the validator message, replacing any - message that comes from the validator. - - validatorMessage - false - java.lang.String - - - - The current value of this component. - - value - false - java.lang.Object - - - - <p> - MethodExpression representing a value change listener method - that will be notified when a new value has been set for this - input component. The expression must evaluate to a public - method that takes a <code>ValueChangeEvent</code> - parameter, - with a return type of void, <span class="changed_added_2_0">or - to a public method that takes no arguments with a return type - of void. In the latter case, the method has no way of easily - knowing what the new value is, but this can be useful in cases - where a notification is needed that "this value - changed".</span> - </p> - - valueChangeListener - false - void - valueChange(jakarta.faces.event.ValueChangeEvent) - - - - - Access key that, when pressed, transfers focus - to this element. - - accesskey - false - java.lang.String - - - - Width (in pixels) of the border to be drawn - around the table containing the options list. - <p class="changed_added_4_0">This attribute is ignored when the "layout" attribute equals to "list".<span> - - border - false - int - - - - Direction indication for text that does not inherit - directionality. - Valid values are "LTR" (left-to-right) and "RTL" - (right-to-left). - - dir - false - java.lang.String - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - disabled - false - java.lang.Boolean - - - - CSS style class to apply to the rendered label - on disabled options. - - disabledClass - false - java.lang.String - - - - CSS style class to apply to the rendered label - on enabled options. - - enabledClass - false - java.lang.String - - - - <p class="changed_modified_2_0"> - Flag indicating that, if this component is activated by the - user, - The "no selection option", if any, must be hidden.</p> - - hideNoSelectionOption - false - java.lang.Boolean - - - - A localized user presentable name for this component. - - label - false - java.lang.String - - - - Code describing the language used in the generated markup - for this component. - - lang - false - java.lang.String - - - - Orientation of the options list to be created. - Valid values are "pageDirection" (list is laid - out vertically), or "lineDirection" (list is - laid out horizontally). If not specified, the - default value is "lineDirection". - - layout - false - java.lang.String - - - - Javascript code executed when this element loses focus. - - onblur - false - java.lang.String - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - onchange - false - java.lang.String - - - - Javascript code executed when a pointer button is - clicked over this element. - - onclick - false - java.lang.String - - - - Javascript code executed when a pointer button is - double clicked over this element. - - ondblclick - false - java.lang.String - - - - Javascript code executed when this element receives focus. - - onfocus - false - java.lang.String - - - - Javascript code executed when a key is - pressed down over this element. - - onkeydown - false - java.lang.String - - - - Javascript code executed when a key is - pressed and released over this element. - - onkeypress - false - java.lang.String - - - - Javascript code executed when a key is - released over this element. - - onkeyup - false - java.lang.String - - - - Javascript code executed when a pointer button is - pressed down over this element. - - onmousedown - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved within this element. - - onmousemove - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved away from this element. - - onmouseout - false - java.lang.String - - - - Javascript code executed when a pointer button is - moved onto this element. - - onmouseover - false - java.lang.String - - - - Javascript code executed when a pointer button is - released over this element. - - onmouseup - false - java.lang.String - - - - Javascript code executed when text within this - element is selected by the user. - - onselect - false - java.lang.String - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - readonly - false - java.lang.Boolean - - - - CSS style(s) to be applied when this component is rendered. - - style - false - java.lang.String - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - styleClass - false - java.lang.String - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - tabindex - false - java.lang.String - - - - Advisory title information about markup elements generated - for this component. - - title - false - java.lang.String - - - - The ValueExpression linking this component to a property in a - backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]> -
            - role - false - java.lang.String -
            -
            - - - <p>Renders a UIComponent that represents a single column of - data within a parent <code>UIData</code> component.</p> - - column - - jakarta.faces.Column - - - - - Flag indicating whether or not this component should be rendered - (during Render Response Phase), or processed on any subsequent - form submit. - - rendered - false - java.lang.Boolean - - - - The value binding expression linking this component to a - property in a backing bean - - binding - false - jakarta.faces.component.UIComponent - - - - The component identifier for the associated component - - id - false - java.lang.String - - - - Space-separated list of CSS style class(es) that will be - applied to any column footer generated for this table. - - footerClass - false - java.lang.String - - - - Space-separated list of CSS style class(es) that will be - applied to any column header generated for this table. - - headerClass - false - java.lang.String - - - - Flag indicating that this column is a row header column and - therefore cells in this column should be rendered with "th" - instead of "td" and must have the 'scope="row"' attribute. - - rowHeader - false - java.lang.Boolean - - - - - - Renders - an HTML "input" element of "type" "file". The standard HTML_BASIC - RenderKit specifies behavior that assumes Servlet 3.0 or later. - Portlet implementations must override this implementation with a - semantically equivalent one that functions under the constraints - of the Portlet specification.

            - -
            - -

            Decode Behavior

            - -
              - -

              Obtain the Map from the "requestParameterMap" - property of the ExternalContext. If the - Map contains an entry for the "clientId" of the - component, pass the value of the entry to the - setSubmittedValue() method of the component, which - must be an instance of EditableValueHolder, and - return. Otherwise, obtain the "request" property from the - ExternalContext and cast it to - jakarta.servlet.http.HttpServletRequest. Call - getParts() on the httpServletRequest. Iterate over - the parts. If the "name" property of the current part is equal to - the "clientId", then collect the part. - After the iteration, if the multiple attribute is set to true, - then pass java.util.Collection<jakarta.servlet.http.Part> to the setSubmittedValue() method of the component, - else pass the first item, if any, as jakarta.servlet.http.Part to the - setSubmittedValue() method of the component. If an - exception is thrown during the iteration, log the exception and - continue.

              - -

              The standard implementation must override the - getConvertedValue() so that it filters out from the - submittedValue any parts which return - null or an empty string on getSubmittedFileName(), - or return 0 or less on getSize().

              - -

              Any exception thrown when interacting with the underlying - multi-part API must be wrapped in a FacesException - and allowed to reach the ExceptionHandler.

              - -
            - -

            Encode Behavior

            - -
              - -

              Render the clientId of the component as the value of the - "name" attribute. Do not render the "value" attribute. If the - "styleClass" attribute is specified, render its value as the value - of the "class" attribute.

              - -

              If ProjectStage is not - ProjectStage.Production, verify that the enclosing - form has an enctype attribute whose value is - multipart/form-data. If not, add a - FacesMessage for this component's clientId to the - FacesContext stating that file upload requires a form - with enctype equal to - multipart/form-data. If ProjectStage - is ProjectStage.Production, do not - do this verification.

              - -
            - -
            ]]> -
            - inputFile - - jakarta.faces.HtmlInputFile - jakarta.faces.File - - - - - - converter - false - jakarta.faces.convert.Converter - - - - - - - converterMessage - false - java.lang.String - - - - - - id - false - java.lang.String - - - - - - immediate - false - java.lang.Boolean - - - - - - rendered - false - java.lang.Boolean - - - - - - required - false - java.lang.Boolean - - - - - - requiredMessage - false - java.lang.String - - - - - - validator - false - java.lang.String - - - - If the multiple attribute is set to true, - then this must be assignable to java.util.Collection<jakarta.servlet.http.Part>, - else this must be assignable to jakarta.servlet.http.Part.]]> - - value - false - java.lang.Object - - - - - - MethodExpression representing a value change listener method - that will be notified when a new value has been set for this - input component. The expression must evaluate to a public - method that takes a ValueChangeEvent parameter, - with a return type of void, or - to a public method that takes no arguments with a return type - of void. In the latter case, the method has no way of easily - knowing what the new value is, but this can be useful in cases - where a notification is needed that "this value - changed". - -

            ]]> -
            - valueChangeListener - false - java.lang.String -
            - - - - Comma separated string of mime types of files to filter in client side file browse dialog. - Note: this is not validated in server side. - ]]> - - accept - false - java.lang.String - - - - - - dir - false - java.lang.String - - - - - - disabled - false - java.lang.Boolean - - - - - - label - false - java.lang.String - - - - - - lang - false - java.lang.String - - - - Flag indicating that this element must allow multiple file selection. A value - of false causes no attribute to be rendered, while a value of true causes the attribute to be rendered as - multiple="multiple".]]> - - multiple - false - boolean - - - - - - onblur - false - java.lang.String - - - - - - onchange - false - java.lang.String - - - - - - onclick - false - java.lang.String - - - - - - ondblclick - false - java.lang.String - - - - - - onfocus - false - java.lang.String - - - - - - onkeydown - false - java.lang.String - - - - - - onkeypress - false - java.lang.String - - - - - - onkeyup - false - java.lang.String - - - - - - onmousedown - false - java.lang.String - - - - - - onmousemove - false - java.lang.String - - - - - - onmouseout - false - java.lang.String - - - - - - onmouseover - false - java.lang.String - - - - - - onmouseup - false - java.lang.String - - - - - - onselect - false - java.lang.String - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]> -
            - role - false - java.lang.String -
            - - - - - style - false - java.lang.String - - - - - - styleClass - false - java.lang.String - - - - - - tabindex - false - java.lang.String - - - - - - title - false - java.lang.String - - - - The ValueExpression linking this component to a property in a backing bean - - binding - false - jakarta.faces.component.UIComponent - - -
            - - - - -

            Render the markup for - a <!DOCTYPE> declaration.

            - -

            Decode Behavior

            - -
              - -

              No action is required during decode for this renderer.

              - -
            - -

            Encode Behavior

            - -

            Output an XML Doctype using the provided attributes. Output the - literal text <!DOCTYPE. The "rootElement" attribute is - required and must be rendered next. If the "public" attribute is - defined, render the literal text PUBLIC then render the - value of the attribute inside double quotes. If the "system" attribute - is defined, render it next, inside double quotes. Close the doctype - declaration with the literal text >.

            - -
            - -

            No relocation occurs with the output of this component. It is - rendered at whatever position in the view hierarchy it happens to be - encountered when traversing the view to render. Therefore, this - component must be located in the view hierarchy at the correct location - so that the final rendered markup has it in the proper place with - respect to the user agent that consumes the rendered markup. In practice - this means in front of the <html> or <h:html> element. - Furthermore, if multiple <h:doctype> components exist, - all of them will be rendered.

            - -

            If this component is present in a view, any DOCTYPE that would - otherwise have been rendered by virtue of being present in the VDL page - must be ignored.

            - -
            - - - ]]> -
            - doctype - - jakarta.faces.HtmlDoctype - jakarta.faces.Doctype - - - - - - converter - false - jakarta.faces.convert.Converter - - - - - - id - false - java.lang.Boolean - - - - - - value - false - java.lang.Object - - - - - Will be output as the public part of the DOCTYPE - ]]> - - public - false - java.lang.String - - - - - The root XML element - ]]> - - rootElement - false - java.lang.String - - - - - Will be output as the system part of the DOCTYPE - ]]> - - system - false - java.lang.String - - - - The ValueExpression linking this component to a property in a backing bean - - binding - false - jakarta.faces.component.UIComponent - - - -
            - - - diff --git a/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.passthrough.taglib.xml b/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.passthrough.taglib.xml deleted file mode 100644 index ce8b10ee2e..0000000000 --- a/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.passthrough.taglib.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - Jakarta Faces Passthrough Attributes Tag Library

            - -

            Facelet tag attributes in - this namespace must be added to the pass through attribute map - on the UIComponent corresponding to the facelet - tag. There are no tags in this tag library.

            - -
            - -

            Usage example

            - -
            <h:outputText value="Namespaced Attributes" p:foo="bar" />
            - -

            Would cause <span foo="bar">Namespaced Attributes</span> to be rendered.

            - - -
            - - ]]>
            - jakarta.faces.passthrough - - - - - -
            diff --git a/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.taglib.xml b/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.taglib.xml deleted file mode 100644 index f36f7849b8..0000000000 --- a/impl/src/main/resources/com/sun/faces/metadata/taglib/faces.taglib.xml +++ /dev/null @@ -1,218 +0,0 @@ - - - - - Jakarta Faces Passthrough Elements Tag Library

            - -

            The presence of an - attribute from this namespace on an otherwise non-Faces aware - markup element indicates that the markup element must be treated - as a Faces component that will be rendered equivalently to what is - specified directly in the Facelet page, with the added benefit - of being associated with a server side UIComponent - instance. - -

            - -
            - -

            Please see the documentation for Java class jakarta.faces.view.facelets.TagDecorator.

            - -
            - - - ]]>
            - jakarta.faces - - Markup element - that causes a component of component-family: - jakarta.faces.Panel with renderer-type: - jakarta.faces.passthrough.Element to be inserted in the tree. - This element is primarily intended to be used by the default - TagDecorator, when no match is found as described in - the javadoc for that class. The component that backs this element - must implement - jakarta.faces.component.behavior.ClientBehaviorHolder - and return "click" from its getDefaultEventName() - method. The list of events returned from its - getEventNames() method must include the "on*" - attributes below, ommitting the leading "on".

            - - - ]]>
            - element - - This attribute must be in the - jakarta.faces.passthrough namespace and - its value must be set into the component's pass through - attributes map under the key given by the value of the symbolic - constant - jakarta.faces.render.Renderer.PASSTHROUGH_RENDERER_LOCALNAME_KEY.

            - - ]]>
            - elementName - true - java.lang.String -
            - - - - Javascript code executed when a pointer button is - clicked over this element. - ]]> - - - onclick - false - java.lang.String - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - ]]> - - - ondblclick - false - java.lang.String - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - ]]> - - - onmousedown - false - java.lang.String - - - - - - Javascript code executed when a pointer button is - released over this element. - ]]> - - - onmouseup - false - java.lang.String - - - - - - Javascript code executed when a pointer button is - moved onto this element. - ]]> - - - onmouseover - false - java.lang.String - - - - - - Javascript code executed when a pointer button is - moved within this element. - ]]> - - - onmousemove - false - java.lang.String - - - - - - Javascript code executed when a pointer button is - moved away from this element. - ]]> - - - onmouseout - false - java.lang.String - - - - - - Javascript code executed when a key is - pressed and released over this element. - ]]> - - - onkeypress - false - java.lang.String - - - - - - Javascript code executed when a key is - pressed down over this element. - ]]> - - - onkeydown - false - java.lang.String - - - - - - Javascript code executed when a key is - released over this element. - ]]> - - - onkeyup - false - java.lang.String - - - - -
            - - -
            diff --git a/impl/src/main/resources/com/sun/faces/metadata/taglib/tags.core.taglib.xml b/impl/src/main/resources/com/sun/faces/metadata/taglib/tags.core.taglib.xml deleted file mode 100644 index d4de234080..0000000000 --- a/impl/src/main/resources/com/sun/faces/metadata/taglib/tags.core.taglib.xml +++ /dev/null @@ -1,269 +0,0 @@ - - - - - Jakarta Tags Core Tag Library

            - ]]>
            - jakarta.tags.core - - - catch - com.sun.faces.facelets.tag.jstl.core.CatchHandler - - - var - false - java.lang.String - - - - and - ]]> - choose - com.sun.faces.facelets.tag.jstl.core.ChooseHandler - - - - if - com.sun.faces.facelets.tag.jstl.core.IfHandler - - - test - true - boolean - - - - var - false - java.lang.String - - - - scope - false - java.lang.String - - - - - forEach - com.sun.faces.facelets.tag.jstl.core.ForEachHandler - - - items - false - java.lang.Object - - - - begin - false - int - - - - end - false - int - - - - step - false - int - - - - var - false - java.lang.String - - - - varStatus - false - java.lang.String - - - - that follows tags - and runs only if all of the prior conditions evaluated to - 'false' - ]]> - otherwise - com.sun.faces.facelets.tag.jstl.core.ChooseOtherwiseHandler - - - Sets the result of an expression evaluation based on the - value of the attributes. If "scope" the is present, but has a zero - length or is equal to the string "page", TagException - is - thrown with an informative error message, ensuring page location - information is saved.

            - -

            This handler operates in one of two ways. - -

              - -
            1. The user has set "var", "value" and (optionally) - "scope" attributes.

            2. - -
            3. The user has set "target", "property", and - "value" - attributes.

            4. - - -
            - -

            The first case takes precedence over the second.

            - - - ]]>
            - set - com.sun.faces.facelets.tag.jstl.core.SetHandler - - - var - false - java.lang.String - - - - value - false - java.lang.Object - - - - target - false - java.lang.String - - - - property - false - java.lang.String - - - - scope - false - java.lang.String - -
            - - - when - com.sun.faces.facelets.tag.jstl.core.ChooseWhenHandler - - - test - true - boolean - - -
            diff --git a/impl/src/main/resources/com/sun/faces/metadata/taglib/tags.functions.taglib.xml b/impl/src/main/resources/com/sun/faces/metadata/taglib/tags.functions.taglib.xml deleted file mode 100644 index e041bc93d5..0000000000 --- a/impl/src/main/resources/com/sun/faces/metadata/taglib/tags.functions.taglib.xml +++ /dev/null @@ -1,160 +0,0 @@ - - - - - Jakarta Tags Functions Tag Library

            - ]]>
            - jakarta.tags.functions - - - - Tests if an input string contains the specified substring. - - contains - com.sun.faces.facelets.tag.jstl.fn.JstlFunction - boolean contains(java.lang.String, java.lang.String) - - - - Tests if an input string contains the specified substring in a case insensitive way. - - containsIgnoreCase - com.sun.faces.facelets.tag.jstl.fn.JstlFunction - boolean containsIgnoreCase(java.lang.String, java.lang.String) - - - - Tests if an input string ends with the specified suffix. - - endsWith - com.sun.faces.facelets.tag.jstl.fn.JstlFunction - boolean endsWith(java.lang.String, java.lang.String) - - - - Escapes characters that could be interpreted as XML markup. - - escapeXml - com.sun.faces.facelets.tag.jstl.fn.JstlFunction - java.lang.String escapeXml(java.lang.String) - - - - Returns the index withing a string of the first occurrence of a specified substring. - - indexOf - com.sun.faces.facelets.tag.jstl.fn.JstlFunction - int indexOf(java.lang.String, java.lang.String) - - - - Joins all elements of an array into a string. - - join - com.sun.faces.facelets.tag.jstl.fn.JstlFunction - java.lang.String join(java.lang.String[], java.lang.String) - - - - Returns the number of items in a collection, or the number of characters in a string. - - length - com.sun.faces.facelets.tag.jstl.fn.JstlFunction - int length(java.lang.Object) - - - - Returns a string resulting from replacing in an input string all occurrences - of a "before" string into an "after" substring. - - replace - com.sun.faces.facelets.tag.jstl.fn.JstlFunction - java.lang.String replace(java.lang.String, java.lang.String, java.lang.String) - - - - Splits a string into an array of substrings. - - split - com.sun.faces.facelets.tag.jstl.fn.JstlFunction - java.lang.String[] split(java.lang.String, java.lang.String) - - - - Tests if an input string starts with the specified prefix. - - startsWith - com.sun.faces.facelets.tag.jstl.fn.JstlFunction - boolean startsWith(java.lang.String, java.lang.String) - - - - Returns a subset of a string. - - substring - com.sun.faces.facelets.tag.jstl.fn.JstlFunction - java.lang.String substring(java.lang.String, int, int) - - - - Returns a subset of a string following a specific substring. - - substringAfter - com.sun.faces.facelets.tag.jstl.fn.JstlFunction - java.lang.String substringAfter(java.lang.String, java.lang.String) - - - - Returns a subset of a string before a specific substring. - - substringBefore - com.sun.faces.facelets.tag.jstl.fn.JstlFunction - java.lang.String substringBefore(java.lang.String, java.lang.String) - - - - Converts all of the characters of a string to lower case. - - toLowerCase - com.sun.faces.facelets.tag.jstl.fn.JstlFunction - java.lang.String toLowerCase(java.lang.String) - - - - Converts all of the characters of a string to upper case. - - toUpperCase - com.sun.faces.facelets.tag.jstl.fn.JstlFunction - java.lang.String toUpperCase(java.lang.String) - - - - Removes white spaces from both ends of a string. - - trim - com.sun.faces.facelets.tag.jstl.fn.JstlFunction - java.lang.String trim(java.lang.String) - -
            diff --git a/impl/src/main/resources/com/sun/faces/resources/Messages_de.properties b/impl/src/main/resources/com/sun/faces/resources/Messages_de.properties index 2e4ddf38aa..0bdcf2791f 100644 --- a/impl/src/main/resources/com/sun/faces/resources/Messages_de.properties +++ b/impl/src/main/resources/com/sun/faces/resources/Messages_de.properties @@ -15,92 +15,92 @@ # com.sun.faces.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK=ApplicationAssociate-ctor nicht im gleichen Callstack wie ConfigureListener.contextInitialized() aufgerufen. -com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=ApplicationAssociate ist f\u00fcr diese Webanwendung bereits vorhanden. +com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=ApplicationAssociate ist für diese Webanwendung bereits vorhanden. com.sun.faces.ASSERTION_FAILED=Behauptungsfehler -com.sun.faces.ATTRIBUTE_NOT_SUPORTED=Attribut ''{0}'' wird f\u00fcr Komponententyp ''{1}'' nicht unterst\u00fctzt. +com.sun.faces.ATTRIBUTE_NOT_SUPORTED=Attribut ''{0}'' wird für Komponententyp ''{1}'' nicht unterstützt. com.sun.faces.CANT_CONVERT_VALUE=Eigenschaft ''{0}'' kann nicht in Werttyp ''{1}'' konvertiert werden. com.sun.faces.CANT_CLOSE_INPUT_STREAM=Eingabefluss kann nicht geschlossen werden. -com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=G\u00fcltigkeitsdauer f\u00fcr ID ''{0}'' kann nicht erstellt werden. +com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=Gültigkeitsdauer für ID ''{0}'' kann nicht erstellt werden. com.sun.faces.CANT_INSTANTIATE_CLASS=Klasse ''{0}'' kann nicht instanziiert werden. -com.sun.faces.CANT_INTROSPECT_CLASS=Klasse ''{0}'' kann sich nicht selbst pr\u00fcfen. +com.sun.faces.CANT_INTROSPECT_CLASS=Klasse ''{0}'' kann sich nicht selbst prüfen. com.sun.faces.CANT_PARSE_FILE=Datei ''{0}'' kann nicht analysiert werden. Fehler in Zeile {1} Spalte {2}: {3}. -com.sun.faces.CHILD_NOT_OF_EXPECTED_TYPE=Untergeordneten Komponententyp von ''{0}'' f\u00fcr Komponententyp ''{1}({2})'' erwartet. ''{3}'' gefunden. +com.sun.faces.CHILD_NOT_OF_EXPECTED_TYPE=Untergeordneten Komponententyp von ''{0}'' für Komponententyp ''{1}({2})'' erwartet. ''{3}'' gefunden. com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=: Dieser Link ist deaktiviert, da er nicht in ein Faces-Formular eingebettet ist. -com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=Eine oder mehrere UICommand-Instanzen in der Ansicht gefunden, die nicht in einer UIForm eingebettet waren. Die mit diesen Befehlen verkn\u00fcpften Aktionen werden nicht aufgerufen. -com.sun.faces.COMPONENT_NOT_FOUND_ERROR=Komponente f\u00fcr Kennung ''{0}'' nicht gefunden. +com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=Eine oder mehrere UICommand-Instanzen in der Ansicht gefunden, die nicht in einer UIForm eingebettet waren. Die mit diesen Befehlen verknüpften Aktionen werden nicht aufgerufen. +com.sun.faces.COMPONENT_NOT_FOUND_ERROR=Komponente für Kennung ''{0}'' nicht gefunden. com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=Komponente mit ID ''{0}'' kann nicht in Ansicht gefunden werden. com.sun.faces.CONTENT_TYPE_ERROR=Unerkannter Inhaltstyp -com.sun.faces.CONFIG_RENDERER_REGISTRATION_MISSING_RENDERKIT=Renderer mit RenderKit, die ID {0} verwenden, k\u00f6nnen nicht verwendet werden. RenderKit ist nicht vorhanden. +com.sun.faces.CONFIG_RENDERER_REGISTRATION_MISSING_RENDERKIT=Renderer mit RenderKit, die ID {0} verwenden, können nicht verwendet werden. RenderKit ist nicht vorhanden. com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=Komponenten-ID ''{0}'' wurde bereits in der Ansicht gefunden. com.sun.faces.EMPTY_PARAMETER=Parameter ist leer. com.sun.faces.ENCODING_ERROR=Unerkannte Zeichencodierung. -com.sun.faces.ERROR_GETTING_VALUE_BINDING=ValueBinding f\u00fcr Wert ''{0}'' kann nicht abgerufen werden. +com.sun.faces.ERROR_GETTING_VALUE_BINDING=ValueBinding für Wert ''{0}'' kann nicht abgerufen werden. com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=Wert von Wertverbindungsausdruck ''{0}'' kann nicht abgerufen werden. -com.sun.faces.ERROR_OPENING_FILE=Konfigurationsdatei ''{0}'' kann nicht ge\u00f6ffnet werden. -com.sun.faces.ERROR_PROCESSING_CONFIG=W\u00e4hrend der Verarbeitung der Konfiguration ist ein unerwarteter Fehler aufgetreten. +com.sun.faces.ERROR_OPENING_FILE=Konfigurationsdatei ''{0}'' kann nicht geöffnet werden. +com.sun.faces.ERROR_PROCESSING_CONFIG=Während der Verarbeitung der Konfiguration ist ein unerwarteter Fehler aufgetreten. com.sun.faces.ERROR_REGISTERING_DTD=DTD kann nicht registriert werden: ''{0}''. com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=Eigenschaft des verwalteten Beans kann nicht festgelegt werden: ''{0}''. -com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=Ergebnis der Ausdruckauswertung f\u00fcr Attribut ''{0}'' hatte einen unerwarteten Typ. Erwartet: {1}, aber empfangen: {2}. -com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=Konstruktionsfehler: Ein oder mehrere Eingabeparameter k\u00f6nnen null sein. -com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=FaceServlet-Zuordnung f\u00fcr Servlet-Pfad "{0}" kann nicht ermittelt werden. +com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=Ergebnis der Ausdruckauswertung für Attribut ''{0}'' hatte einen unerwarteten Typ. Erwartet: {1}, aber empfangen: {2}. +com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=Konstruktionsfehler: Ein oder mehrere Eingabeparameter können null sein. +com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=FaceServlet-Zuordnung für Servlet-Pfad "{0}" kann nicht ermittelt werden. com.sun.faces.FACES_SERVLET_MAPPING_INCORRECT=Das FacesServlet kann kein url-pattern von ''/*'' haben. Geben Sie ein anderes url-pattern an. -com.sun.faces.FACES_CONTEXT_NOT_FOUND=Es ist kein FacesContext zur Verarbeitung dieser Anforderung verf\u00fcgbar. Dies liegt h\u00f6chstwahrscheinlich daran, dass die Anforderung an den falschen Pfad gesendet wird. -com.sun.faces.FILE_NOT_FOUND=Datei nicht gefunden f\u00fcr Datei: ''{0}''. -com.sun.faces.ILLEGAL_ATTEMPT_SETTING_APPLICATION_ARTIFACT=Unzul\u00e4ssiger Versuch, {0} festzulegen, nachdem eine Antwort erstellt wurde. +com.sun.faces.FACES_CONTEXT_NOT_FOUND=Es ist kein FacesContext zur Verarbeitung dieser Anforderung verfügbar. Dies liegt höchstwahrscheinlich daran, dass die Anforderung an den falschen Pfad gesendet wird. +com.sun.faces.FILE_NOT_FOUND=Datei nicht gefunden für Datei: ''{0}''. +com.sun.faces.ILLEGAL_ATTEMPT_SETTING_APPLICATION_ARTIFACT=Unzulässiger Versuch, {0} festzulegen, nachdem eine Antwort erstellt wurde. com.sun.faces.ILLEGAL_CHARACTERS_ERROR=Zeichen nicht zugelassen. -com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=Unzul\u00e4ssige Verwendung der impliziten Objektkennung im IValue-Modus: ''{0}'' -com.sun.faces.ILLEGAL_MODEL_REFERENCE=Unzul\u00e4ssige Modellreferenz in diesem Kontext f\u00fcr Ausdruck ''{0}''. -com.sun.faces.ILLEGAL_VIEW_ID=Unzul\u00e4ssige Ansicht-ID {0}''. Die ID muss mit ''''/'''' beginnen. -com.sun.faces.INVALID_EXPRESSION=Ung\u00fcltiger Ausdruck: ''{0}''. -com.sun.faces.INVALID_INIT_PARAM=Ung\u00fcltiger Wert: ''{0}'' f\u00fcr Initialisierungsparameter: ''{1}''. Akzeptable Werte sind ''true'' oder ''false''. Als Standardwert wird ''false'' festgelegt. -com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=Ung\u00fcltiger Nachrichtenschweregrad ''{0}'' in der Konfiguration festgelegt. -com.sun.faces.INVALID_SCOPE_LIFESPAN=Der Bereich des Objekts, auf das Ausdruck ''{0}'', ''{1}'', ist k\u00fcrzer als der verweisende Bereich ''{3}'' des verweisenden Beans ''{2}''. -com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=LifecycleId bereits hinzugef\u00fcgt f\u00fcr ID: ''{0}''. -com.sun.faces.LIFECYCLE_ID_NOT_FOUND=LifecycleId nicht gefunden f\u00fcr ID ''{0}''. +com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=Unzulässige Verwendung der impliziten Objektkennung im IValue-Modus: ''{0}'' +com.sun.faces.ILLEGAL_MODEL_REFERENCE=Unzulässige Modellreferenz in diesem Kontext für Ausdruck ''{0}''. +com.sun.faces.ILLEGAL_VIEW_ID=Unzulässige Ansicht-ID {0}''. Die ID muss mit ''''/'''' beginnen. +com.sun.faces.INVALID_EXPRESSION=Ungültiger Ausdruck: ''{0}''. +com.sun.faces.INVALID_INIT_PARAM=Ungültiger Wert: ''{0}'' für Initialisierungsparameter: ''{1}''. Akzeptable Werte sind ''true'' oder ''false''. Als Standardwert wird ''false'' festgelegt. +com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=Ungültiger Nachrichtenschweregrad ''{0}'' in der Konfiguration festgelegt. +com.sun.faces.INVALID_SCOPE_LIFESPAN=Der Bereich des Objekts, auf das Ausdruck ''{0}'', ''{1}'', ist kürzer als der verweisende Bereich ''{3}'' des verweisenden Beans ''{2}''. +com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=LifecycleId bereits hinzugefügt für ID: ''{0}''. +com.sun.faces.LIFECYCLE_ID_NOT_FOUND=LifecycleId nicht gefunden für ID ''{0}''. com.sun.faces.MAXIMUM_EVENTS_REACHED=Maximale Anzahl von Ereignissen ''{0}'' erreicht. com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=Zieleigenschaft ''{0}'' in verwalteter Bean ''{1}'' konnte nicht festgelegt werden. Die Eigenschaft muss entweder Listen- oder Array-Instanzen akzeptieren. com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=Eigenschaft ''{0}'' in verwaltetem Bean ''{1}'' ist als Zuordnungseigenschaft definiert. Der Setter in der Klasse akzeptiert jedoch keine Zuordnungsinstanzen. -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=Eigenschaft ''{0}'' in verwaltetem Bean ''{1}'' ist als Zuordnungseigenschaft definiert. Der Empf\u00e4nger in der Klasse akzeptiert jedoch keine Zuordnungsinstanzen. +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=Eigenschaft ''{0}'' in verwaltetem Bean ''{1}'' ist als Zuordnungseigenschaft definiert. Der Empfänger in der Klasse akzeptiert jedoch keine Zuordnungsinstanzen. com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=Eigenschaft ''{0}'' in verwaltetem Bean ''{1}'' ist als Zuordnungseigenschaft definiert. Der Setter in der Klasse akzeptiert jedoch keine Zuordnungsinstanzen. -com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=Eigenschaft ''{0}'' in verwaltetem Bean ''{1}'' ist als Listeneigenschaft definiert. Der Empf\u00e4nger in der Klasse gibt jedoch keine Arraylisten-Instanzen zur\u00fcck. -com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=Eigenschaft ''{0}'' in verwaltetem Bean ''{1}'' ist als Listeneigenschaft definiert. Der Empf\u00e4nger gibt einen Array-Typ zur\u00fcck, aber es besteht kein entsprechender Setter. -com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=Zieleigenschaft ''{0}'' in verwalteter Bean ''{1}'' konnte nicht festgelegt werden. Die Zieleigenschaft hat einen vorhandenen Wert zur\u00fcckgegeben, der keine Instanz von List ist. -com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=Ung\u00fcltige Konfiguration f\u00fcr verwaltete Bean ''{0}''. Der verwaltete Bean ist als eine Liste konfiguriert, versucht jedoch auch, Zuordnungseintr\u00e4ge oder verwaltete Eintr\u00e4ge zu definieren. -com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=Ung\u00fcltige Konfiguration f\u00fcr verwaltete Bean ''{0}''. Der verwaltete Bean ist als Zuordnung konfiguriert, versucht jedoch auch, verwaltete Eigenschaften zu definieren. -com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=Ung\u00fcltige Konfiguration f\u00fcr verwaltete Bean ''{0}''. Der verwaltete Bean enth\u00e4lt eine verwaltete Eigenschaft mit dem Namen ''{1}'', sie enth\u00e4lt jedoch einen ung\u00fcltig definierten Wert und/oder ung\u00fcltig definierte Zuordnungseintr\u00e4ge. -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=Ung\u00fcltige Konfiguration f\u00fcr verwaltete Bean ''{0}''. Der verwaltete Bean enth\u00e4lt eine verwaltete Eigenschaft mit dem Namen ''{1}'', sie enth\u00e4lt jedoch auch einen ung\u00fcltig definierten Wert. -com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=Ung\u00fcltige Konfiguration f\u00fcr verwaltete Bean ''{0}''. Der verwaltete Bean enth\u00e4lt eine verwaltete Eigenschaft mit dem Namen ''{1}'', die weder Listen- oder Zuordnungseintr\u00e4ge noch Wertelemente enth\u00e4lt. -com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=Fehler beim Konvertieren des Werts ''{0}'' von Typ ''{1}'' in Typ ''{2}'' f\u00fcr verwaltete Bean ''{3}'' -com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=Bean- oder Eigenschaftenklasse ''{0}'' f\u00fcr verwalteten Bean ''{1}'' kann nicht gefunden werden. -com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=Bean- oder Eigenschaftenklasse ''{0}'' f\u00fcr verwaltete Bean ''{1}'' kann aufgrund einer fehlenden Abh\u00e4ngigkeit: {2} nicht geladen werden. -com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=Die verwaltete Bean-Klasse ''{0}'' f\u00fcr den verwalteten Bean ''{1}'' ist nicht \u00f6ffentlich. -com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=Verwaltete Bean-Klasse ''{0}'' f\u00fcr verwalteten Bean ''{1}'' wird als Abstract oder als Schnittstelle eingestuft. -com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=Die verwaltete Bean-Klasse ''{0}'' f\u00fcr den verwalteten Bean ''{1}'' gibt keinen \u00f6ffentlichen Constructor ohne Argument vor. +com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=Eigenschaft ''{0}'' in verwaltetem Bean ''{1}'' ist als Listeneigenschaft definiert. Der Empfänger in der Klasse gibt jedoch keine Arraylisten-Instanzen zurück. +com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=Eigenschaft ''{0}'' in verwaltetem Bean ''{1}'' ist als Listeneigenschaft definiert. Der Empfänger gibt einen Array-Typ zurück, aber es besteht kein entsprechender Setter. +com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=Zieleigenschaft ''{0}'' in verwalteter Bean ''{1}'' konnte nicht festgelegt werden. Die Zieleigenschaft hat einen vorhandenen Wert zurückgegeben, der keine Instanz von List ist. +com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=Ungültige Konfiguration für verwaltete Bean ''{0}''. Der verwaltete Bean ist als eine Liste konfiguriert, versucht jedoch auch, Zuordnungseinträge oder verwaltete Einträge zu definieren. +com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=Ungültige Konfiguration für verwaltete Bean ''{0}''. Der verwaltete Bean ist als Zuordnung konfiguriert, versucht jedoch auch, verwaltete Eigenschaften zu definieren. +com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=Ungültige Konfiguration für verwaltete Bean ''{0}''. Der verwaltete Bean enthält eine verwaltete Eigenschaft mit dem Namen ''{1}'', sie enthält jedoch einen ungültig definierten Wert und/oder ungültig definierte Zuordnungseinträge. +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=Ungültige Konfiguration für verwaltete Bean ''{0}''. Der verwaltete Bean enthält eine verwaltete Eigenschaft mit dem Namen ''{1}'', sie enthält jedoch auch einen ungültig definierten Wert. +com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=Ungültige Konfiguration für verwaltete Bean ''{0}''. Der verwaltete Bean enthält eine verwaltete Eigenschaft mit dem Namen ''{1}'', die weder Listen- oder Zuordnungseinträge noch Wertelemente enthält. +com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=Fehler beim Konvertieren des Werts ''{0}'' von Typ ''{1}'' in Typ ''{2}'' für verwaltete Bean ''{3}'' +com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=Bean- oder Eigenschaftenklasse ''{0}'' für verwalteten Bean ''{1}'' kann nicht gefunden werden. +com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=Bean- oder Eigenschaftenklasse ''{0}'' für verwaltete Bean ''{1}'' kann aufgrund einer fehlenden Abhängigkeit: {2} nicht geladen werden. +com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=Die verwaltete Bean-Klasse ''{0}'' für den verwalteten Bean ''{1}'' ist nicht öffentlich. +com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=Verwaltete Bean-Klasse ''{0}'' für verwalteten Bean ''{1}'' wird als Abstract oder als Schnittstelle eingestuft. +com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=Die verwaltete Bean-Klasse ''{0}'' für den verwalteten Bean ''{1}'' gibt keinen öffentlichen Constructor ohne Argument vor. com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=Bei der Ressourcen-Einspeisung auf dem verwalteten Bean ''{0}'' ist ein Fehler aufgetreten. -com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=Die Eigenschaft ''{0}'' f\u00fcr den verwalteten Bean ''{1}'' wird mit einer Eigenschaftenklasse von ''{2}'' definiert. Diese Klasse kann der Eigenschaft jedoch nicht zugewiesen werden. -com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=Verwalteter Bean kann nicht selbstgepr\u00fcft werden ''{0}'' -com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=Eigenschaft ''{0}'' f\u00fcr verwalteten Bean "{1}'' ist nicht vorhanden. -com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=Eigenschaft ''{0}'' f\u00fcr verwalteten Bean "{1}'' verf\u00fcgt \u00fcber keinen Setter. -com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=Eigenschaft ''{0}'' f\u00fcr verwalteten Bean ''{1}'' akzeptiert mehr als ein Argument. -com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=Eigenschaft ''{0}'' f\u00fcr verwalteten Bean ''{1}" kann nicht festgelegt werden. +com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=Die Eigenschaft ''{0}'' für den verwalteten Bean ''{1}'' wird mit einer Eigenschaftenklasse von ''{2}'' definiert. Diese Klasse kann der Eigenschaft jedoch nicht zugewiesen werden. +com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=Verwalteter Bean kann nicht selbstgeprüft werden ''{0}'' +com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=Eigenschaft ''{0}'' für verwalteten Bean "{1}'' ist nicht vorhanden. +com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=Eigenschaft ''{0}'' für verwalteten Bean "{1}'' verfügt über keinen Setter. +com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=Eigenschaft ''{0}'' für verwalteten Bean ''{1}'' akzeptiert mehr als ein Argument. +com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=Eigenschaft ''{0}'' für verwalteten Bean ''{1}" kann nicht festgelegt werden. com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=Verwalteter Bean ''{0}'' kann nicht erstellt werden. Die folgenden Probleme wurden gefunden: com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=Faces kann auf Anforderung nicht den verwalteten Bean ''{0}'' erstellen. Die folgenden Probleme wurden gefunden: com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=Unerwarteter Fehler beim Verarbeiten von verwaltetem Bean ''{0}'' com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=Unerwarteter Fehler beim Verarbeiten der verwalteten Eigenschaft ''{0}'' -com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=Bereich ''{0}'' geh\u00f6rt nicht zur Anwendung ''''Ansicht'''', ''''Anforderung'''', ''''Sitzung'''', ''''Anwendung'''', und stellt keine ValueExpression (#{...}) dar. +com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=Bereich ''{0}'' gehört nicht zur Anwendung ''''Ansicht'''', ''''Anforderung'''', ''''Sitzung'''', ''''Anwendung'''', und stellt keine ValueExpression (#{...}) dar. com.sun.faces.MISSING_CLASS_ERROR=Fehlende Klasse: Klasse ''{0}'' kann nicht geladen werden. com.sun.faces.MISSING_RESOURCE_ERROR=Fehlende Ressource: ResourceBundle kann nicht abgerufen werden. -com.sun.faces.MODELUPDATE_ERROR=Modellaktualisierungsfehler f\u00fcr Wert ''{0}'' in Modell''{1}''. -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=Kein \u00fcbereinstimmendes navigation-case-Element von Ansichts-ID ''{0}'' f\u00fcr Ergebnis ''{1}'' gefunden. -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=Kein \u00fcbereinstimmendes navigation-case Element von View ID ''{0}'' f\u00fcr die Aktion ''{1}'' mit dem Ergebnis ''{2}'' gefunden. -com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=Ung\u00fcltige Anforderungszeichenfolge in Ergebnis ''{0}''. +com.sun.faces.MODELUPDATE_ERROR=Modellaktualisierungsfehler für Wert ''{0}'' in Modell''{1}''. +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=Kein übereinstimmendes navigation-case-Element von Ansichts-ID ''{0}'' für Ergebnis ''{1}'' gefunden. +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=Kein übereinstimmendes navigation-case Element von View ID ''{0}'' für die Aktion ''{1}'' mit dem Ergebnis ''{2}'' gefunden. +com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=Ungültige Anforderungszeichenfolge in Ergebnis ''{0}''. com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=Ausdrucksfehler: Benanntes Objekt ''{0}'' nicht gefunden. -com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=Fehler nicht in einer UIComponentTag eingebettet f\u00fcr Tag mit Behandlungsroutineklasse: ''{0}''. -com.sun.faces.NOT_NESTED_IN_TYPE_TAG_ERROR=Der Tag {0} muss in einem Tag eingebettet sein, der mit einer Komponente vom Typ {1} verkn\u00fcpft ist. +com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=Fehler nicht in einer UIComponentTag eingebettet für Tag mit Behandlungsroutineklasse: ''{0}''. +com.sun.faces.NOT_NESTED_IN_TYPE_TAG_ERROR=Der Tag {0} muss in einem Tag eingebettet sein, der mit einer Komponente vom Typ {1} verknüpft ist. com.sun.faces.NO_DTD_FOUND_ERROR=DTD mit PUBLIC ID ''{0}'' unter Pfad ''{1}'' kann nicht ermittelt werden. -com.sun.faces.NULL_BODY_CONTENT_ERROR=BodyContent ist null f\u00fcr Tag mit Behandlungsroutineklasse: ''{0}''. +com.sun.faces.NULL_BODY_CONTENT_ERROR=BodyContent ist null für Tag mit Behandlungsroutineklasse: ''{0}''. com.sun.faces.NULL_COMPONENT_ERROR=Konstruktionsfehler: Komponentenargument ist null. -com.sun.faces.NULL_CONFIGURATION=Keine Konfiguration f\u00fcr die Anwendung geladen. +com.sun.faces.NULL_CONFIGURATION=Keine Konfiguration für die Anwendung geladen. com.sun.faces.NULL_CONTEXT_ERROR=Argumentfehler: Kontextargument ist null. com.sun.faces.NULL_EVENT_ERROR=Argumentfehler: Ereignisargument ist null. com.sun.faces.NULL_FORVALUE=Komponente "{0}" nicht gefunden. @@ -114,38 +114,38 @@ com.sun.faces.NULL_RESPONSE_VIEW_ERROR=Argumentfehler: ResponseView-Argument ist com.sun.faces.NULL_RESPONSE_WRITER_ERROR=Argumentfehler: ResponseWriter-Argument ist null. com.sun.faces.NULL_VIEW_ID=Argument Error: view id argument is null. com.sun.faces.OBJECT_CREATION_ERROR=Ein oder mehr konfigurierte Anwendungsobjekte konnten nicht erstellt werden. Details finden Sie in den Webanwendungsprotokollen. -com.sun.faces.OPTION_NOT_SELECT_ITEM=Argumentfehler: Eine Option f\u00fcr Komponente ''{0}'' war keine Instanz von jakarta.faces.model.SelectItem. Gefundener Typ: ''{1}''. -com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=: Diese Schaltfl\u00e4che ist deaktiviert, da ein Navigationsfall nicht abgeglichen werden konnte. +com.sun.faces.OPTION_NOT_SELECT_ITEM=Argumentfehler: Eine Option für Komponente ''{0}'' war keine Instanz von jakarta.faces.model.SelectItem. Gefundener Typ: ''{1}''. +com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=: Diese Schaltfläche ist deaktiviert, da ein Navigationsfall nicht abgeglichen werden konnte. com.sun.faces.OUTCOME_TARGET_LINK_NO_MATCH=: Dieser Link ist deaktiviert, da ein Navigationsfall nicht abgeglichen werden konnte. -com.sun.faces.PHASE_ID_OUT_OF_BOUNDS=PhaseId \u00fcberschreitet H\u00f6chstwerte f\u00fcr ID: ''{0}''. -com.sun.faces.RENDERER_NOT_FOUND=Renderer nicht gefunden f\u00fcr Renderer-Typ: ''{0}''. -com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=Zustandsfehler: RequestView wurde f\u00fcr diese Anforderung bereits festgelegt. -com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=""Ung\u00fcltiges Ressourcenformat. Eigenschaft ''{0}'' kann nicht analysiert werden." -com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=Ung\u00fcltiges Ressourcenformat Eigenschaft ''{0}'' enth\u00e4lt mehr als einen Doppelpunkt (:). -com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=Ung\u00fcltiges Ressourcenformat Eigenschaft ''{0}'' kann nicht analysiert werden, um Ressourcennamen und Bibliotheksnamen zu extrahieren." +com.sun.faces.PHASE_ID_OUT_OF_BOUNDS=PhaseId überschreitet Höchstwerte für ID: ''{0}''. +com.sun.faces.RENDERER_NOT_FOUND=Renderer nicht gefunden für Renderer-Typ: ''{0}''. +com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=Zustandsfehler: RequestView wurde für diese Anforderung bereits festgelegt. +com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=""Ungültiges Ressourcenformat. Eigenschaft ''{0}'' kann nicht analysiert werden." +com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=Ungültiges Ressourcenformat Eigenschaft ''{0}'' enthält mehr als einen Doppelpunkt (:). +com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=Ungültiges Ressourcenformat Eigenschaft ''{0}'' kann nicht analysiert werden, um Ressourcennamen und Bibliotheksnamen zu extrahieren." com.sun.faces.SAVING_STATE_ERROR=Fehler beim Speichern des Zustands. -com.sun.faces.SUPPORTS_COMPONENT_ERROR=Argumentfehler: ''{0}'' wird f\u00fcr diesen Renderer nicht unterst\u00fctzt. -com.sun.faces.TYPECONVERSION_ERROR=Konvertierungsfehler beim Festlegen von Wert ''{0}'' f\u00fcr ''{1}''. -com.sun.faces.VALIDATION_COMMAND_ERROR=\u00dcberpr\u00fcfungsfehler ''{0}'' muss \u00fcber das Wert- oder Bildattribut verf\u00fcgen. -com.sun.faces.VALIDATION_EL_ERROR=\u00dcberpr\u00fcfungsfehler Ausdruck ung\u00fcltig f\u00fcr:''{0}'' -com.sun.faces.VALIDATION_ID_ERROR=\u00dcberpr\u00fcfungsfehler Die folgenden Faces-Tags m\u00fcssen IDs enthalten:''{0}'' -com.sun.faces.CANNOT_CONVERT=Converter-Instanz kann mit converterId ''{0}'' oder Verbindung ''{1}'' nicht aufgel\u00f6st werden. -com.sun.faces.CANNOT_VALIDATE=Validator-Instanz kann mit validatorId ''{0}'' oder Verbindung ''{1}'' nicht aufgel\u00f6st werden. +com.sun.faces.SUPPORTS_COMPONENT_ERROR=Argumentfehler: ''{0}'' wird für diesen Renderer nicht unterstützt. +com.sun.faces.TYPECONVERSION_ERROR=Konvertierungsfehler beim Festlegen von Wert ''{0}'' für ''{1}''. +com.sun.faces.VALIDATION_COMMAND_ERROR=Überprüfungsfehler ''{0}'' muss über das Wert- oder Bildattribut verfügen. +com.sun.faces.VALIDATION_EL_ERROR=Überprüfungsfehler Ausdruck ungültig für:''{0}'' +com.sun.faces.VALIDATION_ID_ERROR=Überprüfungsfehler Die folgenden Faces-Tags müssen IDs enthalten:''{0}'' +com.sun.faces.CANNOT_CONVERT=Converter-Instanz kann mit converterId ''{0}'' oder Verbindung ''{1}'' nicht aufgelöst werden. +com.sun.faces.CANNOT_VALIDATE=Validator-Instanz kann mit validatorId ''{0}'' oder Verbindung ''{1}'' nicht aufgelöst werden. com.sun.faces.verifier.CLASS_NOT_FOUND=[{0}:{1}] Klasse ist nicht vorhanden. -com.sun.faces.verifier.CLASS_MISSING_DEP=[{0}:{1}] Klasse kann aufgrund einer fehlenden Abh\u00e4ngigkeit nicht geladen werden -> {2} -com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=[{0}:{1}] Klasse enth\u00e4lt einen Constructor ohne Argument, ist jedoch nicht \u00f6ffentlich. -com.sun.faces.verifier.NO_DEF_CTOR=[{0}:{1}] Klasse enth\u00e4lt keinen \u00f6ffentlichen Constructor ohne Argument. +com.sun.faces.verifier.CLASS_MISSING_DEP=[{0}:{1}] Klasse kann aufgrund einer fehlenden Abhängigkeit nicht geladen werden -> {2} +com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=[{0}:{1}] Klasse enthält einen Constructor ohne Argument, ist jedoch nicht öffentlich. +com.sun.faces.verifier.NO_DEF_CTOR=[{0}:{1}] Klasse enthält keinen öffentlichen Constructor ohne Argument. com.sun.faces.verifier.WRONG_TYPE=[{0}:{1}] Klasse implementiert oder erweitert {2} nicht. -com.sun.faces.CYCLIC_REFERENCE_ERROR=Verwalteter Bean ''{0}'' enth\u00e4lt zyklische Referenzen. Auswertungspfad: ''{1}''. -com.sun.faces.OBJECT_IS_READONLY={0}-Objekt ist schreibgesch\u00fctzt. -com.sun.faces.INCORRECT_JSP_VERSION=Die JSP-Version des Containers ist \u00e4lter als 2.1 und kann die EL RI-Ausdrucks-Factory nicht ermitteln, ''{0}''. Wenn Sie JSP oder die EL RI nicht verwenden, achten Sie darauf, dass der Initialisierungsparameter ''{1}'' richtig festgelegt ist. +com.sun.faces.CYCLIC_REFERENCE_ERROR=Verwalteter Bean ''{0}'' enthält zyklische Referenzen. Auswertungspfad: ''{1}''. +com.sun.faces.OBJECT_IS_READONLY={0}-Objekt ist schreibgeschützt. +com.sun.faces.INCORRECT_JSP_VERSION=Die JSP-Version des Containers ist älter als 2.1 und kann die EL RI-Ausdrucks-Factory nicht ermitteln, ''{0}''. Wenn Sie JSP oder die EL RI nicht verwenden, achten Sie darauf, dass der Initialisierungsparameter ''{1}'' richtig festgelegt ist. #com.sun.faces.el.PropertyResolverImpl -com.sun.faces.OUT_OF_BOUNDS_ERROR=Index {1} au\u00dferhalb der Grenzen f\u00fcr {0} +com.sun.faces.OUT_OF_BOUNDS_ERROR=Index {1} außerhalb der Grenzen für {0} com.sun.faces.PROPERTY_TYPE_ERROR={0} ist kein Array- bzw. Listentyp. -com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=Index {1} mit einer L\u00e4nge von {2} au\u00dferhalb der Grenzen f\u00fcr {0}. +com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=Index {1} mit einer Länge von {2} außerhalb der Grenzen für {0}. com.sun.faces.RESTORE_VIEW_ERROR=Ansicht ''{0}'' konnte nicht wiederhergestellt werden. com.sun.faces.CANT_WRITE_ID_ATTRIBUTE=Folgendes ID-Attribut kann nicht geschrieben werden: ''{0}''. @@ -157,8 +157,8 @@ com.sun.faces.JS_RESOURCE_WRITING_ERROR=Die JavaScript-Datei kann nicht in den C com.sun.faces.RESOURCE_TARGET_NOT_AVAILABLE=Eine oder mehrere Ressourcen haben das Ziel ''{0}'', aber es wurde keine Komponente ''{0}'' in der Ansicht definiert. com.sun.faces.ARGUMENTS_NOT_LEGAL_WITH_CC_ATTRS_EXPR=Illegal attempt to pass arguments to a composite component lookup expression (i.e. cc.attrs.[identifier]). com.sun.faces.partial.statesaving.ERROR_RESTORING_STATE_FOR_COMPONENT=Unexpected error restoring state for component with id ''{0}''. Cause: {1}. -com.sun.faces.MISSING_COMPONENT_ATTRIBUTE_VALUE=Folgendes Eigenschaften sind erforderlich, aber leider Sie haben keinen Werte \u00fcbergegeben: ''{0}''. -com.sun.faces.MISSING_COMPONENT_FACET=Folgendes facets(s) sind erforderlich, aber lieder Sie haben keinen Facets \u00fcbergegeben: ''{0}''. -com.sun.faces.MISSING_COMPONENT_METADATA=Composite Component metadata f\u00fcr component clientid ''{0}'' nicht gefunden. +com.sun.faces.MISSING_COMPONENT_ATTRIBUTE_VALUE=Folgendes Eigenschaften sind erforderlich, aber leider Sie haben keinen Werte übergegeben: ''{0}''. +com.sun.faces.MISSING_COMPONENT_FACET=Folgendes facets(s) sind erforderlich, aber lieder Sie haben keinen Facets übergegeben: ''{0}''. +com.sun.faces.MISSING_COMPONENT_METADATA=Composite Component metadata für component clientid ''{0}'' nicht gefunden. com.sun.faces.MISSING_FORM_ERROR=The button/link/text component needs to have a Form in its ancestry. Please add . com.sun.faces.MISSING_METADATA_ERROR=The metadata component needs to be nested within a f:metadata tag. Suggestion: enclose the necessary components within diff --git a/impl/src/main/resources/com/sun/faces/resources/Messages_es.properties b/impl/src/main/resources/com/sun/faces/resources/Messages_es.properties index 8b73da6569..c735e8e7c0 100644 --- a/impl/src/main/resources/com/sun/faces/resources/Messages_es.properties +++ b/impl/src/main/resources/com/sun/faces/resources/Messages_es.properties @@ -15,49 +15,49 @@ # com.sun.faces.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK=No se ha llamado a ctor de ApplicationAssociate ctor en la misma pila de llamadas que ConfigureListener.contextInitialized(). -com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=ApplicationAssociate ya existe para esta aplicaci\u00f3n web. -com.sun.faces.ASSERTION_FAILED=Error de aserci\u00f3n +com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=ApplicationAssociate ya existe para esta aplicación web. +com.sun.faces.ASSERTION_FAILED=Error de aserción com.sun.faces.ATTRIBUTE_NOT_SUPORTED=El atributo ''{0}'' no es compatible con el tipo de componente ''{1}''. com.sun.faces.CANT_CONVERT_VALUE=No se puede convertir la propiedad: ''{0}'' al tipo de valor: ''{1}''. com.sun.faces.CANT_CLOSE_INPUT_STREAM=No se puede cerrar la secuencia de entrada. com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=No se puede crear el ciclo de vida para el ID: ''{0}''. com.sun.faces.CANT_INSTANTIATE_CLASS=No se puede crear la instancia de clase: ''{0}''. -com.sun.faces.CANT_INTROSPECT_CLASS=No se puede crear la introspecci\u00f3n de clase: ''{0}'' -com.sun.faces.CANT_PARSE_FILE=No se puede analizar el archivo: ''{0}'': error en l\u00ednea {1} columna {2}: {3}. +com.sun.faces.CANT_INTROSPECT_CLASS=No se puede crear la introspección de clase: ''{0}'' +com.sun.faces.CANT_PARSE_FILE=No se puede analizar el archivo: ''{0}'': error en línea {1} columna {2}: {3}. com.sun.faces.CHILD_NOT_OF_EXPECTED_TYPE=Se esperaba un componente secundario con el tipo ''{0}'' para el tipo de componente ''{1}({2})''. Encontrado ''{3}''. -com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=: Este v\u00ednculo est\u00e1 deshabilitado, ya que no se ha anidado en un formulario Faces. -com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=Se han encontrado una o varias instancias UICommand dentro de la vista que no se han anidado dentro de UIForm. No se invocar\u00e1n las acciones asociadas a estos comandos. +com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=: Este vínculo está deshabilitado, ya que no se ha anidado en un formulario Faces. +com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=Se han encontrado una o varias instancias UICommand dentro de la vista que no se han anidado dentro de UIForm. No se invocarán las acciones asociadas a estos comandos. com.sun.faces.COMPONENT_NOT_FOUND_ERROR=No se ha encontrado el componente para el identificador: ''{0}''. com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=No se encuentra el componente con ID ''{0}'' en la vista. com.sun.faces.CONTENT_TYPE_ERROR=Tipo de contenido no reconocido. com.sun.faces.CONFIG_RENDERER_REGISTRATION_MISSING_RENDERKIT=No se pueden registrar renderers con RenderKit utilizando el ID {0}. RenderKit no existe. com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=El ID del componente ''{0}'' ya se ha encontrado en la vista. -com.sun.faces.EMPTY_PARAMETER=El par\u00e1metro est\u00e1 vac\u00edo -com.sun.faces.ENCODING_ERROR=Codificaci\u00f3n de caracteres no reconocida. +com.sun.faces.EMPTY_PARAMETER=El parámetro está vacío +com.sun.faces.ENCODING_ERROR=Codificación de caracteres no reconocida. com.sun.faces.ERROR_GETTING_VALUE_BINDING=No se puede obtener ValueBinding para el valor: ''{0}''. -com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=No se puede obtener el valor de la expresi\u00f3n de enlace de valor: ''{0}''. -com.sun.faces.ERROR_OPENING_FILE=No se puede abrir el archivo de configuraci\u00f3n: ''{0}''. -com.sun.faces.ERROR_PROCESSING_CONFIG=Se ha producido un error inesperado durante el procesamiento de configuraci\u00f3n. +com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=No se puede obtener el valor de la expresión de enlace de valor: ''{0}''. +com.sun.faces.ERROR_OPENING_FILE=No se puede abrir el archivo de configuración: ''{0}''. +com.sun.faces.ERROR_PROCESSING_CONFIG=Se ha producido un error inesperado durante el procesamiento de configuración. com.sun.faces.ERROR_REGISTERING_DTD=No se puede registrar el DTD: ''{0}''. com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=No se puede definir la propiedad de bean administrado: ''{0}''. -com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=La evaluaci\u00f3n de la expresi\u00f3n del atributo ''{0}'' ha devuelto un tipo inesperado. Se esperaba {1}, pero se recibi\u00f3 {2}. -com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=Error de construcci\u00f3n: es posible que uno o varios par\u00e1metros de entrada sean nulos. -com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=No se puede determinar la asignaci\u00f3n FaceServlet para la ruta del servlet ''{0}''. +com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=La evaluación de la expresión del atributo ''{0}'' ha devuelto un tipo inesperado. Se esperaba {1}, pero se recibió {2}. +com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=Error de construcción: es posible que uno o varios parámetros de entrada sean nulos. +com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=No se puede determinar la asignación FaceServlet para la ruta del servlet ''{0}''. com.sun.faces.FACES_SERVLET_MAPPING_INCORRECT=FacesServlet no puede tener un url-pattern de '/*'. Por favor defina un url-pattern diferente. -com.sun.faces.FACES_CONTEXT_NOT_FOUND=No hay disponible ning\u00fan contexto FacesContext para procesar esta solicitud. Es probable que esto se deba a que la solicitud se ha enviado a la ruta incorrecta. +com.sun.faces.FACES_CONTEXT_NOT_FOUND=No hay disponible ningún contexto FacesContext para procesar esta solicitud. Es probable que esto se deba a que la solicitud se ha enviado a la ruta incorrecta. com.sun.faces.FILE_NOT_FOUND=No se ha encontrado el archivo para el archivo: ''{0}''. -com.sun.faces.ILLEGAL_ATTEMPT_SETTING_APPLICATION_ARTIFACT=Intento no v\u00e1lido para definir {0} despu\u00e9s de que se haya procesado una respuesta. +com.sun.faces.ILLEGAL_ATTEMPT_SETTING_APPLICATION_ARTIFACT=Intento no válido para definir {0} después de que se haya procesado una respuesta. com.sun.faces.ILLEGAL_CHARACTERS_ERROR=Caracteres no permitidos. -com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=Uso no v\u00e1lido del identificador de objeto impl\u00edcito en modo lValue: ''{0}'' -com.sun.faces.ILLEGAL_MODEL_REFERENCE=Referencia de modelo no v\u00e1lida en este contexto para la expresi\u00f3n ''{0}''. -com.sun.faces.ILLEGAL_VIEW_ID=ID de vista no v\u00e1lido ''{0}''. El ID debe comenzar con ''/'' -com.sun.faces.INVALID_EXPRESSION=Expresi\u00f3n no v\u00e1lida: ''{0}''. -com.sun.faces.INVALID_INIT_PARAM=Valor no v\u00e1lido: ''{0}'', para el par\u00e1metro de inicializaci\u00f3n: ''{1}''. Los valores aceptados son 'true' o 'false'. Se utilizar\u00e1 por defecto 'false'. -com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=Se ha definido una gravedad de mensaje ''{0}'' no v\u00e1lida en la configuraci\u00f3n. -com.sun.faces.INVALID_SCOPE_LIFESPAN=El \u00e1mbito del objeto al que hace referencia la expresi\u00f3n ''{0}'', ''{1}'', es m\u00e1s corto que el \u00e1mbito de ''{3}'' del bean administrado de referencia (''{2}'') +com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=Uso no válido del identificador de objeto implícito en modo lValue: ''{0}'' +com.sun.faces.ILLEGAL_MODEL_REFERENCE=Referencia de modelo no válida en este contexto para la expresión ''{0}''. +com.sun.faces.ILLEGAL_VIEW_ID=ID de vista no válido ''{0}''. El ID debe comenzar con ''/'' +com.sun.faces.INVALID_EXPRESSION=Expresión no válida: ''{0}''. +com.sun.faces.INVALID_INIT_PARAM=Valor no válido: ''{0}'', para el parámetro de inicialización: ''{1}''. Los valores aceptados son 'true' o 'false'. Se utilizará por defecto 'false'. +com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=Se ha definido una gravedad de mensaje ''{0}'' no válida en la configuración. +com.sun.faces.INVALID_SCOPE_LIFESPAN=El ámbito del objeto al que hace referencia la expresión ''{0}'', ''{1}'', es más corto que el ámbito de ''{3}'' del bean administrado de referencia (''{2}'') com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=LifecycleId ya se ha agregado para el ID: ''{0}''. com.sun.faces.LIFECYCLE_ID_NOT_FOUND=LifecycleId no se ha encontrado para el ID ''{0}''. -com.sun.faces.MAXIMUM_EVENTS_REACHED=Se ha alcanzado el n\u00famero m\u00e1ximo de eventos ''{0}''. +com.sun.faces.MAXIMUM_EVENTS_REACHED=Se ha alcanzado el número máximo de eventos ''{0}''. com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=No se puede definir la propiedad de destino ''{0}'' en el bean administrado ''{1}''. La propiedad debe aceptar las instancias de lista o matriz. com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=La propiedad ''{0}'' en el bean administrado ''{1}'' se define como una propiedad de mapa, no obstante el setter de la clase no acepta instancias Map. com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=La propiedad ''{0}'' en el bean administrado ''{1}'' se define como una propiedad de mapa, no obstante el getter de la clase no devuelve instancias Map. @@ -65,96 +65,96 @@ com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=La pr com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=La propiedad ''{0}'' en el bean administrado ''{1}'' se define como una propiedad de lista, no obstante el getter de la clase no devuelve instancias de tipo lista o matriz. com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=La propiedad ''{0}'' en el bean administrado ''{1}'' se ha definido como una propiedad de lista. El getter devuelve un tipo matriz, pero no hay setter asociado. com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=No se puede definir la propiedad de destino ''{0}'' en el bean administrado ''{1}''. La propiedad de destino ha devuelto un valor existente que no era una instancia de lista. -com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=Configuraci\u00f3n incorrecta para el bean administrado ''{0}''. El bean administrado est\u00e1 configurado como una lista, pero tambi\u00e9n intenta definir entradas de mapa o propiedades administradas. -com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=Configuraci\u00f3n incorrecta para el bean administrado ''{0}''. El bean administrado est\u00e1 configurado como una asignaci\u00f3n, pero tambi\u00e9n intenta definir propiedades administradas. -com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=Configuraci\u00f3n incorrecta para el bean administrado ''{0}''. El bean administrado contiene una propiedad denominada ''{1}'' con entradas de lista, pero tiene un valor o entradas de asignaci\u00f3n definidas de forma no v\u00e1lida. -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=Configuraci\u00f3n incorrecta para el bean administrado ''{0}''. El bean administrado contiene una propiedad administrada denominada ''{1}'' con entradas de asignaci\u00f3n, pero tiene tambi\u00e9n un valor definido de forma no v\u00e1lida. -com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=Configuraci\u00f3n incorrecta para el bean administrado ''{0}''. El bean administrado contiene una propiedad administrada denominada ''{1}'' sin entradas de asignaci\u00f3n o lista ni elementos de valor. -com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=Error al realizar la conversi\u00f3n del valor ''{0}'' del tipo ''{1}'' al tipo ''{2}'' para el bean administrado ''{3}''. +com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=Configuración incorrecta para el bean administrado ''{0}''. El bean administrado está configurado como una lista, pero también intenta definir entradas de mapa o propiedades administradas. +com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=Configuración incorrecta para el bean administrado ''{0}''. El bean administrado está configurado como una asignación, pero también intenta definir propiedades administradas. +com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=Configuración incorrecta para el bean administrado ''{0}''. El bean administrado contiene una propiedad denominada ''{1}'' con entradas de lista, pero tiene un valor o entradas de asignación definidas de forma no válida. +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=Configuración incorrecta para el bean administrado ''{0}''. El bean administrado contiene una propiedad administrada denominada ''{1}'' con entradas de asignación, pero tiene también un valor definido de forma no válida. +com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=Configuración incorrecta para el bean administrado ''{0}''. El bean administrado contiene una propiedad administrada denominada ''{1}'' sin entradas de asignación o lista ni elementos de valor. +com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=Error al realizar la conversión del valor ''{0}'' del tipo ''{1}'' al tipo ''{2}'' para el bean administrado ''{3}''. com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=No se encuentra el bean o la clase de propiedad ''{0}'' para el bean administrado ''{1}''. com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=El bean o la clase de propiedad ''{0}'' para el bean administrado ''{1} no se puede cargar debido a que falta una dependencia: {2}. -com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=La clase de bean administrado ''{0}'' para el bean administrado ''{1}'' no se ha declarado p\u00fablica. +com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=La clase de bean administrado ''{0}'' para el bean administrado ''{1}'' no se ha declarado pública. com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=La clase de bean administrado ''{0}'' para el bean administrado ''{1}'' se ha declarado como abstracta o como interfaz. -com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=La clase de bean administrado ''{0}'' para el bean administrado ''{1}'' no declara un constructor sin argumentos p\u00fablico. -com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=Se ha producido un error al realizar la inyecci\u00f3n de recurso en el bean administrado ''{0}'' +com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=La clase de bean administrado ''{0}'' para el bean administrado ''{1}'' no declara un constructor sin argumentos público. +com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=Se ha producido un error al realizar la inyección de recurso en el bean administrado ''{0}'' com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=La propiedad ''{0}'' para el bean administrado ''{1}'' se ha definido con una clase de propiedad ''{2}'', sin embargo, esta clase no se puede asignar a la propiedad. -com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=No se puede realizar la introspecci\u00f3n del bean administrado ''{0}'' +com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=No se puede realizar la introspección del bean administrado ''{0}'' com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=No existe la propiedad ''{0}'' para el bean administrado ''{1}''. com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=La propiedad ''{0}'' para el bean administrado ''{1}'' no tiene setter. -com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=La propiedad ''{0}'' para el bean administrado ''{1}'' acepta m\u00e1s de un argumento +com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=La propiedad ''{0}'' para el bean administrado ''{1}'' acepta más de un argumento com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=No se puede definir la propiedad ''{0}'' para el bean administrado ''{1}'' com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=No se puede crear el bean administrado ''{0}''. Se han encontrado los problemas siguientes: -com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=Faces no podr\u00e1 crear el bean administrado ''{0}'' cuando se solicite. Se han encontrado los problemas siguientes: +com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=Faces no podrá crear el bean administrado ''{0}'' cuando se solicite. Se han encontrado los problemas siguientes: com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=Error inesperado al procesar el bean administrado ''{0}'' com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=Error inesperado al procesar la propiedad administrada ''{0}'' -com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=El \u00e1mbito de ''{0}'' no es ''view'', ''request'', ''session'', ''application'' ni representa un ValueExpression (#{...}) +com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=El ámbito de ''{0}'' no es ''view'', ''request'', ''session'', ''application'' ni representa un ValueExpression (#{...}) com.sun.faces.MISSING_CLASS_ERROR=Falta la clase: no se puede cargar la clase ''{0}''. com.sun.faces.MISSING_RESOURCE_ERROR=Falta el recurso: no se puede obtener ResourceBundle. -com.sun.faces.MODELUPDATE_ERROR=Error de actualizaci\u00f3n de modelo para el valor ''{0}'' en el modelo ''{1}''. -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=No se puede encontrar el caso de navegaci\u00f3n coincidente del ID de vista ''{0}'' para el resultado ''{1}'' -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=No se puede encontrar el caso de navegaci\u00f3n coincidente del ID de vista ''{0}'' para la acci\u00f3n '{1}'' con el resultado ''{2}'' -com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=Cadena de consulta no v\u00e1lida en el resultado ''{0}'' -com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=Error de expresi\u00f3n: objeto con nombre: ''{0}'' no encontrado. -com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=Error de no anidaci\u00f3n UIComponentTag para la etiqueta con clase de controlador: ''{0}''. +com.sun.faces.MODELUPDATE_ERROR=Error de actualización de modelo para el valor ''{0}'' en el modelo ''{1}''. +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=No se puede encontrar el caso de navegación coincidente del ID de vista ''{0}'' para el resultado ''{1}'' +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=No se puede encontrar el caso de navegación coincidente del ID de vista ''{0}'' para la acción '{1}'' con el resultado ''{2}'' +com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=Cadena de consulta no válida en el resultado ''{0}'' +com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=Error de expresión: objeto con nombre: ''{0}'' no encontrado. +com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=Error de no anidación UIComponentTag para la etiqueta con clase de controlador: ''{0}''. com.sun.faces.NOT_NESTED_IN_TYPE_TAG_ERROR=La etiqueta {0} debe ser anidada en una etiqueta asociada a un componente del tipo {1}. -com.sun.faces.NO_DTD_FOUND_ERROR=No se puede ubicar DTD con ID p\u00fablico ''{0}'' en la ruta ''{1}''. +com.sun.faces.NO_DTD_FOUND_ERROR=No se puede ubicar DTD con ID público ''{0}'' en la ruta ''{1}''. com.sun.faces.NULL_BODY_CONTENT_ERROR=BodyContent es nulo para la etiqueta con controlador de clase: ''{0}''. -com.sun.faces.NULL_COMPONENT_ERROR=Error de construcci\u00f3n: el argumento de componente es nulo. -com.sun.faces.NULL_CONFIGURATION=No se ha cargado ninguna configuraci\u00f3n para la aplicaci\u00f3n. +com.sun.faces.NULL_COMPONENT_ERROR=Error de construcción: el argumento de componente es nulo. +com.sun.faces.NULL_CONFIGURATION=No se ha cargado ninguna configuración para la aplicación. com.sun.faces.NULL_CONTEXT_ERROR=Error de argumento: el argumento de contexto es nulo. com.sun.faces.NULL_EVENT_ERROR=Error de argumento: el argumento de evento es nulo. com.sun.faces.NULL_FORVALUE=No se ha encontrado el componente "{0}" com.sun.faces.NULL_HANDLER_ERROR=Error de argumento: el argumento de controlador es nulo. -com.sun.faces.NULL_LOCALE_ERROR=Error de argumento: el argumento de configuraci\u00f3n regional es nulo. -com.sun.faces.NULL_MESSAGE_ERROR=Error de argumento: el par\u00e1metro de mensaje no puede ser nulo -com.sun.faces.NULL_PARAMETERS_ERROR=Error de argumento: el par\u00e1metro ''{0}'' es nulo +com.sun.faces.NULL_LOCALE_ERROR=Error de argumento: el argumento de configuración regional es nulo. +com.sun.faces.NULL_MESSAGE_ERROR=Error de argumento: el parámetro de mensaje no puede ser nulo +com.sun.faces.NULL_PARAMETERS_ERROR=Error de argumento: el parámetro ''{0}'' es nulo com.sun.faces.NULL_REQUEST_VIEW_ERROR=Error de argumento: el argumento RequestView es nulo. com.sun.faces.NULL_RESPONSE_STREAM_ERROR=Error de argumento: el argumento ResponseStream es nulo. com.sun.faces.NULL_RESPONSE_VIEW_ERROR=Error de argumento: el argumento ResponseView es nulo. com.sun.faces.NULL_RESPONSE_WRITER_ERROR=Error de argumento: el argumento ResponseWriter es nulo. com.sun.faces.NULL_VIEW_ID=Argument Error: view id argument is null. -com.sun.faces.OBJECT_CREATION_ERROR=No se han podido crear uno o varios objetos de aplicaci\u00f3n configurados. Compruebe los registros de aplicaci\u00f3n Web para m\u00e1s informaci\u00f3n. -com.sun.faces.OPTION_NOT_SELECT_ITEM=Error de argumento: una opci\u00f3n del componente ''{0}'' no era una instancia de jakarta.faces.model.SelectItem. Tipo encontrado: ''{1}''. -com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=: Este bot\u00f3n est\u00e1 desactivado porque no se ha podido asignar un caso de navegaci\u00f3n. -com.sun.faces.OUTCOME_TARGET_LINK_NO_MATCH=: Este v\u00ednculo est\u00e1 desactivado porque no se ha podido asignar un caso de navegaci\u00f3n. -com.sun.faces.PHASE_ID_OUT_OF_BOUNDS=PhaseId se encuentra fuera de los l\u00edmites para ID: ''{0}''. -com.sun.faces.RENDERER_NOT_FOUND=No se ha encontrado ning\u00fan renderer para el tipo de renderer ''{0}''. +com.sun.faces.OBJECT_CREATION_ERROR=No se han podido crear uno o varios objetos de aplicación configurados. Compruebe los registros de aplicación Web para más información. +com.sun.faces.OPTION_NOT_SELECT_ITEM=Error de argumento: una opción del componente ''{0}'' no era una instancia de jakarta.faces.model.SelectItem. Tipo encontrado: ''{1}''. +com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=: Este botón está desactivado porque no se ha podido asignar un caso de navegación. +com.sun.faces.OUTCOME_TARGET_LINK_NO_MATCH=: Este vínculo está desactivado porque no se ha podido asignar un caso de navegación. +com.sun.faces.PHASE_ID_OUT_OF_BOUNDS=PhaseId se encuentra fuera de los límites para ID: ''{0}''. +com.sun.faces.RENDERER_NOT_FOUND=No se ha encontrado ningún renderer para el tipo de renderer ''{0}''. com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=Error de estado: ya se ha definido RequestView para esta solicitud. -com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=""Formato de recurso no v\u00e1lido. La propiedad ''{0}'' no se puede analizar." -com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=Formato de recurso no v\u00e1lido. La propiedad ''{0}'' contiene m\u00e1s de un signo de dos puntos (:). -com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=Formato de recurso no v\u00e1lido. La propiedad ''{0}'' no se puede analizar para extraer el nombre de recurso y el nombre de biblioteca." +com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=""Formato de recurso no válido. La propiedad ''{0}'' no se puede analizar." +com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=Formato de recurso no válido. La propiedad ''{0}'' contiene más de un signo de dos puntos (:). +com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=Formato de recurso no válido. La propiedad ''{0}'' no se puede analizar para extraer el nombre de recurso y el nombre de biblioteca." com.sun.faces.SAVING_STATE_ERROR=Error al guardar el estado. com.sun.faces.SUPPORTS_COMPONENT_ERROR=Error de argumento: no se admite ''{0}'' para este renderer. -com.sun.faces.TYPECONVERSION_ERROR=Error de conversi\u00f3n al definir el valor ''{0}'' para ''{1}''. -com.sun.faces.VALIDATION_COMMAND_ERROR=Error de validaci\u00f3n. ''{0}'' debe tener un atributo de valor o imagen. -com.sun.faces.VALIDATION_EL_ERROR=Error de validaci\u00f3n. Expresi\u00f3n no v\u00e1lida para: ''{0}'' -com.sun.faces.VALIDATION_ID_ERROR=Error de validaci\u00f3n. Se requiere que las siguientes etiquetas Faces contengan ID:''{0}'' +com.sun.faces.TYPECONVERSION_ERROR=Error de conversión al definir el valor ''{0}'' para ''{1}''. +com.sun.faces.VALIDATION_COMMAND_ERROR=Error de validación. ''{0}'' debe tener un atributo de valor o imagen. +com.sun.faces.VALIDATION_EL_ERROR=Error de validación. Expresión no válida para: ''{0}'' +com.sun.faces.VALIDATION_ID_ERROR=Error de validación. Se requiere que las siguientes etiquetas Faces contengan ID:''{0}'' com.sun.faces.CANNOT_CONVERT=No se puede resolver una instancia Converter mediante converterId ''{0}'' o un enlace ''{1}''. com.sun.faces.CANNOT_VALIDATE=No se puede resolver una instancia Validator mediante validatorId ''{0}'' o un enlace ''{1}''. com.sun.faces.verifier.CLASS_NOT_FOUND=[{0}:{1}] la clase no existe com.sun.faces.verifier.CLASS_MISSING_DEP=[{0}:{1}] la clase no se puede cargar debido a que falta una dependencia -> {2} -com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=[{0}:{1}] la clase contiene un constructor sin argumentos, pero no es p\u00fablico -com.sun.faces.verifier.NO_DEF_CTOR=[{0}:{1}] la clase no contiene ning\u00fan constructor sin argumentos p\u00fablico +com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=[{0}:{1}] la clase contiene un constructor sin argumentos, pero no es público +com.sun.faces.verifier.NO_DEF_CTOR=[{0}:{1}] la clase no contiene ningún constructor sin argumentos público com.sun.faces.verifier.WRONG_TYPE=[{0}:{1}] la clase no implementa o extiende {2} -com.sun.faces.CYCLIC_REFERENCE_ERROR=El bean administrado ''{0}'' contiene referencias c\u00edclicas. Ruta de evaluaci\u00f3n: ''{1}''. -com.sun.faces.OBJECT_IS_READONLY=El objeto {0} es de s\u00f3lo lectura -com.sun.faces.INCORRECT_JSP_VERSION=Parece que la versi\u00f3n JSP del contenedor es m\u00e1s antigua que la 2.1 y no se puede ubicar la f\u00e1brica de expresiones EL RI, ''{0}''. Si no utiliza JSP o EL RI, aseg\u00farese de que el par\u00e1metro de inicializaci\u00f3n de contexto, ''{1}'', est\u00e9 definido correctamente. +com.sun.faces.CYCLIC_REFERENCE_ERROR=El bean administrado ''{0}'' contiene referencias cíclicas. Ruta de evaluación: ''{1}''. +com.sun.faces.OBJECT_IS_READONLY=El objeto {0} es de sólo lectura +com.sun.faces.INCORRECT_JSP_VERSION=Parece que la versión JSP del contenedor es más antigua que la 2.1 y no se puede ubicar la fábrica de expresiones EL RI, ''{0}''. Si no utiliza JSP o EL RI, asegúrese de que el parámetro de inicialización de contexto, ''{1}'', esté definido correctamente. #com.sun.faces.el.PropertyResolverImpl -com.sun.faces.OUT_OF_BOUNDS_ERROR=El \u00edndice {1} se encuentra fuera de los l\u00edmites para {0} +com.sun.faces.OUT_OF_BOUNDS_ERROR=El índice {1} se encuentra fuera de los límites para {0} com.sun.faces.PROPERTY_TYPE_ERROR={0} no es del tipo Matriz o Lista. -com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=El \u00edndice {1} se encuentra fuera de los l\u00edmites para {0} con una longitud de {2} +com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=El índice {1} se encuentra fuera de los límites para {0} con una longitud de {2} com.sun.faces.RESTORE_VIEW_ERROR=No se pudo restablecer la vista ''{0}''. com.sun.faces.CANT_WRITE_ID_ATTRIBUTE=No se puede escribir el atributo de ID: ''{0}''. -com.sun.faces.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR=No est\u00e1 anidado en UIComponentTag. -com.sun.faces.NO_COMPONENT_ASSOCIATED_WITH_UICOMPONENT_TAG=No se ha encontrado ning\u00fan componente asociado a UIComponentTag. +com.sun.faces.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR=No está anidado en UIComponentTag. +com.sun.faces.NO_COMPONENT_ASSOCIATED_WITH_UICOMPONENT_TAG=No se ha encontrado ningún componente asociado a UIComponentTag. com.sun.faces.JS_RESOURCE_WRITING_ERROR=No se puede escribir el archivo JavaScript en el cliente. -com.sun.faces.RESOURCE_TARGET_NOT_AVAILABLE=Uno o m\u00e1s recursos tienen el destino de ''{0}'', pero no se ha definido ning\u00fan componente de ''{0}'' dentro de la vista. +com.sun.faces.RESOURCE_TARGET_NOT_AVAILABLE=Uno o más recursos tienen el destino de ''{0}'', pero no se ha definido ningún componente de ''{0}'' dentro de la vista. com.sun.faces.ARGUMENTS_NOT_LEGAL_WITH_CC_ATTRS_EXPR=Illegal attempt to pass arguments to a composite component lookup expression (i.e. cc.attrs.[identifier]). com.sun.faces.partial.statesaving.ERROR_RESTORING_STATE_FOR_COMPONENT=Unexpected error restoring state for component with id ''{0}''. Cause: {1}. com.sun.faces.MISSING_COMPONENT_ATTRIBUTE_VALUE=The following attribute(s) are required, but no values have been supplied for them: ''{0}''. diff --git a/impl/src/main/resources/com/sun/faces/resources/Messages_fr.properties b/impl/src/main/resources/com/sun/faces/resources/Messages_fr.properties index 8bca84768f..bb93a8be66 100644 --- a/impl/src/main/resources/com/sun/faces/resources/Messages_fr.properties +++ b/impl/src/main/resources/com/sun/faces/resources/Messages_fr.properties @@ -14,151 +14,151 @@ # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 # -com.sun.faces.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK=ApplicationAssociate ctor non appel\u00e9 dans la m\u00eame pile d\u2019appels que ConfigureListener.contextInitialized(). -com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=ApplicationAssociate existe d\u00e9j\u00e0 pour cette application Web. -com.sun.faces.ASSERTION_FAILED=Echec de l\u2019assertion -com.sun.faces.ATTRIBUTE_NOT_SUPORTED=L\u2019attribut \u00ab{0}\u00bb n\u2019est pas pris en charge pour le type de composant \u00ab{1}\u00bb. -com.sun.faces.CANT_CONVERT_VALUE=Impossible de convertir la propri\u00e9t\u00e9 \u00ab{0}\u00bb en type de valeur \u00ab{1}\u00bb. -com.sun.faces.CANT_CLOSE_INPUT_STREAM=Impossible de fermer le flux d\u2019entr\u00e9e. -com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=Impossible de cr\u00e9er le Lifecycle pour l\u2019id \u00ab{0}\u00bb. -com.sun.faces.CANT_INSTANTIATE_CLASS=Impossible d\u2019instancier la classe \u00ab{0}\u00bb. -com.sun.faces.CANT_INTROSPECT_CLASS=Impossible d\u2019appliquer une introspection \u00e0 la classe \u00ab{0}\u00bb. -com.sun.faces.CANT_PARSE_FILE=Impossible d\u2019analyser le fichier \u00ab{0}\u00bb. Erreur \u00e0 la ligne {1} colonne {2} : {3}. -com.sun.faces.CHILD_NOT_OF_EXPECTED_TYPE=Le type de composant enfant \u00ab{0}\u00bb \u00e9tait attendu pour le type de composant \u2019{1}({2})\u2019\u2019. \u00ab{3}\u00bb d\u00e9tect\u00e9. -com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=: ce lien est d\u00e9sactiv\u00e9 car il n\u2019est pas imbriqu\u00e9 dans un formulaire Faces. -com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=Une ou plusieurs instances d\u2019UICommand d\u00e9tect\u00e9es dans la vue et non imbriqu\u00e9es dans un formulaire UIForm. Les actions associ\u00e9es \u00e0 ces commandes ne seront pas invoqu\u00e9es. -com.sun.faces.COMPONENT_NOT_FOUND_ERROR=Composant non d\u00e9tect\u00e9 pour l\u2019identificateur \u00ab{0}\u00bb. -com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=Impossible de d\u00e9tecter le composant dont l\u2019ID est \u00ab{0}\u00bb dans la vue. +com.sun.faces.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK=ApplicationAssociate ctor non appelé dans la même pile d’appels que ConfigureListener.contextInitialized(). +com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=ApplicationAssociate existe déjà pour cette application Web. +com.sun.faces.ASSERTION_FAILED=Echec de l’assertion +com.sun.faces.ATTRIBUTE_NOT_SUPORTED=L’attribut «{0}» n’est pas pris en charge pour le type de composant «{1}». +com.sun.faces.CANT_CONVERT_VALUE=Impossible de convertir la propriété «{0}» en type de valeur «{1}». +com.sun.faces.CANT_CLOSE_INPUT_STREAM=Impossible de fermer le flux d’entrée. +com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=Impossible de créer le Lifecycle pour l’id «{0}». +com.sun.faces.CANT_INSTANTIATE_CLASS=Impossible d’instancier la classe «{0}». +com.sun.faces.CANT_INTROSPECT_CLASS=Impossible d’appliquer une introspection à la classe «{0}». +com.sun.faces.CANT_PARSE_FILE=Impossible d’analyser le fichier «{0}». Erreur à la ligne {1} colonne {2} : {3}. +com.sun.faces.CHILD_NOT_OF_EXPECTED_TYPE=Le type de composant enfant «{0}» était attendu pour le type de composant ’{1}({2})’’. «{3}» détecté. +com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=: ce lien est désactivé car il n’est pas imbriqué dans un formulaire Faces. +com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=Une ou plusieurs instances d’UICommand détectées dans la vue et non imbriquées dans un formulaire UIForm. Les actions associées à ces commandes ne seront pas invoquées. +com.sun.faces.COMPONENT_NOT_FOUND_ERROR=Composant non détecté pour l’identificateur «{0}». +com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=Impossible de détecter le composant dont l’ID est «{0}» dans la vue. com.sun.faces.CONTENT_TYPE_ERROR=Type de contenu non reconnu -com.sun.faces.CONFIG_RENDERER_REGISTRATION_MISSING_RENDERKIT=Impossible d\u2019enregistrer des renderers avec RenderKit \u00e0 l\u2019aide de l\u2019id {0}. RenderKit inexistant. -com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=L\u2019ID de composant \u00ab{0}\u00bb a d\u00e9j\u00e0 \u00e9t\u00e9 d\u00e9tect\u00e9 dans la vue. -com.sun.faces.EMPTY_PARAMETER=Param\u00e8tre vide -com.sun.faces.ENCODING_ERROR=Codage des caract\u00e8res non reconnu -com.sun.faces.ERROR_GETTING_VALUE_BINDING=Impossible d\u2019obtenir la ValueBinding pour la valeur \u00ab{0}\u00bb. -com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=Impossible d\u2019obtenir la valeur de l\u2019expression d\u2019appel par valeur \u00ab{0}\u00bb. -com.sun.faces.ERROR_OPENING_FILE=Impossible d\u2019ouvrir le fichier de configuration \u00ab{0}\u00bb. -com.sun.faces.ERROR_PROCESSING_CONFIG=Une erreur inattendue s\u2019est produite pendant le traitement de la configuration. -com.sun.faces.ERROR_REGISTERING_DTD=Impossible d\u2019enregistrer le fichier DTD \u00ab{0}\u00bb. -com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=Impossible de d\u00e9finir la propri\u00e9t\u00e9 de bean g\u00e9r\u00e9 \u00ab{0}\u00bb. -com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=L\u2019\u00e9valuation de l\u2019expression de l\u2019attribut \u00ab{0}\u00bb a g\u00e9n\u00e9r\u00e9 un type inattendu. Valeur attendue : {1} ; valeur re\u00e7ue : {2}. -com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=Erreur de construction : un ou plusieurs param\u00e8tres d\u2019entr\u00e9e peuvent \u00eatre null. -com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=Impossible de d\u00e9terminer le mappage de FaceServlet pour le chemin de servlet \u00ab{0}\u00bb. -com.sun.faces.FACES_SERVLET_MAPPING_INCORRECT=Le FacesServlet ne peut pas avoir d\u2019\u00e9l\u00e9ment url-pattern \u2019/*\u2019. D\u00e9finissez un autre \u00e9l\u00e9ment url-pattern. -com.sun.faces.FACES_CONTEXT_NOT_FOUND=Aucun FacesContext n\u2019est disponible pour le traitement de cette requ\u00eate. Ceci est probablement d\u00fb au fait que la requ\u00eate a \u00e9t\u00e9 envoy\u00e9e vers un chemin d\u2019acc\u00e8s erron\u00e9. -com.sun.faces.FILE_NOT_FOUND=Fichier non d\u00e9tect\u00e9 pour le fichier \u00ab{0}\u00bb. -com.sun.faces.ILLEGAL_ATTEMPT_SETTING_APPLICATION_ARTIFACT=Tentative non autoris\u00e9e de d\u00e9finition de {0} apr\u00e8s la restitution d\u2019une r\u00e9ponse. -com.sun.faces.ILLEGAL_CHARACTERS_ERROR=Caract\u00e8res non autoris\u00e9s -com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=Utilisation non autoris\u00e9e d\u2019un identificateur d\u2019objet implicite en mode lValue : \u00ab{0}\u00bb -com.sun.faces.ILLEGAL_MODEL_REFERENCE=R\u00e9f\u00e9rence de mod\u00e8le non autoris\u00e9e dans ce contexte pour l\u2019expression \u00ab{0}\u00bb. -com.sun.faces.ILLEGAL_VIEW_ID=ID de vue \u00ab{0}\u00bb non autoris\u00e9. L\u2019ID doit commencer par \u2019\u2019/\u2019\u2019. -com.sun.faces.INVALID_EXPRESSION=Expression non autoris\u00e9e : \u00ab{0}\u00bb. -com.sun.faces.INVALID_INIT_PARAM=Valeur incorrecte : \u00ab{0}\u00bb, pour le param\u00e8tre d\u2019initialisation \u00ab{1}\u00bb. Les valeurs tol\u00e9r\u00e9es sont \u2019true\u2019 ou \u2019false\u2019. D\u00e9finition de la valeur par d\u00e9faut \u2019false\u2019. -com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=Gravit\u00e9 de message non valide \u00ab{0}\u00bb d\u00e9finie dans la configuration. -com.sun.faces.INVALID_SCOPE_LIFESPAN=L\u2019\u00e9tendue de l\u2019objet r\u00e9f\u00e9renc\u00e9 par l\u2019expression \u00ab{0}\u00bb, \u00ab{1}\u00bb, est plus courte que celle du bean g\u00e9r\u00e9 r\u00e9f\u00e9rant (\u00ab{2}\u00bb) \u00ab{3}\u00bb. -com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=LifecycleId d\u00e9j\u00e0 ajout\u00e9 pour l\u2019id \u00ab{0}\u00bb. -com.sun.faces.LIFECYCLE_ID_NOT_FOUND=LifecycleId non d\u00e9tect\u00e9 pour l\u2019id \u00ab{0}\u00bb. -com.sun.faces.MAXIMUM_EVENTS_REACHED=Nombre maximum d\u2019\u00e9v\u00e9nements \u00ab{0}\u00bb atteint. -com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=Impossible de d\u00e9finir la propri\u00e9t\u00e9 cible \u00ab{0}\u00bb dans le bean g\u00e9r\u00e9 \u00ab{1}\u00bb. La propri\u00e9t\u00e9 doit accepter des instances de List ou Array. -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=La propri\u00e9t\u00e9 \u00ab{0}\u00bb du bean g\u00e9r\u00e9 \u00ab{1}\u00bb est d\u00e9finie en tant que propri\u00e9t\u00e9 Map, mais le mutateur de la classe n\u2019accepte pas d\u2019instances de Map. -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=La propri\u00e9t\u00e9 \u00ab{0}\u00bb du bean g\u00e9r\u00e9 \u00ab{1}\u00bb est d\u00e9finie en tant que propri\u00e9t\u00e9 Map, mais le m\u00e9canisme d\u2019obtention de la classe ne renvoie pas d\u2019instances de Map. -com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=La propri\u00e9t\u00e9 \u00ab{0}\u00bb du bean g\u00e9r\u00e9 \u00ab{1}\u00bb est d\u00e9finie en tant que propri\u00e9t\u00e9 list, mais le mutateur de la classe n\u2019accepte pas d\u2019instances de List ou d\u2019Array. -com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=La propri\u00e9t\u00e9 \u00ab{0}\u00bb du bean g\u00e9r\u00e9 \u00ab{1}\u00bb est d\u00e9finie en tant que propri\u00e9t\u00e9 list, mais le m\u00e9canisme d\u2019obtention de la classe ne renvoie pas d\u2019instances de List ou d\u2019Array. -com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=La propri\u00e9t\u00e9 \u00ab{0}\u00bb du bean g\u00e9r\u00e9 \u00ab{1}\u00bb est d\u00e9finie en tant que propri\u00e9t\u00e9 list. Le m\u00e9canisme d\u2019obtention renvoie un type array, mais il n\u2019y a pas de mutateur associ\u00e9. -com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=Impossible de d\u00e9finir la propri\u00e9t\u00e9 cible \u00ab{0}\u00bb dans le bean g\u00e9r\u00e9 \u00ab{1}\u00bb. La propri\u00e9t\u00e9 cible a renvoy\u00e9 une valeur existante qui n\u2019\u00e9tait pas une instance de List. -com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=Configuration incorrecte du bean g\u00e9r\u00e9 \u00ab{0}\u00bb. Le bean g\u00e9r\u00e9 est configur\u00e9 en tant que List, mais tente \u00e9galement de d\u00e9finir des entr\u00e9es de mappage ou des propri\u00e9t\u00e9s g\u00e9r\u00e9es. -com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=Configuration incorrecte du bean g\u00e9r\u00e9 \u00ab{0}\u00bb. Le bean g\u00e9r\u00e9 est configur\u00e9 en tant que Map, mais tente \u00e9galement de d\u00e9finir des propri\u00e9t\u00e9s g\u00e9r\u00e9es. -com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=Configuration incorrecte du bean g\u00e9r\u00e9 \u00ab{0}\u00bb. Le bean g\u00e9r\u00e9 contient une propri\u00e9t\u00e9 g\u00e9r\u00e9e nomm\u00e9e \u00ab{1}\u00bb avec des entr\u00e9es de liste, mais a ill\u00e9galement d\u00e9fini une valeur et/ou des entr\u00e9es de mappage. -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=Configuration incorrecte du bean g\u00e9r\u00e9 \u00ab{0}\u00bb. Le bean g\u00e9r\u00e9 contient une propri\u00e9t\u00e9 g\u00e9r\u00e9e nomm\u00e9e \u00ab{1}\u00bb avec des entr\u00e9es de mappage, mais il a aussi ill\u00e9galement d\u00e9fini une valeur. -com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=Configuration incorrecte du bean g\u00e9r\u00e9 \u00ab{0}\u00bb. Le bean g\u00e9r\u00e9 contient une propri\u00e9t\u00e9 nomm\u00e9e \u00ab{1}\u00bb sans entr\u00e9es de liste ou de mappage ni \u00e9l\u00e9ments de valeur. -com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=Erreur lors de la conversion de la valeur \u00ab{0}\u00bb du bean g\u00e9r\u00e9 \u00ab{3}\u00bb du type \u00ab{1}\u00bb vers le type \u00ab{2}\u00bb. -com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=La classe de bean ou de propri\u00e9t\u00e9 \u00ab{0}\u00bb du bean g\u00e9r\u00e9 \u00ab{1}\u00bb est introuvable. -com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=La classe de bean ou de propri\u00e9t\u00e9 \u00ab{0}\u00bb du bean g\u00e9r\u00e9 \u00ab{1}\u00bb ne peut pas \u00eatre charg\u00e9e \u00e0 cause de l\u2019absence de la d\u00e9pendance {2}. -com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=La classe de bean g\u00e9r\u00e9 \u00ab{0}\u00bb du bean g\u00e9r\u00e9 \u00ab{1}\u00bb n\u2019est pas d\u00e9clar\u00e9e publique. -com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=La classe de bean g\u00e9r\u00e9 \u00ab{0}\u00bb du bean g\u00e9r\u00e9 \u00ab{1}\u00bb est d\u00e9clar\u00e9e abstraite ou en tant qu\u2019interface. -com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=La classe de bean g\u00e9r\u00e9 \u00ab{0}\u00bb du bean g\u00e9r\u00e9 \u00ab{1}\u00bb ne d\u00e9clare pas de constructeur public sans argument. -com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=Erreur lors de l\u2019injection de ressources dans le bean g\u00e9r\u00e9 \u00ab{0}\u00bb -com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=La propri\u00e9t\u00e9 \u00ab{0}\u00bb du bean g\u00e9r\u00e9 \u00ab{1}\u00bb est d\u00e9finie avec une classe de propri\u00e9t\u00e9 de \u00ab{2}\u00bb, mais cette classe ne peut pas \u00eatre affect\u00e9e \u00e0 la propri\u00e9t\u00e9. -com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=Introspection du bean g\u00e9r\u00e9 \u00ab{0}\u00bb impossible -com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=La propri\u00e9t\u00e9 \u00ab{0}\u00bb du bean g\u00e9r\u00e9 \u00ab{1}\u00bb n\u2019existe pas. -com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=La propri\u00e9t\u00e9 \u00ab{0}\u00bb du bean g\u00e9r\u00e9 \u00ab{1}\u00bb n\u2019a pas de mutateur. -com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=La propri\u00e9t\u00e9 \u00ab{0}\u00bb du bean g\u00e9r\u00e9 \u00ab{1}\u00bb accepte plusieurs arguments. -com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=Impossible de d\u00e9finir la propri\u00e9t\u00e9 \u00ab{0}\u00bb du bean g\u00e9r\u00e9 \u00ab{1}\u00bb. -com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=Impossible de cr\u00e9er le bean g\u00e9r\u00e9 \u00ab{0}\u00bb. Les probl\u00e8mes suivants ont \u00e9t\u00e9 d\u00e9tect\u00e9s\u00a0: -com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=Faces ne pourra pas cr\u00e9\u00e9 le bean g\u00e9r\u00e9 \u00ab{0}\u00bb lorsqu\u2019il sera demand\u00e9. Les probl\u00e8mes suivants ont \u00e9t\u00e9 d\u00e9tect\u00e9s\u00a0: -com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=Erreur inattendue lors du traitement du bean g\u00e9r\u00e9 \u00ab{0}\u00bb -com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=Erreur inattendue lors du traitement de la propri\u00e9t\u00e9 g\u00e9r\u00e9e \u00ab{0}\u00bb -com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=L\u2019\u00e9tendue \u00ab{0}\u00bb ne repr\u00e9sente ni \u2019\u2019view\u2019\u2019, \u2019\u2019request\u2019\u2019, \u2019\u2019session\u2019\u2019, \u2019\u2019application\u2019\u2019, ni une ValueExpression (#{...}). -com.sun.faces.MISSING_CLASS_ERROR=Classe manquante\u00a0: impossible de charger la classe \u00ab{0}\u00bb. -com.sun.faces.MISSING_RESOURCE_ERROR=Ressource manquante\u00a0: impossible d\u2019obtenir le ResourceBundle. -com.sun.faces.MODELUPDATE_ERROR=Echec de la mise \u00e0 jour du mod\u00e8le pour la valeur \u00ab{0}\u00bb du mod\u00e8le \u00ab{1}\u00bb. -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=Impossible de trouver un cas de navigation correspondant depuis l\u2019ID de vue \u00ab{0}\u00bb pour le r\u00e9sultat \u00ab{1}\u00bb -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=Impossible de trouver un cas de navigation correspondant depuis l\u2019ID de vue \u00ab{0}\u00bb pour l\u2019action \u00ab{1}\u00bb avec le r\u00e9sultat \u00ab{2}\u00bb. -com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=Cha\u00eene de requ\u00eate non valide dans le r\u00e9sultat \u00ab{0}\u00bb -com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=Erreur d\u2019expression : objet nomm\u00e9 \u00ab{0}\u00bb non d\u00e9tect\u00e9 -com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=Non imbriqu\u00e9 dans une erreur UIComponentTag pour la balise avec classe de gestionnaire \u00ab{0}\u00bb. -com.sun.faces.NOT_NESTED_IN_TYPE_TAG_ERROR=La balise {0} doit \u00eatre imbriqu\u00e9e dans une balise associ\u00e9e \u00e0 un composant du type {1}. -com.sun.faces.NO_DTD_FOUND_ERROR=Impossible de localiser un fichier DTD avec PUBLIC ID \u00ab{0}\u00bb \u00e0 l\u2019adresse \u00ab{1}\u00bb. -com.sun.faces.NULL_BODY_CONTENT_ERROR=BodyContent est null pour la balise avec classe de gestionnaire \u00ab{0}\u00bb. -com.sun.faces.NULL_COMPONENT_ERROR=Erreur de construction : l\u2019argument du composant est null. -com.sun.faces.NULL_CONFIGURATION=Aucune configuration charg\u00e9e pour l\u2019application -com.sun.faces.NULL_CONTEXT_ERROR=Erreur d\u2019argument : l\u2019argument du contexte est null. -com.sun.faces.NULL_EVENT_ERROR=Erreur d\u2019argument : l\u2019argument de l\u2019\u00e9v\u00e9nement est null. -com.sun.faces.NULL_FORVALUE=Composant "{0}" non d\u00e9tect\u00e9 -com.sun.faces.NULL_HANDLER_ERROR=Erreur d\u2019argument : l\u2019argument de Handler est null. -com.sun.faces.NULL_LOCALE_ERROR=Erreur d\u2019argument : l\u2019argument de Locale est null. -com.sun.faces.NULL_MESSAGE_ERROR=Erreur d\u2019argument : le param\u00e8tre Message ne peut pas \u00eatre null. -com.sun.faces.NULL_PARAMETERS_ERROR=Erreur d\u2019argument : le param\u00e8tre \u00ab{0}\u00bb est null. -com.sun.faces.NULL_REQUEST_VIEW_ERROR=Erreur d\u2019argument : l\u2019argument Request View est null. -com.sun.faces.NULL_RESPONSE_STREAM_ERROR=Erreur d\u2019argument : l\u2019argument ResponseStream est null. -com.sun.faces.NULL_RESPONSE_VIEW_ERROR=Erreur d\u2019argument : l\u2019argument ResponseView est null. -com.sun.faces.NULL_RESPONSE_WRITER_ERROR=Erreur d\u2019argument : l\u2019argument ResponseWriter est null. +com.sun.faces.CONFIG_RENDERER_REGISTRATION_MISSING_RENDERKIT=Impossible d’enregistrer des renderers avec RenderKit à l’aide de l’id {0}. RenderKit inexistant. +com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=L’ID de composant «{0}» a déjà été détecté dans la vue. +com.sun.faces.EMPTY_PARAMETER=Paramètre vide +com.sun.faces.ENCODING_ERROR=Codage des caractères non reconnu +com.sun.faces.ERROR_GETTING_VALUE_BINDING=Impossible d’obtenir la ValueBinding pour la valeur «{0}». +com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=Impossible d’obtenir la valeur de l’expression d’appel par valeur «{0}». +com.sun.faces.ERROR_OPENING_FILE=Impossible d’ouvrir le fichier de configuration «{0}». +com.sun.faces.ERROR_PROCESSING_CONFIG=Une erreur inattendue s’est produite pendant le traitement de la configuration. +com.sun.faces.ERROR_REGISTERING_DTD=Impossible d’enregistrer le fichier DTD «{0}». +com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=Impossible de définir la propriété de bean géré «{0}». +com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=L’évaluation de l’expression de l’attribut «{0}» a généré un type inattendu. Valeur attendue : {1} ; valeur reçue : {2}. +com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=Erreur de construction : un ou plusieurs paramètres d’entrée peuvent être null. +com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=Impossible de déterminer le mappage de FaceServlet pour le chemin de servlet «{0}». +com.sun.faces.FACES_SERVLET_MAPPING_INCORRECT=Le FacesServlet ne peut pas avoir d’élément url-pattern ’/*’. Définissez un autre élément url-pattern. +com.sun.faces.FACES_CONTEXT_NOT_FOUND=Aucun FacesContext n’est disponible pour le traitement de cette requête. Ceci est probablement dû au fait que la requête a été envoyée vers un chemin d’accès erroné. +com.sun.faces.FILE_NOT_FOUND=Fichier non détecté pour le fichier «{0}». +com.sun.faces.ILLEGAL_ATTEMPT_SETTING_APPLICATION_ARTIFACT=Tentative non autorisée de définition de {0} après la restitution d’une réponse. +com.sun.faces.ILLEGAL_CHARACTERS_ERROR=Caractères non autorisés +com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=Utilisation non autorisée d’un identificateur d’objet implicite en mode lValue : «{0}» +com.sun.faces.ILLEGAL_MODEL_REFERENCE=Référence de modèle non autorisée dans ce contexte pour l’expression «{0}». +com.sun.faces.ILLEGAL_VIEW_ID=ID de vue «{0}» non autorisé. L’ID doit commencer par ’’/’’. +com.sun.faces.INVALID_EXPRESSION=Expression non autorisée : «{0}». +com.sun.faces.INVALID_INIT_PARAM=Valeur incorrecte : «{0}», pour le paramètre d’initialisation «{1}». Les valeurs tolérées sont ’true’ ou ’false’. Définition de la valeur par défaut ’false’. +com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=Gravité de message non valide «{0}» définie dans la configuration. +com.sun.faces.INVALID_SCOPE_LIFESPAN=L’étendue de l’objet référencé par l’expression «{0}», «{1}», est plus courte que celle du bean géré référant («{2}») «{3}». +com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=LifecycleId déjà ajouté pour l’id «{0}». +com.sun.faces.LIFECYCLE_ID_NOT_FOUND=LifecycleId non détecté pour l’id «{0}». +com.sun.faces.MAXIMUM_EVENTS_REACHED=Nombre maximum d’événements «{0}» atteint. +com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=Impossible de définir la propriété cible «{0}» dans le bean géré «{1}». La propriété doit accepter des instances de List ou Array. +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=La propriété «{0}» du bean géré «{1}» est définie en tant que propriété Map, mais le mutateur de la classe n’accepte pas d’instances de Map. +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=La propriété «{0}» du bean géré «{1}» est définie en tant que propriété Map, mais le mécanisme d’obtention de la classe ne renvoie pas d’instances de Map. +com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=La propriété «{0}» du bean géré «{1}» est définie en tant que propriété list, mais le mutateur de la classe n’accepte pas d’instances de List ou d’Array. +com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=La propriété «{0}» du bean géré «{1}» est définie en tant que propriété list, mais le mécanisme d’obtention de la classe ne renvoie pas d’instances de List ou d’Array. +com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=La propriété «{0}» du bean géré «{1}» est définie en tant que propriété list. Le mécanisme d’obtention renvoie un type array, mais il n’y a pas de mutateur associé. +com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=Impossible de définir la propriété cible «{0}» dans le bean géré «{1}». La propriété cible a renvoyé une valeur existante qui n’était pas une instance de List. +com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=Configuration incorrecte du bean géré «{0}». Le bean géré est configuré en tant que List, mais tente également de définir des entrées de mappage ou des propriétés gérées. +com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=Configuration incorrecte du bean géré «{0}». Le bean géré est configuré en tant que Map, mais tente également de définir des propriétés gérées. +com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=Configuration incorrecte du bean géré «{0}». Le bean géré contient une propriété gérée nommée «{1}» avec des entrées de liste, mais a illégalement défini une valeur et/ou des entrées de mappage. +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=Configuration incorrecte du bean géré «{0}». Le bean géré contient une propriété gérée nommée «{1}» avec des entrées de mappage, mais il a aussi illégalement défini une valeur. +com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=Configuration incorrecte du bean géré «{0}». Le bean géré contient une propriété nommée «{1}» sans entrées de liste ou de mappage ni éléments de valeur. +com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=Erreur lors de la conversion de la valeur «{0}» du bean géré «{3}» du type «{1}» vers le type «{2}». +com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=La classe de bean ou de propriété «{0}» du bean géré «{1}» est introuvable. +com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=La classe de bean ou de propriété «{0}» du bean géré «{1}» ne peut pas être chargée à cause de l’absence de la dépendance {2}. +com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=La classe de bean géré «{0}» du bean géré «{1}» n’est pas déclarée publique. +com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=La classe de bean géré «{0}» du bean géré «{1}» est déclarée abstraite ou en tant qu’interface. +com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=La classe de bean géré «{0}» du bean géré «{1}» ne déclare pas de constructeur public sans argument. +com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=Erreur lors de l’injection de ressources dans le bean géré «{0}» +com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=La propriété «{0}» du bean géré «{1}» est définie avec une classe de propriété de «{2}», mais cette classe ne peut pas être affectée à la propriété. +com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=Introspection du bean géré «{0}» impossible +com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=La propriété «{0}» du bean géré «{1}» n’existe pas. +com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=La propriété «{0}» du bean géré «{1}» n’a pas de mutateur. +com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=La propriété «{0}» du bean géré «{1}» accepte plusieurs arguments. +com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=Impossible de définir la propriété «{0}» du bean géré «{1}». +com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=Impossible de créer le bean géré «{0}». Les problèmes suivants ont été détectés : +com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=Faces ne pourra pas créé le bean géré «{0}» lorsqu’il sera demandé. Les problèmes suivants ont été détectés : +com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=Erreur inattendue lors du traitement du bean géré «{0}» +com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=Erreur inattendue lors du traitement de la propriété gérée «{0}» +com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=L’étendue «{0}» ne représente ni ’’view’’, ’’request’’, ’’session’’, ’’application’’, ni une ValueExpression (#{...}). +com.sun.faces.MISSING_CLASS_ERROR=Classe manquante : impossible de charger la classe «{0}». +com.sun.faces.MISSING_RESOURCE_ERROR=Ressource manquante : impossible d’obtenir le ResourceBundle. +com.sun.faces.MODELUPDATE_ERROR=Echec de la mise à jour du modèle pour la valeur «{0}» du modèle «{1}». +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=Impossible de trouver un cas de navigation correspondant depuis l’ID de vue «{0}» pour le résultat «{1}» +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=Impossible de trouver un cas de navigation correspondant depuis l’ID de vue «{0}» pour l’action «{1}» avec le résultat «{2}». +com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=Chaîne de requête non valide dans le résultat «{0}» +com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=Erreur d’expression : objet nommé «{0}» non détecté +com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=Non imbriqué dans une erreur UIComponentTag pour la balise avec classe de gestionnaire «{0}». +com.sun.faces.NOT_NESTED_IN_TYPE_TAG_ERROR=La balise {0} doit être imbriquée dans une balise associée à un composant du type {1}. +com.sun.faces.NO_DTD_FOUND_ERROR=Impossible de localiser un fichier DTD avec PUBLIC ID «{0}» à l’adresse «{1}». +com.sun.faces.NULL_BODY_CONTENT_ERROR=BodyContent est null pour la balise avec classe de gestionnaire «{0}». +com.sun.faces.NULL_COMPONENT_ERROR=Erreur de construction : l’argument du composant est null. +com.sun.faces.NULL_CONFIGURATION=Aucune configuration chargée pour l’application +com.sun.faces.NULL_CONTEXT_ERROR=Erreur d’argument : l’argument du contexte est null. +com.sun.faces.NULL_EVENT_ERROR=Erreur d’argument : l’argument de l’événement est null. +com.sun.faces.NULL_FORVALUE=Composant "{0}" non détecté +com.sun.faces.NULL_HANDLER_ERROR=Erreur d’argument : l’argument de Handler est null. +com.sun.faces.NULL_LOCALE_ERROR=Erreur d’argument : l’argument de Locale est null. +com.sun.faces.NULL_MESSAGE_ERROR=Erreur d’argument : le paramètre Message ne peut pas être null. +com.sun.faces.NULL_PARAMETERS_ERROR=Erreur d’argument : le paramètre «{0}» est null. +com.sun.faces.NULL_REQUEST_VIEW_ERROR=Erreur d’argument : l’argument Request View est null. +com.sun.faces.NULL_RESPONSE_STREAM_ERROR=Erreur d’argument : l’argument ResponseStream est null. +com.sun.faces.NULL_RESPONSE_VIEW_ERROR=Erreur d’argument : l’argument ResponseView est null. +com.sun.faces.NULL_RESPONSE_WRITER_ERROR=Erreur d’argument : l’argument ResponseWriter est null. com.sun.faces.NULL_VIEW_ID=Argument Error: view id argument is null. -com.sun.faces.OBJECT_CREATION_ERROR=Un ou plusieurs objets d\u2019application configur\u00e9s n\u2019ont pas pu \u00eatre cr\u00e9\u00e9s. V\u00e9rifiez les journaux de votre application Web pour plus de d\u00e9tails. -com.sun.faces.OPTION_NOT_SELECT_ITEM=Erreur d\u2019argument : une option du composant \u00ab{0}\u00bb n\u2019\u00e9tait pas une instance de jakarta.faces.model.SelectItem. Type d\u00e9tect\u00e9\u00a0: \u00ab{1}\u00bb. -com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=: ce bouton est d\u00e9sactiv\u00e9 car un cas de navigation n\u2019a pas eu de correspondance. -com.sun.faces.OUTCOME_TARGET_LINK_NO_MATCH=: ce lien est d\u00e9sactiv\u00e9 car un cas de navigation n\u2019a pas eu de correspondance. -com.sun.faces.PHASE_ID_OUT_OF_BOUNDS=PhaseId hors limites pour l\u2019id \u00ab{0}\u00bb. -com.sun.faces.RENDERER_NOT_FOUND=Renderer non d\u00e9tect\u00e9 pour le type de Renderer \u00ab{0}\u00bb. -com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=Erreur d\u2019\u00e9tat : RequestView a d\u00e9j\u00e0 \u00e9t\u00e9 d\u00e9fini pour cette requ\u00eate. -com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=""Format de ressource non valide. La propri\u00e9t\u00e9 \u00ab{0}\u00bb ne peut pas \u00eatre analys\u00e9e." -com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=Format de ressource non valide. La propri\u00e9t\u00e9 \u00ab{0}\u00bb contient plusieurs caract\u00e8res deux-points (:). -com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=Format de ressource non valide. La propri\u00e9t\u00e9 \u00ab{0}\u00bb ne peut pas \u00eatre analys\u00e9e pour extraire le nom de la ressource et le nom de la biblioth\u00e8que." -com.sun.faces.SAVING_STATE_ERROR=Erreur lors de l\u2019enregistrement de l\u2019\u00e9tat. -com.sun.faces.SUPPORTS_COMPONENT_ERROR=Erreur d\u2019argument : \u00ab{0}\u00bb n\u2019est pas pris en charge pour ce renderer. -com.sun.faces.TYPECONVERSION_ERROR=Erreur de conversion lors de la d\u00e9finition de la valeur \u00ab{0}\u00bb pour \u00ab{1}\u00bb. -com.sun.faces.VALIDATION_COMMAND_ERROR=Erreur de validation \u00ab{0}\u00bb doit avoir une valeur ou un attribut d\u2019image. -com.sun.faces.VALIDATION_EL_ERROR=Erreur de validation Expression non valide pour \u00ab{0}\u00bb -com.sun.faces.VALIDATION_ID_ERROR=Erreur de validation Les balises Faces suivantes doivent contenir des ID : \u00ab{0}\u00bb -com.sun.faces.CANNOT_CONVERT=Impossible de r\u00e9soudre une instance de Converter \u00e0 l\u2019aide de converterId \u00ab{0}\u00bb ou de binding \u00ab{1}\u00bb. -com.sun.faces.CANNOT_VALIDATE=Impossible de r\u00e9soudre une instance de Validator \u00e0 l\u2019aide de validatorId \u00ab{0}\u00bb ou de binding \u00ab{1}\u00bb. -com.sun.faces.verifier.CLASS_NOT_FOUND=La classe [{0}:{1}] n\u2019existe pas. -com.sun.faces.verifier.CLASS_MISSING_DEP=Impossible de charger la classe [{0}:{1}] en l\u2019absence de la d\u00e9pendance -> {2} -com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=La classe [{0}:{1}] contient un constructeur sans argument, mais n\u2019est pas publique. +com.sun.faces.OBJECT_CREATION_ERROR=Un ou plusieurs objets d’application configurés n’ont pas pu être créés. Vérifiez les journaux de votre application Web pour plus de détails. +com.sun.faces.OPTION_NOT_SELECT_ITEM=Erreur d’argument : une option du composant «{0}» n’était pas une instance de jakarta.faces.model.SelectItem. Type détecté : «{1}». +com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=: ce bouton est désactivé car un cas de navigation n’a pas eu de correspondance. +com.sun.faces.OUTCOME_TARGET_LINK_NO_MATCH=: ce lien est désactivé car un cas de navigation n’a pas eu de correspondance. +com.sun.faces.PHASE_ID_OUT_OF_BOUNDS=PhaseId hors limites pour l’id «{0}». +com.sun.faces.RENDERER_NOT_FOUND=Renderer non détecté pour le type de Renderer «{0}». +com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=Erreur d’état : RequestView a déjà été défini pour cette requête. +com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=""Format de ressource non valide. La propriété «{0}» ne peut pas être analysée." +com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=Format de ressource non valide. La propriété «{0}» contient plusieurs caractères deux-points (:). +com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=Format de ressource non valide. La propriété «{0}» ne peut pas être analysée pour extraire le nom de la ressource et le nom de la bibliothèque." +com.sun.faces.SAVING_STATE_ERROR=Erreur lors de l’enregistrement de l’état. +com.sun.faces.SUPPORTS_COMPONENT_ERROR=Erreur d’argument : «{0}» n’est pas pris en charge pour ce renderer. +com.sun.faces.TYPECONVERSION_ERROR=Erreur de conversion lors de la définition de la valeur «{0}» pour «{1}». +com.sun.faces.VALIDATION_COMMAND_ERROR=Erreur de validation «{0}» doit avoir une valeur ou un attribut d’image. +com.sun.faces.VALIDATION_EL_ERROR=Erreur de validation Expression non valide pour «{0}» +com.sun.faces.VALIDATION_ID_ERROR=Erreur de validation Les balises Faces suivantes doivent contenir des ID : «{0}» +com.sun.faces.CANNOT_CONVERT=Impossible de résoudre une instance de Converter à l’aide de converterId «{0}» ou de binding «{1}». +com.sun.faces.CANNOT_VALIDATE=Impossible de résoudre une instance de Validator à l’aide de validatorId «{0}» ou de binding «{1}». +com.sun.faces.verifier.CLASS_NOT_FOUND=La classe [{0}:{1}] n’existe pas. +com.sun.faces.verifier.CLASS_MISSING_DEP=Impossible de charger la classe [{0}:{1}] en l’absence de la dépendance -> {2} +com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=La classe [{0}:{1}] contient un constructeur sans argument, mais n’est pas publique. com.sun.faces.verifier.NO_DEF_CTOR=La classe [{0}:{1}] ne contient pas de constructeur public sans argument. -com.sun.faces.verifier.WRONG_TYPE=La classe [{0}:{1}] n\u2019impl\u00e9mente pas ni n\u2019\u00e9tend {2}. +com.sun.faces.verifier.WRONG_TYPE=La classe [{0}:{1}] n’implémente pas ni n’étend {2}. -com.sun.faces.CYCLIC_REFERENCE_ERROR=Le bean g\u00e9r\u00e9 \u00ab{0}\u00bb contient des r\u00e9f\u00e9rences cycliques. Chemin d\u2019\u00e9valuation : \u00ab{1}\u00bb. -com.sun.faces.OBJECT_IS_READONLY=L\u2019objet {0} est en lecture seule. -com.sun.faces.INCORRECT_JSP_VERSION=Il semble que la version JSP du conteneur soit ant\u00e9rieure \u00e0 2.1 et soit donc incapable de localiser la fabrique d\u2019expressions EL RI, \u00ab{0}\u00bb. Si vous n\u2019utilisez ni JSP ni la fabrique EL RI, assurez-vous que le param\u00e8tre d\u2019initialisation du contexte, \u00ab{1}\u00bb, soit d\u00e9fini correctement. +com.sun.faces.CYCLIC_REFERENCE_ERROR=Le bean géré «{0}» contient des références cycliques. Chemin d’évaluation : «{1}». +com.sun.faces.OBJECT_IS_READONLY=L’objet {0} est en lecture seule. +com.sun.faces.INCORRECT_JSP_VERSION=Il semble que la version JSP du conteneur soit antérieure à 2.1 et soit donc incapable de localiser la fabrique d’expressions EL RI, «{0}». Si vous n’utilisez ni JSP ni la fabrique EL RI, assurez-vous que le paramètre d’initialisation du contexte, «{1}», soit défini correctement. #com.sun.faces.el.PropertyResolverImpl com.sun.faces.OUT_OF_BOUNDS_ERROR=Index {1} hors limites pour {0} -com.sun.faces.PROPERTY_TYPE_ERROR={0} n\u2019est pas de type Array ou List. +com.sun.faces.PROPERTY_TYPE_ERROR={0} n’est pas de type Array ou List. com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=Index {1} hors limites pour {0} avec une longueur de {2} -com.sun.faces.RESTORE_VIEW_ERROR=La vue \u00ab{0}\u00bb n\u2019a pas pu \u00eatre restaur\u00e9e. +com.sun.faces.RESTORE_VIEW_ERROR=La vue «{0}» n’a pas pu être restaurée. -com.sun.faces.CANT_WRITE_ID_ATTRIBUTE=Impossible d\u2019\u00e9crire l\u2019attribut d\u2019ID \u00ab{0}\u00bb. -com.sun.faces.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR=Non imbriqu\u00e9 dans un UIComponentTag. -com.sun.faces.NO_COMPONENT_ASSOCIATED_WITH_UICOMPONENT_TAG=Aucun composant n\u2019est associ\u00e9 \u00e0 UIComponentTag. +com.sun.faces.CANT_WRITE_ID_ATTRIBUTE=Impossible d’écrire l’attribut d’ID «{0}». +com.sun.faces.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR=Non imbriqué dans un UIComponentTag. +com.sun.faces.NO_COMPONENT_ASSOCIATED_WITH_UICOMPONENT_TAG=Aucun composant n’est associé à UIComponentTag. -com.sun.faces.JS_RESOURCE_WRITING_ERROR=Impossible d\u2019\u00e9crire le fichier JavaScript sur le client. +com.sun.faces.JS_RESOURCE_WRITING_ERROR=Impossible d’écrire le fichier JavaScript sur le client. -com.sun.faces.RESOURCE_TARGET_NOT_AVAILABLE=Une ou plusieurs ressources partagent la cible \u00ab{0}\u00bb, mais aucun composant \u00ab{0}\u00bb n\u2019a \u00e9t\u00e9 d\u00e9fini dans la vue. +com.sun.faces.RESOURCE_TARGET_NOT_AVAILABLE=Une ou plusieurs ressources partagent la cible «{0}», mais aucun composant «{0}» n’a été défini dans la vue. com.sun.faces.ARGUMENTS_NOT_LEGAL_WITH_CC_ATTRS_EXPR=Illegal attempt to pass arguments to a composite component lookup expression (i.e. cc.attrs.[identifier]). -com.sun.faces.partial.statesaving.ERROR_RESTORING_STATE_FOR_COMPONENT=Unexpected error restoring state for component with id \u00ab{0}\u00bb. Cause: {1}. -com.sun.faces.MISSING_COMPONENT_ATTRIBUTE_VALUE=The following attribute(s) are required, but no values have been supplied for them: \u00ab{0}\u00bb. -com.sun.faces.MISSING_COMPONENT_FACET=The following facets(s) are required, but no facets have been supplied for them: \u00ab{0}\u00bb. -com.sun.faces.MISSING_COMPONENT_METADATA=The composite component metadata for component with clientid \u00ab{0}\u00bb cannot be found. +com.sun.faces.partial.statesaving.ERROR_RESTORING_STATE_FOR_COMPONENT=Unexpected error restoring state for component with id «{0}». Cause: {1}. +com.sun.faces.MISSING_COMPONENT_ATTRIBUTE_VALUE=The following attribute(s) are required, but no values have been supplied for them: «{0}». +com.sun.faces.MISSING_COMPONENT_FACET=The following facets(s) are required, but no facets have been supplied for them: «{0}». +com.sun.faces.MISSING_COMPONENT_METADATA=The composite component metadata for component with clientid «{0}» cannot be found. com.sun.faces.MISSING_FORM_ERROR=The button/link/text component needs to have a Form in its ancestry. Please add . com.sun.faces.MISSING_METADATA_ERROR=The metadata component needs to be nested within a f:metadata tag. Suggestion: enclose the necessary components within diff --git a/impl/src/main/resources/com/sun/faces/resources/Messages_ja.properties b/impl/src/main/resources/com/sun/faces/resources/Messages_ja.properties index 31381e58e8..041665b88d 100644 --- a/impl/src/main/resources/com/sun/faces/resources/Messages_ja.properties +++ b/impl/src/main/resources/com/sun/faces/resources/Messages_ja.properties @@ -14,147 +14,147 @@ # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 # -com.sun.faces.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK=ApplicationAssociate \u306f\u3001ConfigureListener.contextInitialized() \u3068\u540c\u3058\u547c\u3073\u51fa\u3057\u30b9\u30bf\u30c3\u30af\u3067\u547c\u3073\u51fa\u3055\u308c\u307e\u305b\u3093\u3067\u3057\u305f\u3002 -com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=ApplicationAssociate \u306f\u3001\u3059\u3067\u306b\u3053\u306e Web \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u5b58\u5728\u3057\u3066\u3044\u307e\u3059\u3002 -com.sun.faces.ASSERTION_FAILED=\u8868\u660e\u306b\u5931\u6557\u3057\u307e\u3057\u305f -com.sun.faces.ATTRIBUTE_NOT_SUPORTED=\u5c5e\u6027 ''{0}'' \u306f\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30bf\u30a4\u30d7 ''{1}'' \u3067\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u307e\u305b\u3093\u3002 -com.sun.faces.CANT_CONVERT_VALUE=\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u3092\u5024\u30bf\u30a4\u30d7 ''{1}'' \u306b\u5909\u63db\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.CANT_CLOSE_INPUT_STREAM=\u5165\u529b\u30b9\u30c8\u30ea\u30fc\u30e0\u3092\u9589\u3058\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=ID ''{0}'' \u306e\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.CANT_INSTANTIATE_CLASS=\u30af\u30e9\u30b9 ''{0}'' \u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.CANT_INTROSPECT_CLASS=\u30af\u30e9\u30b9\u3092\u30a4\u30f3\u30c8\u30ed\u30b9\u30da\u30af\u30c8\u3067\u304d\u307e\u305b\u3093: ''{0}'' -com.sun.faces.CANT_PARSE_FILE=\u30d5\u30a1\u30a4\u30eb\u3092\u89e3\u6790\u3067\u304d\u307e\u305b\u3093: ''{0}'': \u884c {1}\u3001\u5217 {2} \u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f: {3}\u3002 -com.sun.faces.CHILD_NOT_OF_EXPECTED_TYPE=\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30bf\u30a4\u30d7 ''{1}({2})'' \u306b\u5bfe\u3057\u3066\u3001\u4e88\u671f\u3055\u308c\u308b\u5b50\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u30bf\u30a4\u30d7\u306f ''{0}'' \u3067\u3059\u3002''{3}'' \u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002 -com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=: \u3053\u306e\u30ea\u30f3\u30af\u306f\u7121\u52b9\u3067\u3059\u3002Faces \u30d5\u30a9\u30fc\u30e0\u5185\u3067\u5165\u308c\u5b50\u306b\u306a\u3063\u3066\u3044\u307e\u305b\u3093\u3002 -com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=UIForm \u5185\u3067\u5165\u308c\u5b50\u306b\u306a\u3063\u3066\u3044\u306a\u3044\u30d3\u30e5\u30fc\u5185\u306b\u30011 \u3064\u4ee5\u4e0a\u306e UICommand \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002\u3053\u308c\u3089\u306e\u30b3\u30de\u30f3\u30c9\u306b\u95a2\u9023\u3059\u308b\u30a2\u30af\u30b7\u30e7\u30f3\u306f\u547c\u3073\u51fa\u3055\u308c\u307e\u305b\u3093\u3002 -com.sun.faces.COMPONENT_NOT_FOUND_ERROR=\u8b58\u5225\u5b50 ''{0}'' \u306b\u5bfe\u3059\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 -com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=ID ''{0}'' \u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u30d3\u30e5\u30fc\u306b\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 -com.sun.faces.CONTENT_TYPE_ERROR=\u8a8d\u8b58\u3067\u304d\u306a\u3044\u30b3\u30f3\u30c6\u30f3\u30c4\u30bf\u30a4\u30d7\u3067\u3059\u3002 -com.sun.faces.CONFIG_RENDERER_REGISTRATION_MISSING_RENDERKIT=ID {0} \u3092\u4f7f\u7528\u3057\u3066 RenderKit \u3067\u30ec\u30f3\u30c0\u30e9\u3092\u767b\u9332\u3067\u304d\u307e\u305b\u3093\u3002RenderKit \u304c\u5b58\u5728\u3057\u307e\u305b\u3093\u3002 -com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8 ID ''{0}'' \u306f\u3059\u3067\u306b\u30d3\u30e5\u30fc\u306b\u3042\u308a\u307e\u3059\u3002 -com.sun.faces.EMPTY_PARAMETER=\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u7a7a\u3067\u3059 -com.sun.faces.ENCODING_ERROR=\u8a8d\u8b58\u3067\u304d\u306a\u3044\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3067\u3059\u3002 -com.sun.faces.ERROR_GETTING_VALUE_BINDING=\u5024 ''{0}'' \u306e ValueBinding \u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=\u5024\u30d0\u30a4\u30f3\u30c9\u5f0f ''{0}'' \u304b\u3089\u5024\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.ERROR_OPENING_FILE=\u69cb\u6210\u30d5\u30a1\u30a4\u30eb ''{0}'' \u3092\u958b\u3051\u307e\u305b\u3093\u3002 -com.sun.faces.ERROR_PROCESSING_CONFIG=\u69cb\u6210\u306e\u51e6\u7406\u4e2d\u306b\u4e88\u671f\u3057\u306a\u3044\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -com.sun.faces.ERROR_REGISTERING_DTD=DTD ''{0}'' \u3092\u767b\u9332\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=\u7ba1\u7406\u5bfe\u8c61 Bean \u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=\u5c5e\u6027 ''{0}'' \u306b\u5bfe\u3059\u308b\u5f0f\u306e\u8a55\u4fa1\u7d50\u679c\u304c\u3001\u4e88\u671f\u3057\u306a\u3044\u30bf\u30a4\u30d7\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u4e88\u60f3\u3057\u3066\u3044\u305f\u30bf\u30a4\u30d7\u306f {1} \u3067\u3059\u304c\u3001\u53d7\u3051\u53d6\u3063\u305f\u30bf\u30a4\u30d7\u306f {2} \u3067\u3059\u3002 -com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=\u69cb\u7bc9\u30a8\u30e9\u30fc: 1 \u3064\u307e\u305f\u306f\u8907\u6570\u306e\u5165\u529b\u30d1\u30e9\u30e1\u30fc\u30bf\u304c null \u3067\u3059\u3002 -com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u30d1\u30b9 ''{0}'' \u306e FaceServlet \u30de\u30c3\u30d4\u30f3\u30b0\u3092\u5224\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.FACES_SERVLET_MAPPING_INCORRECT=FacesServlet \u306b\u3001'/*' \u306e url-pattern \u306f\u6307\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002\u5225\u306e url-pattern \u3092\u5b9a\u7fa9\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -com.sun.faces.FACES_CONTEXT_NOT_FOUND=\u3053\u306e\u8981\u6c42\u3092\u51e6\u7406\u3067\u304d\u308b FacesContext \u304c\u3042\u308a\u307e\u305b\u3093\u3002\u591a\u304f\u306e\u5834\u5408\u3001\u8981\u6c42\u304c\u9593\u9055\u3063\u305f\u30d1\u30b9\u306b\u9001\u4fe1\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u539f\u56e0\u3067\u3059\u3002 -com.sun.faces.FILE_NOT_FOUND=\u30d5\u30a1\u30a4\u30eb ''{0}'' \u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 -com.sun.faces.ILLEGAL_ATTEMPT_SETTING_APPLICATION_ARTIFACT=\u5fdc\u7b54\u304c\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u305f\u3042\u3068\u3001\u4e0d\u6b63\u306b {0} \u3092\u8a2d\u5b9a\u3057\u3088\u3046\u3068\u3057\u307e\u3057\u305f\u3002 -com.sun.faces.ILLEGAL_CHARACTERS_ERROR=\u6587\u5b57\u306f\u8a31\u53ef\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002 -com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=lValue \u30e2\u30fc\u30c9\u3067\u6697\u9ed9\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u8b58\u5225\u5b50\u304c\u4e0d\u6b63\u306b\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059: ''{0}'' -com.sun.faces.ILLEGAL_MODEL_REFERENCE=\u5f0f ''{0}'' \u306b\u3001\u3053\u306e\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3067\u306f\u4e0d\u6b63\u306a\u30e2\u30c7\u30eb\u53c2\u7167\u304c\u3042\u308a\u307e\u3059\u3002 -com.sun.faces.ILLEGAL_VIEW_ID=\u30d3\u30e5\u30fc ID ''{0}'' \u304c\u4e0d\u6b63\u3067\u3059\u3002ID \u306f "/" \u3067\u59cb\u3081\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059 -com.sun.faces.INVALID_EXPRESSION=\u5f0f ''{0}'' \u304c\u7121\u52b9\u3067\u3059\u3002 -com.sun.faces.INVALID_INIT_PARAM=\u521d\u671f\u5316\u30d1\u30e9\u30e1\u30fc\u30bf ''{1}'' \u306b\u5bfe\u3057\u3066\u3001\u7121\u52b9\u306a\u5024 ''{0}' \u3067\u3059\u3002\u6307\u5b9a\u3067\u304d\u308b\u5024\u306f 'true' \u307e\u305f\u306f 'false' \u3067\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u306e 'false' \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 -com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=\u69cb\u6210\u3067\u5b9a\u7fa9\u3055\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u91cd\u8981\u5ea6 ''{0}'' \u304c\u4e0d\u6b63\u3067\u3059\u3002 -com.sun.faces.INVALID_SCOPE_LIFESPAN=\u5f0f ''{0}'' \u3067\u53c2\u7167\u3055\u308c\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30b9\u30b3\u30fc\u30d7 ''{1}'' \u306f\u3001\u53c2\u7167\u5143\u306e\u7ba1\u7406\u5bfe\u8c61 Bean (''{2}'') \u306e\u30b9\u30b3\u30fc\u30d7 ''{3}'' \u3088\u308a\u5c0f\u3055\u304f\u306a\u3063\u3066\u3044\u307e\u3059 -com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=ID ''{0}'' \u306b\u306f LifecycleId \u304c\u3059\u3067\u306b\u8ffd\u52a0\u3055\u308c\u3066\u3044\u307e\u3059\u3002 -com.sun.faces.LIFECYCLE_ID_NOT_FOUND=ID ''{0}'' \u306b LifecycleId \u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002 -com.sun.faces.MAXIMUM_EVENTS_REACHED=\u30a4\u30d9\u30f3\u30c8\u306e\u6700\u5927\u6570 ''{0}'' \u306b\u9054\u3057\u307e\u3057\u305f\u3002 -com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=\u7ba1\u7406\u5bfe\u8c61 Bean ''{1}'' \u306e\u30bf\u30fc\u30b2\u30c3\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u306b\u306f List \u307e\u305f\u306f Array \u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{1}'' \u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u306f\u3001\u30de\u30c3\u30d7\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u3068\u3057\u3066\u5b9a\u7fa9\u3055\u308c\u307e\u3059\u304c\u3001\u30af\u30e9\u30b9\u306e\u8a2d\u5b9a\u30e1\u30bd\u30c3\u30c9\u306f Map \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u53d7\u3051\u4ed8\u3051\u307e\u305b\u3093\u3002 -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{1}'' \u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u306f\u3001\u30de\u30c3\u30d7\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u3068\u3057\u3066\u5b9a\u7fa9\u3055\u308c\u307e\u3059\u304c\u3001\u30af\u30e9\u30b9\u306e\u53d6\u5f97\u30e1\u30bd\u30c3\u30c9\u306f Map \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8fd4\u3057\u307e\u305b\u3093\u3002 -com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{1}'' \u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u306f\u3001\u30ea\u30b9\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u3068\u3057\u3066\u5b9a\u7fa9\u3055\u308c\u307e\u3059\u304c\u3001\u30af\u30e9\u30b9\u306e\u8a2d\u5b9a\u30e1\u30bd\u30c3\u30c9\u306f List \u307e\u305f\u306f Array \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u53d7\u3051\u4ed8\u3051\u307e\u305b\u3093\u3002 -com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{1}'' \u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u306f\u3001\u30ea\u30b9\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u3068\u3057\u3066\u5b9a\u7fa9\u3055\u308c\u307e\u3059\u304c\u3001\u30af\u30e9\u30b9\u306e\u53d6\u5f97\u30e1\u30bd\u30c3\u30c9\u306f List \u307e\u305f\u306f Array \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8fd4\u3057\u307e\u305b\u3093\u3002 -com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{1}'' \u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u306f\u3001\u30ea\u30b9\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u3068\u3057\u3066\u5b9a\u7fa9\u3055\u308c\u307e\u3059\u3002\u53d6\u5f97\u30e1\u30bd\u30c3\u30c9\u306f\u914d\u5217\u30bf\u30a4\u30d7\u3092\u8fd4\u3057\u307e\u3059\u304c\u3001\u95a2\u9023\u3059\u308b\u8a2d\u5b9a\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308a\u307e\u305b\u3093\u3002 -com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=\u7ba1\u7406\u5bfe\u8c61 Bean ''{1}'' \u306e\u30bf\u30fc\u30b2\u30c3\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002\u30bf\u30fc\u30b2\u30c3\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u306f\u3001List \u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067\u306f\u306a\u3044\u65e2\u5b58\u306e\u5024\u3092\u8fd4\u3057\u307e\u3057\u305f\u3002 -com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{0}'' \u306e\u69cb\u6210\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u7ba1\u7406\u5bfe\u8c61 Bean \u306f List \u3068\u3057\u3066\u69cb\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u30de\u30c3\u30d7\u30a8\u30f3\u30c8\u30ea\u307e\u305f\u306f\u7ba1\u7406\u5bfe\u8c61\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u3082\u5b9a\u7fa9\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u3002 -com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{0}'' \u306e\u69cb\u6210\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u7ba1\u7406\u5bfe\u8c61 Bean \u306f Map \u3068\u3057\u3066\u69cb\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u7ba1\u7406\u5bfe\u8c61\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u3082\u5b9a\u7fa9\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u3002 -com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{0}'' \u306e\u69cb\u6210\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u7ba1\u7406\u5bfe\u8c61 Bean \u306b\u3001\u30ea\u30b9\u30c8\u30a8\u30f3\u30c8\u30ea\u3092\u6301\u3064 ''{1}'' \u3068\u3044\u3046\u540d\u524d\u306e\u7ba1\u7406\u5bfe\u8c61\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u5024\u307e\u305f\u306f\u30de\u30c3\u30d7\u30a8\u30f3\u30c8\u30ea\u3001\u3042\u308b\u3044\u306f\u305d\u306e\u4e21\u65b9\u304c\u6b63\u3057\u304f\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002 -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{0}'' \u306e\u69cb\u6210\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u7ba1\u7406\u5bfe\u8c61 Bean \u306b\u3001\u30de\u30c3\u30d7\u30a8\u30f3\u30c8\u30ea\u3092\u6301\u3064 ''{1}'' \u3068\u3044\u3046\u540d\u524d\u306e\u7ba1\u7406\u5bfe\u8c61\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u6b63\u3057\u304f\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3044\u5024\u3082\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002 -com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{0}'' \u306e\u69cb\u6210\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u7ba1\u7406\u5bfe\u8c61 Bean \u306b\u3001\u30ea\u30b9\u30c8\u30a8\u30f3\u30c8\u30ea\u3001\u30de\u30c3\u30d7\u30a8\u30f3\u30c8\u30ea\u3001\u304a\u3088\u3073\u5024\u8981\u7d20\u306e\u3044\u305a\u308c\u3082\u542b\u307e\u306a\u3044\u3001''{1}'' \u3068\u3044\u3046\u540d\u524d\u306e\u7ba1\u7406\u5bfe\u8c61\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002 -com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=\u30bf\u30a4\u30d7 ''{1}'' \u306e\u5024 ''{0}'' \u3092\u7ba1\u7406\u5bfe\u8c61 Bean ''{3}'' \u306e\u30bf\u30a4\u30d7 ''{2}'' \u306b\u5909\u63db\u3057\u3066\u3044\u308b\u3068\u304d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{1}'' \u306e Bean \u307e\u305f\u306f\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u30af\u30e9\u30b9 ''{0}'' \u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{1}'' \u306e Bean \u307e\u305f\u306f\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u30af\u30e9\u30b9 ''{0}'' \u306f\u3001\u4f9d\u5b58\u95a2\u4fc2 {2} \u304c\u306a\u3044\u305f\u3081\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{1}'' \u306e\u7ba1\u7406\u5bfe\u8c61 Bean \u30af\u30e9\u30b9 ''{0}'' \u306f\u3001public \u3067\u5ba3\u8a00\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{1}'' \u306e\u7ba1\u7406\u5bfe\u8c61 Bean \u30af\u30e9\u30b9 ''{0}'' \u306f\u3001abstract \u307e\u305f\u306f interface \u3068\u3057\u3066\u5ba3\u8a00\u3055\u308c\u3066\u3044\u307e\u3059\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{1}'' \u306e\u7ba1\u7406\u5bfe\u8c61 Bean \u30af\u30e9\u30b9 ''{0}'' \u306f\u3001public \u3067\u5f15\u6570\u306e\u306a\u3044\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3092\u5ba3\u8a00\u3057\u3066\u3044\u307e\u305b\u3093\u3002 -com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{0}'' \u3067\u30ea\u30bd\u30fc\u30b9\u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u306e\u5b9f\u884c\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f -com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{1}'' \u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u306f\u3001''{2}'' \u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u30af\u30e9\u30b9\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u30af\u30e9\u30b9\u306f\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u306b\u5272\u308a\u5f53\u3066\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{0}'' \u3092\u30a4\u30f3\u30c8\u30ed\u30b9\u30da\u30af\u30c8\u3067\u304d\u307e\u305b\u3093 -com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{1}'' \u306b\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u304c\u5b58\u5728\u3057\u307e\u305b\u3093\u3002 -com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{1}'' \u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u306b\u8a2d\u5b9a\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308a\u307e\u305b\u3093\u3002 -com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{1}'' \u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u306f\u3001\u8907\u6570\u306e\u5f15\u6570\u3092\u53d7\u3051\u53d6\u308a\u307e\u3059 -com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{1}'' \u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093 -com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{0}'' \u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093\u3002\u6b21\u306e\u554f\u984c\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f: -com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=Faces \u306f\u3001\u8981\u6c42\u3055\u308c\u305f\u3068\u304d\u306b\u7ba1\u7406\u5bfe\u8c61 Bean ''{0}'' \u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093\u3002\u6b21\u306e\u554f\u984c\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f: -com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{0}'' \u306e\u51e6\u7406\u4e2d\u306b\u4e88\u671f\u3057\u306a\u3044\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f -com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=\u7ba1\u7406\u5bfe\u8c61\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u306e\u51e6\u7406\u4e2d\u306b\u4e88\u671f\u3057\u306a\u3044\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f -com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=\u30b9\u30b3\u30fc\u30d7 ''{0}'' \u304c ''\u30d3\u30e5\u30fc''\u3001''\u8981\u6c42''\u3001''\u30bb\u30c3\u30b7\u30e7\u30f3''\u3001''\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3'' \u306e\u3044\u305a\u308c\u3067\u3082\u306a\u304f\u3001ValueExpression (#{...}) \u3082\u8868\u3057\u3066\u3044\u307e\u305b\u3093 -com.sun.faces.MISSING_CLASS_ERROR=\u30af\u30e9\u30b9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093: \u30af\u30e9\u30b9 ''{0}'' \u3092\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.MISSING_RESOURCE_ERROR=\u30ea\u30bd\u30fc\u30b9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093: ResourceBundle \u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.MODELUPDATE_ERROR=\u30e2\u30c7\u30eb ''{1}'' \u306e\u5024 ''{0}'' \u3067\u30e2\u30c7\u30eb\u66f4\u65b0\u304c\u5931\u6557\u3057\u307e\u3057\u305f\u3002 -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=\u7d50\u679c ''{1}'' \u306e\u30d3\u30e5\u30fc ID ''{0}'' \u304b\u3089\u3001\u4e00\u81f4\u3059\u308b\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u30b1\u30fc\u30b9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093 -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=\u7d50\u679c ''{2}'' \u306e\u30a2\u30af\u30b7\u30e7\u30f3 ''{1}'' \u306e\u30d3\u30e5\u30fc ID ''{0}'' \u304b\u3089\u3001\u4e00\u81f4\u3059\u308b\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u30b1\u30fc\u30b9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093 -com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=\u7d50\u679c ''{0}'' \u306b\u7121\u52b9\u306a\u30af\u30a8\u30ea\u30fc\u6587\u5b57\u5217\u304c\u3042\u308a\u307e\u3059 -com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=\u5f0f\u30a8\u30e9\u30fc: \u540d\u524d\u4ed8\u304d\u30aa\u30d6\u30b8\u30a7\u30af\u30c8: ''{0}'' \u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 -com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=\u30cf\u30f3\u30c9\u30e9\u30af\u30e9\u30b9\u3092\u6301\u3064\u30bf\u30b0 ''{0}'' \u3067\u3001UIComponentTag \u3067\u5165\u308c\u5b50\u306b\u306a\u3063\u3066\u3044\u306a\u3044\u30a8\u30e9\u30fc\u3067\u3059\u3002 -com.sun.faces.NOT_NESTED_IN_TYPE_TAG_ERROR={0} \u30bf\u30b0\u306f\u3001\u30bf\u30a4\u30d7 {1} \u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u30bf\u30b0\u5185\u3067\u5165\u308c\u5b50\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 -com.sun.faces.NO_DTD_FOUND_ERROR=\u30d1\u30b9 ''{1}'' \u306b PUBLIC ID ''{0}'' \u306e DTD \u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 -com.sun.faces.NULL_BODY_CONTENT_ERROR=\u30cf\u30f3\u30c9\u30e9\u30af\u30e9\u30b9\u3092\u6301\u3064\u30bf\u30b0 ''{0}'' \u3067 BodyContent \u304c null \u3067\u3059\u3002 -com.sun.faces.NULL_COMPONENT_ERROR=\u69cb\u7bc9\u30a8\u30e9\u30fc: Component \u5f15\u6570\u304c null \u3067\u3059\u3002 -com.sun.faces.NULL_CONFIGURATION=\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u69cb\u6210\u306f\u8aad\u307f\u8fbc\u307e\u308c\u3066\u3044\u307e\u305b\u3093\u3002 -com.sun.faces.NULL_CONTEXT_ERROR=\u5f15\u6570\u30a8\u30e9\u30fc: Context \u5f15\u6570\u304c null \u3067\u3059\u3002 -com.sun.faces.NULL_EVENT_ERROR=\u5f15\u6570\u30a8\u30e9\u30fc: Event \u5f15\u6570\u304c null \u3067\u3059\u3002 -com.sun.faces.NULL_FORVALUE=\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8 "{0}" \u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f -com.sun.faces.NULL_HANDLER_ERROR=\u5f15\u6570\u30a8\u30e9\u30fc: Handler \u5f15\u6570\u304c null \u3067\u3059\u3002 -com.sun.faces.NULL_LOCALE_ERROR=\u5f15\u6570\u30a8\u30e9\u30fc: Locale \u5f15\u6570\u304c null \u3067\u3059\u3002 -com.sun.faces.NULL_MESSAGE_ERROR=\u5f15\u6570\u30a8\u30e9\u30fc: Message \u30d1\u30e9\u30e1\u30fc\u30bf\u306f null \u306b\u3067\u304d\u307e\u305b\u3093 -com.sun.faces.NULL_PARAMETERS_ERROR=\u5f15\u6570\u30a8\u30e9\u30fc: \u30d1\u30e9\u30e1\u30fc\u30bf ''{0}'' \u304c null \u3067\u3059 -com.sun.faces.NULL_REQUEST_VIEW_ERROR=\u5f15\u6570\u30a8\u30e9\u30fc: Request View \u5f15\u6570\u304c null \u3067\u3059\u3002 -com.sun.faces.NULL_RESPONSE_STREAM_ERROR=\u5f15\u6570\u30a8\u30e9\u30fc: ResponseStream \u5f15\u6570\u304c null \u3067\u3059\u3002 -com.sun.faces.NULL_RESPONSE_VIEW_ERROR=\u5f15\u6570\u30a8\u30e9\u30fc: ResponseView \u5f15\u6570\u304c null \u3067\u3059\u3002 -com.sun.faces.NULL_RESPONSE_WRITER_ERROR=\u5f15\u6570\u30a8\u30e9\u30fc: ResponseWriter \u5f15\u6570\u304c null \u3067\u3059\u3002 +com.sun.faces.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK=ApplicationAssociate は、ConfigureListener.contextInitialized() と同じ呼び出しスタックで呼び出されませんでした。 +com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=ApplicationAssociate は、すでにこの Web アプリケーションに存在しています。 +com.sun.faces.ASSERTION_FAILED=表明に失敗しました +com.sun.faces.ATTRIBUTE_NOT_SUPORTED=属性 ''{0}'' は、コンポーネントタイプ ''{1}'' ではサポートされません。 +com.sun.faces.CANT_CONVERT_VALUE=プロパティー ''{0}'' を値タイプ ''{1}'' に変換できません。 +com.sun.faces.CANT_CLOSE_INPUT_STREAM=入力ストリームを閉じることができません。 +com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=ID ''{0}'' のライフサイクルを作成できません。 +com.sun.faces.CANT_INSTANTIATE_CLASS=クラス ''{0}'' をインスタンス化できません。 +com.sun.faces.CANT_INTROSPECT_CLASS=クラスをイントロスペクトできません: ''{0}'' +com.sun.faces.CANT_PARSE_FILE=ファイルを解析できません: ''{0}'': 行 {1}、列 {2} でエラーが発生しました: {3}。 +com.sun.faces.CHILD_NOT_OF_EXPECTED_TYPE=コンポーネントタイプ ''{1}({2})'' に対して、予期される子コンポーネントのタイプは ''{0}'' です。''{3}'' が見つかりました。 +com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=: このリンクは無効です。Faces フォーム内で入れ子になっていません。 +com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=UIForm 内で入れ子になっていないビュー内に、1 つ以上の UICommand インスタンスが見つかりました。これらのコマンドに関連するアクションは呼び出されません。 +com.sun.faces.COMPONENT_NOT_FOUND_ERROR=識別子 ''{0}'' に対するコンポーネントが見つかりません。 +com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=ID ''{0}'' のコンポーネントがビューに見つかりません。 +com.sun.faces.CONTENT_TYPE_ERROR=認識できないコンテンツタイプです。 +com.sun.faces.CONFIG_RENDERER_REGISTRATION_MISSING_RENDERKIT=ID {0} を使用して RenderKit でレンダラを登録できません。RenderKit が存在しません。 +com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=コンポーネント ID ''{0}'' はすでにビューにあります。 +com.sun.faces.EMPTY_PARAMETER=パラメータが空です +com.sun.faces.ENCODING_ERROR=認識できない文字エンコーディングです。 +com.sun.faces.ERROR_GETTING_VALUE_BINDING=値 ''{0}'' の ValueBinding を取得できません。 +com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=値バインド式 ''{0}'' から値を取得できません。 +com.sun.faces.ERROR_OPENING_FILE=構成ファイル ''{0}'' を開けません。 +com.sun.faces.ERROR_PROCESSING_CONFIG=構成の処理中に予期しないエラーが発生しました。 +com.sun.faces.ERROR_REGISTERING_DTD=DTD ''{0}'' を登録できません。 +com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=管理対象 Bean のプロパティー ''{0}'' を設定できません。 +com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=属性 ''{0}'' に対する式の評価結果が、予期しないタイプになりました。予想していたタイプは {1} ですが、受け取ったタイプは {2} です。 +com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=構築エラー: 1 つまたは複数の入力パラメータが null です。 +com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=サーブレットパス ''{0}'' の FaceServlet マッピングを判定できません。 +com.sun.faces.FACES_SERVLET_MAPPING_INCORRECT=FacesServlet に、'/*' の url-pattern は指定できません。別の url-pattern を定義してください。 +com.sun.faces.FACES_CONTEXT_NOT_FOUND=この要求を処理できる FacesContext がありません。多くの場合、要求が間違ったパスに送信されていることが原因です。 +com.sun.faces.FILE_NOT_FOUND=ファイル ''{0}'' が見つかりません。 +com.sun.faces.ILLEGAL_ATTEMPT_SETTING_APPLICATION_ARTIFACT=応答がレンダリングされたあと、不正に {0} を設定しようとしました。 +com.sun.faces.ILLEGAL_CHARACTERS_ERROR=文字は許可されていません。 +com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=lValue モードで暗黙のオブジェクト識別子が不正に使用されています: ''{0}'' +com.sun.faces.ILLEGAL_MODEL_REFERENCE=式 ''{0}'' に、このコンテキストでは不正なモデル参照があります。 +com.sun.faces.ILLEGAL_VIEW_ID=ビュー ID ''{0}'' が不正です。ID は "/" で始める必要があります +com.sun.faces.INVALID_EXPRESSION=式 ''{0}'' が無効です。 +com.sun.faces.INVALID_INIT_PARAM=初期化パラメータ ''{1}'' に対して、無効な値 ''{0}' です。指定できる値は 'true' または 'false' です。デフォルトの 'false' を使用します。 +com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=構成で定義されたメッセージ重要度 ''{0}'' が不正です。 +com.sun.faces.INVALID_SCOPE_LIFESPAN=式 ''{0}'' で参照されるオブジェクトのスコープ ''{1}'' は、参照元の管理対象 Bean (''{2}'') のスコープ ''{3}'' より小さくなっています +com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=ID ''{0}'' には LifecycleId がすでに追加されています。 +com.sun.faces.LIFECYCLE_ID_NOT_FOUND=ID ''{0}'' に LifecycleId が見つかりませんでした。 +com.sun.faces.MAXIMUM_EVENTS_REACHED=イベントの最大数 ''{0}'' に達しました。 +com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=管理対象 Bean ''{1}'' のターゲットプロパティー ''{0}'' を設定できません。プロパティーには List または Array のインスタンスを指定する必要があります。 +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=管理対象 Bean ''{1}'' のプロパティー ''{0}'' は、マッププロパティーとして定義されますが、クラスの設定メソッドは Map インスタンスを受け付けません。 +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=管理対象 Bean ''{1}'' のプロパティー ''{0}'' は、マッププロパティーとして定義されますが、クラスの取得メソッドは Map インスタンスを返しません。 +com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=管理対象 Bean ''{1}'' のプロパティー ''{0}'' は、リストプロパティーとして定義されますが、クラスの設定メソッドは List または Array インスタンスを受け付けません。 +com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=管理対象 Bean ''{1}'' のプロパティー ''{0}'' は、リストプロパティーとして定義されますが、クラスの取得メソッドは List または Array インスタンスを返しません。 +com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=管理対象 Bean ''{1}'' のプロパティー ''{0}'' は、リストプロパティーとして定義されます。取得メソッドは配列タイプを返しますが、関連する設定メソッドがありません。 +com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=管理対象 Bean ''{1}'' のターゲットプロパティー ''{0}'' を設定できません。ターゲットプロパティーは、List のインスタンスではない既存の値を返しました。 +com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=管理対象 Bean ''{0}'' の構成が正しくありません。管理対象 Bean は List として構成されていますが、マップエントリまたは管理対象プロパティーも定義しようとしています。 +com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=管理対象 Bean ''{0}'' の構成が正しくありません。管理対象 Bean は Map として構成されていますが、管理対象プロパティーも定義しようとしています。 +com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=管理対象 Bean ''{0}'' の構成が正しくありません。管理対象 Bean に、リストエントリを持つ ''{1}'' という名前の管理対象プロパティーが含まれていますが、値またはマップエントリ、あるいはその両方が正しく定義されていません。 +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=管理対象 Bean ''{0}'' の構成が正しくありません。管理対象 Bean に、マップエントリを持つ ''{1}'' という名前の管理対象プロパティーが含まれていますが、正しく定義されていない値も含まれています。 +com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=管理対象 Bean ''{0}'' の構成が正しくありません。管理対象 Bean に、リストエントリ、マップエントリ、および値要素のいずれも含まない、''{1}'' という名前の管理対象プロパティーが含まれています。 +com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=タイプ ''{1}'' の値 ''{0}'' を管理対象 Bean ''{3}'' のタイプ ''{2}'' に変換しているときにエラーが発生しました。 +com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=管理対象 Bean ''{1}'' の Bean またはプロパティークラス ''{0}'' が見つかりません。 +com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=管理対象 Bean ''{1}'' の Bean またはプロパティークラス ''{0}'' は、依存関係 {2} がないため読み込むことができません。 +com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=管理対象 Bean ''{1}'' の管理対象 Bean クラス ''{0}'' は、public で宣言されていません。 +com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=管理対象 Bean ''{1}'' の管理対象 Bean クラス ''{0}'' は、abstract または interface として宣言されています。 +com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=管理対象 Bean ''{1}'' の管理対象 Bean クラス ''{0}'' は、public で引数のないコンストラクタを宣言していません。 +com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=管理対象 Bean ''{0}'' でリソースインジェクションの実行中にエラーが発生しました +com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=管理対象 Bean ''{1}'' のプロパティー ''{0}'' は、''{2}'' のプロパティークラスで定義されていますが、このクラスはプロパティーに割り当てることができません。 +com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=管理対象 Bean ''{0}'' をイントロスペクトできません +com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=管理対象 Bean ''{1}'' にプロパティー ''{0}'' が存在しません。 +com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=管理対象 Bean ''{1}'' のプロパティー ''{0}'' に設定メソッドがありません。 +com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=管理対象 Bean ''{1}'' のプロパティー ''{0}'' は、複数の引数を受け取ります +com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=管理対象 Bean ''{1}'' のプロパティー ''{0}'' を設定できません +com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=管理対象 Bean ''{0}'' を作成できません。次の問題が見つかりました: +com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=Faces は、要求されたときに管理対象 Bean ''{0}'' を作成できません。次の問題が見つかりました: +com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=管理対象 Bean ''{0}'' の処理中に予期しないエラーが発生しました +com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=管理対象プロパティー ''{0}'' の処理中に予期しないエラーが発生しました +com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=スコープ ''{0}'' が ''ビュー''、''要求''、''セッション''、''アプリケーション'' のいずれでもなく、ValueExpression (#{...}) も表していません +com.sun.faces.MISSING_CLASS_ERROR=クラスが見つかりません: クラス ''{0}'' を読み込むことができません。 +com.sun.faces.MISSING_RESOURCE_ERROR=リソースが見つかりません: ResourceBundle を取得できません。 +com.sun.faces.MODELUPDATE_ERROR=モデル ''{1}'' の値 ''{0}'' でモデル更新が失敗しました。 +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=結果 ''{1}'' のビュー ID ''{0}'' から、一致するナビゲーションケースが見つかりません +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=結果 ''{2}'' のアクション ''{1}'' のビュー ID ''{0}'' から、一致するナビゲーションケースが見つかりません +com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=結果 ''{0}'' に無効なクエリー文字列があります +com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=式エラー: 名前付きオブジェクト: ''{0}'' が見つかりません。 +com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=ハンドラクラスを持つタグ ''{0}'' で、UIComponentTag で入れ子になっていないエラーです。 +com.sun.faces.NOT_NESTED_IN_TYPE_TAG_ERROR={0} タグは、タイプ {1} のコンポーネントに関連付けられたタグ内で入れ子にする必要があります。 +com.sun.faces.NO_DTD_FOUND_ERROR=パス ''{1}'' に PUBLIC ID ''{0}'' の DTD が見つかりません。 +com.sun.faces.NULL_BODY_CONTENT_ERROR=ハンドラクラスを持つタグ ''{0}'' で BodyContent が null です。 +com.sun.faces.NULL_COMPONENT_ERROR=構築エラー: Component 引数が null です。 +com.sun.faces.NULL_CONFIGURATION=アプリケーションの構成は読み込まれていません。 +com.sun.faces.NULL_CONTEXT_ERROR=引数エラー: Context 引数が null です。 +com.sun.faces.NULL_EVENT_ERROR=引数エラー: Event 引数が null です。 +com.sun.faces.NULL_FORVALUE=コンポーネント "{0}" が見つかりませんでした +com.sun.faces.NULL_HANDLER_ERROR=引数エラー: Handler 引数が null です。 +com.sun.faces.NULL_LOCALE_ERROR=引数エラー: Locale 引数が null です。 +com.sun.faces.NULL_MESSAGE_ERROR=引数エラー: Message パラメータは null にできません +com.sun.faces.NULL_PARAMETERS_ERROR=引数エラー: パラメータ ''{0}'' が null です +com.sun.faces.NULL_REQUEST_VIEW_ERROR=引数エラー: Request View 引数が null です。 +com.sun.faces.NULL_RESPONSE_STREAM_ERROR=引数エラー: ResponseStream 引数が null です。 +com.sun.faces.NULL_RESPONSE_VIEW_ERROR=引数エラー: ResponseView 引数が null です。 +com.sun.faces.NULL_RESPONSE_WRITER_ERROR=引数エラー: ResponseWriter 引数が null です。 com.sun.faces.NULL_VIEW_ID=Argument Error: view id argument is null. -com.sun.faces.OBJECT_CREATION_ERROR=1 \u3064\u4ee5\u4e0a\u306e\u69cb\u6210\u3055\u308c\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u8a73\u7d30\u306f\u3001Web \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30ed\u30b0\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 -com.sun.faces.OPTION_NOT_SELECT_ITEM=\u5f15\u6570\u30a8\u30e9\u30fc: \u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8 ''{0}'' \u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u3001jakarta.faces.model.SelectItem \u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u898b\u3064\u304b\u3063\u305f\u30bf\u30a4\u30d7: ''{1}''\u3002 -com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=: \u4e00\u81f4\u3059\u308b\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u30b1\u30fc\u30b9\u304c\u306a\u3044\u305f\u3081\u3001\u3053\u306e\u30dc\u30bf\u30f3\u306f\u7121\u52b9\u3067\u3059\u3002 -com.sun.faces.OUTCOME_TARGET_LINK_NO_MATCH=: \u4e00\u81f4\u3059\u308b\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u30b1\u30fc\u30b9\u304c\u306a\u3044\u305f\u3081\u3001\u3053\u306e\u30ea\u30f3\u30af\u306f\u7121\u52b9\u3067\u3059\u3002 -com.sun.faces.PHASE_ID_OUT_OF_BOUNDS=ID ''{0}'' \u306b\u5bfe\u3057\u3066 PhaseId \u304c\u7bc4\u56f2\u5916\u3067\u3059\u3002 -com.sun.faces.RENDERER_NOT_FOUND=\u30ec\u30f3\u30c0\u30e9\u30bf\u30a4\u30d7 ''{0}'' \u306e\u30ec\u30f3\u30c0\u30e9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 -com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=\u72b6\u614b\u30a8\u30e9\u30fc: RequestView \u306f\u3001\u3053\u306e\u8981\u6c42\u306b\u5bfe\u3057\u3066\u3059\u3067\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 -com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=\u7121\u52b9\u306a\u30ea\u30bd\u30fc\u30b9\u5f62\u5f0f\u3067\u3059\u3002\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u3092\u89e3\u6790\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=\u7121\u52b9\u306a\u30ea\u30bd\u30fc\u30b9\u5f62\u5f0f\u3067\u3059\u3002\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u306b\u8907\u6570\u306e\u30b3\u30ed\u30f3 (:) \u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002 -com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=\u7121\u52b9\u306a\u30ea\u30bd\u30fc\u30b9\u5f62\u5f0f\u3067\u3059\u3002\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc ''{0}'' \u3092\u89e3\u6790\u3057\u3066\u3001\u30ea\u30bd\u30fc\u30b9\u540d\u3068\u30e9\u30a4\u30d6\u30e9\u30ea\u540d\u3092\u62bd\u51fa\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.SAVING_STATE_ERROR=\u72b6\u614b\u306e\u4fdd\u5b58\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -com.sun.faces.SUPPORTS_COMPONENT_ERROR=\u5f15\u6570\u30a8\u30e9\u30fc: ''\u3053\u306e\u30ec\u30f3\u30c0\u30e9\u3067\u306f {0}'' \u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002 -com.sun.faces.TYPECONVERSION_ERROR=''{1}'' \u306e\u5024 ''{0}'' \u3092\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u3068\u304d\u306b\u3001\u5909\u63db\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -com.sun.faces.VALIDATION_COMMAND_ERROR=\u691c\u8a3c\u30a8\u30e9\u30fc\u3067\u3059\u3002''{0}'' \u306b\u306f\u3001value \u307e\u305f\u306f image \u5c5e\u6027\u304c\u5fc5\u8981\u3067\u3059\u3002 -com.sun.faces.VALIDATION_EL_ERROR=\u691c\u8a3c\u30a8\u30e9\u30fc\u3067\u3059\u3002\u5f0f\u304c\u7121\u52b9\u3067\u3059: ''{0}'' -com.sun.faces.VALIDATION_ID_ERROR=\u691c\u8a3c\u30a8\u30e9\u30fc\u3067\u3059\u3002ID \u3092\u542b\u3081\u308b\u306b\u306f\u6b21\u306e Faces \u30bf\u30b0\u304c\u5fc5\u8981\u3067\u3059: ''{0}'' -com.sun.faces.CANNOT_CONVERT=converterId ''{0}'' \u307e\u305f\u306f\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0 ''{1}'' \u3092\u4f7f\u7528\u3057\u3066 Converter \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u89e3\u6c7a\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.CANNOT_VALIDATE=validatorId ''{0}'' \u307e\u305f\u306f\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0 ''{1}'' \u3092\u4f7f\u7528\u3057\u3066 Validator \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u89e3\u6c7a\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.verifier.CLASS_NOT_FOUND=[{0}:{1}] \u30af\u30e9\u30b9\u304c\u5b58\u5728\u3057\u307e\u305b\u3093 -com.sun.faces.verifier.CLASS_MISSING_DEP=[{0}:{1}] \u4f9d\u5b58\u95a2\u4fc2\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u305f\u3081\u3001\u30af\u30e9\u30b9\u3092\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093 -> {2} -com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=[{0}:{1}] \u30af\u30e9\u30b9\u306b\u5f15\u6570\u306a\u3057\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u304c\u3001public \u3067\u306f\u3042\u308a\u307e\u305b\u3093 -com.sun.faces.verifier.NO_DEF_CTOR=[{0}:{1}] \u30af\u30e9\u30b9\u306b public \u3067\u5f15\u6570\u306a\u3057\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u305b\u3093 -com.sun.faces.verifier.WRONG_TYPE=[{0}:{1}] \u30af\u30e9\u30b9\u306f {2} \u3092\u5b9f\u88c5\u307e\u305f\u306f\u62e1\u5f35\u3057\u307e\u305b\u3093 +com.sun.faces.OBJECT_CREATION_ERROR=1 つ以上の構成されたアプリケーションオブジェクトを作成できませんでした。詳細は、Web アプリケーションのログを確認してください。 +com.sun.faces.OPTION_NOT_SELECT_ITEM=引数エラー: コンポーネント ''{0}'' のオプションが、jakarta.faces.model.SelectItem のインスタンスではありません。見つかったタイプ: ''{1}''。 +com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=: 一致するナビゲーションケースがないため、このボタンは無効です。 +com.sun.faces.OUTCOME_TARGET_LINK_NO_MATCH=: 一致するナビゲーションケースがないため、このリンクは無効です。 +com.sun.faces.PHASE_ID_OUT_OF_BOUNDS=ID ''{0}'' に対して PhaseId が範囲外です。 +com.sun.faces.RENDERER_NOT_FOUND=レンダラタイプ ''{0}'' のレンダラが見つかりません。 +com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=状態エラー: RequestView は、この要求に対してすでに設定されています。 +com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=無効なリソース形式です。プロパティー ''{0}'' を解析できません。 +com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=無効なリソース形式です。プロパティー ''{0}'' に複数のコロン (:) が含まれています。 +com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=無効なリソース形式です。プロパティー ''{0}'' を解析して、リソース名とライブラリ名を抽出できません。 +com.sun.faces.SAVING_STATE_ERROR=状態の保存中にエラーが発生しました。 +com.sun.faces.SUPPORTS_COMPONENT_ERROR=引数エラー: ''このレンダラでは {0}'' はサポートされていません。 +com.sun.faces.TYPECONVERSION_ERROR=''{1}'' の値 ''{0}'' を設定しているときに、変換エラーが発生しました。 +com.sun.faces.VALIDATION_COMMAND_ERROR=検証エラーです。''{0}'' には、value または image 属性が必要です。 +com.sun.faces.VALIDATION_EL_ERROR=検証エラーです。式が無効です: ''{0}'' +com.sun.faces.VALIDATION_ID_ERROR=検証エラーです。ID を含めるには次の Faces タグが必要です: ''{0}'' +com.sun.faces.CANNOT_CONVERT=converterId ''{0}'' またはバインディング ''{1}'' を使用して Converter インスタンスを解決できません。 +com.sun.faces.CANNOT_VALIDATE=validatorId ''{0}'' またはバインディング ''{1}'' を使用して Validator インスタンスを解決できません。 +com.sun.faces.verifier.CLASS_NOT_FOUND=[{0}:{1}] クラスが存在しません +com.sun.faces.verifier.CLASS_MISSING_DEP=[{0}:{1}] 依存関係が見つからないため、クラスを読み込むことができません -> {2} +com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=[{0}:{1}] クラスに引数なしのコンストラクタが含まれていますが、public ではありません +com.sun.faces.verifier.NO_DEF_CTOR=[{0}:{1}] クラスに public で引数なしのコンストラクタが含まれていません +com.sun.faces.verifier.WRONG_TYPE=[{0}:{1}] クラスは {2} を実装または拡張しません -com.sun.faces.CYCLIC_REFERENCE_ERROR=\u7ba1\u7406\u5bfe\u8c61 Bean ''{0}'' \u306b\u5faa\u74b0\u53c2\u7167\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u8a55\u4fa1\u30d1\u30b9: ''{1}''\u3002 -com.sun.faces.OBJECT_IS_READONLY={0} \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u8aad\u307f\u53d6\u308a\u5c02\u7528\u3067\u3059 -com.sun.faces.INCORRECT_JSP_VERSION=\u30b3\u30f3\u30c6\u30ca\u306e JSP \u30d0\u30fc\u30b8\u30e7\u30f3\u304c 2.1 \u3088\u308a\u53e4\u304f\u3001EL RI \u5f0f\u30d5\u30a1\u30af\u30c8\u30ea ''{0}'' \u3092\u898b\u3064\u3051\u3089\u308c\u307e\u305b\u3093\u3002JSP \u307e\u305f\u306f EL RI \u3092\u4f7f\u7528\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u521d\u671f\u5316\u30d1\u30e9\u30e1\u30fc\u30bf ''{1}'' \u304c\u6b63\u3057\u304f\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 +com.sun.faces.CYCLIC_REFERENCE_ERROR=管理対象 Bean ''{0}'' に循環参照が含まれています。評価パス: ''{1}''。 +com.sun.faces.OBJECT_IS_READONLY={0} オブジェクトは読み取り専用です +com.sun.faces.INCORRECT_JSP_VERSION=コンテナの JSP バージョンが 2.1 より古く、EL RI 式ファクトリ ''{0}'' を見つけられません。JSP または EL RI を使用していない場合は、コンテキスト初期化パラメータ ''{1}'' が正しく設定されていることを確認してください。 #com.sun.faces.el.PropertyResolverImpl -com.sun.faces.OUT_OF_BOUNDS_ERROR={0} \u306b\u5bfe\u3057\u3066\u30a4\u30f3\u30c7\u30c3\u30af\u30b9 {1} \u304c\u7bc4\u56f2\u5916\u3067\u3059 -com.sun.faces.PROPERTY_TYPE_ERROR={0} \u304c Array \u307e\u305f\u306f List \u30bf\u30a4\u30d7\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 -com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=\u9577\u3055 {2} \u306e {0} \u306b\u5bfe\u3057\u3066\u30a4\u30f3\u30c7\u30c3\u30af\u30b9 {1} \u304c\u7bc4\u56f2\u5916\u3067\u3059 -com.sun.faces.RESTORE_VIEW_ERROR=\u30d3\u30e5\u30fc ''{0}'' \u3092\u5fa9\u5143\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 +com.sun.faces.OUT_OF_BOUNDS_ERROR={0} に対してインデックス {1} が範囲外です +com.sun.faces.PROPERTY_TYPE_ERROR={0} が Array または List タイプではありません。 +com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=長さ {2} の {0} に対してインデックス {1} が範囲外です +com.sun.faces.RESTORE_VIEW_ERROR=ビュー ''{0}'' を復元できませんでした。 -com.sun.faces.CANT_WRITE_ID_ATTRIBUTE=ID \u5c5e\u6027 ''{0}'' \u3092\u66f8\u304d\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002 -com.sun.faces.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR=UIComponentTag \u3067\u5165\u308c\u5b50\u306b\u306a\u3063\u3066\u3044\u307e\u305b\u3093\u3002 -com.sun.faces.NO_COMPONENT_ASSOCIATED_WITH_UICOMPONENT_TAG=UIComponentTag \u306b\u95a2\u9023\u3059\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u3042\u308a\u307e\u305b\u3093\u3002 +com.sun.faces.CANT_WRITE_ID_ATTRIBUTE=ID 属性 ''{0}'' を書き込むことができません。 +com.sun.faces.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR=UIComponentTag で入れ子になっていません。 +com.sun.faces.NO_COMPONENT_ASSOCIATED_WITH_UICOMPONENT_TAG=UIComponentTag に関連するコンポーネントがありません。 -com.sun.faces.JS_RESOURCE_WRITING_ERROR=JavaScript \u30d5\u30a1\u30a4\u30eb\u3092\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u66f8\u304d\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002 +com.sun.faces.JS_RESOURCE_WRITING_ERROR=JavaScript ファイルをクライアントに書き込むことができません。 -com.sun.faces.RESOURCE_TARGET_NOT_AVAILABLE=1 \u3064\u307e\u305f\u306f\u8907\u6570\u306e\u30ea\u30bd\u30fc\u30b9\u306b ''{0}'' \u306e\u30bf\u30fc\u30b2\u30c3\u30c8\u304c\u3042\u308a\u307e\u3059\u304c\u3001''{0}'' \u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u30d3\u30e5\u30fc\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002 +com.sun.faces.RESOURCE_TARGET_NOT_AVAILABLE=1 つまたは複数のリソースに ''{0}'' のターゲットがありますが、''{0}'' コンポーネントがビューで定義されていません。 com.sun.faces.ARGUMENTS_NOT_LEGAL_WITH_CC_ATTRS_EXPR=Illegal attempt to pass arguments to a composite component lookup expression (i.e. cc.attrs.[identifier]). com.sun.faces.partial.statesaving.ERROR_RESTORING_STATE_FOR_COMPONENT=Unexpected error restoring state for component with id ''{0}''. Cause: {1}. com.sun.faces.MISSING_COMPONENT_ATTRIBUTE_VALUE=The following attribute(s) are required, but no values have been supplied for them: ''{0}''. diff --git a/impl/src/main/resources/com/sun/faces/resources/Messages_ko.properties b/impl/src/main/resources/com/sun/faces/resources/Messages_ko.properties index 4550567271..ba427756cd 100644 --- a/impl/src/main/resources/com/sun/faces/resources/Messages_ko.properties +++ b/impl/src/main/resources/com/sun/faces/resources/Messages_ko.properties @@ -14,147 +14,147 @@ # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 # -com.sun.faces.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK=ApplicationAssociate ctor\uc774 ConfigureListener.contextInitialized()\uc640 \ub3d9\uc77c\ud55c \ud638\ucd9c \uc2a4\ud0dd\uc5d0\uc11c \ud638\ucd9c\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4. -com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=\uc774 webapp\uc5d0 \ub300\ud55c ApplicationAssociate\uac00 \uc774\ubbf8 \uc874\uc7ac\ud569\ub2c8\ub2e4. -com.sun.faces.ASSERTION_FAILED=\uba85\uc81c \uc2e4\ud328 -com.sun.faces.ATTRIBUTE_NOT_SUPORTED=''{0}'' \uc18d\uc131\uc740 \uad6c\uc131 \uc694\uc18c \uc720\ud615 ''{1}''\uc5d0 \ub300\ud574 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. -com.sun.faces.CANT_CONVERT_VALUE=''{0}'' \ub4f1\ub85d \uc815\ubcf4\ub97c \uac12 \uc720\ud615\uc73c\ub85c \ubcc0\ud658\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: ''{1}''. -com.sun.faces.CANT_CLOSE_INPUT_STREAM=\uc785\ub825 \uc2a4\ud2b8\ub9bc\uc744 \ub2eb\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=\uc544\uc774\ub514\uc5d0 \ub300\ud55c \ub77c\uc774\ud504\uc0ac\uc774\ud074\uc744 \ub9cc\ub4e4 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: ''{0}''. -com.sun.faces.CANT_INSTANTIATE_CLASS=\ud074\ub798\uc2a4\ub97c \uc778\uc2a4\ud134\uc2a4\ud654\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: ''{0}''. -com.sun.faces.CANT_INTROSPECT_CLASS=\ud074\ub798\uc2a4\ub97c \uac80\uc0ac\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: ''{0}'' -com.sun.faces.CANT_PARSE_FILE=\ud30c\uc77c\uc744 \uad6c\ubb38 \ubd84\uc11d\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: ''{0}'': {1} \ud589\uc758 {2} \uc5f4\uc5d0\uc11c \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: {3}. -com.sun.faces.CHILD_NOT_OF_EXPECTED_TYPE=\uad6c\uc131 \uc694\uc18c \uc720\ud615 "{1}({2})"\uc5d0 \ub300\ud574 \uc790\uc2dd \uad6c\uc131 \uc694\uc18c \uc720\ud615 "{0}"\uc774(\uac00) \ud544\uc694\ud569\ub2c8\ub2e4. "{3}"\uc774(\uac00) \uac80\uc0c9\ub418\uc5c8\uc2b5\ub2c8\ub2e4. -com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=: \uc774 \ub9c1\ud06c\ub294 Faces \ud615\uc2dd \ub0b4\uc5d0 \uc911\ucca9\ub418\uc5b4 \uc788\uc9c0 \uc54a\uc544\uc11c \ube44\ud65c\uc131\ud654\ub429\ub2c8\ub2e4. -com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=UIForm \ub0b4 \uc911\ucca9\ub418\uc9c0 \uc54a\uc740 \ud558\ub098 \uc774\uc0c1\uc758 UICommand \uc778\uc2a4\ud134\uc2a4\uac00 \ubcf4\uae30\uc5d0\uc11c \uac80\uc0c9\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc774\ub7ec\ud55c \uba85\ub839\uacfc \uc5f0\uacb0\ub41c \uc791\uc5c5\uc774 \ud638\ucd9c\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. -com.sun.faces.COMPONENT_NOT_FOUND_ERROR=\uc2dd\ubcc4\uc790\uc5d0 \ub300\ud55c \uad6c\uc131 \uc694\uc18c\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: ''{0}''. -com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=\ubcf4\uae30\uc5d0\uc11c \uc544\uc774\ub514 ''{0}''\uc744(\ub97c) \uac00\uc9c0\ub294 \uad6c\uc131 \uc694\uc18c\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.CONTENT_TYPE_ERROR=\uc778\uc2dd\ud560 \uc218 \uc5c6\ub294 \ub0b4\uc6a9 \uc720\ud615\uc785\ub2c8\ub2e4. -com.sun.faces.CONFIG_RENDERER_REGISTRATION_MISSING_RENDERKIT=\uc544\uc774\ub514 {0}\uc744(\ub97c) \uc0ac\uc6a9\ud558\uc5ec RenderKit\uc5d0 \ub80c\ub354\ub7ec\ub97c \ub4f1\ub85d\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. RenderKit\uac00 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=\ubcf4\uae30\uc5d0 \uad6c\uc131 \uc694\uc18c \uc544\uc774\ub514 "{0}"\uc774(\uac00) \uc774\ubbf8 \uc788\uc2b5\ub2c8\ub2e4. -com.sun.faces.EMPTY_PARAMETER=\ub9e4\uac1c \ubcc0\uc218\uac00 \ube44\uc5b4 \uc788\uc2b5\ub2c8\ub2e4. -com.sun.faces.ENCODING_ERROR=\uc778\uc2dd\ud560 \uc218 \uc5c6\ub294 \ubb38\uc790 \uc778\ucf54\ub529\uc785\ub2c8\ub2e4. -com.sun.faces.ERROR_GETTING_VALUE_BINDING=\uac12\uc5d0 \ub300\ud55c ValueBinding\uc744 \uac00\uc838\uc62c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: ''{0}''. -com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=\uac12 \ubc14\uc778\ub529 \ud45c\ud604\uc2dd\uc5d0\uc11c \uac12\uc744 \uac00\uc838\uc62c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: ''{0}''. -com.sun.faces.ERROR_OPENING_FILE=\uad6c\uc131 \ud30c\uc77c\uc744 \uc5f4 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: ''{0}''. -com.sun.faces.ERROR_PROCESSING_CONFIG=\uad6c\uc131 \ucc98\ub9ac \uc911 \uc608\uae30\uce58 \uc54a\uc740 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. -com.sun.faces.ERROR_REGISTERING_DTD=DTD\ub97c \ub4f1\ub85d\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: ''{0}''. -com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=\uad00\ub9ac\ub418\ub294 Bean \ub4f1\ub85d \uc815\ubcf4\ub97c \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: ''{0}''. -com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=''{0}'' \uc18d\uc131\uc758 \ud45c\ud604\uc2dd\uc744 \ud3c9\uac00\ud55c \uacb0\uacfc \uc608\uae30\uce58 \uc54a\uc740 \uc720\ud615\uc774 \ubc18\ud658\ub418\uc5c8\uc2b5\ub2c8\ub2e4. {1} \uc720\ud615\uc774 \ud544\uc694\ud558\uc9c0\ub9cc {2} \uc720\ud615\uc774 \uc218\uc2e0\ub418\uc5c8\uc2b5\ub2c8\ub2e4. -com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=\uad6c\uc131 \uc624\ub958: \ud558\ub098 \uc774\uc0c1\uc758 \uc785\ub825 \ub9e4\uac1c \ubcc0\uc218\uac00 null\uc77c \uc218 \uc788\uc2b5\ub2c8\ub2e4. -com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=\uc11c\ube14\ub9bf \uacbd\ub85c ''{0}''\uc5d0 \ub300\ud55c FaceServlet \ub9e4\ud551\uc744 \ud655\uc778\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.FACES_SERVLET_MAPPING_INCORRECT=FacesServlet\uc5d0 '/*'\uc758 url-pattern\uc774 \uc788\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \ub2e4\ub978 url-pattern\uc744 \uc815\uc758\ud558\uc2ed\uc2dc\uc624. -com.sun.faces.FACES_CONTEXT_NOT_FOUND=\uc774 \uc694\uccad\uc744 \ucc98\ub9ac\ud558\ub294 \ub370 \uc0ac\uc6a9\ud560 \uc218 \uc788\ub294 FacesContext\uac00 \uc5c6\uc2b5\ub2c8\ub2e4. \uc694\uccad\uc774 \uc798\ubabb\ub41c \uacbd\ub85c\ub85c \uc804\uc1a1\ub418\uc5c8\uae30 \ub54c\ubb38\uc77c \uc218 \uc788\uc2b5\ub2c8\ub2e4. -com.sun.faces.FILE_NOT_FOUND=\ud30c\uc77c\uc5d0 \ub300\ud55c \ud30c\uc77c\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: ''{0}''. -com.sun.faces.ILLEGAL_ATTEMPT_SETTING_APPLICATION_ARTIFACT=\uc751\ub2f5\uc774 \ub80c\ub354\ub9c1\ub41c \ud6c4\uc5d0 {0}\uc744(\ub97c) \uc124\uc815\ud558\ub824\ub294 \uc798\ubabb\ub41c \uc2dc\ub3c4\uac00 \uc788\uc5c8\uc2b5\ub2c8\ub2e4. -com.sun.faces.ILLEGAL_CHARACTERS_ERROR=\ud5c8\uc6a9\ub418\uc9c0 \uc54a\ub294 \ubb38\uc790\uc785\ub2c8\ub2e4. -com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=lValue \ubaa8\ub4dc\uc5d0\uc11c \uc554\uc2dc\uc801 \uac1d\uccb4 \uc2dd\ubcc4\uc790\ub97c \uc798\ubabb \uc0ac\uc6a9\ud588\uc2b5\ub2c8\ub2e4: ''{0}'' -com.sun.faces.ILLEGAL_MODEL_REFERENCE=''{0}'' \ud45c\ud604\uc2dd\uc5d0 \ub300\ud55c \uc774 \ucee8\ud14d\uc2a4\ud2b8\uc5d0\uc11c \ubaa8\ub378 \ucc38\uc870\uac00 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4. -com.sun.faces.ILLEGAL_VIEW_ID=\ubcf4\uae30 \uc544\uc774\ub514 ''{0}''\uc774(\uac00) \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc544\uc774\ub514\ub294 ''/''\ub85c \uc2dc\uc791\ud574\uc57c \ud569\ub2c8\ub2e4. -com.sun.faces.INVALID_EXPRESSION=\uc798\ubabb\ub41c \ud45c\ud604\uc2dd\uc785\ub2c8\ub2e4: ''{0}''. -com.sun.faces.INVALID_INIT_PARAM=\ucd08\uae30\ud654 \ub9e4\uac1c \ubcc0\uc218 ''{1}''\uc758 \uac12\uc774 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4: ''{0}'. \ud5c8\uc6a9 \uac00\ub2a5\ud55c \uac12\uc740 'true' \ub610\ub294 'false'\uc785\ub2c8\ub2e4. \uae30\ubcf8\uac12\uc740 'false'\uc785\ub2c8\ub2e4. -com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=\uc798\ubabb\ub41c \uba54\uc2dc\uc9c0 \uc2ec\uac01\ub3c4 ''{0}''\uc774(\uac00) \uad6c\uc131\uc5d0 \uc815\uc758\ub418\uc5c8\uc2b5\ub2c8\ub2e4. -com.sun.faces.INVALID_SCOPE_LIFESPAN=\ud45c\ud604\uc2dd ''{0}''\uc5d0 \uc758\ud574 \ucc38\uc870\ub41c \uac1d\uccb4\uc758 \ubc94\uc704 ''{1}''\uc774(\uac00) \ucc38\uc870\ud558\ub294 \uad00\ub9ac\ub418\ub294 Bean(''{2}'')\uc758 \ubc94\uc704 ''{3}'' \ubcf4\ub2e4 \uc9e7\uc2b5\ub2c8\ub2e4. -com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=\uc544\uc774\ub514\uc5d0 \ub300\ud574 LifecycleId\uac00 \uc774\ubbf8 \ucd94\uac00\ub418\uc5c8\uc2b5\ub2c8\ub2e4: ''{0}''. -com.sun.faces.LIFECYCLE_ID_NOT_FOUND=\uc544\uc774\ub514 ''{0}''\uc5d0 \ub300\ud55c LifecycleId\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.MAXIMUM_EVENTS_REACHED=\ucd5c\ub300 \uc774\ubca4\ud2b8 \uc218 ''{0}''\uc5d0 \ub3c4\ub2ec\ud588\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=\uad00\ub9ac\ub418\ub294 Bean ''{1}''\uc5d0 \ub300\uc0c1 \ub4f1\ub85d \uc815\ubcf4 ''{0}''\uc744(\ub97c) \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \ub4f1\ub85d \uc815\ubcf4\ub294 \ubaa9\ub85d \ub610\ub294 \ubc30\uc5f4 \uc778\uc2a4\ud134\uc2a4\ub97c \ud5c8\uc6a9\ud574\uc57c \ud569\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{1}''\uc5d0 ''{0}'' \ub4f1\ub85d \uc815\ubcf4\uac00 \ub9f5 \ub4f1\ub85d \uc815\ubcf4\ub85c \uc815\uc758\ub418\uc5c8\uc9c0\ub9cc, \ud074\ub798\uc2a4\uc758 setter\uac00 \ub9f5 \uc778\uc2a4\ud134\uc2a4\ub97c \ud5c8\uc6a9\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{1}''\uc5d0 ''{0}'' \ub4f1\ub85d \uc815\ubcf4\uac00 \ub9f5 \ub4f1\ub85d \uc815\ubcf4\ub85c \uc815\uc758\ub418\uc5c8\uc9c0\ub9cc, \ud074\ub798\uc2a4\uc758 getter\uac00 \ub9f5 \uc778\uc2a4\ud134\uc2a4\ub97c \ubc18\ud658\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{1}''\uc5d0 ''{0}'' \ub4f1\ub85d \uc815\ubcf4\uac00 \ubaa9\ub85d \ub4f1\ub85d \uc815\ubcf4\ub85c \uc815\uc758\ub418\uc5c8\uc9c0\ub9cc, \ud074\ub798\uc2a4\uc758 setter\uac00 \ubaa9\ub85d \ub610\ub294 \ubc30\uc5f4 \uc778\uc2a4\ud134\uc2a4\ub97c \ud5c8\uc6a9\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{1}''\uc5d0 ''{0}'' \ub4f1\ub85d \uc815\ubcf4\uac00 \ubaa9\ub85d \ub4f1\ub85d \uc815\ubcf4\ub85c \uc815\uc758\ub418\uc5c8\uc9c0\ub9cc, \ud074\ub798\uc2a4\uc758 getter\uac00 \ubaa9\ub85d \ub610\ub294 \ubc30\uc5f4 \uc778\uc2a4\ud134\uc2a4\ub97c \ubc18\ud658\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{1}''\uc5d0 ''{0}'' \ub4f1\ub85d \uc815\ubcf4\uac00 \ubaa9\ub85d \ub4f1\ub85d \uc815\ubcf4\ub85c \uc815\uc758\ub418\uc5c8\uc2b5\ub2c8\ub2e4. getter\uac00 \ubc30\uc5f4 \uc720\ud615\uc744 \ubc18\ud658\ud558\uc9c0\ub9cc, \uc5f0\uacb0\ub41c setter\uac00 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=\uad00\ub9ac\ub418\ub294 Bean ''{1}''\uc5d0 \ub300\uc0c1 \ub4f1\ub85d \uc815\ubcf4 ''{0}''\uc744(\ub97c) \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \ub300\uc0c1 \ub4f1\ub85d \uc815\ubcf4\uac00 \ubaa9\ub85d\uc758 \uc778\uc2a4\ud134\uc2a4\uac00 \uc544\ub2cc \uae30\uc874 \uac12\uc744 \ubc18\ud658\ud588\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{0}''\uc5d0 \ub300\ud55c \uad6c\uc131\uc774 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uad00\ub9ac\ub418\ub294 Bean\uc774 \ubaa9\ub85d\uc73c\ub85c \uad6c\uc131\ub418\uc5c8\uc9c0\ub9cc \ub9f5 \ud56d\ubaa9 \ub610\ub294 \uad00\ub9ac\ub418\ub294 \ub4f1\ub85d \uc815\ubcf4\ub97c \uc815\uc758\ud558\ub824\uace0 \ud569\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{0}''\uc5d0 \ub300\ud55c \uad6c\uc131\uc774 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uad00\ub9ac\ub418\ub294 Bean\uc774 \ub9f5\uc73c\ub85c \uad6c\uc131\ub418\uc5c8\uc9c0\ub9cc, \uad00\ub9ac\ub418\ub294 \ub4f1\ub85d \uc815\ubcf4\ub97c \uc815\uc758\ud558\ub824\uace0 \ud569\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{0}''\uc5d0 \ub300\ud55c \uad6c\uc131\uc774 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uad00\ub9ac\ub418\ub294 Bean\uc5d0 \ubaa9\ub85d \ud56d\ubaa9\uc744 \ud3ec\ud568\ud558\ub294 ''{1}'' \uc774\ub984\uc758 \uad00\ub9ac\ub418\ub294 \ub4f1\ub85d \uc815\ubcf4\uac00 \ud3ec\ud568\ub418\uc5b4 \uc788\uc9c0\ub9cc \uac12 \ubc0f/\ub610\ub294 \ub9f5 \ud56d\ubaa9\uc774 \uc798\ubabb \uc815\uc758\ub418\uc5c8\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{0}''\uc5d0 \ub300\ud55c \uad6c\uc131\uc774 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uad00\ub9ac\ub418\ub294 Bean\uc5d0 \ub9f5 \ud56d\ubaa9\uc744 \ud3ec\ud568\ud558\ub294 ''{1}'' \uc774\ub984\uc758 \uad00\ub9ac\ub418\ub294 \ub4f1\ub85d \uc815\ubcf4\uac00 \ud3ec\ud568\ub418\uc5b4 \uc788\uc9c0\ub9cc \uac12\uc774 \uc798\ubabb \uc815\uc758\ub418\uc5c8\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{0}''\uc5d0 \ub300\ud55c \uad6c\uc131\uc774 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uad00\ub9ac\ub418\ub294 Bean\uc5d0 \ubaa9\ub85d \ub610\ub294 \ub9f5 \ud56d\ubaa9\uc774\ub098 \uac12 \uc694\uc18c\ub97c \ud3ec\ud568\ud558\uc9c0 \uc54a\ub294 ''{1}'' \uc774\ub984\uc758 \uad00\ub9ac\ub418\ub294 \ub4f1\ub85d \uc815\ubcf4\uac00 \ud3ec\ud568\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{3}''\uc5d0 \ub300\ud574 ''{1}'' \uc720\ud615\uc758 \uac12 ''{0}''\uc744(\ub97c) ''{2}'' \uc720\ud615\uc73c\ub85c \ubcc0\ud658\ud558\ub294 \uc911 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{1}''\uc5d0 \ub300\ud55c Bean \ub610\ub294 \ub4f1\ub85d \uc815\ubcf4 \ud074\ub798\uc2a4 ''{0}''\uc744(\ub97c) \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=\uc885\uc18d\uc131\uc774 \ub204\ub77d\ub418\uc5b4 \uad00\ub9ac\ub418\ub294 Bean ''{1}''\uc5d0 \ub300\ud55c Bean \ub610\ub294 \ub4f1\ub85d \uc815\ubcf4 \ud074\ub798\uc2a4 ''{0}''\uc744(\ub97c) \ub85c\ub4dc\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: {2}. -com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{1}''\uc5d0 \ub300\ud55c \uad00\ub9ac\ub418\ub294 Bean \ud074\ub798\uc2a4 ''{0}''\uc774(\uac00) \uacf5\uc6a9\uc73c\ub85c \uc120\uc5b8\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{1}''\uc5d0 \ub300\ud55c \uad00\ub9ac\ub418\ub294 Bean \ud074\ub798\uc2a4 ''{0}''\uc774(\uac00) \ucd94\uc0c1 \ub610\ub294 \uc778\ud130\ud398\uc774\uc2a4\ub85c \uc120\uc5b8\ub418\uc5c8\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{1}''\uc5d0 \ub300\ud55c \uad00\ub9ac\ub418\ub294 Bean \ud074\ub798\uc2a4 ''{0}''\uc774(\uac00) \uacf5\uc6a9 no-argument \uad6c\uc131\uc790\ub97c \uc120\uc5b8\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{0}''\uc5d0\uc11c \uc790\uc6d0 \uc0bd\uc785\uc744 \uc218\ud589\ud558\ub294 \uc911 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{1}''\uc758 ''{0}'' \ub4f1\ub85d \uc815\ubcf4\uac00 ''{2}''\uc758 \ub4f1\ub85d \uc815\ubcf4 \ud074\ub798\uc2a4\ub85c \uc815\uc758\ub418\uc5c8\uc9c0\ub9cc \uc774 \ud074\ub798\uc2a4\ub97c \ub4f1\ub85d \uc815\ubcf4\uc5d0 \ud560\ub2f9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{0}''\uc744(\ub97c) \uac80\uc0ac\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{1}''\uc758 ''{0}'' \ub4f1\ub85d \uc815\ubcf4\uac00 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{1}''\uc758 ''{0}'' \ub4f1\ub85d \uc815\ubcf4\uc5d0 setter\uac00 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{1}''\uc758 ''{0}'' \ub4f1\ub85d \uc815\ubcf4\uac00 \ub450 \uac1c \uc774\uc0c1\uc758 \uc778\uc218\ub97c \ud5c8\uc6a9\ud569\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{1}''\uc758 ''{0}'' \ub4f1\ub85d \uc815\ubcf4\ub97c \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{0}''\uc744(\ub97c) \ub9cc\ub4e4 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c \ubb38\uc81c\uac00 \ubc1c\uacac\ub418\uc5c8\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{0}''\uc774(\uac00) \uc694\uccad\ub420 \ub54c Faces\uac00 \ub9cc\ub4e4 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c \ubb38\uc81c\uac00 \ubc1c\uacac\ub418\uc5c8\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{0}''\uc744(\ub97c) \ucc98\ub9ac\ud558\ub294 \uc911 \uc608\uae30\uce58 \uc54a\uc740 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=\uad00\ub9ac\ub418\ub294 \ub4f1\ub85d \uc815\ubcf4 ''{0}''\uc744(\ub97c) \ucc98\ub9ac\ud558\ub294 \uc911 \uc608\uae30\uce58 \uc54a\uc740 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. -com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=\ubc94\uc704 ''{0}''\uc774(\uac00) ''view'', ''request'', ''session'', ''application'' \uc911 \ud558\ub098\uac00 \uc544\ub2c8\uba70, ValueExpression(#{...})\uc744 \ub098\ud0c0\ub0b4\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. -com.sun.faces.MISSING_CLASS_ERROR=\ud074\ub798\uc2a4 \ub204\ub77d: ''{0}'' \ud074\ub798\uc2a4\ub97c \ub85c\ub4dc\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.MISSING_RESOURCE_ERROR=\uc790\uc6d0 \ub204\ub77d: ResourceBundle\uc744 \uac00\uc838\uc62c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.MODELUPDATE_ERROR=''{1}'' \ubaa8\ub378\uc5d0\uc11c ''{0}'' \uac12\uc5d0 \ub300\ud55c \ubaa8\ub378 \uc5c5\ub370\uc774\ud2b8\uc5d0 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4. -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=\uacb0\uacfc ''{1}''\uc5d0 \ub300\ud574 \ubcf4\uae30 \uc544\uc774\ub514 ''{0}''\uc5d0\uc11c \uc77c\uce58\ud558\ub294 \ud0d0\uc0c9 \ud56d\ubaa9\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=\uacb0\uacfc ''{2}''\uc744(\ub97c) \uac00\uc9c0\ub294 \uc791\uc5c5 ''{1}''\uc5d0 \ub300\ud574 \ubcf4\uae30 \uc544\uc774\ub514 ''{0}''\uc5d0\uc11c \uc77c\uce58\ud558\ub294 \ud0d0\uc0c9 \ud56d\ubaa9\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=\uacb0\uacfc ''{0}''\uc758 \ucffc\ub9ac \ubb38\uc790\uc5f4\uc774 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4. -com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=\ud45c\ud604\uc2dd \uc624\ub958: ''{0}'' \uc774\ub984\uc758 \uac1d\uccb4\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=\ucc98\ub9ac\uae30 \ud074\ub798\uc2a4\uac00 \uc788\ub294 \ud0dc\uadf8\uc5d0 UIComponentTag \uc624\ub958\uac00 \uc911\ucca9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4: ''{0}''. -com.sun.faces.NOT_NESTED_IN_TYPE_TAG_ERROR={0} \ud0dc\uadf8\ub294 \uc720\ud615 {1}\uc758 \uad6c\uc131 \uc694\uc18c\uc640 \uc5f0\uacb0\ub41c \ud0dc\uadf8 \ub0b4\uc5d0\uc11c \uc911\ucca9\ub418\uc5b4\uc57c \ud569\ub2c8\ub2e4. -com.sun.faces.NO_DTD_FOUND_ERROR=\uacf5\uc6a9 \uc544\uc774\ub514 ''{0}''(\uc73c)\ub85c \uacbd\ub85c ''{1}''\uc5d0\uc11c DTD\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.NULL_BODY_CONTENT_ERROR=\ucc98\ub9ac\uae30 \ud074\ub798\uc2a4\uac00 \uc788\ub294 \ud0dc\uadf8\uc5d0 \ub300\ud574 BodyContent\uac00 null\uc785\ub2c8\ub2e4: ''{0}''. -com.sun.faces.NULL_COMPONENT_ERROR=\uad6c\uc131 \uc624\ub958: \uad6c\uc131 \uc694\uc18c \uc778\uc218\uac00 null\uc785\ub2c8\ub2e4. -com.sun.faces.NULL_CONFIGURATION=\uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8\uc5d0 \ub300\ud574 \ub85c\ub4dc\ub41c \uad6c\uc131\uc774 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.NULL_CONTEXT_ERROR=\uc778\uc218 \uc624\ub958: \ucee8\ud14d\uc2a4\ud2b8 \uc778\uc218\uac00 null\uc785\ub2c8\ub2e4. -com.sun.faces.NULL_EVENT_ERROR=\uc778\uc218 \uc624\ub958: \uc774\ubca4\ud2b8 \uc778\uc218\uac00 null\uc785\ub2c8\ub2e4. -com.sun.faces.NULL_FORVALUE=\uad6c\uc131 \uc694\uc18c "{0}"\uc744(\ub97c) \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.NULL_HANDLER_ERROR=\uc778\uc218 \uc624\ub958: \ucc98\ub9ac\uae30 \uc778\uc218\uac00 null\uc785\ub2c8\ub2e4. -com.sun.faces.NULL_LOCALE_ERROR=\uc778\uc218 \uc624\ub958: \ub85c\ucf08 \uc778\uc218\uac00 null\uc785\ub2c8\ub2e4. -com.sun.faces.NULL_MESSAGE_ERROR=\uc778\uc218 \uc624\ub958: \uba54\uc2dc\uc9c0 \ub9e4\uac1c \ubcc0\uc218\ub294 null\uc774 \ub420 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.NULL_PARAMETERS_ERROR=\uc778\uc218 \uc624\ub958: \ub9e4\uac1c \ubcc0\uc218 ''{0}''\uc774(\uac00) null\uc785\ub2c8\ub2e4. -com.sun.faces.NULL_REQUEST_VIEW_ERROR=\uc778\uc218 \uc624\ub958: \uc694\uccad \ubcf4\uae30 \uc778\uc218\uac00 null\uc785\ub2c8\ub2e4. -com.sun.faces.NULL_RESPONSE_STREAM_ERROR=\uc778\uc218 \uc624\ub958: ResponseStream \uc778\uc218\uac00 null\uc785\ub2c8\ub2e4. -com.sun.faces.NULL_RESPONSE_VIEW_ERROR=\uc778\uc218 \uc624\ub958: ResponseView \uc778\uc218\uac00 null\uc785\ub2c8\ub2e4. -com.sun.faces.NULL_RESPONSE_WRITER_ERROR=\uc778\uc218 \uc624\ub958: ResponseWriter \uc778\uc218\uac00 null\uc785\ub2c8\ub2e4. +com.sun.faces.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK=ApplicationAssociate ctor이 ConfigureListener.contextInitialized()와 동일한 호출 스택에서 호출되지 않았습니다. +com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=이 webapp에 대한 ApplicationAssociate가 이미 존재합니다. +com.sun.faces.ASSERTION_FAILED=명제 실패 +com.sun.faces.ATTRIBUTE_NOT_SUPORTED=''{0}'' 속성은 구성 요소 유형 ''{1}''에 대해 지원되지 않습니다. +com.sun.faces.CANT_CONVERT_VALUE=''{0}'' 등록 정보를 값 유형으로 변환할 수 없습니다: ''{1}''. +com.sun.faces.CANT_CLOSE_INPUT_STREAM=입력 스트림을 닫을 수 없습니다. +com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=아이디에 대한 라이프사이클을 만들 수 없습니다: ''{0}''. +com.sun.faces.CANT_INSTANTIATE_CLASS=클래스를 인스턴스화할 수 없습니다: ''{0}''. +com.sun.faces.CANT_INTROSPECT_CLASS=클래스를 검사할 수 없습니다: ''{0}'' +com.sun.faces.CANT_PARSE_FILE=파일을 구문 분석할 수 없습니다: ''{0}'': {1} 행의 {2} 열에서 오류가 발생했습니다: {3}. +com.sun.faces.CHILD_NOT_OF_EXPECTED_TYPE=구성 요소 유형 "{1}({2})"에 대해 자식 구성 요소 유형 "{0}"이(가) 필요합니다. "{3}"이(가) 검색되었습니다. +com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=: 이 링크는 Faces 형식 내에 중첩되어 있지 않아서 비활성화됩니다. +com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=UIForm 내 중첩되지 않은 하나 이상의 UICommand 인스턴스가 보기에서 검색되었습니다. 이러한 명령과 연결된 작업이 호출되지 않습니다. +com.sun.faces.COMPONENT_NOT_FOUND_ERROR=식별자에 대한 구성 요소를 찾을 수 없습니다: ''{0}''. +com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=보기에서 아이디 ''{0}''을(를) 가지는 구성 요소를 찾을 수 없습니다. +com.sun.faces.CONTENT_TYPE_ERROR=인식할 수 없는 내용 유형입니다. +com.sun.faces.CONFIG_RENDERER_REGISTRATION_MISSING_RENDERKIT=아이디 {0}을(를) 사용하여 RenderKit에 렌더러를 등록할 수 없습니다. RenderKit가 없습니다. +com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=보기에 구성 요소 아이디 "{0}"이(가) 이미 있습니다. +com.sun.faces.EMPTY_PARAMETER=매개 변수가 비어 있습니다. +com.sun.faces.ENCODING_ERROR=인식할 수 없는 문자 인코딩입니다. +com.sun.faces.ERROR_GETTING_VALUE_BINDING=값에 대한 ValueBinding을 가져올 수 없습니다: ''{0}''. +com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=값 바인딩 표현식에서 값을 가져올 수 없습니다: ''{0}''. +com.sun.faces.ERROR_OPENING_FILE=구성 파일을 열 수 없습니다: ''{0}''. +com.sun.faces.ERROR_PROCESSING_CONFIG=구성 처리 중 예기치 않은 오류가 발생했습니다. +com.sun.faces.ERROR_REGISTERING_DTD=DTD를 등록할 수 없습니다: ''{0}''. +com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=관리되는 Bean 등록 정보를 설정할 수 없습니다: ''{0}''. +com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=''{0}'' 속성의 표현식을 평가한 결과 예기치 않은 유형이 반환되었습니다. {1} 유형이 필요하지만 {2} 유형이 수신되었습니다. +com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=구성 오류: 하나 이상의 입력 매개 변수가 null일 수 있습니다. +com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=서블릿 경로 ''{0}''에 대한 FaceServlet 매핑을 확인할 수 없습니다. +com.sun.faces.FACES_SERVLET_MAPPING_INCORRECT=FacesServlet에 '/*'의 url-pattern이 있을 수 없습니다. 다른 url-pattern을 정의하십시오. +com.sun.faces.FACES_CONTEXT_NOT_FOUND=이 요청을 처리하는 데 사용할 수 있는 FacesContext가 없습니다. 요청이 잘못된 경로로 전송되었기 때문일 수 있습니다. +com.sun.faces.FILE_NOT_FOUND=파일에 대한 파일을 찾을 수 없습니다: ''{0}''. +com.sun.faces.ILLEGAL_ATTEMPT_SETTING_APPLICATION_ARTIFACT=응답이 렌더링된 후에 {0}을(를) 설정하려는 잘못된 시도가 있었습니다. +com.sun.faces.ILLEGAL_CHARACTERS_ERROR=허용되지 않는 문자입니다. +com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=lValue 모드에서 암시적 객체 식별자를 잘못 사용했습니다: ''{0}'' +com.sun.faces.ILLEGAL_MODEL_REFERENCE=''{0}'' 표현식에 대한 이 컨텍스트에서 모델 참조가 잘못되었습니다. +com.sun.faces.ILLEGAL_VIEW_ID=보기 아이디 ''{0}''이(가) 잘못되었습니다. 아이디는 ''/''로 시작해야 합니다. +com.sun.faces.INVALID_EXPRESSION=잘못된 표현식입니다: ''{0}''. +com.sun.faces.INVALID_INIT_PARAM=초기화 매개 변수 ''{1}''의 값이 잘못되었습니다: ''{0}'. 허용 가능한 값은 'true' 또는 'false'입니다. 기본값은 'false'입니다. +com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=잘못된 메시지 심각도 ''{0}''이(가) 구성에 정의되었습니다. +com.sun.faces.INVALID_SCOPE_LIFESPAN=표현식 ''{0}''에 의해 참조된 객체의 범위 ''{1}''이(가) 참조하는 관리되는 Bean(''{2}'')의 범위 ''{3}'' 보다 짧습니다. +com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=아이디에 대해 LifecycleId가 이미 추가되었습니다: ''{0}''. +com.sun.faces.LIFECYCLE_ID_NOT_FOUND=아이디 ''{0}''에 대한 LifecycleId를 찾을 수 없습니다. +com.sun.faces.MAXIMUM_EVENTS_REACHED=최대 이벤트 수 ''{0}''에 도달했습니다. +com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=관리되는 Bean ''{1}''에 대상 등록 정보 ''{0}''을(를) 설정할 수 없습니다. 등록 정보는 목록 또는 배열 인스턴스를 허용해야 합니다. +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=관리되는 Bean ''{1}''에 ''{0}'' 등록 정보가 맵 등록 정보로 정의되었지만, 클래스의 setter가 맵 인스턴스를 허용하지 않습니다. +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=관리되는 Bean ''{1}''에 ''{0}'' 등록 정보가 맵 등록 정보로 정의되었지만, 클래스의 getter가 맵 인스턴스를 반환하지 않습니다. +com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=관리되는 Bean ''{1}''에 ''{0}'' 등록 정보가 목록 등록 정보로 정의되었지만, 클래스의 setter가 목록 또는 배열 인스턴스를 허용하지 않습니다. +com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=관리되는 Bean ''{1}''에 ''{0}'' 등록 정보가 목록 등록 정보로 정의되었지만, 클래스의 getter가 목록 또는 배열 인스턴스를 반환하지 않습니다. +com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=관리되는 Bean ''{1}''에 ''{0}'' 등록 정보가 목록 등록 정보로 정의되었습니다. getter가 배열 유형을 반환하지만, 연결된 setter가 없습니다. +com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=관리되는 Bean ''{1}''에 대상 등록 정보 ''{0}''을(를) 설정할 수 없습니다. 대상 등록 정보가 목록의 인스턴스가 아닌 기존 값을 반환했습니다. +com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=관리되는 Bean ''{0}''에 대한 구성이 잘못되었습니다. 관리되는 Bean이 목록으로 구성되었지만 맵 항목 또는 관리되는 등록 정보를 정의하려고 합니다. +com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=관리되는 Bean ''{0}''에 대한 구성이 잘못되었습니다. 관리되는 Bean이 맵으로 구성되었지만, 관리되는 등록 정보를 정의하려고 합니다. +com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=관리되는 Bean ''{0}''에 대한 구성이 잘못되었습니다. 관리되는 Bean에 목록 항목을 포함하는 ''{1}'' 이름의 관리되는 등록 정보가 포함되어 있지만 값 및/또는 맵 항목이 잘못 정의되었습니다. +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=관리되는 Bean ''{0}''에 대한 구성이 잘못되었습니다. 관리되는 Bean에 맵 항목을 포함하는 ''{1}'' 이름의 관리되는 등록 정보가 포함되어 있지만 값이 잘못 정의되었습니다. +com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=관리되는 Bean ''{0}''에 대한 구성이 잘못되었습니다. 관리되는 Bean에 목록 또는 맵 항목이나 값 요소를 포함하지 않는 ''{1}'' 이름의 관리되는 등록 정보가 포함되어 있습니다. +com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=관리되는 Bean ''{3}''에 대해 ''{1}'' 유형의 값 ''{0}''을(를) ''{2}'' 유형으로 변환하는 중 오류가 발생했습니다. +com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=관리되는 Bean ''{1}''에 대한 Bean 또는 등록 정보 클래스 ''{0}''을(를) 찾을 수 없습니다. +com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=종속성이 누락되어 관리되는 Bean ''{1}''에 대한 Bean 또는 등록 정보 클래스 ''{0}''을(를) 로드할 수 없습니다: {2}. +com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=관리되는 Bean ''{1}''에 대한 관리되는 Bean 클래스 ''{0}''이(가) 공용으로 선언되지 않았습니다. +com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=관리되는 Bean ''{1}''에 대한 관리되는 Bean 클래스 ''{0}''이(가) 추상 또는 인터페이스로 선언되었습니다. +com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=관리되는 Bean ''{1}''에 대한 관리되는 Bean 클래스 ''{0}''이(가) 공용 no-argument 구성자를 선언하지 않습니다. +com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=관리되는 Bean ''{0}''에서 자원 삽입을 수행하는 중 오류가 발생했습니다. +com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=관리되는 Bean ''{1}''의 ''{0}'' 등록 정보가 ''{2}''의 등록 정보 클래스로 정의되었지만 이 클래스를 등록 정보에 할당할 수 없습니다. +com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=관리되는 Bean ''{0}''을(를) 검사할 수 없습니다. +com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=관리되는 Bean ''{1}''의 ''{0}'' 등록 정보가 없습니다. +com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=관리되는 Bean ''{1}''의 ''{0}'' 등록 정보에 setter가 없습니다. +com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=관리되는 Bean ''{1}''의 ''{0}'' 등록 정보가 두 개 이상의 인수를 허용합니다. +com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=관리되는 Bean ''{1}''의 ''{0}'' 등록 정보를 설정할 수 없습니다. +com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=관리되는 Bean ''{0}''을(를) 만들 수 없습니다. 다음 문제가 발견되었습니다. +com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=관리되는 Bean ''{0}''이(가) 요청될 때 Faces가 만들 수 없습니다. 다음 문제가 발견되었습니다. +com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=관리되는 Bean ''{0}''을(를) 처리하는 중 예기치 않은 오류가 발생했습니다. +com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=관리되는 등록 정보 ''{0}''을(를) 처리하는 중 예기치 않은 오류가 발생했습니다. +com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=범위 ''{0}''이(가) ''view'', ''request'', ''session'', ''application'' 중 하나가 아니며, ValueExpression(#{...})을 나타내지 않습니다. +com.sun.faces.MISSING_CLASS_ERROR=클래스 누락: ''{0}'' 클래스를 로드할 수 없습니다. +com.sun.faces.MISSING_RESOURCE_ERROR=자원 누락: ResourceBundle을 가져올 수 없습니다. +com.sun.faces.MODELUPDATE_ERROR=''{1}'' 모델에서 ''{0}'' 값에 대한 모델 업데이트에 실패했습니다. +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=결과 ''{1}''에 대해 보기 아이디 ''{0}''에서 일치하는 탐색 항목을 찾을 수 없습니다. +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=결과 ''{2}''을(를) 가지는 작업 ''{1}''에 대해 보기 아이디 ''{0}''에서 일치하는 탐색 항목을 찾을 수 없습니다. +com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=결과 ''{0}''의 쿼리 문자열이 잘못되었습니다. +com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=표현식 오류: ''{0}'' 이름의 객체를 찾을 수 없습니다. +com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=처리기 클래스가 있는 태그에 UIComponentTag 오류가 중첩되지 않습니다: ''{0}''. +com.sun.faces.NOT_NESTED_IN_TYPE_TAG_ERROR={0} 태그는 유형 {1}의 구성 요소와 연결된 태그 내에서 중첩되어야 합니다. +com.sun.faces.NO_DTD_FOUND_ERROR=공용 아이디 ''{0}''(으)로 경로 ''{1}''에서 DTD를 찾을 수 없습니다. +com.sun.faces.NULL_BODY_CONTENT_ERROR=처리기 클래스가 있는 태그에 대해 BodyContent가 null입니다: ''{0}''. +com.sun.faces.NULL_COMPONENT_ERROR=구성 오류: 구성 요소 인수가 null입니다. +com.sun.faces.NULL_CONFIGURATION=응용 프로그램에 대해 로드된 구성이 없습니다. +com.sun.faces.NULL_CONTEXT_ERROR=인수 오류: 컨텍스트 인수가 null입니다. +com.sun.faces.NULL_EVENT_ERROR=인수 오류: 이벤트 인수가 null입니다. +com.sun.faces.NULL_FORVALUE=구성 요소 "{0}"을(를) 찾을 수 없습니다. +com.sun.faces.NULL_HANDLER_ERROR=인수 오류: 처리기 인수가 null입니다. +com.sun.faces.NULL_LOCALE_ERROR=인수 오류: 로켈 인수가 null입니다. +com.sun.faces.NULL_MESSAGE_ERROR=인수 오류: 메시지 매개 변수는 null이 될 수 없습니다. +com.sun.faces.NULL_PARAMETERS_ERROR=인수 오류: 매개 변수 ''{0}''이(가) null입니다. +com.sun.faces.NULL_REQUEST_VIEW_ERROR=인수 오류: 요청 보기 인수가 null입니다. +com.sun.faces.NULL_RESPONSE_STREAM_ERROR=인수 오류: ResponseStream 인수가 null입니다. +com.sun.faces.NULL_RESPONSE_VIEW_ERROR=인수 오류: ResponseView 인수가 null입니다. +com.sun.faces.NULL_RESPONSE_WRITER_ERROR=인수 오류: ResponseWriter 인수가 null입니다. com.sun.faces.NULL_VIEW_ID=Argument Error: view id argument is null. -com.sun.faces.OBJECT_CREATION_ERROR=\uad6c\uc131\ub41c \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8 \uac1d\uccb4\ub97c \ud558\ub098 \uc774\uc0c1 \ub9cc\ub4e4 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc790\uc138\ud55c \ub0b4\uc6a9\uc740 \uc6f9 \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8 \ub85c\uadf8\ub97c \ud655\uc778\ud558\uc2ed\uc2dc\uc624. -com.sun.faces.OPTION_NOT_SELECT_ITEM=\uc778\uc218 \uc624\ub958: \uad6c\uc131 \uc694\uc18c \uc635\uc158 "{0}"\uc740(\ub294) jakarta.faces.model.SelectItem\uc758 \uc778\uc2a4\ud134\uc2a4\uac00 \uc544\ub2d9\ub2c8\ub2e4. \uc720\ud615\uc744 \ucc3e\uc558\uc2b5\ub2c8\ub2e4: ''{1}''. -com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=: \ud0d0\uc0c9 \ud56d\ubaa9\uc744 \uc77c\uce58\uc2dc\ud0ac \uc218 \uc5c6\uc5b4\uc11c \uc774 \ubc84\ud2bc\uc774 \ube44\ud65c\uc131\ud654\ub418\uc5c8\uc2b5\ub2c8\ub2e4. -com.sun.faces.OUTCOME_TARGET_LINK_NO_MATCH=: \ud0d0\uc0c9 \ud56d\ubaa9\uc744 \uc77c\uce58\uc2dc\ud0ac \uc218 \uc5c6\uc5b4\uc11c \uc774 \ub9c1\ud06c\uac00 \ube44\ud65c\uc131\ud654\ub418\uc5c8\uc2b5\ub2c8\ub2e4. -com.sun.faces.PHASE_ID_OUT_OF_BOUNDS=PhaseId\uac00 \uc544\uc774\ub514\uc5d0 \ub300\ud55c \uacbd\uacc4\ub97c \ubc97\uc5b4\ub0a9\ub2c8\ub2e4: ''{0}''. -com.sun.faces.RENDERER_NOT_FOUND=\ub80c\ub354\ub7ec \uc720\ud615\uc5d0 \ub300\ud55c \ub80c\ub354\ub7ec\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: ''{0}''. -com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=\uc0c1\ud0dc \uc624\ub958: \uc774 \uc694\uccad\uc5d0 \ub300\ud55c RequestView\uac00 \uc774\ubbf8 \uc124\uc815\ub418\uc5c8\uc2b5\ub2c8\ub2e4. -com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=\uc790\uc6d0 \ud615\uc2dd\uc774 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \ub4f1\ub85d \uc815\ubcf4 ''{0}''\uc744(\ub97c) \uad6c\ubb38 \ubd84\uc11d\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=\uc790\uc6d0 \ud615\uc2dd\uc774 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \ub4f1\ub85d \uc815\ubcf4 ''{0}''\uc5d0 \ucf5c\ub860(:)\uc774 \ub450 \uac1c \uc774\uc0c1 \uc788\uc2b5\ub2c8\ub2e4. -com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=\uc790\uc6d0 \ud615\uc2dd\uc774 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc790\uc6d0 \uc774\ub984\uacfc \ub77c\uc774\ube0c\ub7ec\ub9ac \uc774\ub984\uc744 \ucd94\ucd9c\ud558\uae30 \uc704\ud574 \ub4f1\ub85d \uc815\ubcf4 ''{0}''\uc744(\ub97c) \uad6c\ubb38 \ubd84\uc11d\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.SAVING_STATE_ERROR=\uc0c1\ud0dc\ub97c \uc800\uc7a5\ud558\ub294 \uc911 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. -com.sun.faces.SUPPORTS_COMPONENT_ERROR=\uc778\uc218 \uc624\ub958: ''{0}''\uc740(\ub294) \uc774 \ub80c\ub354\ub7ec\uc5d0 \ub300\ud574 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. -com.sun.faces.TYPECONVERSION_ERROR=''{1}''\uc758 \uac12 ''{0}''\uc744(\ub97c) \uc124\uc815\ud558\ub294 \uc911 \ubcc0\ud658 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. -com.sun.faces.VALIDATION_COMMAND_ERROR=\uac80\uc99d \uc624\ub958\uc785\ub2c8\ub2e4. ''{0}''\uc740(\ub294) \uac12 \ub610\ub294 \uc774\ubbf8\uc9c0 \uc18d\uc131\uc744 \uac00\uc838\uc57c \ud569\ub2c8\ub2e4. -com.sun.faces.VALIDATION_EL_ERROR=\uac80\uc99d \uc624\ub958\uc785\ub2c8\ub2e4. \ub2e4\uc74c\uc5d0 \ub300\ud55c \ud45c\ud604\uc2dd\uc774 \uc798\ubabb\ub418\uc5c8\uc2b5\ub2c8\ub2e4: ''{0}'' -com.sun.faces.VALIDATION_ID_ERROR=\uac80\uc99d \uc624\ub958\uc785\ub2c8\ub2e4. \ub2e4\uc74c Faces \ud0dc\uadf8\uc5d0 \uc544\uc774\ub514\uac00 \ub4e4\uc5b4 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4:''{0}'' -com.sun.faces.CANNOT_CONVERT=converterId "{0}" \ub610\ub294 \ubc14\uc778\ub4dc "{1}"\uc744(\ub97c) \uc0ac\uc6a9\ud558\uc5ec \ubcc0\ud658\uae30 \uc778\uc2a4\ud134\uc2a4\ub97c \ud655\uc778\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.CANNOT_VALIDATE=validatorId "{0}\" \ub610\ub294 \ubc14\uc778\ub4dc "{1}"\uc744(\ub97c) \uc0ac\uc6a9\ud558\uc5ec \uac80\uc99d\uc790 \uc778\uc2a4\ud134\uc2a4\ub97c \ud655\uc778\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.verifier.CLASS_NOT_FOUND=[{0}:{1}] \ud074\ub798\uc2a4\uac00 \uc5c6\uc2b5\ub2c8\ub2e4. -com.sun.faces.verifier.CLASS_MISSING_DEP=[{0}:{1}] \uc885\uc18d\uc131\uc774 \ub204\ub77d\ub418\uc5b4 \ud074\ub798\uc2a4\ub97c \ub85c\ub4dc\ud560 \uc218 \uc5c6\uc74c -> {2} -com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=[{0}:{1}] \ud074\ub798\uc2a4\uc5d0 no argument \uad6c\uc131\uc790\uac00 \ub4e4\uc5b4 \uc788\uc9c0\ub9cc \uacf5\uc6a9\uc774 \uc544\ub2d9\ub2c8\ub2e4. -com.sun.faces.verifier.NO_DEF_CTOR=[{0}:{1}] \ud074\ub798\uc2a4\uc5d0 \uacf5\uc6a9 no-argument \uad6c\uc131\uc790\uac00 \ub4e4\uc5b4 \uc788\uc2b5\ub2c8\ub2e4. -com.sun.faces.verifier.WRONG_TYPE=[{0}:{1}] \ud074\ub798\uc2a4\uac00 {2}\uc744(\ub97c) \uad6c\ud604\ud558\uac70\ub098 \ud655\uc7a5\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. +com.sun.faces.OBJECT_CREATION_ERROR=구성된 응용 프로그램 객체를 하나 이상 만들 수 없습니다. 자세한 내용은 웹 응용 프로그램 로그를 확인하십시오. +com.sun.faces.OPTION_NOT_SELECT_ITEM=인수 오류: 구성 요소 옵션 "{0}"은(는) jakarta.faces.model.SelectItem의 인스턴스가 아닙니다. 유형을 찾았습니다: ''{1}''. +com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=: 탐색 항목을 일치시킬 수 없어서 이 버튼이 비활성화되었습니다. +com.sun.faces.OUTCOME_TARGET_LINK_NO_MATCH=: 탐색 항목을 일치시킬 수 없어서 이 링크가 비활성화되었습니다. +com.sun.faces.PHASE_ID_OUT_OF_BOUNDS=PhaseId가 아이디에 대한 경계를 벗어납니다: ''{0}''. +com.sun.faces.RENDERER_NOT_FOUND=렌더러 유형에 대한 렌더러를 찾을 수 없습니다: ''{0}''. +com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=상태 오류: 이 요청에 대한 RequestView가 이미 설정되었습니다. +com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=자원 형식이 잘못되었습니다. 등록 정보 ''{0}''을(를) 구문 분석할 수 없습니다. +com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=자원 형식이 잘못되었습니다. 등록 정보 ''{0}''에 콜론(:)이 두 개 이상 있습니다. +com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=자원 형식이 잘못되었습니다. 자원 이름과 라이브러리 이름을 추출하기 위해 등록 정보 ''{0}''을(를) 구문 분석할 수 없습니다. +com.sun.faces.SAVING_STATE_ERROR=상태를 저장하는 중 오류가 발생했습니다. +com.sun.faces.SUPPORTS_COMPONENT_ERROR=인수 오류: ''{0}''은(는) 이 렌더러에 대해 지원되지 않습니다. +com.sun.faces.TYPECONVERSION_ERROR=''{1}''의 값 ''{0}''을(를) 설정하는 중 변환 오류가 발생했습니다. +com.sun.faces.VALIDATION_COMMAND_ERROR=검증 오류입니다. ''{0}''은(는) 값 또는 이미지 속성을 가져야 합니다. +com.sun.faces.VALIDATION_EL_ERROR=검증 오류입니다. 다음에 대한 표현식이 잘못되었습니다: ''{0}'' +com.sun.faces.VALIDATION_ID_ERROR=검증 오류입니다. 다음 Faces 태그에 아이디가 들어 있어야 합니다:''{0}'' +com.sun.faces.CANNOT_CONVERT=converterId "{0}" 또는 바인드 "{1}"을(를) 사용하여 변환기 인스턴스를 확인할 수 없습니다. +com.sun.faces.CANNOT_VALIDATE=validatorId "{0}" 또는 바인드 "{1}"을(를) 사용하여 검증자 인스턴스를 확인할 수 없습니다. +com.sun.faces.verifier.CLASS_NOT_FOUND=[{0}:{1}] 클래스가 없습니다. +com.sun.faces.verifier.CLASS_MISSING_DEP=[{0}:{1}] 종속성이 누락되어 클래스를 로드할 수 없음 -> {2} +com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=[{0}:{1}] 클래스에 no argument 구성자가 들어 있지만 공용이 아닙니다. +com.sun.faces.verifier.NO_DEF_CTOR=[{0}:{1}] 클래스에 공용 no-argument 구성자가 들어 있습니다. +com.sun.faces.verifier.WRONG_TYPE=[{0}:{1}] 클래스가 {2}을(를) 구현하거나 확장하지 않습니다. -com.sun.faces.CYCLIC_REFERENCE_ERROR=\uad00\ub9ac\ub418\ub294 Bean ''{0}''\uc5d0 \uc21c\ud658 \ucc38\uc870\uac00 \uc788\uc2b5\ub2c8\ub2e4. \ud3c9\uac00 \uacbd\ub85c: ''{1}''. -com.sun.faces.OBJECT_IS_READONLY={0} \uac1d\uccb4\uac00 \uc77d\uae30 \uc804\uc6a9\uc785\ub2c8\ub2e4. -com.sun.faces.INCORRECT_JSP_VERSION=\ucee8\ud14c\uc774\ub108\uc758 JSP \ubc84\uc804\uc774 2.1 \uc774\uc804\uc73c\ub85c \ub098\ud0c0\ub098\ubbc0\ub85c EL RI \ud45c\ud604\uc2dd \ud329\ud1a0\ub9ac, ''{0}''\uc744(\ub97c) \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. JSP \ub610\ub294 EL RI\ub97c \uc0ac\uc6a9\ud558\uc9c0 \uc54a\uc73c\uba74 \ucee8\ud14d\uc2a4\ud2b8 \ucd08\uae30\ud654 \ub9e4\uac1c \ubcc0\uc218, ''{1}''\uc774(\uac00) \uc801\uc808\ud558\uac8c \uc124\uc815\ub418\uc5c8\ub294\uc9c0 \ud655\uc778\ud558\uc2ed\uc2dc\uc624. +com.sun.faces.CYCLIC_REFERENCE_ERROR=관리되는 Bean ''{0}''에 순환 참조가 있습니다. 평가 경로: ''{1}''. +com.sun.faces.OBJECT_IS_READONLY={0} 객체가 읽기 전용입니다. +com.sun.faces.INCORRECT_JSP_VERSION=컨테이너의 JSP 버전이 2.1 이전으로 나타나므로 EL RI 표현식 팩토리, ''{0}''을(를) 찾을 수 없습니다. JSP 또는 EL RI를 사용하지 않으면 컨텍스트 초기화 매개 변수, ''{1}''이(가) 적절하게 설정되었는지 확인하십시오. #com.sun.faces.el.PropertyResolverImpl -com.sun.faces.OUT_OF_BOUNDS_ERROR=\uc0c9\uc778 {1}\uc774(\uac00) {0}\uc5d0 \ub300\ud55c \uacbd\uacc4\ub97c \ubc97\uc5b4\ub0a8 -com.sun.faces.PROPERTY_TYPE_ERROR={0}\uc774(\uac00) \ubc30\uc5f4 \ub610\ub294 \ubaa9\ub85d \uc720\ud615\uc774 \uc544\ub2d9\ub2c8\ub2e4. -com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=\uc0c9\uc778 {1}\uc774(\uac00) {2} \uae38\uc774\uc758 {0}\uc5d0 \ub300\ud55c \uacbd\uacc4\ub97c \ubc97\uc5b4\ub0a8 -com.sun.faces.RESTORE_VIEW_ERROR=\ubcf4\uae30 ''{0}''\uc744(\ub97c) \ubcf5\uc6d0\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. +com.sun.faces.OUT_OF_BOUNDS_ERROR=색인 {1}이(가) {0}에 대한 경계를 벗어남 +com.sun.faces.PROPERTY_TYPE_ERROR={0}이(가) 배열 또는 목록 유형이 아닙니다. +com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=색인 {1}이(가) {2} 길이의 {0}에 대한 경계를 벗어남 +com.sun.faces.RESTORE_VIEW_ERROR=보기 ''{0}''을(를) 복원할 수 없습니다. -com.sun.faces.CANT_WRITE_ID_ATTRIBUTE=\uc544\uc774\ub514 \uc18d\uc131\uc744 \uc4f8 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: ''{0}''. -com.sun.faces.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR=UIComponentTag\uc5d0 \uc911\ucca9\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4. -com.sun.faces.NO_COMPONENT_ASSOCIATED_WITH_UICOMPONENT_TAG=UIComponentTag\uc640 \uc5f0\uacb0\ub41c \uad6c\uc131 \uc694\uc18c\uac00 \uc5c6\uc2b5\ub2c8\ub2e4. +com.sun.faces.CANT_WRITE_ID_ATTRIBUTE=아이디 속성을 쓸 수 없습니다: ''{0}''. +com.sun.faces.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR=UIComponentTag에 중첩되지 않았습니다. +com.sun.faces.NO_COMPONENT_ASSOCIATED_WITH_UICOMPONENT_TAG=UIComponentTag와 연결된 구성 요소가 없습니다. -com.sun.faces.JS_RESOURCE_WRITING_ERROR=JavaScript \ud30c\uc77c\uc744 \ud074\ub77c\uc774\uc5b8\ud2b8\uc5d0 \uc4f8 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. +com.sun.faces.JS_RESOURCE_WRITING_ERROR=JavaScript 파일을 클라이언트에 쓸 수 없습니다. -com.sun.faces.RESOURCE_TARGET_NOT_AVAILABLE=\ud558\ub098 \uc774\uc0c1\uc758 \uc790\uc6d0\uc774 ''{0}'' \ub300\uc0c1\uc744 \uac00\uc9c0\uc9c0\ub9cc \ubcf4\uae30 \ub0b4 ''{0}'' \uad6c\uc131 \uc694\uc18c\uac00 \uc815\uc758\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4. +com.sun.faces.RESOURCE_TARGET_NOT_AVAILABLE=하나 이상의 자원이 ''{0}'' 대상을 가지지만 보기 내 ''{0}'' 구성 요소가 정의되지 않았습니다. com.sun.faces.ARGUMENTS_NOT_LEGAL_WITH_CC_ATTRS_EXPR=Illegal attempt to pass arguments to a composite component lookup expression (i.e. cc.attrs.[identifier]). com.sun.faces.partial.statesaving.ERROR_RESTORING_STATE_FOR_COMPONENT=Unexpected error restoring state for component with id ''{0}''. Cause: {1}. com.sun.faces.MISSING_COMPONENT_ATTRIBUTE_VALUE=The following attribute(s) are required, but no values have been supplied for them: ''{0}''. diff --git a/impl/src/main/resources/com/sun/faces/resources/Messages_pt_BR.properties b/impl/src/main/resources/com/sun/faces/resources/Messages_pt_BR.properties index 4934c405ee..ebf9e5f968 100644 --- a/impl/src/main/resources/com/sun/faces/resources/Messages_pt_BR.properties +++ b/impl/src/main/resources/com/sun/faces/resources/Messages_pt_BR.properties @@ -14,147 +14,147 @@ # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 # -com.sun.faces.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK=O ctor do ApplicationAssociate n\u00e3o foi chamado na mesma pilha de chamadas que ConfigureListener.contextInitialized(). -com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=J\u00e1 existe um ApplicationAssociate para este aplicativo Web. -com.sun.faces.ASSERTION_FAILED=Falha na afirma\u00e7\u00e3o -com.sun.faces.ATTRIBUTE_NOT_SUPORTED=O atributo ''{0}'' n\u00e3o tem suporte para o tipo de componente ''{1}''. -com.sun.faces.CANT_CONVERT_VALUE=N\u00e3o \u00e9 poss\u00edvel converter a propriedade: ''{0}'' para o tipo de valor: ''{1}''. -com.sun.faces.CANT_CLOSE_INPUT_STREAM=N\u00e3o foi poss\u00edvel fechar o fluxo de entrada. -com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=N\u00e3o \u00e9 poss\u00edvel criar o Ciclo de vida para a ID: ''{0}''. -com.sun.faces.CANT_INSTANTIATE_CLASS=N\u00e3o \u00e9 poss\u00edvel criar inst\u00e2ncia para\u00b7a classe: ''{0}''. -com.sun.faces.CANT_INTROSPECT_CLASS=N\u00e3o \u00e9 poss\u00edvel fazer a introspec\u00e7\u00e3o da classe: ''{0}'' -com.sun.faces.CANT_PARSE_FILE=N\u00e3o \u00e9 poss\u00edvel analisar o arquivo: ''{0}'': Erro na linha {1} coluna {2}: {3}. +com.sun.faces.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK=O ctor do ApplicationAssociate não foi chamado na mesma pilha de chamadas que ConfigureListener.contextInitialized(). +com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=Já existe um ApplicationAssociate para este aplicativo Web. +com.sun.faces.ASSERTION_FAILED=Falha na afirmação +com.sun.faces.ATTRIBUTE_NOT_SUPORTED=O atributo ''{0}'' não tem suporte para o tipo de componente ''{1}''. +com.sun.faces.CANT_CONVERT_VALUE=Não é possível converter a propriedade: ''{0}'' para o tipo de valor: ''{1}''. +com.sun.faces.CANT_CLOSE_INPUT_STREAM=Não foi possível fechar o fluxo de entrada. +com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=Não é possível criar o Ciclo de vida para a ID: ''{0}''. +com.sun.faces.CANT_INSTANTIATE_CLASS=Não é possível criar instância para·a classe: ''{0}''. +com.sun.faces.CANT_INTROSPECT_CLASS=Não é possível fazer a introspecção da classe: ''{0}'' +com.sun.faces.CANT_PARSE_FILE=Não é possível analisar o arquivo: ''{0}'': Erro na linha {1} coluna {2}: {3}. com.sun.faces.CHILD_NOT_OF_EXPECTED_TYPE=Esperado um tipo de componente filho de ''{0}'' para o tipo de componente ''{1}({2})''. Encontrado ''{3}''. -com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=: Este link est\u00e1 desativado, pois n\u00e3o est\u00e1 aninhado em um formul\u00e1rio Faces. -com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=Uma ou mais inst\u00e2ncias de UICommand encontradas na exibi\u00e7\u00e3o que n\u00e3o foram aninhadas em um UIForm. As a\u00e7\u00f5es associadas a esses comandos n\u00e3o ser\u00e3o invocadas. -com.sun.faces.COMPONENT_NOT_FOUND_ERROR=Componente n\u00e3o encontrado para o identificador: ''{0}''. -com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=N\u00e3o foi poss\u00edvel encontrar o componente com a ID ''{0}'' na exibi\u00e7\u00e3o. -com.sun.faces.CONTENT_TYPE_ERROR=Tipo de conte\u00fado n\u00e3o reconhecido. -com.sun.faces.CONFIG_RENDERER_REGISTRATION_MISSING_RENDERKIT=N\u00e3o foi poss\u00edvel registrar renderizadores com RenderKit usando a ID {0}. RenderKit n\u00e3o existe. -com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=A ID de componente ''{0}'' j\u00e1 foi encontrada na visualiza\u00e7\u00e3o. -com.sun.faces.EMPTY_PARAMETER=O par\u00e2metro est\u00e1 vazio -com.sun.faces.ENCODING_ERROR=Codifica\u00e7\u00e3o de caracteres n\u00e3o reconhecida. -com.sun.faces.ERROR_GETTING_VALUE_BINDING=N\u00e3o \u00e9 poss\u00edvel obter ValueBinding para o valor: ''{0}''. -com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=N\u00e3o \u00e9 poss\u00edvel obter o valor na express\u00e3o de liga\u00e7\u00e3o de valor: ''{0}''. -com.sun.faces.ERROR_OPENING_FILE=N\u00e3o \u00e9 poss\u00edvel abrir o arquivo de configura\u00e7\u00e3o: ''{0}''. -com.sun.faces.ERROR_PROCESSING_CONFIG=Um erro inesperado ocorreu durante o processamento da configura\u00e7\u00e3o. -com.sun.faces.ERROR_REGISTERING_DTD=N\u00e3o \u00e9 poss\u00edvel registrar o DTD: ''{0}''. -com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=N\u00e3o \u00e9 poss\u00edvel definir a propriedade do bean gerenciado: ''{0}''. -com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=A avalia\u00e7\u00e3o da express\u00e3o do atributo ''{0}'' resultou em um tipo inesperado. Esperado {1}, recebido {2}. -com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=Erro de constru\u00e7\u00e3o: Um ou mais par\u00e2metros de entrada podem ser nulos. -com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=N\u00e3o foi poss\u00edvel determinar o mapeamento do FaceServlet para o caminho "{0}" do servlet. -com.sun.faces.FACES_SERVLET_MAPPING_INCORRECT=O FacesServlet n\u00e3o pode ter um url-pattern de '/*'. Defina um url-pattern diferente -com.sun.faces.FACES_CONTEXT_NOT_FOUND=Nenhum FacesContext est\u00e1 dispon\u00edvel para processar esta solicita\u00e7\u00e3o. Isso provavelmente ocorreu devido ao envio da solicita\u00e7\u00e3o para o caminho errado. -com.sun.faces.FILE_NOT_FOUND=Arquivo n\u00e3o encontrado para o arquivo: ''{0}''. +com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=: Este link está desativado, pois não está aninhado em um formulário Faces. +com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=Uma ou mais instâncias de UICommand encontradas na exibição que não foram aninhadas em um UIForm. As ações associadas a esses comandos não serão invocadas. +com.sun.faces.COMPONENT_NOT_FOUND_ERROR=Componente não encontrado para o identificador: ''{0}''. +com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=Não foi possível encontrar o componente com a ID ''{0}'' na exibição. +com.sun.faces.CONTENT_TYPE_ERROR=Tipo de conteúdo não reconhecido. +com.sun.faces.CONFIG_RENDERER_REGISTRATION_MISSING_RENDERKIT=Não foi possível registrar renderizadores com RenderKit usando a ID {0}. RenderKit não existe. +com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=A ID de componente ''{0}'' já foi encontrada na visualização. +com.sun.faces.EMPTY_PARAMETER=O parâmetro está vazio +com.sun.faces.ENCODING_ERROR=Codificação de caracteres não reconhecida. +com.sun.faces.ERROR_GETTING_VALUE_BINDING=Não é possível obter ValueBinding para o valor: ''{0}''. +com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=Não é possível obter o valor na expressão de ligação de valor: ''{0}''. +com.sun.faces.ERROR_OPENING_FILE=Não é possível abrir o arquivo de configuração: ''{0}''. +com.sun.faces.ERROR_PROCESSING_CONFIG=Um erro inesperado ocorreu durante o processamento da configuração. +com.sun.faces.ERROR_REGISTERING_DTD=Não é possível registrar o DTD: ''{0}''. +com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=Não é possível definir a propriedade do bean gerenciado: ''{0}''. +com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=A avaliação da expressão do atributo ''{0}'' resultou em um tipo inesperado. Esperado {1}, recebido {2}. +com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=Erro de construção: Um ou mais parâmetros de entrada podem ser nulos. +com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=Não foi possível determinar o mapeamento do FaceServlet para o caminho "{0}" do servlet. +com.sun.faces.FACES_SERVLET_MAPPING_INCORRECT=O FacesServlet não pode ter um url-pattern de '/*'. Defina um url-pattern diferente +com.sun.faces.FACES_CONTEXT_NOT_FOUND=Nenhum FacesContext está disponível para processar esta solicitação. Isso provavelmente ocorreu devido ao envio da solicitação para o caminho errado. +com.sun.faces.FILE_NOT_FOUND=Arquivo não encontrado para o arquivo: ''{0}''. com.sun.faces.ILLEGAL_ATTEMPT_SETTING_APPLICATION_ARTIFACT=Tentativa ilegal de definir {0} depois de uma resposta ter sido renderizada. -com.sun.faces.ILLEGAL_CHARACTERS_ERROR=Caracteres n\u00e3o permitidos -com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=Uso ilegal de identificador de objeto impl\u00edcito no modo lValue: ''{0}'' -com.sun.faces.ILLEGAL_MODEL_REFERENCE=Refer\u00eancia de modelo ilegal neste contexto para a express\u00e3o ''{0}''. -com.sun.faces.ILLEGAL_VIEW_ID=ID de exibi\u00e7\u00e3o ilegal ''{0}''. A ID deve come\u00e7ar com ''/'' -com.sun.faces.INVALID_EXPRESSION=Express\u00e3o inv\u00e1lida: ''{0}''. -com.sun.faces.INVALID_INIT_PARAM=Valor inv\u00e1lido: ''{0}'', para o par\u00e2metro de inicializa\u00e7\u00e3o: ''{1}''. Os valores aceitos s\u00e3o 'verdadeiro' ou 'falso'. Definindo 'falso' como padr\u00e3o. -com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=Gravidade de mensagem inv\u00e1lida ''{0}'' definida na configura\u00e7\u00e3o. -com.sun.faces.INVALID_SCOPE_LIFESPAN=O escopo do objeto referido pela express\u00e3o ''{0}'', ''{1}'', \u00e9 menor do que o escopo do bean gerenciado referido (''{2}'') de ''{3}'' -com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=LifecycleId j\u00e1 adicionado para a ID: ''{0}''. -com.sun.faces.LIFECYCLE_ID_NOT_FOUND=LifecycleId n\u00e3o encontrada para a ID ''{0}''. -com.sun.faces.MAXIMUM_EVENTS_REACHED=N\u00famero m\u00e1ximo de eventos ''{0}'' atingido. -com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=N\u00e3o \u00e9 poss\u00edvel definir a propriedade de destino ''{0}'' no bean gerenciado ''{1}''. A propriedade deve aceitar as inst\u00e2ncias de Lista ou Matriz. -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=A propriedade ''{0}'' no bean gerenciado ''{1}'' est\u00e1 definida como uma propriedade de mapa, contudo, o setter na classe n\u00e3o aceita inst\u00e2ncias de Mapa. -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=A propriedade ''{0}'' no bean gerenciado ''{1}'' est\u00e1 definida como uma propriedade de mapa, contudo, o getter na classe n\u00e3o retorna inst\u00e2ncias de Mapa. -com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=A propriedade ''{0}'' no bean gerenciado ''{1}'' est\u00e1 definida como uma propriedade de mapa, contudo, o setter na classe n\u00e3o aceita inst\u00e2ncias de Lista ou Matriz. -com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=A propriedade ''{0}'' no bean gerenciado ''{1}'' est\u00e1 definida como uma propriedade de mapa, contudo, o getter na classe n\u00e3o retorna inst\u00e2ncias de Lista ou Matriz. -com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=A propriedade ''{0}'' no bean gerenciado ''{1}'' est\u00e1 definida como uma propriedade de lista. O getter retorna um tipo de matriz, mas n\u00e3o h\u00e1 um setter associado. -com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=N\u00e3o \u00e9 poss\u00edvel definir a propriedade de destino ''{0}'' no bean gerenciado ''{1}''. A propriedade de destino retornou um valor existente que n\u00e3o era uma inst\u00e2ncia de Lista. -com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=Configura\u00e7\u00e3o incorreta para o bean gerenciado ''{0}''. O bean gerenciado est\u00e1 configurado como uma Lista, mas tamb\u00e9m tenta definir entradas de mapa ou propriedades gerenciadas. -com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=Configura\u00e7\u00e3o incorreta para o bean gerenciado ''{0}''. O bean gerenciado est\u00e1 configurado como um Mapa, mas tamb\u00e9m tenta definir propriedades gerenciadas. -com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=Configura\u00e7\u00e3o incorreta para o bean gerenciado ''{0}''. O bean\u00b7gerenciado cont\u00e9m uma propriedade gerenciada denominada ''{1}'' com entradas de lista, mas definiu de forma ilegal entradas de valor e/ou mapa. -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=Configura\u00e7\u00e3o incorreta para o bean gerenciado ''{0}''. O bean gerenciado cont\u00e9m uma propriedade gerenciada denominada ''{1}'' com entradas de mapa, mas tamb\u00e9m definiu de forma ilegal um valor. -com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=Configura\u00e7\u00e3o incorreta para o bean gerenciado ''{0}''. O bean gerenciado cont\u00e9m uma propriedade gerenciada denominada ''{1}'', que n\u00e3o cont\u00e9m entradas de lista ou mapa, nem qualquer elemento de valor. -com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=Erro ao realizar convers\u00e3o do valor ''{0}'' do tipo ''{1}'' para o tipo ''{2}'' para o bean gerenciado ''{3}''. -com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=O bean ou a classe da propriedade ''{0}'' do bean gerenciado ''{1}'' n\u00e3o p\u00f4de ser encontrada. -com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=O bean ou a classe da propriedade ''{0}'' do bean gerenciado ''{1}'' n\u00e3o p\u00f4de ser carregada devido a uma depend\u00eancia ausente: {2}. -com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=A classe de bean gerenciado ''{0}'' para o bean gerenciado ''{1}'' n\u00e3o foi declarada p\u00fablica. +com.sun.faces.ILLEGAL_CHARACTERS_ERROR=Caracteres não permitidos +com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=Uso ilegal de identificador de objeto implícito no modo lValue: ''{0}'' +com.sun.faces.ILLEGAL_MODEL_REFERENCE=Referência de modelo ilegal neste contexto para a expressão ''{0}''. +com.sun.faces.ILLEGAL_VIEW_ID=ID de exibição ilegal ''{0}''. A ID deve começar com ''/'' +com.sun.faces.INVALID_EXPRESSION=Expressão inválida: ''{0}''. +com.sun.faces.INVALID_INIT_PARAM=Valor inválido: ''{0}'', para o parâmetro de inicialização: ''{1}''. Os valores aceitos são 'verdadeiro' ou 'falso'. Definindo 'falso' como padrão. +com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=Gravidade de mensagem inválida ''{0}'' definida na configuração. +com.sun.faces.INVALID_SCOPE_LIFESPAN=O escopo do objeto referido pela expressão ''{0}'', ''{1}'', é menor do que o escopo do bean gerenciado referido (''{2}'') de ''{3}'' +com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=LifecycleId já adicionado para a ID: ''{0}''. +com.sun.faces.LIFECYCLE_ID_NOT_FOUND=LifecycleId não encontrada para a ID ''{0}''. +com.sun.faces.MAXIMUM_EVENTS_REACHED=Número máximo de eventos ''{0}'' atingido. +com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=Não é possível definir a propriedade de destino ''{0}'' no bean gerenciado ''{1}''. A propriedade deve aceitar as instâncias de Lista ou Matriz. +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=A propriedade ''{0}'' no bean gerenciado ''{1}'' está definida como uma propriedade de mapa, contudo, o setter na classe não aceita instâncias de Mapa. +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=A propriedade ''{0}'' no bean gerenciado ''{1}'' está definida como uma propriedade de mapa, contudo, o getter na classe não retorna instâncias de Mapa. +com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=A propriedade ''{0}'' no bean gerenciado ''{1}'' está definida como uma propriedade de mapa, contudo, o setter na classe não aceita instâncias de Lista ou Matriz. +com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=A propriedade ''{0}'' no bean gerenciado ''{1}'' está definida como uma propriedade de mapa, contudo, o getter na classe não retorna instâncias de Lista ou Matriz. +com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=A propriedade ''{0}'' no bean gerenciado ''{1}'' está definida como uma propriedade de lista. O getter retorna um tipo de matriz, mas não há um setter associado. +com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=Não é possível definir a propriedade de destino ''{0}'' no bean gerenciado ''{1}''. A propriedade de destino retornou um valor existente que não era uma instância de Lista. +com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=Configuração incorreta para o bean gerenciado ''{0}''. O bean gerenciado está configurado como uma Lista, mas também tenta definir entradas de mapa ou propriedades gerenciadas. +com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=Configuração incorreta para o bean gerenciado ''{0}''. O bean gerenciado está configurado como um Mapa, mas também tenta definir propriedades gerenciadas. +com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=Configuração incorreta para o bean gerenciado ''{0}''. O bean·gerenciado contém uma propriedade gerenciada denominada ''{1}'' com entradas de lista, mas definiu de forma ilegal entradas de valor e/ou mapa. +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=Configuração incorreta para o bean gerenciado ''{0}''. O bean gerenciado contém uma propriedade gerenciada denominada ''{1}'' com entradas de mapa, mas também definiu de forma ilegal um valor. +com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=Configuração incorreta para o bean gerenciado ''{0}''. O bean gerenciado contém uma propriedade gerenciada denominada ''{1}'', que não contém entradas de lista ou mapa, nem qualquer elemento de valor. +com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=Erro ao realizar conversão do valor ''{0}'' do tipo ''{1}'' para o tipo ''{2}'' para o bean gerenciado ''{3}''. +com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=O bean ou a classe da propriedade ''{0}'' do bean gerenciado ''{1}'' não pôde ser encontrada. +com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=O bean ou a classe da propriedade ''{0}'' do bean gerenciado ''{1}'' não pôde ser carregada devido a uma dependência ausente: {2}. +com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=A classe de bean gerenciado ''{0}'' para o bean gerenciado ''{1}'' não foi declarada pública. com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=A classe de bean gerenciado ''{0}'' para o bean gerenciado ''{1}'' foi declarada abstrata ou como uma interface. -com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=A classe de bean gerenciado ''{0}'' para o bean gerenciado ''{1}'' n\u00e3o declara um construtor no-argument p\u00fablico. -com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=Um erro ocorreu ao realizar a inje\u00e7\u00e3o de recurso no bean gerenciado ''{0}'' -com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=A propriedade ''{0}'' para o bean gerenciado ''{1}'' est\u00e1 definida com uma classe de propriedade de ''{2}''. Contudo, essa classe n\u00e3o pode ser atribu\u00edda \u00e0 propriedade. -com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=N\u00e3o foi poss\u00edvel fazer a introspec\u00e7\u00e3o do bean gerenciado ''{0}'' -com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=A propriedade ''{0}'' para o bean gerenciado ''{1}'' n\u00e3o existe. -com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=A propriedade ''{0}'' para o bean gerenciado ''{1}'' n\u00e3o possui um setter. +com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=A classe de bean gerenciado ''{0}'' para o bean gerenciado ''{1}'' não declara um construtor no-argument público. +com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=Um erro ocorreu ao realizar a injeção de recurso no bean gerenciado ''{0}'' +com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=A propriedade ''{0}'' para o bean gerenciado ''{1}'' está definida com uma classe de propriedade de ''{2}''. Contudo, essa classe não pode ser atribuída à propriedade. +com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=Não foi possível fazer a introspecção do bean gerenciado ''{0}'' +com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=A propriedade ''{0}'' para o bean gerenciado ''{1}'' não existe. +com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=A propriedade ''{0}'' para o bean gerenciado ''{1}'' não possui um setter. com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=A propriedade ''{0}'' para o bean gerenciado ''{1}'' aceita mais de um argumento. -com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=N\u00e3o \u00e9 poss\u00edvel definir a propriedade ''{0}'' para o bean gerenciado ''{1}''. -com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=N\u00e3o foi poss\u00edvel criar o bean gerenciado ''{0}''. Os seguintes problemas foram encontrados: -com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=O Faces estar\u00e1 indispon\u00edvel para criar o bean gerenciado ''{0}'' quando ele for solicitado. Os seguintes problemas foram encontrados: +com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=Não é possível definir a propriedade ''{0}'' para o bean gerenciado ''{1}''. +com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=Não foi possível criar o bean gerenciado ''{0}''. Os seguintes problemas foram encontrados: +com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=O Faces estará indisponível para criar o bean gerenciado ''{0}'' quando ele for solicitado. Os seguintes problemas foram encontrados: com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=Erro inesperado ao processar o bean gerenciado ''{0}'' com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=Erro inesperado ao processar a propriedade gerenciada ''{0}'' -com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=O escopo ''{0}'' n\u00e3o \u00e9 ''exibi\u00e7\u00e3o'', ''solicita\u00e7\u00e3o'', ''sess\u00e3o'', ''aplicativo'', nem representa um ValueExpression (#{...}) -com.sun.faces.MISSING_CLASS_ERROR=Classe ausente: N\u00e3o \u00e9 poss\u00edvel carregar a classe ''{0}''. -com.sun.faces.MISSING_RESOURCE_ERROR=Recurso ausente: N\u00e3o \u00e9 poss\u00edvel obter ResourceBundle. -com.sun.faces.MODELUPDATE_ERROR=Falha na atualiza\u00e7\u00e3o de modelo para o valor ''{0}'' no modelo ''{1}''. -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=N\u00e3o foi poss\u00edvel encontrar um caso de navega\u00e7\u00e3o correspondente na ID de exibi\u00e7\u00e3o ''{0}'' com o resultado ''{1}'' -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=N\u00e3o foi poss\u00edvel encontrar um caso de navega\u00e7\u00e3o correspondente na ID de exibi\u00e7\u00e3o ''{0}'' para a a\u00e7\u00e3o ''{1}'' com o resultado ''{2}'' -com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=Seq\u00fc\u00eancia de consulta inv\u00e1lida no resultado ''{0}'' -com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=Erro de express\u00e3o: Objeto denominado: ''{0}'' n\u00e3o encontrado. -com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=N\u00e3o est\u00e1 aninhado em um erro de UIComponentTag para marca\u00e7\u00e3o com a classe de manipulador: ''{0}''. +com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=O escopo ''{0}'' não é ''exibição'', ''solicitação'', ''sessão'', ''aplicativo'', nem representa um ValueExpression (#{...}) +com.sun.faces.MISSING_CLASS_ERROR=Classe ausente: Não é possível carregar a classe ''{0}''. +com.sun.faces.MISSING_RESOURCE_ERROR=Recurso ausente: Não é possível obter ResourceBundle. +com.sun.faces.MODELUPDATE_ERROR=Falha na atualização de modelo para o valor ''{0}'' no modelo ''{1}''. +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=Não foi possível encontrar um caso de navegação correspondente na ID de exibição ''{0}'' com o resultado ''{1}'' +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=Não foi possível encontrar um caso de navegação correspondente na ID de exibição ''{0}'' para a ação ''{1}'' com o resultado ''{2}'' +com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=Seqüência de consulta inválida no resultado ''{0}'' +com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=Erro de expressão: Objeto denominado: ''{0}'' não encontrado. +com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=Não está aninhado em um erro de UIComponentTag para marcação com a classe de manipulador: ''{0}''. com.sun.faces.NOT_NESTED_IN_TYPE_TAG_ERROR=A marca {0} deveria estar aninhada em uma marca associada a um componente do tipo {1}. -com.sun.faces.NO_DTD_FOUND_ERROR=N\u00e3o foi poss\u00edvel localizar o DTD com ID P\u00daBLICA ''{0}'' no caminho ''{1}''. -com.sun.faces.NULL_BODY_CONTENT_ERROR=BodyContent \u00e9 nulo para a marca com a classe de manipulador: ''{0}''. -com.sun.faces.NULL_COMPONENT_ERROR=Erro de constru\u00e7\u00e3o: O argumento do componente \u00e9 nulo. -com.sun.faces.NULL_CONFIGURATION=Nenhuma configura\u00e7\u00e3o carregada para o aplicativo. -com.sun.faces.NULL_CONTEXT_ERROR=Erro de argumento: O argumento Contexto \u00e9 nulo. -com.sun.faces.NULL_EVENT_ERROR=Erro de argumento: O argumento Evento \u00e9 nulo. -com.sun.faces.NULL_FORVALUE=Componente "{0}" n\u00e3o encontrado -com.sun.faces.NULL_HANDLER_ERROR=Erro de argumento: O argumento Manipulador \u00e9 nulo. -com.sun.faces.NULL_LOCALE_ERROR=Erro de argumento: O argumento Local \u00e9 nulo. -com.sun.faces.NULL_MESSAGE_ERROR=Erro de argumento: O par\u00e2metro Message n\u00e3o pode ser nulo -com.sun.faces.NULL_PARAMETERS_ERROR=Erro de argumento: O par\u00e2metro ''{0}'' \u00e9 nulo -com.sun.faces.NULL_REQUEST_VIEW_ERROR=Erro de argumento: O argumento RequestView \u00e9 nulo. -com.sun.faces.NULL_RESPONSE_STREAM_ERROR=Erro de argumento: O argumento ResponseStream \u00e9 nulo. -com.sun.faces.NULL_RESPONSE_VIEW_ERROR=Erro de argumento: O argumento ResponseView \u00e9 nulo. -com.sun.faces.NULL_RESPONSE_WRITER_ERROR=Erro de argumento: O argumento ResponseWriter \u00e9 nulo. +com.sun.faces.NO_DTD_FOUND_ERROR=Não foi possível localizar o DTD com ID PÚBLICA ''{0}'' no caminho ''{1}''. +com.sun.faces.NULL_BODY_CONTENT_ERROR=BodyContent é nulo para a marca com a classe de manipulador: ''{0}''. +com.sun.faces.NULL_COMPONENT_ERROR=Erro de construção: O argumento do componente é nulo. +com.sun.faces.NULL_CONFIGURATION=Nenhuma configuração carregada para o aplicativo. +com.sun.faces.NULL_CONTEXT_ERROR=Erro de argumento: O argumento Contexto é nulo. +com.sun.faces.NULL_EVENT_ERROR=Erro de argumento: O argumento Evento é nulo. +com.sun.faces.NULL_FORVALUE=Componente "{0}" não encontrado +com.sun.faces.NULL_HANDLER_ERROR=Erro de argumento: O argumento Manipulador é nulo. +com.sun.faces.NULL_LOCALE_ERROR=Erro de argumento: O argumento Local é nulo. +com.sun.faces.NULL_MESSAGE_ERROR=Erro de argumento: O parâmetro Message não pode ser nulo +com.sun.faces.NULL_PARAMETERS_ERROR=Erro de argumento: O parâmetro ''{0}'' é nulo +com.sun.faces.NULL_REQUEST_VIEW_ERROR=Erro de argumento: O argumento RequestView é nulo. +com.sun.faces.NULL_RESPONSE_STREAM_ERROR=Erro de argumento: O argumento ResponseStream é nulo. +com.sun.faces.NULL_RESPONSE_VIEW_ERROR=Erro de argumento: O argumento ResponseView é nulo. +com.sun.faces.NULL_RESPONSE_WRITER_ERROR=Erro de argumento: O argumento ResponseWriter é nulo. com.sun.faces.NULL_VIEW_ID=Argument Error: view id argument is null. -com.sun.faces.OBJECT_CREATION_ERROR=Um ou mais objetos de aplicativo configurados n\u00e3o puderam ser criados. Verifique os logs de aplicativo Web para obter detalhes. -com.sun.faces.OPTION_NOT_SELECT_ITEM=Erro de argumento: Uma op\u00e7\u00e3o para o componente ''{0}'' n\u00e3o era uma inst\u00e2ncia de jakarta.faces.model.SelectItem. Tipo encontrado: ''{1}''. -com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=: Este bot\u00e3o est\u00e1 desativado porque um caso de navega\u00e7\u00e3o n\u00e3o p\u00f4de ser correspondido. -com.sun.faces.OUTCOME_TARGET_LINK_NO_MATCH=: Este link est\u00e1 desativado porque um caso de navega\u00e7\u00e3o n\u00e3o p\u00f4de ser correspondido. +com.sun.faces.OBJECT_CREATION_ERROR=Um ou mais objetos de aplicativo configurados não puderam ser criados. Verifique os logs de aplicativo Web para obter detalhes. +com.sun.faces.OPTION_NOT_SELECT_ITEM=Erro de argumento: Uma opção para o componente ''{0}'' não era uma instância de jakarta.faces.model.SelectItem. Tipo encontrado: ''{1}''. +com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=: Este botão está desativado porque um caso de navegação não pôde ser correspondido. +com.sun.faces.OUTCOME_TARGET_LINK_NO_MATCH=: Este link está desativado porque um caso de navegação não pôde ser correspondido. com.sun.faces.PHASE_ID_OUT_OF_BOUNDS=PhaseId fora dos limites da ID: ''{0}''. -com.sun.faces.RENDERER_NOT_FOUND=O renderizador n\u00e3o foi encontrado para o tipo de renderizador: ''{0}''. -com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=Erro de estado: RequestView j\u00e1 definido para esta solicita\u00e7\u00e3o. -com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=""Formato de recurso inv\u00e1lido. A propriedade ''{0}'' n\u00e3o pode ser analisada." -com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=Formato de recurso inv\u00e1lido. A propriedade ''{0}'' cont\u00e9m mais de um sinal de dois-pontos (:). -com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=Formato de recurso inv\u00e1lido. A propriedade ''{0}'' n\u00e3o pode ser analisada para extrair o nome do recurso e da biblioteca." +com.sun.faces.RENDERER_NOT_FOUND=O renderizador não foi encontrado para o tipo de renderizador: ''{0}''. +com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=Erro de estado: RequestView já definido para esta solicitação. +com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=""Formato de recurso inválido. A propriedade ''{0}'' não pode ser analisada." +com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=Formato de recurso inválido. A propriedade ''{0}'' contém mais de um sinal de dois-pontos (:). +com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=Formato de recurso inválido. A propriedade ''{0}'' não pode ser analisada para extrair o nome do recurso e da biblioteca." com.sun.faces.SAVING_STATE_ERROR=Erro ao salvar estado. com.sun.faces.SUPPORTS_COMPONENT_ERROR=Erro de argumento: ''{0}'' sem suporte para este renderizador. -com.sun.faces.TYPECONVERSION_ERROR=Erro de convers\u00e3o ao definir o valor ''{0}'' para ''{1}''. -com.sun.faces.VALIDATION_COMMAND_ERROR=Erro de valida\u00e7\u00e3o. ''{0}'' deve ter um atributo de valor ou imagem. -com.sun.faces.VALIDATION_EL_ERROR=Erro de valida\u00e7\u00e3o. Express\u00e3o inv\u00e1lida para:''{0}'' -com.sun.faces.VALIDATION_ID_ERROR=Erro de valida\u00e7\u00e3o. As seguintes marcas Faces s\u00e3o necess\u00e1rias para conter IDs:''{0}'' -com.sun.faces.CANNOT_CONVERT=N\u00e3o foi poss\u00edvel resolver uma inst\u00e2ncia do Conversor usando converterId ''{0}'' ou a liga\u00e7\u00e3o ''{1}''. -com.sun.faces.CANNOT_VALIDATE=N\u00e3o foi poss\u00edvel resolver uma inst\u00e2ncia do Validador usando validatorId ''{0}'' ou a liga\u00e7\u00e3o ''{1}''. -com.sun.faces.verifier.CLASS_NOT_FOUND=[{0}:{1}] A classe n\u00e3o existe -com.sun.faces.verifier.CLASS_MISSING_DEP=[{0}:{1}] A classe n\u00e3o pode ser carregada devido a uma depend\u00eancia ausente -> {2} -com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=[{0}:{1}] A classe cont\u00e9m um argumento sem construtor, mas n\u00e3o \u00e9 p\u00fablica -com.sun.faces.verifier.NO_DEF_CTOR=[{0}:{1}] A classe cont\u00e9m um construtor no-argument n\u00e3o p\u00fablico -com.sun.faces.verifier.WRONG_TYPE=[{0}:{1}] A classe n\u00e3o implementa ou estende {2} +com.sun.faces.TYPECONVERSION_ERROR=Erro de conversão ao definir o valor ''{0}'' para ''{1}''. +com.sun.faces.VALIDATION_COMMAND_ERROR=Erro de validação. ''{0}'' deve ter um atributo de valor ou imagem. +com.sun.faces.VALIDATION_EL_ERROR=Erro de validação. Expressão inválida para:''{0}'' +com.sun.faces.VALIDATION_ID_ERROR=Erro de validação. As seguintes marcas Faces são necessárias para conter IDs:''{0}'' +com.sun.faces.CANNOT_CONVERT=Não foi possível resolver uma instância do Conversor usando converterId ''{0}'' ou a ligação ''{1}''. +com.sun.faces.CANNOT_VALIDATE=Não foi possível resolver uma instância do Validador usando validatorId ''{0}'' ou a ligação ''{1}''. +com.sun.faces.verifier.CLASS_NOT_FOUND=[{0}:{1}] A classe não existe +com.sun.faces.verifier.CLASS_MISSING_DEP=[{0}:{1}] A classe não pode ser carregada devido a uma dependência ausente -> {2} +com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=[{0}:{1}] A classe contém um argumento sem construtor, mas não é pública +com.sun.faces.verifier.NO_DEF_CTOR=[{0}:{1}] A classe contém um construtor no-argument não público +com.sun.faces.verifier.WRONG_TYPE=[{0}:{1}] A classe não implementa ou estende {2} -com.sun.faces.CYCLIC_REFERENCE_ERROR=O bean gerenciado ''{0}'' cont\u00e9m refer\u00eancias c\u00edclicas. Caminho da avalia\u00e7\u00e3o: ''{1}''. -com.sun.faces.OBJECT_IS_READONLY=O objeto {0} \u00e9 somente leitura -com.sun.faces.INCORRECT_JSP_VERSION=Parece que a vers\u00e3o do JSP do cont\u00eainer \u00e9 mais antiga que a 2.1 e n\u00e3o pode localizar o gerador de express\u00f5es EL RI, ''{0}''. Se n\u00e3o estiver usando o JSP ou o EL RI, verifique se o par\u00e2metro de inicializa\u00e7\u00e3o de contexto, ''{1}'', est\u00e1 definido corretamente. +com.sun.faces.CYCLIC_REFERENCE_ERROR=O bean gerenciado ''{0}'' contém referências cíclicas. Caminho da avaliação: ''{1}''. +com.sun.faces.OBJECT_IS_READONLY=O objeto {0} é somente leitura +com.sun.faces.INCORRECT_JSP_VERSION=Parece que a versão do JSP do contêiner é mais antiga que a 2.1 e não pode localizar o gerador de expressões EL RI, ''{0}''. Se não estiver usando o JSP ou o EL RI, verifique se o parâmetro de inicialização de contexto, ''{1}'', está definido corretamente. #com.sun.faces.el.PropertyResolverImpl -com.sun.faces.OUT_OF_BOUNDS_ERROR=\u00cdndice {1} fora dos limites para {0} -com.sun.faces.PROPERTY_TYPE_ERROR={0} n\u00e3o \u00e9 do tipo Matriz ou Lista. -com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=\u00cdndice {1} fora dos limites para {0} com um comprimento de {2} -com.sun.faces.RESTORE_VIEW_ERROR=A exibi\u00e7\u00e3o de ''{0}'' n\u00e3o p\u00f4de ser restaurada. +com.sun.faces.OUT_OF_BOUNDS_ERROR=Índice {1} fora dos limites para {0} +com.sun.faces.PROPERTY_TYPE_ERROR={0} não é do tipo Matriz ou Lista. +com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=Índice {1} fora dos limites para {0} com um comprimento de {2} +com.sun.faces.RESTORE_VIEW_ERROR=A exibição de ''{0}'' não pôde ser restaurada. -com.sun.faces.CANT_WRITE_ID_ATTRIBUTE=N\u00e3o \u00e9 poss\u00edvel gravar o atributo da ID: ''{0}''. -com.sun.faces.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR=N\u00e3o est\u00e1 aninhado em um UIComponentTag. +com.sun.faces.CANT_WRITE_ID_ATTRIBUTE=Não é possível gravar o atributo da ID: ''{0}''. +com.sun.faces.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR=Não está aninhado em um UIComponentTag. com.sun.faces.NO_COMPONENT_ASSOCIATED_WITH_UICOMPONENT_TAG=Nenhum componente associado a UIComponentTag. -com.sun.faces.JS_RESOURCE_WRITING_ERROR=N\u00e3o \u00e9 poss\u00edvel gravar o arquivo JavaScript no cliente. +com.sun.faces.JS_RESOURCE_WRITING_ERROR=Não é possível gravar o arquivo JavaScript no cliente. -com.sun.faces.RESOURCE_TARGET_NOT_AVAILABLE=Um ou mais recursos possuem o destino de ''{0}'', mas nenhum componente de ''{0}'' foi definido na exibi\u00e7\u00e3o. +com.sun.faces.RESOURCE_TARGET_NOT_AVAILABLE=Um ou mais recursos possuem o destino de ''{0}'', mas nenhum componente de ''{0}'' foi definido na exibição. com.sun.faces.ARGUMENTS_NOT_LEGAL_WITH_CC_ATTRS_EXPR=Illegal attempt to pass arguments to a composite component lookup expression (i.e. cc.attrs.[identifier]). com.sun.faces.partial.statesaving.ERROR_RESTORING_STATE_FOR_COMPONENT=Unexpected error restoring state for component with id ''{0}''. Cause: {1}. com.sun.faces.MISSING_COMPONENT_ATTRIBUTE_VALUE=The following attribute(s) are required, but no values have been supplied for them: ''{0}''. diff --git a/impl/src/main/resources/com/sun/faces/resources/Messages_zh_CN.properties b/impl/src/main/resources/com/sun/faces/resources/Messages_zh_CN.properties index a135f0d568..f372d7cd20 100644 --- a/impl/src/main/resources/com/sun/faces/resources/Messages_zh_CN.properties +++ b/impl/src/main/resources/com/sun/faces/resources/Messages_zh_CN.properties @@ -14,147 +14,147 @@ # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 # -com.sun.faces.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK=\u672a\u5728\u8c03\u7528 ConfigureListener.contextInitialized() \u7684\u540c\u4e00\u8c03\u7528\u6808\u4e2d\u8c03\u7528 ApplicationAssociate ctor\u3002 -com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=\u6b64 Web \u5e94\u7528\u7a0b\u5e8f\u7684 ApplicationAssociate \u5df2\u5b58\u5728\u3002 -com.sun.faces.ASSERTION_FAILED=\u65ad\u8a00\u5931\u8d25 -com.sun.faces.ATTRIBUTE_NOT_SUPORTED=\u7ec4\u4ef6\u7c7b\u578b ''{1}'' \u4e0d\u652f\u6301\u5c5e\u6027 ''{0}''\u3002 -com.sun.faces.CANT_CONVERT_VALUE=\u65e0\u6cd5\u5c06\u5c5e\u6027 ''{0}'' \u8f6c\u6362\u4e3a\u503c\u7c7b\u578b ''{1}''\u3002 -com.sun.faces.CANT_CLOSE_INPUT_STREAM=\u65e0\u6cd5\u5173\u95ed\u8f93\u5165\u6d41\u3002 -com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=\u65e0\u6cd5\u4e3a ID ''{0}'' \u521b\u5efa\u751f\u547d\u5468\u671f\u3002 -com.sun.faces.CANT_INSTANTIATE_CLASS=\u65e0\u6cd5\u5b9e\u4f8b\u5316\u7c7b\uff1a''{0}''\u3002 -com.sun.faces.CANT_INTROSPECT_CLASS=\u65e0\u6cd5\u5185\u7701\u7c7b\uff1a''{0}'' -com.sun.faces.CANT_PARSE_FILE=\u65e0\u6cd5\u89e3\u6790\u6587\u4ef6 ''{0}''\uff1a\u884c {1} \u5217 {2} \u5904\u51fa\u9519\uff1a{3}\u3002 -com.sun.faces.CHILD_NOT_OF_EXPECTED_TYPE=\u5bf9\u4e8e\u7ec4\u4ef6\u7c7b\u578b ''{1}({2})''\uff0c\u671f\u671b\u7684\u5b50\u7ec4\u4ef6\u7c7b\u578b\u4e3a ''{0}''\u3002\u627e\u5230 ''{3}''\u3002 -com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=: \u6b64\u94fe\u63a5\u5df2\u7981\u7528\uff0c\u56e0\u4e3a\u5b83\u672a\u5d4c\u5957\u5728 Faces \u8868\u5355\u5185\u3002 -com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=\u5728\u672a\u5d4c\u5957\u5728 UIForm \u5185\u7684\u89c6\u56fe\u4e2d\uff0c\u627e\u5230\u4e00\u4e2a\u6216\u591a\u4e2a UICommand \u5b9e\u4f8b\u3002\u4e0e\u8fd9\u4e9b\u547d\u4ee4\u5173\u8054\u7684\u64cd\u4f5c\u5c06\u4e0d\u4f1a\u88ab\u8c03\u7528\u3002 -com.sun.faces.COMPONENT_NOT_FOUND_ERROR=\u672a\u627e\u5230\u6807\u8bc6\u7b26 ''{0}'' \u7684\u7ec4\u4ef6\u3002 -com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=\u65e0\u6cd5\u5728\u89c6\u56fe\u4e2d\u627e\u5230 ID \u4e3a ''{0}'' \u7684\u7ec4\u4ef6\u3002 -com.sun.faces.CONTENT_TYPE_ERROR=\u65e0\u6cd5\u8bc6\u522b\u5185\u5bb9\u7c7b\u578b\u3002 -com.sun.faces.CONFIG_RENDERER_REGISTRATION_MISSING_RENDERKIT=\u65e0\u6cd5\u4f7f\u7528 ID {0} \u5728 RenderKit \u4e2d\u6ce8\u518c renderer\u3002RenderKit \u4e0d\u5b58\u5728\u3002 -com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=\u5df2\u5728\u89c6\u56fe\u4e2d\u627e\u5230\u7ec4\u4ef6 ID ''{0}''\u3002 -com.sun.faces.EMPTY_PARAMETER=\u53c2\u6570\u662f\u7a7a\u7684 -com.sun.faces.ENCODING_ERROR=\u65e0\u6cd5\u8bc6\u522b\u5b57\u7b26\u7f16\u7801\u3002 -com.sun.faces.ERROR_GETTING_VALUE_BINDING=\u65e0\u6cd5\u83b7\u53d6\u503c ''{0}'' \u7684 ValueBinding\u3002 -com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=\u65e0\u6cd5\u4ece\u503c\u7ed1\u5b9a\u8868\u8fbe\u5f0f ''{0}'' \u83b7\u53d6\u503c\u3002 -com.sun.faces.ERROR_OPENING_FILE=\u65e0\u6cd5\u6253\u5f00\u914d\u7f6e\u6587\u4ef6\uff1a''{0}''\u3002 -com.sun.faces.ERROR_PROCESSING_CONFIG=\u5728\u914d\u7f6e\u5904\u7406\u8fc7\u7a0b\u4e2d\uff0c\u53d1\u751f\u610f\u5916\u9519\u8bef\u3002 -com.sun.faces.ERROR_REGISTERING_DTD=\u65e0\u6cd5\u6ce8\u518c DTD\uff1a''{0}''\u3002 -com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=\u65e0\u6cd5\u8bbe\u7f6e\u53d7\u7ba1 bean \u5c5e\u6027\uff1a''{0}''\u3002 -com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=\u5c5e\u6027 ''{0}'' \u7684\u8868\u8fbe\u5f0f\u7684\u8ba1\u7b97\u7ed3\u679c\u662f\u610f\u5916\u7c7b\u578b\u3002\u5e94\u4e3a {1}\uff0c\u4f46\u6536\u5230\u7684\u5374\u662f {2}\u3002 -com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=\u6784\u9020\u9519\u8bef\uff1a\u4e00\u4e2a\u6216\u591a\u4e2a\u8f93\u5165\u53c2\u6570\u53ef\u80fd\u4e3a null\u3002 -com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=\u65e0\u6cd5\u786e\u5b9a Servlet \u8def\u5f84 ''{0}'' \u7684 FaceServlet \u6620\u5c04\u3002 -com.sun.faces.FACES_SERVLET_MAPPING_INCORRECT=FacesServlet \u7684 url-pattern \u4e0d\u80fd\u4e3a '/*'\u3002\u8bf7\u5b9a\u4e49\u5176\u4ed6 url-pattern\u3002 -com.sun.faces.FACES_CONTEXT_NOT_FOUND=\u6ca1\u6709\u53ef\u7528\u4e8e\u5904\u7406\u6b64\u8bf7\u6c42\u7684 FacesContext\u3002\u5f88\u53ef\u80fd\u662f\u56e0\u4e3a\u5c06\u8bf7\u6c42\u53d1\u9001\u5230\u4e86\u9519\u8bef\u7684\u8def\u5f84\u3002 -com.sun.faces.FILE_NOT_FOUND=\u672a\u627e\u5230\u6587\u4ef6\uff1a''{0}''\u3002 -com.sun.faces.ILLEGAL_ATTEMPT_SETTING_APPLICATION_ARTIFACT=\u5448\u73b0\u54cd\u5e94\u540e\u8bbe\u7f6e {0} \u7684\u5c1d\u8bd5\u975e\u6cd5\u3002 -com.sun.faces.ILLEGAL_CHARACTERS_ERROR=\u4e0d\u5141\u8bb8\u5b57\u7b26\u3002 -com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=\u5728 lValue \u6a21\u5f0f ''{0}'' \u4e2d\u4f7f\u7528\u9690\u542b\u5bf9\u8c61\u6807\u8bc6\u7b26\u975e\u6cd5 -com.sun.faces.ILLEGAL_MODEL_REFERENCE=\u8868\u8fbe\u5f0f ''{0}'' \u7684\u6b64\u4e0a\u4e0b\u6587\u4e2d\u7684\u6a21\u578b\u5f15\u7528\u975e\u6cd5\u3002 -com.sun.faces.ILLEGAL_VIEW_ID=\u89c6\u56fe ID ''{0}'' \u975e\u6cd5\u3002\u8be5 ID \u5fc5\u987b\u4ee5 ''/'' \u5f00\u5934 -com.sun.faces.INVALID_EXPRESSION=\u8868\u8fbe\u5f0f ''{0}'' \u65e0\u6548\u3002 -com.sun.faces.INVALID_INIT_PARAM=\u521d\u59cb\u5316\u53c2\u6570 ''{1}'' \u7684\u503c ''{0}'' \u65e0\u6548\u3002\u53ef\u63a5\u53d7\u7684\u503c\u4e3a 'true' \u6216 'false'\u3002\u9ed8\u8ba4\u503c\u4e3a 'false'\u3002 -com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=\u914d\u7f6e\u4e2d\u5b9a\u4e49\u7684\u6d88\u606f\u4e25\u91cd\u6027 ''{0}'' \u65e0\u6548\u3002 -com.sun.faces.INVALID_SCOPE_LIFESPAN=\u8868\u8fbe\u5f0f ''{0}'' \u5f15\u7528\u7684\u5bf9\u8c61\u8303\u56f4 ''{1}'' \u6bd4\u5f15\u7528\u53d7\u7ba1 bean \u7684 ''{3}'' \u7684 (''{2}'') \u8303\u56f4\u77ed -com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=\u5df2\u4e3a ID ''{0}'' \u6dfb\u52a0\u751f\u547d\u5468\u671f ID\u3002 -com.sun.faces.LIFECYCLE_ID_NOT_FOUND=\u672a\u627e\u5230 ID ''{0}'' \u7684\u751f\u547d\u5468\u671f ID\u3002 -com.sun.faces.MAXIMUM_EVENTS_REACHED=\u5df2\u8fbe\u5230\u4e8b\u4ef6 ''{0}'' \u7684\u6700\u5927\u6570\u76ee\u3002 -com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=\u65e0\u6cd5\u8bbe\u7f6e\u53d7\u7ba1 bean ''{1}'' \u4e2d\u7684\u76ee\u6807\u5c5e\u6027 ''{0}''\u3002\u6b64\u5c5e\u6027\u5fc5\u987b\u63a5\u53d7 List \u6216 Array \u5b9e\u4f8b\u3002 -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=\u53d7\u7ba1 bean ''{1}'' \u4e2d\u7684\u5c5e\u6027 ''{0}'' \u5b9a\u4e49\u4e3a\u6620\u5c04\u5c5e\u6027\uff0c\u4f46\u7c7b\u4e2d\u7684\u8bbe\u7f6e\u4e0d\u63a5\u53d7 Map \u5b9e\u4f8b\u3002 -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=\u53d7\u7ba1 bean ''{1}'' \u4e2d\u7684\u5c5e\u6027 ''{0}'' \u5b9a\u4e49\u4e3a\u6620\u5c04\u5c5e\u6027\uff0c\u4f46\u7c7b\u4e2d\u7684\u83b7\u53d6\u4e0d\u8fd4\u56de Map \u5b9e\u4f8b\u3002 -com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=\u53d7\u7ba1 bean ''{1}'' \u4e2d\u7684\u5c5e\u6027 ''{0}'' \u5b9a\u4e49\u4e3a\u5217\u8868\u5c5e\u6027\uff0c\u4f46\u7c7b\u4e2d\u7684\u8bbe\u7f6e\u4e0d\u63a5\u53d7 List \u6216 Array \u5b9e\u4f8b\u3002 -com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=\u53d7\u7ba1 bean ''{1}'' \u4e2d\u7684\u5c5e\u6027 ''{0}'' \u5b9a\u4e49\u4e3a\u5217\u8868\u5c5e\u6027\uff0c\u4f46\u7c7b\u4e2d\u7684\u83b7\u53d6\u4e0d\u8fd4\u56de List \u6216 Array \u5b9e\u4f8b\u3002 -com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=\u53d7\u7ba1 bean ''{1}'' \u4e2d\u7684\u5c5e\u6027 ''{0}'' \u5b9a\u4e49\u4e3a\u5217\u8868\u5c5e\u6027\u3002\u83b7\u53d6\u8fd4\u56de\u6570\u7ec4\u7c7b\u578b\uff0c\u4f46\u6ca1\u6709\u5173\u8054\u7684\u8bbe\u7f6e\u3002 -com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=\u65e0\u6cd5\u8bbe\u7f6e\u53d7\u7ba1 bean ''{1}'' \u4e2d\u7684\u76ee\u6807\u5c5e\u6027 ''{0}''\u3002\u76ee\u6807\u5c5e\u6027\u8fd4\u56de\u4e86\u4e00\u4e2a\u4e0d\u662f List \u5b9e\u4f8b\u7684\u73b0\u6709\u503c\u3002 -com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=\u53d7\u7ba1 bean ''{0}'' \u7684\u914d\u7f6e\u4e0d\u6b63\u786e\u3002\u53d7\u7ba1 bean \u5df2\u5b9a\u4e49\u4e3a List\uff0c\u4f46\u8fd8\u5c1d\u8bd5\u5b9a\u4e49\u6620\u5c04\u6761\u76ee\u6216\u53d7\u7ba1\u5c5e\u6027\u3002 -com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=\u53d7\u7ba1 bean ''{0}'' \u7684\u914d\u7f6e\u4e0d\u6b63\u786e\u3002\u53d7\u7ba1 bean \u5df2\u5b9a\u4e49\u4e3a Map\uff0c\u4f46\u8fd8\u5c1d\u8bd5\u5b9a\u4e49\u53d7\u7ba1\u5c5e\u6027\u3002 -com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=\u53d7\u7ba1 bean ''{0}'' \u7684\u914d\u7f6e\u4e0d\u6b63\u786e\u3002\u53d7\u7ba1 bean \u5305\u542b\u540d\u4e3a ''{1}'' \u5e76\u5177\u6709\u5217\u8868\u6761\u76ee\u7684\u53d7\u7ba1\u5c5e\u6027\uff0c\u4f46\u5374\u975e\u6cd5\u5b9a\u4e49\u4e86\u503c\u548c/\u6216\u6620\u5c04\u6761\u76ee\u3002 -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=\u53d7\u7ba1 bean ''{0}'' \u7684\u914d\u7f6e\u4e0d\u6b63\u786e\u3002\u53d7\u7ba1 bean \u5305\u542b\u540d\u4e3a ''{1}'' \u5e76\u5177\u6709\u6620\u5c04\u6761\u76ee\u7684\u53d7\u7ba1\u5c5e\u6027\uff0c\u4f46\u5374\u975e\u6cd5\u5b9a\u4e49\u4e86\u503c\u3002 -com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=\u53d7\u7ba1 bean ''{0}'' \u7684\u914d\u7f6e\u4e0d\u6b63\u786e\u3002\u53d7\u7ba1 bean \u5305\u542b\u540d\u4e3a ''{1}'' \u7684\u53d7\u7ba1\u5c5e\u6027\uff0c\u6b64\u5c5e\u6027\u672a\u5305\u542b\u5217\u8868\u6216\u6620\u5c04\u6761\u76ee\uff0c\u4e5f\u672a\u5305\u542b\u4efb\u4f55\u503c\u5143\u7d20\u3002 -com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=\u5728\u5c06\u53d7\u7ba1 bean ''{3}'' \u7684\u7c7b\u578b ''{1}'' \u7684\u503c ''{0}'' \u8f6c\u6362\u4e3a\u7c7b\u578b ''{2}'' \u65f6\u53d1\u751f\u9519\u8bef\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=\u65e0\u6cd5\u627e\u5230\u53d7\u7ba1 bean ''{1}'' \u7684 bean \u6216\u5c5e\u6027\u7c7b ''{0}''\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=\u65e0\u6cd5\u88c5\u5165\u53d7\u7ba1 bean ''{1}'' \u7684 bean \u6216\u5c5e\u6027\u7c7b ''{0}''\uff0c\u539f\u56e0\u662f\u7f3a\u5c11\u4f9d\u8d56\u6027\uff1a{2}\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=\u53d7\u7ba1 bean ''{1}'' \u7684\u53d7\u7ba1 bean \u7c7b ''{0}'' \u672a\u58f0\u660e\u4e3a public\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=\u53d7\u7ba1 bean ''{1}'' \u7684\u53d7\u7ba1 bean \u7c7b ''{0}'' \u58f0\u660e\u4e3a abstract \u6216 interface\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=\u53d7\u7ba1 bean ''{1}'' \u7684\u53d7\u7ba1 bean \u7c7b ''{0}'' \u4e0d\u58f0\u660e\u516c\u5f00\u7684\u65e0\u53c2\u6570\u6784\u9020\u51fd\u6570\u3002 -com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=\u5bf9\u53d7\u7ba1 bean ''{0}'' \u6267\u884c\u8d44\u6e90\u6ce8\u5165 (resource injection) \u65f6\u53d1\u751f\u9519\u8bef -com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=\u5df2\u4f7f\u7528 ''{2}'' \u7684\u5c5e\u6027\u7c7b\u5b9a\u4e49\u53d7\u7ba1 bean ''{1}'' \u7684\u5c5e\u6027 ''{0}''\uff0c\u4f46\u6b64\u7c7b\u5374\u65e0\u6cd5\u5206\u914d\u7ed9\u6b64\u5c5e\u6027\u3002 -com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=\u65e0\u6cd5\u5185\u7701\u53d7\u7ba1 bean ''{0}'' -com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=\u53d7\u7ba1 bean ''{1}'' \u7684\u5c5e\u6027 ''{0}'' \u4e0d\u5b58\u5728\u3002 -com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=\u53d7\u7ba1 bean ''{1}'' \u7684\u5c5e\u6027 ''{0}'' \u6ca1\u6709\u8bbe\u7f6e\u3002 -com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=\u53d7\u7ba1 bean ''{1}'' \u7684\u5c5e\u6027 ''{0}'' \u63a5\u53d7\u591a\u4e2a\u53c2\u6570 -com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=\u65e0\u6cd5\u8bbe\u7f6e\u53d7\u7ba1 bean ''{1}'' \u7684\u5c5e\u6027 ''{0}'' -com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=\u65e0\u6cd5\u521b\u5efa\u53d7\u7ba1 bean ''{0}''\u3002\u53d1\u73b0\u4ee5\u4e0b\u95ee\u9898\uff1a -com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=\u8bf7\u6c42\u53d7\u7ba1 bean ''{0}'' \u65f6\uff0cFaces \u65e0\u6cd5\u521b\u5efa\u5b83\u3002\u53d1\u73b0\u4ee5\u4e0b\u95ee\u9898\uff1a -com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=\u5904\u7406\u53d7\u7ba1 bean ''{0}'' \u65f6\u53d1\u751f\u610f\u5916\u9519\u8bef -com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=\u5904\u7406\u53d7\u7ba1\u5c5e\u6027 ''{0}'' \u65f6\u53d1\u751f\u610f\u5916\u9519\u8bef -com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=\u8303\u56f4 ''{0}'' \u65e2\u4e0d\u662f ''view''\u3001''request''\u3001''session''\u3001''application'' \u4e4b\u4e00\uff0c\u4e5f\u4e0d\u4ee3\u8868 ValueExpression (#{...}) -com.sun.faces.MISSING_CLASS_ERROR=\u7f3a\u5c11\u7c7b\uff1a\u65e0\u6cd5\u88c5\u5165\u7c7b ''{0}''\u3002 -com.sun.faces.MISSING_RESOURCE_ERROR=\u7f3a\u5c11\u8d44\u6e90\uff1a\u65e0\u6cd5\u83b7\u53d6 ResourceBundle\u3002 -com.sun.faces.MODELUPDATE_ERROR=\u6a21\u578b\u66f4\u65b0\u5931\u8d25\uff0c\u539f\u56e0\u662f\u6a21\u578b ''{1}'' \u4e2d\u6709\u503c ''{0}''\u3002 -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=\u65e0\u6cd5\u4ece\u89c6\u56fe ID ''{0}'' \u4e2d\u627e\u5230\u7ed3\u679c ''{1}'' \u7684\u5339\u914d\u5bfc\u822a\u6761\u4ef6 -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=\u65e0\u6cd5\u4ece\u89c6\u56fe ID ''{0}'' \u4e2d\u627e\u5230\u5177\u6709\u7ed3\u679c ''{2}'' \u7684\u64cd\u4f5c ''{1}'' \u7684\u5339\u914d\u5bfc\u822a\u6761\u4ef6 -com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=\u7ed3\u679c ''{0}'' \u4e2d\u7684\u67e5\u8be2\u5b57\u7b26\u4e32\u65e0\u6548 -com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=\u8868\u8fbe\u5f0f\u9519\u8bef\uff1a\u672a\u627e\u5230\u6307\u5b9a\u7684\u5bf9\u8c61 ''{0}''\u3002 -com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=\u5904\u7406\u7a0b\u5e8f\u7c7b\u4e3a ''{0}'' \u7684\u6807\u8bb0\u53d1\u751f\u201c\u672a\u5d4c\u5957\u5728 UIComponentTag \u4e2d\u201d\u7684\u9519\u8bef\u3002 -com.sun.faces.NOT_NESTED_IN_TYPE_TAG_ERROR={0} \u6807\u8bb0\u5e94\u5d4c\u5957\u5728\u4e0e {1} \u7c7b\u578b\u7684\u7ec4\u4ef6\u5173\u8054\u7684\u6807\u8bb0\u4e2d\u3002 -com.sun.faces.NO_DTD_FOUND_ERROR=\u65e0\u6cd5\u5728\u8def\u5f84 ''{1}'' \u4e0b\u627e\u5230 PUBLIC ID \u4e3a ''{0}'' \u7684 DTD\u3002 -com.sun.faces.NULL_BODY_CONTENT_ERROR=\u5904\u7406\u7a0b\u5e8f\u7c7b\u4e3a ''{0}'' \u7684\u6807\u8bb0\u7684 BodyContent \u4e3a null\u3002 -com.sun.faces.NULL_COMPONENT_ERROR=\u6784\u9020\u9519\u8bef\uff1aComponent \u53c2\u6570\u4e3a null\u3002 -com.sun.faces.NULL_CONFIGURATION=\u672a\u4e3a\u5e94\u7528\u7a0b\u5e8f\u88c5\u5165\u914d\u7f6e\u3002 -com.sun.faces.NULL_CONTEXT_ERROR=\u53c2\u6570\u9519\u8bef\uff1aContext \u53c2\u6570\u4e3a null\u3002 -com.sun.faces.NULL_EVENT_ERROR=\u53c2\u6570\u9519\u8bef\uff1aEvent \u53c2\u6570\u4e3a null\u3002 -com.sun.faces.NULL_FORVALUE=\u672a\u627e\u5230\u7ec4\u4ef6 "{0}" -com.sun.faces.NULL_HANDLER_ERROR=\u53c2\u6570\u9519\u8bef\uff1aHandler \u53c2\u6570\u4e3a null\u3002 -com.sun.faces.NULL_LOCALE_ERROR=\u53c2\u6570\u9519\u8bef\uff1aLocale \u53c2\u6570\u4e3a null\u3002 -com.sun.faces.NULL_MESSAGE_ERROR=\u53c2\u6570\u9519\u8bef\uff1aMessage \u53c2\u6570\u4e0d\u80fd\u4e3a null -com.sun.faces.NULL_PARAMETERS_ERROR=\u53c2\u6570\u9519\u8bef\uff1a\u53c2\u6570 ''{0}'' \u4e3a null -com.sun.faces.NULL_REQUEST_VIEW_ERROR=\u53c2\u6570\u9519\u8bef\uff1aRequest View \u53c2\u6570\u4e3a null\u3002 -com.sun.faces.NULL_RESPONSE_STREAM_ERROR=\u53c2\u6570\u9519\u8bef\uff1aResponseStream \u53c2\u6570\u4e3a null\u3002 -com.sun.faces.NULL_RESPONSE_VIEW_ERROR=\u53c2\u6570\u9519\u8bef\uff1aResponseView \u53c2\u6570\u4e3a null\u3002 -com.sun.faces.NULL_RESPONSE_WRITER_ERROR=\u53c2\u6570\u9519\u8bef\uff1aResponseWriter \u53c2\u6570\u4e3a null\u3002 +com.sun.faces.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK=未在调用 ConfigureListener.contextInitialized() 的同一调用栈中调用 ApplicationAssociate ctor。 +com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=此 Web 应用程序的 ApplicationAssociate 已存在。 +com.sun.faces.ASSERTION_FAILED=断言失败 +com.sun.faces.ATTRIBUTE_NOT_SUPORTED=组件类型 ''{1}'' 不支持属性 ''{0}''。 +com.sun.faces.CANT_CONVERT_VALUE=无法将属性 ''{0}'' 转换为值类型 ''{1}''。 +com.sun.faces.CANT_CLOSE_INPUT_STREAM=无法关闭输入流。 +com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=无法为 ID ''{0}'' 创建生命周期。 +com.sun.faces.CANT_INSTANTIATE_CLASS=无法实例化类:''{0}''。 +com.sun.faces.CANT_INTROSPECT_CLASS=无法内省类:''{0}'' +com.sun.faces.CANT_PARSE_FILE=无法解析文件 ''{0}'':行 {1} 列 {2} 处出错:{3}。 +com.sun.faces.CHILD_NOT_OF_EXPECTED_TYPE=对于组件类型 ''{1}({2})'',期望的子组件类型为 ''{0}''。找到 ''{3}''。 +com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=: 此链接已禁用,因为它未嵌套在 Faces 表单内。 +com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=在未嵌套在 UIForm 内的视图中,找到一个或多个 UICommand 实例。与这些命令关联的操作将不会被调用。 +com.sun.faces.COMPONENT_NOT_FOUND_ERROR=未找到标识符 ''{0}'' 的组件。 +com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=无法在视图中找到 ID 为 ''{0}'' 的组件。 +com.sun.faces.CONTENT_TYPE_ERROR=无法识别内容类型。 +com.sun.faces.CONFIG_RENDERER_REGISTRATION_MISSING_RENDERKIT=无法使用 ID {0} 在 RenderKit 中注册 renderer。RenderKit 不存在。 +com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=已在视图中找到组件 ID ''{0}''。 +com.sun.faces.EMPTY_PARAMETER=参数是空的 +com.sun.faces.ENCODING_ERROR=无法识别字符编码。 +com.sun.faces.ERROR_GETTING_VALUE_BINDING=无法获取值 ''{0}'' 的 ValueBinding。 +com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=无法从值绑定表达式 ''{0}'' 获取值。 +com.sun.faces.ERROR_OPENING_FILE=无法打开配置文件:''{0}''。 +com.sun.faces.ERROR_PROCESSING_CONFIG=在配置处理过程中,发生意外错误。 +com.sun.faces.ERROR_REGISTERING_DTD=无法注册 DTD:''{0}''。 +com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=无法设置受管 bean 属性:''{0}''。 +com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=属性 ''{0}'' 的表达式的计算结果是意外类型。应为 {1},但收到的却是 {2}。 +com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=构造错误:一个或多个输入参数可能为 null。 +com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=无法确定 Servlet 路径 ''{0}'' 的 FaceServlet 映射。 +com.sun.faces.FACES_SERVLET_MAPPING_INCORRECT=FacesServlet 的 url-pattern 不能为 '/*'。请定义其他 url-pattern。 +com.sun.faces.FACES_CONTEXT_NOT_FOUND=没有可用于处理此请求的 FacesContext。很可能是因为将请求发送到了错误的路径。 +com.sun.faces.FILE_NOT_FOUND=未找到文件:''{0}''。 +com.sun.faces.ILLEGAL_ATTEMPT_SETTING_APPLICATION_ARTIFACT=呈现响应后设置 {0} 的尝试非法。 +com.sun.faces.ILLEGAL_CHARACTERS_ERROR=不允许字符。 +com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=在 lValue 模式 ''{0}'' 中使用隐含对象标识符非法 +com.sun.faces.ILLEGAL_MODEL_REFERENCE=表达式 ''{0}'' 的此上下文中的模型引用非法。 +com.sun.faces.ILLEGAL_VIEW_ID=视图 ID ''{0}'' 非法。该 ID 必须以 ''/'' 开头 +com.sun.faces.INVALID_EXPRESSION=表达式 ''{0}'' 无效。 +com.sun.faces.INVALID_INIT_PARAM=初始化参数 ''{1}'' 的值 ''{0}'' 无效。可接受的值为 'true' 或 'false'。默认值为 'false'。 +com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=配置中定义的消息严重性 ''{0}'' 无效。 +com.sun.faces.INVALID_SCOPE_LIFESPAN=表达式 ''{0}'' 引用的对象范围 ''{1}'' 比引用受管 bean 的 ''{3}'' 的 (''{2}'') 范围短 +com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=已为 ID ''{0}'' 添加生命周期 ID。 +com.sun.faces.LIFECYCLE_ID_NOT_FOUND=未找到 ID ''{0}'' 的生命周期 ID。 +com.sun.faces.MAXIMUM_EVENTS_REACHED=已达到事件 ''{0}'' 的最大数目。 +com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=无法设置受管 bean ''{1}'' 中的目标属性 ''{0}''。此属性必须接受 List 或 Array 实例。 +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=受管 bean ''{1}'' 中的属性 ''{0}'' 定义为映射属性,但类中的设置不接受 Map 实例。 +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=受管 bean ''{1}'' 中的属性 ''{0}'' 定义为映射属性,但类中的获取不返回 Map 实例。 +com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=受管 bean ''{1}'' 中的属性 ''{0}'' 定义为列表属性,但类中的设置不接受 List 或 Array 实例。 +com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=受管 bean ''{1}'' 中的属性 ''{0}'' 定义为列表属性,但类中的获取不返回 List 或 Array 实例。 +com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=受管 bean ''{1}'' 中的属性 ''{0}'' 定义为列表属性。获取返回数组类型,但没有关联的设置。 +com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=无法设置受管 bean ''{1}'' 中的目标属性 ''{0}''。目标属性返回了一个不是 List 实例的现有值。 +com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=受管 bean ''{0}'' 的配置不正确。受管 bean 已定义为 List,但还尝试定义映射条目或受管属性。 +com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=受管 bean ''{0}'' 的配置不正确。受管 bean 已定义为 Map,但还尝试定义受管属性。 +com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=受管 bean ''{0}'' 的配置不正确。受管 bean 包含名为 ''{1}'' 并具有列表条目的受管属性,但却非法定义了值和/或映射条目。 +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=受管 bean ''{0}'' 的配置不正确。受管 bean 包含名为 ''{1}'' 并具有映射条目的受管属性,但却非法定义了值。 +com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=受管 bean ''{0}'' 的配置不正确。受管 bean 包含名为 ''{1}'' 的受管属性,此属性未包含列表或映射条目,也未包含任何值元素。 +com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=在将受管 bean ''{3}'' 的类型 ''{1}'' 的值 ''{0}'' 转换为类型 ''{2}'' 时发生错误。 +com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=无法找到受管 bean ''{1}'' 的 bean 或属性类 ''{0}''。 +com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=无法装入受管 bean ''{1}'' 的 bean 或属性类 ''{0}'',原因是缺少依赖性:{2}。 +com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=受管 bean ''{1}'' 的受管 bean 类 ''{0}'' 未声明为 public。 +com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=受管 bean ''{1}'' 的受管 bean 类 ''{0}'' 声明为 abstract 或 interface。 +com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=受管 bean ''{1}'' 的受管 bean 类 ''{0}'' 不声明公开的无参数构造函数。 +com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=对受管 bean ''{0}'' 执行资源注入 (resource injection) 时发生错误 +com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=已使用 ''{2}'' 的属性类定义受管 bean ''{1}'' 的属性 ''{0}'',但此类却无法分配给此属性。 +com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=无法内省受管 bean ''{0}'' +com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=受管 bean ''{1}'' 的属性 ''{0}'' 不存在。 +com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=受管 bean ''{1}'' 的属性 ''{0}'' 没有设置。 +com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=受管 bean ''{1}'' 的属性 ''{0}'' 接受多个参数 +com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=无法设置受管 bean ''{1}'' 的属性 ''{0}'' +com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=无法创建受管 bean ''{0}''。发现以下问题: +com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=请求受管 bean ''{0}'' 时,Faces 无法创建它。发现以下问题: +com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=处理受管 bean ''{0}'' 时发生意外错误 +com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=处理受管属性 ''{0}'' 时发生意外错误 +com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=范围 ''{0}'' 既不是 ''view''、''request''、''session''、''application'' 之一,也不代表 ValueExpression (#{...}) +com.sun.faces.MISSING_CLASS_ERROR=缺少类:无法装入类 ''{0}''。 +com.sun.faces.MISSING_RESOURCE_ERROR=缺少资源:无法获取 ResourceBundle。 +com.sun.faces.MODELUPDATE_ERROR=模型更新失败,原因是模型 ''{1}'' 中有值 ''{0}''。 +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=无法从视图 ID ''{0}'' 中找到结果 ''{1}'' 的匹配导航条件 +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=无法从视图 ID ''{0}'' 中找到具有结果 ''{2}'' 的操作 ''{1}'' 的匹配导航条件 +com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=结果 ''{0}'' 中的查询字符串无效 +com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=表达式错误:未找到指定的对象 ''{0}''。 +com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=处理程序类为 ''{0}'' 的标记发生“未嵌套在 UIComponentTag 中”的错误。 +com.sun.faces.NOT_NESTED_IN_TYPE_TAG_ERROR={0} 标记应嵌套在与 {1} 类型的组件关联的标记中。 +com.sun.faces.NO_DTD_FOUND_ERROR=无法在路径 ''{1}'' 下找到 PUBLIC ID 为 ''{0}'' 的 DTD。 +com.sun.faces.NULL_BODY_CONTENT_ERROR=处理程序类为 ''{0}'' 的标记的 BodyContent 为 null。 +com.sun.faces.NULL_COMPONENT_ERROR=构造错误:Component 参数为 null。 +com.sun.faces.NULL_CONFIGURATION=未为应用程序装入配置。 +com.sun.faces.NULL_CONTEXT_ERROR=参数错误:Context 参数为 null。 +com.sun.faces.NULL_EVENT_ERROR=参数错误:Event 参数为 null。 +com.sun.faces.NULL_FORVALUE=未找到组件 "{0}" +com.sun.faces.NULL_HANDLER_ERROR=参数错误:Handler 参数为 null。 +com.sun.faces.NULL_LOCALE_ERROR=参数错误:Locale 参数为 null。 +com.sun.faces.NULL_MESSAGE_ERROR=参数错误:Message 参数不能为 null +com.sun.faces.NULL_PARAMETERS_ERROR=参数错误:参数 ''{0}'' 为 null +com.sun.faces.NULL_REQUEST_VIEW_ERROR=参数错误:Request View 参数为 null。 +com.sun.faces.NULL_RESPONSE_STREAM_ERROR=参数错误:ResponseStream 参数为 null。 +com.sun.faces.NULL_RESPONSE_VIEW_ERROR=参数错误:ResponseView 参数为 null。 +com.sun.faces.NULL_RESPONSE_WRITER_ERROR=参数错误:ResponseWriter 参数为 null。 com.sun.faces.NULL_VIEW_ID=Argument Error: view id argument is null. -com.sun.faces.OBJECT_CREATION_ERROR=\u65e0\u6cd5\u521b\u5efa\u4e00\u4e2a\u6216\u591a\u4e2a\u914d\u7f6e\u7684\u5e94\u7528\u7a0b\u5e8f\u5bf9\u8c61\u3002\u6709\u5173\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u68c0\u67e5\u60a8\u7684 web \u5e94\u7528\u7a0b\u5e8f\u65e5\u5fd7\u3002 -com.sun.faces.OPTION_NOT_SELECT_ITEM=\u53c2\u6570\u9519\u8bef\uff1a\u7ec4\u4ef6 ''{0}'' \u7684\u67d0\u4e2a\u9009\u9879\u4e0d\u662f jakarta.faces.model.SelectItem \u7684\u5b9e\u4f8b\u3002\u627e\u5230\u7684\u7c7b\u578b\uff1a''{1}''\u3002 -com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=: \u6b64\u6309\u94ae\u5df2\u7981\u7528\uff0c\u56e0\u4e3a\u65e0\u6cd5\u5339\u914d\u5bfc\u822a\u6761\u4ef6\u3002 -com.sun.faces.OUTCOME_TARGET_LINK_NO_MATCH=: \u6b64\u94fe\u63a5\u5df2\u7981\u7528\uff0c\u56e0\u4e3a\u65e0\u6cd5\u5339\u914d\u5bfc\u822a\u6761\u4ef6\u3002 -com.sun.faces.PHASE_ID_OUT_OF_BOUNDS=\u9636\u6bb5 ID \u8d85\u51fa\u4e86 ID ''{0}'' \u7684\u9650\u5236\u3002 -com.sun.faces.RENDERER_NOT_FOUND=\u672a\u627e\u5230 Renderer \u7c7b\u578b ''{0}'' \u7684 renderer\u3002 -com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=\u72b6\u6001\u9519\u8bef\uff1a\u5df2\u4e3a\u6b64\u8bf7\u6c42\u8bbe\u7f6e RequestView\u3002 -com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=\u8d44\u6e90\u683c\u5f0f\u65e0\u6548\u3002\u65e0\u6cd5\u89e3\u6790\u5c5e\u6027 ''{0}''\u3002 -com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=\u8d44\u6e90\u683c\u5f0f\u65e0\u6548\u3002\u5c5e\u6027 ''{0}'' \u5305\u542b\u591a\u4e2a\u5192\u53f7 (:)\u3002 -com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=\u8d44\u6e90\u683c\u5f0f\u65e0\u6548\u3002\u65e0\u6cd5\u89e3\u6790\u5c5e\u6027 ''{0}'' \u4ee5\u63d0\u53d6\u8d44\u6e90\u540d\u79f0\u548c\u5e93\u540d\u79f0\u3002 -com.sun.faces.SAVING_STATE_ERROR=\u4fdd\u5b58\u72b6\u6001\u65f6\u51fa\u9519\u3002 -com.sun.faces.SUPPORTS_COMPONENT_ERROR=\u53c2\u6570\u9519\u8bef\uff1a\u6b64 renderer \u4e0d\u652f\u6301 ''{0}''\u3002 -com.sun.faces.TYPECONVERSION_ERROR=\u4e3a ''{1}'' \u8bbe\u7f6e\u503c ''{0}'' \u65f6\u53d1\u751f\u8f6c\u6362\u9519\u8bef\u3002 -com.sun.faces.VALIDATION_COMMAND_ERROR=\u9a8c\u8bc1\u9519\u8bef\u3002''{0}'' \u5fc5\u987b\u5177\u6709\u503c\u6216\u56fe\u50cf\u5c5e\u6027\u3002 -com.sun.faces.VALIDATION_EL_ERROR=\u9a8c\u8bc1\u9519\u8bef\u3002''{0}'' \u7684\u8868\u8fbe\u5f0f\u65e0\u6548 -com.sun.faces.VALIDATION_ID_ERROR=\u9a8c\u8bc1\u9519\u8bef\u3002\u4ee5\u4e0b Faces \u6807\u8bb0\u5fc5\u987b\u5305\u542b ID\uff1a''{0}'' -com.sun.faces.CANNOT_CONVERT=\u65e0\u6cd5\u4f7f\u7528\u8f6c\u6362\u5668 ID ''{0}'' \u6216\u7ed1\u5b9a ''{1}'' \u89e3\u6790 Converter \u5b9e\u4f8b\u3002 -com.sun.faces.CANNOT_VALIDATE=\u65e0\u6cd5\u4f7f\u7528\u9a8c\u8bc1\u5668 ID ''{0}'' \u6216\u7ed1\u5b9a ''{1}'' \u89e3\u6790 Validator \u5b9e\u4f8b\u3002 -com.sun.faces.verifier.CLASS_NOT_FOUND=[{0}:{1}] \u7c7b\u4e0d\u5b58\u5728 -com.sun.faces.verifier.CLASS_MISSING_DEP=[{0}:{1}] \u7c7b\u65e0\u6cd5\u88c5\u5165\uff0c\u539f\u56e0\u662f\u7f3a\u5c11\u4f9d\u8d56\u6027 -> {2} -com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=[{0}:{1}] \u7c7b\u5305\u542b\u65e0\u53c2\u6570\u6784\u9020\u51fd\u6570\uff0c\u4f46\u5b83\u4e0d\u662f\u516c\u5f00\u7684 -com.sun.faces.verifier.NO_DEF_CTOR=[{0}:{1}] \u7c7b\u5305\u542b\u975e\u516c\u5f00\u65e0\u53c2\u6570\u6784\u9020\u51fd\u6570 -com.sun.faces.verifier.WRONG_TYPE=[{0}:{1}] \u7c7b\u4e0d\u5b9e\u73b0\u6216\u6269\u5c55 {2} +com.sun.faces.OBJECT_CREATION_ERROR=无法创建一个或多个配置的应用程序对象。有关详细信息,请检查您的 web 应用程序日志。 +com.sun.faces.OPTION_NOT_SELECT_ITEM=参数错误:组件 ''{0}'' 的某个选项不是 jakarta.faces.model.SelectItem 的实例。找到的类型:''{1}''。 +com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=: 此按钮已禁用,因为无法匹配导航条件。 +com.sun.faces.OUTCOME_TARGET_LINK_NO_MATCH=: 此链接已禁用,因为无法匹配导航条件。 +com.sun.faces.PHASE_ID_OUT_OF_BOUNDS=阶段 ID 超出了 ID ''{0}'' 的限制。 +com.sun.faces.RENDERER_NOT_FOUND=未找到 Renderer 类型 ''{0}'' 的 renderer。 +com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=状态错误:已为此请求设置 RequestView。 +com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=资源格式无效。无法解析属性 ''{0}''。 +com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=资源格式无效。属性 ''{0}'' 包含多个冒号 (:)。 +com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=资源格式无效。无法解析属性 ''{0}'' 以提取资源名称和库名称。 +com.sun.faces.SAVING_STATE_ERROR=保存状态时出错。 +com.sun.faces.SUPPORTS_COMPONENT_ERROR=参数错误:此 renderer 不支持 ''{0}''。 +com.sun.faces.TYPECONVERSION_ERROR=为 ''{1}'' 设置值 ''{0}'' 时发生转换错误。 +com.sun.faces.VALIDATION_COMMAND_ERROR=验证错误。''{0}'' 必须具有值或图像属性。 +com.sun.faces.VALIDATION_EL_ERROR=验证错误。''{0}'' 的表达式无效 +com.sun.faces.VALIDATION_ID_ERROR=验证错误。以下 Faces 标记必须包含 ID:''{0}'' +com.sun.faces.CANNOT_CONVERT=无法使用转换器 ID ''{0}'' 或绑定 ''{1}'' 解析 Converter 实例。 +com.sun.faces.CANNOT_VALIDATE=无法使用验证器 ID ''{0}'' 或绑定 ''{1}'' 解析 Validator 实例。 +com.sun.faces.verifier.CLASS_NOT_FOUND=[{0}:{1}] 类不存在 +com.sun.faces.verifier.CLASS_MISSING_DEP=[{0}:{1}] 类无法装入,原因是缺少依赖性 -> {2} +com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=[{0}:{1}] 类包含无参数构造函数,但它不是公开的 +com.sun.faces.verifier.NO_DEF_CTOR=[{0}:{1}] 类包含非公开无参数构造函数 +com.sun.faces.verifier.WRONG_TYPE=[{0}:{1}] 类不实现或扩展 {2} -com.sun.faces.CYCLIC_REFERENCE_ERROR=\u53d7\u7ba1 bean ''{0}'' \u5305\u542b\u5faa\u73af\u5f15\u7528\u3002\u8ba1\u7b97\u8def\u5f84\uff1a''{1}''\u3002 -com.sun.faces.OBJECT_IS_READONLY={0} \u5bf9\u8c61\u662f\u53ea\u8bfb\u5bf9\u8c61 -com.sun.faces.INCORRECT_JSP_VERSION=\u5bb9\u5668\u7684 JSP \u7248\u672c\u4f3c\u4e4e\u5c0f\u4e8e 2.1\uff0c\u65e0\u6cd5\u627e\u5230 EL RI \u8868\u8fbe\u5f0f\u5de5\u5382 ''{0}''\u3002\u5982\u679c\u4e0d\u4f7f\u7528 JSP \u6216 EL RI\uff0c\u8bf7\u786e\u4fdd\u4e0a\u4e0b\u6587\u521d\u59cb\u5316\u53c2\u6570 ''{1}'' \u5df2\u6b63\u786e\u8bbe\u7f6e\u3002 +com.sun.faces.CYCLIC_REFERENCE_ERROR=受管 bean ''{0}'' 包含循环引用。计算路径:''{1}''。 +com.sun.faces.OBJECT_IS_READONLY={0} 对象是只读对象 +com.sun.faces.INCORRECT_JSP_VERSION=容器的 JSP 版本似乎小于 2.1,无法找到 EL RI 表达式工厂 ''{0}''。如果不使用 JSP 或 EL RI,请确保上下文初始化参数 ''{1}'' 已正确设置。 #com.sun.faces.el.PropertyResolverImpl -com.sun.faces.OUT_OF_BOUNDS_ERROR=\u7d22\u5f15 {1} \u8d85\u51fa\u4e86 {0} \u7684\u9650\u5236 -com.sun.faces.PROPERTY_TYPE_ERROR={0} \u4e0d\u662f Array \u6216 List \u7c7b\u578b\u3002 -com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=\u7d22\u5f15 {1} \u7684\u957f\u5ea6 {2} \u8d85\u51fa\u4e86 {0} \u7684\u9650\u5236 -com.sun.faces.RESTORE_VIEW_ERROR=\u65e0\u6cd5\u6062\u590d\u89c6\u56fe ''{0}''\u3002 +com.sun.faces.OUT_OF_BOUNDS_ERROR=索引 {1} 超出了 {0} 的限制 +com.sun.faces.PROPERTY_TYPE_ERROR={0} 不是 Array 或 List 类型。 +com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=索引 {1} 的长度 {2} 超出了 {0} 的限制 +com.sun.faces.RESTORE_VIEW_ERROR=无法恢复视图 ''{0}''。 -com.sun.faces.CANT_WRITE_ID_ATTRIBUTE=\u65e0\u6cd5\u5199\u5165 ID \u5c5e\u6027\uff1a''{0}''\u3002 -com.sun.faces.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR=\u672a\u5d4c\u5957\u5728 UIComponentTag \u4e2d\u3002 -com.sun.faces.NO_COMPONENT_ASSOCIATED_WITH_UICOMPONENT_TAG=\u6ca1\u6709\u4e0e UIComponentTag \u5173\u8054\u7684\u7ec4\u4ef6\u3002 +com.sun.faces.CANT_WRITE_ID_ATTRIBUTE=无法写入 ID 属性:''{0}''。 +com.sun.faces.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR=未嵌套在 UIComponentTag 中。 +com.sun.faces.NO_COMPONENT_ASSOCIATED_WITH_UICOMPONENT_TAG=没有与 UIComponentTag 关联的组件。 -com.sun.faces.JS_RESOURCE_WRITING_ERROR=\u65e0\u6cd5\u5c06 JavaScript \u6587\u4ef6\u5199\u5165\u5ba2\u6237\u673a\u3002 +com.sun.faces.JS_RESOURCE_WRITING_ERROR=无法将 JavaScript 文件写入客户机。 -com.sun.faces.RESOURCE_TARGET_NOT_AVAILABLE=\u4e00\u4e2a\u6216\u591a\u4e2a\u8d44\u6e90\u5177\u6709 ''{0}'' \u7684\u76ee\u6807\uff0c\u4f46\u89c6\u56fe\u4e2d\u5374\u672a\u5b9a\u4e49 ''{0}'' \u7ec4\u4ef6\u3002 +com.sun.faces.RESOURCE_TARGET_NOT_AVAILABLE=一个或多个资源具有 ''{0}'' 的目标,但视图中却未定义 ''{0}'' 组件。 com.sun.faces.ARGUMENTS_NOT_LEGAL_WITH_CC_ATTRS_EXPR=Illegal attempt to pass arguments to a composite component lookup expression (i.e. cc.attrs.[identifier]). com.sun.faces.partial.statesaving.ERROR_RESTORING_STATE_FOR_COMPONENT=Unexpected error restoring state for component with id ''{0}''. Cause: {1}. com.sun.faces.MISSING_COMPONENT_ATTRIBUTE_VALUE=The following attribute(s) are required, but no values have been supplied for them: ''{0}''. diff --git a/impl/src/main/resources/com/sun/faces/resources/Messages_zh_HK.properties b/impl/src/main/resources/com/sun/faces/resources/Messages_zh_HK.properties index fb19ad2925..a068d42ac4 100644 --- a/impl/src/main/resources/com/sun/faces/resources/Messages_zh_HK.properties +++ b/impl/src/main/resources/com/sun/faces/resources/Messages_zh_HK.properties @@ -14,147 +14,147 @@ # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 # -com.sun.faces.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK=\u672a\u5728\u547c\u53eb ConfigureListener.contextInitialized() \u7684\u76f8\u540c\u547c\u53eb\u5806\u758a\u4e2d\u547c\u53eb ApplicationAssociate ctor\u3002 -com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=\u5c0d\u65bc\u6b64 Web \u61c9\u7528\u7a0b\u5f0f\uff0cApplicationAssociate \u5df2\u7d93\u5b58\u5728\u3002 -com.sun.faces.ASSERTION_FAILED=\u6307\u5b9a\u5931\u6557 -com.sun.faces.ATTRIBUTE_NOT_SUPORTED=\u5143\u4ef6\u985e\u578b\u300c{1}\u300d\u4e0d\u652f\u63f4\u5c6c\u6027\u300c{0}\u300d\u3002 -com.sun.faces.CANT_CONVERT_VALUE=\u7121\u6cd5\u5c07\u7279\u6027\u300c{0}\u300d\u8f49\u63db\u70ba\u503c\u985e\u578b\u300c{1}\u300d\u3002 -com.sun.faces.CANT_CLOSE_INPUT_STREAM=\u7121\u6cd5\u95dc\u9589\u8f38\u5165\u4e32\u6d41\u3002 -com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=\u7121\u6cd5\u5efa\u7acb ID\u300c{0}\u300d\u7684\u751f\u547d\u9031\u671f\u3002 -com.sun.faces.CANT_INSTANTIATE_CLASS=\u7121\u6cd5\u5be6\u4f8b\u5316\u985e\u5225:\u300c{0}\u300d\u3002 -com.sun.faces.CANT_INTROSPECT_CLASS=\u7121\u6cd5\u5167\u8996\u985e\u5225:\u300c{0}\u300d -com.sun.faces.CANT_PARSE_FILE=\u7121\u6cd5\u5256\u6790\u6a94\u6848\u300c{0}\u300d\uff1a\u884c {1} \u6b04 {2} \u767c\u751f\u932f\u8aa4: {3}\u3002 -com.sun.faces.CHILD_NOT_OF_EXPECTED_TYPE=\u5c0d\u65bc\u5143\u4ef6\u985e\u578b\u300c{1}({2})\u300d\uff0c\u9810\u671f\u7684\u5b50\u5143\u4ef6\u985e\u578b\u70ba\u300c{0}\u300d\u3002\u4f46\u662f\u537b\u627e\u5230\u300c{3}\u300d\u3002 -com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=\uff1a\u6b64\u9023\u7d50\u5df2\u505c\u7528\uff0c\u56e0\u70ba\u5b83\u672a\u5d4c\u5957\u5728 Faces \u8868\u55ae\u5167\u3002 -com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=\u6aa2\u8996\u5167\u627e\u5230\u4e00\u6216\u591a\u500b UICommand \u5be6\u4f8b\u672a\u5d4c\u5957\u5728 UIForm \u5167\u3002\u5c07\u4e0d\u6703\u547c\u53eb\u8207\u9019\u4e9b\u6307\u4ee4\u76f8\u95dc\u806f\u7684\u52d5\u4f5c\u3002 -com.sun.faces.COMPONENT_NOT_FOUND_ERROR=\u672a\u627e\u5230\u8b58\u5225\u78bc\u300c{0}\u300d\u7684\u5143\u4ef6\u3002 -com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=\u5728\u6aa2\u8996\u4e2d\u627e\u4e0d\u5230 ID \u70ba\u300c{0}\u300d\u7684\u5143\u4ef6\u3002 -com.sun.faces.CONTENT_TYPE_ERROR=\u7121\u6cd5\u8fa8\u8b58\u7684\u5167\u5bb9\u985e\u578b\u3002 -com.sun.faces.CONFIG_RENDERER_REGISTRATION_MISSING_RENDERKIT=\u7121\u6cd5\u4f7f\u7528 ID {0} \u8a3b\u518a\u5177\u6709 RenderKit \u7684\u7de8\u8b6f\u5668\u3002RenderKit \u4e0d\u5b58\u5728\u3002 -com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=\u5728\u6aa2\u8996\u4e2d\u5df2\u627e\u5230\u5143\u4ef6 ID\u300c{0}\u300d\u3002 -com.sun.faces.EMPTY_PARAMETER=\u53c3\u6578\u662f\u7a7a\u7684 -com.sun.faces.ENCODING_ERROR=\u7121\u6cd5\u8fa8\u8b58\u7684\u5b57\u5143\u7de8\u78bc\u3002 -com.sun.faces.ERROR_GETTING_VALUE_BINDING=\u7121\u6cd5\u53d6\u5f97\u503c\u300c{0}\u300d\u7684 ValueBinding\u3002 -com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=\u7121\u6cd5\u5f9e\u9023\u7d50\u8868\u793a\u5f0f\u300c{0}\u300d\u53d6\u5f97\u503c\u3002 -com.sun.faces.ERROR_OPENING_FILE=\u7121\u6cd5\u958b\u555f\u914d\u7f6e\u6a94\u6848:\u300c{0}\u300d\u3002 -com.sun.faces.ERROR_PROCESSING_CONFIG=\u914d\u7f6e\u8655\u7406\u671f\u9593\u767c\u751f\u672a\u9810\u671f\u7684\u932f\u8aa4\u3002 -com.sun.faces.ERROR_REGISTERING_DTD=\u7121\u6cd5\u8a3b\u518a DTD:\u300c{0}\u300d\u3002 -com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=\u7121\u6cd5\u8a2d\u5b9a\u53d7\u7ba1 Bean \u7279\u6027:\u300c{0}\u300d\u3002 -com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=\u5c6c\u6027\u300c{0}\u300d\u8868\u793a\u5f0f\u7684\u8a08\u7b97\u5f97\u5230\u672a\u9810\u671f\u7684\u985e\u578b\u3002\u9810\u671f\u70ba {1}\uff0c\u4f46\u6536\u5230 {2}\u3002 -com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=\u5efa\u69cb\u932f\u8aa4\uff1a\u4e00\u6216\u591a\u500b\u8f38\u5165\u53c3\u6578\u53ef\u80fd\u70ba\u7a7a\u503c\u3002 -com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=\u7121\u6cd5\u78ba\u5b9a Servlet \u8def\u5f91\u300c{0}\u300d\u7684 FaceServlet \u5c0d\u6620\u3002 -com.sun.faces.FACES_SERVLET_MAPPING_INCORRECT=FacesServlet \u4e0d\u80fd\u6709\u300c/*\u300durl-pattern\u3002\u8acb\u5b9a\u7fa9\u4e0d\u540c\u7684 url-pattern\u3002 -com.sun.faces.FACES_CONTEXT_NOT_FOUND=\u7121 FacesContext \u53ef\u7528\u65bc\u8655\u7406\u6b64\u8acb\u6c42\u3002\u5f88\u53ef\u80fd\u662f\u7531\u65bc\u5c07\u8acb\u6c42\u50b3\u9001\u81f3\u932f\u8aa4\u7684\u8def\u5f91\u3002 -com.sun.faces.FILE_NOT_FOUND=\u627e\u4e0d\u5230\u6a94\u6848:\u300c{0}\u300d\u3002 -com.sun.faces.ILLEGAL_ATTEMPT_SETTING_APPLICATION_ARTIFACT=\u7522\u751f\u56de\u61c9\u5f8c\uff0c\u8a2d\u5b9a {0} \u7684\u5617\u8a66\u975e\u6cd5\u3002 -com.sun.faces.ILLEGAL_CHARACTERS_ERROR=\u4e0d\u5141\u8a31\u5b57\u5143\u3002 -com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=lValue \u6a21\u5f0f\u300c{0}\u300d\u4e2d\u4f7f\u7528\u96b1\u5f0f\u7269\u4ef6\u8b58\u5225\u78bc\u975e\u6cd5 -com.sun.faces.ILLEGAL_MODEL_REFERENCE=\u5728\u6b64\u74b0\u5883\u4e2d\uff0c\u8868\u793a\u5f0f\u300c{0}\u300d\u7684\u6a21\u578b\u53c3\u7167\u975e\u6cd5\u3002 -com.sun.faces.ILLEGAL_VIEW_ID=\u975e\u6cd5\u6aa2\u8996 ID\u300c{0}\u300d\u3002ID \u5fc5\u9808\u4ee5\u300c/\u300d\u958b\u982d -com.sun.faces.INVALID_EXPRESSION=\u7121\u6548\u7684\u8868\u793a\u5f0f:\u300c{0}\u300d\u3002 -com.sun.faces.INVALID_INIT_PARAM=\u521d\u59cb\u5316\u53c3\u6578\u300c{1}\u300d\u7684\u503c\u300c{0}\u300d\u7121\u6548\u3002\u53ef\u63a5\u53d7\u7684\u503c\u70ba\u300ctrue\u300d\u6216\u300cfalse\u300d\u3002\u9810\u8a2d\u70ba\u300cfalse\u300d\u3002 -com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=\u914d\u7f6e\u4e2d\u5b9a\u7fa9\u7684\u8a0a\u606f\u56b4\u91cd\u6027\u300c{0}\u300d\u7121\u6548\u3002 -com.sun.faces.INVALID_SCOPE_LIFESPAN=\u8868\u793a\u5f0f\u300c{0}\u300d\u53c3\u7167\u7684\u7269\u4ef6\u7bc4\u570d\u300c{1}\u300d\u6bd4\u53c3\u7167\u300c{3}\u300d\u7684\u53d7\u7ba1 Bean (\u300c{2}\u300d) \u7bc4\u570d\u77ed\u3002 -com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=\u5df2\u589e\u52a0 ID\u300c{0}\u300d\u7684 LifecycleId\u3002 -com.sun.faces.LIFECYCLE_ID_NOT_FOUND=\u627e\u4e0d\u5230 ID\u300c{0}\u300d\u7684 LifecycleId\u3002 -com.sun.faces.MAXIMUM_EVENTS_REACHED=\u5df2\u9054\u4e8b\u4ef6\u7684\u6700\u5927\u6578\u76ee\u300c{0}\u300d\u3002 -com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=\u7121\u6cd5\u5728\u53d7\u7ba1 Bean\u300c{1}\u300d\u4e2d\u8a2d\u5b9a\u76ee\u6a19\u7279\u6027\u300c{0}\u300d\u3002\u6b64\u7279\u6027\u5fc5\u9808\u63a5\u53d7\u6e05\u55ae\u6216\u9663\u5217\u5be6\u4f8b\u3002 -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u4e2d\u7684\u7279\u6027\u300c{0}\u300d\u5b9a\u7fa9\u70ba\u5c0d\u6620\u7279\u6027\uff0c\u4f46\u985e\u5225\u4e2d\u7684 setter \u4e0d\u63a5\u53d7\u5c0d\u6620\u5be6\u4f8b\u3002 -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u4e2d\u7684\u7279\u6027\u300c{0}\u300d\u5b9a\u7fa9\u70ba\u5c0d\u6620\u7279\u6027\uff0c\u4f46\u985e\u5225\u4e2d\u7684 getter \u4e0d\u6703\u50b3\u56de\u5c0d\u6620\u5be6\u4f8b\u3002 -com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u4e2d\u7684\u7279\u6027\u300c{0}\u300d\u5b9a\u7fa9\u70ba\u6e05\u55ae\u7279\u6027\uff0c\u4f46\u985e\u5225\u4e2d\u7684 setter \u4e0d\u63a5\u53d7\u6e05\u55ae\u6216\u9663\u5217\u5be6\u4f8b\u3002 -com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u4e2d\u7684\u7279\u6027\u300c{0}\u300d\u5b9a\u7fa9\u70ba\u6e05\u55ae\u7279\u6027\uff0c\u4f46\u985e\u5225\u4e2d\u7684 getter \u4e0d\u6703\u50b3\u56de\u6e05\u55ae\u6216\u9663\u5217\u5be6\u4f8b\u3002 -com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u4e2d\u7684\u7279\u6027\u300c{0}\u300d\u5b9a\u7fa9\u70ba\u6e05\u55ae\u7279\u6027\u3002getter \u6703\u50b3\u56de\u9663\u5217\u985e\u578b\uff0c\u4f46\u6c92\u6709\u76f8\u95dc\u806f\u7684 setter\u3002 -com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=\u7121\u6cd5\u5728\u53d7\u7ba1 Bean\u300c{1}\u300d\u4e2d\u8a2d\u5b9a\u76ee\u6a19\u7279\u6027\u300c{0}\u300d\u3002\u76ee\u6a19\u7279\u6027\u50b3\u56de\u7684\u73fe\u6709\u503c\u4e0d\u662f\u6e05\u55ae\u7684\u5be6\u4f8b\u3002 -com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=\u53d7\u7ba1 Bean\u300c{0}\u300d\u7684\u914d\u7f6e\u4e0d\u6b63\u78ba\u3002\u53d7\u7ba1 Bean \u914d\u7f6e\u70ba\u6e05\u55ae\uff0c\u4f46\u4e5f\u5617\u8a66\u5b9a\u7fa9\u5c0d\u6620\u9805\u76ee\u6216\u53d7\u7ba1\u7279\u6027\u3002 -com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=\u53d7\u7ba1 Bean\u300c{0}\u300d\u7684\u914d\u7f6e\u4e0d\u6b63\u78ba\u3002\u53d7\u7ba1 Bean \u914d\u7f6e\u70ba\u5c0d\u6620\uff0c\u4f46\u4e5f\u5617\u8a66\u5b9a\u7fa9\u53d7\u7ba1\u7279\u6027\u3002 -com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=\u53d7\u7ba1 Bean\u300c{0}\u300d\u7684\u914d\u7f6e\u4e0d\u6b63\u78ba\u3002\u53d7\u7ba1 Bean \u542b\u6709\u5177\u6709\u6e05\u55ae\u9805\u76ee\u7684\u53d7\u7ba1\u7279\u6027\u300c{1}\u300d\uff0c\u4f46\u975e\u6cd5\u5b9a\u7fa9\u4e86\u503c\u548c/\u6216\u5c0d\u6620\u9805\u76ee\u3002 -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=\u53d7\u7ba1 Bean\u300c{0}\u300d\u7684\u914d\u7f6e\u4e0d\u6b63\u78ba\u3002\u53d7\u7ba1 Bean \u542b\u6709\u5177\u6709\u5c0d\u6620\u9805\u76ee\u7684\u53d7\u7ba1\u7279\u6027\u300c{1}\u300d\uff0c\u4f46\u4e5f\u975e\u6cd5\u5b9a\u7fa9\u4e86\u503c\u3002 -com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=\u53d7\u7ba1 Bean\u300c{0}\u300d\u7684\u914d\u7f6e\u4e0d\u6b63\u78ba\u3002\u53d7\u7ba1 Bean \u542b\u6709\u672a\u5305\u542b\u6e05\u55ae\u6216\u5c0d\u6620\u9805\u76ee\u6216\u4efb\u4f55\u503c\u5143\u7d20\u7684\u53d7\u7ba1\u7279\u6027\u300c{1}\u300d\u3002 -com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=\u91dd\u5c0d\u53d7\u7ba1 Bean\u300c{3}\u300d\uff0c\u5c07\u985e\u578b\u300c{1}\u300d\u7684\u503c\u300c{0}\u300d\u8f49\u63db\u70ba\u985e\u578b\u300c{2}\u300d\u6642\u767c\u751f\u932f\u8aa4\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=\u627e\u4e0d\u5230\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684 Bean \u6216\u7279\u6027\u985e\u5225\u300c{0}\u300d\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=\u7121\u6cd5\u8f09\u5165\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684 Bean \u6216\u7279\u6027\u985e\u5225\u300c{0}\u300d\uff0c\u539f\u56e0\u662f\u7f3a\u5c11\u76f8\u4f9d\u6027: {2}\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684\u53d7\u7ba1 Bean \u985e\u5225\u300c{0}\u300d\u672a\u5ba3\u544a\u70ba\u516c\u7528\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684\u53d7\u7ba1 Bean \u985e\u5225\u300c{0}\u300d\u5ba3\u544a\u70ba\u62bd\u8c61\u6216\u4ecb\u9762\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684\u53d7\u7ba1 Bean \u985e\u5225\u300c{0}\u300d\u672a\u5ba3\u544a\u516c\u7528\u7121\u5f15\u6578\u5efa\u69cb\u5b50\u3002 -com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=\u5728\u53d7\u7ba1 Bean\u300c{0}\u300d\u4e0a\u57f7\u884c\u8cc7\u6e90\u5f15\u5165\u6642\u767c\u751f\u932f\u8aa4\u3002 -com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684\u7279\u6027\u300c{0}\u300d\u4f7f\u7528\u7279\u6027\u985e\u5225\u300c{2}\u300d\u5b9a\u7fa9\uff0c\u4f46\u6b64\u985e\u5225\u7121\u6cd5\u6307\u5b9a\u7d66\u7279\u6027\u3002 -com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=\u7121\u6cd5\u5167\u8996\u53d7\u7ba1 Bean\u300c{0}\u300d -com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684\u7279\u6027\u300c{0}\u300d\u4e0d\u5b58\u5728\u3002 -com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684\u7279\u6027\u300c{0}\u300d\u6c92\u6709 setter\u3002 -com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684\u7279\u6027\u300c{0}\u300d\u63a5\u53d7\u8d85\u904e\u4e00\u500b\u5f15\u6578\u3002 -com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=\u7121\u6cd5\u8a2d\u5b9a\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684\u7279\u6027\u300c{0}\u300d\u3002 -com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=\u7121\u6cd5\u5efa\u7acb\u53d7\u7ba1 Bean\u300c{0}\u300d\u3002\u627e\u5230\u4e0b\u5217\u554f\u984c\uff1a -com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=Faces \u6536\u5230\u8acb\u6c42\u6642\u5c07\u7121\u6cd5\u5efa\u7acb\u53d7\u7ba1 Bean\u300c{0}\u300d\u3002\u627e\u5230\u4e0b\u5217\u554f\u984c\uff1a -com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=\u8655\u7406\u53d7\u7ba1 Bean\u300c{0}\u300d\u6642\u767c\u751f\u672a\u9810\u671f\u7684\u932f\u8aa4 -com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=\u8655\u7406\u53d7\u7ba1\u7279\u6027\u300c{0}\u300d\u6642\u767c\u751f\u672a\u9810\u671f\u7684\u932f\u8aa4 -com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=\u7bc4\u570d\u300c{0}\u300d\u4e0d\u662f\u300cview\u300d\u300crequest\u300d\u300csession\u300d\u3001\u300capplication\u300d\u5176\u4e2d\u4e4b\u4e00\uff0c\u4e5f\u4e0d\u662f\u4ee3\u8868 ValueExpression (#{...}) -com.sun.faces.MISSING_CLASS_ERROR=\u7f3a\u5c11\u985e\u5225\uff1a\u7121\u6cd5\u8f09\u5165\u985e\u5225\u300c{0}\u300d\u3002 -com.sun.faces.MISSING_RESOURCE_ERROR=\u7f3a\u5c11\u8cc7\u6e90\uff1a\u7121\u6cd5\u53d6\u5f97 ResourceBundle\u3002 -com.sun.faces.MODELUPDATE_ERROR=\u6a21\u578b\u66f4\u65b0\u5931\u6557\uff0c\u56e0\u70ba\u6a21\u578b\u300c{1}\u300d\u4e2d\u5b58\u5728\u503c\u300c{0}\u300d\u3002 -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=\u7121\u6cd5\u5f9e\u6aa2\u8996 ID\u300c{0}\u300d\u4e2d\u70ba\u7d50\u679c\u300c{1}\u300d\u627e\u5230\u76f8\u7b26\u7684\u700f\u89bd\u689d\u4ef6 -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=\u7121\u6cd5\u5f9e\u6aa2\u8996 ID\u300c{0}\u300d\u4e2d\u70ba\u5177\u6709\u7d50\u679c\u300c{2}\u300d\u7684\u52d5\u4f5c\u300c{1}\u300d\u627e\u5230\u76f8\u7b26\u7684\u700f\u89bd\u689d\u4ef6 -com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=\u7d50\u679c\u300c{0}\u300d\u4e2d\u7684\u67e5\u8a62\u5b57\u4e32\u7121\u6548 -com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=\u8868\u793a\u5f0f\u932f\u8aa4\uff1a\u627e\u4e0d\u5230\u5df2\u547d\u540d\u7684\u7269\u4ef6:\u300c{0}\u300d\u3002 -com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=\u8655\u7406\u7a0b\u5f0f\u985e\u5225\u70ba\u300c{0}\u300d\u6a19\u8a18\u767c\u751f\u300c\u672a\u5d4c\u5957\u65bc UIComponentTag \u4e2d\u300d\u7684\u932f\u8aa4\u3002 -com.sun.faces.NOT_NESTED_IN_TYPE_TAG_ERROR={0} \u6a19\u8a18\u61c9\u8a72\u5d4c\u5957\u5728\u8207 {1} \u985e\u578b\u5143\u4ef6\u76f8\u95dc\u806f\u7684\u6a19\u8a18\u4e2d\u3002 -com.sun.faces.NO_DTD_FOUND_ERROR=\u5728\u8def\u5f91\u300c{1}\u300d\u4e2d\u627e\u4e0d\u5230\u5177\u6709 PUBLIC ID\u300c{0}\u300d\u7684 DTD\u3002 -com.sun.faces.NULL_BODY_CONTENT_ERROR=\u5c0d\u65bc\u5177\u6709\u8655\u7406\u5668\u985e\u5225:\u300c{0}\u300d\u7684\u6a19\u8a18\uff0cBodyContent \u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_COMPONENT_ERROR=\u5efa\u69cb\u932f\u8aa4\uff1a\u5143\u4ef6\u5f15\u6578\u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_CONFIGURATION=\u672a\u8f09\u5165\u61c9\u7528\u7a0b\u5f0f\u7684\u914d\u7f6e\u3002 -com.sun.faces.NULL_CONTEXT_ERROR=\u5f15\u6578\u932f\u8aa4\uff1a\u74b0\u5883\u5f15\u6578\u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_EVENT_ERROR=\u5f15\u6578\u932f\u8aa4\uff1a\u4e8b\u4ef6\u5f15\u6578\u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_FORVALUE=\u627e\u4e0d\u5230\u5143\u4ef6\u300c{0}\u300d -com.sun.faces.NULL_HANDLER_ERROR=\u5f15\u6578\u932f\u8aa4\uff1a\u8655\u7406\u5668\u5f15\u6578\u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_LOCALE_ERROR=\u5f15\u6578\u932f\u8aa4\uff1a\u8a9e\u8a00\u74b0\u5883\u5f15\u6578\u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_MESSAGE_ERROR=\u5f15\u6578\u932f\u8aa4\uff1a\u8a0a\u606f\u53c3\u6578\u4e0d\u80fd\u70ba\u7a7a\u503c -com.sun.faces.NULL_PARAMETERS_ERROR=\u5f15\u6578\u932f\u8aa4\uff1a\u53c3\u6578\u300c{0}\u300d\u70ba\u7a7a\u503c -com.sun.faces.NULL_REQUEST_VIEW_ERROR=\u5f15\u6578\u932f\u8aa4\uff1a\u8acb\u6c42\u6aa2\u8996\u5f15\u6578\u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_RESPONSE_STREAM_ERROR=\u5f15\u6578\u932f\u8aa4\uff1aResponseStream \u5f15\u6578\u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_RESPONSE_VIEW_ERROR=\u5f15\u6578\u932f\u8aa4\uff1aResponseView \u5f15\u6578\u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_RESPONSE_WRITER_ERROR=\u5f15\u6578\u932f\u8aa4\uff1aResponseWriter \u5f15\u6578\u70ba\u7a7a\u503c\u3002 +com.sun.faces.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK=未在呼叫 ConfigureListener.contextInitialized() 的相同呼叫堆疊中呼叫 ApplicationAssociate ctor。 +com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=對於此 Web 應用程式,ApplicationAssociate 已經存在。 +com.sun.faces.ASSERTION_FAILED=指定失敗 +com.sun.faces.ATTRIBUTE_NOT_SUPORTED=元件類型「{1}」不支援屬性「{0}」。 +com.sun.faces.CANT_CONVERT_VALUE=無法將特性「{0}」轉換為值類型「{1}」。 +com.sun.faces.CANT_CLOSE_INPUT_STREAM=無法關閉輸入串流。 +com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=無法建立 ID「{0}」的生命週期。 +com.sun.faces.CANT_INSTANTIATE_CLASS=無法實例化類別:「{0}」。 +com.sun.faces.CANT_INTROSPECT_CLASS=無法內視類別:「{0}」 +com.sun.faces.CANT_PARSE_FILE=無法剖析檔案「{0}」:行 {1} 欄 {2} 發生錯誤: {3}。 +com.sun.faces.CHILD_NOT_OF_EXPECTED_TYPE=對於元件類型「{1}({2})」,預期的子元件類型為「{0}」。但是卻找到「{3}」。 +com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=:此連結已停用,因為它未嵌套在 Faces 表單內。 +com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=檢視內找到一或多個 UICommand 實例未嵌套在 UIForm 內。將不會呼叫與這些指令相關聯的動作。 +com.sun.faces.COMPONENT_NOT_FOUND_ERROR=未找到識別碼「{0}」的元件。 +com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=在檢視中找不到 ID 為「{0}」的元件。 +com.sun.faces.CONTENT_TYPE_ERROR=無法辨識的內容類型。 +com.sun.faces.CONFIG_RENDERER_REGISTRATION_MISSING_RENDERKIT=無法使用 ID {0} 註冊具有 RenderKit 的編譯器。RenderKit 不存在。 +com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=在檢視中已找到元件 ID「{0}」。 +com.sun.faces.EMPTY_PARAMETER=參數是空的 +com.sun.faces.ENCODING_ERROR=無法辨識的字元編碼。 +com.sun.faces.ERROR_GETTING_VALUE_BINDING=無法取得值「{0}」的 ValueBinding。 +com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=無法從連結表示式「{0}」取得值。 +com.sun.faces.ERROR_OPENING_FILE=無法開啟配置檔案:「{0}」。 +com.sun.faces.ERROR_PROCESSING_CONFIG=配置處理期間發生未預期的錯誤。 +com.sun.faces.ERROR_REGISTERING_DTD=無法註冊 DTD:「{0}」。 +com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=無法設定受管 Bean 特性:「{0}」。 +com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=屬性「{0}」表示式的計算得到未預期的類型。預期為 {1},但收到 {2}。 +com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=建構錯誤:一或多個輸入參數可能為空值。 +com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=無法確定 Servlet 路徑「{0}」的 FaceServlet 對映。 +com.sun.faces.FACES_SERVLET_MAPPING_INCORRECT=FacesServlet 不能有「/*」url-pattern。請定義不同的 url-pattern。 +com.sun.faces.FACES_CONTEXT_NOT_FOUND=無 FacesContext 可用於處理此請求。很可能是由於將請求傳送至錯誤的路徑。 +com.sun.faces.FILE_NOT_FOUND=找不到檔案:「{0}」。 +com.sun.faces.ILLEGAL_ATTEMPT_SETTING_APPLICATION_ARTIFACT=產生回應後,設定 {0} 的嘗試非法。 +com.sun.faces.ILLEGAL_CHARACTERS_ERROR=不允許字元。 +com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=lValue 模式「{0}」中使用隱式物件識別碼非法 +com.sun.faces.ILLEGAL_MODEL_REFERENCE=在此環境中,表示式「{0}」的模型參照非法。 +com.sun.faces.ILLEGAL_VIEW_ID=非法檢視 ID「{0}」。ID 必須以「/」開頭 +com.sun.faces.INVALID_EXPRESSION=無效的表示式:「{0}」。 +com.sun.faces.INVALID_INIT_PARAM=初始化參數「{1}」的值「{0}」無效。可接受的值為「true」或「false」。預設為「false」。 +com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=配置中定義的訊息嚴重性「{0}」無效。 +com.sun.faces.INVALID_SCOPE_LIFESPAN=表示式「{0}」參照的物件範圍「{1}」比參照「{3}」的受管 Bean (「{2}」) 範圍短。 +com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=已增加 ID「{0}」的 LifecycleId。 +com.sun.faces.LIFECYCLE_ID_NOT_FOUND=找不到 ID「{0}」的 LifecycleId。 +com.sun.faces.MAXIMUM_EVENTS_REACHED=已達事件的最大數目「{0}」。 +com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=無法在受管 Bean「{1}」中設定目標特性「{0}」。此特性必須接受清單或陣列實例。 +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=受管 Bean「{1}」中的特性「{0}」定義為對映特性,但類別中的 setter 不接受對映實例。 +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=受管 Bean「{1}」中的特性「{0}」定義為對映特性,但類別中的 getter 不會傳回對映實例。 +com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=受管 Bean「{1}」中的特性「{0}」定義為清單特性,但類別中的 setter 不接受清單或陣列實例。 +com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=受管 Bean「{1}」中的特性「{0}」定義為清單特性,但類別中的 getter 不會傳回清單或陣列實例。 +com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=受管 Bean「{1}」中的特性「{0}」定義為清單特性。getter 會傳回陣列類型,但沒有相關聯的 setter。 +com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=無法在受管 Bean「{1}」中設定目標特性「{0}」。目標特性傳回的現有值不是清單的實例。 +com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=受管 Bean「{0}」的配置不正確。受管 Bean 配置為清單,但也嘗試定義對映項目或受管特性。 +com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=受管 Bean「{0}」的配置不正確。受管 Bean 配置為對映,但也嘗試定義受管特性。 +com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=受管 Bean「{0}」的配置不正確。受管 Bean 含有具有清單項目的受管特性「{1}」,但非法定義了值和/或對映項目。 +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=受管 Bean「{0}」的配置不正確。受管 Bean 含有具有對映項目的受管特性「{1}」,但也非法定義了值。 +com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=受管 Bean「{0}」的配置不正確。受管 Bean 含有未包含清單或對映項目或任何值元素的受管特性「{1}」。 +com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=針對受管 Bean「{3}」,將類型「{1}」的值「{0}」轉換為類型「{2}」時發生錯誤。 +com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=找不到受管 Bean「{1}」的 Bean 或特性類別「{0}」。 +com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=無法載入受管 Bean「{1}」的 Bean 或特性類別「{0}」,原因是缺少相依性: {2}。 +com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=受管 Bean「{1}」的受管 Bean 類別「{0}」未宣告為公用。 +com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=受管 Bean「{1}」的受管 Bean 類別「{0}」宣告為抽象或介面。 +com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=受管 Bean「{1}」的受管 Bean 類別「{0}」未宣告公用無引數建構子。 +com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=在受管 Bean「{0}」上執行資源引入時發生錯誤。 +com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=受管 Bean「{1}」的特性「{0}」使用特性類別「{2}」定義,但此類別無法指定給特性。 +com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=無法內視受管 Bean「{0}」 +com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=受管 Bean「{1}」的特性「{0}」不存在。 +com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=受管 Bean「{1}」的特性「{0}」沒有 setter。 +com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=受管 Bean「{1}」的特性「{0}」接受超過一個引數。 +com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=無法設定受管 Bean「{1}」的特性「{0}」。 +com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=無法建立受管 Bean「{0}」。找到下列問題: +com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=Faces 收到請求時將無法建立受管 Bean「{0}」。找到下列問題: +com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=處理受管 Bean「{0}」時發生未預期的錯誤 +com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=處理受管特性「{0}」時發生未預期的錯誤 +com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=範圍「{0}」不是「view」「request」「session」、「application」其中之一,也不是代表 ValueExpression (#{...}) +com.sun.faces.MISSING_CLASS_ERROR=缺少類別:無法載入類別「{0}」。 +com.sun.faces.MISSING_RESOURCE_ERROR=缺少資源:無法取得 ResourceBundle。 +com.sun.faces.MODELUPDATE_ERROR=模型更新失敗,因為模型「{1}」中存在值「{0}」。 +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=無法從檢視 ID「{0}」中為結果「{1}」找到相符的瀏覽條件 +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=無法從檢視 ID「{0}」中為具有結果「{2}」的動作「{1}」找到相符的瀏覽條件 +com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=結果「{0}」中的查詢字串無效 +com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=表示式錯誤:找不到已命名的物件:「{0}」。 +com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=處理程式類別為「{0}」標記發生「未嵌套於 UIComponentTag 中」的錯誤。 +com.sun.faces.NOT_NESTED_IN_TYPE_TAG_ERROR={0} 標記應該嵌套在與 {1} 類型元件相關聯的標記中。 +com.sun.faces.NO_DTD_FOUND_ERROR=在路徑「{1}」中找不到具有 PUBLIC ID「{0}」的 DTD。 +com.sun.faces.NULL_BODY_CONTENT_ERROR=對於具有處理器類別:「{0}」的標記,BodyContent 為空值。 +com.sun.faces.NULL_COMPONENT_ERROR=建構錯誤:元件引數為空值。 +com.sun.faces.NULL_CONFIGURATION=未載入應用程式的配置。 +com.sun.faces.NULL_CONTEXT_ERROR=引數錯誤:環境引數為空值。 +com.sun.faces.NULL_EVENT_ERROR=引數錯誤:事件引數為空值。 +com.sun.faces.NULL_FORVALUE=找不到元件「{0}」 +com.sun.faces.NULL_HANDLER_ERROR=引數錯誤:處理器引數為空值。 +com.sun.faces.NULL_LOCALE_ERROR=引數錯誤:語言環境引數為空值。 +com.sun.faces.NULL_MESSAGE_ERROR=引數錯誤:訊息參數不能為空值 +com.sun.faces.NULL_PARAMETERS_ERROR=引數錯誤:參數「{0}」為空值 +com.sun.faces.NULL_REQUEST_VIEW_ERROR=引數錯誤:請求檢視引數為空值。 +com.sun.faces.NULL_RESPONSE_STREAM_ERROR=引數錯誤:ResponseStream 引數為空值。 +com.sun.faces.NULL_RESPONSE_VIEW_ERROR=引數錯誤:ResponseView 引數為空值。 +com.sun.faces.NULL_RESPONSE_WRITER_ERROR=引數錯誤:ResponseWriter 引數為空值。 com.sun.faces.NULL_VIEW_ID=Argument Error: view id argument is null. -com.sun.faces.OBJECT_CREATION_ERROR=\u7121\u6cd5\u5efa\u7acb\u4e00\u6216\u591a\u500b\u914d\u7f6e\u7684\u61c9\u7528\u7a0b\u5f0f\u7269\u4ef6\u3002\u8a73\u7d30\u8cc7\u8a0a\u8acb\u67e5\u770b Web \u61c9\u7528\u7a0b\u5f0f\u8a18\u9304\u6a94\u3002 -com.sun.faces.OPTION_NOT_SELECT_ITEM=\u5f15\u6578\u932f\u8aa4\uff1a\u5143\u4ef6\u300c{0}\u300d\u7684\u9078\u9805\u4e0d\u662f jakarta.faces.model.SelectItem \u7684\u5be6\u4f8b\u3002\u627e\u5230\u985e\u578b\uff1a\u300c{1}\u300d\u3002 -com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=\uff1a\u6b64\u6309\u9215\u505c\u7528\uff0c\u539f\u56e0\u662f\u700f\u89bd\u689d\u4ef6\u4e0d\u7b26\u3002 -com.sun.faces.OUTCOME_TARGET_LINK_NO_MATCH=\uff1a\u6b64\u9023\u7d50\u505c\u7528\uff0c\u539f\u56e0\u662f\u700f\u89bd\u689d\u4ef6\u4e0d\u7b26\u3002 -com.sun.faces.PHASE_ID_OUT_OF_BOUNDS= PhaseId \u8d85\u51fa ID\u300c{0}\u300d\u7684\u754c\u9650\u3002 -com.sun.faces.RENDERER_NOT_FOUND=\u627e\u4e0d\u5230\u7de8\u8b6f\u5668\u985e\u578b\u70ba\u300c{0}\u300d\u7684\u7de8\u8b6f\u5668\u3002 -com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=\u72c0\u614b\u932f\u8aa4\uff1a\u6b64\u8acb\u6c42\u5df2\u8a2d\u5b9a RequestView\u3002 -com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=\u8cc7\u6e90\u683c\u5f0f\u7121\u6548\u3002\u7121\u6cd5\u5256\u6790\u7279\u6027\u300c{0}\u300d\u3002 -com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=\u8cc7\u6e90\u683c\u5f0f\u7121\u6548\u3002\u7279\u6027\u300c{0}\u300d\u542b\u6709\u8d85\u904e\u4e00\u500b\u5192\u865f (:)\u3002 -com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=\u8cc7\u6e90\u683c\u5f0f\u7121\u6548\u3002\u7121\u6cd5\u5256\u6790\u7279\u6027\u300c{0}\u300d\u4f86\u64f7\u53d6\u8cc7\u6e90\u540d\u7a31\u548c\u7a0b\u5f0f\u5eab\u540d\u7a31\u3002 -com.sun.faces.SAVING_STATE_ERROR=\u5132\u5b58\u72c0\u614b\u6642\u767c\u751f\u932f\u8aa4\u3002 -com.sun.faces.SUPPORTS_COMPONENT_ERROR=\u5f15\u6578\u932f\u8aa4\uff1a\u6b64\u7de8\u8b6f\u5668\u4e0d\u652f\u63f4\u300c{0}\u300d\u3002 -com.sun.faces.TYPECONVERSION_ERROR=\u8a2d\u5b9a\u300c{1}\u300d\u7684\u503c\u300c{0}\u300d\u6642\u767c\u751f\u8f49\u63db\u932f\u8aa4\u3002 -com.sun.faces.VALIDATION_COMMAND_ERROR=\u9a57\u8b49\u932f\u8aa4\u3002\u300c{0}\u300d\u5fc5\u9808\u5177\u6709\u503c\u6216\u5f71\u50cf\u5c6c\u6027\u3002 -com.sun.faces.VALIDATION_EL_ERROR=\u9a57\u8b49\u932f\u8aa4\u3002\u8868\u793a\u5f0f\u5c0d\u65bc\u300c{0}\u300d\u7121\u6548 -com.sun.faces.VALIDATION_ID_ERROR=\u9a57\u8b49\u932f\u8aa4\u3002\u4e0b\u5217 Faces \u6a19\u8a18\u5fc5\u9808\u542b\u6709 ID:\u300c{0}\u300d -com.sun.faces.CANNOT_CONVERT=\u7121\u6cd5\u4f7f\u7528 converterId\u300c{0}\u300d\u6216 binding\u300c{1}\u300d\u89e3\u6790\u8f49\u63db\u5668\u5be6\u4f8b\u3002 -com.sun.faces.CANNOT_VALIDATE=\u7121\u6cd5\u4f7f\u7528 validatorId\u300c{0}\u300d\u6216 binding\u300c{1}\u300d\u89e3\u6790\u9a57\u8b49\u5668\u5be6\u4f8b\u3002 -com.sun.faces.verifier.CLASS_NOT_FOUND=[{0}:{1}] \u985e\u5225\u4e0d\u5b58\u5728 -com.sun.faces.verifier.CLASS_MISSING_DEP=[{0}:{1}] \u7121\u6cd5\u8f09\u5165\u985e\u5225\uff0c\u539f\u56e0\u662f\u7f3a\u5c11\u76f8\u4f9d\u6027 -> {2} -com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=[{0}:{1}] \u985e\u5225\u542b\u6709\u7121\u5f15\u6578\u5efa\u69cb\u5b50\uff0c\u4f46\u5b83\u4e0d\u662f\u516c\u7528\u7684 -com.sun.faces.verifier.NO_DEF_CTOR=[{0}:{1}] \u985e\u5225\u542b\u6709\u7121\u516c\u7528\u3001\u7121\u5f15\u6578\u5efa\u69cb\u5b50 -com.sun.faces.verifier.WRONG_TYPE=[{0}:{1}] \u985e\u5225\u672a\u5be6\u4f5c\u6216\u5ef6\u4f38 {2} +com.sun.faces.OBJECT_CREATION_ERROR=無法建立一或多個配置的應用程式物件。詳細資訊請查看 Web 應用程式記錄檔。 +com.sun.faces.OPTION_NOT_SELECT_ITEM=引數錯誤:元件「{0}」的選項不是 jakarta.faces.model.SelectItem 的實例。找到類型:「{1}」。 +com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=:此按鈕停用,原因是瀏覽條件不符。 +com.sun.faces.OUTCOME_TARGET_LINK_NO_MATCH=:此連結停用,原因是瀏覽條件不符。 +com.sun.faces.PHASE_ID_OUT_OF_BOUNDS= PhaseId 超出 ID「{0}」的界限。 +com.sun.faces.RENDERER_NOT_FOUND=找不到編譯器類型為「{0}」的編譯器。 +com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=狀態錯誤:此請求已設定 RequestView。 +com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=資源格式無效。無法剖析特性「{0}」。 +com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=資源格式無效。特性「{0}」含有超過一個冒號 (:)。 +com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=資源格式無效。無法剖析特性「{0}」來擷取資源名稱和程式庫名稱。 +com.sun.faces.SAVING_STATE_ERROR=儲存狀態時發生錯誤。 +com.sun.faces.SUPPORTS_COMPONENT_ERROR=引數錯誤:此編譯器不支援「{0}」。 +com.sun.faces.TYPECONVERSION_ERROR=設定「{1}」的值「{0}」時發生轉換錯誤。 +com.sun.faces.VALIDATION_COMMAND_ERROR=驗證錯誤。「{0}」必須具有值或影像屬性。 +com.sun.faces.VALIDATION_EL_ERROR=驗證錯誤。表示式對於「{0}」無效 +com.sun.faces.VALIDATION_ID_ERROR=驗證錯誤。下列 Faces 標記必須含有 ID:「{0}」 +com.sun.faces.CANNOT_CONVERT=無法使用 converterId「{0}」或 binding「{1}」解析轉換器實例。 +com.sun.faces.CANNOT_VALIDATE=無法使用 validatorId「{0}」或 binding「{1}」解析驗證器實例。 +com.sun.faces.verifier.CLASS_NOT_FOUND=[{0}:{1}] 類別不存在 +com.sun.faces.verifier.CLASS_MISSING_DEP=[{0}:{1}] 無法載入類別,原因是缺少相依性 -> {2} +com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=[{0}:{1}] 類別含有無引數建構子,但它不是公用的 +com.sun.faces.verifier.NO_DEF_CTOR=[{0}:{1}] 類別含有無公用、無引數建構子 +com.sun.faces.verifier.WRONG_TYPE=[{0}:{1}] 類別未實作或延伸 {2} -com.sun.faces.CYCLIC_REFERENCE_ERROR=\u53d7\u7ba1 Bean\u300c{0}\u300d\u542b\u6709\u5faa\u74b0\u53c3\u7167\u3002\u8a08\u7b97\u8def\u5f91:\u300c{1}\u300d\u3002 -com.sun.faces.OBJECT_IS_READONLY={0} \u7269\u4ef6\u70ba\u552f\u8b80 -com.sun.faces.INCORRECT_JSP_VERSION=\u5bb9\u5668\u7684 JSP \u7248\u672c\u4f3c\u4e4e\u6bd4 2.1 \u7248\u66f4\u820a\uff0c\u56e0\u6b64\u627e\u4e0d\u5230 EL RI \u8868\u793a\u5f0f\u5de5\u5ee0\u300c{0}\u300d\u3002\u5982\u679c\u672a\u4f7f\u7528 JSP \u6216 EL RI\uff0c\u8acb\u78ba\u5b9a\u74b0\u5883\u521d\u59cb\u5316\u53c3\u6578\u300c{1}\u300d\u6b63\u78ba\u8a2d\u5b9a\u3002 +com.sun.faces.CYCLIC_REFERENCE_ERROR=受管 Bean「{0}」含有循環參照。計算路徑:「{1}」。 +com.sun.faces.OBJECT_IS_READONLY={0} 物件為唯讀 +com.sun.faces.INCORRECT_JSP_VERSION=容器的 JSP 版本似乎比 2.1 版更舊,因此找不到 EL RI 表示式工廠「{0}」。如果未使用 JSP 或 EL RI,請確定環境初始化參數「{1}」正確設定。 #com.sun.faces.el.PropertyResolverImpl -com.sun.faces.OUT_OF_BOUNDS_ERROR=\u7d22\u5f15 {1} \u8d85\u51fa {0} \u7684\u754c\u9650 -com.sun.faces.PROPERTY_TYPE_ERROR={0} \u4e0d\u662f\u9663\u5217\u6216\u6e05\u55ae\u985e\u578b\u3002 -com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=\u7d22\u5f15 {1} \u7684\u9577\u5ea6\u70ba {2}\uff0c\u8d85\u51fa {0} \u7684\u754c\u9650 -com.sun.faces.RESTORE_VIEW_ERROR=\u6aa2\u8996\u300c{0}\u300d\u7121\u6cd5\u5fa9\u539f\u3002 +com.sun.faces.OUT_OF_BOUNDS_ERROR=索引 {1} 超出 {0} 的界限 +com.sun.faces.PROPERTY_TYPE_ERROR={0} 不是陣列或清單類型。 +com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=索引 {1} 的長度為 {2},超出 {0} 的界限 +com.sun.faces.RESTORE_VIEW_ERROR=檢視「{0}」無法復原。 -com.sun.faces.CANT_WRITE_ID_ATTRIBUTE=\u7121\u6cd5\u5beb\u5165 ID \u5c6c\u6027:\u300c{0}\u300d\u3002 -com.sun.faces.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR=\u672a\u5d4c\u5957\u5728 UIComponentTag \u4e2d\u3002 -com.sun.faces.NO_COMPONENT_ASSOCIATED_WITH_UICOMPONENT_TAG=\u6c92\u6709\u8207 UIComponentTag \u76f8\u95dc\u806f\u7684\u5143\u4ef6\u3002 +com.sun.faces.CANT_WRITE_ID_ATTRIBUTE=無法寫入 ID 屬性:「{0}」。 +com.sun.faces.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR=未嵌套在 UIComponentTag 中。 +com.sun.faces.NO_COMPONENT_ASSOCIATED_WITH_UICOMPONENT_TAG=沒有與 UIComponentTag 相關聯的元件。 -com.sun.faces.JS_RESOURCE_WRITING_ERROR=\u7121\u6cd5\u5c07 JavaScript \u6a94\u6848\u5beb\u5165\u7528\u6236\u7aef\u3002 +com.sun.faces.JS_RESOURCE_WRITING_ERROR=無法將 JavaScript 檔案寫入用戶端。 -com.sun.faces.RESOURCE_TARGET_NOT_AVAILABLE=\u4e00\u6216\u591a\u500b\u8cc7\u6e90\u5177\u6709\u76ee\u6a19\u300c{0}\u300d\uff0c\u4f46\u6aa2\u8996\u5167\u672a\u5b9a\u7fa9\u4efb\u4f55\u300c{0}\u300d\u5143\u4ef6\u3002 +com.sun.faces.RESOURCE_TARGET_NOT_AVAILABLE=一或多個資源具有目標「{0}」,但檢視內未定義任何「{0}」元件。 com.sun.faces.ARGUMENTS_NOT_LEGAL_WITH_CC_ATTRS_EXPR=Illegal attempt to pass arguments to a composite component lookup expression (i.e. cc.attrs.[identifier]). com.sun.faces.partial.statesaving.ERROR_RESTORING_STATE_FOR_COMPONENT=Unexpected error restoring state for component with id ''{0}''. Cause: {1}. com.sun.faces.MISSING_COMPONENT_ATTRIBUTE_VALUE=The following attribute(s) are required, but no values have been supplied for them: ''{0}''. diff --git a/impl/src/main/resources/com/sun/faces/resources/Messages_zh_TW.properties b/impl/src/main/resources/com/sun/faces/resources/Messages_zh_TW.properties index fb19ad2925..a068d42ac4 100644 --- a/impl/src/main/resources/com/sun/faces/resources/Messages_zh_TW.properties +++ b/impl/src/main/resources/com/sun/faces/resources/Messages_zh_TW.properties @@ -14,147 +14,147 @@ # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 # -com.sun.faces.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK=\u672a\u5728\u547c\u53eb ConfigureListener.contextInitialized() \u7684\u76f8\u540c\u547c\u53eb\u5806\u758a\u4e2d\u547c\u53eb ApplicationAssociate ctor\u3002 -com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=\u5c0d\u65bc\u6b64 Web \u61c9\u7528\u7a0b\u5f0f\uff0cApplicationAssociate \u5df2\u7d93\u5b58\u5728\u3002 -com.sun.faces.ASSERTION_FAILED=\u6307\u5b9a\u5931\u6557 -com.sun.faces.ATTRIBUTE_NOT_SUPORTED=\u5143\u4ef6\u985e\u578b\u300c{1}\u300d\u4e0d\u652f\u63f4\u5c6c\u6027\u300c{0}\u300d\u3002 -com.sun.faces.CANT_CONVERT_VALUE=\u7121\u6cd5\u5c07\u7279\u6027\u300c{0}\u300d\u8f49\u63db\u70ba\u503c\u985e\u578b\u300c{1}\u300d\u3002 -com.sun.faces.CANT_CLOSE_INPUT_STREAM=\u7121\u6cd5\u95dc\u9589\u8f38\u5165\u4e32\u6d41\u3002 -com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=\u7121\u6cd5\u5efa\u7acb ID\u300c{0}\u300d\u7684\u751f\u547d\u9031\u671f\u3002 -com.sun.faces.CANT_INSTANTIATE_CLASS=\u7121\u6cd5\u5be6\u4f8b\u5316\u985e\u5225:\u300c{0}\u300d\u3002 -com.sun.faces.CANT_INTROSPECT_CLASS=\u7121\u6cd5\u5167\u8996\u985e\u5225:\u300c{0}\u300d -com.sun.faces.CANT_PARSE_FILE=\u7121\u6cd5\u5256\u6790\u6a94\u6848\u300c{0}\u300d\uff1a\u884c {1} \u6b04 {2} \u767c\u751f\u932f\u8aa4: {3}\u3002 -com.sun.faces.CHILD_NOT_OF_EXPECTED_TYPE=\u5c0d\u65bc\u5143\u4ef6\u985e\u578b\u300c{1}({2})\u300d\uff0c\u9810\u671f\u7684\u5b50\u5143\u4ef6\u985e\u578b\u70ba\u300c{0}\u300d\u3002\u4f46\u662f\u537b\u627e\u5230\u300c{3}\u300d\u3002 -com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=\uff1a\u6b64\u9023\u7d50\u5df2\u505c\u7528\uff0c\u56e0\u70ba\u5b83\u672a\u5d4c\u5957\u5728 Faces \u8868\u55ae\u5167\u3002 -com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=\u6aa2\u8996\u5167\u627e\u5230\u4e00\u6216\u591a\u500b UICommand \u5be6\u4f8b\u672a\u5d4c\u5957\u5728 UIForm \u5167\u3002\u5c07\u4e0d\u6703\u547c\u53eb\u8207\u9019\u4e9b\u6307\u4ee4\u76f8\u95dc\u806f\u7684\u52d5\u4f5c\u3002 -com.sun.faces.COMPONENT_NOT_FOUND_ERROR=\u672a\u627e\u5230\u8b58\u5225\u78bc\u300c{0}\u300d\u7684\u5143\u4ef6\u3002 -com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=\u5728\u6aa2\u8996\u4e2d\u627e\u4e0d\u5230 ID \u70ba\u300c{0}\u300d\u7684\u5143\u4ef6\u3002 -com.sun.faces.CONTENT_TYPE_ERROR=\u7121\u6cd5\u8fa8\u8b58\u7684\u5167\u5bb9\u985e\u578b\u3002 -com.sun.faces.CONFIG_RENDERER_REGISTRATION_MISSING_RENDERKIT=\u7121\u6cd5\u4f7f\u7528 ID {0} \u8a3b\u518a\u5177\u6709 RenderKit \u7684\u7de8\u8b6f\u5668\u3002RenderKit \u4e0d\u5b58\u5728\u3002 -com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=\u5728\u6aa2\u8996\u4e2d\u5df2\u627e\u5230\u5143\u4ef6 ID\u300c{0}\u300d\u3002 -com.sun.faces.EMPTY_PARAMETER=\u53c3\u6578\u662f\u7a7a\u7684 -com.sun.faces.ENCODING_ERROR=\u7121\u6cd5\u8fa8\u8b58\u7684\u5b57\u5143\u7de8\u78bc\u3002 -com.sun.faces.ERROR_GETTING_VALUE_BINDING=\u7121\u6cd5\u53d6\u5f97\u503c\u300c{0}\u300d\u7684 ValueBinding\u3002 -com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=\u7121\u6cd5\u5f9e\u9023\u7d50\u8868\u793a\u5f0f\u300c{0}\u300d\u53d6\u5f97\u503c\u3002 -com.sun.faces.ERROR_OPENING_FILE=\u7121\u6cd5\u958b\u555f\u914d\u7f6e\u6a94\u6848:\u300c{0}\u300d\u3002 -com.sun.faces.ERROR_PROCESSING_CONFIG=\u914d\u7f6e\u8655\u7406\u671f\u9593\u767c\u751f\u672a\u9810\u671f\u7684\u932f\u8aa4\u3002 -com.sun.faces.ERROR_REGISTERING_DTD=\u7121\u6cd5\u8a3b\u518a DTD:\u300c{0}\u300d\u3002 -com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=\u7121\u6cd5\u8a2d\u5b9a\u53d7\u7ba1 Bean \u7279\u6027:\u300c{0}\u300d\u3002 -com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=\u5c6c\u6027\u300c{0}\u300d\u8868\u793a\u5f0f\u7684\u8a08\u7b97\u5f97\u5230\u672a\u9810\u671f\u7684\u985e\u578b\u3002\u9810\u671f\u70ba {1}\uff0c\u4f46\u6536\u5230 {2}\u3002 -com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=\u5efa\u69cb\u932f\u8aa4\uff1a\u4e00\u6216\u591a\u500b\u8f38\u5165\u53c3\u6578\u53ef\u80fd\u70ba\u7a7a\u503c\u3002 -com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=\u7121\u6cd5\u78ba\u5b9a Servlet \u8def\u5f91\u300c{0}\u300d\u7684 FaceServlet \u5c0d\u6620\u3002 -com.sun.faces.FACES_SERVLET_MAPPING_INCORRECT=FacesServlet \u4e0d\u80fd\u6709\u300c/*\u300durl-pattern\u3002\u8acb\u5b9a\u7fa9\u4e0d\u540c\u7684 url-pattern\u3002 -com.sun.faces.FACES_CONTEXT_NOT_FOUND=\u7121 FacesContext \u53ef\u7528\u65bc\u8655\u7406\u6b64\u8acb\u6c42\u3002\u5f88\u53ef\u80fd\u662f\u7531\u65bc\u5c07\u8acb\u6c42\u50b3\u9001\u81f3\u932f\u8aa4\u7684\u8def\u5f91\u3002 -com.sun.faces.FILE_NOT_FOUND=\u627e\u4e0d\u5230\u6a94\u6848:\u300c{0}\u300d\u3002 -com.sun.faces.ILLEGAL_ATTEMPT_SETTING_APPLICATION_ARTIFACT=\u7522\u751f\u56de\u61c9\u5f8c\uff0c\u8a2d\u5b9a {0} \u7684\u5617\u8a66\u975e\u6cd5\u3002 -com.sun.faces.ILLEGAL_CHARACTERS_ERROR=\u4e0d\u5141\u8a31\u5b57\u5143\u3002 -com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=lValue \u6a21\u5f0f\u300c{0}\u300d\u4e2d\u4f7f\u7528\u96b1\u5f0f\u7269\u4ef6\u8b58\u5225\u78bc\u975e\u6cd5 -com.sun.faces.ILLEGAL_MODEL_REFERENCE=\u5728\u6b64\u74b0\u5883\u4e2d\uff0c\u8868\u793a\u5f0f\u300c{0}\u300d\u7684\u6a21\u578b\u53c3\u7167\u975e\u6cd5\u3002 -com.sun.faces.ILLEGAL_VIEW_ID=\u975e\u6cd5\u6aa2\u8996 ID\u300c{0}\u300d\u3002ID \u5fc5\u9808\u4ee5\u300c/\u300d\u958b\u982d -com.sun.faces.INVALID_EXPRESSION=\u7121\u6548\u7684\u8868\u793a\u5f0f:\u300c{0}\u300d\u3002 -com.sun.faces.INVALID_INIT_PARAM=\u521d\u59cb\u5316\u53c3\u6578\u300c{1}\u300d\u7684\u503c\u300c{0}\u300d\u7121\u6548\u3002\u53ef\u63a5\u53d7\u7684\u503c\u70ba\u300ctrue\u300d\u6216\u300cfalse\u300d\u3002\u9810\u8a2d\u70ba\u300cfalse\u300d\u3002 -com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=\u914d\u7f6e\u4e2d\u5b9a\u7fa9\u7684\u8a0a\u606f\u56b4\u91cd\u6027\u300c{0}\u300d\u7121\u6548\u3002 -com.sun.faces.INVALID_SCOPE_LIFESPAN=\u8868\u793a\u5f0f\u300c{0}\u300d\u53c3\u7167\u7684\u7269\u4ef6\u7bc4\u570d\u300c{1}\u300d\u6bd4\u53c3\u7167\u300c{3}\u300d\u7684\u53d7\u7ba1 Bean (\u300c{2}\u300d) \u7bc4\u570d\u77ed\u3002 -com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=\u5df2\u589e\u52a0 ID\u300c{0}\u300d\u7684 LifecycleId\u3002 -com.sun.faces.LIFECYCLE_ID_NOT_FOUND=\u627e\u4e0d\u5230 ID\u300c{0}\u300d\u7684 LifecycleId\u3002 -com.sun.faces.MAXIMUM_EVENTS_REACHED=\u5df2\u9054\u4e8b\u4ef6\u7684\u6700\u5927\u6578\u76ee\u300c{0}\u300d\u3002 -com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=\u7121\u6cd5\u5728\u53d7\u7ba1 Bean\u300c{1}\u300d\u4e2d\u8a2d\u5b9a\u76ee\u6a19\u7279\u6027\u300c{0}\u300d\u3002\u6b64\u7279\u6027\u5fc5\u9808\u63a5\u53d7\u6e05\u55ae\u6216\u9663\u5217\u5be6\u4f8b\u3002 -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u4e2d\u7684\u7279\u6027\u300c{0}\u300d\u5b9a\u7fa9\u70ba\u5c0d\u6620\u7279\u6027\uff0c\u4f46\u985e\u5225\u4e2d\u7684 setter \u4e0d\u63a5\u53d7\u5c0d\u6620\u5be6\u4f8b\u3002 -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u4e2d\u7684\u7279\u6027\u300c{0}\u300d\u5b9a\u7fa9\u70ba\u5c0d\u6620\u7279\u6027\uff0c\u4f46\u985e\u5225\u4e2d\u7684 getter \u4e0d\u6703\u50b3\u56de\u5c0d\u6620\u5be6\u4f8b\u3002 -com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u4e2d\u7684\u7279\u6027\u300c{0}\u300d\u5b9a\u7fa9\u70ba\u6e05\u55ae\u7279\u6027\uff0c\u4f46\u985e\u5225\u4e2d\u7684 setter \u4e0d\u63a5\u53d7\u6e05\u55ae\u6216\u9663\u5217\u5be6\u4f8b\u3002 -com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u4e2d\u7684\u7279\u6027\u300c{0}\u300d\u5b9a\u7fa9\u70ba\u6e05\u55ae\u7279\u6027\uff0c\u4f46\u985e\u5225\u4e2d\u7684 getter \u4e0d\u6703\u50b3\u56de\u6e05\u55ae\u6216\u9663\u5217\u5be6\u4f8b\u3002 -com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u4e2d\u7684\u7279\u6027\u300c{0}\u300d\u5b9a\u7fa9\u70ba\u6e05\u55ae\u7279\u6027\u3002getter \u6703\u50b3\u56de\u9663\u5217\u985e\u578b\uff0c\u4f46\u6c92\u6709\u76f8\u95dc\u806f\u7684 setter\u3002 -com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=\u7121\u6cd5\u5728\u53d7\u7ba1 Bean\u300c{1}\u300d\u4e2d\u8a2d\u5b9a\u76ee\u6a19\u7279\u6027\u300c{0}\u300d\u3002\u76ee\u6a19\u7279\u6027\u50b3\u56de\u7684\u73fe\u6709\u503c\u4e0d\u662f\u6e05\u55ae\u7684\u5be6\u4f8b\u3002 -com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=\u53d7\u7ba1 Bean\u300c{0}\u300d\u7684\u914d\u7f6e\u4e0d\u6b63\u78ba\u3002\u53d7\u7ba1 Bean \u914d\u7f6e\u70ba\u6e05\u55ae\uff0c\u4f46\u4e5f\u5617\u8a66\u5b9a\u7fa9\u5c0d\u6620\u9805\u76ee\u6216\u53d7\u7ba1\u7279\u6027\u3002 -com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=\u53d7\u7ba1 Bean\u300c{0}\u300d\u7684\u914d\u7f6e\u4e0d\u6b63\u78ba\u3002\u53d7\u7ba1 Bean \u914d\u7f6e\u70ba\u5c0d\u6620\uff0c\u4f46\u4e5f\u5617\u8a66\u5b9a\u7fa9\u53d7\u7ba1\u7279\u6027\u3002 -com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=\u53d7\u7ba1 Bean\u300c{0}\u300d\u7684\u914d\u7f6e\u4e0d\u6b63\u78ba\u3002\u53d7\u7ba1 Bean \u542b\u6709\u5177\u6709\u6e05\u55ae\u9805\u76ee\u7684\u53d7\u7ba1\u7279\u6027\u300c{1}\u300d\uff0c\u4f46\u975e\u6cd5\u5b9a\u7fa9\u4e86\u503c\u548c/\u6216\u5c0d\u6620\u9805\u76ee\u3002 -com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=\u53d7\u7ba1 Bean\u300c{0}\u300d\u7684\u914d\u7f6e\u4e0d\u6b63\u78ba\u3002\u53d7\u7ba1 Bean \u542b\u6709\u5177\u6709\u5c0d\u6620\u9805\u76ee\u7684\u53d7\u7ba1\u7279\u6027\u300c{1}\u300d\uff0c\u4f46\u4e5f\u975e\u6cd5\u5b9a\u7fa9\u4e86\u503c\u3002 -com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=\u53d7\u7ba1 Bean\u300c{0}\u300d\u7684\u914d\u7f6e\u4e0d\u6b63\u78ba\u3002\u53d7\u7ba1 Bean \u542b\u6709\u672a\u5305\u542b\u6e05\u55ae\u6216\u5c0d\u6620\u9805\u76ee\u6216\u4efb\u4f55\u503c\u5143\u7d20\u7684\u53d7\u7ba1\u7279\u6027\u300c{1}\u300d\u3002 -com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=\u91dd\u5c0d\u53d7\u7ba1 Bean\u300c{3}\u300d\uff0c\u5c07\u985e\u578b\u300c{1}\u300d\u7684\u503c\u300c{0}\u300d\u8f49\u63db\u70ba\u985e\u578b\u300c{2}\u300d\u6642\u767c\u751f\u932f\u8aa4\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=\u627e\u4e0d\u5230\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684 Bean \u6216\u7279\u6027\u985e\u5225\u300c{0}\u300d\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=\u7121\u6cd5\u8f09\u5165\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684 Bean \u6216\u7279\u6027\u985e\u5225\u300c{0}\u300d\uff0c\u539f\u56e0\u662f\u7f3a\u5c11\u76f8\u4f9d\u6027: {2}\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684\u53d7\u7ba1 Bean \u985e\u5225\u300c{0}\u300d\u672a\u5ba3\u544a\u70ba\u516c\u7528\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684\u53d7\u7ba1 Bean \u985e\u5225\u300c{0}\u300d\u5ba3\u544a\u70ba\u62bd\u8c61\u6216\u4ecb\u9762\u3002 -com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684\u53d7\u7ba1 Bean \u985e\u5225\u300c{0}\u300d\u672a\u5ba3\u544a\u516c\u7528\u7121\u5f15\u6578\u5efa\u69cb\u5b50\u3002 -com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=\u5728\u53d7\u7ba1 Bean\u300c{0}\u300d\u4e0a\u57f7\u884c\u8cc7\u6e90\u5f15\u5165\u6642\u767c\u751f\u932f\u8aa4\u3002 -com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684\u7279\u6027\u300c{0}\u300d\u4f7f\u7528\u7279\u6027\u985e\u5225\u300c{2}\u300d\u5b9a\u7fa9\uff0c\u4f46\u6b64\u985e\u5225\u7121\u6cd5\u6307\u5b9a\u7d66\u7279\u6027\u3002 -com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=\u7121\u6cd5\u5167\u8996\u53d7\u7ba1 Bean\u300c{0}\u300d -com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684\u7279\u6027\u300c{0}\u300d\u4e0d\u5b58\u5728\u3002 -com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684\u7279\u6027\u300c{0}\u300d\u6c92\u6709 setter\u3002 -com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684\u7279\u6027\u300c{0}\u300d\u63a5\u53d7\u8d85\u904e\u4e00\u500b\u5f15\u6578\u3002 -com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=\u7121\u6cd5\u8a2d\u5b9a\u53d7\u7ba1 Bean\u300c{1}\u300d\u7684\u7279\u6027\u300c{0}\u300d\u3002 -com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=\u7121\u6cd5\u5efa\u7acb\u53d7\u7ba1 Bean\u300c{0}\u300d\u3002\u627e\u5230\u4e0b\u5217\u554f\u984c\uff1a -com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=Faces \u6536\u5230\u8acb\u6c42\u6642\u5c07\u7121\u6cd5\u5efa\u7acb\u53d7\u7ba1 Bean\u300c{0}\u300d\u3002\u627e\u5230\u4e0b\u5217\u554f\u984c\uff1a -com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=\u8655\u7406\u53d7\u7ba1 Bean\u300c{0}\u300d\u6642\u767c\u751f\u672a\u9810\u671f\u7684\u932f\u8aa4 -com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=\u8655\u7406\u53d7\u7ba1\u7279\u6027\u300c{0}\u300d\u6642\u767c\u751f\u672a\u9810\u671f\u7684\u932f\u8aa4 -com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=\u7bc4\u570d\u300c{0}\u300d\u4e0d\u662f\u300cview\u300d\u300crequest\u300d\u300csession\u300d\u3001\u300capplication\u300d\u5176\u4e2d\u4e4b\u4e00\uff0c\u4e5f\u4e0d\u662f\u4ee3\u8868 ValueExpression (#{...}) -com.sun.faces.MISSING_CLASS_ERROR=\u7f3a\u5c11\u985e\u5225\uff1a\u7121\u6cd5\u8f09\u5165\u985e\u5225\u300c{0}\u300d\u3002 -com.sun.faces.MISSING_RESOURCE_ERROR=\u7f3a\u5c11\u8cc7\u6e90\uff1a\u7121\u6cd5\u53d6\u5f97 ResourceBundle\u3002 -com.sun.faces.MODELUPDATE_ERROR=\u6a21\u578b\u66f4\u65b0\u5931\u6557\uff0c\u56e0\u70ba\u6a21\u578b\u300c{1}\u300d\u4e2d\u5b58\u5728\u503c\u300c{0}\u300d\u3002 -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=\u7121\u6cd5\u5f9e\u6aa2\u8996 ID\u300c{0}\u300d\u4e2d\u70ba\u7d50\u679c\u300c{1}\u300d\u627e\u5230\u76f8\u7b26\u7684\u700f\u89bd\u689d\u4ef6 -com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=\u7121\u6cd5\u5f9e\u6aa2\u8996 ID\u300c{0}\u300d\u4e2d\u70ba\u5177\u6709\u7d50\u679c\u300c{2}\u300d\u7684\u52d5\u4f5c\u300c{1}\u300d\u627e\u5230\u76f8\u7b26\u7684\u700f\u89bd\u689d\u4ef6 -com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=\u7d50\u679c\u300c{0}\u300d\u4e2d\u7684\u67e5\u8a62\u5b57\u4e32\u7121\u6548 -com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=\u8868\u793a\u5f0f\u932f\u8aa4\uff1a\u627e\u4e0d\u5230\u5df2\u547d\u540d\u7684\u7269\u4ef6:\u300c{0}\u300d\u3002 -com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=\u8655\u7406\u7a0b\u5f0f\u985e\u5225\u70ba\u300c{0}\u300d\u6a19\u8a18\u767c\u751f\u300c\u672a\u5d4c\u5957\u65bc UIComponentTag \u4e2d\u300d\u7684\u932f\u8aa4\u3002 -com.sun.faces.NOT_NESTED_IN_TYPE_TAG_ERROR={0} \u6a19\u8a18\u61c9\u8a72\u5d4c\u5957\u5728\u8207 {1} \u985e\u578b\u5143\u4ef6\u76f8\u95dc\u806f\u7684\u6a19\u8a18\u4e2d\u3002 -com.sun.faces.NO_DTD_FOUND_ERROR=\u5728\u8def\u5f91\u300c{1}\u300d\u4e2d\u627e\u4e0d\u5230\u5177\u6709 PUBLIC ID\u300c{0}\u300d\u7684 DTD\u3002 -com.sun.faces.NULL_BODY_CONTENT_ERROR=\u5c0d\u65bc\u5177\u6709\u8655\u7406\u5668\u985e\u5225:\u300c{0}\u300d\u7684\u6a19\u8a18\uff0cBodyContent \u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_COMPONENT_ERROR=\u5efa\u69cb\u932f\u8aa4\uff1a\u5143\u4ef6\u5f15\u6578\u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_CONFIGURATION=\u672a\u8f09\u5165\u61c9\u7528\u7a0b\u5f0f\u7684\u914d\u7f6e\u3002 -com.sun.faces.NULL_CONTEXT_ERROR=\u5f15\u6578\u932f\u8aa4\uff1a\u74b0\u5883\u5f15\u6578\u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_EVENT_ERROR=\u5f15\u6578\u932f\u8aa4\uff1a\u4e8b\u4ef6\u5f15\u6578\u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_FORVALUE=\u627e\u4e0d\u5230\u5143\u4ef6\u300c{0}\u300d -com.sun.faces.NULL_HANDLER_ERROR=\u5f15\u6578\u932f\u8aa4\uff1a\u8655\u7406\u5668\u5f15\u6578\u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_LOCALE_ERROR=\u5f15\u6578\u932f\u8aa4\uff1a\u8a9e\u8a00\u74b0\u5883\u5f15\u6578\u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_MESSAGE_ERROR=\u5f15\u6578\u932f\u8aa4\uff1a\u8a0a\u606f\u53c3\u6578\u4e0d\u80fd\u70ba\u7a7a\u503c -com.sun.faces.NULL_PARAMETERS_ERROR=\u5f15\u6578\u932f\u8aa4\uff1a\u53c3\u6578\u300c{0}\u300d\u70ba\u7a7a\u503c -com.sun.faces.NULL_REQUEST_VIEW_ERROR=\u5f15\u6578\u932f\u8aa4\uff1a\u8acb\u6c42\u6aa2\u8996\u5f15\u6578\u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_RESPONSE_STREAM_ERROR=\u5f15\u6578\u932f\u8aa4\uff1aResponseStream \u5f15\u6578\u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_RESPONSE_VIEW_ERROR=\u5f15\u6578\u932f\u8aa4\uff1aResponseView \u5f15\u6578\u70ba\u7a7a\u503c\u3002 -com.sun.faces.NULL_RESPONSE_WRITER_ERROR=\u5f15\u6578\u932f\u8aa4\uff1aResponseWriter \u5f15\u6578\u70ba\u7a7a\u503c\u3002 +com.sun.faces.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK=未在呼叫 ConfigureListener.contextInitialized() 的相同呼叫堆疊中呼叫 ApplicationAssociate ctor。 +com.sun.faces.APPLICATION_ASSOCIATE_EXISTS=對於此 Web 應用程式,ApplicationAssociate 已經存在。 +com.sun.faces.ASSERTION_FAILED=指定失敗 +com.sun.faces.ATTRIBUTE_NOT_SUPORTED=元件類型「{1}」不支援屬性「{0}」。 +com.sun.faces.CANT_CONVERT_VALUE=無法將特性「{0}」轉換為值類型「{1}」。 +com.sun.faces.CANT_CLOSE_INPUT_STREAM=無法關閉輸入串流。 +com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=無法建立 ID「{0}」的生命週期。 +com.sun.faces.CANT_INSTANTIATE_CLASS=無法實例化類別:「{0}」。 +com.sun.faces.CANT_INTROSPECT_CLASS=無法內視類別:「{0}」 +com.sun.faces.CANT_PARSE_FILE=無法剖析檔案「{0}」:行 {1} 欄 {2} 發生錯誤: {3}。 +com.sun.faces.CHILD_NOT_OF_EXPECTED_TYPE=對於元件類型「{1}({2})」,預期的子元件類型為「{0}」。但是卻找到「{3}」。 +com.sun.faces.COMMAND_LINK_NO_FORM_MESSAGE=:此連結已停用,因為它未嵌套在 Faces 表單內。 +com.sun.faces.COMMAND_NOT_NESTED_WITHIN_FORM=檢視內找到一或多個 UICommand 實例未嵌套在 UIForm 內。將不會呼叫與這些指令相關聯的動作。 +com.sun.faces.COMPONENT_NOT_FOUND_ERROR=未找到識別碼「{0}」的元件。 +com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=在檢視中找不到 ID 為「{0}」的元件。 +com.sun.faces.CONTENT_TYPE_ERROR=無法辨識的內容類型。 +com.sun.faces.CONFIG_RENDERER_REGISTRATION_MISSING_RENDERKIT=無法使用 ID {0} 註冊具有 RenderKit 的編譯器。RenderKit 不存在。 +com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=在檢視中已找到元件 ID「{0}」。 +com.sun.faces.EMPTY_PARAMETER=參數是空的 +com.sun.faces.ENCODING_ERROR=無法辨識的字元編碼。 +com.sun.faces.ERROR_GETTING_VALUE_BINDING=無法取得值「{0}」的 ValueBinding。 +com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=無法從連結表示式「{0}」取得值。 +com.sun.faces.ERROR_OPENING_FILE=無法開啟配置檔案:「{0}」。 +com.sun.faces.ERROR_PROCESSING_CONFIG=配置處理期間發生未預期的錯誤。 +com.sun.faces.ERROR_REGISTERING_DTD=無法註冊 DTD:「{0}」。 +com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=無法設定受管 Bean 特性:「{0}」。 +com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=屬性「{0}」表示式的計算得到未預期的類型。預期為 {1},但收到 {2}。 +com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=建構錯誤:一或多個輸入參數可能為空值。 +com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=無法確定 Servlet 路徑「{0}」的 FaceServlet 對映。 +com.sun.faces.FACES_SERVLET_MAPPING_INCORRECT=FacesServlet 不能有「/*」url-pattern。請定義不同的 url-pattern。 +com.sun.faces.FACES_CONTEXT_NOT_FOUND=無 FacesContext 可用於處理此請求。很可能是由於將請求傳送至錯誤的路徑。 +com.sun.faces.FILE_NOT_FOUND=找不到檔案:「{0}」。 +com.sun.faces.ILLEGAL_ATTEMPT_SETTING_APPLICATION_ARTIFACT=產生回應後,設定 {0} 的嘗試非法。 +com.sun.faces.ILLEGAL_CHARACTERS_ERROR=不允許字元。 +com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=lValue 模式「{0}」中使用隱式物件識別碼非法 +com.sun.faces.ILLEGAL_MODEL_REFERENCE=在此環境中,表示式「{0}」的模型參照非法。 +com.sun.faces.ILLEGAL_VIEW_ID=非法檢視 ID「{0}」。ID 必須以「/」開頭 +com.sun.faces.INVALID_EXPRESSION=無效的表示式:「{0}」。 +com.sun.faces.INVALID_INIT_PARAM=初始化參數「{1}」的值「{0}」無效。可接受的值為「true」或「false」。預設為「false」。 +com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=配置中定義的訊息嚴重性「{0}」無效。 +com.sun.faces.INVALID_SCOPE_LIFESPAN=表示式「{0}」參照的物件範圍「{1}」比參照「{3}」的受管 Bean (「{2}」) 範圍短。 +com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=已增加 ID「{0}」的 LifecycleId。 +com.sun.faces.LIFECYCLE_ID_NOT_FOUND=找不到 ID「{0}」的 LifecycleId。 +com.sun.faces.MAXIMUM_EVENTS_REACHED=已達事件的最大數目「{0}」。 +com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=無法在受管 Bean「{1}」中設定目標特性「{0}」。此特性必須接受清單或陣列實例。 +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=受管 Bean「{1}」中的特性「{0}」定義為對映特性,但類別中的 setter 不接受對映實例。 +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=受管 Bean「{1}」中的特性「{0}」定義為對映特性,但類別中的 getter 不會傳回對映實例。 +com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=受管 Bean「{1}」中的特性「{0}」定義為清單特性,但類別中的 setter 不接受清單或陣列實例。 +com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=受管 Bean「{1}」中的特性「{0}」定義為清單特性,但類別中的 getter 不會傳回清單或陣列實例。 +com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=受管 Bean「{1}」中的特性「{0}」定義為清單特性。getter 會傳回陣列類型,但沒有相關聯的 setter。 +com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=無法在受管 Bean「{1}」中設定目標特性「{0}」。目標特性傳回的現有值不是清單的實例。 +com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=受管 Bean「{0}」的配置不正確。受管 Bean 配置為清單,但也嘗試定義對映項目或受管特性。 +com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=受管 Bean「{0}」的配置不正確。受管 Bean 配置為對映,但也嘗試定義受管特性。 +com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=受管 Bean「{0}」的配置不正確。受管 Bean 含有具有清單項目的受管特性「{1}」,但非法定義了值和/或對映項目。 +com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=受管 Bean「{0}」的配置不正確。受管 Bean 含有具有對映項目的受管特性「{1}」,但也非法定義了值。 +com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=受管 Bean「{0}」的配置不正確。受管 Bean 含有未包含清單或對映項目或任何值元素的受管特性「{1}」。 +com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=針對受管 Bean「{3}」,將類型「{1}」的值「{0}」轉換為類型「{2}」時發生錯誤。 +com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=找不到受管 Bean「{1}」的 Bean 或特性類別「{0}」。 +com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=無法載入受管 Bean「{1}」的 Bean 或特性類別「{0}」,原因是缺少相依性: {2}。 +com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=受管 Bean「{1}」的受管 Bean 類別「{0}」未宣告為公用。 +com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=受管 Bean「{1}」的受管 Bean 類別「{0}」宣告為抽象或介面。 +com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=受管 Bean「{1}」的受管 Bean 類別「{0}」未宣告公用無引數建構子。 +com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=在受管 Bean「{0}」上執行資源引入時發生錯誤。 +com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=受管 Bean「{1}」的特性「{0}」使用特性類別「{2}」定義,但此類別無法指定給特性。 +com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=無法內視受管 Bean「{0}」 +com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=受管 Bean「{1}」的特性「{0}」不存在。 +com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=受管 Bean「{1}」的特性「{0}」沒有 setter。 +com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=受管 Bean「{1}」的特性「{0}」接受超過一個引數。 +com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=無法設定受管 Bean「{1}」的特性「{0}」。 +com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=無法建立受管 Bean「{0}」。找到下列問題: +com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=Faces 收到請求時將無法建立受管 Bean「{0}」。找到下列問題: +com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=處理受管 Bean「{0}」時發生未預期的錯誤 +com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=處理受管特性「{0}」時發生未預期的錯誤 +com.sun.faces.MANAGED_BEAN_INVALID_SCOPE=範圍「{0}」不是「view」「request」「session」、「application」其中之一,也不是代表 ValueExpression (#{...}) +com.sun.faces.MISSING_CLASS_ERROR=缺少類別:無法載入類別「{0}」。 +com.sun.faces.MISSING_RESOURCE_ERROR=缺少資源:無法取得 ResourceBundle。 +com.sun.faces.MODELUPDATE_ERROR=模型更新失敗,因為模型「{1}」中存在值「{0}」。 +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME=無法從檢視 ID「{0}」中為結果「{1}」找到相符的瀏覽條件 +com.sun.faces.NAVIGATION_NO_MATCHING_OUTCOME_ACTION=無法從檢視 ID「{0}」中為具有結果「{2}」的動作「{1}」找到相符的瀏覽條件 +com.sun.faces.NAVIGATION_INVALID_QUERY_STRING=結果「{0}」中的查詢字串無效 +com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=表示式錯誤:找不到已命名的物件:「{0}」。 +com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=處理程式類別為「{0}」標記發生「未嵌套於 UIComponentTag 中」的錯誤。 +com.sun.faces.NOT_NESTED_IN_TYPE_TAG_ERROR={0} 標記應該嵌套在與 {1} 類型元件相關聯的標記中。 +com.sun.faces.NO_DTD_FOUND_ERROR=在路徑「{1}」中找不到具有 PUBLIC ID「{0}」的 DTD。 +com.sun.faces.NULL_BODY_CONTENT_ERROR=對於具有處理器類別:「{0}」的標記,BodyContent 為空值。 +com.sun.faces.NULL_COMPONENT_ERROR=建構錯誤:元件引數為空值。 +com.sun.faces.NULL_CONFIGURATION=未載入應用程式的配置。 +com.sun.faces.NULL_CONTEXT_ERROR=引數錯誤:環境引數為空值。 +com.sun.faces.NULL_EVENT_ERROR=引數錯誤:事件引數為空值。 +com.sun.faces.NULL_FORVALUE=找不到元件「{0}」 +com.sun.faces.NULL_HANDLER_ERROR=引數錯誤:處理器引數為空值。 +com.sun.faces.NULL_LOCALE_ERROR=引數錯誤:語言環境引數為空值。 +com.sun.faces.NULL_MESSAGE_ERROR=引數錯誤:訊息參數不能為空值 +com.sun.faces.NULL_PARAMETERS_ERROR=引數錯誤:參數「{0}」為空值 +com.sun.faces.NULL_REQUEST_VIEW_ERROR=引數錯誤:請求檢視引數為空值。 +com.sun.faces.NULL_RESPONSE_STREAM_ERROR=引數錯誤:ResponseStream 引數為空值。 +com.sun.faces.NULL_RESPONSE_VIEW_ERROR=引數錯誤:ResponseView 引數為空值。 +com.sun.faces.NULL_RESPONSE_WRITER_ERROR=引數錯誤:ResponseWriter 引數為空值。 com.sun.faces.NULL_VIEW_ID=Argument Error: view id argument is null. -com.sun.faces.OBJECT_CREATION_ERROR=\u7121\u6cd5\u5efa\u7acb\u4e00\u6216\u591a\u500b\u914d\u7f6e\u7684\u61c9\u7528\u7a0b\u5f0f\u7269\u4ef6\u3002\u8a73\u7d30\u8cc7\u8a0a\u8acb\u67e5\u770b Web \u61c9\u7528\u7a0b\u5f0f\u8a18\u9304\u6a94\u3002 -com.sun.faces.OPTION_NOT_SELECT_ITEM=\u5f15\u6578\u932f\u8aa4\uff1a\u5143\u4ef6\u300c{0}\u300d\u7684\u9078\u9805\u4e0d\u662f jakarta.faces.model.SelectItem \u7684\u5be6\u4f8b\u3002\u627e\u5230\u985e\u578b\uff1a\u300c{1}\u300d\u3002 -com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=\uff1a\u6b64\u6309\u9215\u505c\u7528\uff0c\u539f\u56e0\u662f\u700f\u89bd\u689d\u4ef6\u4e0d\u7b26\u3002 -com.sun.faces.OUTCOME_TARGET_LINK_NO_MATCH=\uff1a\u6b64\u9023\u7d50\u505c\u7528\uff0c\u539f\u56e0\u662f\u700f\u89bd\u689d\u4ef6\u4e0d\u7b26\u3002 -com.sun.faces.PHASE_ID_OUT_OF_BOUNDS= PhaseId \u8d85\u51fa ID\u300c{0}\u300d\u7684\u754c\u9650\u3002 -com.sun.faces.RENDERER_NOT_FOUND=\u627e\u4e0d\u5230\u7de8\u8b6f\u5668\u985e\u578b\u70ba\u300c{0}\u300d\u7684\u7de8\u8b6f\u5668\u3002 -com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=\u72c0\u614b\u932f\u8aa4\uff1a\u6b64\u8acb\u6c42\u5df2\u8a2d\u5b9a RequestView\u3002 -com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=\u8cc7\u6e90\u683c\u5f0f\u7121\u6548\u3002\u7121\u6cd5\u5256\u6790\u7279\u6027\u300c{0}\u300d\u3002 -com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=\u8cc7\u6e90\u683c\u5f0f\u7121\u6548\u3002\u7279\u6027\u300c{0}\u300d\u542b\u6709\u8d85\u904e\u4e00\u500b\u5192\u865f (:)\u3002 -com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=\u8cc7\u6e90\u683c\u5f0f\u7121\u6548\u3002\u7121\u6cd5\u5256\u6790\u7279\u6027\u300c{0}\u300d\u4f86\u64f7\u53d6\u8cc7\u6e90\u540d\u7a31\u548c\u7a0b\u5f0f\u5eab\u540d\u7a31\u3002 -com.sun.faces.SAVING_STATE_ERROR=\u5132\u5b58\u72c0\u614b\u6642\u767c\u751f\u932f\u8aa4\u3002 -com.sun.faces.SUPPORTS_COMPONENT_ERROR=\u5f15\u6578\u932f\u8aa4\uff1a\u6b64\u7de8\u8b6f\u5668\u4e0d\u652f\u63f4\u300c{0}\u300d\u3002 -com.sun.faces.TYPECONVERSION_ERROR=\u8a2d\u5b9a\u300c{1}\u300d\u7684\u503c\u300c{0}\u300d\u6642\u767c\u751f\u8f49\u63db\u932f\u8aa4\u3002 -com.sun.faces.VALIDATION_COMMAND_ERROR=\u9a57\u8b49\u932f\u8aa4\u3002\u300c{0}\u300d\u5fc5\u9808\u5177\u6709\u503c\u6216\u5f71\u50cf\u5c6c\u6027\u3002 -com.sun.faces.VALIDATION_EL_ERROR=\u9a57\u8b49\u932f\u8aa4\u3002\u8868\u793a\u5f0f\u5c0d\u65bc\u300c{0}\u300d\u7121\u6548 -com.sun.faces.VALIDATION_ID_ERROR=\u9a57\u8b49\u932f\u8aa4\u3002\u4e0b\u5217 Faces \u6a19\u8a18\u5fc5\u9808\u542b\u6709 ID:\u300c{0}\u300d -com.sun.faces.CANNOT_CONVERT=\u7121\u6cd5\u4f7f\u7528 converterId\u300c{0}\u300d\u6216 binding\u300c{1}\u300d\u89e3\u6790\u8f49\u63db\u5668\u5be6\u4f8b\u3002 -com.sun.faces.CANNOT_VALIDATE=\u7121\u6cd5\u4f7f\u7528 validatorId\u300c{0}\u300d\u6216 binding\u300c{1}\u300d\u89e3\u6790\u9a57\u8b49\u5668\u5be6\u4f8b\u3002 -com.sun.faces.verifier.CLASS_NOT_FOUND=[{0}:{1}] \u985e\u5225\u4e0d\u5b58\u5728 -com.sun.faces.verifier.CLASS_MISSING_DEP=[{0}:{1}] \u7121\u6cd5\u8f09\u5165\u985e\u5225\uff0c\u539f\u56e0\u662f\u7f3a\u5c11\u76f8\u4f9d\u6027 -> {2} -com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=[{0}:{1}] \u985e\u5225\u542b\u6709\u7121\u5f15\u6578\u5efa\u69cb\u5b50\uff0c\u4f46\u5b83\u4e0d\u662f\u516c\u7528\u7684 -com.sun.faces.verifier.NO_DEF_CTOR=[{0}:{1}] \u985e\u5225\u542b\u6709\u7121\u516c\u7528\u3001\u7121\u5f15\u6578\u5efa\u69cb\u5b50 -com.sun.faces.verifier.WRONG_TYPE=[{0}:{1}] \u985e\u5225\u672a\u5be6\u4f5c\u6216\u5ef6\u4f38 {2} +com.sun.faces.OBJECT_CREATION_ERROR=無法建立一或多個配置的應用程式物件。詳細資訊請查看 Web 應用程式記錄檔。 +com.sun.faces.OPTION_NOT_SELECT_ITEM=引數錯誤:元件「{0}」的選項不是 jakarta.faces.model.SelectItem 的實例。找到類型:「{1}」。 +com.sun.faces.OUTCOME_TARGET_BUTTON_NO_MATCH=:此按鈕停用,原因是瀏覽條件不符。 +com.sun.faces.OUTCOME_TARGET_LINK_NO_MATCH=:此連結停用,原因是瀏覽條件不符。 +com.sun.faces.PHASE_ID_OUT_OF_BOUNDS= PhaseId 超出 ID「{0}」的界限。 +com.sun.faces.RENDERER_NOT_FOUND=找不到編譯器類型為「{0}」的編譯器。 +com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=狀態錯誤:此請求已設定 RequestView。 +com.sun.faces.RESOURCE_INVALID_FORMAT_ERROR=資源格式無效。無法剖析特性「{0}」。 +com.sun.faces.RESOURCE_INVALID_FORMAT_COLON_ERROR=資源格式無效。特性「{0}」含有超過一個冒號 (:)。 +com.sun.faces.RESOURCE_INVALID_FORMAT_NO_LIBRARY_NAME_ERROR=資源格式無效。無法剖析特性「{0}」來擷取資源名稱和程式庫名稱。 +com.sun.faces.SAVING_STATE_ERROR=儲存狀態時發生錯誤。 +com.sun.faces.SUPPORTS_COMPONENT_ERROR=引數錯誤:此編譯器不支援「{0}」。 +com.sun.faces.TYPECONVERSION_ERROR=設定「{1}」的值「{0}」時發生轉換錯誤。 +com.sun.faces.VALIDATION_COMMAND_ERROR=驗證錯誤。「{0}」必須具有值或影像屬性。 +com.sun.faces.VALIDATION_EL_ERROR=驗證錯誤。表示式對於「{0}」無效 +com.sun.faces.VALIDATION_ID_ERROR=驗證錯誤。下列 Faces 標記必須含有 ID:「{0}」 +com.sun.faces.CANNOT_CONVERT=無法使用 converterId「{0}」或 binding「{1}」解析轉換器實例。 +com.sun.faces.CANNOT_VALIDATE=無法使用 validatorId「{0}」或 binding「{1}」解析驗證器實例。 +com.sun.faces.verifier.CLASS_NOT_FOUND=[{0}:{1}] 類別不存在 +com.sun.faces.verifier.CLASS_MISSING_DEP=[{0}:{1}] 無法載入類別,原因是缺少相依性 -> {2} +com.sun.faces.verifier.NON_PUBLIC_DEF_CTOR=[{0}:{1}] 類別含有無引數建構子,但它不是公用的 +com.sun.faces.verifier.NO_DEF_CTOR=[{0}:{1}] 類別含有無公用、無引數建構子 +com.sun.faces.verifier.WRONG_TYPE=[{0}:{1}] 類別未實作或延伸 {2} -com.sun.faces.CYCLIC_REFERENCE_ERROR=\u53d7\u7ba1 Bean\u300c{0}\u300d\u542b\u6709\u5faa\u74b0\u53c3\u7167\u3002\u8a08\u7b97\u8def\u5f91:\u300c{1}\u300d\u3002 -com.sun.faces.OBJECT_IS_READONLY={0} \u7269\u4ef6\u70ba\u552f\u8b80 -com.sun.faces.INCORRECT_JSP_VERSION=\u5bb9\u5668\u7684 JSP \u7248\u672c\u4f3c\u4e4e\u6bd4 2.1 \u7248\u66f4\u820a\uff0c\u56e0\u6b64\u627e\u4e0d\u5230 EL RI \u8868\u793a\u5f0f\u5de5\u5ee0\u300c{0}\u300d\u3002\u5982\u679c\u672a\u4f7f\u7528 JSP \u6216 EL RI\uff0c\u8acb\u78ba\u5b9a\u74b0\u5883\u521d\u59cb\u5316\u53c3\u6578\u300c{1}\u300d\u6b63\u78ba\u8a2d\u5b9a\u3002 +com.sun.faces.CYCLIC_REFERENCE_ERROR=受管 Bean「{0}」含有循環參照。計算路徑:「{1}」。 +com.sun.faces.OBJECT_IS_READONLY={0} 物件為唯讀 +com.sun.faces.INCORRECT_JSP_VERSION=容器的 JSP 版本似乎比 2.1 版更舊,因此找不到 EL RI 表示式工廠「{0}」。如果未使用 JSP 或 EL RI,請確定環境初始化參數「{1}」正確設定。 #com.sun.faces.el.PropertyResolverImpl -com.sun.faces.OUT_OF_BOUNDS_ERROR=\u7d22\u5f15 {1} \u8d85\u51fa {0} \u7684\u754c\u9650 -com.sun.faces.PROPERTY_TYPE_ERROR={0} \u4e0d\u662f\u9663\u5217\u6216\u6e05\u55ae\u985e\u578b\u3002 -com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=\u7d22\u5f15 {1} \u7684\u9577\u5ea6\u70ba {2}\uff0c\u8d85\u51fa {0} \u7684\u754c\u9650 -com.sun.faces.RESTORE_VIEW_ERROR=\u6aa2\u8996\u300c{0}\u300d\u7121\u6cd5\u5fa9\u539f\u3002 +com.sun.faces.OUT_OF_BOUNDS_ERROR=索引 {1} 超出 {0} 的界限 +com.sun.faces.PROPERTY_TYPE_ERROR={0} 不是陣列或清單類型。 +com.sun.faces.SIZE_OUT_OF_BOUNDS_ERROR=索引 {1} 的長度為 {2},超出 {0} 的界限 +com.sun.faces.RESTORE_VIEW_ERROR=檢視「{0}」無法復原。 -com.sun.faces.CANT_WRITE_ID_ATTRIBUTE=\u7121\u6cd5\u5beb\u5165 ID \u5c6c\u6027:\u300c{0}\u300d\u3002 -com.sun.faces.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR=\u672a\u5d4c\u5957\u5728 UIComponentTag \u4e2d\u3002 -com.sun.faces.NO_COMPONENT_ASSOCIATED_WITH_UICOMPONENT_TAG=\u6c92\u6709\u8207 UIComponentTag \u76f8\u95dc\u806f\u7684\u5143\u4ef6\u3002 +com.sun.faces.CANT_WRITE_ID_ATTRIBUTE=無法寫入 ID 屬性:「{0}」。 +com.sun.faces.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR=未嵌套在 UIComponentTag 中。 +com.sun.faces.NO_COMPONENT_ASSOCIATED_WITH_UICOMPONENT_TAG=沒有與 UIComponentTag 相關聯的元件。 -com.sun.faces.JS_RESOURCE_WRITING_ERROR=\u7121\u6cd5\u5c07 JavaScript \u6a94\u6848\u5beb\u5165\u7528\u6236\u7aef\u3002 +com.sun.faces.JS_RESOURCE_WRITING_ERROR=無法將 JavaScript 檔案寫入用戶端。 -com.sun.faces.RESOURCE_TARGET_NOT_AVAILABLE=\u4e00\u6216\u591a\u500b\u8cc7\u6e90\u5177\u6709\u76ee\u6a19\u300c{0}\u300d\uff0c\u4f46\u6aa2\u8996\u5167\u672a\u5b9a\u7fa9\u4efb\u4f55\u300c{0}\u300d\u5143\u4ef6\u3002 +com.sun.faces.RESOURCE_TARGET_NOT_AVAILABLE=一或多個資源具有目標「{0}」,但檢視內未定義任何「{0}」元件。 com.sun.faces.ARGUMENTS_NOT_LEGAL_WITH_CC_ATTRS_EXPR=Illegal attempt to pass arguments to a composite component lookup expression (i.e. cc.attrs.[identifier]). com.sun.faces.partial.statesaving.ERROR_RESTORING_STATE_FOR_COMPONENT=Unexpected error restoring state for component with id ''{0}''. Cause: {1}. com.sun.faces.MISSING_COMPONENT_ATTRIBUTE_VALUE=The following attribute(s) are required, but no values have been supplied for them: ''{0}''. diff --git a/impl/src/main/resources/com/sun/faces/standard-html-renderkit.xml b/impl/src/main/resources/com/sun/faces/standard-html-renderkit.xml deleted file mode 100644 index 37ab87d66c..0000000000 --- a/impl/src/main/resources/com/sun/faces/standard-html-renderkit.xml +++ /dev/null @@ -1,13089 +0,0 @@ - - - - - - - - - - - - The - standard HTML RenderKit. Please see the spec for additional - details for the standard render-kit. - -
            -

            The following new renderers have been - added in this release of the specification.

            - -
            -
            jakarta.faces.Output
            - -
            jakarta.faces.Body -
            - -
            jakarta.faces.Head -
            - -
            jakarta.faces.resource.Script -
            - -
            jakarta.faces.resource.Stylesheet -
            - -
            jakarta.faces.Composite -
            - - -
            - -
            - -

            General notes on decoding

            - -
              - -

              Only Renderers for components which cause data to sent to the - server on a page submit need to implement decode behavior. In - practical terms, this means Renderers for components that implement - from jakarta.faces.component.EditableValueHolder or - jakarta.faces.component.ActionSource or Renderers for - jakarta.faces.component.UIForm components. Renderers - for components that do not send data to the server on page submit - may choose to accept the no-op decode behavior of the - jakarta.faces.render.Renderer abstract class. In the - Renderer descriptions that follow, the omission of a Decode - Behavior section indicates that this Renderer does no decoding.

              - -

              If a Renderer chooses to implement decode behavior, it must - consult the "disabled" and "readonly" attributes of the component - to be rendered, if the value of either attribute is equal to, - ignoring case, the string "true" (without the quotes) the decode - method must take no action and return immediately.

              - -
              -

              If the component associated with the Renderer implements the - jakarta.faces.component.behavior.ClientBehaviorHolder interface, - process jakarta.faces.component.behavior.ClientBehaviors as follows: -

                -
              • Determine if there are jakarta.faces.component.behavior.ClientBehaviors - associated with this component by calling the implementation of - jakarta.faces.component.behavior.ClientBehaviorHolder.getClientBehaviors.
              • -
              • If there are client behaviors, determine the - client behavior event name from the request parameter given by the value of the constant jakarta.faces.component.behavior.ClientBehaviorContext.BEHAVIOR_EVENT_PARAM_NAME.
              • -
              • If that request parameter exists, get the List of - jakarta.faces.component.behavior.ClientBehaviors for the - behavior event name from the Map returned from - jakarta.faces.component.behavior.ClientBehaviorHolder.getClientBehaviors.
              • -
              • If there are client behaviors for the behavior event name, - determine the behavior source name from the request parameter given by the value - of the constant jakarta.faces.component.behavior.ClientBehaviorContext.BEHAVIOR_SOURCE_PARAM_NAME.
              • -
              • If the request parameter exists, and its value is the same as this - component's clientId, iterate over the List of - jakarta.faces.component.behavior.ClientBehaviors and call the - decode() method for each one.
              • -
              - Behavior decoding is applicable to components that are "readonly", but it is - not applicable to components that are "disabled".

              -
              - -

              - -

            - -

            General notes on encoding

            - -
              - -

              If the value of the component's "rendered" property is false, - the component, and its children must not be rendered.

              - -

              For all renderers that are responsible - for rendering their own children, the renderer will decide if the - end tag is required or not based on the presence or absence of - children for the component.

              - -

              General notes regarding the id attribute

              - -
                - -

                All components, and therefore all tags for those components - support the id attribute. This attribute is optional. - If not present its value is autogenerated by the implementation and - used for internal purposes only. If present, an id - attribute must not start with the String listed as the - value of the constant UIViewRoot.UNIQUE_ID_PREFIX, and - it must be unique within the scope of the nearest component that is - a NamingContainer.

                - -

                All renderers must take the following action regarding the - id attribute: If the value returned from - component.getId() is non-null and does - not start with UIViewRoot.UNIQUE_ID_PREFIX, call - component.getClientId() and render the result as the - value of the id attribute in the markup for the - component. See the javadoc for - component.getClientId() for details, particularly note - that the Renderer has a chance to modify the client id before it is - rendered. If the component doesn't generate any markup elements, - include the id attribte on a "span" element that - encloses the content for the component.

                - -

                In addition to any action already specified in the renderers, all - renderers for UIInput components must take the - following action regarding the id attribute: Call - component.getClientId() and render the result as the - value of the name attribute. This may cause some - renderers to have "id" and "name" attributes that have exactly the - same value.

                - -
              - -

              General notes regarding the rendering of JavaScript in the - standard components.

              - -
                - -

                The intent of the standard renderkit is to specify the minimal - Renderers a JSF implementation must provide. As such, it is the - baseline for building JSF applications that are maximally - portable across JSF implementations and user agents. Therefore, - the use of JavaScript must be minimized as not all browsers - support JavaScript, nor do all users enable JavaScript support in - their user agents.

                - -

                Compliant implementations must only generate JavaScript in the - jakarta.faces.Link and - jakarta.faces.Button - Renderers for the jakarta.faces.Command component. - The generation of JavaScript in any other Renderer in the - HTML_BASIC renderkit is not permitted. However, any JavaScript - code provided by the user as the value of an ignored-by-renderer - attribute, such as "onmouseover", is excluded from this restriction.

                - -
              - -
              -

              General notes regarding the rendering of component Client Behaviors.

              - -
                - -

                Components that implement the jakarta.faces.component.behavior.ClientBehaviorHolder - interface are eligable to have ClientBehavior instances attached to them. The standard - renderers are responsible for inserting the scripts produced by client behaviors into the component's - rendered content. Components may obtain script from multiple sources. Event handler scripts may be specified - by page authors, scripts may be produced by client behaviors and renderers may produce ther own scripts. - When multiple scripts are present, the scripts must be chained together in this order: -

                  -
                • User specified event handler scripts
                • -
                • client behavior scripts
                • -
                • renderer specific scripts
                • -
                - If any of the scripts in the chain returns false, subsequent script must not be executed. - The specification provides a utility function faces.util.chain to handle this capability. If there - are UIParameter children the parameter names and values must be passed into the client behavior - getScript method via the ClientBehaviorContext.

                - -
              -
              - -
              -

              Rendering Pass Through Attributes.

              - -
                - -

                The set of attributes written for a component is determined by - its Renderer and collectively are known as - renderer specific attributes. In addition to - renderer specific attributes, pass through - attributes are also possible. Pass through - attributes are declared as markup attributes on components - in the VDL view and are stored in the Map returned - by UIComponent.getPassThroughAttributes(). When - rendering a UIComponent instance, - Renderers call - ResponseWriter.startElement(), passing in the - UIComponent instance. The - ResponseWriter must ensure that any pass through - attributes are rendered on the outer-most markup element for - the component. If there is a pass through attribute - with the same name as a renderer specific attribute, the - pass through attribute takes precedence. Pass - through attributes are rendered as if they were passed to - ResponseWriter.writeURIAttribute().

                - - -
              -
              - - -
            ]]>
            - - Renders an HTML "input" - element.

            - -

            Decode Behavior

            - -
              - -

              Obtain the Map from the "requestParameterMap" - property of the ExternalContext. If the value in the - Map for the value of the "clientId" property of the - component is null, create a String by concatenating - the value of the "clientId" property of the component with the - String ".x" (without the quotes). Create another String in the - same manner, but concatenate ".y" (without the quotes). If - null is the value in the Map for both - Strings, return from decode(). If the value in the - Map for the value of the "clientId" property of the - component is not null, get the value of the "type" - attribute, and convert it to lower case. If the result is equal - to the String "reset" (without the quotes), return from - decode(). Otherwise, create a - jakarta.faces.event.ActionEvent around the component, - and pass it to the queueEvent() method of the - component, which must be an instance of - UICommand.

              - -
            - - - -

            Encode Behavior

            - -
              - -

              Render the clientId of the component as the value of the "name" - attribute. Render the current value of the component as the value - of the "value" attribute. If "image" attribute is specified render - it as the value of the "src" attribute after passing it to the - getResourceURL() method of the - ViewHandler for this application, and passing the - result through the encodeResourceURL() method of the - ExternalContext. Note that calling - getResourceURL() will prefix the context-root of the - current application if the value of the "src" attribute starts - with "/". When handling the "image" attribute, the value - must not be escaped. For example, & must not be - turned into &amp;. If the "styleClass" attribute - is specified, render its value as the value of the "class" - attribute. If the user has specified an "onclick" attribute, - append that JavaScript to any existing JavaScript already being output by the - implementation before rendering.

              - -

              If the component being rendered by - this renderer has any UIParameter children, each one - of them must be rendered using the renderer for component-family: - "jakarta.faces.Input" and renderer-type: "jakarta.faces.Hidden". For - discussion, this is called the hiddenRenderer. A component with - component-type "jakarta.faces.Input" must be created for local use - in rendering each UIParameter child. The "id" - property of the temporary component must be set to the "name" of - the UIParameter. The "value" property of the - temporary component must be set to the "value" of the - UIParameter. For each UIParameter - child, the hiddenRenderer must have its - encodeBegin(), encodeChildren(), and - encodeEnd() methods called, in order, passing the - temporary component as the second argument.

              - -
              - -

              Because this renderer is responsible for rendering its own - children, the renderer will decide if the end tag is required or - not based on the presence or absence of children for the - component.

              - -

              To support entering flows that are defined by both a defining - document id and a flow id, add a component attribute to this - component whose name is given by the value of the symbolic - constant - jakarta.faces.event.ActionListener.TO_FLOW_DOCUMENT_ID_ATTR_NAME, - and whose value is the defining document id. For example, when - using this component in a facelet page, the following markup - would cause such an attribute to be added.

              - -
              <h:commandButton id="start_a" value="enter flow-a" action="flow-a">
              -  <f:attribute name="to-flow-document-id" value="unique"/>
              -</h:commandButton>
              -
              - -
              - -
            - ]]>
            - jakarta.faces.Command - jakarta.faces.Button - com.sun.faces.renderkit.html_basic.ButtonRenderer - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Access key that, when pressed, transfers focus - to this element. - - Access Key - - accesskey - java.lang.String - - true - - - - - Javascript code executed when this element loses focus. - - Focus Off Script - - onblur - java.lang.String - - true - - - - - - Javascript code executed when this element receives focus. - - Focus On Script - - onfocus - java.lang.String - - true - - - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - Tab Index - - tabindex - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - Disabled Flag - - disabled - boolean - - false - - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - Input Change Script - - onchange - java.lang.String - - false - - valueChange - true - - - - - Javascript code executed when text within this - element is selected by the user. - - Text Select Script - - onselect - java.lang.String - - true - - - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - Read Only Flag - - readonly - boolean - - false - - - - - A localized user presentable name for this component. - - Label - - label - java.lang.String - - true - - - - - - - Alternate textual description of the - element rendered by this component. - - Alternate Text - - alt - java.lang.String - - true - - - - - Absolute or relative URL of the - image to be displayed for this - button. If specified, this - "input" element will be of type - "image". Otherwise, it will be - of the type specified by the - "type" property with a label - specified by the "value" - property. Note - that if the value of this - attribute starts with "/", the - rendered value for this - attribute will be prefixed with - the context-root for this - application. -

            ]]>
            - Image URL - - image - java.lang.String -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - false - - action - true - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - Input Change Script - - onchange - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - Type of button to create. Valid values are "submit", "button", - and "reset". If not specified, or not a valid value, the default - value is "submit". - - Button Type - - type - java.lang.String - - "submit" - - - - - true - -
            - - Render an HTML "a" anchor - element that acts like a form submit button when - clicked.

            - -

            General Behaviour

            - -

            Both the encode and decode behavior require the ability to get - the id/name for a hidden field, which may be rendered in markup or which - may be programmatically added via client DOM manipulation, - whose value is set by the JavaScript form submit. This name must - be constructed as follows:

            - -
              - -
            • Get the clientId for the form of which this component is a - child.

            • - -
            • Append - NamingContainer.SEPARATOR_CHAR.

            • - -
            • Append a constant string that is the same for all command - link components in the tree.

            • - -
            - -

            In the following text, this String is called - hiddenFieldName.

            - -

            Decode Behavior

            - -
              - -

              Obtain the "clientId" property of the component. Obtain the - Map from the "requestParameterMap" property of the - ExternalContext. Derive hiddenFieldName as above. - Get the entry in the Map under the key that is the - hiddenFieldName. If the there is no entry, or the entry is the - empty String, or the entry is not equal to the value of the - "clientId" property, return immediately. If there is an entry, - and its value is equal to the value of the "clientId" property, - create a new jakarta.faces.event.ActionEvent instance - around the component and call queueActionEvent() on - the component, passing the event.

              - -
            - - -

            Encode Behavior

            - -
              - -

              If the value of the disabled attribute is - true, render a span element. Render all the - ignored-by-renderer attributes and the target - attribute as ignored-by-renderer attributes on the span, even - though the target attribute will have no effect on a - span. Render the current value of the component as the content of - the span. Return.

              - -

              If the disabled attribute is not present, or its - value is false, render an HTML a - element. Render "#" as the value of the "href" attribute. Render - the current value of the component as the link text if it is - specified. Render JavaScript that is functionally equivalent to - the following as the value of the "onclick" attribute:

              - -

              document.forms['CLIENT_ID']['hiddenFieldName'].value='CLIENT_ID'; - document.forms['CLIENT_ID']['PARAM1_NAME'].value='PARAM1_VALUE'; - document.forms['CLIENT_ID']['PARAM2_NAME'].value='PARAM2_VALUE'; - document.forms['CLIENT_ID'].submit(); return false;

              - -

              where hiddenFieldName is as described above, CLIENT_ID is the - clientId of the UICommand component, PARAM*_NAME and PARAM*_VALUE - are the names and values, respectively, of any nested UIParameter - children. The name and the value must be URLEncoded. Note that the required url - encoding is handled by - ResponseWrter.writeAttribute(). If an - "onclick" attribute was specified by the user, render this - JavaScript in a function, and render the user's JavaScript in a - function. Render both functions in a choice function as - follows:

              - -

              var a=function(){#USER_FUNCTION#}; - var b=function(){#FACES_FUNCTION#}; - return (a()==false) ? false : b();

              - -

              where #USER_FUNCTION# is the user's JavaScript and - #FACES_FUNCTION# is the JavaScript rendered by Jakarta Faces. The choice - function should operate such that if the user's JavaScript returns - true, then the rendered JavaScript will also execute.

              - -

              If the "styleClass" attribute is specified, render its value as - the value of the "class" attribute. Render any non-UIParameter - output children as normal inside of the "a" element. These will - appear as the link text. Allow the form renderer to output a - single "input" element (for the entire page, regardless of how - many command link components are in the page) of "type" "hidden" - whose "name" is the value of hiddenFieldName, and which must not - have a "value" attribute. Multiple occurrences of command link - components in the tree should not cause multiple hiddenFieldName - hidden fields. Allow the form renderer to output an "input" - element of "type" "hidden" for each of the nested UIParameter - children, taking the name property (but not the value) from each - one in turn. If the "disabled" attribute is specified, do not - render the HTML "a" anchor element or its "href" attribute. - Instead, render a "span" element. If the "styleClass" attribute - is specified, render its value as the value of the "class" - attribute on the "span". Render any ignored-by-renderer attributes on - the "span". The content of the span element comes from the value - of the component or its children as specified above.

              - -

              If the user specified a target attribute, its - value must be set using javascript since the onclick - handler will prevent the target attribute from being generated. - This must be accomplished using JavaScript that is equivalent to - the following.

              - -

              document.forms['CLIENT_ID'].target='TARGET';

              - -

              Where TARGET is the value of the target attribute on the tag.

              - -
            - -
            - -

            To support entering flows that are defined by both a defining - document id and a flow id, add a component attribute to this - component whose name is given by the value of the symbolic - constant - jakarta.faces.event.ActionListener.TO_FLOW_DOCUMENT_ID_ATTR_NAME, - and whose value is the defining document id. For example, when - using this component in a facelet page, the following markup - would cause such an attribute to be added.

            - -
            <h:commandLink id="start_a" value="enter flow-a" action="flow-a">
            -  <f:attribute name="to-flow-document-id" value="unique"/>
            -</h:commandLink>
            -
            - -
            - -]]>
            - jakarta.faces.Command - jakarta.faces.Link - com.sun.faces.renderkit.html_basic.CommandLinkRenderer - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Access key that, when pressed, transfers focus - to this element. - - Access Key - - accesskey - java.lang.String - - true - - - - - Javascript code executed when this element loses focus. - - Focus Off Script - - onblur - java.lang.String - - true - - - - - - Javascript code executed when this element receives focus. - - Focus On Script - - onfocus - java.lang.String - - true - - - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - Tab Index - - tabindex - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - The character encoding of the resource designated - by this hyperlink. - - Character Set - - charset - java.lang.String - - true - - - - - The position and shape of the hot spot on the screen - (for use in client-side image maps). - - Coordinates - - coords - java.lang.String - - true - - - - - The language code of the resource designated - by this hyperlink. - - Language - - hreflang - java.lang.String - - true - - - - - The relationship from the current document - to the anchor specified by this hyperlink. - The value of this attribute is a space-separated - list of link types. - - Relationship - - rel - java.lang.String - - true - - - - - A reverse link from the anchor specified - by this hyperlink to the current document. - The value of this attribute is a space-separated - list of link types. - - Reverse Link - - rev - java.lang.String - - true - - - - - The shape of the hot spot on the screen - (for use in client-side image maps). Valid - values are: default (entire region); rect - (rectangular region); circle (circular region); - and poly (polygonal region). - - Shape - - shape - java.lang.String - - true - - - - - Name of a frame where the resource - retrieved via this hyperlink is to - be displayed. - - Target Frame - - target - java.lang.String - - false - - - - - The content type of the resource designated - by this hyperlink. - - Content Type - - type - java.lang.String - - true - - - - - Flag indicating that this element must never - receive focus or be included in a subsequent - submit. - - Disabled Flag - - disabled - boolean - - false - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - false - - action - true - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - true - true - -
            - - -

            - Render a JavaScript function that invokes faces.ajax.request() function. -

            - -

            Encode Behavior

            -

            - Render an HTML script element. If the value of the "name" attribute does not contain a - period . indicating a namespaced function name, then render JavaScript var - keyword, followed by a space character. Render the value of the "name" attribute, followed by - JavaScript assignment operator. Render JavaScript function which invokes faces.ajax.request() - with data provided by execute, render, onbegin, - oncomplete, onsuccess and onerror arguments, if any. -

            -

            - If the component being rendered has any UIParameter children, each one of them must be - encoded into params object of the options object of the faces.ajax.request() - function. -

            -

            - If the rendered JavaScript function is invoked with an object argument, each property must be - encoded into params object of the options object of the faces.ajax.request() - function. This will override any property with the same key. -

            - -

            Decode Behavior

            -

            - Obtain the Map from the "requestParameterMap" property of the ExternalContext. - If the value in the Map for the value of the "jakarta.faces.source" equals to the "clientId" property of the component, - create a jakarta.faces.event.ActionEvent around the component, and pass it to the queueEvent() method of the component, - which must be an instance of UICommand. -

            - - ]]>
            - jakarta.faces.Command - jakarta.faces.Script - com.sun.faces.renderkit.html_basic.CommandScriptRenderer - - - name="functionName". - This can be a namespaced function name, e.g. name="ez.functionName". - ]]> - - name - java.lang.String - - - load event of the window. - Defaults to false. - ]]> - - autorun - boolean - - - @this clientIdOne clientIdTwo. - ]]> - - execute - java.lang.String - - - @this clientIdOne clientIdTwo. - ]]> - - render - java.lang.String - - - render attribute as a space separated list of client identifiers - suitable for passing directly to UIViewRoot.resetValues(). - The implementation must cause an ActionListener to be attached to the ActionSource - component in which this tag is nested that calls UIViewRoot.resetValues() passing the value - of the render attribute as the argument. - ]]> - - resetValues - java.lang.Boolean - - - - The name of the JavaScript function that will handle UI events. - - - onevent - java.lang.String - - - - The name of the JavaScript function that will handle errors. - - - onerror - java.lang.String - - - - false - -
            - - Renders an HTML "table" element - compliant with the HTML 401 specification. Render the "caption" - facet, if present, inside a "caption" element immediately below - the "table" element. If the "captionClass" attribute is - specified, render its value as the value of the "class" attribute - on the "caption" element. If the "captionStyle" attribute is - specified, render its value as the value of the "style" attribute - on the "caption" element.

            Please consult the javadoc for - UIData to supplement this specification. If the - "styleClass" attribute is specified, render its value as the value - of the "class" attribute on the "table" element. Any - ignored-by-renderer attributes are also rendered on the "table" - element.

            - -

            Column Groups

            - -
              - -

              If the UIData component has a "colgroups" facet, - render its contents. Consistent with the rules of facets in - general, this facet must have only one child. In general, this - will be a panel group component that will contain - colgroup and col elements per the HTML - Table specification. Use of column grouping can improve - accessibility. This facet must be rendered before the table - header and footer.

              - -
            - -

            Rendering the header

            - -
              - -

              If the UIData component has a "header" facet, or - any of the child UIColumn components has a "header" - facet, render a "thead" element. If the UIData - component has a "header" facet, encode its contents inside of "tr" - and "th" elements, respectively. Output the value of the - "headerClass" attribute of the UIData component, if - present, as the value of the "class" attribute on the "th". - Output the number of child UIColumn components of the - UIData component as the value of the "colspan" - attribute on the "th". Output "colgroup" as the value of the - "scope" attribute on the "th" element.

              - -

              If any of the child UIColumn components has a - "header" facet render a "tr" element. For each - UIColumn that actually has a "header" facet, render - it inside of a "th" element. Columns that don't have a "header" - facet cause an empty "th" element to be rendered. Output the - value of the "headerClass" attribute of the UIColumn - component, if present, as the value of the "class" attribute on - the "th". If the "headerClass" attribute of the UIColumn - component is not present, output the value of the "headerClass" - attribute of the UIData component, if present, as - the value of the "class" attribute on the "th". Output "col" as - the value of the "scope" attribute on the "th" element. -

              - -

              Close out the "thead" element.

              - -
            - -

            Rendering the footer

            - -
              - -
              -

              If the UIData component has a "footer" facet, or - any of the child UIColumn components has a "footer" - facet, render a "tfoot" element. If the UIData - component has "footer" facets, encode the contents inside of a "tr" - element.

              - -

              If any of the child UIColumn components has a - "footer" facet render a "td" element. For each - UIColumn that actually has a "footer" facet, render - it inside of a "td" element. Columns that don't have a "footer" - facet cause an empty "td" element to be rendered. Output the - value of the "footerClass" attribute of the UIColumn - component, if present, as the value of the "class" attribute on - the "td". If the "footerClass" attribute of the UIColumn - component is not present, output the value of the "footerClass" - attribute of the UIData component, if present, as - the value of the "class" attribute on the "td".

              - -

              If the UIData component has a "footer" facet, - encode its contents inside of "tr" and "td" elements, respectively. - Output the value of the "footerClass" attribute of the - UIData component, if present, as the value of the - "class" attribute on the "td". Output the number of child - UIColumn components of the UIData - component as the value of the "colspan" attribute on the "td".

              - -

              Close out the "tfoot" element.

              -
              - -
            - -

            Rendering the table body

            - -
              - -

              Look at the value of the "bodyrows" attribute. If present, - this must be a comma separated list of integers. Each entry in - this list is the row index of the row before which a "tbody" - element should be rendered.

              - -

              If there was no "bodyrows" attribute, or it was empty, render a - "tbody" element. Keep track of the result of the "rows" property - on the UIData component. Keep track of the number of - rows we have rendered so far. Iterate through the rows. Set the - "rowIndex" property of the UIData component to be - correct as we iterate through the rows. Stop rendering children - and close out the "tbody" element if the "rowAvailable" property - of the UIData returned false. If the current row - index is contained in the "bodyrows" attribute, check if a "tbody" - start element was rendered that needs to be closed, and if so, - close the "tbody" element. Then render a "tbody" element start. - Otherwise, do not render a "tbody" element.

              - -

              Output a "tr" element. Output the value of the "rowClasses" - per the attribute description below, or rowClass. For each - UIColumn child, if the column component has a - "rowHeader" attribute with a value of "true", output a "th" - element with a "scope" attribute with the value of "row". - Otherwise, if the column component has no "rowHeader" attribute, - or its value is false, output a "td" element. In either case - attach the value of the "columnClasses" attribute of the - UIData component per the attribute description below. - Recursively encode each child of each UIColumn child. - Close out the "td" or "th" element. When done with the row, close - out the "tr" element. When done with all the rows, close out the - "tbody" element.

              - -
            - -

            When done rendering all the rows, set the "rowIndex" property of - the UIData to -1, and close out the "table" - element.

            - ]]>
            - jakarta.faces.Data - jakarta.faces.Table - com.sun.faces.renderkit.html_basic.TableRenderer - - caption - - - header - - - footer - - - colgroups - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - Name or code of the background color for this table. - - Background Color - - bgcolor - java.lang.String - - true - - - - - Width (in pixels) of the border to be drawn - around this table. - - Table Border - - border - int - - true - - - - - Definition of how much space the user agent should - leave between the border of each cell and its contents. - - Cell Padding - - cellpadding - java.lang.String - - true - - - - - Definition of how much space the user agent should - leave between the left side of the table and the - leftmost column, the top of the table and the top of - the top side of the topmost row, and so on for the - right and bottom of the table. It also specifies - the amount of space to leave between cells. - - Cell Spacing - - cellspacing - java.lang.String - - true - - - - - Comma-delimited list of CSS style classes that will be applied - to the columns of this table. A space separated list of - classes may also be specified for any individual column. If - the number of elements in this list is less than the number of - actual column children of the UIData, no "class" - attribute is output for each column greater than the number of - elements in the list. If the number of elements in the list - is greater than the number of actual column children of the - UIData, the elements at the posisiton in the list - after the last column are ignored. - - Column CSS Classes - - columnClasses - java.lang.String - - - - Space-separated list of CSS style class(es) that will be - applied to any footer generated for this table. - - Footer CSS Classes - - footerClass - java.lang.String - - - - Code specifying which sides of the frame surrounding - this table will be visible. Valid values are: - none (no sides, default value); above (top side only); - below (bottom side only); hsides (top and bottom sides - only); vsides (right and left sides only); lhs (left - hand side only); rhs (right hand side only); box - (all four sides); and border (all four sides). - - Table Frame - - frame - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) that will be - applied to any caption generated for this table. - - Caption CSS Classes - - captionClass - java.lang.String - - - - CSS style(s) to be applied when this caption is rendered. - - Caption CSS Styles - - captionStyle - java.lang.String - - - - Space-separated list of CSS style class(es) that will be - applied to any header generated for this table. - - Header CSS Classes - - headerClass - java.lang.String - - - - Comma-delimited list of CSS style classes that will be applied - to the rows of this table. A space separated list of classes - may also be specified for any individual row. Thes styles are - applied, in turn, to each row in the table. For example, if - the list has two elements, the first style class in the list - is applied to the first row, the second to the second row, the - first to the third row, the second to the fourth row, etc. In - other words, we keep iterating through the list until we reach - the end, and then we start at the beginning again. - - Row CSS Classes - - rowClasses - java.lang.String - - - - -

            Assigns one or more space-separated CSS class names to each - "tr"

            - - - - ]]>
            - Row CSS Class - - rowClass - java.lang.String -
            - - - Code specifying which rules will appear between cells - within this table. Valid values are: none (no rules, - default value); groups (between row groups); rows - (between rows only); cols (between columns only); and - all (between all rows and columns). - - Table Rules - - rules - java.lang.String - - true - - - - - Summary of this table's purpose and structure, for - user agents rendering to non-visual media such as - speech and Braille. - - Table Summary - - summary - java.lang.String - - true - - - - - Width of the entire table, for visual user agents. - - Table Width - - width - java.lang.String - - true - - - - - Comma separated list of row indices for which a new - "tbody" element should be started (and any - previously opened one should be ended). - - Body Rows - - bodyrows - java.lang.String - - - - Boolean flag directing how the per-row component state should be handled.]]> - Preserve Row Component State - - rowStatePreserved - boolean - - false - - - - true - -
            - - Renders an HTML "form" element.

            - -

            Decode Behavior

            - -
              - -

              Obtain the Map from the "requestParameterMap" - property of the ExternalContext. If the map contains - an entry for the "clientId" of this UIForm component, - call setSubmitted(true) on the form, otherwise call - setSubmitted(false) on the form.

              - -
            - - - -

            Encode Behavior

            - -
              - -

              The value of the "method" attribute must be "post". The value - of the "action" attribute must be the result of passing the view - identifier of the current view to the getActionURL() - method of the ViewHandler for this application, then - passing that String to the encodeActionURL() method - on the ExternalContext. The value of the acceptcharset - attribute must be rendered as the value of "accept-charset". - If the "styleClass" attribute is specified, render its value as the - value of the "class" attribute. Render a "name" - attribute with a value the same as the "id" attribute as described - in "General Notes on - Encoding" regarding the "id" attribute for UIInput - components.

              Obtain the UIViewRoot view identifier and - use it to obtain an action URL by calling ViewHandler.getActionURL. - Use the action URL to obtain an encoded action URL by calling - ExternalContext.encodeActionURL. Obtain an - encoded partial action URL by calling - ExternalContext.encodePartialActionURL using action URL as the argument. - Compare the result from ExternalContext.encodePartialActionURL with the - value from ExternalContext.encodeActionURL(). If they are different, - render a hidden field with the name jakarta.faces.encodedURL and the value - of this hidden field as the value from ExternalContext.encodePartialActionURL.

              - Call ViewHandler.writeState() - before the the close of the "form" element. - Render all the necessary hidden fields - for all commandLink instances in the page just before the close of the "form" element. -
              - Just before rendering the closing </form> element tag, render - any resources that have been targeted for this form: -
                -
              • Obtain a UIViewRoot instance.
              • -
              • Obtain a List of component resources targeted for - this form with a call to UIViewRoot.getComponentResources() - with the String "form" as the argument.
              • -
              • Iterate over the returned List of UIComponent instances - and call encodeAll on each UIComponent instance. -
              -
              -

              -
            - ]]>
            - jakarta.faces.Form - jakarta.faces.Form - com.sun.faces.renderkit.html_basic.FormRenderer - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - List of content types that a server processing this form - will handle correctly - - Content Type - - accept - java.lang.String - - true - - - - - List of character encodings for input data - that are accepted by the server processing - this form. - - Character Set - - acceptcharset - java.lang.String - - - - Content type used to submit the form to the server. If not - specified, the default value is - "application/x-www-form-urlencoded". - - Encoding Type - - enctype - java.lang.String - - "application/x-www-form-urlencoded" - true - - - - - Javascript code executed when this form is reset. - - Form Reset Script - - onreset - java.lang.String - - true - - - - - Javascript code executed when this form is submitted. - - Form Submit Script - - onsubmit - java.lang.String - - true - - - - - Name of a frame where the response - retrieved after this form submit is to - be displayed. - - Target Frame - - target - java.lang.String - - true - - - - - true - form - -
            - - Renders an HTML "img" - element. Render the clientId as the value of the "id" - attribute.

            - -
            - -

            Handling the Value

            - -
              - -

              If the "name" attribute is present, execute algorithm - Common Algorithm for Obtaining A Resource to Render - to obtain a Resource instance. - Call Resource.getRequestPath() and output the result as the - value of the "src" attribute on the rendered markup.

              - -

              Otherwise, if the "url" attribute is present, treat its value as - if it was the value of the "value" attribute. Otherwise, if the - "value" attribute is present, render the value of the component as - the value of the "src" attribute, after passing it to the - getResourceURL() method of the ViewHandler - for this application, and passing the result through the - encodeResourceURL() method of the - ExternalContext.

              - -

              When handling the "src" attribute, - the value must not be escaped. For example, & must not - be turned into &amp;. If the "styleClass" - attribute is specified, render its value as the value of the "class" - attribute.

              - -
            - -
            ]]>
            - jakarta.faces.Graphic - jakarta.faces.Image - com.sun.faces.renderkit.html_basic.ImageRenderer - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - Alternate textual description of the - element rendered by this component. - - Alternate Text - - alt - java.lang.String - - true - - - - - Override for the height of this image. - - Image Height - - height - java.lang.String - - true - - - - - Flag indicating that this image is to be used as a server side - image map. Such an image must be enclosed within a hyperlink - ("a"). A value of false causes no attribute to be rendered, - while a value of true causes the attribute to be rendered as - ismap="ismap". - - Image Map Flag - - ismap - boolean - - false - - - - - URI to a long description of the image - represented by this element. - - Long Description - - longdesc - java.lang.String - - true - - - - - The name of a client side image map (an HTML "map" - element) for which this element provides the image. - - Use Image Map - - usemap - java.lang.String - - true - - - - - Override for the width of this image. - - Image Width - - width - java.lang.String - - true - - - - - -

            The libraryName for this resource.

            ]]>
            - Library Name - - library - java.lang.String - - false - true - -
            - - -

            The - resourceName for this resource.

            ]]>
            - Resource Name - - name - java.lang.String - - false - true - -
            - - true - -
            - - This - renderer is intended to be used with an arbitrary markup - element whose decoding needs can be entirely described by - the section "General notes on decoding" in the RenderKit - overview.

            - -
            -

            The local name of the rendered element must first be - determined for encoding. Look in the components's pass through - attribute map for a value under the key given by the value of the - symbolic constant - Renderer.PASSTHROUGH_RENDERER_LOCALNAME_KEY. If not found, - throw a FacesException. If found, let this value be - localName.

            - - -

            Encode Behavior

            - -

            If the component has a manually declared, not auto-generated - clientId, or if the component has behaviors attached to it, render the - clientId as the value of the "id" attribute.

            - -
            - - -]]>
            - jakarta.faces.Panel - jakarta.faces.passthrough.Element - com.sun.faces.renderkit.html_basic.PassthroughRenderer - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - false - -
            - - Renders - an HTML "input" element of "type" "file". The standard HTML_BASIC - RenderKit specifies behavior that assumes Servlet 3.0 or later. - Portlet implementations must override this implementation with a - semantically equivalent one that functions under the constraints - of the Portlet specification.

            - -
            - -

            Decode Behavior

            - -
              - -

              Obtain the Map from the "requestParameterMap" - property of the ExternalContext. If the - Map contains an entry for the "clientId" of the - component, pass the value of the entry to the - setSubmittedValue() method of the component, which - must be an instance of EditableValueHolder, and - return. Otherwise, obtain the "request" property from the - ExternalContext and cast it to - jakarta.servlet.http.HttpServletRequest. Call - getParts() on the httpServletRequest. Iterate over - the parts. If the "name" property of the current part is equal to - the "clientId", pass the current part to the - setSubmittedValue() method of the component. If an - exception is thrown during the iteration, log the exception and - continue.

              - -

              The standard implementation must override the - getConvertedValue() so that it simply returns the - submittedValue argument.

              - -

              Any exception thrown when interacting with the underlying - multi-part API must be wrapped in a FacesException - and allowed to reach the ExceptionHandler.

              - -
            - -

            Encode Behavior

            - -
              - -

              Render the clientId of the component as the value of the - "name" attribute. Do not render the "value" attribute. If the - "styleClass" attribute is specified, render its value as the value - of the "class" attribute.

              - -

              If ProjectStage is not - ProjectStage.Production, verify that the enclosing - form has an enctype attribute whose value is - multipart/form-data. If not, add a - FacesMessage for this component's clientId to the - FacesContext stating that file upload requires a form - with enctype equal to - multipart/form-data. If ProjectStage - is ProjectStage.Production, do not - do this verification.

              - -
            - -
            ]]>
            - jakarta.faces.Input - jakarta.faces.File - com.sun.faces.renderkit.html_basic.FileRenderer - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Access key that, when pressed, transfers focus - to this element. - - Access Key - - accesskey - java.lang.String - - true - - - - - Javascript code executed when this element loses focus. - - Focus Off Script - - onblur - java.lang.String - - true - - - - - - Javascript code executed when this element receives focus. - - Focus On Script - - onfocus - java.lang.String - - true - - - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - Tab Index - - tabindex - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - Disabled Flag - - disabled - boolean - - false - - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - Input Change Script - - onchange - java.lang.String - - false - - valueChange - true - - - - - Javascript code executed when text within this - element is selected by the user. - - Text Select Script - - onselect - java.lang.String - - true - - - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - Read Only Flag - - readonly - boolean - - false - - - - - A localized user presentable name for this component. - - Label - - label - java.lang.String - - true - - - - - - - Alternate textual description of the - element rendered by this component. - - Alternate Text - - alt - java.lang.String - - true - - - - - If the value of this attribute is "off", render "off" as the value - of the attribute. This indicates that the browser should - disable its autocomplete feature for this component. This is - useful for components that perform autocompletion and do not - want the browser interfering. If this attribute is not set or the value - is "on", render nothing. - - Enable or disable browser autocompletion. - - autocomplete - java.lang.String - - - - The maximum number of characters that may - be entered in this field. - - Maximum Length - - maxlength - int - - true - - - - - The number of characters used to determine - the width of this field. - - Field Width - - size - int - - true - - - - - false - -
            - - Renders an HTML "input" element of type - "hidden".

            - -

            Decode Behavior

            - -
              -

              See the decode description for the Input Text renderer.

              -
            - -

            Encode Behavior

            - -
              - -

              Render the clientId of the component as the value of the - "name" attribute. Render the current value of the component as - the value of the "value" attribute.

              - -
            ]]>
            - jakarta.faces.Input - jakarta.faces.Hidden - - com.sun.faces.renderkit.html_basic.HiddenRenderer - - - true - -
            - - Renders an HTML "input" element of "type" "password".

            - -

            Decode Behavior

            - -
              -

              See the decode description for the Input Text renderer.

              -
            - -

            Encode Behavior

            - -
              - -

              - Render the clientId of the component as the value of the "name" - attribute. Render the current value of the component as the value - of the "value" attribute, if and only if the "redisplay" component - attribute is the string "true". If the "styleClass" attribute is - specified, render its value as the value of the "class" - attribute.

              - -
            ]]>
            - jakarta.faces.Input - jakarta.faces.Secret - - com.sun.faces.renderkit.html_basic.SecretRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Access key that, when pressed, transfers focus - to this element. - - Access Key - - accesskey - java.lang.String - - true - - - - - Javascript code executed when this element loses focus. - - Focus Off Script - - onblur - java.lang.String - - true - - - - - - Javascript code executed when this element receives focus. - - Focus On Script - - onfocus - java.lang.String - - true - - - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - Tab Index - - tabindex - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - Disabled Flag - - disabled - boolean - - false - - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - Input Change Script - - onchange - java.lang.String - - false - - valueChange - true - - - - - Javascript code executed when text within this - element is selected by the user. - - Text Select Script - - onselect - java.lang.String - - true - - - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - Read Only Flag - - readonly - boolean - - false - - - - - A localized user presentable name for this component. - - Label - - label - java.lang.String - - true - - - - - - - Alternate textual description of the - element rendered by this component. - - Alternate Text - - alt - java.lang.String - - true - - - - - If the value of this attribute is "off", render "off" as the value - of the attribute. This indicates that the browser should - disable its autocomplete feature for this component. This is - useful for components that perform autocompletion and do not - want the browser interfering. If this attribute is not set or the value - is "on", render nothing. - - Enable or disable browser autocompletion. - - autocomplete - java.lang.String - - - - The maximum number of characters that may - be entered in this field. - - Maximum Length - - maxlength - int - - true - - - - - The number of characters used to determine - the width of this field. - - Field Width - - size - int - - true - - - - - - - Flag indicating that any existing value - in this field should be rendered when the - form is created. Because this is a potential - security risk, password values are not - displayed by default. - - Redisplay Flag - - redisplay - boolean - - - - true - -
            - - Renders - an HTML "input" element of "type" "text".

            - -

            Decode Behavior

            - -
              - -

              Obtain the Map from the "requestParameterMap" - property of the ExternalContext. If the - Map contains an entry for the "clientId" of the - component, pass the value of the entry to the - setSubmittedValue() method of the component, which - must be an instance of EditableValueHolder.

              - -
            - -

            Encode Behavior

            - -
              - -

              Render the clientId of the component as - the value of the "name" attribute. Render the current value of - the component as the value of the "value" attribute. If the - "styleClass" attribute is specified, render its value as the value - of the "class" attribute. -

              - -

              If this element has children, they - must be ignored by default. Implementions may provide a - configuration option that allows this element to render its - children.

              - -
            ]]>
            - jakarta.faces.Input - jakarta.faces.Text - - com.sun.faces.renderkit.html_basic.TextRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Access key that, when pressed, transfers focus - to this element. - - Access Key - - accesskey - java.lang.String - - true - - - - - Javascript code executed when this element loses focus. - - Focus Off Script - - onblur - java.lang.String - - true - - - - - - Javascript code executed when this element receives focus. - - Focus On Script - - onfocus - java.lang.String - - true - - - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - Tab Index - - tabindex - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - Disabled Flag - - disabled - boolean - - false - - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - Input Change Script - - onchange - java.lang.String - - false - - valueChange - true - - - - - Javascript code executed when text within this - element is selected by the user. - - Text Select Script - - onselect - java.lang.String - - true - - - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - Read Only Flag - - readonly - boolean - - false - - - - - A localized user presentable name for this component. - - Label - - label - java.lang.String - - true - - - - - - - Alternate textual description of the - element rendered by this component. - - Alternate Text - - alt - java.lang.String - - true - - - - - If the value of this attribute is "off", render "off" as the value - of the attribute. This indicates that the browser should - disable its autocomplete feature for this component. This is - useful for components that perform autocompletion and do not - want the browser interfering. If this attribute is not set or the value - is "on", render nothing. - - Enable or disable browser autocompletion. - - autocomplete - java.lang.String - - - - The maximum number of characters that may - be entered in this field. - - Maximum Length - - maxlength - int - - true - - - - - The number of characters used to determine - the width of this field. - - Field Width - - size - int - - true - - - - - false - -
            - - Renders an HTML "textarea" element.

            - -

            Decode Behavior

            - -
              - -

              See the encode description for the Input - Text renderer.

              - -
            - -

            Encode Behavior

            - -
              - -

              Render the - clientId as the value of the "name" attribute. Render the current - valu eof the component inside the "textarea" - element.

            ]]>
            - jakarta.faces.Input - jakarta.faces.Textarea - - com.sun.faces.renderkit.html_basic.TextareaRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Access key that, when pressed, transfers focus - to this element. - - Access Key - - accesskey - java.lang.String - - true - - - - - Javascript code executed when this element loses focus. - - Focus Off Script - - onblur - java.lang.String - - true - - - - - - Javascript code executed when this element receives focus. - - Focus On Script - - onfocus - java.lang.String - - true - - - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - Tab Index - - tabindex - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - Disabled Flag - - disabled - boolean - - false - - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - Input Change Script - - onchange - java.lang.String - - false - - valueChange - true - - - - - Javascript code executed when text within this - element is selected by the user. - - Text Select Script - - onselect - java.lang.String - - true - - - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - Read Only Flag - - readonly - boolean - - false - - - - - A localized user presentable name for this component. - - Label - - label - java.lang.String - - true - - - - - - - The number of columns to be displayed. - - Columns - - cols - int - - true - - - - - The number of rows to be displayed. - - Rows - - rows - int - - true - true - - - - - true - -
            - - Render a single message for a specific component.

            - -

            Set-up for Rendering

            - -
              - -

              Obtain the "summary" and "detail" properties from - UIMessage component. If not present, keep the - empty string as the value, respectively. Obtain the first - FacesMessage to render from the component, using - the "for" property of the UIMessage. -

              If the "for" property is set and - not empty, the SearchExpressionHandler must be used to - resolve the associated component.

              This will be - the only message we render. Obtain the severity style for this - message. If the severity of the message is - FacesMessage.SEVERITY_INFO, the severity style - comes from the value of the "infoStyle" attribute. If the - severity of the message is - FacesMessage.SEVERITY_WARN, the severity style - comes from the value of the "warnStyle" attribute, and so on for - each of the severities, INFO, WARN, ERROR and - FATAL. The same rules apply for obtaining the - severity style class, but instead of "infoStyle, warnStyle", etc - use "infoClass, warnClass", etc. Obtain the "style", - "styleClass" and "layout" attributes from the - UIMessage component. If we have a "style" - attribute and a severity style attribute, use the severity style - attribute as the value of the "style" attribute. If we have no - "style" attribute, but do have a severity style, use the - severity style as the value of the "style" attribute. The same - precedence rules apply for the style class. Obtain the value of - the dir and lang attributes.

              - -
            - -

            Rendering

            - -
              - -

              For the message renderer, we only render one row, for the first - message. For the messages renderer, we render as many rows as we - have messages. If any of the "dir", "lang", "style" or - "styleClass" attributes has a non-null value (as determined - above), render a "span" element, outputting the value of the - "style" attribute as the the value of the "style" attribute, and - outputting the value of the "styleClass" attribute as the value of - the "class" attribute on the "span" element. Output the "dir" and - "lang" attributes as well, if they are present. If the - UIMessage has a "tooltip" attribute with the value of - "true", and we haven't already written out the "span" and the "title" attribute for - the "span", output the "detail" as the value of the "title" attribute on the - "span". If we haven't already written out a "title" attribute, and there is - no detail, output the "summary" as the value of the "title" attribute. - Close out the span if necessary.

              - -
            ]]>
            - jakarta.faces.Message - jakarta.faces.Message - - com.sun.faces.renderkit.html_basic.MessageRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - CSS style class to apply to any message - with a severity class of "ERROR". - - Error Class - - errorClass - java.lang.String - - - - CSS style(s) to apply to any message - with a severity class of "ERROR". - - Error Styles - - errorStyle - java.lang.String - - - - CSS style class to apply to any message - with a severity class of "FATAL". - - Fatal Class - - fatalClass - java.lang.String - - - - CSS style(s) to apply to any message - with a severity class of "FATAL". - - Fatal Styles - - fatalStyle - java.lang.String - - - - CSS style class to apply to any message - with a severity class of "INFO". - - Info Class - - infoClass - java.lang.String - - - - CSS style(s) to apply to any message - with a severity class of "INFO". - - Info Styles - - infoStyle - java.lang.String - - - - Flag indicating whether the detail portion of the - message should be displayed as a tooltip. - - Tooltip - - tooltip - boolean - - - - CSS style class to apply to any message - with a severity class of "WARN". - - Warning Class - - warnClass - java.lang.String - - - - CSS style(s) to apply to any message - with a severity class of "WARN". - - Warning Styles - - warnStyle - java.lang.String - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - true - -
            - - The same as for the - Message renderer, but output all the messages. If an "id" attribute has been specified, - it must be rendered on the outermost markup corresponding to this - component. If the value of the "layout" attribute is - "table", render nested "table", "tr", and "td" elements, in that - order. If the value of the "layout" attribute is "list", or the - "layout" attribute is not specified, render nested "ul", "li" - elements, in that order. Output the value of the "style" attribute - as the value of the "style" attribute, output the value of the - "styleClass" attribute as the value of the "class" attribute, and - output the dir and lang attributes. Output these values on the - "table" element or the "ul" element. Output the values of the - "errorStyle", "fatalStyle", "infoStyle", "warnStyle" attributes as - the value of the "style" attribute on either the "tr" element or - the "li" element. Output the values of the "errorClass", - "fatalClass", "infoClass", "warnClass" attributes as the value of - the "class" attribute on either the "tr" element or the "li" - element. The component is a UIMessages, and there is - no "for" attribute. Therefore, use either null to - obtain the messages from the FacesContext or the empty - string if the components "globalOnly" property is - true. If the layout was "table" close out the table - elements, otherwise, close out the list elements.

            - - ]]>
            - jakarta.faces.Messages - jakarta.faces.Messages - - com.sun.faces.renderkit.html_basic.MessagesRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - CSS style class to apply to any message - with a severity class of "ERROR". - - Error Class - - errorClass - java.lang.String - - - - CSS style(s) to apply to any message - with a severity class of "ERROR". - - Error Styles - - errorStyle - java.lang.String - - - - CSS style class to apply to any message - with a severity class of "FATAL". - - Fatal Class - - fatalClass - java.lang.String - - - - CSS style(s) to apply to any message - with a severity class of "FATAL". - - Fatal Styles - - fatalStyle - java.lang.String - - - - CSS style class to apply to any message - with a severity class of "INFO". - - Info Class - - infoClass - java.lang.String - - - - CSS style(s) to apply to any message - with a severity class of "INFO". - - Info Styles - - infoStyle - java.lang.String - - - - The type of layout markup to use when rendering - error messages. Valid values are "table" (an HTML - table) and "list" (an HTML list). If not specified, - the default value is "list". - - Layout - - layout - java.lang.String - - "list" - - - - - Flag indicating whether the detail portion of the - message should be displayed as a tooltip. - - Tooltip - - tooltip - boolean - - - - CSS style class to apply to any message - with a severity class of "WARN". - - Warning Class - - warnClass - java.lang.String - - - - CSS style(s) to apply to any message - with a severity class of "WARN". - - Warning Styles - - warnStyle - java.lang.String - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - true - -
            - - Render parameterized text. Obtain the - style, styleClass, dir, and - lang attributees from this component. If any are - present, render a "span" element. Output the - styleClass attribute (if present) as the value of the - class attribute. Output the style - attribute as the value of the style attribute. - Output the dir and lang attributes as - ignored-by-renderer attributes. Accrue a list of the values of all child - UIParameter components of this component. If there - are one or more accumulated parameter values, convert the list of - parameter values to an Object array, call - MessageFormat.format(), passing the - value of this component as the first argument, and - the array of parameter values as the second argument, and render - the result. Otherwise, render the value of this - component unmodified.

            ]]>
            - jakarta.faces.Output - jakarta.faces.Format - - com.sun.faces.renderkit.html_basic.OutputMessageRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Flag indicating that characters that are sensitive - in HTML and XML markup must be escaped. This flag - is set to "true" by default. - - Escape Characters - - escape - boolean - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - true - -
            - - Renders an HTML - "label" element.

            - -

            Render the - current value of the component as label text if it is - specified. If a "for" attribute is specified, find the - component specified by the value of the "for" attribute - via the - SearchExpressionHandler, and render its - client id as the value of the "for" attribute. If - "styleClass" attribute is specified, render its value as the - value of the "class" attribute. -

            - - ]]>
            - jakarta.faces.Output - jakarta.faces.Label - - com.sun.faces.renderkit.html_basic.LabelRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Access key that, when pressed, transfers focus - to this element. - - Access Key - - accesskey - java.lang.String - - true - - - - - Javascript code executed when this element loses focus. - - Focus Off Script - - onblur - java.lang.String - - true - - - - - - Javascript code executed when this element receives focus. - - Focus On Script - - onfocus - java.lang.String - - true - - - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - Tab Index - - tabindex - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - Search expression to the component - for which this element is a label.

            - - ]]>
            - Associated component - - for - java.lang.String - - false - -
            - - - Flag indicating that characters that are sensitive - in HTML and XML markup must be escaped. If omitted, this - flag is assumed to be "true". - - Escape Characters - - escape - boolean - - true - true - - - - - true - -
            - - Render an HTML "a" anchor - element. The value of the component is rendered as the - value of the "href" attribute. Any child UIParameter - components whose - disable property is false - are appended to the String to be output as the value of the - "href" attribute as query parameters before rendering. The - entire "href" string must be processed by a call to the - encodeResourceURL() method of the - ExternalContext. The name of the UIParameter - goes on the left hand side, and the value of the UIParameter - on the right hand side. The name and the value must be - URLEncoded. Note that the required url encoding is - handled by - ResponseWrter.writeURIAttribute(). Each - UIParameter instance is separeted by an ampersand, as - dictated in the URL spec. If the "styleClass" attribute is - specified, render its value as the value of the "class" - attribute. If the "id" attribute is specified, follow the - same steps as mentioned in the "General Notes - on Encoding" regarding the "id" attribute for UIInput - components. If the "disabled" attribute is specified, do - not render the HTML "a" anchor element or the "href" - element. Instead, render a "span" element. If the - "styleClass" attribute is specified, render its value as the - value of the "class" attribute on the "span". Render any - ignored-by-renderer attributes on the "span". - -

            ]]>
            - jakarta.faces.Output - jakarta.faces.Link - - com.sun.faces.renderkit.html_basic.OutputLinkRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Access key that, when pressed, transfers focus - to this element. - - Access Key - - accesskey - java.lang.String - - true - - - - - Javascript code executed when this element loses focus. - - Focus Off Script - - onblur - java.lang.String - - true - - - - - - Javascript code executed when this element receives focus. - - Focus On Script - - onfocus - java.lang.String - - true - - - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - Tab Index - - tabindex - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - The character encoding of the resource designated - by this hyperlink. - - Character Set - - charset - java.lang.String - - true - - - - - The position and shape of the hot spot on the screen - (for use in client-side image maps). - - Coordinates - - coords - java.lang.String - - true - - - - - The language code of the resource designated - by this hyperlink. - - Language - - hreflang - java.lang.String - - true - - - - - The relationship from the current document - to the anchor specified by this hyperlink. - The value of this attribute is a space-separated - list of link types. - - Relationship - - rel - java.lang.String - - true - - - - - A reverse link from the anchor specified - by this hyperlink to the current document. - The value of this attribute is a space-separated - list of link types. - - Reverse Link - - rev - java.lang.String - - true - - - - - The shape of the hot spot on the screen - (for use in client-side image maps). Valid - values are: default (entire region); rect - (rectangular region); circle (circular region); - and poly (polygonal region). - - Shape - - shape - java.lang.String - - true - - - - - Name of a frame where the resource - retrieved via this hyperlink is to - be displayed. - - Target Frame - - target - java.lang.String - - false - - - - - The content type of the resource designated - by this hyperlink. - - Content Type - - type - java.lang.String - - true - - - - - Flag indicating that this element must never - receive focus or be included in a subsequent - submit. - - Disabled Flag - - disabled - boolean - - false - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - false - - action - true - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - true - true - -
            - - Render an HTML "a" anchor element. The value of the -component is rendered as the anchor text and the outcome of the -component is used to determine the target URL rendered in the "href" -attribute. Execute the Algorithm -to obtain the URL to which the user-agent should issue a GET request -when clicked.

            - -

            Any child UIParameter components -whose disable -property is false are appended to the String to be -output as the value of the "href" attribute as query parameters before -rendering. The entire "href" string must be processed by a call to -the encodeResourceURL() method of the -ExternalContext. The name of the UIParameter -goes on the left hand side, and the value of the -UIParameter on the right hand side. The name and the value -must be URLEncoded. Note that -the required url encoding is handled by -ResponseWrter.writeAttribute(). Each -UIParameter instance is separated by an ampersand, as -dictated in the URL spec. If the "fragment" attribute is specified, the -value will be included at the end of the resulting URL preceded by a -hash mark. If the "styleClass" attribute is specified, render its value -as the value of the "class" attribute.

            - -

            If the "id" attribute is specified, follow -the same steps as mentioned in the "General Notes on -Encoding" regarding the "id" attribute for UIInput components. If -the "disabled" attribute is specified, do not render the HTML "a" anchor -element or the "href" element. Instead, render a "span" element. If -the "styleClass" attribute is specified, render its value as the value -of the "class" attribute on the "span". Render any ignored-by-renderer -attributes on the "span".

            - -
            - -

            To support entering flows that are defined by both a defining - document id and a flow id, add a component attribute to this - component whose name is given by the value of the symbolic - constant - jakarta.faces.event.ActionListener.TO_FLOW_DOCUMENT_ID_ATTR_NAME, - and whose value is the defining document id. For example, when - using this component in a facelet page, the following markup - would cause such an attribute to be added.

            - -
            <h:link id="start_a" value="enter flow-a" outcome="flow-a">
            -  <f:attribute name="to-flow-document-id" value="unique"/>
            -</h:link>
            -
            - -
            - -]]>
            - jakarta.faces.OutcomeTarget - jakarta.faces.Link - - com.sun.faces.renderkit.html_basic.OutcomeTargetLinkRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Access key that, when pressed, transfers focus - to this element. - - Access Key - - accesskey - java.lang.String - - true - - - - - Javascript code executed when this element loses focus. - - Focus Off Script - - onblur - java.lang.String - - true - - - - - - Javascript code executed when this element receives focus. - - Focus On Script - - onfocus - java.lang.String - - true - - - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - Tab Index - - tabindex - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - The character encoding of the resource designated - by this hyperlink. - - Character Set - - charset - java.lang.String - - true - - - - - The position and shape of the hot spot on the screen - (for use in client-side image maps). - - Coordinates - - coords - java.lang.String - - true - - - - - The language code of the resource designated - by this hyperlink. - - Language - - hreflang - java.lang.String - - true - - - - - The relationship from the current document - to the anchor specified by this hyperlink. - The value of this attribute is a space-separated - list of link types. - - Relationship - - rel - java.lang.String - - true - - - - - A reverse link from the anchor specified - by this hyperlink to the current document. - The value of this attribute is a space-separated - list of link types. - - Reverse Link - - rev - java.lang.String - - true - - - - - The shape of the hot spot on the screen - (for use in client-side image maps). Valid - values are: default (entire region); rect - (rectangular region); circle (circular region); - and poly (polygonal region). - - Shape - - shape - java.lang.String - - true - - - - - Name of a frame where the resource - retrieved via this hyperlink is to - be displayed. - - Target Frame - - target - java.lang.String - - false - - - - - The content type of the resource designated - by this hyperlink. - - Content Type - - type - java.lang.String - - true - - - - - Flag indicating that this element must never - receive focus or be included in a subsequent - submit. - - Disabled Flag - - disabled - boolean - - false - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - false - - action - true - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - The identifier of the page fragment which should - be brought into focus when the target page is - rendered. The value of this attribute is appended - to the end of target URL following a hash (#) mark. - This notation is part of the standard URL syntax. - - Fragment Identifier - - fragment - java.lang.String - - - - - Disable appending the ClientWindow on the rendering of this element.

            - ]]>
            - Disable ClientWindow on rendered OutcomeTarget - - disableClientWindow - java.lang.Boolean - - false - -
            - - - true - true - link - -
            - - Render a button that does not -cause an HTTP POST.

            - -
            - -

            Encode Behavior

            - -

            Render an HTML "input" element of type "button". The value of the -component is rendered as the button text and the outcome of the -component is used to determine the target URL which is activated by -onclick. If "image" attribute is specified, render it as the value of -the "src" attribute after passing it to the -getResourceURL() method of the ViewHandler for -this application, and passing the result through the -encodeResourceURL() method of the -ExternalContext.

            - -

            If the component is not disabled, take the following actions.

            - -

            Algorithm to obtain the url to which the user-agent should issue a GET request when clicked

            - -

            Obtain the NavigationCase that corresponds to the - component instance for this Renderer.

            - -

            Obtain an instance of - jakarta.faces.application.ConfigurableNavigationHandler - from the ViewHandler. If no such instance can be - obtained, write the "disabled" attribute on the button. Otherwise, - let outcome be the result of calling - getOutcome() on the argument component, which must be an - instance of UIOutcomeTarget. If this result is - null, let outcome be the viewId of the current - UIViewRoot. Obtain a - reference to the NavigationCase, called navCase - for discussion. If the component has a non-null - attribute named by the value of the symbolic constant - jakarta.faces.event.ActionListener.TO_FLOW_DOCUMENT_ID_ATTR_NAME, - let navCase be the return from calling - getNavigationCase() on the - ConfigurableNavigationHandler, passing the current - FacesContext as the first argument, null, as - the second argument, outcome as the third argument, and the - value of the TO_FLOW_DOCUMENT_ID_ATTR_NAME attribute as - the fourth argument. Otherwise, let navCase be the return - from calling getNavigationCase() on the - ConfigurableNavigationHandler, passing the current - FacesContext as the first argument, null, as - the second argument, and outcome as the third - argument. If this returns null, log an informative - error which includes the component id, and write the "disabled" - attribute on the component markup, with the value of - true. Otherwise obtain the encoded target URL using the - following algorithm.

            - -

            Algorithm to obtain the encoded target URL

            - -
              - -
            • Let params be the Map<String, - List<String>> to be passed to - ViewHandler.getBookmarkableURL(). Build this map up first - from any child UIParameter components. These children must - be processed in the order in which they appear as children. If multiple - children with the same name are encountered, their values must appear in - the List<String> in the Map entry with - the same name, and appear in the list in the same order as their child - order.

            • - -
            • Obtain any parameters included within the - navigation case. Call getParameters() on - navCase. The result will be a Map<String, - List<String>>. If the result is - non-null and non-empty, iterate over the entries - from the result Map and, if no entry with the - same name exists in params, set the value from the - current entry as the value in the params - Map.

            • - -
            • If the navigation case has a - non-null toFlowDocumentId property, add two - parameters as shown in this table.

              - - - - - - - - - - - - - - - - - - - -
              parameter nameparameter value
              value of FlowHandler.TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAMEvalue of the toFlowDocumentId property - of the navigation case
              value of FlowHandler.FLOW_ID_REQUEST_PARAM_NAMEvalue of the fromOutcome property - of the navigation case
              - - -
            • - -
            • Let includeViewParams be the result of a - logical OR of the results from calling - isIncludeViewParams() on the argument - UIOutcomeTarget component and calling - isIncludeViewParams on navCase.

            • - - -
            • Call getBookmarkableURL() on the - ViewHandler, passing the current - FacesContext as the first argument, the return - from calling getToViewId() as the second - argument, params as the third argument, and - includeViewParams as the last argument.

            • - -
            - -

            The entire target URL string must be processed by a call to - the encodeResourceURL() method of the - ExternalContext. The name of the - UIParameter goes on the left hand side, and the value of - the UIParameter on the right hand side. The name and the - value must be URLEncoded. Each UIParameter instance is - separeted by an ampersand, as dictated in the URL spec. The final - encoded result will be written out to the onclick attribute of the - button as "window.location.href = ''". If the - developer has specified a custom onlclick the window.location.href - name/value pair will be appended at the end of the developer specified - script. If the "fragment" attribute is specified, the value will be - included at the end of the resulting URL preceded by a hash mark. If - the "styleClass" attribute is specified, render its value as the value - of the "class" attribute. If the "id" attribute is specified, follow - the same steps as mentioned in the "General - Notes on Encoding" regarding the "id" attribute for UIInput - components. If the "disabled" attribute is specified, do not render - the "onclick" element and assign the "disabled" attribute a value of - true.

            - -
            - -
            - -

            Because this renderer is responsible for rendering its own - children, the renderer will decide if the end tag is required or - not based on the presence or absence of children for the - component.

            - -

            To support entering flows that are defined by both a defining - document id and a flow id, add a component attribute to this - component whose name is given by the value of the symbolic - constant - jakarta.faces.event.ActionListener.TO_FLOW_DOCUMENT_ID_ATTR_NAME, - and whose value is the defining document id. For example, when - using this component in a facelet page, the following markup - would cause such an attribute to be added.

            - -
            <h:button id="start_a" value="enter flow-a" outcome="flow-a">
            -  <f:attribute name="to-flow-document-id" value="unique"/>
            -</h:button>
            -
            - - - -
            - -]]>
            - jakarta.faces.OutcomeTarget - jakarta.faces.Button - - com.sun.faces.renderkit.html_basic.OutcomeTargetButtonRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Access key that, when pressed, transfers focus - to this element. - - Access Key - - accesskey - java.lang.String - - true - - - - - Javascript code executed when this element loses focus. - - Focus Off Script - - onblur - java.lang.String - - true - - - - - - Javascript code executed when this element receives focus. - - Focus On Script - - onfocus - java.lang.String - - true - - - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - Tab Index - - tabindex - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Alternate textual description of the - element rendered by this component. - - Alternate Text - - alt - java.lang.String - - true - - - - - Absolute or relative URL of the - image to be displayed for this - button. If specified, this - "input" element will be of type - "image". Otherwise, it will be - of the type specified by the - "type" property with a label - specified by the "value" - property. Note - that if the value of this - attribute starts with "/", the - rendered value for this - attribute will be prefixed with - the context-root for this - application. -

            ]]>
            - Image URL - - image - java.lang.String -
            - - - - - The identifier of the page fragment which should - be brought into focus when the target page is - rendered. The value of this attribute is appended - to the end of target URL following a hash (#) mark. - This notation is part of the standard URL syntax. - - Fragment Identifier - - fragment - java.lang.String - - - - - Disable appending the ClientWindow on the rendering of this element.

            - ]]>
            - Disable ClientWindow on rendered OutcomeTarget - - disableClientWindow - java.lang.Boolean - - false - -
            - - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - Disabled Flag - - disabled - boolean - - false - - - - - true - true - button - -
            - - If the - "styleClass", "style", "dir" or "lang" attributes are present, - render a "span" element. If the "styleClass" attribute is - present, render its value as the value of the "class" attribute. - If the "style" attribute is present, convey it unmodified. If the - "escape" attribute is not present, or it is present and its value - is "true" all angle brackets should be converted to the ampersand - xx semicolon syntax when rendering the value of the "value" - attribute as the value of the component. If the "escape" - attribute is present and is "false" the value of the component - should be rendered as text without escaping.

            - -

            If this element has children, - they must be ignored by default. Implementions may provide a - configuration option that allows this element to render its - children.

            ]]>
            - jakarta.faces.Output - jakarta.faces.Text - - com.sun.faces.renderkit.html_basic.TextRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Flag indicating that characters that are sensitive - in HTML and XML markup must be escaped. This flag - is set to "true" by default. - - Escape Characters - - escape - boolean - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - false - -
            - - UIPanel component inside - of a "tbody" element. Render the children based on the value of - the "columns" attribute, creating a new row each time a "columns" - worth of children have been rendered. For the start of each row, - render a "tr" element. Output the value of the "rowClasses" per - the attribute description below. For each child, output a "td" - element, attaching the value of the "columnClasses" attribute per - the attribute description below. Recursively encode each child. - Close out the "td" element. When done with the row, close out the - "tr" element. If a child has "rendered==false" it is not rendered, - and the column counter must not be incremented.]]> - jakarta.faces.Panel - jakarta.faces.Grid - - com.sun.faces.renderkit.html_basic.GridRenderer - - - header - - - footer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - Name or code of the background color for this table. - - Background Color - - bgcolor - java.lang.String - - true - - - - - Width (in pixels) of the border to be drawn - around this table. - - Table Border - - border - int - - true - - - - - Definition of how much space the user agent should - leave between the border of each cell and its contents. - - Cell Padding - - cellpadding - java.lang.String - - true - - - - - Definition of how much space the user agent should - leave between the left side of the table and the - leftmost column, the top of the table and the top of - the top side of the topmost row, and so on for the - right and bottom of the table. It also specifies - the amount of space to leave between cells. - - Cell Spacing - - cellspacing - java.lang.String - - true - - - - - Comma-delimited list of CSS style classes that will be applied - to the columns of this table. A space separated list of - classes may also be specified for any individual column. If - the number of elements in this list is less than the number of - actual column children of the UIData, no "class" - attribute is output for each column greater than the number of - elements in the list. If the number of elements in the list - is greater than the number of actual column children of the - UIData, the elements at the posisiton in the list - after the last column are ignored. - - Column CSS Classes - - columnClasses - java.lang.String - - - - Space-separated list of CSS style class(es) that will be - applied to any footer generated for this table. - - Footer CSS Classes - - footerClass - java.lang.String - - - - Code specifying which sides of the frame surrounding - this table will be visible. Valid values are: - none (no sides, default value); above (top side only); - below (bottom side only); hsides (top and bottom sides - only); vsides (right and left sides only); lhs (left - hand side only); rhs (right hand side only); box - (all four sides); and border (all four sides). - - Table Frame - - frame - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) that will be - applied to any caption generated for this table. - - Caption CSS Classes - - captionClass - java.lang.String - - - - CSS style(s) to be applied when this caption is rendered. - - Caption CSS Styles - - captionStyle - java.lang.String - - - - Space-separated list of CSS style class(es) that will be - applied to any header generated for this table. - - Header CSS Classes - - headerClass - java.lang.String - - - - Comma-delimited list of CSS style classes that will be applied - to the rows of this table. A space separated list of classes - may also be specified for any individual row. Thes styles are - applied, in turn, to each row in the table. For example, if - the list has two elements, the first style class in the list - is applied to the first row, the second to the second row, the - first to the third row, the second to the fourth row, etc. In - other words, we keep iterating through the list until we reach - the end, and then we start at the beginning again. - - Row CSS Classes - - rowClasses - java.lang.String - - - - -

            Assigns one or more space-separated CSS class names to each - "tr"

            - - - - ]]>
            - Row CSS Class - - rowClass - java.lang.String -
            - - - Code specifying which rules will appear between cells - within this table. Valid values are: none (no rules, - default value); groups (between row groups); rows - (between rows only); cols (between columns only); and - all (between all rows and columns). - - Table Rules - - rules - java.lang.String - - true - - - - - Summary of this table's purpose and structure, for - user agents rendering to non-visual media such as - speech and Braille. - - Table Summary - - summary - java.lang.String - - true - - - - - Width of the entire table, for visual user agents. - - Table Width - - width - java.lang.String - - true - - - - - Comma separated list of row indices for which a new - "tbody" element should be started (and any - previously opened one should be ended). - - Body Rows - - bodyrows - java.lang.String - - - - - - The number of columns to render before - starting a new row. - - Columns - - columns - int - - - - true - -
            - - Intended for use in situations when only one - UIComponent child can be nested, such as in the case of facets. - If the "style" or "styleClass" attributes are present, and the "layout" - attribute is present with a value of "block", render a "div" element, - outputting the value of the "style" attribute as the value of the - "style" attribute and the value of the "styleClass" attribute as the - value of the "class" attribute. Otherwise, if the "layout" attribute - is not present, or the "layout" attribute contains a value other than - "block", render a "span" element, outputting the value of the - "style" attribute as the value of the "style" attribute, and the value - of the "styleClass" attribute as the value of the "class" - attribute. - jakarta.faces.Panel - jakarta.faces.Group - - com.sun.faces.renderkit.html_basic.GroupRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" property on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - The type of layout markup to use when rendering this group. - If the value is "block" the renderer must produce an HTML - "div" element. Otherwise HTML "span" element must - be produced. - - Layout - - layout - java.lang.String - - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - true - - - - Renders an HTML "input" element of type "checkbox".

            - -

            Decode Behavior

            - -
              - -

              Obtain the Map from the "requestParameterMap" - property of the ExternalContext. If there is no - entry in the Map for the "clientId" of this - component, pass "false" to the setSubmittedValue() - method of the component, which must be an instance of - EditableValueHolder. If there is an entry, and its - value is equal, ignoring case and without quotes, to any of the - Strings: "on", "yes" or "true" pass true to the - setSubmittedValue() method of the component.

              - -
            - -

            Encode Behavior

            - -
              - -

              - Render the clientId of the component as the value of the "name" - attribute. If the current value of the component is "true", - output the "checked" attribute (must be rendered as checked="checked"). - If the "styleClass" attribute is specified, render its value as the value - of the "class" attribute.

            ]]>
            - jakarta.faces.SelectBoolean - jakarta.faces.Checkbox - - com.sun.faces.renderkit.html_basic.CheckboxRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Access key that, when pressed, transfers focus - to this element. - - Access Key - - accesskey - java.lang.String - - true - - - - - Javascript code executed when this element loses focus. - - Focus Off Script - - onblur - java.lang.String - - true - - - - - - Javascript code executed when this element receives focus. - - Focus On Script - - onfocus - java.lang.String - - true - - - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - Tab Index - - tabindex - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - Disabled Flag - - disabled - boolean - - false - - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - Input Change Script - - onchange - java.lang.String - - false - - valueChange - true - - - - - Javascript code executed when text within this - element is selected by the user. - - Text Select Script - - onselect - java.lang.String - - true - - - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - Read Only Flag - - readonly - boolean - - false - - - - - A localized user presentable name for this component. - - Label - - label - java.lang.String - - true - - - - - true - -
            - - Render an HTML checkbox - list.

            - -

            Decode Behavior

            - - - -

            Encode Behavior

            - -
              -

              Render a "table" element. If the "styleClass" is specified, - render the value of the "styleClass" attribute as the value of the - "class" attribute on the "table" element. If the "style", or - "border" attributes are specified, convey them and render their values as the "style" - and "border" attributes on the "table", respectively. If - the "layout" attribute is specified, and its value is - "pageDirection", render the children elements vertically, - otherwise horizontally, in the table. If any of the children are - an instance of SelectItemGroup, render them as a nested table. - Each of the children are ultimately rendererd as follows. Render - an "input" element of "type" "checkbox" for each child component. - Render the "name" attribute on the "input" element with the value - of the clientId of the component. Render an "id" - attribute on the "input" element. Each "id" value must be unique. - If the current SelectItem.isDisabled() returns true, render - "disabled" as the value of the "disabled" attribute. Close out - the "input" element. Render a "label" element. Render the "for" - attribute of the "label" element whose value is the corresponding - "input" element's "id" value. - If the current checkbox would be - rendered as being checked, and there is a "selectedClass" - attribute, append a space, followed by the value of the - "selectedClass" attribute to any existing "class" attribute value - on the label element. Otherwise, render the value of the - "selectedClass" attribute as the value of the "class" attribute on - the label element. If the current checkbox would be rendered as - being not checked, and there is a "unselectedClass" attribute, - append a space, followed by the value of the "unselectedClass" - attribute to any existing "class" attribute value on the label - element. Otherwise, render the value of the "unselectedClass" - attribute as the value of the "class" attribute on the label - element. If the - current checkbox would be rendered as being disabled, and there is a - "disabledClass" attribute, append a space, followed by the value - of the "disabledClass" attribute to any existing "class" attribute - value on the label element. Otherwise, render the value of the - "disabledClass" attribute as the value of the "class" attribute on - the label element. If the current checkbox would be rendered as - being enabled, and there is an "enabledClass" attribute, append a - space, followed by the value of the "enabledClass" attribute to any - existing "class" attribute value on the label element. Otherwise, - render the value of the "enabledClass" attribute as the value of - the "class" attribute on the label element. Close out the starting - "label" element and render the label value from SelectItem.getLabel(). - Close out the "label" element. As an exception to the general rules about - how to handle the "id" attribute, render it as an attribute on the outer "table" - element, the value of which is the clientId of the - component per the rules at the beginning of this specification. - The value of the current SelectItem is rendered as the value of - the "value" attribute. Coerce the value of the currently rendered - child to the type of the parent UISelectMany value following the - Expression Language coercion rules, before comparing the values. - If the value of the enclosing UISelectMany matches the current - value, render "checked" as the value of the "checked" attribute. - See the "Rendering the option - elements" specification for ListboxRenderer for - more detail on how to render the "option" elements in this - renderer. Note that this - renderer does not support SelectItemGroup elements, - so the text that describes the rendering of - SelectItemGroup does not apply to this - renderer.

              - -
            ]]>
            - jakarta.faces.SelectMany - jakarta.faces.Checkbox - - com.sun.faces.renderkit.html_basic.SelectManyCheckboxListRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Access key that, when pressed, transfers focus - to this element. - - Access Key - - accesskey - java.lang.String - - true - - - - - Javascript code executed when this element loses focus. - - Focus Off Script - - onblur - java.lang.String - - true - - - - - - Javascript code executed when this element receives focus. - - Focus On Script - - onfocus - java.lang.String - - true - - - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - Tab Index - - tabindex - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - Disabled Flag - - disabled - boolean - - false - - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - Input Change Script - - onchange - java.lang.String - - false - - valueChange - true - - - - - Javascript code executed when text within this - element is selected by the user. - - Text Select Script - - onselect - java.lang.String - - true - - - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - Read Only Flag - - readonly - boolean - - false - - - - - A localized user presentable name for this component. - - Label - - label - java.lang.String - - true - - - - - - - Width (in pixels) of the border to be drawn - around the table containing the options list. - - Table Border - - border - int - - true - - - - - CSS style class to apply to the rendered label - on disabled options. - - Disabled Label Class - - disabledClass - java.lang.String - - - - CSS style class to apply to the rendered label - on enabled options. - - Enabled Label Class - - enabledClass - java.lang.String - - - - CSS style class to apply to the rendered label - on selected options. - - Selected Label Class - - selectedClass - java.lang.String - - - - CSS style class to apply to the rendered label - on unselected options. - - Unselected Label Class - - unselectedClass - java.lang.String - - - - Orientation of the options list to be created. - Valid values are "pageDirection" (list is laid - out vertically), or "lineDirection" (list is - laid out horizontally). If not specified, the - default value is "lineDirection". - - Layout - - layout - java.lang.String - - - - - Optional - attribute that is a literal string that is the fully qualified - class name of a concrete class that implements - java.util.Collection, or an EL expression that - evaluates to either 1. such a String, or 2. the - Class object itself.

            ]]>
            - Collection Type - - collectionType - java.lang.String - - false - -
            - - - Flag indicating that, if this component is activated by the user, - The "no selection option", if any, must be hidden.

            ]]>
            - Hide "No Selection" Option - - hideNoSelectionOption - boolean - - true - -
            - - - true - -
            - - Render an HTML option list.

            - -

            Decode Behavior

            - -

            This section documents the decode behavior for all renderers - that handle UISelectMany or UISelectOne - components.

            - -
            - -

            If the collection type of the collection that provides the - value of this component is not one of the types handled by a - converter in the package jakarta.faces.convert, a - converter must explicitly be specified using the appropriate code - in the VDL. For example, use <f:converter> in - JSP or Facelet pages.

            - -
            - - -
              - -

              Decode Behavior for - UISelectMany components

              - -
                - -

                Obtain the Map from the - "requestParameterValuesMap" property of the - ExternalContext. If the Map contains - an entry for the "clientId" of the component, pass the value of - the entry, cast to a String [], to the - setSubmittedValue() method of the component, which - must be an EditableValueHolder. If the - Map does not contain an entry, create an empty - String array and call - setSubmittedValue() with it.

                - -

                Please check the javadoc for UISelectMany.getConvertedValue() - for additional requirements for renderers that render this kind - of component.

                - -
              - -

              Decode Behavior for - UISelectOne components

              - -
                - -

                Obtain the Map from the "requestParameterMap" - property of the ExternalContext. If there is a - Map entry for the "clientId" property of the - component, pass it to the setSubmittedValue() method - of the component. If the - Map does not contain an entry, call - setSubmittedValue() passing an empty - String as the argument.

                - -
              - -

              Encode Behavior

              - -
                - -

                Render an HTML "select" element. Render the clientId of - the component as the value of the "name" attribute. If the "styleClass" - attribute is specified, render its value as the value of the "class" - attribute on the "select" element. If the component is a - UISelectMany instance, render "multiple" as the value of the - "multiple" attribute. If the "size" attribute is specified, render its - value as the value of the "size" attribute. Otherwise use the number of - items as the value of the "size" attribute.

                - -
              - -

              Rendering the "option" elements

              - -
                - -

                The only valid children of this component are - UISelectItem or UISelectItems - instances. Iterate over the children of this component, and accrue - a list of jakarta.faces.model.SelectItem instances. - If the current child is a - SelectItem whose noSelctionProperty is - true, and the UISelectOne or - UISelectMany parent of this option has one or more - selected values that are not the "no selection" - SelectItem, and the component has a - "hideNoSelectionLabel" attribute whose value is true, - then the current option, which is the "no selection" option, must - not be rendered. If the current child is a - UISelectItem create a SelectIteminstance - from its itemValue, itemLabel, itemEscaped, and - itemDescription properties, add it to the list. If - the current child is a UISelectItems instance, call - its getValue() method. If the result is a - SelectItem bean, add it to the list. If the result - is an array of SelectItem beans, add each one to the - list. If the result is a Collection of - SelectItem beans, add each one to the list. If the - result is a Map, create a SelectItem - bean for each entry in the Map using the key as the - label, the value as the value, and null as the - description.

                - -

                Iterate over the list - of SelectItem beans. If the current element is a - SelectItemGroup, render an "optgroup" element with a - "label" attribute, the value of which is the "label" property from - the current element, then call getSelectItems() and - render each element as below. If the current element is not a - SelectItemGroup, render an "option" element. In both the case of the "option" - element or the "optgroup" element, the implementation must pass - the UISelectItem or UISelectItems - corresponding to the SelectItem bean to the call to - ResponseWriter.startElement(). Follow the - conversion rules in the spec to obtain a renderable - String from the "value" property of the current - element, render that as the value of the "value" atribute. Now it - is time to see if the current element is the selected value. Call - its getSubmittedValue() method, casting the result to - an Object [], otherwise the component must be a - UISelectOne instance, call its - getSubmittedValue() method and create an Object - [] around the result. Determine the type of the resultant - array, if the resultant array is non-null, otherwise the type is - String. Coerce the current item value to this type - following the Expression Language coercion rules. If the - resultant array is non-null, we look in the array for a - value that, when we pass the renderable value to its - equals() method, it returns true, - meaning the current element is selected. If the resultant array - is null, if the component is a - UISelectMany, call its getValue() - method. If the result is a List obtain the values in - the list as an array. Otherwise, the component must be a - UISelectOne instance. Call its - getValue() method, which must be an Object array. - Look for an element in the resultant array that, 1. when we pass - the renderable value to its equals() method, it - returns true , or 2. if the renderable value is null, - and there is a null element in the array, also conclude that the - current element is selected. Otherwise the current element is not - selected. Now, if the current value is selected, write out an - HTML boolean property "selected". If the current - SelectItem.isDisabled() returns true, render "disabled" as the - value of the "disabled" attribute. If the value of the - escape property is true, use the - writeText() method of ResponseWriter to - write out the value of the label property. - Otherwise, use the write() method of the - ResponseWriter to do so.

                - -
              - -
            ]]>
            - jakarta.faces.SelectMany - jakarta.faces.Listbox - - com.sun.faces.renderkit.html_basic.ListboxRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Access key that, when pressed, transfers focus - to this element. - - Access Key - - accesskey - java.lang.String - - true - - - - - Javascript code executed when this element loses focus. - - Focus Off Script - - onblur - java.lang.String - - true - - - - - - Javascript code executed when this element receives focus. - - Focus On Script - - onfocus - java.lang.String - - true - - - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - Tab Index - - tabindex - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - Disabled Flag - - disabled - boolean - - false - - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - Input Change Script - - onchange - java.lang.String - - false - - valueChange - true - - - - - Javascript code executed when text within this - element is selected by the user. - - Text Select Script - - onselect - java.lang.String - - true - - - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - Read Only Flag - - readonly - boolean - - false - - - - - A localized user presentable name for this component. - - Label - - label - java.lang.String - - true - - - - - - - CSS style class to apply to the rendered label - on disabled options. - - Disabled Label Class - - disabledClass - java.lang.String - - - - CSS style class to apply to the rendered label - on enabled options. - - Enabled Label Class - - enabledClass - java.lang.String - - - - Number of available options to be shown at all times. - If not specified, all available options are shown. - - Size - - size - int - - - - - Optional - attribute that is a literal string that is the fully qualified - class name of a concrete class that implements - java.util.Collection, or an EL expression that - evaluates to either 1. such a String, or 2. the - Class object itself.

            ]]>
            - Collection Type - - collectionType - java.lang.String - - false - -
            - - - Flag indicating that, if this component is activated by the user, - The "no selection option", if any, must be hidden.

            ]]>
            - Hide "No Selection" Option - - hideNoSelectionOption - boolean - - true - -
            - - - true - -
            - - Render an HTML option - list.

            - -

            Decode Behavior

            - - - -

            Encode Behavior

            - -
              - -

              Render an HTML "select" element. Render the clientId of - the component as the value of the "name" attribute. If the "styleClass" - attribute is specified, render its value as the value of the "class" - attribute on the "select" element. If the component - to be rendered is a UISelectMany, render "multiple" as the value of - the "multiple" attribute. Render "1" as the value of the "size" - attribute. See the "Rendering the option - elements" specification for ListboxRenderer for - more detail on how to render the "option" elements in this - renderer.

              - -
            ]]>
            - jakarta.faces.SelectMany - jakarta.faces.Menu - - com.sun.faces.renderkit.html_basic.MenuRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Access key that, when pressed, transfers focus - to this element. - - Access Key - - accesskey - java.lang.String - - true - - - - - Javascript code executed when this element loses focus. - - Focus Off Script - - onblur - java.lang.String - - true - - - - - - Javascript code executed when this element receives focus. - - Focus On Script - - onfocus - java.lang.String - - true - - - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - Tab Index - - tabindex - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - Disabled Flag - - disabled - boolean - - false - - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - Input Change Script - - onchange - java.lang.String - - false - - valueChange - true - - - - - Javascript code executed when text within this - element is selected by the user. - - Text Select Script - - onselect - java.lang.String - - true - - - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - Read Only Flag - - readonly - boolean - - false - - - - - A localized user presentable name for this component. - - Label - - label - java.lang.String - - true - - - - - - - CSS style class to apply to the rendered label - on disabled options. - - Disabled Label Class - - disabledClass - java.lang.String - - - - CSS style class to apply to the rendered label - on enabled options. - - Enabled Label Class - - enabledClass - java.lang.String - - - - - Optional - attribute that is a literal string that is the fully qualified - class name of a concrete class that implements - java.util.Collection, or an EL expression that - evaluates to either 1. such a String, or 2. the - Class object itself.

            ]]>
            - Collection Type - - collectionType - java.lang.String - - false - -
            - - - Flag indicating that, if this component is activated by the user, - The "no selection option", if any, must be hidden.

            ]]>
            - Hide "No Selection" Option - - hideNoSelectionOption - boolean - - true - -
            - - - true - -
            - - Render an HTML option list.

            - -

            Decode Behavior

            - - - -

            Encode Behavior

            - -
              -

              Render an HTML "select" element. Render the clientId of - the component as the value of the "name" attribute. If the "styleClass" - attribute is specified, render its value as the value of the "class" - attribute on the "select" element. If the component - to be rendered is a UISelectMany, render "multiple" as the value of - the "multiple" attribute. If the "size" attribute is specified, - render its value as the value of the "size" attribute. Otherwise - use the number of items as the value of the "size" attribute. See - the "Rendering the option - elements" specification for ListboxRenderer for - more detail on how to render the "option" elements in this - renderer.

              - -
            ]]>
            - jakarta.faces.SelectOne - jakarta.faces.Listbox - - com.sun.faces.renderkit.html_basic.ListboxRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Access key that, when pressed, transfers focus - to this element. - - Access Key - - accesskey - java.lang.String - - true - - - - - Javascript code executed when this element loses focus. - - Focus Off Script - - onblur - java.lang.String - - true - - - - - - Javascript code executed when this element receives focus. - - Focus On Script - - onfocus - java.lang.String - - true - - - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - Tab Index - - tabindex - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - Disabled Flag - - disabled - boolean - - false - - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - Input Change Script - - onchange - java.lang.String - - false - - valueChange - true - - - - - Javascript code executed when text within this - element is selected by the user. - - Text Select Script - - onselect - java.lang.String - - true - - - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - Read Only Flag - - readonly - boolean - - false - - - - - A localized user presentable name for this component. - - Label - - label - java.lang.String - - true - - - - - - - CSS style class to apply to the rendered label - on disabled options. - - Disabled Label Class - - disabledClass - java.lang.String - - - - CSS style class to apply to the rendered label - on enabled options. - - Enabled Label Class - - enabledClass - java.lang.String - - - - Number of available options to be shown at all times. - If not specified, all available options are shown. - - Size - - size - int - - - - - - Flag indicating that, if this component is activated by the user, - The "no selection option", if any, must be hidden.

            ]]>
            - Hide "No Selection" Option - - hideNoSelectionOption - boolean - - true - -
            - - - true - -
            - - Render an HTML option list.

            - -

            Decode Behavior

            - - - -

            Encode Behavior

            - -
              - -

              Render an HTML "select" element. Render the clientId of the - component as the value of the "name" attribute. If the - "styleClass" attribute is specified, render its value as the value - of the "class" attribute on the "select" element. If the component - to be rendered is a UISelectMany, render "true" as the value of - the "multiple" attribute. Use the number of items as the value of - the "size" attribute. See the "Rendering - the option elements" specification for - ListboxRenderer for more detail on how to render the - "option" elements in this renderer.

              - -
            ]]>
            - jakarta.faces.SelectOne - jakarta.faces.Menu - - com.sun.faces.renderkit.html_basic.MenuRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Access key that, when pressed, transfers focus - to this element. - - Access Key - - accesskey - java.lang.String - - true - - - - - Javascript code executed when this element loses focus. - - Focus Off Script - - onblur - java.lang.String - - true - - - - - - Javascript code executed when this element receives focus. - - Focus On Script - - onfocus - java.lang.String - - true - - - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - Tab Index - - tabindex - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - Disabled Flag - - disabled - boolean - - false - - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - Input Change Script - - onchange - java.lang.String - - false - - valueChange - true - - - - - Javascript code executed when text within this - element is selected by the user. - - Text Select Script - - onselect - java.lang.String - - true - - - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - Read Only Flag - - readonly - boolean - - false - - - - - A localized user presentable name for this component. - - Label - - label - java.lang.String - - true - - - - - - - CSS style class to apply to the rendered label - on disabled options. - - Disabled Label Class - - disabledClass - java.lang.String - - - - CSS style class to apply to the rendered label - on enabled options. - - Enabled Label Class - - enabledClass - java.lang.String - - - - - - Flag indicating that, if this component is activated by the user, - The "no selection option", if any, must be hidden.

            ]]>
            - Hide "No Selection" Option - - hideNoSelectionOption - boolean - - true - -
            - - - true - -
            - - Render a set of html - "input" elements of type "radio".

            - -

            Decode Behavior

            - - - -

            Encode Behavior

            - -
              - -

              Render a "table" element. If the "styleClass" is specified, - render the value of the "styleClass" attribute as the value of the - "class" attribute on the "table" element. If the "style", "border" - attributes are specified, convey them and render their values as the "style" - and "border" attributes on the "table", respectively.. If - the "layout" attribute is specified, and its value is - "pageDirection", render the children elements vertically, - otherwise horizontally, in the table. If any of the children are - an instance of SelectItemGroup, render them as a nested table. - Each of the children are ultimately rendered as follows. Render - an "input" element of "type" "radio" for each child component. - Render the "name" attribute on the "input" element with the value - of the clientId of the component. Render an "id" - attribute on the "input" element. Each "id" value must be unique. - If the current SelectItem.isDisabled() returns true, render - "disabled" as the value of the "disabled" attribute. Close out - the "input" element. Render a "label" element. Render the "for" - attribute of the "label" element whose value is the corresponding - "input" element's "id" value. Render any "style" as the "class" - attribute on the "label" element. Close out the starting "label" - element and render the label value from SelectItem.getLabel(). - Close out the "label" element. As an exception to the general - rules about how to handle the "id" attribute, render it as an - attribute on the outer "table" element, the value of which is the - clientId of the component per the rules at the - beginning of this specification. Coerce the value of the - currently rendered child to the type of the parent UISelectOne - value using the Expression Language coercion rules before - comparing the values. If the value of the currently rendered - child is equal to the value of the parent UISelectOne, render an - appropriate HTML boolean value indicating "checked" for the - enclosing "input". See the "Rendering the option elements" - specification for ListboxRenderer for more detail on - how to render the "option" elements in this renderer. Note that this renderer does - not support SelectItemGroup elements, so the text - that describes the rendering of SelectItemGroup does - not apply to this renderer.

              - -
            ]]>
            - jakarta.faces.SelectOne - jakarta.faces.Radio - - com.sun.faces.renderkit.html_basic.RadioRenderer - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - - Access key that, when pressed, transfers focus - to this element. - - Access Key - - accesskey - java.lang.String - - true - - - - - Javascript code executed when this element loses focus. - - Focus Off Script - - onblur - java.lang.String - - true - - - - - - Javascript code executed when this element receives focus. - - Focus On Script - - onfocus - java.lang.String - - true - - - - - - Position of this element in the tabbing order - for the current document. This value must be - an integer between 0 and 32767. - - Tab Index - - tabindex - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - Disabled Flag - - disabled - boolean - - false - - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - Input Change Script - - onchange - java.lang.String - - false - - valueChange - true - - - - - Javascript code executed when text within this - element is selected by the user. - - Text Select Script - - onselect - java.lang.String - - true - - - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - Read Only Flag - - readonly - boolean - - false - - - - - A localized user presentable name for this component. - - Label - - label - java.lang.String - - true - - - - - - - Flag indicating that this element must never receive focus or - be included in a subsequent submit. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as disabled="disabled". - - Disabled Flag - - disabled - boolean - - false - - - - - Javascript code executed when this element loses focus - and its value has been modified since gaining focus. - - Input Change Script - - onchange - java.lang.String - - false - - valueChange - true - - - - - Javascript code executed when text within this - element is selected by the user. - - Text Select Script - - onselect - java.lang.String - - true - - - - - - Flag indicating that this component will prohibit changes by - the user. The element may receive focus unless it has also - been disabled. A value of false causes - no attribute to be rendered, while a value of true causes the - attribute to be rendered as readonly="readonly". - - Read Only Flag - - readonly - boolean - - false - - - - - A localized user presentable name for this component. - - Label - - label - java.lang.String - - true - - - - - - - Flag indicating that, if this component is activated by the user, - The "no selection option", if any, must be hidden.

            ]]>
            - Hide "No Selection" Option - - hideNoSelectionOption - boolean - - true - -
            - - - - - Width (in pixels) of the border to be drawn - around the table containing the options list. - This attribute is ignored when "group" attribute is specified. - - Table Border - - border - int - - true - - - - - CSS style class to apply to the rendered label - on disabled options. - This attribute is ignored when "group" attribute is specified. - - Disabled Label Class - - disabledClass - java.lang.String - - - - CSS style class to apply to the rendered label - on enabled options. - This attribute is ignored when "group" attribute is specified. - - Enabled Label Class - - enabledClass - java.lang.String - - - - Orientation of the options list to be created. - Valid values are "pageDirection" (list is laid - out vertically), or "lineDirection" (list is - laid out horizontally). If not specified, the - default value is "lineDirection". - This attribute is ignored when "group" attribute is specified. - - Layout - - layout - java.lang.String - - - UIForm parent will uncheck - all others when being checked. If the value attribute is - absent then the one from first component of the group will be used. If - the UISelectItem child is absent then the one from first - component of the group will be used. When specified, the - group attribute disables the default rendering of the - "table" element and any attribute related to the rendering of the - "table" element, such as "border", is ignored. - ]]> - Group - - group - java.lang.String - - - - true - -
            - - - -

            Renders a composite component.

            - -

            Decode Behavior

            - -
              - -

              No action is required during decode for this renderer.

              - -
            - -

            Encode Behavior

            - -
              - -

              Ask the argument UIComponent for its facet - under the key UIComponent.COMPOSITE_FACET_NAME. - Such a facet must exist. Call the encodeAll() - method on this facet.

              - -
            - - - -]]>
            - jakarta.faces.NamingContainer - jakarta.faces.Composite - - com.sun.faces.renderkit.html_basic.CompositeRenderer - - - true - -
            - - - -

            Renders a facet at -this particular point in the composite component VDL page.

            - -

            Decode Behavior

            - -
              - -

              No action is required during decode for this renderer.

              - -
            - -

            Encode Behavior

            - -

            encodeBegin() and encodeEnd() must take no -action for this renderer. Due to the specification of the -<composite:insertChildren> tag handler, the component -passed to the encodeChildern() method of this renderer will -be the component with component-family -jakarta.faces.Output and renderer-type equal to -the one for this renderer. The implementation of -encodeChildren(), must obtain the component attribute value -under the key given by the value of the symbolic constant -UIComponent.FACETS_KEY from the attributes map of the -argument component. If not found, throw IOException. This -value is referred to as "facetName" for discission. Find the closest -ancestor composite component in which the argument component is nested. -If no such component can be found, thow IOException. -Otherwise, get the facet whose name is "facetName". If found call -encodeAll() on the facet.

            - - - -]]>
            - jakarta.faces.Output - jakarta.faces.CompositeFacet - - com.sun.faces.renderkit.html_basic.CompositeFacetRenderer - - - true - -
            - - Render the markup for a - <script> element that renders the script - Resource specified by the optional - name attribute and library - attributes.

            - -

            The implementation of this renderer must -have a @ListenerFor -annotation attached to it, at the class level, declaring PostAddToViewEvent.class -as the value of the systemEventClass attribute. The -presence of this annotation on a renderer implies the renderer -implements ComponentSystemEventListener, -which this renderer must do. The implementation of -processEvent() must extract the UIComponent -from the argument event and look for the presence of the key -"target" in the component's attribute Map. If -and only if such a key is present, the implementation of -processEvent() must pass the component to UIViewRoot.addComponentResource().

            - -

            Decode Behavior

            - -
              - -

              No action is required during decode for this renderer.

              - -
            - -

            Encode Behavior

            - -
              - -

              Common Algorithm for Obtaining A Resource to Render

              - -
                - -

                This algorithm is used by all resource renderers to obtain - a Resource instance which is then rendered in a - specific way depending on what kind of renderer is doing the - encoding.

                - -
                  - -
                • Look in the component attribute Map for a - value under the key name.

                • - -
                • Look in the component attribute Map for a - value under the key library. This attribute is - optional, therefore, library may be - null.

                • - -
                • Create the resource by calling - Application.getResourceHandler.createResource(name, - library);.

                • - -

                  - -
                - -
              - -

              Common Encode Behavior

              - -
                - -

                This algorithm is used by all resource renderers to render the - resource.

                - -

                encodeBegin() must take no action.

                - -

                Because this renderer returns true from - getRendersChildren(), the encodeChildren() - method must take the following action.

                - -
                  - -
                • If there is no name attribute, and the - argument component has no children, and - ProjectStage is not - ProjectStage.Production, add a - FacesMessage for this component's clientId to the - FacesContext stating that if no name attribute is - present, and no body content is present either, then the user - should take action to correct this problem. In this case, - encodeChildren() must take no further - action.

                • - -
                • If there is no name attribute and the argument - component does have children, the renderer - must ensure that those children are encoded as usual.

                • - -
                • If there is a name attribute and the - argument component does have children, the - renderer must log a descriptive localized message stating that - the child content will be ignored. The resource referenced by - the name attribute will be rendered in - encodeEnd().

                • - -
                • If there is a name attribute and the - argument component does not have children, - encodeChildren() must take no action.

                • - -
                - -

                encodeEnd() must take specific action based on - the specific kind of resource being rendered.

                - -
              - -

              Use the algorithm Common Encode Behavior for - encodeBegin(), encodeChildren() and - getRendersChildren().

              - -

              For encodeEnd(), use the algorithm Common - Algorithm for Obtaining A Resource to Render above to - obtain a reference to the Resource to be - encoded.

              - -

              If this is NOT the first time this Resource has - been referenced on this request take no action and return.

              - -

              Render a script element. Call - resource.getRequestPath(). If the result contains - a query string, take care to handle it correctly. Pass the - request path to a call to encodeResourceURL() on - the ExternalContext. Use the result as the value - of the "src" attribute. Use the result from calling - resource.getContentType() as the value of the - "type" attribute.

              - -
            - - -]]>
            - jakarta.faces.Output - jakarta.faces.resource.Script - - com.sun.faces.renderkit.html_basic.ScriptRenderer - - - -

            The libraryName for this resource.

            ]]>
            - Library Name - - library - java.lang.String - - false - true - -
            - - -

            The - resourceName for this resource.

            -
            -

            - This attribute is required if the script is NOT inline. -

            -
            ]]>
            - Resource Name - - name - java.lang.String - - false - true - -
            - -

            The - target area for which this resource will be - rendered. For example, target="head" would - cause the resource to be rendered within the - head element. If no value is - specififed, the script element is rendered at the - same point in the view where the tag is - located. Currently - supported values for this attribute are "head", - "body", and "form".

            ]]>
            - Target - - target - java.lang.String - - false - true - -
            - - true - -
            - - Render the markup for a -<link> element that renders the style -Resource specified by the optional name and -library attributes.

            - -

            Decode Behavior

            - -
              - -

              No action is required during decode for this renderer.

              - -
            - -

            Encode Behavior

            - -
              - -

              Use the algorithm Common Encode Behavior for - encodeBegin(), encodeChildren() and - getRendersChildren().

              - -

              For encodeEnd(), use the algorithm Common - Algorithm for Obtaining A Resource to Render to obtain a - reference to the Resource to be encoded.

              - -

              Output a <link> element. Use the result from -calling resource.getRequestPath() as the value of the -"href" attribute, the result from calling -resource.getContentType() as the value of the "type" -attribute, and the literal string "stylesheet" as the value of the "rel" -attribute. If this tag has a "media" -attribute, use its value as the value of the "media" attribute. -Otherwise, do not render a media attribute.

              - - -

              The implementation of this renderer must have a @ListenerFor -annotation attached to it, at the class level, declaring PostAddToViewEvent.class -as the value of the systemEventClass attribute. The presence of -this annotation on a renderer implies the renderer implements ComponentSystemEventListener, -which this renderer must do. The implementation of -processEvent() must extract the UIComponent -from the argument event pass it to UIViewRoot.addComponentResource(), specifying -the literal string "head" as the last argument.

              - -

              The stylsheet renderer must ensure that any stylesheets are included in the <head> of the document. -

              - -
            - -]]>
            - jakarta.faces.Output - jakarta.faces.resource.Stylesheet - - com.sun.faces.renderkit.html_basic.StylesheetRenderer - - - -

            The libraryName for this resource.

            ]]>
            - Library Name - - library - java.lang.String - - false - true - -
            - - -

            The - resourceName for this resource.

            -
            -

            - This attribute is required if the stylesheet is NOT inline. -

            -
            - ]]>
            - Resource Name - - name - java.lang.String - - false - true - -
            - -

            The - media type for this stylesheet. For - example, media="screen" would cause the - resource to be rendered with the media - attribute of the link set to - screen.

            ]]>
            - Media - - media - java.lang.String - - false - true - -
            - - true - -
            - - - -

            Render the markup for -a <!DOCTYPE> declaration.

            - -

            Decode Behavior

            - -
              - -

              No action is required during decode for this renderer.

              - -
            - -

            Encode Behavior

            - -

            Output an XML Doctype using the provided attributes. Output the -literal text <!DOCTYPE. The "rootElement" attribute is -required and must be rendered next. If the "public" attribute is -defined, render the literal text PUBLIC then render the -value of the attribute inside double quotes. If the "system" attribute -is defined, render it next, inside double quotes. Close the doctype -declaration with the literal text >.

            - -
            - -

            No relocation occurs with the output of this component. It is -rendered at whatever position in the view hierarchy it happens to be -encountered when traversing the view to render. Therefore, this -component must be located in the view hierarchy at the correct location -so that the final rendered markup has it in the proper place with -respect to the user agent that consumes the rendered markup. In practice -this means in front of the <html> or <h:html> element. -Furthermore, if multiple <h:doctype> components exist, -all of them will be rendered.

            - -

            If this component is present in a view, any DOCTYPE that would -otherwise have been rendered by virtue of being present in the VDL page -must be ignored.

            - -
            - - -]]>
            - jakarta.faces.Output - jakarta.faces.Doctype - - com.sun.faces.renderkit.html_basic.DoctypeRenderer - - - - - The root XML element - ]]> - Root XML element - - rootElement - java.lang.String - - true - true - - - - - Will be output as the public part of the DOCTYPE - ]]> - The public part of the DOCTYPE - - public - java.lang.String - - true - false - - - - - Will be output as the system part of the DOCTYPE - ]]> - The system part of the DOCTYPE - - system - java.lang.String - - true - false - - - - - doctype - -
            - - Render the markup for a -<head> element.

            - -
            - -

            Decode Behavior

            - -
              - -

              No action is required during decode for this renderer.

              - -
            - -

            Encode Behavior

            - -
              - -

              Render the starting <head> element tag. Any -attributes declared on the element must be conveyed unmodified to -the rendered output. At some -point before rendering the closing </head> element -tag, render any resources that have been targeted for this "head" -element: -

                -
              • Obtain a UIViewRoot instance.
              • -
              • Obtain a List of component resources targeted for - this "head" element with a call to UIViewRoot.getComponentResources() - with the String "head" as the argument.
              • -
              • Iterate over the returned List of UIComponent instances - and call encodeAll on each UIComponent instance. - -

                Any attributes declared on the element must be conveyed -unmodified to the rendered output.

                - -
              - -
              - -

              Note that due to the cascading nature of CSS files, the order - in which these files have been added to the view must be preserved - when rendering the references to the files within the - <head> element. Also, the end result of the - rendered <head> section must be that any CSS - files referenced due to previous calls to - addComponentResource() do not adversely interfere - with any CSS files manually placed in this section by the page - author.

              - -

              Render the ending </head> element tag.

              - -
              - -
            ]]>
            - jakarta.faces.Output - jakarta.faces.Head - - com.sun.faces.renderkit.html_basic.HeadRenderer - - - - The - component identifier for this component. This value must be - unique within the closest parent component that is a naming - container.

            ]]>
            - Component Identifier - - id - java.lang.String -
            - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - An XML Namespace to be passed through to the rendered element - ]]> - XML Namespace - - xmlns - java.lang.String - - true - - - - - head - -
            - - Render the markup for a -<body> element.

            - -
            - -

            Decode Behavior

            - -
              - -

              No action is required during decode for this renderer.

              - -
            - -

            Encode Behavior

            - -
              - -

              Render the starting <body> element tag. Just before rendering the - closing </body> element tag, render any resources that have been targeted - for this "body" element: -

                -
              • Obtain a UIViewRoot instance.
              • - -
              • Obtain a List of component resources targeted for - this "body" element with a call to - UIViewRoot.getComponentResources() with the - String "body" as the argument. Render the ending - </body> element tag.
              • - -
              • Iterate over the returned List of UIComponent instances - and call encodeAll on each UIComponent instance. -
              - -

              Any attributes declared on the element must be conveyed -unmodified to the rendered output.

              - -
            ]]>
            - jakarta.faces.Output - jakarta.faces.Body - - com.sun.faces.renderkit.html_basic.BodyRenderer - - - - The - component identifier for this component. This value must be - unique within the closest parent component that is a naming - container.

            ]]>
            - Component Identifier - - id - java.lang.String -
            - - - - - CSS style(s) to be applied when this component is rendered. - - CSS Styles - - style - java.lang.String - - true - - - - - Space-separated list of CSS style class(es) to be applied when - this element is rendered. This value must be passed through - as the "class" attribute on generated markup. - - CSS Style Classes - - styleClass - java.lang.String - - false - - - - - Advisory title information about markup elements generated - for this component. - - Advisory Title - - title - java.lang.String - - true - - - - Per the WAI-ARIA spec and its - relationship to HTML5 (Section title ARIA Role Attriubute), - every HTML element may have a "role" attribute whose value - must be passed through unmodified on the element on which it - is declared in the final rendered markup. The attribute, if - specified, must have a value that is a string literal that is, - or an EL Expression that evaluates to, a set of - space-separated tokens representing the various WAI-ARIA roles - that the element belongs to. -

            - -

            It is the page author's - responsibility to ensure that the user agent is capable of - correctly interpreting the value of this attribute.

            ]]>
            - ARIA role - - role - java.lang.String - - true - -
            - - - - - An XML Namespace to be passed through to the rendered element - ]]> - XML Namespace - - xmlns - java.lang.String - - true - - - - - - - Direction indication for text that does not inherit directionality. - Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). - These attributes are case sensitive when rendering to XHTML, so - care must be taken to have the correct case. - - Direction - - dir - java.lang.String - - true - - - - - Code describing the language used in the generated markup - for this component. - - Language Code - - lang - java.lang.String - - true - - - - - - - Javascript code executed when a pointer button is - clicked over this element. - - Button Click Script - - onclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - double clicked over this element. - - Double Click Script - - ondblclick - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - pressed down over this element. - - Mouse Down Script - - onmousedown - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - released over this element. - - Mouse Up Script - - onmouseup - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved onto this element. - - Mouse Over Script - - onmouseover - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved within this element. - - Mouse Move Script - - onmousemove - java.lang.String - - true - - - - - - Javascript code executed when a pointer button is - moved away from this element. - - Mouse Out Script - - onmouseout - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed and released over this element. - - Key Press Script - - onkeypress - java.lang.String - - true - - - - - - Javascript code executed when a key is - pressed down over this element. - - Key Down Script - - onkeydown - java.lang.String - - true - - - - - - Javascript code executed when a key is - released over this element. - - Key Up Script - - onkeyup - java.lang.String - - true - - - - - - - Javascript code executed when the user agent finishes loading - a window or all frames within a frameset. - - Body Onload Script - - onload - java.lang.String - - true - - - - - - Javascript code executed when the user agent removes - a document from a window or frame. - - Body Onunload Script - - onunload - java.lang.String - - true - - - - - body - -
            - - - -

            - Render a JavaScript function that invokes faces.push.init() function. -

            - -

            Encode Behavior

            -

            - Render an HTML script element with an "id" attribute. - Render JavaScript function which invokes faces.push.init() function with data provided by - onopen, onmessage, onerror, onclose and connected - arguments, if any. -

            - - ]]>
            - jakarta.faces.Script - jakarta.faces.Websocket - com.sun.faces.renderkit.html_basic.WebsocketRenderer - - false - -
            - -
            - -
            diff --git a/impl/src/main/resources/com/sun/faces/tlddoc-resources/alltags-frame.html.xsl b/impl/src/main/resources/com/sun/faces/tlddoc-resources/alltags-frame.html.xsl deleted file mode 100644 index a1635f3ef4..0000000000 --- a/impl/src/main/resources/com/sun/faces/tlddoc-resources/alltags-frame.html.xsl +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - All Tags / Functions - - - - - - All Tags / Functions -
            - - - - -
            - - - - -
            - - -
            - - - - /.html - tagFrame - : - -
            -
            - - - - - /.fn.html - tagFrame - :() - -
            -
            -
            diff --git a/impl/src/main/resources/com/sun/faces/tlddoc-resources/alltags-noframe.html.xsl b/impl/src/main/resources/com/sun/faces/tlddoc-resources/alltags-noframe.html.xsl deleted file mode 100644 index d18950ae7f..0000000000 --- a/impl/src/main/resources/com/sun/faces/tlddoc-resources/alltags-noframe.html.xsl +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - All Tags / Functions - - - - - - All Tags / Functions -
            - - - - -
            - - - - -
            - - -
            - - - - /.html - - : - -
            -
            - - - - - /.fn.html - tagFrame - :() - -
            -
            -
            diff --git a/impl/src/main/resources/com/sun/faces/tlddoc-resources/function.html.xsl b/impl/src/main/resources/com/sun/faces/tlddoc-resources/function.html.xsl deleted file mode 100644 index 17f69f396c..0000000000 --- a/impl/src/main/resources/com/sun/faces/tlddoc-resources/function.html.xsl +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - - - - default - default - - - - - - - - - - - - - - - - - - - - - - - - Unnamed TLD - - - - - - () - - - - <xsl:value-of select="$title"/> - - - - - - - - - - - - - - - - -
            - -
            - - -
            -


            - Function

            - - -  ( - -
            -
            - - - Example:
            -
            -              
            -              
            - -
            -
            - - - - - - - - - - - - - - - - - - -
            - - Function Information - -
            Function Class - - - - - - None - - -
            Function Signature - - - - - - None - - -
            Display Name - - - - - - None - - -
            -
            - - - - - - - - - - - - - -
            - -
            - -
            - - Output Generated by - Tag Library Documentation Generator. - - - -
            -
            - -
            diff --git a/impl/src/main/resources/com/sun/faces/tlddoc-resources/help-doc.html.xsl b/impl/src/main/resources/com/sun/faces/tlddoc-resources/help-doc.html.xsl deleted file mode 100644 index 0641fa68c7..0000000000 --- a/impl/src/main/resources/com/sun/faces/tlddoc-resources/help-doc.html.xsl +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - - - - - - - - - API Help (<xsl:value-of select="/javaee:tlds/javaee:config/javaee:window-title"/>) - - - - - - - - - - - - - - - -
            - -
            -
            -
            -

            How This Tag Library Document Is Organized

            -
            - This TLD (Tag Library Descriptor) document has pages corresponding - to the items in the navigation bar, described as follows. -

            Overview

            -
            - - The Overview page is the front - page of this TLD document and provides a list of all tag libraries - with a summary for each. -
            -

            Library

            -
            - - Each tag library has a page that contains a list of its - validator, listeners, tags, and functions, with a summary for each. - This page can contain four categories: -
              -
            • Validator
            • -
            • Listeners
            • -
            • Tags
            • -
            • Functions
            • -
            -
            -

            Validator

            -
            - - A tag library can have at most one validator. If a tag library - has a validator, it has its own page describing the validator, - the class that implements the validator, and the available - initialization parameters. -
            -

            Listeners

            -
            - - A tag library can have zero or more listeners. If a tag library - has at least one listener, a page is generated that lists all - listener classes registered for the tag library. -
            -

            Tags

            -
            - - A tag library can have zero or more tags. Each tag has its own - page that describes the tag, its display name, its unique action - name, the class that implements the tag, the TagExtraInfo class, - the body content type, scripting variable information, attributes, - whether the tag supports dynamic attributes, and an optional - example use of the tag. -
            -

            Functions

            -
            - - A tag library can contain zero or more EL functions. If a tag - library has at least one function, a page is generated that lists - all functions, the class that implements the function, the - function signature, and an optional example use of the function. -
            - -

            Prev/Next

            -
            - These links take you to the next or previous validator, listener, - tag, function, or related page. -
            -

            Frames/No Frames

            -
            - These links show and hide the HTML frames. All pages are available - with or without frames. -
            -
            -
            - - - - - - - - - - -
            - -
            -
            - - Output Generated by - Tag Library Documentation Generator. - - - -
            -
            diff --git a/impl/src/main/resources/com/sun/faces/tlddoc-resources/index.html.xsl b/impl/src/main/resources/com/sun/faces/tlddoc-resources/index.html.xsl deleted file mode 100644 index e8843e4845..0000000000 --- a/impl/src/main/resources/com/sun/faces/tlddoc-resources/index.html.xsl +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - <xsl:value-of select="/javaee:tlds/javaee:config/javaee:window-title"/> - - - - - - - - - - - <h2>Frame Alert</h2> - - This document is designed to be viewed using the frames feature. - If you see this message, you are using a non-frame-capable web - client. - <br/> - Link to <a href="overview-summary.html">Non-frame version.</a> - - - - diff --git a/impl/src/main/resources/com/sun/faces/tlddoc-resources/overview-frame.html.xsl b/impl/src/main/resources/com/sun/faces/tlddoc-resources/overview-frame.html.xsl deleted file mode 100644 index f30ca0d020..0000000000 --- a/impl/src/main/resources/com/sun/faces/tlddoc-resources/overview-frame.html.xsl +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - Overview (<xsl:value-of select="/javaee:tlds/javaee:config/javaee:window-title"/>) - - - - - - - - - -
            - - - -
            - - - - -
            - - All Tags / Functions - - - - Tag Libraries - -
            - -
            - - - -
            - - - - - /tld-frame.html - tldFrame - - - - - - - - - Unnamed TLD - - - - -
            -
            -
            diff --git a/impl/src/main/resources/com/sun/faces/tlddoc-resources/overview-summary.html.xsl b/impl/src/main/resources/com/sun/faces/tlddoc-resources/overview-summary.html.xsl deleted file mode 100644 index bcd3813ffe..0000000000 --- a/impl/src/main/resources/com/sun/faces/tlddoc-resources/overview-summary.html.xsl +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - - - - - - - - Overview (<xsl:value-of select="/javaee:tlds/javaee:config/javaee:window-title"/>) - - - - - - - - - - - - - - - - -
            - -
            - -
            -
            -

            -
            - - - - - -
            - Tag Libraries -
            - -
            - - - - - - - - - - - -
            - -
            - -
            - - Output Generated by - Tag Library Documentation Generator. - - - -
            - - - - - - /tld-summary.html - - - - - - - - - Unnamed TLD - - - - - - - -
            -                  
            -                
            -
            - - No Description - -
            - - -
            -
            diff --git a/impl/src/main/resources/com/sun/faces/tlddoc-resources/readme.txt b/impl/src/main/resources/com/sun/faces/tlddoc-resources/readme.txt deleted file mode 100644 index 5bc1243c69..0000000000 --- a/impl/src/main/resources/com/sun/faces/tlddoc-resources/readme.txt +++ /dev/null @@ -1 +0,0 @@ -This files in this directory are probably not used anymore \ No newline at end of file diff --git a/impl/src/main/resources/com/sun/faces/tlddoc-resources/stylesheet.css b/impl/src/main/resources/com/sun/faces/tlddoc-resources/stylesheet.css deleted file mode 100644 index 30ed7ae861..0000000000 --- a/impl/src/main/resources/com/sun/faces/tlddoc-resources/stylesheet.css +++ /dev/null @@ -1,566 +0,0 @@ -/* - * Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Distribution License v. 1.0, which is available at - * http://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/* Define colors, fonts and other style attributes here to override the defaults */ - -/* Page background color */ -body { - background-color: #FFFFFF; - background-image: url(expert-draft-bg.png); -} - - -/* Table colors */ -.TableHeadingColor { background: #CCCCFF } /* Dark mauve */ -.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */ -.TableRowColor { background: #FFFFFF } /* White */ - -/* Font used in left-hand frame lists */ -.FrameTitleFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif } -.FrameHeadingFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif } -.FrameItemFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif } - -/* Example of smaller, sans-serif font in frames */ -/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */ - -/* Navigation bar fonts and colors */ -.NavBarCell1 { background-color:#EEEEFF;}/* Light mauve */ -.NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */ -.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} -.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} - -.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} -.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} - -.TagLibraryTable { margin-left: 1em; margin-right: 2em; } - - -.html4strict .de1, .html4strict .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;} -.html4strict {font-family: monospace;} -.html4strict .imp {font-weight: bold; color: red;} -.html4strict li {background: #ffffff;} -.html4strict li.li2 {background: #f8f8f8;} -.html4strict .kw1 {color: #000000;} -.html4strict .kw2 {color: #000000;} -.html4strict .kw3 {color: #000066;} -.html4strict .coMULTI {color: #000000;} -.html4strict .es0 {color: #000000;} -.html4strict .br0 {color: #000000;} -.html4strict .st0 {color: #000000;} -.html4strict .nu0 {color: #000000;} -.html4strict .sc0 {color: #000000;} -.html4strict .sc1 {color: #000000;} -.html4strict .sc2 {color: #000000;} -.html4strict .sc3 {color: #000000;} - -/* -The cleverer parts of this stylesheet came from -The Layout Reservoir - well worth a look. -http://www.bluerobot.com/web/layouts/ -*/ - -body { - color:#333; - margin:0px; - padding:0px; - font:11px verdana, arial, helvetica, sans-serif; -} - -h1 { - xborder-top: 1px solid #3d8ea8; - xborder-bottom: 1px solid #005069; - xborder-right: 1px solid #3d8ea8; - xborder-left: 1px solid #3d8ea8; - background-color: #BFB8AC; - color: #ffffff; - font-family: trebuchet ms, verdana, sans-serif; - font-size: 11px; - font-weight: bold; - text-align: left; - padding: 3px 0px 3px 10px; - margin-bottom: 0px; - margin-top: 0px; -} - - -p { - font:11px/20px verdana, arial, helvetica, sans-serif; - margin:0px 10px 10px 10px; -} - -select{ -font:11px/20px verdana, arial, helvetica, sans-serif; - -} - -label -{ - font-weight:bold; -} - -div.syntax -{ -background:white; -} - -div.syntax a -{ - font-family: 'Courier New', Courier, monospace; - font-weight: normal; - color:black; - text-decoration:underline; -} - -h1 a{color:white; text-decoration:underline;font-weight:bold;} -h1 a:link{color:white;} -h1 a:visited{color:white;} -h1 a:hover{color:yellow;background-color:transparent;} - -#content h1 -{ -background-color: #807A73; - -} - -#titlebar a{color:white; text-decoration:underline;font-weight:bold;} -#titlebar a:link{color:white;} -#titlebar a:visited{color:white;} -#titlebar a:hover{color:yellow;background-color:transparent;} - -/* Change bars from http://www.geocities.com/hentaihelper/2atimlin.htm */ - -/* put a red "change" bar in the left margin */ -/* - -a[href^="composite"] { cursor: url(changed_added_2_0_cursor.png), pointer; - background: url(changed_added_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="f/ajax.html"] { cursor: url(changed_added_2_0_cursor.png), pointer; - background: url(changed_added_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="ajax"] { cursor: url(changed_added_2_0_cursor.png), pointer; - background: url(changed_added_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="ui"] { cursor: url(changed_added_2_0_cursor.png), pointer; - background: url(changed_added_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="f/event.html"] { cursor: url(changed_added_2_0_cursor.png), pointer; - background: url(changed_added_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="event"] { cursor: url(changed_added_2_0_cursor.png), pointer; - background: url(changed_added_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="f/metadata.html"] { cursor: url(changed_added_2_0_cursor.png), pointer; - background: url(changed_added_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="metadata"] { cursor: url(changed_added_2_0_cursor.png), pointer; - background: url(changed_added_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="f/viewParam.html"] { cursor: url(changed_added_2_0_cursor.png), pointer; - background: url(changed_added_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="viewParam"] { cursor: url(changed_added_2_0_cursor.png), pointer; - background: url(changed_added_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="f/selectItems.html"] { cursor: url(changed_modified_2_0_cursor.png), pointer; - background: url(changed_modified_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="selectItems"] { cursor: url(changed_modified_2_0_cursor.png), pointer; - background: url(changed_modified_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="f/validat"] { cursor: url(changed_modified_2_0_cursor.png), pointer; - background: url(changed_modified_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="validat"] { cursor: url(changed_modified_2_0_cursor.png), pointer; - background: url(changed_modified_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="f/validateBean.html"] { cursor: url(changed_added_2_0_cursor.png), pointer; - background: url(changed_added_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="validateBean"] { cursor: url(changed_added_2_0_cursor.png), pointer; - background: url(changed_added_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="f/validateRequired.html"] { cursor: url(changed_added_2_0_cursor.png), pointer; - background: url(changed_added_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="validateRequired"] { cursor: url(changed_added_2_0_cursor.png), pointer; - background: url(changed_added_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - - -*/ - -code { font-size:12px;width:98%;} - -.codeedit { font-size:12px;width:98%;} - - -#titlebar { - padding: 0px 0px 0px 5px; - height:16px; - xborder-top: solid 1px #73a5d3; - xborder-bottom: solid 1px #39526b; - background-color: #807A73; - color: #fff; - margin-bottom: 11px; -} - -.nav { margin: 0px 5px 0px 5px; } - - - -#Content>p {margin:0px;} -#Content>p+p {text-indent:30px;} - -#content { - /* margin:0px 0px 50px 150px; */ - padding:5px; - xbackground-color: #FFF8EC; - xborder:1px solid black; -} - -#menu { - position:absolute; - top:16px; - left:0px; - width:162px; - xpadding:5px; - background-color: #FFF5E6; - xborder:1px solid black; - line-height:17px; - overflow: hidden; - - /* IE5 Hack */ - voice-family: "\"}\""; - voice-family:inherit; - width:140px; -} - -/* be nice to Opera 5 */ -body>#Menu {width:150px;} - -#menu>p {margin:5px 10px 5px 10px;line-height:1.5em;} - -li.highlight{ background-color: #D9D0C3; } - -#menu ul { - margin-left:15px; - margin-top:0px; - padding-left:0px; -} - -#menu li { - list-style-type: square; - line-height: 11px; - padding-bottom: 3px; -} - - -#namebox -{ - float:left; -} - -#expirybox -{ - float:left; - margin-left:20px; -} - -#expirybox label -{ - padding-left:3px; - padding-right:3px; - -} - -#expirybox label.current -{ - background:#FFF5E6; - -} - -#expiryinfo -{ - color:#000000; - font-style:italic; -} - -#end -{ - clear:both; -} - -table.diff -{ - background:white; -} - -table.diff td -{ - text-align:right; - padding-left:3px; - padding-right:3px; - font-size:8pt; -} - -table.diff td.code -{ - text-align:left; - font-family: 'Courier New', Courier, monospace; - font-weight: normal; -} - -table.diff td.code pre -{ - margin:0; - padding:0; -} - -table.diff tr.new -{ - background:#ddddff; -} -table.diff tr.old -{ - background:#ffdddd; -} -table.diff tr.hidenew -{ - display:none; -} -table.diff tr.hideold -{ - display:none; -} - -/* Change bars from http://www.geocities.com/hentaihelper/2atimlin.htm */ - -/* put a red "change" bar in the left margin */ - -/* - - .changed_added_2_0 { cursor: url(changed_added_2_0_cursor.cur), pointer; - background: url(changed_added_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - - .changed_modified_2_0 { cursor: url(changed_modified_2_0_cursor.cur), pointer; - background: url(changed_modified_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:orange } - - .changed_deleted_2_0 { cursor: url(changed_deleted_2_0_cursor.cur), pointer; - background: url(changed_deleted_2_0.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:red } -*/ - -/* - * - * Ensure the lefthand nav pane links have the right attribution - * - */ - -/* - -a[href^="composite/tld-frame"], a[href^="f/tld-frame"], a[href^="h/tld-frame"], a[href^="c/tld-frame"], a[href^="ui/tld-frame"], a[href^="actionSource"], a[href^="editableValueHolder"], a[href^="attribute"], a[href^="facet"], a[href^="interface"], a[href^="valueHolder"], a[href^="ajax"], a[href^="event"], a[href^="metadata"], a[href^="param"], a[href^="selectItems"], a[href^="view"], a[href^="viewParam"], a[href^="commandButton"], a[href^="commandLink"], a[href^="dataTable"], a[href^="button"], a[href^="link"], a[href^="head"], a[href^="outputLink"], a[href^="outputScript"], a[href^="outputStylesheet"], a[href^="selectManyCheckbox"], a[href^="selectmanyListbox"] { cursor: url(changed_modified_2_1.cur), pointer; - background: url(changed_modified_2_1.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:orange } - -a[href^="head"], a[href^="title"], a[href^="clientBehavior"] { cursor: url(changed_added_2_1_cursor.cur), pointer; - background: url(changed_added_2_1.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -a[href^="subview"] { cursor: url(changed_deleted_2_1_cursor.cur), pointer; - background: url(changed_deleted_2_1.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:red } -a[href^="c/"] { cursor: url(changed_modified_2_0_rev_a_cursor.cur), pointer; - background: url(changed_modified_2_0_rev_a.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:orange } - -a[href^="f/"] { cursor: url(changed_modified_2_0_rev_a_cursor.cur), pointer; - background: url(changed_modified_2_0_rev_a.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:orange } - -a[href^="h/"] { cursor: url(changed_modified_2_0_rev_a_cursor.cur), pointer; - background: url(changed_modified_2_0_rev_a.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:orange } - -a[href^="ui/"] { cursor: url(changed_modified_2_0_rev_a_cursor.cur), pointer; - background: url(changed_modified_2_0_rev_a.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:orange } - - .changed_added_2_0_rev_a { cursor: url(changed_added_2_0_rev_a_cursor.cur), pointer; - background: url(changed_added_2_0_rev_a.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - - .changed_modified_2_0_rev_a { cursor: url(changed_modified_2_0_rev_a_cursor.cur), pointer; - background: url(changed_modified_2_0_rev_a.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:orange } - - .changed_deleted_2_0_rev_a { cursor: url(changed_deleted_2_0_rev_a_cursor.cur), pointer; - background: url(changed_deleted_2_0_rev_a.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:red } - - .changed_added_2_1 { cursor: url(changed_added_2_1_cursor.cur), pointer; - background: url(changed_added_2_1.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - - .changed_modified_2_1 { cursor: url(changed_modified_2_1_cursor.cur), pointer; - background: url(changed_modified_2_1.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:orange } - - .changed_deleted_2_1 { cursor: url(changed_deleted_2_1_cursor.cur), pointer; - background: url(changed_deleted_2_1.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:red } -*/ - - -.javadocSection { font-size: large; } - -/* - - .changed_added_2_2 { cursor: url(changed_added_2_2_cursor.cur), auto; - background: url(changed_added_2_2.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - - .changed_modified_2_2 { cursor: url(changed_modified_2_2_cursor.cur), auto; - background: url(changed_modified_2_2.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:orange } - - .changed_deleted_2_2 { cursor: url(changed_deleted_2_2_cursor.cur), auto; - background: url(changed_deleted_2_2.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:red; - text-decoration: line-through; } -*/ - - .changed_added_2_3 { cursor: url(changed_added_2_3_cursor.cur), auto; - background: url(changed_added_2_3.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - - .changed_modified_2_3 { cursor: url(changed_modified_2_3_cursor.cur), auto; - background: url(changed_modified_2_3.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:orange } - - .changed_deleted_2_3 { cursor: url(changed_deleted_2_3_cursor.cur), auto; - background: url(changed_deleted_2_3.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:red; - text-decoration: line-through; } - -/* - -a[href^="h/body.html"], a[href^="composite/insertChildren.html"], a[href^="composite/insertFacet.html"], a[href^="selectItems.html"], a[href^="f/selectItems.html"],a[href^="viewParam.html"], a[href^="f/viewParam.html"], a[href^="f/tld-frame"], a[href^="h/tld-frame"], a[href^="ui/tld-frame"], a[href^="f/tld-frame"], a[href^="ui/component.html"], a[href^="component.html"], a[href^="ui/fragment.html"], a[href^="fragment.html"], a[href^="ui/composition.html"], a[href^="composition.html"], a[href^="ui/include.html"], a[href^="include.html"], a[href^="ui/decorate.html"], a[href^="decorate.html"], a[href^="ajax.html"], a[href^="f/ajax.html"], a[href^="outputStylesheet.html"], a[href^="h/outputStylesheet.html"], a[href^="button.html"], a[href^="h/button.html"], a[href^="commandButton.html"], a[href^="h/commandButton.html"], a[href^="commandLink.html"], a[href^="h/commandLink.html"], a[href^="link.html"], a[href^="h/link.html"], a[href^="view.html"], a[href^="f/view.html"] { cursor: url(changed_modified_2_2_cursor.cur), auto; - background: url(changed_modified_2_2.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:orange } - -a[href^="jsf/tld-frame"], a[href^="p/tld-frame"], a[href^="f/attributes.html"], a[href^="element.html"], a[href^="jsf/element.html"], a[href^="passThroughAttribute.html"], a[href^="f/passThroughAttribute.html"], a[href^="passThroughAttributes.html"], a[href^="f/passThroughAttribute.html"], a[href^="f/passThroughAttributes.html"], a[href^="finalizer.html"], a[href^="j/finalizer.html"], a[href^="initializer.html"], a[href^="j/initializer.html"], a[href^="vdl-document.html"], a[href^="j/vdl-document.html"], a[href^="j/view.html"], a[href^="from-outcome.html"], a[href^="j/from-outcome.html"], a[href^="if.html"], a[href^="j/if.html"], a[href^="switch.html"], a[href^="j/switch.html"], a[href^="navigation-case.html"], a[href^="j/navigation-case.html"], a[href^="faces-flow-return.html"], a[href^="j/faces-flow-return.html"], a[href^="start-node.html"], a[href^="j/start-node.html"], a[href^="flow-definition.html"], a[href^="j/flow-definition.html"], a[href^="j/tld-frame.html"], a[href^="viewAction.html"], a[href^="f/viewAction.html"], a[href^="h/inputFile.html"], a[href^="inputFile.html"] { cursor: url(changed_added_2_2_cursor.cur), auto; - background: url(changed_added_2_2.png); - padding-left:0.2em; border-left:solid; - border-left-width:thin; border-right:none; - border-top:none; border-bottom:none; border-color:green } - -*/ diff --git a/impl/src/main/resources/com/sun/faces/tlddoc-resources/tag.html.xsl b/impl/src/main/resources/com/sun/faces/tlddoc-resources/tag.html.xsl deleted file mode 100644 index c668545820..0000000000 --- a/impl/src/main/resources/com/sun/faces/tlddoc-resources/tag.html.xsl +++ /dev/null @@ -1,430 +0,0 @@ - - - - - - - - - - default - default - - - - - - - - - - - - - - - - - - - - - - - - Unnamed TLD - - - - - - () - - - - <xsl:value-of select="$title"/> - - - - - - - - - - - - - - - - -
            - -
            - - -
            -


            - Tag

            -
            -
            - - - Example:
            -
            -              
            -              
            - -
            -
            - - - - - - - - - - - - - - - - - - - - - - -
            - - Tag Information - -
            Tag Class - - - - - - None - - -
            TagExtraInfo Class - - - - - - None - - -
            Body Content - - - - - - None - - -
            Display Name - - - - - - None - - -
            -
            - - - - - - - - - - - - - - - - - - - - - - -
            - - Attributes - -
            NameRequiredRequest-timeTypeDescription
            No Attributes Defined.
            -
            - - - - - - - - - - - - - - - - - - - - - - -
            - - Variables - -
            NameTypeDeclareScopeDescription
            No Variables Defined.
            -
            - - - - - - - - - - - - - -
            - -
            - -
            - - Output Generated by - Tag Library Documentation Generator. - - - -
            -
            - - - - - - - - - - false - - - - - - - - false - - - - - - - - jakarta.el.ValueExpression -
            (must evaluate to ) -
            - - jakarta.el.ValueExpression -
            (must evaluate to java.lang.Object) -
            -
            -
            - - - - jakarta.el.MethodExpression -
            (signature must match ) -
            - - jakarta.el.MethodExpression -
            (signature must match void methodname()) -
            -
            -
            - - - - - java.lang.String - -
            - - - - - - - No Description - - - -
            - - - - - - - - - - From attribute '' - - - Unknown - - - - - - - - - java.lang.String - - - - - - - - true - - - - - - - - NESTED - - - - - - - - No Description - - - - - -
            diff --git a/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld-frame.html.xsl b/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld-frame.html.xsl deleted file mode 100644 index 05ed003083..0000000000 --- a/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld-frame.html.xsl +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - default - - - - - - - - - - - - - - - - - - Unnamed TLD - - - - - - - - () - - - No Description - - - - - - - <xsl:value-of select="$tldfull"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            - - Tags -   - - - -
            - - Functions -   - - - -
            - - Validator -   - - - -
            - - Listeners -   - - - -
            - - - -
            -
            - - -
            - - .html - tagFrame - : - -
            - - -
            - - .fn.html - tagFrame - :() - -
            - - -
            - -
            - - -
            - -
            - -
            diff --git a/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld-summary.html.xsl b/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld-summary.html.xsl deleted file mode 100644 index b7e99862c1..0000000000 --- a/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld-summary.html.xsl +++ /dev/null @@ -1,419 +0,0 @@ - - - - - - - - - - default - - - - - - - - - - - - - - - - - - Unnamed TLD - - - - - - () - - - - <xsl:value-of select="$title"/> - - - - - - - - - - - - - - - -
            - -
            - - -
            -

            -
            - - Standard Syntax:
            - -      - - - <%@ taglib prefix="" tagdir="" %>
            -
            - - <%@ taglib prefix="" uri="" %>
            -
            -
            -
            -
            - XML Syntax:
            - -      - - - <anyxmlelement xmlns:="urn:jsptagdir:" />
            -
            - - <anyxmlelement xmlns:="urn:jsptld:" />
            -
            - - <anyxmlelement xmlns:="" />
            -
            -
            -
            -
            -
            - - -
            -                  
            -                
            -
            - - No Description - -
            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            - Tag Library Information -
            Display NameNone
            VersionNone
            Short NameNone
            URINone
            -   - - - - - - - - -
            - Tag Summary -
            -   - -
            - - - - - - - -
            - Function Summary -
            -   - -
            - - - - - - - -
            - Tag Library Validator -
            -   - -
            - - - - - - - -
            - Listeners -
            -   - -
            - - - - - - - - - - - - - -
            - -
            - -
            - - - - -
            -
            - - - - - - - .html - - - - - - - - - - - No Description - - - - - - - - - - - - - - - .fn.html - - - ( - - - - - - - - - No Description - - - - - - - - - - - - - - - - - - No Description - - - -
            - Initialization Parameters:
            - - - - - - - -
            NameValueDescription
            -
            -
            - - -
            - - - - - - - - - - - - No Description - - - - - - - - - - - - - - -
            diff --git a/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld1_1-tld1_2.xsl b/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld1_1-tld1_2.xsl deleted file mode 100644 index f57a78b0b5..0000000000 --- a/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld1_1-tld1_2.xsl +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - 1.2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld1_2-tld2_0.xsl b/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld1_2-tld2_0.xsl deleted file mode 100644 index 6da2ac8133..0000000000 --- a/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld1_2-tld2_0.xsl +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - - - - - http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd - 2.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JSP - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld2_0-tld2_1.xsl b/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld2_0-tld2_1.xsl deleted file mode 100644 index 2522fccd8e..0000000000 --- a/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld2_0-tld2_1.xsl +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd - 2.1 - - - - - - - - - - - - diff --git a/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld2_1-tld2_1.xsl b/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld2_1-tld2_1.xsl deleted file mode 100644 index dda6990e25..0000000000 --- a/impl/src/main/resources/com/sun/faces/tlddoc-resources/tld2_1-tld2_1.xsl +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd - 2.1 - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/impl/src/main/resources/com/sun/faces/web-facelettaglibrary_4_1.xsd b/impl/src/main/resources/com/sun/faces/web-facelettaglibrary_4_1.xsd new file mode 100644 index 0000000000..8346e03dc0 --- /dev/null +++ b/impl/src/main/resources/com/sun/faces/web-facelettaglibrary_4_1.xsd @@ -0,0 +1,751 @@ + + + + + + + + Copyright (c) 2024 Contributors to Eclipse Foundation. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + + + + + + + The XML Schema for the Tag Libraries in the Jakarta Faces + Standard Facelets View Declaration Language (Facelets VDL) + (Version 4.1).

            + +

            Jakarta Faces 4.1 Facelet Tag Libraries that wish to conform to + this schema must declare it in the following manner.

            + + <facelet-taglib xmlns="https://jakarta.ee/xml/ns/jakartaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-facelettaglibrary_4_1.xsd" + version="4.1"> + + ... + + </facelet-taglib>
      + +

      The instance documents may indicate the published + version of the schema using xsi:schemaLocation attribute + for jakartaee namespace with the following location:

      + +

      https://jakarta.ee/xml/ns/jakartaee/web-facelettaglibrary_4_1.xsd

      + + ]]> + + + + + + + + + + + + + tag-names must be unique within a document. + +

      + ]]> +
      +
      + + +
      + + + + + + Behavior IDs must be unique within a document. + +

      + ]]> +
      +
      + + +
      + + + + + + Converter IDs must be unique within a document. + +

      + ]]> +
      +
      + + +
      + + + + + + Validator IDs must be unique within a document. + +

      + ]]> +
      +
      + + +
      +
      + + + + + + + + + + The top level XML element in a facelet tag library XML file. + +

      + ]]> +
      +
      + + + + + + + + + + + + An advisory short name for usages of tags from this tag library. + +

      + ]]> +
      +
      +
      + + + + + +
      +
      + +
      + + +
      + + + + + + + + + + Extension element for facelet-taglib. It may contain + implementation specific content. + +

      + ]]> +
      +
      + + + + +
      + + + + + + + + If the tag library XML + file contains individual tag declarations rather than pointing + to a library-class or a declaring a composite-library name, the + individual tags are enclosed in tag elements.

      + + ]]> +
      +
      + + + + + + + + + + + + + + +
      + + + + + + + + + +

      The attribute element defines an attribute for the nesting + tag. The attribute element may have several subelements + defining:

      + +
      + +
      description

      a description of the attribute +

      + +
      name

      the name of the attribute +

      + +
      required

      whether the attribute is required or + optional +

      + +
      type

      the type of the attribute +

      + +
      + +

      + ]]> +
      +
      + + + + + + + Defines if the nesting attribute is required or + optional.

      + +

      If not present then the default is "false", i.e + the attribute is optional.

      + + ]]> +
      +
      +
      + + + + + + + Defines the Java type of the attributes + value. If this element is omitted, the + expected type is assumed to be + "java.lang.Object".

      + + ]]> +
      +
      +
      + + + + + + Defines the method signature for a MethodExpression- + enabled attribute. The syntax of the method-signature + element is as follows (taken from the function-signature + EBNF in web-jsptaglibrary_2_1.xsd):

      + + + +

      MethodSignature ::= ReturnType S MethodName S? '(' S? Parameters? S? ')'

      + +

      ReturnType ::= Type

      + +

      MethodName ::= Identifier

      + +

      Parameters ::= Parameter | ( Parameter S? ',' S? Parameters )

      + +

      Parameter ::= Type

      + +
      + +

      Where:

      + +
        + +
      • Type is a basic type or a fully qualified + Java class name (including package name), as per the 'Type' + production in the Java Language Specification, Second Edition, + Chapter 18.

      • + +
      • Identifier is a Java identifier, as per the + 'Identifier' production in the Java Language Specification, + Second Edition, Chapter 18.

      • + +
      + +

      Example:

      + +

      java.lang.String nickName( java.lang.String, int )

      + + ]]> +
      +
      +
      +
      +
      + +
      + + + + + + + + + + Extension element for tag It may contain + implementation specific content. + +

      + ]]> +
      +
      + + + + +
      + + + + + + + + + + If the tag library XML file contains individual function + declarations rather than pointing to a library-class or a + declaring a composite-library name, the individual functions are + enclosed in function elements. + +

      + ]]> +
      +
      + + + + + + +
      + + + + + + + + + + Within a tag element, the behavior element encapsulates + information specific to a Faces Behavior. + +

      + ]]> +
      +
      + + + + + + +
      + + + + + + + + + + Extension element for behavior. It may contain + implementation specific content. + +

      + ]]> +
      +
      + + + + +
      + + + + + + + + Within a tag element, the component + element encapsulates information specific to a Faces UIComponent.

      + +
      + +

      As of 3.0 of the specification, this requirement is no longer + present: This element must have exactly one of + <component-type>, <resource-id>, + or <handler-class> among its child elements.

      + +
      + + ]]> +
      +
      + + + + + + + + + A valid resource identifier + as specified in the Jakarta Faces Specification Document section 2.6.1.3 "Resource Identifiers". + For example:

      + +

      <resource-id>myCC/ccName.xhtml</resource-id>

      + + ]]> +
      +
      +
      + +
      +
      + + + + + + + + + + Extension element for component It may contain + implementation specific content. + +

      + ]]> +
      +
      + + + + +
      + + + + + + + + + + Within a tag element, the converter element encapsulates + information specific to a Faces Converter. + +

      + ]]> +
      +
      + + + + + + +
      + + + + + + + + + + Extension element for converter It may contain + implementation specific content. + +

      + ]]> +
      +
      + + + + +
      + + + + + + + + + + Within a tag element, the validator element encapsulates + information specific to a Faces Validator. + +

      + ]]> +
      +
      + + + + + + +
      + + + + + + + + + + Extension element for validator It may contain + implementation specific content. + +

      + ]]> +
      +
      + + + + +
      + + + + + + + This type contains the recognized versions of + facelet-taglib supported. + +

      + ]]> +
      +
      + + + +
      + + + + + + + + + +

      Defines the canonical name of a tag or attribute being + defined.

      + +

      The name must conform to the lexical rules for an NCName

      + +

      + ]]> +
      +
      + + + + + +
      + + diff --git a/impl/src/main/resources/com/sun/faces/web-facesconfig_4_1.xsd b/impl/src/main/resources/com/sun/faces/web-facesconfig_4_1.xsd new file mode 100644 index 0000000000..d2e129cf3b --- /dev/null +++ b/impl/src/main/resources/com/sun/faces/web-facesconfig_4_1.xsd @@ -0,0 +1,3447 @@ + + + + + + + + Copyright (c) 2024 Contributors to Eclipse Foundation. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + + + + + + + The XML Schema for the Jakarta Faces Application + Configuration File (Version 4.1).

      + +

      All Jakarta Faces configuration files must indicate + the Jakarta Faces schema by indicating the + Jakarta Faces namespace:

      + +

      https://jakarta.ee/xml/ns/jakartaee

      + +

      and by indicating the version of the schema by + using the version element as shown below:

      + +
      <faces-config xmlns="https://jakarta.ee/xml/ns/jakartaee"
      +      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      +      xsi:schemaLocation="..."
      +      version="4.1">
      +      ...
      +      </faces-config>
      + +

      The instance documents may indicate the published + version of the schema using xsi:schemaLocation attribute + for jakartaee namespace with the following location:

      + +

      https://jakarta.ee/xml/ns/jakartaee/web-facesconfig_4_1.xsd

      + + ]]> +
      +
      + + + + + + + + The "faces-config" element is the root of the configuration + information hierarchy, and contains nested elements for all + of the other configuration settings.

      + + ]]> +
      +
      + + + + Behavior IDs must be unique within a document.

      + + ]]> +
      +
      + + +
      + + + + Converter IDs must be unique within a document.

      + + ]]> +
      +
      + + +
      + + + + 'converter-for-class' element values must be unique + within a document.

      + + ]]> +
      +
      + + +
      + + + + Validator IDs must be unique within a document.

      + + ]]> +
      +
      + + +
      +
      + + + + + + + + The "faces-config" element is the root of the configuration + information hierarchy, and contains nested elements for all + of the other configuration settings.

      + + ]]> +
      +
      + + + + + + + + + + + + The "name" element + within the top level "faces-config" + element declares the name of this application + configuration resource. Such names are used + in the document ordering scheme specified in section + 11.3.8 "Ordering of Artifacts" of the Jakarta Faces Specification Document.

      + +

      This value is taken to be the + defining document id of any <flow-definition> elements + defined in this Application Configuration Resource file. If this + element is not specified, the runtime must take the empty string + as its value.

      + + ]]> +
      +
      +
      + + + + + + + + +
      + + + + + The metadata-complete attribute defines whether this + Faces application is complete, or whether + the class files available to this module and packaged with + this application should be examined for annotations + that specify configuration information. + + This attribute is only inspected on the application + configuration resource file located at "WEB-INF/faces-config.xml". + The presence of this attribute on any application configuration + resource other than the one located at "WEB-INF/faces-config.xml", + including any files named using the jakarta.faces.CONFIG_FILES + attribute, must be ignored. + + If metadata-complete is set to "true", the Faces + runtime must ignore any annotations that specify configuration + information, which might be present in the class files + of the application. + + If metadata-complete is not specified or is set to + "false", the Faces runtime must examine the class + files of the application for annotations, as specified by + the specification. + + If "WEB-INF/faces-config.xml" is not present, the + Faces runtime will assume metadata-complete to be "false". + + The value of this attribute will have no impact on + runtime annotations such as @ResourceDependency or + @ListenerFor. + + + + + + +
      + + + + + + + + Extension element for faces-config. It may contain + implementation specific content.

      + + ]]> +
      +
      + + + + +
      + + + + + + + + Please see section + 11.3.8 "Ordering of Artifacts" of the Jakarta Faces Specification Document + for the specification of this element.

      + + ]]> +
      +
      + + + + + +
      + + + + + + + + This element contains a sequence of "id" elements, each of which + refers to an application configuration resource by the "id" + declared on its faces-config element. This element can also contain + a single "others" element which specifies that this document comes + before or after other documents within the application.

      + + ]]> +
      +
      + + + + + +
      + + + + + + + + This element indicates that the ordering sub-element in which + it was placed should take special action regarding the ordering + of this application resource relative to other + application configuration resources. + See section 11.3.8 "Ordering of Artifacts" of the Jakarta Faces Specification Document + for the complete specification.

      + + ]]> +
      +
      + +
      + + + + + + + + Only relevant if this is placed within the /WEB-INF/faces-config.xml. + Please see + section 11.3.8 "Ordering of Artifacts" of the Jakarta Faces Specification Document + for the specification for details.

      + + ]]> +
      +
      + + + + + +
      + + + + + + + + The "application" element provides a mechanism to define the + various per-application-singleton implementation artifacts for + a particular web application that is utilizing + Jakarta Faces. For nested elements that are not specified, + the Jakarta Faces implementation must provide a suitable + default.

      + + ]]> +
      +
      + + + + + The "action-listener" element contains the fully + qualified class name of the concrete + ActionListener implementation class that will be + called during the Invoke Application phase of the + request processing lifecycle.

      + + ]]> +
      +
      +
      + + + + The "default-render-kit-id" element allows the + application to define a renderkit to be used other + than the standard one.

      + + ]]> +
      +
      +
      + + + + The base name of a resource bundle representing + the message resources for this application. See + the JavaDocs for the "java.util.ResourceBundle" + class for more information on the syntax of + resource bundle names.

      + + ]]> +
      +
      +
      + + + + The "navigation-handler" element contains the + fully qualified class name of the concrete + NavigationHandler implementation class that will + be called during the Invoke Application phase + of the request processing lifecycle, if the + default ActionListener (provided by the Jakarta Faces + implementation) is used.

      + + ]]> +
      +
      +
      + + + + The "view-handler" element contains the fully + qualified class name of the concrete ViewHandler + implementation class that will be called during + the Restore View and Render Response phases of the + request processing lifecycle. The faces + implementation must provide a default + implementation of this class.

      + + ]]> +
      +
      +
      + + + + The "state-manager" element contains the fully + qualified class name of the concrete StateManager + implementation class that will be called during + the Restore View and Render Response phases of the + request processing lifecycle. The faces + implementation must provide a default + implementation of this class.

      + + ]]> +
      +
      +
      + + + + The "el-resolver" element contains the fully + qualified class name of the concrete + jakarta.el.ELResolver implementation class + that will be used during the processing of + EL expressions.

      + + ]]> +
      +
      +
      + + + + The "resource-handler" element contains the + fully qualified class name of the concrete + ResourceHandler implementation class that + will be used during rendering and decoding + of resource requests The standard + constructor based decorator pattern used for + other application singletons will be + honored.

      + + ]]> +
      +
      +
      + + + + The "resource-library-contracts" element + specifies the mappings between views in the application and resource + library contracts that, if present in the application, must be made + available for use as templates of the specified views. +

      + + ]]> +
      +
      +
      + + + + The "search-expression-handler" + element contains the fully qualified class name of the + concrete jakarta.faces.component.search.SearchExpressionHandler + implementation class that will be used for processing of a + search expression.

      + + ]]> +
      +
      +
      + + + + The "search-keyword-resolver" + element contains the fully qualified class name of the + concrete jakarta.faces.component.search.SearchKeywordResolver + implementation class that will be used during the processing + of a search expression keyword.

      + + ]]> +
      +
      +
      + + + + + +
      + +
      + + + + + + + + The resource-bundle element inside the application element + references a java.util.ResourceBundle instance by name + using the var element. ResourceBundles referenced in this + manner may be returned by a call to + Application.getResourceBundle() passing the current + FacesContext for this request and the value of the var + element below.

      + + ]]> +
      +
      + + + + + + The fully qualified class name of the + java.util.ResourceBundle instance.

      + + ]]> +
      +
      +
      + + + + The name by which this ResourceBundle instance + is retrieved by a call to + Application.getResourceBundle().

      + + ]]> +
      +
      +
      +
      + +
      + + + + + + + + The "resource-library-contracts" element + specifies the mappings between views in the application and resource + library contracts that, if present in the application, must be made + available for use as templates of the specified views. +

      + + ]]> +
      +
      + + + + + + Declare a mapping between a collection + of views in the application and the list of contracts (if present in the application) + that may be used as a source for templates and resources for those views.

      + + ]]> +
      +
      +
      +
      + +
      + + + + + + + + The "contract-mapping" element + specifies the mappings between a collection of views in the application and resource + library contracts that, if present in the application, must be made + available for use as templates of the specified views. +

      + + ]]> +
      +
      + + + + + + The "url-pattern" element + specifies the collection of views in this application that + are allowed to use the corresponding contracts. +

      + + ]]> +
      +
      +
      + + + + The "contracts" element + is a comma separated list of resource library contracts that, + if available to the application, may be used by the views + matched by the corresponding "url-pattern" +

      + + ]]> +
      +
      +
      +
      + +
      + + + + + + + + Extension element for application. It may contain + implementation specific content.

      + + ]]> +
      +
      + + + + +
      + + + + + + + + The "factory" element provides a mechanism to define the + various Factories that comprise parts of the implementation + of Jakarta Faces. For nested elements that are not + specified, the Jakarta Faces implementation must provide a + suitable default.

      + + ]]> +
      +
      + + + + + The "application-factory" element contains the + fully qualified class name of the concrete + ApplicationFactory implementation class that will + be called when + FactoryFinder.getFactory(APPLICATION_FACTORY) is + called.

      + + ]]> +
      +
      +
      + + + + The "exception-handler-factory" element contains the + fully qualified class name of the concrete + ExceptionHandlerFactory implementation class that will + be called when + FactoryFinder.getFactory(EXCEPTION_HANDLER_FACTORY) + is called.

      + + ]]> +
      +
      +
      + + + + The "external-context-factory" element contains the + fully qualified class name of the concrete + ExternalContextFactory implementation class that will + be called when + FactoryFinder.getFactory(EXTERNAL_CONTEXT_FACTORY) + is called.

      + + ]]> +
      +
      +
      + + + + The "faces-context-factory" element contains the + fully qualified class name of the concrete + FacesContextFactory implementation class that will + be called when + FactoryFinder.getFactory(FACES_CONTEXT_FACTORY) + is called.

      + + ]]> +
      +
      +
      + + + + The "facelet-cache-factory" element contains the + fully qualified class name of the concrete + FaceletCacheFactory implementation class that will + be called when + FactoryFinder.getFactory(FACELET_CACHE_FACTORY) + is called.

      + + ]]> +
      +
      +
      + + + + The "partial-view-context-factory" element contains the + fully qualified class name of the concrete + PartialViewContextFactory implementation class that will + be called when FactoryFinder.getFactory + (FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY) is called.

      + + ]]> +
      +
      +
      + + + + The "lifecycle-factory" element contains the fully + qualified class name of the concrete LifecycleFactory + implementation class that will be called when + FactoryFinder.getFactory(LIFECYCLE_FACTORY) is called.

      + + ]]> +
      +
      +
      + + + + The "view-declaration-language-factory" element contains + the fully qualified class name of the concrete + ViewDeclarationLanguageFactory + implementation class that will be called when + FactoryFinder.getFactory(VIEW_DECLARATION_FACTORY) is called.

      + + ]]> +
      +
      +
      + + + + The "tag-handler-delegate-factory" element contains + the fully qualified class name of the concrete + ViewDeclarationLanguageFactory + implementation class that will be called when + FactoryFinder.getFactory(TAG_HANDLER_DELEGATE_FACTORY) is called.

      + + ]]> +
      +
      +
      + + + + The "render-kit-factory" element contains the fully + qualified class name of the concrete RenderKitFactory + implementation class that will be called when + FactoryFinder.getFactory(RENDER_KIT_FACTORY) is + called.

      + + ]]> +
      +
      +
      + + + + The "visit-context-factory" element contains the fully + qualified class name of the concrete VisitContextFactory + implementation class that will be called when + FactoryFinder.getFactory(VISIT_CONTEXT_FACTORY) is + called.

      + + ]]> +
      +
      +
      + + + + The "flash-factory" element contains the + fully qualified class name of the concrete + FaceletFactory implementation class that will + be called when + FactoryFinder.getFactory(FLASH_FACTORY) is + called.

      + + ]]> +
      +
      +
      + + + + The "flow-handler-factory" element contains the + fully qualified class name of the concrete + FlowHandlerFactory implementation class that will + be called when + FactoryFinder.getFactory(FLOW_HANDLER_FACTORY) is + called.

      + + ]]> +
      +
      +
      + + + + The "client-window-factory" element contains the fully + qualified class name of the concrete ClientWindowFactory implementation class that + will be called when FactoryFinder.getFactory(CLIENT_WINDOW_FACTORY) is called.

      + + ]]> +
      +
      +
      + + + + The + "search-expression-context-factory" element contains the + fully qualified class name of the concrete + SearchExpressionContextFactory implementation class that will + be called when + FactoryFinder.getFactory(SEARCH_EXPRESSION_CONTEXT_FACTORY) + is called.

      + + ]]> +
      +
      +
      + +
      + +
      + + + + + + + + Extension element for factory. It may contain + implementation specific content.

      + + ]]> +
      +
      + + + + +
      + + + + + + + + The "attribute" element represents a named, typed, value + associated with the parent UIComponent via the generic + attributes mechanism.

      + +

      Attribute names must be unique within the scope of the parent + (or related) component.

      + + ]]> +
      +
      + + + + + + The "attribute-name" element represents the name under + which the corresponding value will be stored, in the + generic attributes of the UIComponent we are related + to.

      + + ]]> +
      +
      +
      + + + + The "attribute-class" element represents the Java type + of the value associated with this attribute name.

      + + ]]> +
      +
      +
      + + + +
      + +
      + + + + + + + + Extension element for attribute. It may contain + implementation specific content.

      + + ]]> +
      +
      + + + + +
      + + + + + + + + The "component" element represents a concrete UIComponent + implementation class that should be registered under the + specified type identifier, along with its associated + properties and attributes. Component types must be unique + within the entire web application.

      + +

      Nested "attribute" elements identify generic attributes that + are recognized by the implementation logic of this component. + Nested "property" elements identify JavaBeans properties of + the component class that may be exposed for manipulation + via tools.

      + + ]]> +
      +
      + + + + + + The "component-type" element represents the name under + which the corresponding UIComponent class should be + registered.

      + + ]]> +
      +
      +
      + + + + The "component-class" element represents the fully + qualified class name of a concrete UIComponent + implementation class.

      + + ]]> +
      +
      +
      + + + + +
      + +
      + + + + + + + + Extension element for component. It may contain + implementation specific content.

      + + ]]> +
      +
      + + + + +
      + + + + + + + + The "default-locale" element declares the default locale + for this application instance.

      + +

      + To facilitate BCP 47 this element first needs to be parsed by the + Locale.forLanguageTag method. If it does not return a Locale with + a language the old specification below needs to take effect. +

      + +

      It must be specified as :language:[_:country:[_:variant:]] + without the colons, for example "ja_JP_SJIS". The + separators between the segments may be '-' or '_'.

      + + ]]> +
      +
      + + + + + +
      + + + + + + + + The "default-value" contains the value for the property or + attribute in which this element resides. This value differs + from the "suggested-value" in that the property or attribute + must take the value, whereas in "suggested-value" taking the + value is optional.

      + + ]]> +
      +
      + + + + + +
      + + + + + EL expressions present within a faces config file + must start with the character sequence of '#{' and + end with '}'.

      + + ]]> +
      +
      + + + +
      + + + + + + + + Define the name and other design-time information for a facet + that is associated with a renderer or a component.

      + + ]]> +
      +
      + + + + + + The "facet-name" element represents the facet name + under which a UIComponent will be added to its parent. + It must be of type "Identifier".

      + + ]]> +
      +
      +
      + +
      + +
      + + + + + + + + Extension element for facet. It may contain implementation + specific content.

      + + ]]> +
      +
      + + + + +
      + + + + + + + + The + value of from-view-id must contain one of the following + values:

      + +
        + +
      • The exact match for a view identifier that is recognized + by the the ViewHandler implementation being used (such as + "/index.jsp" if you are using the default ViewHandler).

      • + +
      • The exact match of a flow node id + in the current flow, or a flow id of another flow.

      • + +
      • A proper prefix of a view identifier, plus a trailing + "*" character. This pattern indicates that all view + identifiers that match the portion of the pattern up to the + asterisk will match the surrounding rule. When more than one + match exists, the match with the longest pattern is selected. +

      • + +
      • An "*" character, which means that this pattern applies + to all view identifiers.

      • + +
      + + ]]> +
      +
      + + + + + +
      + + + + + + + + The "from-action" element contains an action reference + expression that must have been executed (by the default + ActionListener for handling application level events) + in order to select the navigation rule. If not specified, + this rule will be relevant no matter which action reference + was executed (or if no action reference was executed).

      + + ]]> +
      +
      + + + + + +
      + + + + + + + + The "if" element defines a condition that must resolve + to true in order for the navigation case on which it is + defined to be matched, with the existing match criteria + (action method and outcome) as a prerequiste, if present. + The condition is defined declaratively using a value + expression in the body of this element. The expression is + evaluated at the time the navigation case is being matched. + If the "from-outcome" is omitted and this element is + present, the navigation handler will match a null outcome + and use the condition return value to determine if the + case should be considered a match.

      + +
      + +

      When used in a <switch> within a flow, if the + expresion returns true, the + <from-outcome> sibling element's outcome is used as + the id of the node in the flow graph to which control must be + passed.

      + +
      + + ]]> +
      +
      + + + + + +
      + + + + + + + +

      + +
      + +
      + + ]]> +
      +
      + + + + + +
      + + + + + + + + The "converter" element represents a concrete Converter + implementation class that should be registered under the + specified converter identifier. Converter identifiers must + be unique within the entire web application.

      + +

      Nested "attribute" elements identify generic attributes that + may be configured on the corresponding UIComponent in order + to affect the operation of the Converter. Nested "property" + elements identify JavaBeans properties of the Converter + implementation class that may be configured to affect the + operation of the Converter. "attribute" and "property" + elements are intended to allow component developers to + more completely describe their components to tools and users. + These elements have no required runtime semantics.

      + + ]]> +
      +
      + + + + + + + The "converter-id" element represents the + identifier under which the corresponding + Converter class should be registered.

      + + ]]> +
      +
      +
      + + + + The "converter-for-class" element represents the + fully qualified class name for which a Converter + class will be registered.

      + + ]]> +
      +
      +
      +
      + + + + The "converter-class" element represents the fully + qualified class name of a concrete Converter + implementation class.

      + + ]]> +
      +
      +
      + + + + Nested "attribute" elements identify generic + attributes that may be configured on the + corresponding UIComponent in order to affect the + operation of the Converter. This attribute is + primarily for design-time tools and is not + specified to have any meaning at runtime.

      + + ]]> +
      +
      +
      + + + + Nested "property" elements identify JavaBeans + properties of the Converter implementation class + that may be configured to affect the operation of + the Converter. This attribute is primarily for + design-time tools and is not specified to have + any meaning at runtime.

      + + ]]> +
      +
      +
      + +
      + +
      + + + + + + + + Extension element for converter. It may contain + implementation specific content.

      + + ]]> +
      +
      + + + + +
      + + + + + + + + The "lifecycle" element provides a mechanism to specify + modifications to the behaviour of the default Lifecycle + implementation for this web application.

      + + ]]> +
      +
      + + + + + The "phase-listener" element contains the fully + qualified class name of the concrete PhaseListener + implementation class that will be registered on + the Lifecycle.

      + + ]]> +
      +
      +
      + +
      + +
      + + + + + + + + Extension element for lifecycle. It may contain + implementation specific content.

      + + ]]> +
      +
      + + + + +
      + + + + + The localeType defines valid locale defined by ISO-639-1 + and ISO-3166.

      + + ]]> +
      +
      + + + +
      + + + + + + + + The "locale-config" element allows the app developer to + declare the supported locales for this application.

      + + ]]> +
      +
      + + + + + +
      + + + + + + + + The "default-validators" element allows the app developer to + register a set of validators, referenced by identifier, that + are automatically assigned to any EditableValueHolder component + in the application, unless overridden or disabled locally.

      + + ]]> +
      +
      + + + + + The "validator-id" element represents the identifier + of a registered validator.

      + + ]]> +
      +
      +
      +
      + +
      + + + + + + + + + Top level element for a flow + definition.

      + +
      + +

      If there is no <start-node> element declared, it + is assumed to be <flowName>.xhtml.

      + +
      + + ]]> +
      +
      + + + + + + Declare the id of the starting node in the + flow graph. The start node may be any of the node types mentioned in + the class javadocs for FlowHandler.

      + + ]]> +
      +
      +
      + + + + + + + + + +
      + + + + The id of this flow. The id + must be unique within the Application configuration Resource + file in which this flow is defined. The value of this attribute, + combined with the value of the <faces-config><name> element + must globally identify the flow within the application.

      + + ]]> + + + + + + + + + + + + Invoke a method, passing parameters if necessary. + The return from the method is used as the outcome for where to go next in the + flow. If the method is a void method, the default outcome is used.

      + + ]]> + + + + + + + + + A parameter to pass when calling the method + identified in the "method" element that is a sibling of this element.

      + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + A parameter to pass when calling the method + identified in the "method" element that is a sibling of this element.

      + + ]]> + + + + + + + The optional "class" element within a "parameter" element + will be interpreted as the fully qualified class name for the type + of the "value" element.

      + + ]]> +
      +
      + + + + + The "value" element within an "parameter" + must be a literal string or an EL Expression whose "get" will be called when the "method" + associated with this element is invoked.

      + + ]]> +
      +
      +
      + +
      + + + + + + + + Define a view node in a flow graph.

      + +

      This element must contain exactly one + <vdl-document> element.

      + + ]]> +
      +
      + + + + + + Define the path to the vdl-document for the enclosing view. +

      + + ]]> + + + + + + + + The id of this view. It must be + unique within the flow.

      + + ]]> +
      +
      + +
      + + + + + + + + Define a switch node in a flow graph.

      + +
      + +

      This element must contain one or more + <case> elements. When control passes to the + <switch> node, each of the cases must be considered + in order and control must past to the <from-outcome> + of the first one whose <if> expression evaluates to + true.

      + +
      + + ]]> +
      +
      + + + + + Defines a case that must be + considered in the list of cases in the + <switch>.

      + + ]]> +
      +
      +
      + + + + Defines the default case that will + be taken if none of the other cases in the + <switch> are taken.

      + + ]]> +
      +
      +
      +
      + + + + The id of this switch. It must be + unique within the flow.

      + + ]]> +
      +
      +
      +
      + + + + + + + + Defines a case that will + be considered in the <switch>.

      + + ]]> +
      +
      + + + + + + If this EL expression evaluates to + true, the corresponding from-outcome will + be the outcome taken by the enclosing <switch>

      + + ]]> +
      +
      +
      + + + + The "from-outcome" element contains a logical outcome + string returned by the execution of an application + action method selected via an "actionRef" property + (or a literal value specified by an "action" property) + of a UICommand component. If specified, this rule + will be relevant only if the outcome value matches + this element's value. If not specified, this rule + will be relevant if the outcome value is non-null + or, if the "if" element is present, will be relevant + for any outcome value, with the assumption that the + condition specified in the "if" element ultimately + determines if this rule is a match.

      + +

      If used in a faces flow, this element + represents the node id to which control will be passed.

      + + ]]> +
      +
      +
      +
      + + +
      + + + + + + + + Define a return node in a flow graph.

      + +
      + +

      This element must contain exactly one <from-outcome> element.

      +
      + + ]]> +
      +
      + + + + + This element + represents the node id to which control will be passed.

      + + ]]> +
      +
      +
      +
      + + + + The id of this flow-return.

      + + ]]> +
      +
      +
      +
      + + + + + + + + Define a call node in a flow graph.

      + +
      + +

      This element must contain exactly one <flow-reference> element, + which must contain exactly one <flow-id> element.

      +
      + + ]]> +
      +
      + + + + + The flow id of the called flow.

      + + ]]> + + + + + + + A parameter to pass when calling the flow + identified in the "flow-reference" element that is a sibling of this element.

      + + ]]> + + + + + + + + The id of this flow-return.

      + + ]]> +
      +
      + +
      + + + + + + + + Identifiy the called flow.

      + +
      + +
      + + ]]> +
      +
      + + + + + The document id of the called flow.

      + + ]]> +
      +
      +
      + + + + The id of the called flow.

      + + ]]> +
      +
      +
      +
      +
      + + + + + + + + A MethodExpression that will be invoked when the flow is entered.

      + + ]]> + + + + + + + + + + + + + + + + A MethodExpression that will be invoked when the flow is exited.

      + + ]]> + + + + + + + + + + + + + + + + A named parameter whose value will be populated + with a correspondingly named parameter within an "outbound-parameter" element.

      + + ]]> + + + + + + + The "name" element within an "inbound-parameter" + element declares the name of this parameter + to be passed into a flow. There must be + a sibling "value" element in the same parent as this element.

      + + ]]> +
      +
      + + + + + The "value" element within an "inbound-parameter" + must be an EL Expression whose value will be set with the correspondingly + named "outbound-parameter" when this flow is entered, if such a + parameter exists.

      + + ]]> +
      +
      +
      + +
      + + + + + + + + A named parameter whose value will be + passed to a correspondingly named parameter within an "inbound-parameter" element + on the target flow.

      + + ]]> + + + + + + + The "name" element within an "outbound-parameter" element + declares the name of this parameter to be passed out of a flow. There must be + a sibling "value" element in the same parent as this element.

      + + ]]> +
      +
      + + + + + The "value" element within an "outbound-parameter" + must be a literal string or an EL Expression whose "get" will be called when the "flow-call" + containing this element is traversed to go to a new flow.

      + + ]]> +
      +
      +
      + +
      + + + + + + + + + The + "navigation-case" element describes a particular + combination of conditions that must match for this case to + be executed, and the view id of the component tree that + should be selected next.

      + + ]]> +
      +
      + + + + + + + The "from-outcome" element contains a logical outcome + string returned by the execution of an application + action method selected via an "actionRef" property + (or a literal value specified by an "action" property) + of a UICommand component. If specified, this rule + will be relevant only if the outcome value matches + this element's value. If not specified, this rule + will be relevant if the outcome value is non-null + or, if the "if" element is present, will be relevant + for any outcome value, with the assumption that the + condition specified in the "if" element ultimately + determines if this rule is a match.

      + + ]]> +
      +
      +
      + + + + Please see section 7.4.2 "Default NavigationHandler Algorithm" of the Jakarta Faces Specification Document + for the specification of this element.

      + + ]]> +
      +
      +
      + + + + The "to-view-id" element + contains the view identifier (or + flow node id, or flow id) + of the next view (or flow node or + flow) that should be displayed if this + navigation rule is matched. If the contents is a + value expression, it should be resolved by the + navigation handler to obtain the view ( + or flow node or flow) + identifier.

      + + ]]> +
      +
      +
      + + + + The document id of the called flow. + If this element appears in a <navigation-case> nested within + a <flow-definition>, it must be ignored because navigation + cases within flows may only navigate among the view nodes of that + flow.

      + + ]]> +
      +
      +
      + +
      + +
      + + + + + + + + The "navigation-rule" element represents an individual + decision rule that will be utilized by the default + NavigationHandler implementation to make decisions on + what view should be displayed next, based on the + view id being processed.

      + + ]]> +
      +
      + + + + + + + +
      + + + + + + + + Extension element for navigation-rule. It may contain + implementation specific content.

      + + ]]> +
      +
      + + + + +
      + + + + + + + + The "null-value" element indicates that the managed + property in which we are nested will be explicitly + set to null if our managed bean is automatically + created. This is different from omitting the managed + property element entirely, which will cause no + property setter to be called for this property.

      + +

      The "null-value" element can only be used when the + associated "property-class" identifies a Java class, + not a Java primitive.

      + + ]]> +
      +
      + +
      + + + + + + + + The "property" element represents a JavaBean property of the + Java class represented by our parent element.

      + +

      Property names must be unique within the scope of the Java + class that is represented by the parent element, and must + correspond to property names that will be recognized when + performing introspection against that class via + java.beans.Introspector.

      + + ]]> +
      +
      + + + + + + The "property-name" element represents the JavaBeans + property name under which the corresponding value + may be stored.

      + + ]]> +
      +
      +
      + + + + The "property-class" element represents the Java type + of the value associated with this property name. + If not specified, it can be inferred from existing + classes; however, this element should be specified if + the configuration file is going to be the source for + generating the corresponding classes.

      + + ]]> +
      +
      +
      + + + +
      + +
      + + + + + + + + Any view that matches any of the + url-patterns in this element may only be reached from another Jakarta Faces + view in the same web application. Because the runtime is aware of + which views are protected, any navigation from an unprotected + view to a protected view is automatically subject to + protection.

      + + ]]> +
      +
      + + + +
      + + + + + + + + Extension element for property. It may contain + implementation specific content.

      + + ]]> +
      +
      + + + + +
      + + + + + + + + The "redirect" element indicates that navigation to the + specified "to-view-id" should be accomplished by + performing an HTTP redirect rather than the usual + ViewHandler mechanisms.

      + + ]]> +
      +
      + + + + + +
      + + + + + + + + This element was introduced due to a specification + error, and is now deprecated. The correct name for + this element is "redirect-param" and its meaning is + documented therein. The "view-param" element is + maintained to preserve backwards compatibility. + Implementations must treat this element the same as + "redirect-param".

      + + ]]> +
      +
      + + + + + +
      + + + + + + + + The "redirect-param" element, only valid within + a "redirect" element, contains child "name" + and "value" elements that must be included in the + redirect url when the redirect is performed.

      + + ]]> +
      +
      + + + + + +
      + + + + + + + + The "referenced-bean" element represents at design time the + promise that a Java object of the specified type will exist at + runtime in some scope, under the specified key. This can be + used by design time tools to construct user interface dialogs + based on the properties of the specified class. The presence + or absence of a referenced bean element has no impact on the + Jakarta Faces runtime environment inside a web application.

      + + ]]> +
      +
      + + + + + + The "referenced-bean-name" element represents the + attribute name under which the corresponding + referenced bean may be assumed to be stored, in one + of 'request', 'session', 'view', 'application' + or a custom scope.

      + + ]]> +
      +
      +
      + + + + The "referenced-bean-class" element represents the + fully qualified class name of the Java class + (either abstract or concrete) or Java interface + implemented by the corresponding referenced bean.

      + + ]]> +
      +
      +
      +
      + +
      + + + + + + + + The "render-kit" element represents a concrete RenderKit + implementation that should be registered under the specified + render-kit-id. If no render-kit-id is specified, the + identifier of the default RenderKit + (RenderKitFactory.DEFAULT_RENDER_KIT) is assumed.

      + + ]]> +
      +
      + + + + + + The "render-kit-id" element represents an identifier + for the RenderKit represented by the parent + "render-kit" element.

      + + ]]> +
      +
      +
      + + + + The "render-kit-class" element represents the fully + qualified class name of a concrete RenderKit + implementation class.

      + + ]]> +
      +
      +
      + + + +
      + +
      + + + + + + + + The "client-behavior-renderer" element represents a concrete + ClientBehaviorRenderer implementation class that should be + registered under the specified behavior renderer type identifier, + in the RenderKit associated with the parent "render-kit" + element. Client Behavior renderer type must be unique within the RenderKit + associated with the parent "render-kit" element.

      + +

      Nested "attribute" elements identify generic component + attributes that are recognized by this renderer.

      + + ]]> +
      +
      + + + + + The "client-behavior-renderer-type" element represents a renderer type + identifier for the Client Behavior Renderer represented by the parent + "client-behavior-renderer" element.

      + + ]]> +
      +
      +
      + + + + The "client-behavior-renderer-class" element represents the fully + qualified class name of a concrete Client Behavior Renderer + implementation class.

      + + ]]> +
      +
      +
      +
      + +
      + + + + + + + + The "renderer" element represents a concrete Renderer + implementation class that should be registered under the + specified component family and renderer type identifiers, + in the RenderKit associated with the parent "render-kit" + element. Combinations of component family and + renderer type must be unique within the RenderKit + associated with the parent "render-kit" element.

      + +

      Nested "attribute" elements identify generic component + attributes that are recognized by this renderer.

      + + ]]> +
      +
      + + + + + + The "component-family" element represents the + component family for which the Renderer represented + by the parent "renderer" element will be used.

      + + ]]> +
      +
      +
      + + + + The "renderer-type" element represents a renderer type + identifier for the Renderer represented by the parent + "renderer" element.

      + + ]]> +
      +
      +
      + + + + The "renderer-class" element represents the fully + qualified class name of a concrete Renderer + implementation class.

      + + ]]> +
      +
      +
      + + + +
      + +
      + + + + + + + + Extension element for renderer. It may contain implementation + specific content.

      + + ]]> +
      +
      + + + + +
      + + + + + + + + Extension element for render-kit. It may contain + implementation specific content.

      + + ]]> +
      +
      + + + + +
      + + + + + + + + The "suggested-value" contains the value for the property or + attribute in which this element resides. This value is + advisory only and is intended for tools to use when + populating pallettes.

      + + ]]> +
      +
      + + + +
      + + + + + + + + The "supported-locale" element allows authors to declare + which locales are supported in this application instance.

      + +

      + To facilitate BCP 47 this element first needs to be parsed by the + Locale.forLanguageTag method. If it does not return a Locale with + a language the old specification below needs to take effect. +

      + +

      It must be specified as :language:[_:country:[_:variant:]] + without the colons, for example "ja_JP_SJIS". The + separators between the segments may be '-' or '_'.

      + + ]]> +
      +
      + + + + + +
      + + + + + + + + The "behavior" element represents a concrete Behavior + implementation class that should be registered under the + specified behavior identifier. Behavior identifiers must + be unique within the entire web application.

      + +

      Nested "attribute" elements identify generic attributes that + may be configured on the corresponding UIComponent in order + to affect the operation of the Behavior. Nested "property" + elements identify JavaBeans properties of the Behavior + implementation class that may be configured to affect the + operation of the Behavior. "attribute" and "property" + elements are intended to allow component developers to + more completely describe their components to tools and users. + These elements have no required runtime semantics.

      + + ]]> +
      +
      + + + + + + The "behavior-id" element represents the identifier + under which the corresponding Behavior class should + be registered.

      + + ]]> +
      +
      +
      + + + + The "behavior-class" element represents the fully + qualified class name of a concrete Behavior + implementation class.

      + + ]]> +
      +
      +
      + + + + Nested "attribute" elements identify generic + attributes that may be configured on the + corresponding UIComponent in order to affect the + operation of the Behavior. This attribute is + primarily for design-time tools and is not + specified to have any meaning at runtime.

      + + ]]> +
      +
      +
      + + + + Nested "property" elements identify JavaBeans + properties of the Behavior implementation class + that may be configured to affect the operation of + the Behavior. This attribute is primarily for + design-time tools and is not specified to have + any meaning at runtime.

      + + ]]> +
      +
      +
      + +
      + +
      + + + + + + + + Extension element for behavior. It may contain + implementation specific content.

      + + ]]> +
      +
      + + + + +
      + + + + + + + + The "validator" element represents a concrete Validator + implementation class that should be registered under the + specified validator identifier. Validator identifiers must + be unique within the entire web application.

      + +

      Nested "attribute" elements identify generic attributes that + may be configured on the corresponding UIComponent in order + to affect the operation of the Validator. Nested "property" + elements identify JavaBeans properties of the Validator + implementation class that may be configured to affect the + operation of the Validator. "attribute" and "property" + elements are intended to allow component developers to + more completely describe their components to tools and users. + These elements have no required runtime semantics.

      + + ]]> +
      +
      + + + + + + The "validator-id" element represents the identifier + under which the corresponding Validator class should + be registered.

      + + ]]> +
      +
      +
      + + + + The "validator-class" element represents the fully + qualified class name of a concrete Validator + implementation class.

      + + ]]> +
      +
      +
      + + + + Nested "attribute" elements identify generic + attributes that may be configured on the + corresponding UIComponent in order to affect the + operation of the Validator. This attribute is + primarily for design-time tools and is not + specified to have any meaning at runtime.

      + + ]]> +
      +
      +
      + + + + Nested "property" elements identify JavaBeans + properties of the Validator implementation class + that may be configured to affect the operation of + the Validator. This attribute is primarily for + design-time tools and is not specified to have + any meaning at runtime.

      + + ]]> +
      +
      +
      + +
      + +
      + + + + + + + + Extension element for validator. It may contain + implementation specific content.

      + + ]]> +
      +
      + + + + +
      + + + + + The "value" element is the String representation of + a literal value to which a scalar managed property + will be set, or a value binding expression ("#{...}") + that will be used to calculate the required value. + It will be converted as specified for the actual + property type.

      + + ]]> +
      +
      + +
      + + + + + + + + The presence of this element within the "application" element in + an application configuration resource file indicates the + developer wants to add an SystemEventListener to this + application instance. Elements nested within this element allow + selecting the kinds of events that will be delivered to the + listener instance, and allow selecting the kinds of classes that + can be the source of events that are delivered to the listener + instance.

      + + ]]> +
      +
      + + + + + The "system-event-listener-class" element contains + the fully qualified class name of the concrete + SystemEventListener implementation class that will be + called when events of the type specified by the + "system-event-class" are sent by the runtime.

      + + ]]> +
      +
      +
      + + + + The "system-event-class" element contains the fully + qualified class name of the SystemEvent subclass for + which events will be delivered to the class whose fully + qualified class name is given by the + "system-event-listener-class" element.

      + + ]]> +
      +
      +
      + + + + The "source-class" element, if present, contains the + fully qualified class name of the class that will be the + source for the event to be delivered to the class whose + fully qualified class name is given by the + "system-event-listener-class" element.

      + + ]]> +
      +
      +
      +
      + +
      + + + + + This type contains the recognized versions of + faces-config supported.

      + + ]]> +
      +
      + + + +
      + +
      diff --git a/impl/src/main/resources/com/sun/faces/web-partialresponse_4_1.xsd b/impl/src/main/resources/com/sun/faces/web-partialresponse_4_1.xsd new file mode 100644 index 0000000000..35064f1383 --- /dev/null +++ b/impl/src/main/resources/com/sun/faces/web-partialresponse_4_1.xsd @@ -0,0 +1,403 @@ + + + + + + + + Copyright (c) 2024 Contributors to Eclipse Foundation. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + + + + + + + + + The XML Schema for the Jakarta Faces (Version 4.1) + Partial Response used in Jakarta Faces Ajax frameworks. + +

      + + ]]> +
      +
      + + + + + + + + + + The "partial-response" element is the root of the + partial response information hierarchy, and contains + nested elements for all possible elements that can exist + in the response.

      + +

      This element must have an "id" attribute whose value + is the return from calling getContainerClientId() on the + UIViewRoot to which this response pertains. + +

      + + ]]> +
      +
      +
      + + + + + + + + + + The "partial-response" element is the root of the + partial response information hierarchy, and contains + nested elements for all possible elements that can exist + in the response. + +

      + +

      + + ]]> +
      +
      + + + + + + + + + This element must have an "id" attribute whose value + is the return from calling getContainerClientId() on the + UIViewRoot to which this response pertains.

      + + ]]> + + + + + + + + + + + + + + The "changes" element contains a collection of child elements, + each of which describes a different change to be applied to the + view in the user agent. + +

      + + ]]> +
      +
      + + + + + + + + + + + The "eval" element enables this element's + contents to be executed as JavaScript. + +

      + + ]]> +
      +
      +
      + +
      +
      + + + + + + + + + + The "update" element enables DOM elements matching the "id" + attribute to be updated with the contents of this element. + +

      + + ]]> +
      +
      + + + + +
      + + + + + + + + + + The "insert" element enables content to be inserted into the DOM + before or after an existing DOM element as specified by the + nested "before" or "after" elements. The elements "before" and + "after" are mutually exclusive - one of them must be specified. + +

      + + ]]> +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + + + + + + The "delete" element enables DOM elements matching the "id" + attribute to be removed. + +

      + + ]]> +
      +
      + +
      + + + + + + + + + + The "attributes" element enables attributes of DOM elements matching the "id" + attribute to be updated. If this element is used, then it must contain at + least one "attribute" element. + +

      + + ]]> +
      +
      + + + + + + + + + + + + +
      + + + + + + + + + + The "redirect" element enables a redirect to the location as specified by the + "url" attribute. + +

      + + ]]> +
      +
      + +
      + + + + + + + + + + The "error" element contains error information from the server. + +

      + + ]]> +
      +
      + + + + +
      + + + + + + + + + Extension element for partial response. It may contain + implementation specific content. +

      + + ]]> +
      +
      + + + + +
      + +
      diff --git a/impl/src/main/resources/jakarta/faces/LogStrings.properties b/impl/src/main/resources/jakarta/faces/LogStrings.properties deleted file mode 100644 index 6059c8f8e4..0000000000 --- a/impl/src/main/resources/jakarta/faces/LogStrings.properties +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# -# Logging key guideline: -# [level].[base package].[message_id] - -# Common ----------------------------------------------------------------------- - - -# PACKAGE jakarta.faces ---------------------------------------------------------- -severe.no_factory= Application was not properly initialized at startup, could not find Factory: {0}. Attempting to find backup. -severe.no_factory_backup_failed= Could not find backup for factory {0}. - - -# PACKAGE jakarta.faces.application ---------------------------------------------- - - -# PACKAGE jakarta.faces.component ------------------------------------------------ -fine.component.populating_descriptor_map=Populating PropertyDescriptor Map for class ''{0}'' for Thread named ''{1}''. -error.component.abortprocessing_thrown=AbortProcessingException thrown when processing event of type ''{0}'' during phase ''{1}'' for component with ID or Client ID of ''{2}'' -severe.component.unable_to_process_expression=Exception while processing expression {0} for attribute {1}. -severe.component.uiviewroot_error_invoking_phaselistener=Exception invoking UIViewRoot PhaseListener {0}. -warning.component.uiviewroot_non_serializable_attribute_viewmap=Setting non-serializable attribute value into ViewMap: (key: {0}, value class: {1}) -# PACKAGE jakarta.faces.context -------------------------------------------------- - - -# PACKAGE jakarta.faces.convert -------------------------------------------------- - - -# PACKAGE jakarta.faces.el ------------------------------------------------------- - - -# PACKAGE jakarta.faces.event ---------------------------------------------------- -severe.event.exception_invoking_processaction=Received ''{0}'' when invoking action listener ''{1}'' for component ''{2}'' - -# PACKAGE jakarta.faces.lifecycle ------------------------------------------------ - - -# PACKAGE jakarta.faces.model ---------------------------------------------------- - - -# PACKAGE jakarta.faces.render --------------------------------------------------- - - -# PACKAGE jakarta.faces.validator ------------------------------------------------ - - -# PACKAGE jakarta.faces.webapp --------------------------------------------------- -warning.webapp.facesservlet.init_invalid_http_method=The runtime was configured to permit HTTP method {0} but that is not one of {1}. Note that HTTP method names are case sensitive. -severe.webapp.facesservlet.init_failed=Initialization of the Faces runtime either failed or did not occur. Review the server''s log for details. - diff --git a/impl/src/main/resources/jakarta/faces/LogStrings_de.properties b/impl/src/main/resources/jakarta/faces/LogStrings_de.properties deleted file mode 100644 index ac2546f59c..0000000000 --- a/impl/src/main/resources/jakarta/faces/LogStrings_de.properties +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# -# Logging key guideline: -# [level].[base package].[message_id] - -# Common ----------------------------------------------------------------------- - - -# PACKAGE jakarta.faces ---------------------------------------------------------- -severe.no_factory= Die Anwendung wurde bei Systemstart nicht einwandfrei initialisiert, Factory konnte nicht gefunden werden: {0}. -severe.no_factory_backup_failed= Keine Factory als Backup f\u00fcr {0} gefunden. - - -# PACKAGE jakarta.faces.application ---------------------------------------------- - - -# PACKAGE jakarta.faces.component ------------------------------------------------ -fine.component.populating_descriptor_map=F\u00fcllen von PropertyDescriptor-Zuordnung f\u00fcr Klasse ''{0}'' f\u00fcr Thread mit dem Namen ''{1}''. -error.component.abortprocessing_thrown=AbortProcessingException wird ausgel\u00f6st, wenn das Ereignis des Typs ''{0}'' w\u00e4hrend ''{1}'' f\u00fcr Komponente mit ID oder Client-ID von ''{2}'' verarbeitet wird. -severe.component.unable_to_process_expression=Ausnahme beim Verarbeiten von Ausdruck {0} f\u00fcr Attribut {1}. -severe.component.uiviewroot_error_invoking_phaselistener=Ausnahme ruft UIViewRoot PhaseListener {0} auf. -warning.component.uiviewroot_non_serializable_attribute_viewmap=Der nicht serialisierbare Attributswert wird in ViewMap eingestellt: (Schl\u00fcssel: {0}, Wertklasse: {1}) -# PACKAGE jakarta.faces.context -------------------------------------------------- - - -# PACKAGE jakarta.faces.convert -------------------------------------------------- - - -# PACKAGE jakarta.faces.el ------------------------------------------------------- - - -# PACKAGE jakarta.faces.event ---------------------------------------------------- -severe.event.exception_invoking_processaction=Beim Aufrufen des Aktionszielger\u00e4ts ''{0}'' f\u00fcr Komponente ''{1}'' wurde ''{2}'' erhalten. - -# PACKAGE jakarta.faces.lifecycle ------------------------------------------------ - - -# PACKAGE jakarta.faces.model ---------------------------------------------------- - - -# PACKAGE jakarta.faces.render --------------------------------------------------- - - -# PACKAGE jakarta.faces.validator ------------------------------------------------ - - -# PACKAGE jakarta.faces.webapp --------------------------------------------------- -warning.webapp.facesservlet.init_invalid_http_method=The runtime was configured to permit HTTP method {0} but that is not one of {1}. Note that HTTP method names are case sensitive. -severe.webapp.facesservlet.init_failed=Die Initialisierung der Faces-Laufzeit schlug fehl oder ist nicht aufgetreten. Pr\u00fcfen Sie die Details im Protokoll des Servers. - - diff --git a/impl/src/main/resources/jakarta/faces/LogStrings_es.properties b/impl/src/main/resources/jakarta/faces/LogStrings_es.properties deleted file mode 100644 index 4ca5a0f711..0000000000 --- a/impl/src/main/resources/jakarta/faces/LogStrings_es.properties +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# -# Logging key guideline: -# [level].[base package].[message_id] - -# Common ----------------------------------------------------------------------- - - -# PACKAGE jakarta.faces ---------------------------------------------------------- -severe.no_factory= La aplicaci\u00f3n no se ha inicializado correctamente durante el inicio, no se encuentra la f\u00e1brica: {0}. Attempting to find backup. -severe.no_factory_backup_failed= Could not find backup for factory {0}. - - -# PACKAGE jakarta.faces.application ---------------------------------------------- - - -# PACKAGE jakarta.faces.component ------------------------------------------------ -fine.component.populating_descriptor_map=Rellenando el mapa PropertyDescriptor para la clase ''{0}'' para el subproceso denominado ''{1}''. -error.component.abortprocessing_thrown=Se ha arrojado AbortProcessingException al procesar el evento de tipo ''{0}'' durante la fase ''{1}'' para el componente con ID o ID de cliente ''{2}'' -severe.component.unable_to_process_expression=Excepci\u00f3n al procesar la expresi\u00f3n {0} para el atributo {1}. -severe.component.uiviewroot_error_invoking_phaselistener=Excepci\u00f3n al invocar la escucha de fase UIViewRoot {0}. -warning.component.uiviewroot_non_serializable_attribute_viewmap=Definiendo valor de atributo no serializable en ViewMap: (clave: {0}, clase de valor: {1}) -# PACKAGE jakarta.faces.context -------------------------------------------------- - - -# PACKAGE jakarta.faces.convert -------------------------------------------------- - - -# PACKAGE jakarta.faces.el ------------------------------------------------------- - - -# PACKAGE jakarta.faces.event ---------------------------------------------------- -severe.event.exception_invoking_processaction=Se ha recibido ''{0}'' al invocar la escucha de acci\u00f3n ''{1}'' para el componente ''{2}'' - -# PACKAGE jakarta.faces.lifecycle ------------------------------------------------ - - -# PACKAGE jakarta.faces.model ---------------------------------------------------- - - -# PACKAGE jakarta.faces.render --------------------------------------------------- - - -# PACKAGE jakarta.faces.validator ------------------------------------------------ - - -# PACKAGE jakarta.faces.webapp --------------------------------------------------- -warning.webapp.facesservlet.init_invalid_http_method=The runtime was configured to permit HTTP method {0} but that is not one of {1}. Note that HTTP method names are case sensitive. -severe.webapp.facesservlet.init_failed=La inicializaci\u00f3n del tiempo de ejecuci\u00f3n Faces ha fallado o no se ha producido. Revise el registro del servidor para m\u00e1s informaci\u00f3n. - - diff --git a/impl/src/main/resources/jakarta/faces/LogStrings_fr.properties b/impl/src/main/resources/jakarta/faces/LogStrings_fr.properties deleted file mode 100644 index 5a3dcfef91..0000000000 --- a/impl/src/main/resources/jakarta/faces/LogStrings_fr.properties +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# -# Logging key guideline: -# [level].[base package].[message_id] - -# Common ----------------------------------------------------------------------- - - -# PACKAGE jakarta.faces ---------------------------------------------------------- -severe.no_factory= L\u2019application n\u2019a pas \u00e9t\u00e9 initialis\u00e9e correctement au d\u00e9marrage. Impossible de localiser la Fabrique : {0}. Attempting to find backup. -severe.no_factory_backup_failed= Could not find backup for factory {0}. - - -# PACKAGE jakarta.faces.application ---------------------------------------------- - - -# PACKAGE jakarta.faces.component ------------------------------------------------ -fine.component.populating_descriptor_map=Remplissage du plan PropertyDescriptor pour la classe \u00ab{0}\u00bb de la Thread nomm\u00e9e \u00ab{1}\u00bb. -error.component.abortprocessing_thrown=Exception d\u2019abandon de processus (AbortProcessingException) \u00e9mise lors du traitement de l\u2019\u00e9v\u00e9nement de type \u00ab{0}\u00bb pendant la phase \u00ab{1}\u00bb du composant dont l\u2019ID ou l\u2019ID Client est \u00ab{2}\u00bb -severe.component.unable_to_process_expression=Exception lors du traitement de l\u2019expression {0} de l\u2019attribut {1}. -severe.component.uiviewroot_error_invoking_phaselistener=Exception invoquant UIViewRoot PhaseListener {0}. -warning.component.uiviewroot_non_serializable_attribute_viewmap=D\u00e9finition d\u2019une valeur d\u2019attribut non-s\u00e9rialisable dans ViewMap\u00a0: (cl\u00e9\u00a0: {0}, classe de la valeur\u00a0: {1}) -# PACKAGE jakarta.faces.context -------------------------------------------------- - - -# PACKAGE jakarta.faces.convert -------------------------------------------------- - - -# PACKAGE jakarta.faces.el ------------------------------------------------------- - - -# PACKAGE jakarta.faces.event ---------------------------------------------------- -severe.event.exception_invoking_processaction=R\u00e9ception de \u00ab{0}\u00bb lors de l\u2019invocation du listener d\u2019action \u00ab{1}\u00bb du composant \u00ab{2}\u00bb - -# PACKAGE jakarta.faces.lifecycle ------------------------------------------------ - - -# PACKAGE jakarta.faces.model ---------------------------------------------------- - - -# PACKAGE jakarta.faces.render --------------------------------------------------- - - -# PACKAGE jakarta.faces.validator ------------------------------------------------ - - -# PACKAGE jakarta.faces.webapp --------------------------------------------------- -warning.webapp.facesservlet.init_invalid_http_method=The runtime was configured to permit HTTP method {0} but that is not one of {1}. Note that HTTP method names are case sensitive. -severe.webapp.facesservlet.init_failed=L\u2019initialisation de l\u2019ex\u00e9cution Faces a \u00e9chou\u00e9 ou ne s\u2019est pas produite. Consultez le journal du serveur pour plus de d\u00e9tails. - - diff --git a/impl/src/main/resources/jakarta/faces/LogStrings_ja.properties b/impl/src/main/resources/jakarta/faces/LogStrings_ja.properties deleted file mode 100644 index 01082dba31..0000000000 --- a/impl/src/main/resources/jakarta/faces/LogStrings_ja.properties +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# -# Logging key guideline: -# [level].[base package].[message_id] - -# Common ----------------------------------------------------------------------- - - -# PACKAGE jakarta.faces ---------------------------------------------------------- -severe.no_factory= \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u8d77\u52d5\u6642\u306b\u6b63\u3057\u304f\u521d\u671f\u5316\u3055\u308c\u305a\u3001\u30d5\u30a1\u30af\u30c8\u30ea\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f: {0}. Attempting to find backup. -severe.no_factory_backup_failed= Could not find backup for factory {0}. - - -# PACKAGE jakarta.faces.application ---------------------------------------------- - - -# PACKAGE jakarta.faces.component ------------------------------------------------ -fine.component.populating_descriptor_map=''{1}'' \u3068\u3044\u3046\u540d\u524d\u306e\u30b9\u30ec\u30c3\u30c9\u306b\u5bfe\u3057\u3066\u3001\u30af\u30e9\u30b9 ''{0}'' \u306e PropertyDescriptor \u30de\u30c3\u30d7\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002 -error.component.abortprocessing_thrown=ID \u307e\u305f\u306f Client ID \u304c ''{2}'' \u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u30d5\u30a7\u30fc\u30ba ''{1}'' \u3067\u3001\u30bf\u30a4\u30d7\u304c ''{0}'' \u306e\u30a4\u30d9\u30f3\u30c8\u3092\u51e6\u7406\u3057\u3066\u3044\u308b\u3068\u304d\u306b AbortProcessingException \u304c\u30b9\u30ed\u30fc\u3055\u308c\u307e\u3057\u305f -severe.component.unable_to_process_expression=\u5c5e\u6027 {1} \u306e\u5f0f {0} \u306e\u51e6\u7406\u4e2d\u306b\u4f8b\u5916\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -severe.component.uiviewroot_error_invoking_phaselistener=UIViewRoot PhaseListener {0} \u306e\u547c\u3073\u51fa\u3057\u4e2d\u306b\u4f8b\u5916\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -warning.component.uiviewroot_non_serializable_attribute_viewmap=\u30b7\u30ea\u30a2\u30e9\u30a4\u30ba\u3067\u304d\u306a\u3044\u5c5e\u6027\u5024\u3092 ViewMap \u306b\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059: (\u30ad\u30fc: {0}\u3001\u5024\u30af\u30e9\u30b9: {1}) -# PACKAGE jakarta.faces.context -------------------------------------------------- - - -# PACKAGE jakarta.faces.convert -------------------------------------------------- - - -# PACKAGE jakarta.faces.el ------------------------------------------------------- - - -# PACKAGE jakarta.faces.event ---------------------------------------------------- -severe.event.exception_invoking_processaction=\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8 ''{2}'' \u306e\u30a2\u30af\u30b7\u30e7\u30f3\u30ea\u30b9\u30ca\u30fc ''{1}'' \u306e\u547c\u3073\u51fa\u3057\u4e2d\u306b\u3001''{0}'' \u3092\u53d7\u3051\u53d6\u308a\u307e\u3057\u305f - -# PACKAGE jakarta.faces.lifecycle ------------------------------------------------ - - -# PACKAGE jakarta.faces.model ---------------------------------------------------- - - -# PACKAGE jakarta.faces.render --------------------------------------------------- - - -# PACKAGE jakarta.faces.validator ------------------------------------------------ - - -# PACKAGE jakarta.faces.webapp --------------------------------------------------- -warning.webapp.facesservlet.init_invalid_http_method=The runtime was configured to permit HTTP method {0} but that is not one of {1}. Note that HTTP method names are case sensitive. -severe.webapp.facesservlet.init_failed=Faces \u30e9\u30f3\u30bf\u30a4\u30e0\u306e\u521d\u671f\u5316\u306f\u3001\u5931\u6557\u3057\u305f\u304b\u5b9f\u884c\u3055\u308c\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u8a73\u7d30\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u30ed\u30b0\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 - - diff --git a/impl/src/main/resources/jakarta/faces/LogStrings_ko.properties b/impl/src/main/resources/jakarta/faces/LogStrings_ko.properties deleted file mode 100644 index 2f9c89d6e2..0000000000 --- a/impl/src/main/resources/jakarta/faces/LogStrings_ko.properties +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# -# Logging key guideline: -# [level].[base package].[message_id] - -# Common ----------------------------------------------------------------------- - - -# PACKAGE jakarta.faces ---------------------------------------------------------- -severe.no_factory= \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8 \uc2dc\uc791 \uc2dc \uc62c\ubc14\ub974\uac8c \ucd08\uae30\ud654\ub418\uc9c0 \uc54a\uc544 {0} \ud329\ud1a0\ub9ac\ub97c \ucc3e\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. Attempting to find backup. -severe.no_factory_backup_failed= Could not find backup for factory {0}. - - -# PACKAGE jakarta.faces.application ---------------------------------------------- - - -# PACKAGE jakarta.faces.component ------------------------------------------------ -fine.component.populating_descriptor_map=\uc774\ub984\uc774 "{0}"\uc778 \uc2a4\ub808\ub4dc\uc5d0 \ub300\ud574 \ud074\ub798\uc2a4 "{0}"\uc758 PropertyDescriptor \ub9f5\uc744 \uc785\ub825\ud558\ub294 \uc911\uc785\ub2c8\ub2e4. -error.component.abortprocessing_thrown=ID \ub610\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8 ID\uac00 "{2}"\uc778 \uad6c\uc131 \uc694\uc18c\uc5d0 \ub300\ud574 \ub2e8\uacc4 "{1}" \ub3d9\uc548 \uc774\ubca4\ud2b8 \uc720\ud615 "{0}"\uc744(\ub97c) \ucc98\ub9ac\ud558\ub294 \uc911\uc5d0 AbortProcessingException\uc774 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. -severe.component.unable_to_process_expression={1} \uc18d\uc131\uc5d0 \ub300\ud55c \ud45c\ud604\uc2dd {0}\uc744(\ub97c) \ucc98\ub9ac\ud558\ub294 \uc911 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. -severe.component.uiviewroot_error_invoking_phaselistener=UIViewRoot PhaseListener {0}\uc744(\ub97c) \ud638\ucd9c\ud558\ub294 \uc911 \uc608\uc678\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. -warning.component.uiviewroot_non_serializable_attribute_viewmap=\uc77c\ub828\ud654\ud560 \uc218 \uc5c6\ub294 \uc18d\uc131 \uac12\uc744 ViewMap\uc5d0 \uc124\uc815\ud558\ub294 \uc911: (\ud0a4: {0}, \uac12 \ud074\ub798\uc2a4: {1}) -# PACKAGE jakarta.faces.context -------------------------------------------------- - - -# PACKAGE jakarta.faces.convert -------------------------------------------------- - - -# PACKAGE jakarta.faces.el ------------------------------------------------------- - - -# PACKAGE jakarta.faces.event ---------------------------------------------------- -severe.event.exception_invoking_processaction=\uad6c\uc131 \uc694\uc18c "{2}"\uc758 \uc791\uc5c5 \uc218\uc2e0\uae30 "{1}"\uc744(\ub97c) \ud638\ucd9c\ud558\ub294 \uc911\uc5d0 "{0}"\uc774(\uac00) \uc218\uc2e0\ub418\uc5c8\uc2b5\ub2c8\ub2e4. - -# PACKAGE jakarta.faces.lifecycle ------------------------------------------------ - - -# PACKAGE jakarta.faces.model ---------------------------------------------------- - - -# PACKAGE jakarta.faces.render --------------------------------------------------- - - -# PACKAGE jakarta.faces.validator ------------------------------------------------ - - -# PACKAGE jakarta.faces.webapp --------------------------------------------------- -warning.webapp.facesservlet.init_invalid_http_method=The runtime was configured to permit HTTP method {0} but that is not one of {1}. Note that HTTP method names are case sensitive. -severe.webapp.facesservlet.init_failed=Faces \ub7f0\ud0c0\uc784 \ucd08\uae30\ud654\uac00 \uc2e4\ud328\ud588\uac70\ub098 \ubc1c\uc0dd\ud558\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4. \uc790\uc138\ud55c \ub0b4\uc6a9\uc740 \uc11c\ubc84\uc758 \ub85c\uadf8\ub97c \uac80\ud1a0\ud558\uc2ed\uc2dc\uc624. - - diff --git a/impl/src/main/resources/jakarta/faces/LogStrings_pt_BR.properties b/impl/src/main/resources/jakarta/faces/LogStrings_pt_BR.properties deleted file mode 100644 index 0178afcac8..0000000000 --- a/impl/src/main/resources/jakarta/faces/LogStrings_pt_BR.properties +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# -# Logging key guideline: -# [level].[base package].[message_id] - -# Common ----------------------------------------------------------------------- - - -# PACKAGE jakarta.faces ---------------------------------------------------------- -severe.no_factory= O aplicativo n\u00e3o foi iniciado corretamente na inicializa\u00e7\u00e3o. N\u00e3o foi poss\u00edvel encontrar F\u00e1brica: {0}. Attempting to find backup. -severe.no_factory_backup_failed= Could not find backup for factory {0}. - - -# PACKAGE jakarta.faces.application ---------------------------------------------- - - -# PACKAGE jakarta.faces.component ------------------------------------------------ -fine.component.populating_descriptor_map=Populando\u00b7o Mapa de PropertyDescriptor da classe ''{0}'' para o Segmento denominado ''{1}''. -error.component.abortprocessing_thrown=AbortProcessingException lan\u00e7ado durante o processamento do evento de tipo ''{0}'' na fase ''{1}'' do componente com a ID ou ID de cliente ''{2}'' -severe.component.unable_to_process_expression=Exce\u00e7\u00e3o criada durante o processamento da express\u00e3o {0} para o atributo {1}. -severe.component.uiviewroot_error_invoking_phaselistener=Exce\u00e7\u00e3o criada ao invocar\u00b7UIViewRoot PhaseListener {0}. -warning.component.uiviewroot_non_serializable_attribute_viewmap=Definindo valor de atributo n\u00e3o serializ\u00e1vel em ViewMap (chave: {0}, classe do valor: {1}). -# PACKAGE jakarta.faces.context -------------------------------------------------- - - -# PACKAGE jakarta.faces.convert -------------------------------------------------- - - -# PACKAGE jakarta.faces.el ------------------------------------------------------- - - -# PACKAGE jakarta.faces.event ---------------------------------------------------- -severe.event.exception_invoking_processaction=''{0}'' recebido ao invocar escuta de a\u00e7\u00e3o ''{1}'' para o componente ''{2}'' - -# PACKAGE jakarta.faces.lifecycle ------------------------------------------------ - - -# PACKAGE jakarta.faces.model ---------------------------------------------------- - - -# PACKAGE jakarta.faces.render --------------------------------------------------- - - -# PACKAGE jakarta.faces.validator ------------------------------------------------ - - -# PACKAGE jakarta.faces.webapp --------------------------------------------------- -warning.webapp.facesservlet.init_invalid_http_method=The runtime was configured to permit HTTP method {0} but that is not one of {1}. Note that HTTP method names are case sensitive. -severe.webapp.facesservlet.init_failed=A inicializa\u00e7\u00e3o do tempo de execu\u00e7\u00e3o de Faces falhou ou n\u00e3o ocorreu. Consulte o log do servidor para obter detalhes. - - diff --git a/impl/src/main/resources/jakarta/faces/LogStrings_zh_CN.properties b/impl/src/main/resources/jakarta/faces/LogStrings_zh_CN.properties deleted file mode 100644 index a168deb76b..0000000000 --- a/impl/src/main/resources/jakarta/faces/LogStrings_zh_CN.properties +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# -# Logging key guideline: -# [level].[base package].[message_id] - -# Common ----------------------------------------------------------------------- - - -# PACKAGE jakarta.faces ---------------------------------------------------------- -severe.no_factory= \u542f\u52a8\u65f6\u6ca1\u6709\u6b63\u786e\u521d\u59cb\u5316\u5e94\u7528\u7a0b\u5e8f\uff0c\u65e0\u6cd5\u627e\u5230\u5de5\u5382\uff1a{0}. Attempting to find backup. -severe.no_factory_backup_failed= Could not find backup for factory {0}. - - -# PACKAGE jakarta.faces.application ---------------------------------------------- - - -# PACKAGE jakarta.faces.component ------------------------------------------------ -fine.component.populating_descriptor_map=\u4e3a\u540d\u4e3a ''{1}'' \u7684\u7ebf\u7a0b\u7684\u7c7b ''{0}'' \u586b\u5145 PropertyDescriptor \u6620\u5c04\u3002 -error.component.abortprocessing_thrown=\u5bf9\u4e8e ID \u6216\u5ba2\u6237\u673a ID \u4e3a ''{2}'' \u7684\u7ec4\u4ef6\uff0c\u5f53\u5904\u7406\u7c7b\u578b ''{0}'' \u7684\u4e8b\u4ef6\u65f6\uff0c\u5728\u9636\u6bb5 ''{1}'' \u629b\u51fa AbortProcessingException -severe.component.unable_to_process_expression=\u5904\u7406\u5c5e\u6027 {1} \u7684\u8868\u8fbe\u5f0f {0} \u65f6\u51fa\u73b0\u5f02\u5e38\u3002 -severe.component.uiviewroot_error_invoking_phaselistener=\u8c03\u7528 UIViewRoot PhaseListener {0} \u65f6\u51fa\u73b0\u5f02\u5e38\u3002 -warning.component.uiviewroot_non_serializable_attribute_viewmap=\u5c06\u4e0d\u53ef\u5e8f\u5217\u5316\u5c5e\u6027\u503c\u8bbe\u7f6e\u4e3a ViewMap\uff1a\uff08\u5bc6\u94a5\uff1a{0}\uff0c\u503c\u7c7b\uff1a{1}\uff09 -# PACKAGE jakarta.faces.context -------------------------------------------------- - - -# PACKAGE jakarta.faces.convert -------------------------------------------------- - - -# PACKAGE jakarta.faces.el ------------------------------------------------------- - - -# PACKAGE jakarta.faces.event ---------------------------------------------------- -severe.event.exception_invoking_processaction=\u8c03\u7528\u7ec4\u4ef6 ''{2}'' \u7684\u64cd\u4f5c\u4fa6\u542c\u5668 ''{1}'' \u65f6\u6536\u5230 ''{0}'' - -# PACKAGE jakarta.faces.lifecycle ------------------------------------------------ - - -# PACKAGE jakarta.faces.model ---------------------------------------------------- - - -# PACKAGE jakarta.faces.render --------------------------------------------------- - - -# PACKAGE jakarta.faces.validator ------------------------------------------------ - - -# PACKAGE jakarta.faces.webapp --------------------------------------------------- -warning.webapp.facesservlet.init_invalid_http_method=The runtime was configured to permit HTTP method {0} but that is not one of {1}. Note that HTTP method names are case sensitive. -severe.webapp.facesservlet.init_failed=Faces \u8fd0\u884c\u65f6\u521d\u59cb\u5316\u5931\u8d25\u6216\u672a\u8fdb\u884c\u521d\u59cb\u5316\u3002\u6709\u5173\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u68c0\u67e5\u670d\u52a1\u5668\u7684\u65e5\u5fd7\u3002 - - diff --git a/impl/src/main/resources/jakarta/faces/LogStrings_zh_HK.properties b/impl/src/main/resources/jakarta/faces/LogStrings_zh_HK.properties deleted file mode 100644 index 7000cc0c1e..0000000000 --- a/impl/src/main/resources/jakarta/faces/LogStrings_zh_HK.properties +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# -# Logging key guideline: -# [level].[base package].[message_id] - -# Common ----------------------------------------------------------------------- - - -# PACKAGE jakarta.faces ---------------------------------------------------------- -severe.no_factory= \u672a\u5728\u555f\u52d5\u6642\u6b63\u78ba\u5730\u521d\u59cb\u5316\u61c9\u7528\u7a0b\u5f0f\uff0c\u627e\u4e0d\u5230\u5de5\u5ee0: {0}. Attempting to find backup. -severe.no_factory_backup_failed= Could not find backup for factory {0}. - - -# PACKAGE jakarta.faces.application ---------------------------------------------- - - -# PACKAGE jakarta.faces.component ------------------------------------------------ -fine.component.populating_descriptor_map=\u6b63\u5728\u70ba\u540d\u70ba\u300c{1}\u300d\u7684\u57f7\u884c\u7dd2\u5beb\u5165\u985e\u5225\u300c{0}\u300d\u7684 PropertyDescriptor \u5c0d\u6620\u3002 -error.component.abortprocessing_thrown=\u5728 ID \u6216\u7528\u6236\u7aef ID \u70ba\u300c{2}\u300d\u7684\u5143\u4ef6\u7684\u968e\u6bb5\u300c{1}\u300d\uff0c\u8655\u7406\u985e\u578b\u70ba\u300c{0}\u300d\u7684\u4e8b\u4ef6\u6642\u4e1f\u51fa AbortProcessingException -severe.component.unable_to_process_expression=\u8655\u7406\u5c6c\u6027 {1} \u7684\u8868\u793a\u5f0f {0} \u6642\u767c\u751f\u7570\u5e38\u3002 -severe.component.uiviewroot_error_invoking_phaselistener=\u547c\u53eb UIViewRoot PhaseListener {0} \u6642\u767c\u751f\u7570\u5e38\u3002 -warning.component.uiviewroot_non_serializable_attribute_viewmap=\u5c07\u4e0d\u53ef\u4e32\u5217\u5316\u7684\u5c6c\u6027\u503c\u8a2d\u70ba ViewMap\uff1a(\u6a5f\u78bc: {0}\uff0c\u503c\u985e\u5225: {1}) -# PACKAGE jakarta.faces.context -------------------------------------------------- - - -# PACKAGE jakarta.faces.convert -------------------------------------------------- - - -# PACKAGE jakarta.faces.el ------------------------------------------------------- - - -# PACKAGE jakarta.faces.event ---------------------------------------------------- -severe.event.exception_invoking_processaction=\u547c\u53eb\u5143\u4ef6\u300c{2}\u300d\u7684\u52d5\u4f5c\u5075\u807d\u7a0b\u5f0f\u300c{1}\u300d\u6642\u6536\u5230\u300c{0}\u300d - -# PACKAGE jakarta.faces.lifecycle ------------------------------------------------ - - -# PACKAGE jakarta.faces.model ---------------------------------------------------- - - -# PACKAGE jakarta.faces.render --------------------------------------------------- - - -# PACKAGE jakarta.faces.validator ------------------------------------------------ - - -# PACKAGE jakarta.faces.webapp --------------------------------------------------- -warning.webapp.facesservlet.init_invalid_http_method=The runtime was configured to permit HTTP method {0} but that is not one of {1}. Note that HTTP method names are case sensitive. -severe.webapp.facesservlet.init_failed=\u521d\u59cb\u5316 Faces \u57f7\u884c\u968e\u6bb5\u5931\u6557\u6216\u672a\u767c\u751f\u3002\u8a73\u7d30\u8cc7\u8a0a\u8acb\u6aa2\u8996\u4f3a\u670d\u5668\u7684\u8a18\u9304\u6a94\u3002 - - diff --git a/impl/src/main/resources/jakarta/faces/LogStrings_zh_TW.properties b/impl/src/main/resources/jakarta/faces/LogStrings_zh_TW.properties deleted file mode 100644 index 7000cc0c1e..0000000000 --- a/impl/src/main/resources/jakarta/faces/LogStrings_zh_TW.properties +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# -# Logging key guideline: -# [level].[base package].[message_id] - -# Common ----------------------------------------------------------------------- - - -# PACKAGE jakarta.faces ---------------------------------------------------------- -severe.no_factory= \u672a\u5728\u555f\u52d5\u6642\u6b63\u78ba\u5730\u521d\u59cb\u5316\u61c9\u7528\u7a0b\u5f0f\uff0c\u627e\u4e0d\u5230\u5de5\u5ee0: {0}. Attempting to find backup. -severe.no_factory_backup_failed= Could not find backup for factory {0}. - - -# PACKAGE jakarta.faces.application ---------------------------------------------- - - -# PACKAGE jakarta.faces.component ------------------------------------------------ -fine.component.populating_descriptor_map=\u6b63\u5728\u70ba\u540d\u70ba\u300c{1}\u300d\u7684\u57f7\u884c\u7dd2\u5beb\u5165\u985e\u5225\u300c{0}\u300d\u7684 PropertyDescriptor \u5c0d\u6620\u3002 -error.component.abortprocessing_thrown=\u5728 ID \u6216\u7528\u6236\u7aef ID \u70ba\u300c{2}\u300d\u7684\u5143\u4ef6\u7684\u968e\u6bb5\u300c{1}\u300d\uff0c\u8655\u7406\u985e\u578b\u70ba\u300c{0}\u300d\u7684\u4e8b\u4ef6\u6642\u4e1f\u51fa AbortProcessingException -severe.component.unable_to_process_expression=\u8655\u7406\u5c6c\u6027 {1} \u7684\u8868\u793a\u5f0f {0} \u6642\u767c\u751f\u7570\u5e38\u3002 -severe.component.uiviewroot_error_invoking_phaselistener=\u547c\u53eb UIViewRoot PhaseListener {0} \u6642\u767c\u751f\u7570\u5e38\u3002 -warning.component.uiviewroot_non_serializable_attribute_viewmap=\u5c07\u4e0d\u53ef\u4e32\u5217\u5316\u7684\u5c6c\u6027\u503c\u8a2d\u70ba ViewMap\uff1a(\u6a5f\u78bc: {0}\uff0c\u503c\u985e\u5225: {1}) -# PACKAGE jakarta.faces.context -------------------------------------------------- - - -# PACKAGE jakarta.faces.convert -------------------------------------------------- - - -# PACKAGE jakarta.faces.el ------------------------------------------------------- - - -# PACKAGE jakarta.faces.event ---------------------------------------------------- -severe.event.exception_invoking_processaction=\u547c\u53eb\u5143\u4ef6\u300c{2}\u300d\u7684\u52d5\u4f5c\u5075\u807d\u7a0b\u5f0f\u300c{1}\u300d\u6642\u6536\u5230\u300c{0}\u300d - -# PACKAGE jakarta.faces.lifecycle ------------------------------------------------ - - -# PACKAGE jakarta.faces.model ---------------------------------------------------- - - -# PACKAGE jakarta.faces.render --------------------------------------------------- - - -# PACKAGE jakarta.faces.validator ------------------------------------------------ - - -# PACKAGE jakarta.faces.webapp --------------------------------------------------- -warning.webapp.facesservlet.init_invalid_http_method=The runtime was configured to permit HTTP method {0} but that is not one of {1}. Note that HTTP method names are case sensitive. -severe.webapp.facesservlet.init_failed=\u521d\u59cb\u5316 Faces \u57f7\u884c\u968e\u6bb5\u5931\u6557\u6216\u672a\u767c\u751f\u3002\u8a73\u7d30\u8cc7\u8a0a\u8acb\u6aa2\u8996\u4f3a\u670d\u5668\u7684\u8a18\u9304\u6a94\u3002 - - diff --git a/impl/src/main/resources/jakarta/faces/Messages.properties b/impl/src/main/resources/jakarta/faces/Messages.properties deleted file mode 100644 index c9e08d372c..0000000000 --- a/impl/src/main/resources/jakarta/faces/Messages.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -# Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# ============================================================================== -# Component Errors -# ============================================================================== -jakarta.faces.component.UIInput.CONVERSION={0}: Conversion error occurred. -jakarta.faces.component.UIInput.REQUIRED={0}: Validation Error: Value is required. -jakarta.faces.component.UIInput.UPDATE={0}: An error occurred when processing your submitted information. -jakarta.faces.component.UISelectOne.INVALID={0}: Validation Error: Value is not valid -jakarta.faces.component.UISelectMany.INVALID={0}: Validation Error: Value is not valid - -# ============================================================================== -# Converter Errors -# ============================================================================== -jakarta.faces.converter.BigDecimalConverter.DECIMAL={2}: ''{0}'' must be a signed decimal number. -jakarta.faces.converter.BigDecimalConverter.DECIMAL_detail={2}: ''{0}'' must be a signed decimal number consisting of zero or more digits, that may be followed by a decimal point and fraction. Example: {1} -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER={2}: ''{0}'' must be a number consisting of one or more digits. -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER_detail={2}: ''{0}'' must be a number consisting of one or more digits. Example: {1} -jakarta.faces.converter.BooleanConverter.BOOLEAN={1}: ''{0}'' must be 'true' or 'false'. -jakarta.faces.converter.BooleanConverter.BOOLEAN_detail={1}: ''{0}'' must be 'true' or 'false'. Any value other than 'true' will evaluate to 'false'. -jakarta.faces.converter.ByteConverter.BYTE={2}: ''{0}'' must be a number between -128 and 127. -jakarta.faces.converter.ByteConverter.BYTE_detail={2}: ''{0}'' must be a number between -128 and 127. Example: {1} -jakarta.faces.converter.CharacterConverter.CHARACTER={1}: ''{0}'' must be a valid character. -jakarta.faces.converter.CharacterConverter.CHARACTER_detail={1}: ''{0}'' must be a valid ASCII character. -jakarta.faces.converter.DateTimeConverter.DATE={2}: ''{0}'' could not be understood as a date. -jakarta.faces.converter.DateTimeConverter.DATE_detail={2}: ''{0}'' could not be understood as a date. Example: {1} -jakarta.faces.converter.DateTimeConverter.TIME={2}: ''{0}'' could not be understood as a time. -jakarta.faces.converter.DateTimeConverter.TIME_detail={2}: ''{0}'' could not be understood as a time. Example: {1} -jakarta.faces.converter.DateTimeConverter.DATETIME={2}: ''{0}'' could not be understood as a date and time. -jakarta.faces.converter.DateTimeConverter.DATETIME_detail={2}: ''{0}'' could not be understood as a date and time. Example: {1} -jakarta.faces.converter.DateTimeConverter.PATTERN_TYPE={1}: A 'pattern' or 'type' attribute must be specified to convert the value ''{0}''. -jakarta.faces.converter.DoubleConverter.DOUBLE={2}: ''{0}'' must be a number consisting of one or more digits. -jakarta.faces.converter.DoubleConverter.DOUBLE_detail={2}: ''{0}'' must be a number between 4.9E-324 and 1.7976931348623157E308 Example: {1} -jakarta.faces.converter.EnumConverter.ENUM={2}: ''{0}'' must be convertible to an enum. -jakarta.faces.converter.EnumConverter.ENUM_detail={2}: ''{0}'' must be convertible to an enum from the enum that contains the constant ''{1}''. -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS={1}: ''{0}'' must be convertible to an enum from the enum, but no enum class provided. -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS_detail={1}: ''{0}'' must be convertible to an enum from the enum, but no enum class provided. -jakarta.faces.converter.FloatConverter.FLOAT={2}: ''{0}'' must be a number consisting of one or more digits. -jakarta.faces.converter.FloatConverter.FLOAT_detail={2}: ''{0}'' must be a number between 1.4E-45 and 3.4028235E38 Example: {1} -jakarta.faces.converter.IntegerConverter.INTEGER={2}: ''{0}'' must be a number consisting of one or more digits. -jakarta.faces.converter.IntegerConverter.INTEGER_detail={2}: ''{0}'' must be a number between -2147483648 and 2147483647 Example: {1} -jakarta.faces.converter.LongConverter.LONG={2}: ''{0}'' must be a number consisting of one or more digits. -jakarta.faces.converter.LongConverter.LONG_detail={2}: ''{0}'' must be a number between -9223372036854775808 to 9223372036854775807 Example: {1} -jakarta.faces.converter.NumberConverter.CURRENCY={2}: ''{0}'' could not be understood as a currency value. -jakarta.faces.converter.NumberConverter.CURRENCY_detail={2}: ''{0}'' could not be understood as a currency value. Example: {1} -jakarta.faces.converter.NumberConverter.PERCENT={2}: ''{0}'' could not be understood as a percentage. -jakarta.faces.converter.NumberConverter.PERCENT_detail={2}: ''{0}'' could not be understood as a percentage. Example: {1} -jakarta.faces.converter.NumberConverter.NUMBER={2}: ''{0}'' is not a number. -jakarta.faces.converter.NumberConverter.NUMBER_detail={2}: ''{0}'' is not a number. Example: {1} -jakarta.faces.converter.NumberConverter.PATTERN={2}: ''{0}'' is not a number pattern. -jakarta.faces.converter.NumberConverter.PATTERN_detail={2}: ''{0}'' is not a number pattern. Example: {1} -jakarta.faces.converter.ShortConverter.SHORT={2}: ''{0}'' must be a number consisting of one or more digits. -jakarta.faces.converter.ShortConverter.SHORT_detail={2}: ''{0}'' must be a number between -32768 and 32767 Example: {1} -jakarta.faces.converter.STRING={1}: Could not convert ''{0}'' to a string. - - -# ============================================================================== -# Validator Errors -# ============================================================================== -jakarta.faces.validator.DoubleRangeValidator.MAXIMUM={1}: Validation Error: Value is greater than allowable maximum of "{0}" -jakarta.faces.validator.DoubleRangeValidator.MINIMUM={1}: Validation Error: Value is less than allowable minimum of ''{0}'' -jakarta.faces.validator.DoubleRangeValidator.NOT_IN_RANGE={2}: Validation Error: Specified attribute is not between the expected values of {0} and {1}. -jakarta.faces.validator.DoubleRangeValidator.TYPE={0}: Validation Error: Value is not of the correct type -jakarta.faces.validator.LengthValidator.MAXIMUM={1}: Validation Error: Length is greater than allowable maximum of ''{0}'' -jakarta.faces.validator.LengthValidator.MINIMUM={1}: Validation Error: Length is less than allowable minimum of ''{0}'' -jakarta.faces.validator.LongRangeValidator.MAXIMUM={1}: Validation Error: Value is greater than allowable maximum of ''{0}'' -jakarta.faces.validator.LongRangeValidator.MINIMUM={1}: Validation Error: Value is less than allowable minimum of ''{0}'' -jakarta.faces.validator.LongRangeValidator.NOT_IN_RANGE={2}: Validation Error: Specified attribute is not between the expected values of {0} and {1}. -jakarta.faces.validator.LongRangeValidator.TYPE={0}: Validation Error: Value is not of the correct type. -jakarta.faces.validator.NOT_IN_RANGE=Validation Error: Specified attribute is not between the expected values of {0} and {1}. -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET=Regex pattern must be set. -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET_detail=Regex pattern must be set to non-empty value. -jakarta.faces.validator.RegexValidator.NOT_MATCHED=Regex Pattern not matched -jakarta.faces.validator.RegexValidator.NOT_MATCHED_detail=Regex pattern of ''{0}'' not matched -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION=Error in regular expression. -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION_detail=Error in regular expression, ''{0}'' -jakarta.faces.validator.BeanValidator.MESSAGE={0} - - diff --git a/impl/src/main/resources/jakarta/faces/Messages_de.properties b/impl/src/main/resources/jakarta/faces/Messages_de.properties deleted file mode 100644 index c981d7ffb0..0000000000 --- a/impl/src/main/resources/jakarta/faces/Messages_de.properties +++ /dev/null @@ -1,94 +0,0 @@ -# -# Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - - -# ============================================================================== -# Component Errors -# ============================================================================== -jakarta.faces.component.UIInput.CONVERSION={0}: Umwandlungsfehler aufgetreten. -jakarta.faces.component.UIInput.REQUIRED={0}: \u00dcberpr\u00fcfungsfehler: Wert ist erforderlich. -jakarta.faces.component.UIInput.UPDATE={0}: Bei der Verarbeitung der angegebenen Informationen ist ein Fehler aufgetreten. -jakarta.faces.component.UISelectOne.INVALID={0}: \u00dcberpr\u00fcfungsfehler: Wert ist ung\u00fcltig. -jakarta.faces.component.UISelectMany.INVALID={0}: \u00dcberpr\u00fcfungsfehler: Wert ist ung\u00fcltig. - -# ============================================================================== -# Converter Errors -# ============================================================================== -jakarta.faces.converter.BigDecimalConverter.DECIMAL={2}: Bei ''{0}'' muss es sich um eine Dezimalzahl mit Vorzeichen handeln. -jakarta.faces.converter.BigDecimalConverter.DECIMAL_detail={2}: Bei ''{0}'' muss es sich um eine Dezimalzahl mit Vorzeichen handeln, die aus null oder mehr Ziffern besteht, auf die ein Dezimalpunkt und ein Bruch folgen kann. Beispiel: {1} -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER={2}: Bei ''{0}'' muss es sich um eine Zahl mit einer oder mehreren Ziffern handeln. -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER_detail={2}: Bei ''{0}'' muss es sich um eine Zahl mit einer oder mehreren Ziffern handeln. Beispiel: {1} -jakarta.faces.converter.BooleanConverter.BOOLEAN={1}: ''{0}'' muss ''true'' oder ''false'' sein. -jakarta.faces.converter.BooleanConverter.BOOLEAN_detail={1}: ''{0}'' muss ''true'' oder ''false'' sein. Andere Werte als ''true'' werden als ''false'' ausgewertet. -jakarta.faces.converter.ByteConverter.BYTE={2}: Bei ''{0}'' muss es sich um eine Zahl zwischen -128 und 127 handeln. -jakarta.faces.converter.ByteConverter.BYTE_detail={2}: Bei ''{0}'' muss es sich um eine Zahl zwischen -128 und 127 handeln. Beispiel: {1} -jakarta.faces.converter.CharacterConverter.CHARACTER={1}: ''{0}'' muss ein g\u00fcltiges Zeichen sein. -jakarta.faces.converter.CharacterConverter.CHARACTER_detail={1}: ''{0}'' muss ein g\u00fcltiges ASCII-Zeichen sein. -jakarta.faces.converter.DateTimeConverter.DATE={2}: ''{0}'' konnte nicht als Datum interpretiert werden. -jakarta.faces.converter.DateTimeConverter.DATE_detail={2}: ''{0}'' konnte nicht als Datum interpretiert werden. Beispiel: {1} -jakarta.faces.converter.DateTimeConverter.TIME={2}: ''{0}'' konnte nicht als Uhrzeit interpretiert werden. -jakarta.faces.converter.DateTimeConverter.TIME_detail={2}: ''{0}'' konnte nicht als Uhrzeit interpretiert werden. Beispiel: {1} -jakarta.faces.converter.DateTimeConverter.DATETIME={2}: ''{0}'' konnte nicht als Datum und Uhrzeit interpretiert werden. -jakarta.faces.converter.DateTimeConverter.DATETIME_detail={2}: ''{0}'' konnte nicht als Datum und Uhrzeit interpretiert werden. Beispiel: {1} -jakarta.faces.converter.DateTimeConverter.PATTERN_TYPE={1}: Zur Umwandlung des Werts ''{0}'' muss ein ''pattern''- bzw. ''type''-Attribut angegeben werden. -jakarta.faces.converter.DoubleConverter.DOUBLE={2}: Bei ''{0}'' muss es sich um eine Zahl mit einer oder mehreren Ziffern handeln. -jakarta.faces.converter.DoubleConverter.DOUBLE_detail={2}: Bei ''{0}'' muss es sich um eine Zahl zwischen 4.9E-324 und 1.7976931348623157E308 handeln. Beispiel: {1} -jakarta.faces.converter.EnumConverter.ENUM={2}: ''{0}'' muss in eine Aufz\u00e4hlung umgewandelt werden k\u00f6nnen. -jakarta.faces.converter.EnumConverter.ENUM_detail={2}: ''{0}'' muss anhand der Aufz\u00e4hlung, die die Konstante ''{1}'' enth\u00e4lt, in eine Aufz\u00e4hlung umgewandelt werden k\u00f6nnen. -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS={1}: ''{0}'' muss anhand der Aufz\u00e4hlung in eine Aufz\u00e4hlung umgewandelt werden k\u00f6nnen, es wurde jedoch keine Aufz\u00e4hlungsklasse angegeben. -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS_detail={1}: ''{0}'' muss anhand der Aufz\u00e4hlung in eine Aufz\u00e4hlung umgewandelt werden k\u00f6nnen, es wurde jedoch keine Aufz\u00e4hlungsklasse angegeben. -jakarta.faces.converter.FloatConverter.FLOAT={2}: Bei ''{0}'' muss es sich um eine Zahl mit einer oder mehreren Ziffern handeln. -jakarta.faces.converter.FloatConverter.FLOAT_detail={2}: Bei ''{0}'' muss es sich um eine Zahl zwischen 1.4E-45 und 3.4028235E38 handeln. Beispiel: {1} -jakarta.faces.converter.IntegerConverter.INTEGER={2}: Bei ''{0}'' muss es sich um eine Zahl mit einer oder mehreren Ziffern handeln. -jakarta.faces.converter.IntegerConverter.INTEGER_detail={2}: Bei ''{0}'' muss es sich um eine Zahl zwischen -2147483648 und 2147483647 handeln. Beispiel: {1} -jakarta.faces.converter.LongConverter.LONG={2}: Bei ''{0}'' muss es sich um eine Zahl mit einer oder mehreren Ziffern handeln. -jakarta.faces.converter.LongConverter.LONG_detail={2}: Bei ''{0}'' muss es sich um eine Zahl zwischen -9223372036854775808 und 9223372036854775807 handeln. Beispiel: {1} -jakarta.faces.converter.NumberConverter.CURRENCY={2}: ''{0}'' konnte nicht als W\u00e4hrungswert interpretiert werden. -jakarta.faces.converter.NumberConverter.CURRENCY_detail={2}: ''{0}'' konnte nicht als W\u00e4hrungswert interpretiert werden. Beispiel: {1} -jakarta.faces.converter.NumberConverter.PERCENT={2}: ''{0}'' konnte nicht als Prozentsatz interpretiert werden. -jakarta.faces.converter.NumberConverter.PERCENT_detail={2}: ''{0}'' konnte nicht als Prozentsatz interpretiert werden. Beispiel: {1} -jakarta.faces.converter.NumberConverter.NUMBER={2}: ''{0}'' ist keine Zahl. -jakarta.faces.converter.NumberConverter.NUMBER_detail={2}: ''{0}'' ist keine Zahl. Beispiel: {1} -jakarta.faces.converter.NumberConverter.PATTERN={2}: ''{0}'' ist kein Zahlenmuster. -jakarta.faces.converter.NumberConverter.PATTERN_detail={2}: ''{0}'' ist kein Zahlenmuster. Beispiel: {1} -jakarta.faces.converter.ShortConverter.SHORT={2}: Bei ''{0}'' muss es sich um eine Zahl mit einer oder mehreren Ziffern handeln. -jakarta.faces.converter.ShortConverter.SHORT_detail={2}: Bei ''{0}'' muss es sich um eine Zahl zwischen -32768 und 32767 handeln. Beispiel: {1} -jakarta.faces.converter.STRING={1}: Umwandlung von ''{0}'' in eine Zeichenkette nicht m\u00f6glich. - - -# ============================================================================== -# Validator Errors -# ============================================================================== -jakarta.faces.validator.DoubleRangeValidator.MAXIMUM={1}: \u00dcberpr\u00fcfungsfehler: Wert ist gr\u00f6\u00dfer als der zul\u00e4ssige Maximalwert "{0}" -jakarta.faces.validator.DoubleRangeValidator.MINIMUM={1}: \u00dcberpr\u00fcfungsfehler: Wert ist kleiner als der zul\u00e4ssige Minimalwert "{0}" -jakarta.faces.validator.DoubleRangeValidator.NOT_IN_RANGE={2}: \u00dcberpr\u00fcfungsfehler: Das angegebene Attribut liegt nicht zwischen den erwarteten Werten {0} und {1}. -jakarta.faces.validator.DoubleRangeValidator.TYPE={0}: \u00dcberpr\u00fcfungsfehler: Wert ist nicht vom richtigen Typ -jakarta.faces.validator.LengthValidator.MAXIMUM={1}: \u00dcberpr\u00fcfungsfehler: L\u00e4nge ist gr\u00f6\u00dfer als der zul\u00e4ssige Maximalwert "{0}" -jakarta.faces.validator.LengthValidator.MINIMUM={1}: \u00dcberpr\u00fcfungsfehler: L\u00e4nge ist kleiner als der zul\u00e4ssige Minimalwert "{0}" -jakarta.faces.validator.LongRangeValidator.MAXIMUM={1}: \u00dcberpr\u00fcfungsfehler: Wert ist gr\u00f6\u00dfer als der zul\u00e4ssige Maximalwert "{0}" -jakarta.faces.validator.LongRangeValidator.MINIMUM={1}: \u00dcberpr\u00fcfungsfehler: Wert ist kleiner als der zul\u00e4ssige Minimalwert "{0}" -jakarta.faces.validator.LongRangeValidator.NOT_IN_RANGE={2}: \u00dcberpr\u00fcfungsfehler: Das angegebene Attribut liegt nicht zwischen den erwarteten Werten {0} und {1}. -jakarta.faces.validator.LongRangeValidator.TYPE={0}: \u00dcberpr\u00fcfungsfehler: Wert ist nicht vom richtigen Typ -jakarta.faces.validator.NOT_IN_RANGE=\u00dcberpr\u00fcfungsfehler: Das angegebene Attribut liegt nicht zwischen den erwarteten Werten {0} und {1}. -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET=Regex-Muster muss festgelegt werden. -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET_detail=Regex-Muster muss einen nicht leeren Wert haben. -jakarta.faces.validator.RegexValidator.NOT_MATCHED=Regex-Muster nicht angepasst -jakarta.faces.validator.RegexValidator.NOT_MATCHED_detail=Regex-Muster von ''{0}'' nicht angepasst -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION=Fehler in regul\u00e4rem Ausdruck. -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION_detail=Fehler in regul\u00e4rem Ausdruck, ''{0}'' -jakarta.faces.validator.BeanValidator.MESSAGE={0} - - diff --git a/impl/src/main/resources/jakarta/faces/Messages_en.properties b/impl/src/main/resources/jakarta/faces/Messages_en.properties deleted file mode 100644 index 27ed8c15e6..0000000000 --- a/impl/src/main/resources/jakarta/faces/Messages_en.properties +++ /dev/null @@ -1,91 +0,0 @@ -# -# Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# ============================================================================== -# Component Errors -# ============================================================================== -jakarta.faces.component.UIInput.CONVERSION={0}: Conversion error occurred. -jakarta.faces.component.UIInput.REQUIRED={0}: Validation Error: Value is required. -jakarta.faces.component.UIInput.UPDATE={0}: An error occurred when processing your submitted information. -jakarta.faces.component.UISelectOne.INVALID={0}: Validation Error: Value is not valid -jakarta.faces.component.UISelectMany.INVALID={0}: Validation Error: Value is not valid - -# ============================================================================== -# Converter Errors -# ============================================================================== -jakarta.faces.converter.BigDecimalConverter.DECIMAL={2}: ''{0}'' must be a signed decimal number. -jakarta.faces.converter.BigDecimalConverter.DECIMAL_detail={2}: ''{0}'' must be a signed decimal number consisting of zero or more digits, that may be followed by a decimal point and fraction. Example: {1} -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER={2}: ''{0}'' must be a number consisting of one or more digits. -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER_detail={2}: ''{0}'' must be a number consisting of one or more digits. Example: {1} -jakarta.faces.converter.BooleanConverter.BOOLEAN={1}: ''{0}'' must be 'true' or 'false'. -jakarta.faces.converter.BooleanConverter.BOOLEAN_detail={1}: ''{0}'' must be 'true' or 'false'. Any value other than 'true' will evaluate to 'false'. -jakarta.faces.converter.ByteConverter.BYTE={2}: ''{0}'' must be a number between -128 and 127. -jakarta.faces.converter.ByteConverter.BYTE_detail={2}: ''{0}'' must be a number between -128 and 127. Example: {1} -jakarta.faces.converter.CharacterConverter.CHARACTER={1}: ''{0}'' must be a valid character. -jakarta.faces.converter.CharacterConverter.CHARACTER_detail={1}: ''{0}'' must be a valid ASCII character. -jakarta.faces.converter.DateTimeConverter.DATE={2}: ''{0}'' could not be understood as a date. -jakarta.faces.converter.DateTimeConverter.DATE_detail={2}: ''{0}'' could not be understood as a date. Example: {1} -jakarta.faces.converter.DateTimeConverter.TIME={2}: ''{0}'' could not be understood as a time. -jakarta.faces.converter.DateTimeConverter.TIME_detail={2}: ''{0}'' could not be understood as a time. Example: {1} -jakarta.faces.converter.DateTimeConverter.DATETIME={2}: ''{0}'' could not be understood as a date and time. -jakarta.faces.converter.DateTimeConverter.DATETIME_detail={2}: ''{0}'' could not be understood as a date and time. Example: {1} -jakarta.faces.converter.DateTimeConverter.PATTERN_TYPE={1}: A 'pattern' or 'type' attribute must be specified to convert the value ''{0}''. -jakarta.faces.converter.DoubleConverter.DOUBLE={2}: ''{0}'' must be a number consisting of one or more digits. -jakarta.faces.converter.DoubleConverter.DOUBLE_detail={2}: ''{0}'' must be a number between 4.9E-324 and 1.7976931348623157E308 Example: {1} -jakarta.faces.converter.EnumConverter.ENUM={2}: ''{0}'' must be convertible to an enum. -jakarta.faces.converter.EnumConverter.ENUM_detail={2}: ''{0}'' must be convertible to an enum from the enum that contains the constant ''{1}''. -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS={1}: ''{0}'' must be convertible to an enum from the enum, but no enum class provided. -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS_detail={1}: ''{0}'' must be convertible to an enum from the enum, but no enum class provided. -jakarta.faces.converter.FloatConverter.FLOAT={2}: ''{0}'' must be a number consisting of one or more digits. -jakarta.faces.converter.FloatConverter.FLOAT_detail={2}: ''{0}'' must be a number between 1.4E-45 and 3.4028235E38 Example: {1} -jakarta.faces.converter.IntegerConverter.INTEGER={2}: ''{0}'' must be a number consisting of one or more digits. -jakarta.faces.converter.IntegerConverter.INTEGER_detail={2}: ''{0}'' must be a number between -2147483648 and 2147483647 Example: {1} -jakarta.faces.converter.LongConverter.LONG={2}: ''{0}'' must be a number consisting of one or more digits. -jakarta.faces.converter.LongConverter.LONG_detail={2}: ''{0}'' must be a number between -9223372036854775808 to 9223372036854775807 Example: {1} -jakarta.faces.converter.NumberConverter.CURRENCY={2}: ''{0}'' could not be understood as a currency value. -jakarta.faces.converter.NumberConverter.CURRENCY_detail={2}: ''{0}'' could not be understood as a currency value. Example: {1} -jakarta.faces.converter.NumberConverter.PERCENT={2}: ''{0}'' could not be understood as a percentage. -jakarta.faces.converter.NumberConverter.PERCENT_detail={2}: ''{0}'' could not be understood as a percentage. Example: {1} -jakarta.faces.converter.NumberConverter.NUMBER={2}: ''{0}'' is not a number. -jakarta.faces.converter.NumberConverter.NUMBER_detail={2}: ''{0}'' is not a number. Example: {1} -jakarta.faces.converter.NumberConverter.PATTERN={2}: ''{0}'' is not a number pattern. -jakarta.faces.converter.NumberConverter.PATTERN_detail={2}: ''{0}'' is not a number pattern. Example: {1} -jakarta.faces.converter.ShortConverter.SHORT={2}: ''{0}'' must be a number consisting of one or more digits. -jakarta.faces.converter.ShortConverter.SHORT_detail={2}: ''{0}'' must be a number between -32768 and 32767 Example: {1} -jakarta.faces.converter.STRING={1}: Could not convert ''{0}'' to a string. - - -# ============================================================================== -# Validator Errors -# ============================================================================== -jakarta.faces.validator.DoubleRangeValidator.MAXIMUM={1}: Validation Error: Value is greater than allowable maximum of "{0}" -jakarta.faces.validator.DoubleRangeValidator.MINIMUM={1}: Validation Error: Value is less than allowable minimum of ''{0}'' -jakarta.faces.validator.DoubleRangeValidator.NOT_IN_RANGE={2}: Validation Error: Specified attribute is not between the expected values of {0} and {1}. -jakarta.faces.validator.DoubleRangeValidator.TYPE={0}: Validation Error: Value is not of the correct type -jakarta.faces.validator.LengthValidator.MAXIMUM={1}: Validation Error: Length is greater than allowable maximum of ''{0}'' -jakarta.faces.validator.LengthValidator.MINIMUM={1}: Validation Error: Length is less than allowable minimum of ''{0}'' -jakarta.faces.validator.LongRangeValidator.MAXIMUM={1}: Validation Error: Value is greater than allowable maximum of ''{0}'' -jakarta.faces.validator.LongRangeValidator.MINIMUM={1}: Validation Error: Value is less than allowable minimum of ''{0}'' -jakarta.faces.validator.LongRangeValidator.NOT_IN_RANGE={2}: Validation Error: Specified attribute is not between the expected values of {0} and {1}. -jakarta.faces.validator.LongRangeValidator.TYPE={0}: Validation Error: Value is not of the correct type. -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET=Regex pattern must be set. -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET_detail=Regex pattern must be set to non-empty value. -jakarta.faces.validator.RegexValidator.NOT_MATCHED=Regex Pattern not matched -jakarta.faces.validator.RegexValidator.NOT_MATCHED_detail=Regex pattern of ''{0}'' not matched -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION=Error in regular expression. -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION_detail=Error in regular expression, ''{0}'' -jakarta.faces.validator.BeanValidator.MESSAGE={0} - diff --git a/impl/src/main/resources/jakarta/faces/Messages_es.properties b/impl/src/main/resources/jakarta/faces/Messages_es.properties deleted file mode 100644 index 87e2c07477..0000000000 --- a/impl/src/main/resources/jakarta/faces/Messages_es.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -# Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# ============================================================================== -# Component Errors -# ============================================================================== -jakarta.faces.component.UIInput.CONVERSION={0}: Se ha producido un error de conversi\u00f3n. -jakarta.faces.component.UIInput.REQUIRED={0}: Error de validaci\u00f3n: se necesita un valor. -jakarta.faces.component.UIInput.UPDATE={0}: Se ha producido un error al procesar la informaci\u00f3n enviada. -jakarta.faces.component.UISelectOne.INVALID={0}: Error de validaci\u00f3n: el valor no es v\u00e1lido -jakarta.faces.component.UISelectMany.INVALID={0}: Error de validaci\u00f3n: el valor no es v\u00e1lido - -# ============================================================================== -# Converter Errors -# ============================================================================== -jakarta.faces.converter.BigDecimalConverter.DECIMAL={2}: ''{0}'' debe ser un n\u00famero decimal positivo o negativo. -jakarta.faces.converter.BigDecimalConverter.DECIMAL_detail={2}: ''{0}'' debe ser un n\u00famero decimal positivo o negativo formado por cero o m\u00e1s d\u00edgitos, que pueden incluir a continuaci\u00f3n una coma decimal y una fracci\u00f3n. Ejemplo: {1} -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER={2}: ''{0}'' debe ser un n\u00famero formado por uno o varios d\u00edgitos. -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER_detail={2}: ''{0}'' debe ser un n\u00famero formado por uno o varios d\u00edgitos. Ejemplo: {1} -jakarta.faces.converter.BooleanConverter.BOOLEAN={1}: ''{0}'' debe ser 'true' o 'false'. -jakarta.faces.converter.BooleanConverter.BOOLEAN_detail={1}: ''{0}'' debe ser 'true' o 'false'. Cualquier valor diferente a ''true'', se evaluar\u00e1 como ''false''. -jakarta.faces.converter.ByteConverter.BYTE={2}: ''{0}'' debe ser un n\u00famero entre -128 y 127. -jakarta.faces.converter.ByteConverter.BYTE_detail={2}: ''{0}'' debe ser un n\u00famero entre -128 y 127. Ejemplo: {1} -jakarta.faces.converter.CharacterConverter.CHARACTER={1}: ''{0}'' debe ser un car\u00e1cter v\u00e1lido. -jakarta.faces.converter.CharacterConverter.CHARACTER_detail={1}: ''{0}'' debe ser un car\u00e1cter ASCII v\u00e1lido. -jakarta.faces.converter.DateTimeConverter.DATE={2}: ''{0}'' no se ha podido reconocer como fecha. -jakarta.faces.converter.DateTimeConverter.DATE_detail={2}: ''{0}'' no se ha podido reconocer como fecha. Ejemplo: {1} -jakarta.faces.converter.DateTimeConverter.TIME={2}: ''{0}'' no se ha podido reconocer como hora. -jakarta.faces.converter.DateTimeConverter.TIME_detail={2}: ''{0}'' no se ha podido reconocer como hora. Ejemplo: {1} -jakarta.faces.converter.DateTimeConverter.DATETIME={2}: ''{0}'' no se ha podido reconocer como fecha y hora. -jakarta.faces.converter.DateTimeConverter.DATETIME_detail={2}: ''{0}'' no se ha podido reconocer como fecha y hora. Ejemplo: {1} -jakarta.faces.converter.DateTimeConverter.PATTERN_TYPE={1}: Debe especificarse el atributo ''pattern'' o ''type'' para convertir el valor ''{0}''. -jakarta.faces.converter.DoubleConverter.DOUBLE={2}: ''{0}'' debe ser un n\u00famero formado por uno o varios d\u00edgitos. -jakarta.faces.converter.DoubleConverter.DOUBLE_detail={2}: ''{0}'' debe ser un n\u00famero entre 4.9E-324 y 1.7976931348623157E308 Ejemplo: {1} -jakarta.faces.converter.EnumConverter.ENUM={2}: ''{0}'' debe poder convertirse en una enumeraci\u00f3n. -jakarta.faces.converter.EnumConverter.ENUM_detail={2}: ''{0}'' debe poder convertirse en una enumeraci\u00f3n a partir de la enumeraci\u00f3n que contiene la constante ''{1}''. -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS={1}: ''{0}'' debe poder convertirse en una enumeraci\u00f3n a partir de la enumeraci\u00f3n, pero no se ha especificado ninguna clase de enumeraci\u00f3n. -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS_detail={1}: ''{0}'' debe poder convertirse en una enumeraci\u00f3n a partir de la enumeraci\u00f3n, pero no se ha especificado ninguna clase de enumeraci\u00f3n. -jakarta.faces.converter.FloatConverter.FLOAT={2}: ''{0}'' debe ser un n\u00famero formado por uno o varios d\u00edgitos. -jakarta.faces.converter.FloatConverter.FLOAT_detail={2}: ''{0}'' debe ser un n\u00famero entre 1.4E-45 y 3.4028235E38 Ejemplo: {1} -jakarta.faces.converter.IntegerConverter.INTEGER={2}: ''{0}'' debe ser un n\u00famero formado por uno o varios d\u00edgitos. -jakarta.faces.converter.IntegerConverter.INTEGER_detail={2}: ''{0}'' debe ser un n\u00famero entre -2147483648 y 2147483647. Ejemplo: {1} -jakarta.faces.converter.LongConverter.LONG={2}: ''{0}'' debe ser un n\u00famero formado por uno o varios d\u00edgitos. -jakarta.faces.converter.LongConverter.LONG_detail={2}: ''{0}'' debe ser un n\u00famero entre -9223372036854775808 y 9223372036854775807. Ejemplo: {1} -jakarta.faces.converter.NumberConverter.CURRENCY={2}: ''{0}'' no se ha podido reconocer como un valor de divisa. -jakarta.faces.converter.NumberConverter.CURRENCY_detail={2}: ''{0}'' no se ha podido reconocer como un valor de divisa. Ejemplo: {1} -jakarta.faces.converter.NumberConverter.PERCENT={2}: ''{0}'' no se ha podido reconocer como porcentaje. -jakarta.faces.converter.NumberConverter.PERCENT_detail={2}: ''{0}'' no se ha podido reconocer como porcentaje. Ejemplo: {1} -jakarta.faces.converter.NumberConverter.NUMBER={2}: ''{0}'' no es un n\u00famero. -jakarta.faces.converter.NumberConverter.NUMBER_detail={2}: ''{0}'' no es un n\u00famero. Ejemplo: {1} -jakarta.faces.converter.NumberConverter.PATTERN={2}: ''{0}'' no es un modelo de n\u00famero. -jakarta.faces.converter.NumberConverter.PATTERN_detail={2}: ''{0}'' no es un modelo de n\u00famero. Ejemplo: {1} -jakarta.faces.converter.ShortConverter.SHORT={2}: ''{0}'' debe ser un n\u00famero formado por uno o varios d\u00edgitos. -jakarta.faces.converter.ShortConverter.SHORT_detail={2}: ''{0}'' debe ser un n\u00famero entre -32768 y 32767. Ejemplo: {1} -jakarta.faces.converter.STRING={1}: No se ha podido convertir ''{0}'' en una cadena. - - -# ============================================================================== -# Validator Errors -# ============================================================================== -jakarta.faces.validator.DoubleRangeValidator.MAXIMUM={1}: Error de validaci\u00f3n: el valor es mayor que el m\u00e1ximo permitido de "{0}" -jakarta.faces.validator.DoubleRangeValidator.MINIMUM={1}: Error de validaci\u00f3n: el valor es inferior que el m\u00ednimo permitido de ''{0}'' -jakarta.faces.validator.DoubleRangeValidator.NOT_IN_RANGE={2}: Error de validaci\u00f3n: el atributo especificado no est\u00e1 entre los valores esperados: {0} y {1}. -jakarta.faces.validator.DoubleRangeValidator.TYPE={0}: Error de validaci\u00f3n: el valor no tiene el tipo correcto -jakarta.faces.validator.LengthValidator.MAXIMUM={1}: Error de validaci\u00f3n: el largo es mayor que el m\u00e1ximo permitido de ''{0}'' -jakarta.faces.validator.LengthValidator.MINIMUM={1}: Error de validaci\u00f3n: el largo es inferior que el m\u00ednimo permitido de ''{0}'' -jakarta.faces.validator.LongRangeValidator.MAXIMUM={1}: Error de validaci\u00f3n: el valor es mayor que el m\u00e1ximo permitido de ''{0}'' -jakarta.faces.validator.LongRangeValidator.MINIMUM={1}: Error de validaci\u00f3n: el valor es inferior que el m\u00ednimo permitido de ''{0}'' -jakarta.faces.validator.LongRangeValidator.NOT_IN_RANGE={2}: Error de validaci\u00f3n: el atributo especificado no est\u00e1 entre los valores esperados: {0} y {1}. -jakarta.faces.validator.LongRangeValidator.TYPE={0}: Error de validaci\u00f3n: el valor no tiene el tipo correcto. -jakarta.faces.validator.NOT_IN_RANGE=Error de validaci\u00f3n: el atributo especificado no est\u00e1 entre los valores esperados: {0} y {1}. -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET=Debe definirse el modelo Regex. -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET_detail=El modelo Regex debe estar definido como un valor no vac\u00edo. -jakarta.faces.validator.RegexValidator.NOT_MATCHED=El modelo Regex no coincide -jakarta.faces.validator.RegexValidator.NOT_MATCHED_detail=El modelo Regex ''{0}'' no coincide -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION=Error en expresi\u00f3n regular -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION_detail=Error en expresi\u00f3n regular, ''{0}'' -jakarta.faces.validator.BeanValidator.MESSAGE={0} - - diff --git a/impl/src/main/resources/jakarta/faces/Messages_fr.properties b/impl/src/main/resources/jakarta/faces/Messages_fr.properties deleted file mode 100644 index 04f01f1e7c..0000000000 --- a/impl/src/main/resources/jakarta/faces/Messages_fr.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -# Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# ============================================================================== -# Component Errors -# ============================================================================== -jakarta.faces.component.UIInput.CONVERSION={0}\u00a0: une erreur de conversion est survenue. -jakarta.faces.component.UIInput.REQUIRED={0}\u00a0: erreur de validation. Vous devez indiquer une valeur. -jakarta.faces.component.UIInput.UPDATE={0}\u00a0: une erreur est survenue lors du traitement des informations que vous avez soumises. -jakarta.faces.component.UISelectOne.INVALID={0}\u00a0: erreur de validation. La valeur est incorrecte. -jakarta.faces.component.UISelectMany.INVALID={0}\u00a0: erreur de validation. La valeur est incorrecte. - -# ============================================================================== -# Converter Errors -# ============================================================================== -jakarta.faces.converter.BigDecimalConverter.DECIMAL={2}\u00a0: \u00ab{0}\u00bb doit \u00eatre un nombre d\u00e9cimal sign\u00e9. -jakarta.faces.converter.BigDecimalConverter.DECIMAL_detail={2}\u00a0: \u00ab{0}\u00bb doit \u00eatre un nombre d\u00e9cimal sign\u00e9 compos\u00e9 de z\u00e9ro ou de plusieurs chiffres, pouvant \u00eatre suivis d\u2019une virgule et d\u2019une fraction. Exemple\u00a0: {1} -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER={2}\u00a0: \u00ab{0}\u00bb doit \u00eatre un nombre compos\u00e9 d\u2019un ou de plusieurs chiffres. -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER_detail={2}\u00a0: \u00ab{0}\u00bb doit \u00eatre un nombre compos\u00e9 d\u2019un ou de plusieurs chiffres. Exemple\u00a0: {1} -jakarta.faces.converter.BooleanConverter.BOOLEAN={1}\u00a0: \u00ab{0}\u00bb doit pr\u00e9senter la valeur \u2019true\u2019 ou \u2019false\u2019. -jakarta.faces.converter.BooleanConverter.BOOLEAN_detail={1}\u00a0: \u00ab{0}\u00bb doit pr\u00e9senter la valeur \u2019true\u2019 ou \u2019false\u2019. Toute valeur diff\u00e9rente de \u2019true\u2019 sera \u00e9valu\u00e9e comme \u00e9tant \u2019false\u2019. -jakarta.faces.converter.ByteConverter.BYTE={2}\u00a0: \u00ab{0}\u00bb doit \u00eatre un nombre compris entre -128 et 127. -jakarta.faces.converter.ByteConverter.BYTE_detail={2}\u00a0: \u00ab{0}\u00bb doit \u00eatre un nombre compris entre -128 et 127. Exemple\u00a0: {1} -jakarta.faces.converter.CharacterConverter.CHARACTER={1}\u00a0: \u00ab{0}\u00bb doit \u00eatre un caract\u00e8re valide. -jakarta.faces.converter.CharacterConverter.CHARACTER_detail={1}\u00a0: \u00ab{0}\u00bb doit \u00eatre un caract\u00e8re ASCII valide. -jakarta.faces.converter.DateTimeConverter.DATE={2}\u00a0: \u00ab{0}\u00bb n\u2019a pas pu \u00eatre interpr\u00e9t\u00e9 en tant que date. -jakarta.faces.converter.DateTimeConverter.DATE_detail={2}\u00a0: \u00ab{0}\u00bb n\u2019a pas pu \u00eatre interpr\u00e9t\u00e9 en tant que date. Exemple\u00a0: {1} -jakarta.faces.converter.DateTimeConverter.TIME={2}\u00a0: \u00ab{0}\u00bb n\u2019a pas pu \u00eatre interpr\u00e9t\u00e9 en tant qu\u2019heure. -jakarta.faces.converter.DateTimeConverter.TIME_detail={2}\u00a0: \u00ab{0}\u00bb n\u2019a pas pu \u00eatre interpr\u00e9t\u00e9 en tant qu\u2019heure. Exemple\u00a0: {1} -jakarta.faces.converter.DateTimeConverter.DATETIME={2}\u00a0: \u00ab{0}\u00bb n\u2019a pas pu \u00eatre interpr\u00e9t\u00e9 en tant que date et heure. -jakarta.faces.converter.DateTimeConverter.DATETIME_detail={2}\u00a0: \u00ab{0}\u00bb n\u2019a pas pu \u00eatre interpr\u00e9t\u00e9 en tant que date et heure. Exemple\u00a0: {1} -jakarta.faces.converter.DateTimeConverter.PATTERN_TYPE={1}\u00a0: un attribut \u2019pattern\u2019 ou \u2019type\u2019 doit \u00eatre sp\u00e9cifi\u00e9 pour convertir la valeur \u00ab{0}\u00bb. -jakarta.faces.converter.DoubleConverter.DOUBLE={2}\u00a0: \u00ab{0}\u00bb doit \u00eatre un nombre compos\u00e9 d\u2019un ou de plusieurs chiffres. -jakarta.faces.converter.DoubleConverter.DOUBLE_detail={2}\u00a0: \u00ab{0}\u00bb doit \u00eatre un nombre compris entre 4.9E-324 et 1.7976931348623157E308. Exemple\u00a0: {1} -jakarta.faces.converter.EnumConverter.ENUM={2}\u00a0: \u00ab{0}\u00bb doit pouvoir \u00eatre converti en une valeur Enum. -jakarta.faces.converter.EnumConverter.ENUM_detail={2}\u00a0: \u00ab{0}\u00bb doit pouvoir \u00eatre converti en une valeur Enum \u00e0 partir de la valeur Enum contenant la constante \u00ab{1}\u00bb. -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS={1}\u00a0: \u00ab{0}\u00bb doit pouvoir \u00eatre converti en une valeur Enum \u00e0 partir de la valeur Enum, mais aucune classe Enum n\u2019est fournie. -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS_detail={1}\u00a0: \u00ab{0}\u00bb doit pouvoir \u00eatre converti en une valeur Enum \u00e0 partir de la valeur Enum, mais aucune classe Enum n\u2019est fournie. -jakarta.faces.converter.FloatConverter.FLOAT={2}\u00a0: \u00ab{0}\u00bb doit \u00eatre un nombre compos\u00e9 d\u2019un ou de plusieurs chiffres. -jakarta.faces.converter.FloatConverter.FLOAT_detail={2}\u00a0: \u00ab{0}\u00bb doit \u00eatre un nombre compris entre 1.4E-45 et 3.4028235E38. Exemple\u00a0: {1} -jakarta.faces.converter.IntegerConverter.INTEGER={2}\u00a0: \u00ab{0}\u00bb doit \u00eatre un nombre compos\u00e9 d\u2019un ou de plusieurs chiffres. -jakarta.faces.converter.IntegerConverter.INTEGER_detail={2}\u00a0: \u00ab{0}\u00bb doit \u00eatre un nombre compris entre -2147483648 et 2147483647. Exemple\u00a0: {1} -jakarta.faces.converter.LongConverter.LONG={2}\u00a0: \u00ab{0}\u00bb doit \u00eatre un nombre compos\u00e9 d\u2019un ou de plusieurs chiffres. -jakarta.faces.converter.LongConverter.LONG_detail={2}\u00a0: \u00ab{0}\u00bb doit \u00eatre un nombre compris entre -9223372036854775808 et 9223372036854775807. Exemple\u00a0: {1} -jakarta.faces.converter.NumberConverter.CURRENCY={2}\u00a0: \u00ab{0}\u00bb n\u2019a pas pu \u00eatre interpr\u00e9t\u00e9 en tant que valeur mon\u00e9taire. -jakarta.faces.converter.NumberConverter.CURRENCY_detail={2}\u00a0: \u00ab{0}\u00bb n\u2019a pas pu \u00eatre interpr\u00e9t\u00e9 en tant que valeur mon\u00e9taire. Exemple\u00a0: {1} -jakarta.faces.converter.NumberConverter.PERCENT={2}\u00a0: \u00ab{0}\u00bb n\u2019a pas pu \u00eatre interpr\u00e9t\u00e9 en tant que pourcentage. -jakarta.faces.converter.NumberConverter.PERCENT_detail={2}\u00a0: \u00ab{0}\u00bb n\u2019a pas pu \u00eatre interpr\u00e9t\u00e9 en tant que pourcentage. Exemple\u00a0: {1} -jakarta.faces.converter.NumberConverter.NUMBER={2}\u00a0: \u00ab{0}\u00bb n\u2019est pas un nombre. -jakarta.faces.converter.NumberConverter.NUMBER_detail={2}\u00a0: \u00ab{0}\u00bb n\u2019est pas un nombre. Exemple\u00a0: {1} -jakarta.faces.converter.NumberConverter.PATTERN={2}\u00a0: \u00ab{0}\u00bb n\u2019est pas un format num\u00e9rique. -jakarta.faces.converter.NumberConverter.PATTERN_detail={2}\u00a0: \u00ab{0}\u00bb n\u2019est pas un format num\u00e9rique. Exemple\u00a0: {1} -jakarta.faces.converter.ShortConverter.SHORT={2}\u00a0: \u00ab{0}\u00bb doit \u00eatre un nombre compos\u00e9 d\u2019un ou de plusieurs chiffres. -jakarta.faces.converter.ShortConverter.SHORT_detail={2}\u00a0: \u00ab{0}\u00bb doit \u00eatre un nombre compris entre -32768 et 32767. Exemple\u00a0: {1} -jakarta.faces.converter.STRING={1}\u00a0: impossible de convertir \u00ab{0}\u00bb en cha\u00eene. - - -# ============================================================================== -# Validator Errors -# ============================================================================== -jakarta.faces.validator.DoubleRangeValidator.MAXIMUM={1}\u00a0: erreur de validation. La valeur est sup\u00e9rieure \u00e0 la valeur maximale autoris\u00e9e, "{0}". -jakarta.faces.validator.DoubleRangeValidator.MINIMUM={1}\u00a0: erreur de validation. La valeur est inf\u00e9rieure \u00e0 la valeur minimale autoris\u00e9e, "{0}". -jakarta.faces.validator.DoubleRangeValidator.NOT_IN_RANGE={2}\u00a0: erreur de validation. L\u2019attribut sp\u00e9cifi\u00e9 n\u2019est pas compris entre les valeurs attendues {0} et {1}. -jakarta.faces.validator.DoubleRangeValidator.TYPE={0}\u00a0: erreur de validation. La valeur n\u2019est pas du type correct. -jakarta.faces.validator.LengthValidator.MAXIMUM={1}\u00a0: erreur de validation. La longueur est sup\u00e9rieure \u00e0 la valeur maximale autoris\u00e9e, "{0}". -jakarta.faces.validator.LengthValidator.MINIMUM={1}\u00a0: erreur de validation. La longueur est inf\u00e9rieure \u00e0 la valeur minimale autoris\u00e9e, "{0}". -jakarta.faces.validator.LongRangeValidator.MAXIMUM={1}\u00a0: erreur de validation. La valeur est sup\u00e9rieure \u00e0 la valeur maximale autoris\u00e9e, "{0}". -jakarta.faces.validator.LongRangeValidator.MINIMUM={1}\u00a0: erreur de validation. La valeur est inf\u00e9rieure \u00e0 la valeur minimale autoris\u00e9e, "{0}". -jakarta.faces.validator.LongRangeValidator.NOT_IN_RANGE={2}\u00a0: erreur de validation. L\u2019attribut sp\u00e9cifi\u00e9 n\u2019est pas compris entre les valeurs attendues {0} et {1}. -jakarta.faces.validator.LongRangeValidator.TYPE={0}\u00a0: erreur de validation. La valeur n\u2019est pas du type correct. -jakarta.faces.validator.NOT_IN_RANGE=Erreur de validation\u00a0: l\u2019attribut sp\u00e9cifi\u00e9 n\u2019est pas compris entre les valeurs attendues {0} et {1}. -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET=Le mod\u00e8le d\u2019expression r\u00e9guli\u00e8re doit \u00eatre d\u00e9fini. -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET_detail=La valeur d\u00e9finie du mod\u00e8le d\u2019expression r\u00e9guli\u00e8re ne peut pas \u00eatre vide. -jakarta.faces.validator.RegexValidator.NOT_MATCHED=Discordance du mod\u00e8le d\u2019expression r\u00e9guli\u00e8re. -jakarta.faces.validator.RegexValidator.NOT_MATCHED_detail=Discordance du mod\u00e8le d\u2019expression r\u00e9guli\u00e8re \u00ab{0}\u00bb. -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION=Erreur dans l\u2019expression r\u00e9guli\u00e8re. -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION_detail=Erreur dans l\u2019expression r\u00e9guli\u00e8re, \u00ab{0}\u00bb -jakarta.faces.validator.BeanValidator.MESSAGE={0} - - diff --git a/impl/src/main/resources/jakarta/faces/Messages_ja.properties b/impl/src/main/resources/jakarta/faces/Messages_ja.properties deleted file mode 100644 index 1dda8d9006..0000000000 --- a/impl/src/main/resources/jakarta/faces/Messages_ja.properties +++ /dev/null @@ -1,94 +0,0 @@ -# -# Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - - -# ============================================================================== -# Component Errors -# ============================================================================== -jakarta.faces.component.UIInput.CONVERSION={0}: \u5909\u63db\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -jakarta.faces.component.UIInput.REQUIRED={0}: \u691c\u8a3c\u30a8\u30e9\u30fc: \u5024\u304c\u5fc5\u8981\u3067\u3059\u3002 -jakarta.faces.component.UIInput.UPDATE={0}: \u9001\u4fe1\u60c5\u5831\u306e\u51e6\u7406\u6642\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -jakarta.faces.component.UISelectOne.INVALID={0}: \u691c\u8a3c\u30a8\u30e9\u30fc: \u5024\u304c\u6709\u52b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093 -jakarta.faces.component.UISelectMany.INVALID={0}: \u691c\u8a3c\u30a8\u30e9\u30fc: \u5024\u304c\u6709\u52b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093 - -# ============================================================================== -# Converter Errors -# ============================================================================== -jakarta.faces.converter.BigDecimalConverter.DECIMAL={2}: ''{0}'' \u306f\u7b26\u53f7\u4ed8\u304d\u306e 10 \u9032\u6570\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.converter.BigDecimalConverter.DECIMAL_detail={2}: ''{0}'' \u306f 0 \u6841\u4ee5\u4e0a\u306e\u7b26\u53f7\u4ed8\u304d\u306e 10 \u9032\u6570\u3067\u306a\u3051\u308c\u3070\u306a\u3089\u305a\u3001\u305d\u306e\u3042\u3068\u306b\u5c0f\u6570\u70b9\u3068\u4eee\u6570\u304c\u7d9a\u304f\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002\u4f8b: {1} -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER={2}: ''{0}'' \u306f 1 \u6841\u4ee5\u4e0a\u306e\u6570\u5b57\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER_detail={2}: ''{0}'' \u306f 1 \u6841\u4ee5\u4e0a\u306e\u6570\u5b57\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\u4f8b: {1} -jakarta.faces.converter.BooleanConverter.BOOLEAN={1}: ''{0}'' \u306f 'true' \u307e\u305f\u306f 'false' \u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.converter.BooleanConverter.BOOLEAN_detail={1}: ''{0}'' \u306f 'true' \u307e\u305f\u306f 'false' \u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002'true' \u4ee5\u5916\u306e\u5024\u306f\u3059\u3079\u3066 'false' \u306b\u8a55\u4fa1\u3055\u308c\u307e\u3059\u3002 -jakarta.faces.converter.ByteConverter.BYTE={2}: ''{0}'' \u306f -128 \u3068 127 \u306e\u9593\u306e\u6570\u5b57\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.converter.ByteConverter.BYTE_detail={2}: ''{0}'' \u306f -128 \u3068 127 \u306e\u9593\u306e\u6570\u5b57\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\u4f8b: {1} -jakarta.faces.converter.CharacterConverter.CHARACTER={1}: ''{0}'' \u306f\u6709\u52b9\u306a\u6587\u5b57\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.converter.CharacterConverter.CHARACTER_detail={1}: ''{0}'' \u306f\u6709\u52b9\u306a ASCII \u6587\u5b57\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.converter.DateTimeConverter.DATE={2}: ''{0}'' \u3092\u65e5\u4ed8\u3068\u3057\u3066\u89e3\u91c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 -jakarta.faces.converter.DateTimeConverter.DATE_detail={2}: ''{0}'' \u3092\u65e5\u4ed8\u3068\u3057\u3066\u89e3\u91c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u4f8b: {1} -jakarta.faces.converter.DateTimeConverter.TIME={2}: ''{0}'' \u3092\u6642\u523b\u3068\u3057\u3066\u89e3\u91c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 -jakarta.faces.converter.DateTimeConverter.TIME_detail={2}: ''{0}'' \u3092\u6642\u523b\u3068\u3057\u3066\u89e3\u91c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u4f8b: {1} -jakarta.faces.converter.DateTimeConverter.DATETIME={2}: ''{0}'' \u3092\u65e5\u4ed8\u3068\u6642\u523b\u3068\u3057\u3066\u89e3\u91c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 -jakarta.faces.converter.DateTimeConverter.DATETIME_detail={2}: ''{0}'' \u3092\u65e5\u4ed8\u3068\u6642\u523b\u3068\u3057\u3066\u89e3\u91c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u4f8b: {1} -jakarta.faces.converter.DateTimeConverter.PATTERN_TYPE={1}: \u5024 ''{0}'' \u3092\u5909\u63db\u3059\u308b\u306b\u306f\u3001'pattern' \u307e\u305f\u306f 'type' \u5c5e\u6027\u3092\u6307\u5b9a\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.converter.DoubleConverter.DOUBLE={2}: ''{0}'' \u306f 1 \u6841\u4ee5\u4e0a\u306e\u6570\u5b57\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.converter.DoubleConverter.DOUBLE_detail={2}: ''{0}'' \u306f 4.9E-324 \u3068 1.7976931348623157E308 \u306e\u9593\u306e\u6570\u5b57\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093 \u4f8b: {1} -jakarta.faces.converter.EnumConverter.ENUM={2}: ''{0}'' \u306f\u5217\u6319\u578b\u3078\u306e\u5909\u63db\u304c\u53ef\u80fd\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.converter.EnumConverter.ENUM_detail={2}: ''{0}'' \u306f\u5b9a\u6570 ''{1}'' \u3092\u542b\u3080\u5217\u6319\u578b\u304b\u3089\u5217\u6319\u578b\u3078\u306e\u5909\u63db\u304c\u53ef\u80fd\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS={1}: ''{0}'' \u306f\u5217\u6319\u578b\u304b\u3089\u5217\u6319\u578b\u3078\u306e\u5909\u63db\u304c\u53ef\u80fd\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u304c\u3001\u5217\u6319\u578b\u30af\u30e9\u30b9\u306f\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002 -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS_detail={1}: ''{0}'' \u306f\u5217\u6319\u578b\u304b\u3089\u5217\u6319\u578b\u3078\u306e\u5909\u63db\u304c\u53ef\u80fd\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u304c\u3001\u5217\u6319\u578b\u30af\u30e9\u30b9\u306f\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002 -jakarta.faces.converter.FloatConverter.FLOAT={2}: ''{0}'' \u306f 1 \u6841\u4ee5\u4e0a\u306e\u6570\u5b57\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.converter.FloatConverter.FLOAT_detail={2}: ''{0}'' \u306f 1.4E-45 \u3068 3.4028235E38 \u306e\u9593\u306e\u6570\u5b57\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093 \u4f8b: {1} -jakarta.faces.converter.IntegerConverter.INTEGER={2}: ''{0}'' \u306f 1 \u6841\u4ee5\u4e0a\u306e\u6570\u5b57\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.converter.IntegerConverter.INTEGER_detail={2}: ''{0}'' \u306f -2147483648 \u3068 2147483647 \u306e\u9593\u306e\u6570\u5b57\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093 \u4f8b: {1} -jakarta.faces.converter.LongConverter.LONG={2}: ''{0}'' \u306f 1 \u6841\u4ee5\u4e0a\u306e\u6570\u5b57\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.converter.LongConverter.LONG_detail={2}: ''{0}'' \u306f -9223372036854775808 \u3068 9223372036854775807 \u306e\u9593\u306e\u6570\u5b57\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093 \u4f8b: {1} -jakarta.faces.converter.NumberConverter.CURRENCY={2}: ''{0}'' \u3092\u901a\u8ca8\u306e\u5024\u3068\u3057\u3066\u89e3\u91c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 -jakarta.faces.converter.NumberConverter.CURRENCY_detail={2}: ''{0}'' \u3092\u901a\u8ca8\u306e\u5024\u3068\u3057\u3066\u89e3\u91c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u4f8b: {1} -jakarta.faces.converter.NumberConverter.PERCENT={2}: ''{0}'' \u3092\u30d1\u30fc\u30bb\u30f3\u30c6\u30fc\u30b8\u3068\u3057\u3066\u89e3\u91c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 -jakarta.faces.converter.NumberConverter.PERCENT_detail={2}: ''{0}'' \u3092\u30d1\u30fc\u30bb\u30f3\u30c6\u30fc\u30b8\u3068\u3057\u3066\u89e3\u91c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u4f8b: {1} -jakarta.faces.converter.NumberConverter.NUMBER={2}: ''{0}'' \u306f\u6570\u5b57\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.converter.NumberConverter.NUMBER_detail={2}: ''{0}'' \u306f\u6570\u5b57\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u4f8b: {1} -jakarta.faces.converter.NumberConverter.PATTERN={2}: ''{0}'' \u306f\u6570\u5b57\u306e\u30d1\u30bf\u30fc\u30f3\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.converter.NumberConverter.PATTERN_detail={2}: ''{0}'' \u306f\u6570\u5b57\u306e\u30d1\u30bf\u30fc\u30f3\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u4f8b: {1} -jakarta.faces.converter.ShortConverter.SHORT={2}: ''{0}'' \u306f 1 \u6841\u4ee5\u4e0a\u306e\u6570\u5b57\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.converter.ShortConverter.SHORT_detail={2}: ''{0}'' \u306f -32768 \u3068 32767 \u306e\u9593\u306e\u6570\u5b57\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093 \u4f8b: {1} -jakarta.faces.converter.STRING={1}: ''{0}'' \u3092\u6587\u5b57\u5217\u306b\u5909\u63db\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 - - -# ============================================================================== -# Validator Errors -# ============================================================================== -jakarta.faces.validator.DoubleRangeValidator.MAXIMUM={1}: \u691c\u8a3c\u30a8\u30e9\u30fc: \u5024\u304c\u8a31\u53ef\u3055\u308c\u308b\u6700\u5927\u5024 "{0}" \u3092\u4e0a\u56de\u3063\u3066\u3044\u307e\u3059 -jakarta.faces.validator.DoubleRangeValidator.MINIMUM={1}: \u691c\u8a3c\u30a8\u30e9\u30fc: \u5024\u304c\u8a31\u53ef\u3055\u308c\u308b\u6700\u5c0f\u5024 "{0}" \u3092\u4e0b\u56de\u3063\u3066\u3044\u307e\u3059 -jakarta.faces.validator.DoubleRangeValidator.NOT_IN_RANGE={2}: \u691c\u8a3c\u30a8\u30e9\u30fc: \u6307\u5b9a\u3055\u308c\u305f\u5c5e\u6027\u304c {0} \u3068 {1} \u306e\u9593\u306e\u671f\u5f85\u5024\u306b\u3042\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.validator.DoubleRangeValidator.TYPE={0}: \u691c\u8a3c\u30a8\u30e9\u30fc: \u5024\u306e\u578b\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093 -jakarta.faces.validator.LengthValidator.MAXIMUM={1}: \u78ba \u8a8d \u306e \u9593 \u9055 \u3044: \u9577 \u3055 \u306f \u6b63 \u5f53 \u306a \u6700 \u5927 \u3088 \u308a \u5927 \u304d \u3044 ''{0}'' -jakarta.faces.validator.LengthValidator.MINIMUM={1}: \u78ba \u8a8d \u306e \u9593 \u9055 \u3044: \u9577 \u3055 \u306f \u6b63 \u5f53 \u306a \u6700 \u5c0f \u3088 \u308a \u3088 \u308a \u5c11 \u306a \u304f ''{0}'' \u3042 \u308b -jakarta.faces.validator.LongRangeValidator.MAXIMUM={1}: \u691c\u8a3c\u30a8\u30e9\u30fc: \u5024\u304c\u8a31\u53ef\u3055\u308c\u308b\u6700\u5927\u5024 "{0}" \u3092\u4e0a\u56de\u3063\u3066\u3044\u307e\u3059 -jakarta.faces.validator.LongRangeValidator.MINIMUM={1}: \u691c\u8a3c\u30a8\u30e9\u30fc: \u5024\u304c\u8a31\u53ef\u3055\u308c\u308b\u6700\u5c0f\u5024 "{0}" \u3092\u4e0b\u56de\u3063\u3066\u3044\u307e\u3059 -jakarta.faces.validator.LongRangeValidator.NOT_IN_RANGE={2}: \u691c\u8a3c\u30a8\u30e9\u30fc: \u6307\u5b9a\u3055\u308c\u305f\u5c5e\u6027\u304c {0} \u3068 {1} \u306e\u9593\u306e\u671f\u5f85\u5024\u306b\u3042\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.validator.LongRangeValidator.TYPE={0}: \u691c\u8a3c\u30a8\u30e9\u30fc: \u5024\u306e\u578b\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.validator.NOT_IN_RANGE=\u691c\u8a3c\u30a8\u30e9\u30fc: \u6307\u5b9a\u3055\u308c\u305f\u5c5e\u6027\u304c {0} \u3068 {1} \u306e\u9593\u306e\u671f\u5f85\u5024\u306b\u3042\u308a\u307e\u305b\u3093\u3002 -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET=\u6b63\u898f\u8868\u73fe\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET_detail=\u6b63\u898f\u8868\u73fe\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u7a7a\u3067\u306a\u3044\u5024\u306b\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 -jakarta.faces.validator.RegexValidator.NOT_MATCHED=\u6b63\u898f\u8868\u73fe\u306e\u30d1\u30bf\u30fc\u30f3\u306b\u4e00\u81f4\u3057\u307e\u305b\u3093 -jakarta.faces.validator.RegexValidator.NOT_MATCHED_detail=\u6b63\u898f\u8868\u73fe\u306e\u30d1\u30bf\u30fc\u30f3 ''{0}'' \u306b\u4e00\u81f4\u3057\u307e\u305b\u3093 -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION=\u6b63\u898f\u8868\u73fe\u306b\u30a8\u30e9\u30fc\u304c\u3042\u308a\u307e\u3059\u3002 -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION_detail=\u6b63\u898f\u8868\u73fe\u306e\u30a8\u30e9\u30fc\u3001''{0}'' -jakarta.faces.validator.BeanValidator.MESSAGE={0} - - diff --git a/impl/src/main/resources/jakarta/faces/Messages_ko.properties b/impl/src/main/resources/jakarta/faces/Messages_ko.properties deleted file mode 100644 index 9a788fa8f1..0000000000 --- a/impl/src/main/resources/jakarta/faces/Messages_ko.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -# Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# ============================================================================== -# Component Errors -# ============================================================================== -jakarta.faces.component.UIInput.CONVERSION={0}: \ubcc0\ud658 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. -jakarta.faces.component.UIInput.REQUIRED={0}: \uac80\uc99d \uc624\ub958: \uac12\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. -jakarta.faces.component.UIInput.UPDATE={0}: \uc81c\ucd9c\ud55c \uc815\ubcf4\ub97c \ucc98\ub9ac\ud558\ub294 \uc911 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. -jakarta.faces.component.UISelectOne.INVALID={0}: \uac80\uc99d \uc624\ub958: \uac12\uc774 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. -jakarta.faces.component.UISelectMany.INVALID={0}: \uac80\uc99d \uc624\ub958: \uac12\uc774 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. - -# ============================================================================== -# Converter Errors -# ============================================================================== -jakarta.faces.converter.BigDecimalConverter.DECIMAL={2}: ''{0}''\uc740(\ub294) \uc11c\uba85\ub41c 10\uc9c4\uc218\uc5ec\uc57c \ud569\ub2c8\ub2e4. -jakarta.faces.converter.BigDecimalConverter.DECIMAL_detail={2}: ''{0}''\uc740(\ub294) 0\uc790\ub9ac \uc774\uc0c1\uc758 \uc11c\uba85\ub41c 10\uc9c4\uc218\uc5ec\uc57c \ud569\ub2c8\ub2e4. \uc774 \uc22b\uc790 \ub4a4\uc5d0 \uc18c\uc218\uc810\uacfc \ubd84\uc218\uac00 \uc62c \uc218\ub3c4 \uc788\uc2b5\ub2c8\ub2e4. \uc608: {1} -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER={2}: ''{0}''\uc740(\ub294) \ud55c \uc790\ub9ac \uc774\uc0c1\uc758 \uc22b\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4. -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER_detail={2}: ''{0}''\uc740(\ub294) \ud55c \uc790\ub9ac \uc774\uc0c1\uc758 \uc22b\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4. \uc608: {1} -jakarta.faces.converter.BooleanConverter.BOOLEAN={1}: ''{0}''\uc740(\ub294) 'true' \ub610\ub294 'false'\uc5ec\uc57c \ud569\ub2c8\ub2e4. -jakarta.faces.converter.BooleanConverter.BOOLEAN_detail={1}: ''{0}''\uc740(\ub294) 'true' \ub610\ub294 'false'\uc5ec\uc57c \ud569\ub2c8\ub2e4. 'true' \uc774\uc678\uc758 \uac12\uc740 'false'\ub85c \ud3c9\uac00\ub429\ub2c8\ub2e4. -jakarta.faces.converter.ByteConverter.BYTE={2}: ''{0}''\uc740(\ub294) -128\uacfc 127 \uc0ac\uc774\uc758 \uc22b\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4. -jakarta.faces.converter.ByteConverter.BYTE_detail={2}: ''{0}''\uc740(\ub294) -128\uacfc 127 \uc0ac\uc774\uc758 \uc22b\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4. \uc608: {1} -jakarta.faces.converter.CharacterConverter.CHARACTER={1}: ''{0}''\uc740(\ub294) \uc720\ud6a8\ud55c \ubb38\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4. -jakarta.faces.converter.CharacterConverter.CHARACTER_detail={1}: ''{0}''\uc740(\ub294) \uc720\ud6a8\ud55c ASCII \ubb38\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4. -jakarta.faces.converter.DateTimeConverter.DATE={2}: ''{0}''\uc744(\ub97c) \ub0a0\uc9dc\ub85c \uc778\uc2dd\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -jakarta.faces.converter.DateTimeConverter.DATE_detail={2}: ''{0}''\uc744(\ub97c) \ub0a0\uc9dc\ub85c \uc778\uc2dd\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc608: {1} -jakarta.faces.converter.DateTimeConverter.TIME={2}: ''{0}''\uc744(\ub97c) \uc2dc\uac04\uc73c\ub85c \uc778\uc2dd\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -jakarta.faces.converter.DateTimeConverter.TIME_detail={2}: ''{0}''\uc744(\ub97c) \uc2dc\uac04\uc73c\ub85c \uc778\uc2dd\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc608: {1} -jakarta.faces.converter.DateTimeConverter.DATETIME={2}: ''{0}''\uc744(\ub97c) \ub0a0\uc9dc \ubc0f \uc2dc\uac04\uc73c\ub85c \uc778\uc2dd\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -jakarta.faces.converter.DateTimeConverter.DATETIME_detail={2}: ''{0}''\uc744(\ub97c) \ub0a0\uc9dc \ubc0f \uc2dc\uac04\uc73c\ub85c \uc778\uc2dd\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc608: {1} -jakarta.faces.converter.DateTimeConverter.PATTERN_TYPE={1}: ''{0}'' \uac12\uc744 \ubcc0\ud658\ud558\ub824\uba74 '\ud328\ud134' \ub610\ub294 '\uc720\ud615' \uc18d\uc131\uc774 \uc9c0\uc815\ub418\uc5b4\uc57c \ud569\ub2c8\ub2e4. -jakarta.faces.converter.DoubleConverter.DOUBLE={2}: ''{0}''\uc740(\ub294) \ud55c \uc790\ub9ac \uc774\uc0c1\uc758 \uc22b\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4. -jakarta.faces.converter.DoubleConverter.DOUBLE_detail={2}: ''{0}''\uc740(\ub294) 4.9E-324\uc640 1.7976931348623157E308 \uc0ac\uc774\uc758 \uc22b\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4. \uc608: {1} -jakarta.faces.converter.EnumConverter.ENUM={2}: ''{0}''\uc744(\ub97c) enum\uc73c\ub85c \ubcc0\ud658\ud560 \uc218 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4. -jakarta.faces.converter.EnumConverter.ENUM_detail={2}: ''{0}''\uc744(\ub97c) \uc0c1\uc218 ''{1}''\uc774(\uac00) \ud3ec\ud568\ub41c enum\uc5d0\uc11c \ud558\ub098\uc758 enum\uc73c\ub85c \ubcc0\ud658\ud560 \uc218 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4. -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS={1}: ''{0}''\uc744(\ub97c) enum\uc5d0\uc11c enum\uc73c\ub85c \ubcc0\ud658\ud560 \uc218 \uc788\uc5b4\uc57c \ud558\uc9c0\ub9cc enum \ud074\ub798\uc2a4\uac00 \uc81c\uacf5\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4. -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS_detail={1}: ''{0}''\uc744(\ub97c) enum\uc5d0\uc11c enum\uc73c\ub85c \ubcc0\ud658\ud560 \uc218 \uc788\uc5b4\uc57c \ud558\uc9c0\ub9cc enum \ud074\ub798\uc2a4\uac00 \uc81c\uacf5\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4. -jakarta.faces.converter.FloatConverter.FLOAT={2}: ''{0}''\uc740(\ub294) \ud55c \uc790\ub9ac \uc774\uc0c1\uc758 \uc22b\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4. -jakarta.faces.converter.FloatConverter.FLOAT_detail={2}: ''{0}''\uc740(\ub294) 1.4E-45\uc640 3.4028235E38 \uc0ac\uc774\uc758 \uc22b\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4. \uc608: {1} -jakarta.faces.converter.IntegerConverter.INTEGER={2}: ''{0}''\uc740(\ub294) \ud55c \uc790\ub9ac \uc774\uc0c1\uc758 \uc22b\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4. -jakarta.faces.converter.IntegerConverter.INTEGER_detail={2}: ''{0}''\uc740(\ub294) -2147483648\uacfc 2147483647 \uc0ac\uc774\uc758 \uc22b\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4. \uc608: {1} -jakarta.faces.converter.LongConverter.LONG={2}: ''{0}''\uc740(\ub294) \ud55c \uc790\ub9ac \uc774\uc0c1\uc758 \uc22b\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4. -jakarta.faces.converter.LongConverter.LONG_detail={2}: ''{0}''\uc740(\ub294) -9223372036854775808\uacfc 9223372036854775807 \uc0ac\uc774\uc758 \uc22b\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4. \uc608: {1} -jakarta.faces.converter.NumberConverter.CURRENCY={2}: ''{0}''\uc744(\ub97c) \ud1b5\ud654 \uac12\uc73c\ub85c \uc778\uc2dd\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -jakarta.faces.converter.NumberConverter.CURRENCY_detail={2}: ''{0}''\uc744(\ub97c) \ud1b5\ud654 \uac12\uc73c\ub85c \uc778\uc2dd\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc608: {1} -jakarta.faces.converter.NumberConverter.PERCENT={2}: ''{0}''\uc744(\ub97c) \ubc31\ubd84\uc728\ub85c \uc778\uc2dd\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. -jakarta.faces.converter.NumberConverter.PERCENT_detail={2}: ''{0}''\uc744(\ub97c) \ubc31\ubd84\uc728\ub85c \uc778\uc2dd\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc608: {1} -jakarta.faces.converter.NumberConverter.NUMBER={2}: ''{0}''\uc740(\ub294) \uc22b\uc790\uac00 \uc544\ub2d9\ub2c8\ub2e4. -jakarta.faces.converter.NumberConverter.NUMBER_detail={2}: ''{0}''\uc740(\ub294) \uc22b\uc790\uac00 \uc544\ub2d9\ub2c8\ub2e4. \uc608: {1} -jakarta.faces.converter.NumberConverter.PATTERN={2}: ''{0}''\uc740(\ub294) \uc22b\uc790 \ud328\ud134\uc774 \uc544\ub2d9\ub2c8\ub2e4. -jakarta.faces.converter.NumberConverter.PATTERN_detail={2}: ''{0}''\uc740(\ub294) \uc22b\uc790 \ud328\ud134\uc774 \uc544\ub2d9\ub2c8\ub2e4. \uc608: {1} -jakarta.faces.converter.ShortConverter.SHORT={2}: ''{0}''\uc740(\ub294) \ud55c \uc790\ub9ac \uc774\uc0c1\uc758 \uc22b\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4. -jakarta.faces.converter.ShortConverter.SHORT_detail={2}: ''{0}''\uc740(\ub294) -32768\uacfc 32767 \uc0ac\uc774\uc758 \uc22b\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4. \uc608: {1} -jakarta.faces.converter.STRING={1}: ''{0}''\uc744(\ub97c) \ubb38\uc790\uc5f4\ub85c \ubcc0\ud658\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. - - -# ============================================================================== -# Validator Errors -# ============================================================================== -jakarta.faces.validator.DoubleRangeValidator.MAXIMUM={1}: \uac80\uc99d \uc624\ub958: \uac12\uc774 \ud5c8\uc6a9\ub418\ub294 \ucd5c\ub300\uac12 "{0}"\ubcf4\ub2e4 \ud07d\ub2c8\ub2e4. -jakarta.faces.validator.DoubleRangeValidator.MINIMUM={1}: \uac80\uc99d \uc624\ub958: \uac12\uc774 \ud5c8\uc6a9\ub418\ub294 \ucd5c\uc18c\uac12 ''{0}''\ubcf4\ub2e4 \uc791\uc2b5\ub2c8\ub2e4. -jakarta.faces.validator.DoubleRangeValidator.NOT_IN_RANGE={2}: \uac80\uc99d \uc624\ub958: \uc9c0\uc815\ud55c \uc18d\uc131\uc774 \ud544\uc694\ud55c \uac12 \ubc94\uc704\uc778 {0} ~ {1}\uc5d0 \uc788\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. -jakarta.faces.validator.DoubleRangeValidator.TYPE={0}: \uac80\uc99d \uc624\ub958: \uac12 \uc720\ud615\uc774 \uc62c\ubc14\ub974\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. -jakarta.faces.validator.LengthValidator.MAXIMUM={1}: \uae38 \uc774 \ub294 \ud5c8 \uc6a9 \uac00 \ub2a5 \ud55c \ucd5c \uc18c \ubcf4 \ub2e4 \ub294 \ubcf4 \ub2e4 \uc801 \uac8c ''{0}'' \uc774 \ub2e4. -jakarta.faces.validator.LengthValidator.MINIMUM={1}: \ud655 \uc778 \uacfc \uc2e4: \uae38 \uc774 \ub294 \ud5c8 \uc6a9 \uac00 \ub2a5 \ud55c \ucd5c \uc18c \ubcf4 \ub2e4 \ub294 \ubcf4 \ub2e4 \uc801 \uac8c ''{0}'' \uc774 \ub2e4 -jakarta.faces.validator.LongRangeValidator.MAXIMUM={1}: \uac80\uc99d \uc624\ub958: \uac12\uc774 \ud5c8\uc6a9\ub418\ub294 \ucd5c\ub300\uac12 ''{0}''\ubcf4\ub2e4 \ud07d\ub2c8\ub2e4. -jakarta.faces.validator.LongRangeValidator.MINIMUM={1}: \uac80\uc99d \uc624\ub958: \uac12\uc774 \ud5c8\uc6a9\ub418\ub294 \ucd5c\uc18c\uac12 ''{0}''\ubcf4\ub2e4 \uc791\uc2b5\ub2c8\ub2e4. -jakarta.faces.validator.LongRangeValidator.NOT_IN_RANGE={2}: \uac80\uc99d \uc624\ub958: \uc9c0\uc815\ud55c \uc18d\uc131\uc774 \ud544\uc694\ud55c \uac12 \ubc94\uc704\uc778 {0} ~ {1}\uc5d0 \uc788\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. -jakarta.faces.validator.LongRangeValidator.TYPE={0}: \uac80\uc99d \uc624\ub958: \uac12 \uc720\ud615\uc774 \uc62c\ubc14\ub974\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. -jakarta.faces.validator.NOT_IN_RANGE=\uac80\uc99d \uc624\ub958: \uc9c0\uc815\ud55c \uc18d\uc131\uc774 \ud544\uc694\ud55c \uac12 \ubc94\uc704\uc778 {0} ~ {1}\uc5d0 \uc788\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET=Regex \ud328\ud134\uc744 \uc124\uc815\ud574\uc57c \ud569\ub2c8\ub2e4. -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET_detail=Regex \ud328\ud134\uc744 \ube44\uc5b4 \uc788\uc9c0 \uc54a\uc740 \uac12\uc73c\ub85c \uc124\uc815\ud574\uc57c \ud569\ub2c8\ub2e4. -jakarta.faces.validator.RegexValidator.NOT_MATCHED=Regex \ud328\ud134\uc744 \ucc3e\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. -jakarta.faces.validator.RegexValidator.NOT_MATCHED_detail=Regex \ud328\ud134 ''{0}''\uc744(\ub97c) \ucc3e\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION=\uc815\uaddc \ud45c\ud604\uc2dd \uc624\ub958\uc785\ub2c8\ub2e4. -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION_detail=\uc815\uaddc \ud45c\ud604\uc2dd \uc624\ub958, ''{0}'' -jakarta.faces.validator.BeanValidator.MESSAGE={0} - - diff --git a/impl/src/main/resources/jakarta/faces/Messages_pt_BR.properties b/impl/src/main/resources/jakarta/faces/Messages_pt_BR.properties deleted file mode 100644 index f2c0b410f8..0000000000 --- a/impl/src/main/resources/jakarta/faces/Messages_pt_BR.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -# Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# ============================================================================== -# Component Errors -# ============================================================================== -jakarta.faces.component.UIInput.CONVERSION={0}: Ocorreu um erro de convers\u00e3o. -jakarta.faces.component.UIInput.REQUIRED={0}: Erro de valida\u00e7\u00e3o: o valor \u00e9 necess\u00e1rio. -jakarta.faces.component.UIInput.UPDATE={0}: Ocorreu um erro ao processar as informa\u00e7\u00f5es enviadas. -jakarta.faces.component.UISelectOne.INVALID={0}: Erro de valida\u00e7\u00e3o: o valor n\u00e3o \u00e9 v\u00e1lido -jakarta.faces.component.UISelectMany.INVALID={0}: Erro de valida\u00e7\u00e3o: o valor n\u00e3o \u00e9 v\u00e1lido - -# ============================================================================== -# Converter Errors -# ============================================================================== -jakarta.faces.converter.BigDecimalConverter.DECIMAL={2}: ''{0}'' deve ser um n\u00famero decimal com sinal. -jakarta.faces.converter.BigDecimalConverter.DECIMAL_detail={2}: ''{0}'' deve ser um n\u00famero decimal com sinal formado por zero ou mais d\u00edgitos, que pode ser seguido de um ponto ou fra\u00e7\u00e3o decimal. Exemplo: {1} -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER={2}: ''{0}'' deve ser um n\u00famero formado por um ou mais d\u00edgitos. -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER_detail={2}: ''{0}'' deve ser um n\u00famero formado por um ou mais d\u00edgitos. Exemplo: {1} -jakarta.faces.converter.BooleanConverter.BOOLEAN={1}: ''{0}'' deve ser 'verdadeiro' ou 'falso'. -jakarta.faces.converter.BooleanConverter.BOOLEAN_detail={1}: ''{0}'' deve ser 'verdadeiro' ou 'falso'. Qualquer valor diferente de 'verdadeiro' se avaliar\u00e1 como 'falso'. -jakarta.faces.converter.ByteConverter.BYTE={2}: ''{0}'' deve ser um n\u00famero entre -128 e 127. -jakarta.faces.converter.ByteConverter.BYTE_detail={2}: ''{0}'' deve ser um n\u00famero entre -128 e 127. Exemplo: {1} -jakarta.faces.converter.CharacterConverter.CHARACTER={1}: ''{0}'' deve ser um caractere v\u00e1lido. -jakarta.faces.converter.CharacterConverter.CHARACTER_detail={1}: ''{0}'' deve ser um caractere v\u00e1lido ASCII. -jakarta.faces.converter.DateTimeConverter.DATE={2}: n\u00e3o foi poss\u00edvel reconhecer ''{0}'' como uma data. -jakarta.faces.converter.DateTimeConverter.DATE_detail={2}: n\u00e3o foi poss\u00edvel reconhecer ''{0}'' como uma data. Exemplo: {1} -jakarta.faces.converter.DateTimeConverter.TIME={2}: n\u00e3o foi poss\u00edvel reconhecer ''{0}'' como uma hora. -jakarta.faces.converter.DateTimeConverter.TIME_detail={2}: n\u00e3o foi poss\u00edvel reconhecer ''{0}'' como uma hora. Exemplo: {1} -jakarta.faces.converter.DateTimeConverter.DATETIME={2}: n\u00e3o foi poss\u00edvel reconhecer ''{0}'' como uma data e hora. -jakarta.faces.converter.DateTimeConverter.DATETIME_detail={2}: n\u00e3o foi poss\u00edvel reconhecer ''{0}'' como uma data e hora. Exemplo: {1} -jakarta.faces.converter.DateTimeConverter.PATTERN_TYPE={1}: Um atributo 'pattern' ou 'type' deve ser especificado para converter o valor ''{0}''. -jakarta.faces.converter.DoubleConverter.DOUBLE={2}: ''{0}'' deve ser um n\u00famero formado por um ou mais d\u00edgitos. -jakarta.faces.converter.DoubleConverter.DOUBLE_detail={2}: ''{0}'' deve ser um n\u00famero entre 4.9E-324 e 1.7976931348623157E308 Exemplo: {1} -jakarta.faces.converter.EnumConverter.ENUM={2}: ''{0}'' deve ser convert\u00edvel em um enum. -jakarta.faces.converter.EnumConverter.ENUM_detail={2}: ''{0}'' deve ser convert\u00edvel em um enum de um enum que contenha a constante ''{1}''. -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS={1}: ''{0}'' deve ser convert\u00edvel em um enum do enum, mas sem nenhuma classe enum fornecida. -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS_detail={1}: ''{0}'' deve ser convert\u00edvel em um enum do enum, mas sem nenhuma classe enum fornecida. -jakarta.faces.converter.FloatConverter.FLOAT={2}: ''{0}'' deve ser um n\u00famero formado por um ou mais d\u00edgitos. -jakarta.faces.converter.FloatConverter.FLOAT_detail={2}: ''{0}'' deve ser um n\u00famero entre 1.4E-45 e 3.4028235E38 Exemplo: {1} -jakarta.faces.converter.IntegerConverter.INTEGER={2}: ''{0}'' deve ser um n\u00famero formado por um ou mais d\u00edgitos. -jakarta.faces.converter.IntegerConverter.INTEGER_detail={2}: ''{0}'' deve ser um n\u00famero entre -2147483648 e 2147483647 Exemplo: {1} -jakarta.faces.converter.LongConverter.LONG={2}: ''{0}'' deve ser um n\u00famero formado por um ou mais d\u00edgitos. -jakarta.faces.converter.LongConverter.LONG_detail={2}: ''{0}'' deve ser um n\u00famero entre -9223372036854775808 a 9223372036854775807 Exemplo: {1} -jakarta.faces.converter.NumberConverter.CURRENCY={2}: n\u00e3o foi poss\u00edvel reconhecer ''{0}'' como um valor monet\u00e1rio. -jakarta.faces.converter.NumberConverter.CURRENCY_detail={2}: n\u00e3o foi poss\u00edvel reconhecer ''{0}'' como um valor monet\u00e1rio. Exemplo: {1} -jakarta.faces.converter.NumberConverter.PERCENT={2}: n\u00e3o foi poss\u00edvel reconhecer ''{0}'' como uma porcentagem. -jakarta.faces.converter.NumberConverter.PERCENT_detail={2}: n\u00e3o foi poss\u00edvel reconhecer ''{0}'' como uma porcentagem. Exemplo: {1} -jakarta.faces.converter.NumberConverter.NUMBER={2}: ''{0}'' n\u00e3o \u00e9 um n\u00famero. -jakarta.faces.converter.NumberConverter.NUMBER_detail={2}: ''{0}'' n\u00e3o \u00e9 um n\u00famero. Exemplo: {1} -jakarta.faces.converter.NumberConverter.PATTERN={2}: ''{0}'' n\u00e3o \u00e9 um padr\u00e3o de n\u00famero. -jakarta.faces.converter.NumberConverter.PATTERN_detail={2}: ''{0}'' n\u00e3o \u00e9 um padr\u00e3o de n\u00famero. Exemplo: {1} -jakarta.faces.converter.ShortConverter.SHORT={2}: ''{0}'' deve ser um n\u00famero formado por um ou mais d\u00edgitos. -jakarta.faces.converter.ShortConverter.SHORT_detail={2}: ''{0}'' deve ser um n\u00famero entre -32768 e 32767 Exemplo: {1} -jakarta.faces.converter.STRING={1}: n\u00e3o foi poss\u00edvel converter ''{0}'' em uma sequ\u00eancia. - - -# ============================================================================== -# Validator Errors -# ============================================================================== -jakarta.faces.validator.DoubleRangeValidator.MAXIMUM={1}: Erro de valida\u00e7\u00e3o: o valor \u00e9 maior do que o m\u00e1ximo permitido de "{0}" -jakarta.faces.validator.DoubleRangeValidator.MINIMUM={1}: Erro de valida\u00e7\u00e3o: o valor \u00e9 menor do que o m\u00ednimo permitido de "{0}" -jakarta.faces.validator.DoubleRangeValidator.NOT_IN_RANGE={2}: Erro de valida\u00e7\u00e3o: o atributo especificado n\u00e3o est\u00e1 entre os valores esperados de {0} e {1}. -jakarta.faces.validator.DoubleRangeValidator.TYPE={0}: Erro de valida\u00e7\u00e3o: o valor n\u00e3o \u00e9 do tipo correto -jakarta.faces.validator.LengthValidator.MAXIMUM={1}: Erro de valida\u00e7\u00e3o: o comprimento \u00e9 maior do que o m\u00e1ximo permitido de "{0}" -jakarta.faces.validator.LengthValidator.MINIMUM={1}: Erro de valida\u00e7\u00e3o: o comprimento \u00e9 menor do que o m\u00ednimo permitido de "{0}" -jakarta.faces.validator.LongRangeValidator.MAXIMUM={1}: Erro de valida\u00e7\u00e3o: o valor \u00e9 maior do que o m\u00e1ximo permitido de "{0}" -jakarta.faces.validator.LongRangeValidator.MINIMUM={1}: Erro de valida\u00e7\u00e3o: o valor \u00e9 menor do que o m\u00ednimo permitido de "{0}" -jakarta.faces.validator.LongRangeValidator.NOT_IN_RANGE={2}: Erro de valida\u00e7\u00e3o: o atributo especificado n\u00e3o est\u00e1 entre os valores esperados de {0} e {1}. -jakarta.faces.validator.LongRangeValidator.TYPE={0}: Erro de valida\u00e7\u00e3o: o valor n\u00e3o \u00e9 do tipo correto. -jakarta.faces.validator.NOT_IN_RANGE=Erro de valida\u00e7\u00e3o: o atributo especificado n\u00e3o est\u00e1 entre os valores esperados de {0} e {1}. -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET=O padr\u00e3o Regex deve ser definido. -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET_detail=O padr\u00e3o Regex deve ser definido como um valor n\u00e3o vazio. -jakarta.faces.validator.RegexValidator.NOT_MATCHED=Padr\u00e3o Regex n\u00e3o corresponde -jakarta.faces.validator.RegexValidator.NOT_MATCHED_detail=O padr\u00e3o Regex de ''{0}'' n\u00e3o corresponde -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION=Erro na express\u00e3o regular. -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION_detail=Erro na express\u00e3o regular, ''{0}'' -jakarta.faces.validator.BeanValidator.MESSAGE={0} - - diff --git a/impl/src/main/resources/jakarta/faces/Messages_zh_CN.properties b/impl/src/main/resources/jakarta/faces/Messages_zh_CN.properties deleted file mode 100644 index 2fa7946d3c..0000000000 --- a/impl/src/main/resources/jakarta/faces/Messages_zh_CN.properties +++ /dev/null @@ -1,91 +0,0 @@ -# -# Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# ============================================================================== -# Component Errors -# ============================================================================== -jakarta.faces.component.UIInput.CONVERSION={0}\uff1a\u51fa\u73b0\u8f6c\u6362\u9519\u8bef\u3002 -jakarta.faces.component.UIInput.REQUIRED={0}\uff1a\u9a8c\u8bc1\u9519\u8bef\uff1a\u5fc5\u987b\u8f93\u5165\u503c\u3002 -jakarta.faces.component.UIInput.UPDATE={0}\uff1a\u5904\u7406\u63d0\u4ea4\u7684\u4fe1\u606f\u65f6\u51fa\u9519\u3002 -jakarta.faces.component.UISelectOne.INVALID={0}\uff1a\u9a8c\u8bc1\u9519\u8bef\uff1a\u503c\u65e0\u6548 -jakarta.faces.component.UISelectMany.INVALID={0}\uff1a\u9a8c\u8bc1\u9519\u8bef\uff1a\u503c\u65e0\u6548 - -# ============================================================================== -# Converter Errors -# ============================================================================== -jakarta.faces.converter.BigDecimalConverter.DECIMAL={2}: "{0}" \u5fc5\u987b\u662f\u5e26\u7b26\u53f7\u7684\u5341\u8fdb\u5236\u6570\u503c\u3002 -jakarta.faces.converter.BigDecimalConverter.DECIMAL_detail={2}: "{0}" \u5fc5\u987b\u662f\u7531\u96f6\u4e2a\u6216\u591a\u4e2a\u6570\u5b57\u6784\u6210\u7684\u5e26\u7b26\u53f7\u5341\u8fdb\u5236\u6570\u503c\uff0c\u53ef\u4ee5\u540e\u8ddf\u5c0f\u6570\u70b9\u548c\u5c0f\u6570\u90e8\u5206\u3002\u793a\u4f8b: {1} -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER={2}: "{0}" \u5fc5\u987b\u662f\u7531\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u5b57\u6784\u6210\u7684\u6570\u503c\u3002 -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER_detail={2}: "{0}" \u5fc5\u987b\u662f\u7531\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u5b57\u6784\u6210\u7684\u6570\u503c\u3002\u793a\u4f8b: {1} -jakarta.faces.converter.BooleanConverter.BOOLEAN={1}: "{0}" \u5fc5\u987b\u662f "true" \u6216 "false"\u3002 -jakarta.faces.converter.BooleanConverter.BOOLEAN_detail={1}: "{0}" \u5fc5\u987b\u662f "true" \u6216 "false"\u3002\u975e "true" \u503c\u90fd\u5c06\u4f1a\u88ab\u89c6\u4e3a "false"\u3002 -jakarta.faces.converter.ByteConverter.BYTE={2}: "{0}" \u5fc5\u987b\u662f\u4ecb\u4e8e -128 \u548c 127 \u4e4b\u95f4\u7684\u6570\u503c\u3002 -jakarta.faces.converter.ByteConverter.BYTE_detail={2}: "{0}" \u5fc5\u987b\u662f\u4ecb\u4e8e -128 \u548c 127 \u4e4b\u95f4\u7684\u6570\u503c\u3002\u793a\u4f8b: {1} -jakarta.faces.converter.CharacterConverter.CHARACTER={1}: "{0}" \u5fc5\u987b\u662f\u6709\u6548\u5b57\u7b26\u3002 -jakarta.faces.converter.CharacterConverter.CHARACTER_detail={1}: "{0}" \u5fc5\u987b\u662f\u6709\u6548\u7684 ASCII \u5b57\u7b26\u3002 -jakarta.faces.converter.DateTimeConverter.DATE={2}\uff1a\u65e0\u6cd5\u5c06 "{0}" \u7406\u89e3\u4e3a\u65e5\u671f\u3002 -jakarta.faces.converter.DateTimeConverter.DATE_detail={2}\uff1a\u65e0\u6cd5\u5c06 "{0}" \u7406\u89e3\u4e3a\u65e5\u671f\u3002\u793a\u4f8b: {1} -jakarta.faces.converter.DateTimeConverter.TIME={2}\uff1a\u65e0\u6cd5\u5c06 "{0}" \u7406\u89e3\u4e3a\u65f6\u95f4\u3002 -jakarta.faces.converter.DateTimeConverter.TIME_detail={2}\uff1a\u65e0\u6cd5\u5c06 "{0}" \u7406\u89e3\u4e3a\u65f6\u95f4\u3002\u793a\u4f8b: {1} -jakarta.faces.converter.DateTimeConverter.DATETIME={2}\uff1a\u65e0\u6cd5\u5c06 "{0}" \u7406\u89e3\u4e3a\u65e5\u671f\u548c\u65f6\u95f4\u3002 -jakarta.faces.converter.DateTimeConverter.DATETIME_detail={2}\uff1a\u65e0\u6cd5\u5c06 "{0}" \u7406\u89e3\u4e3a\u65e5\u671f\u548c\u65f6\u95f4\u3002\u793a\u4f8b: {1} -jakarta.faces.converter.DateTimeConverter.PATTERN_TYPE={1}\uff1a\u5fc5\u987b\u6307\u5b9a "pattern" \u6216 "type" \u5c5e\u6027\u624d\u80fd\u8f6c\u6362\u503c "{0}"\u3002 -jakarta.faces.converter.DoubleConverter.DOUBLE={2}: "{0}" \u5fc5\u987b\u662f\u7531\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u5b57\u6784\u6210\u7684\u6570\u503c\u3002 -jakarta.faces.converter.DoubleConverter.DOUBLE_detail={2}: "{0}" \u5fc5\u987b\u662f\u4ecb\u4e8e 4.9E-324 \u548c 1.7976931348623157E308 \u4e4b\u95f4\u7684\u6570\u503c\u3002\u793a\u4f8b: {1} -jakarta.faces.converter.EnumConverter.ENUM={2}: "{0}" \u5fc5\u987b\u80fd\u591f\u8f6c\u6362\u4e3a\u679a\u4e3e\u503c\u3002 -jakarta.faces.converter.EnumConverter.ENUM_detail={2}: "{0}" \u5fc5\u987b\u80fd\u591f\u4ece\u4e00\u4e2a\u542b\u6709\u5e38\u6570 "{1}" \u7684\u679a\u4e3e\u503c\u8f6c\u6362\u4e3a\u53e6\u4e00\u4e2a\u679a\u4e3e\u503c\u3002 -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS={1}: "{0}" \u5fc5\u987b\u80fd\u591f\u4ece\u4e00\u4e2a\u679a\u4e3e\u503c\u8f6c\u6362\u4e3a\u53e6\u4e00\u4e2a\u679a\u4e3e\u503c\uff0c\u4f46\u672a\u63d0\u4f9b\u679a\u4e3e\u7c7b\u3002 -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS_detail={1}: "{0}" \u5fc5\u987b\u80fd\u591f\u4ece\u679a\u4e3e\u503c\u8f6c\u6362\u4e3a\u679a\u4e3e\u503c\uff0c\u4f46\u672a\u63d0\u4f9b\u679a\u4e3e\u7c7b\u3002 -jakarta.faces.converter.FloatConverter.FLOAT={2}: "{0}" \u5fc5\u987b\u662f\u7531\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u5b57\u6784\u6210\u7684\u6570\u503c\u3002 -jakarta.faces.converter.FloatConverter.FLOAT_detail={2}: "{0}" \u5fc5\u987b\u662f\u4ecb\u4e8e 1.4E-45 \u548c 3.4028235E38 \u4e4b\u95f4\u7684\u6570\u503c\u3002\u793a\u4f8b: {1} -jakarta.faces.converter.IntegerConverter.INTEGER={2}: "{0}" \u5fc5\u987b\u662f\u7531\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u5b57\u6784\u6210\u7684\u6570\u503c\u3002 -jakarta.faces.converter.IntegerConverter.INTEGER_detail={2}: "{0}" \u5fc5\u987b\u662f\u4ecb\u4e8e -2147483648 \u548c 2147483647 \u4e4b\u95f4\u7684\u6570\u503c\u3002\u793a\u4f8b: {1} -jakarta.faces.converter.LongConverter.LONG={2}: "{0}" \u5fc5\u987b\u662f\u7531\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u5b57\u6784\u6210\u7684\u6570\u503c\u3002 -jakarta.faces.converter.LongConverter.LONG_detail={2}: "{0}" \u5fc5\u987b\u662f\u4ecb\u4e8e -9223372036854775808 \u548c 9223372036854775807 \u4e4b\u95f4\u7684\u6570\u503c\u3002\u793a\u4f8b: {1} -jakarta.faces.converter.NumberConverter.CURRENCY={2}\uff1a\u65e0\u6cd5\u5c06 "{0}" \u7406\u89e3\u4e3a\u8d27\u5e01\u503c\u3002 -jakarta.faces.converter.NumberConverter.CURRENCY_detail={2}\uff1a\u65e0\u6cd5\u5c06 "{0}" \u7406\u89e3\u4e3a\u8d27\u5e01\u503c\u3002\u793a\u4f8b: {1} -jakarta.faces.converter.NumberConverter.PERCENT={2}\uff1a\u65e0\u6cd5\u5c06 "{0}" \u7406\u89e3\u4e3a\u767e\u5206\u6570\u3002 -jakarta.faces.converter.NumberConverter.PERCENT_detail={2}\uff1a\u65e0\u6cd5\u5c06 "{0}" \u7406\u89e3\u4e3a\u767e\u5206\u6570\u3002\u793a\u4f8b: {1} -jakarta.faces.converter.NumberConverter.NUMBER={2}: "{0}" \u4e0d\u662f\u6570\u503c\u3002 -jakarta.faces.converter.NumberConverter.NUMBER_detail={2}: "{0}" \u4e0d\u662f\u6570\u503c\u3002\u793a\u4f8b: {1} -jakarta.faces.converter.NumberConverter.PATTERN={2}: "{0}" \u4e0d\u662f\u6570\u503c\u6a21\u5f0f\u3002 -jakarta.faces.converter.NumberConverter.PATTERN_detail={2}: "{0}" \u4e0d\u662f\u6570\u503c\u6a21\u5f0f\u3002\u793a\u4f8b: {1} -jakarta.faces.converter.ShortConverter.SHORT={2}: "{0}" \u5fc5\u987b\u662f\u7531\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u5b57\u6784\u6210\u7684\u6570\u503c\u3002 -jakarta.faces.converter.ShortConverter.SHORT_detail={2}: "{0}" \u5fc5\u987b\u662f\u4ecb\u4e8e -32768 \u548c 32767 \u4e4b\u95f4\u7684\u6570\u503c\u3002\u793a\u4f8b: {1} -jakarta.faces.converter.STRING={1}\uff1a\u65e0\u6cd5\u5c06 "{0}" \u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\u3002 - - -# ============================================================================== -# Validator Errors -# ============================================================================== -jakarta.faces.validator.DoubleRangeValidator.MAXIMUM={1}\uff1a\u9a8c\u8bc1\u9519\u8bef\uff1a\u503c\u5927\u4e8e\u5141\u8bb8\u7684\u6700\u5927\u503c "{0}" -jakarta.faces.validator.DoubleRangeValidator.MINIMUM={1}\uff1a\u9a8c\u8bc1\u9519\u8bef\uff1a\u503c\u5c0f\u4e8e\u5141\u8bb8\u7684\u6700\u5c0f\u503c "{0}" -jakarta.faces.validator.DoubleRangeValidator.NOT_IN_RANGE={2}\uff1a\u9a8c\u8bc1\u9519\u8bef\uff1a\u6307\u5b9a\u7684\u5c5e\u6027\u4e0d\u5728\u9884\u671f\u503c {0} \u548c {1} \u4e4b\u95f4\u3002 -jakarta.faces.validator.DoubleRangeValidator.TYPE={0}\uff1a\u9a8c\u8bc1\u9519\u8bef\uff1a\u503c\u4e0d\u662f\u6b63\u786e\u7684\u7c7b\u578b -jakarta.faces.validator.LengthValidator.MAXIMUM={1}\uff1a\u9a8c\u8bc1\u9519\u8bef\uff1a\u957f\u5ea6\u5927\u4e8e\u5141\u8bb8\u7684\u6700\u5927\u503c "{0}" -jakarta.faces.validator.LengthValidator.MINIMUM={1}\uff1a\u9a8c\u8bc1\u9519\u8bef\uff1a\u957f\u5ea6\u5c0f\u4e8e\u5141\u8bb8\u7684\u6700\u5c0f\u503c "{0}" -jakarta.faces.validator.LongRangeValidator.MAXIMUM={1}\uff1a\u9a8c\u8bc1\u9519\u8bef\uff1a\u503c\u5927\u4e8e\u5141\u8bb8\u7684\u6700\u5927\u503c "{0}" -jakarta.faces.validator.LongRangeValidator.MINIMUM={1}\uff1a\u9a8c\u8bc1\u9519\u8bef\uff1a\u503c\u5c0f\u4e8e\u5141\u8bb8\u7684\u6700\u5c0f\u503c "{0}" -jakarta.faces.validator.LongRangeValidator.NOT_IN_RANGE={2}\uff1a\u9a8c\u8bc1\u9519\u8bef\uff1a\u6307\u5b9a\u7684\u5c5e\u6027\u4e0d\u5728\u9884\u671f\u503c {0} \u548c {1} \u4e4b\u95f4\u3002 -jakarta.faces.validator.LongRangeValidator.TYPE={0}\uff1a\u9a8c\u8bc1\u9519\u8bef\uff1a\u503c\u4e0d\u662f\u6b63\u786e\u7684\u7c7b\u578b\u3002 -jakarta.faces.validator.NOT_IN_RANGE=\u9a8c\u8bc1\u9519\u8bef\uff1a\u6307\u5b9a\u7684\u5c5e\u6027\u4e0d\u5728\u9884\u671f\u503c {0} \u548c {1} \u4e4b\u95f4\u3002 -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET=\u5fc5\u987b\u8bbe\u7f6e Regex \u6a21\u5f0f\u3002 -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET_detail=Regex \u6a21\u5f0f\u5fc5\u987b\u8bbe\u7f6e\u4e3a\u975e\u7a7a\u503c\u3002 -jakarta.faces.validator.RegexValidator.NOT_MATCHED=Regex \u6a21\u5f0f\u4e0d\u5339\u914d -jakarta.faces.validator.RegexValidator.NOT_MATCHED_detail="{0}" \u7684 Regex \u6a21\u5f0f\u4e0d\u5339\u914d -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION=\u6b63\u5219\u8868\u8fbe\u5f0f\u4e2d\u53d1\u751f\u9519\u8bef\u3002 -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION_detail=\u6b63\u5219\u8868\u8fbe\u5f0f\u4e2d\u53d1\u751f\u9519\u8bef\uff0c"{0}" -jakarta.faces.validator.BeanValidator.MESSAGE={0} diff --git a/impl/src/main/resources/jakarta/faces/Messages_zh_HK.properties b/impl/src/main/resources/jakarta/faces/Messages_zh_HK.properties deleted file mode 100644 index cb60aba990..0000000000 --- a/impl/src/main/resources/jakarta/faces/Messages_zh_HK.properties +++ /dev/null @@ -1,91 +0,0 @@ -# -# Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# ============================================================================== -# Component Errors -# ============================================================================== -jakarta.faces.component.UIInput.CONVERSION={0}\uff1a\u767c\u751f\u8f49\u63db\u932f\u8aa4\u3002 -jakarta.faces.component.UIInput.REQUIRED={0}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u5fc5\u9808\u6709\u503c\u3002 -jakarta.faces.component.UIInput.UPDATE={0}\uff1a\u8655\u7406\u60a8\u9001\u51fa\u7684\u8cc7\u8a0a\u6642\u767c\u751f\u932f\u8aa4\u3002 -jakarta.faces.component.UISelectOne.INVALID={0}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u503c\u7121\u6548 -jakarta.faces.component.UISelectMany.INVALID={0}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u503c\u7121\u6548 - -# ============================================================================== -# Converter Errors -# ============================================================================== -jakarta.faces.converter.BigDecimalConverter.DECIMAL={2}: ''{0}'' \u5fc5\u9808\u662f\u5e36\u6b63\u8ca0\u865f\u7684\u5341\u9032\u5236\u6578\u5b57\u3002 -jakarta.faces.converter.BigDecimalConverter.DECIMAL_detail={2}: ''{0}'' \u5fc5\u9808\u662f\u5e36\u6b63\u8ca0\u865f\u7684\u5341\u9032\u5236\u6578\u5b57\uff0c\u5305\u62ec\u96f6\u4f4d\u6216\u591a\u4f4d\u6578\uff0c\u53ef\u4ee5\u5f8c\u63a5\u5c0f\u6578\u9ede\u548c\u5206\u6578\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER={2}: ''{0}'' \u5fc5\u9808\u662f\u4e00\u4f4d\u6216\u591a\u4f4d\u6578\u3002 -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER_detail={2}: ''{0}'' \u5fc5\u9808\u662f\u4e00\u4f4d\u6216\u591a\u4f4d\u6578\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.BooleanConverter.BOOLEAN={1}: ''{0}'' \u5fc5\u9808\u662f\u300ctrue\u300d\u6216\u300cfalse\u300d\u3002 -jakarta.faces.converter.BooleanConverter.BOOLEAN_detail={1}: ''{0}'' \u5fc5\u9808\u662f\u300ctrue\u300d\u6216\u300cfalse\u300d\u3002\u300ctrue\u300d\u4e4b\u5916\u7684\u4efb\u4f55\u503c\u5747\u6703\u8996\u70ba\u300cfalse\u300d\u3002 -jakarta.faces.converter.ByteConverter.BYTE={2}: ''{0}'' \u5fc5\u9808\u662f\u4ecb\u65bc -128 \u5230 127 \u4e4b\u9593\u7684\u6578\u5b57\u3002 -jakarta.faces.converter.ByteConverter.BYTE_detail={2}: ''{0}'' \u5fc5\u9808\u662f\u4ecb\u65bc -128 \u5230 127 \u4e4b\u9593\u7684\u6578\u5b57\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.CharacterConverter.CHARACTER={1}: ''{0}'' \u5fc5\u9808\u662f\u6709\u6548\u5b57\u5143\u3002 -jakarta.faces.converter.CharacterConverter.CHARACTER_detail={1}: ''{0}'' \u5fc5\u9808\u662f\u6709\u6548\u7684 ASCII \u5b57\u5143\u3002 -jakarta.faces.converter.DateTimeConverter.DATE={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u65e5\u671f\u3002 -jakarta.faces.converter.DateTimeConverter.DATE_detail={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u65e5\u671f\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.DateTimeConverter.TIME={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u6642\u9593\u3002 -jakarta.faces.converter.DateTimeConverter.TIME_detail={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u6642\u9593\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.DateTimeConverter.DATETIME={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u65e5\u671f\u548c\u6642\u9593\u3002 -jakarta.faces.converter.DateTimeConverter.DATETIME_detail={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u65e5\u671f\u548c\u6642\u9593\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.DateTimeConverter.PATTERN_TYPE={1}\uff1a\u5fc5\u9808\u6307\u5b9a\u300cpattern\u300d\u6216\u300ctype\u300d\u5c6c\u6027\u624d\u80fd\u8f49\u63db\u503c ''{0}''\u3002 -jakarta.faces.converter.DoubleConverter.DOUBLE={2}: ''{0}'' \u5fc5\u9808\u662f\u4e00\u4f4d\u6216\u591a\u4f4d\u6578\u3002 -jakarta.faces.converter.DoubleConverter.DOUBLE_detail={2}: ''{0}'' \u5fc5\u9808\u662f\u4ecb\u65bc 4.9E-324 \u5230 1.7976931348623157E308 \u4e4b\u9593\u7684\u6578\u5b57\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.EnumConverter.ENUM={2}: ''{0}'' \u5fc5\u9808\u53ef\u8f49\u63db\u70ba enum\u3002 -jakarta.faces.converter.EnumConverter.ENUM_detail={2}: ''{0}'' \u5fc5\u9808\u53ef\u5f9e\u5305\u542b\u5e38\u6578\u300c{1}\u300d\u7684 enum \u8f49\u63db\u70ba enum\u3002 -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS={1}: ''{0}'' \u5fc5\u9808\u53ef\u5f9e enum \u8f49\u63db\u70ba enum\uff0c\u4f46\u662f\u672a\u63d0\u4f9b enum \u985e\u5225\u3002 -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS_detail={1}: ''{0}'' \u5fc5\u9808\u53ef\u5f9e enum \u8f49\u63db\u70ba enum\uff0c\u4f46\u662f\u672a\u63d0\u4f9b enum \u985e\u5225\u3002 -jakarta.faces.converter.FloatConverter.FLOAT={2}: ''{0}'' \u5fc5\u9808\u662f\u4e00\u4f4d\u6216\u591a\u4f4d\u6578\u3002 -jakarta.faces.converter.FloatConverter.FLOAT_detail={2}: ''{0}'' \u5fc5\u9808\u662f\u4ecb\u65bc 1.4E-45 \u5230 3.4028235E38 \u4e4b\u9593\u7684\u6578\u5b57\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.IntegerConverter.INTEGER={2}: ''{0}'' \u5fc5\u9808\u662f\u4e00\u4f4d\u6216\u591a\u4f4d\u6578\u3002 -jakarta.faces.converter.IntegerConverter.INTEGER_detail={2}: ''{0}'' \u5fc5\u9808\u662f\u4ecb\u65bc -2147483648 \u5230 2147483647 \u4e4b\u9593\u7684\u6578\u5b57\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.LongConverter.LONG={2}: ''{0}'' \u5fc5\u9808\u662f\u4e00\u4f4d\u6216\u591a\u4f4d\u6578\u3002 -jakarta.faces.converter.LongConverter.LONG_detail={2}: ''{0}'' \u5fc5\u9808\u662f\u4ecb\u65bc -9223372036854775808 \u5230 9223372036854775807 \u4e4b\u9593\u7684\u6578\u5b57\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.NumberConverter.CURRENCY={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u8ca8\u5e63\u503c\u3002 -jakarta.faces.converter.NumberConverter.CURRENCY_detail={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u8ca8\u5e63\u503c\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.NumberConverter.PERCENT={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u767e\u5206\u6bd4\u3002 -jakarta.faces.converter.NumberConverter.PERCENT_detail={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u767e\u5206\u6bd4\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.NumberConverter.NUMBER={2}: ''{0}'' \u4e0d\u662f\u6578\u5b57\u3002 -jakarta.faces.converter.NumberConverter.NUMBER_detail={2}: ''{0}'' \u4e0d\u662f\u6578\u5b57\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.NumberConverter.PATTERN={2}: ''{0}'' \u4e0d\u662f\u6578\u5b57\u6a23\u5f0f\u3002 -jakarta.faces.converter.NumberConverter.PATTERN_detail={2}: ''{0}'' \u4e0d\u662f\u6578\u5b57\u6a23\u5f0f\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.ShortConverter.SHORT={2}: ''{0}'' \u5fc5\u9808\u662f\u4e00\u4f4d\u6216\u591a\u4f4d\u6578\u3002 -jakarta.faces.converter.ShortConverter.SHORT_detail={2}: ''{0}'' \u5fc5\u9808\u662f\u4ecb\u65bc -32768 \u5230 32767 \u4e4b\u9593\u7684\u6578\u5b57\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.STRING={1}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u8f49\u63db\u70ba\u5b57\u4e32\u3002 - - -# ============================================================================== -# Validator Errors -# ============================================================================== -jakarta.faces.validator.DoubleRangeValidator.MAXIMUM={1}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u503c\u5927\u65bc\u5141\u8a31\u7684\u6700\u5927\u503c ''{0}'' -jakarta.faces.validator.DoubleRangeValidator.MINIMUM={1}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u503c\u5c0f\u65bc\u5141\u8a31\u7684\u6700\u5c0f\u503c ''{0}'' -jakarta.faces.validator.DoubleRangeValidator.NOT_IN_RANGE={2}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u6307\u5b9a\u7684\u5c6c\u6027\u4e0d\u5728\u9810\u671f\u503c {0} \u548c {1} \u4e4b\u9593\u3002 -jakarta.faces.validator.DoubleRangeValidator.TYPE={0}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u503c\u4e0d\u5c6c\u65bc\u6b63\u78ba\u7684\u985e\u578b -jakarta.faces.validator.LengthValidator.MAXIMUM={1}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u9577\u5ea6\u5927\u65bc\u5141\u8a31\u7684\u6700\u5927\u503c ''{0}'' -jakarta.faces.validator.LengthValidator.MINIMUM={1}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u9577\u5ea6\u5c0f\u65bc\u5141\u8a31\u7684\u6700\u5c0f\u503c ''{0}'' -jakarta.faces.validator.LongRangeValidator.MAXIMUM={1}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u503c\u5927\u65bc\u5141\u8a31\u7684\u6700\u5927\u503c ''{0}'' -jakarta.faces.validator.LongRangeValidator.MINIMUM={1}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u503c\u5c0f\u65bc\u5141\u8a31\u7684\u6700\u5c0f\u503c ''{0}'' -jakarta.faces.validator.LongRangeValidator.NOT_IN_RANGE={2}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u6307\u5b9a\u7684\u5c6c\u6027\u4e0d\u5728\u9810\u671f\u503c {0} \u548c {1} \u4e4b\u9593\u3002 -jakarta.faces.validator.LongRangeValidator.TYPE={0}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u503c\u4e0d\u5c6c\u65bc\u6b63\u78ba\u7684\u985e\u578b\u3002 -jakarta.faces.validator.NOT_IN_RANGE=\u9a57\u8b49\u932f\u8aa4\uff1a\u6307\u5b9a\u7684\u5c6c\u6027\u4e0d\u5728\u9810\u671f\u503c {0} \u548c {1} \u4e4b\u9593\u3002 -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET=\u5fc5\u9808\u8a2d\u5b9a\u5e38\u898f\u8868\u793a\u5f0f\u6a21\u5f0f\u3002 -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET_detail=\u5fc5\u9808\u5c07\u5e38\u898f\u8868\u793a\u5f0f\u6a21\u5f0f\u8a2d\u70ba\u975e\u7a7a\u767d\u503c\u3002 -jakarta.faces.validator.RegexValidator.NOT_MATCHED=\u4e0d\u7b26\u5e38\u898f\u8868\u793a\u5f0f\u6a21\u5f0f -jakarta.faces.validator.RegexValidator.NOT_MATCHED_detail=\u4e0d\u7b26 ''{0}'' \u5e38\u898f\u8868\u793a\u5f0f\u6a21\u5f0f -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION=\u5e38\u898f\u8868\u793a\u5f0f\u767c\u751f\u932f\u8aa4\u3002 -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION_detail=\u5e38\u898f\u8868\u793a\u5f0f\u767c\u751f\u932f\u8aa4\uff0c''{0}'' -jakarta.faces.validator.BeanValidator.MESSAGE={0} diff --git a/impl/src/main/resources/jakarta/faces/Messages_zh_TW.properties b/impl/src/main/resources/jakarta/faces/Messages_zh_TW.properties deleted file mode 100644 index cb60aba990..0000000000 --- a/impl/src/main/resources/jakarta/faces/Messages_zh_TW.properties +++ /dev/null @@ -1,91 +0,0 @@ -# -# Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# ============================================================================== -# Component Errors -# ============================================================================== -jakarta.faces.component.UIInput.CONVERSION={0}\uff1a\u767c\u751f\u8f49\u63db\u932f\u8aa4\u3002 -jakarta.faces.component.UIInput.REQUIRED={0}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u5fc5\u9808\u6709\u503c\u3002 -jakarta.faces.component.UIInput.UPDATE={0}\uff1a\u8655\u7406\u60a8\u9001\u51fa\u7684\u8cc7\u8a0a\u6642\u767c\u751f\u932f\u8aa4\u3002 -jakarta.faces.component.UISelectOne.INVALID={0}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u503c\u7121\u6548 -jakarta.faces.component.UISelectMany.INVALID={0}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u503c\u7121\u6548 - -# ============================================================================== -# Converter Errors -# ============================================================================== -jakarta.faces.converter.BigDecimalConverter.DECIMAL={2}: ''{0}'' \u5fc5\u9808\u662f\u5e36\u6b63\u8ca0\u865f\u7684\u5341\u9032\u5236\u6578\u5b57\u3002 -jakarta.faces.converter.BigDecimalConverter.DECIMAL_detail={2}: ''{0}'' \u5fc5\u9808\u662f\u5e36\u6b63\u8ca0\u865f\u7684\u5341\u9032\u5236\u6578\u5b57\uff0c\u5305\u62ec\u96f6\u4f4d\u6216\u591a\u4f4d\u6578\uff0c\u53ef\u4ee5\u5f8c\u63a5\u5c0f\u6578\u9ede\u548c\u5206\u6578\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER={2}: ''{0}'' \u5fc5\u9808\u662f\u4e00\u4f4d\u6216\u591a\u4f4d\u6578\u3002 -jakarta.faces.converter.BigIntegerConverter.BIGINTEGER_detail={2}: ''{0}'' \u5fc5\u9808\u662f\u4e00\u4f4d\u6216\u591a\u4f4d\u6578\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.BooleanConverter.BOOLEAN={1}: ''{0}'' \u5fc5\u9808\u662f\u300ctrue\u300d\u6216\u300cfalse\u300d\u3002 -jakarta.faces.converter.BooleanConverter.BOOLEAN_detail={1}: ''{0}'' \u5fc5\u9808\u662f\u300ctrue\u300d\u6216\u300cfalse\u300d\u3002\u300ctrue\u300d\u4e4b\u5916\u7684\u4efb\u4f55\u503c\u5747\u6703\u8996\u70ba\u300cfalse\u300d\u3002 -jakarta.faces.converter.ByteConverter.BYTE={2}: ''{0}'' \u5fc5\u9808\u662f\u4ecb\u65bc -128 \u5230 127 \u4e4b\u9593\u7684\u6578\u5b57\u3002 -jakarta.faces.converter.ByteConverter.BYTE_detail={2}: ''{0}'' \u5fc5\u9808\u662f\u4ecb\u65bc -128 \u5230 127 \u4e4b\u9593\u7684\u6578\u5b57\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.CharacterConverter.CHARACTER={1}: ''{0}'' \u5fc5\u9808\u662f\u6709\u6548\u5b57\u5143\u3002 -jakarta.faces.converter.CharacterConverter.CHARACTER_detail={1}: ''{0}'' \u5fc5\u9808\u662f\u6709\u6548\u7684 ASCII \u5b57\u5143\u3002 -jakarta.faces.converter.DateTimeConverter.DATE={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u65e5\u671f\u3002 -jakarta.faces.converter.DateTimeConverter.DATE_detail={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u65e5\u671f\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.DateTimeConverter.TIME={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u6642\u9593\u3002 -jakarta.faces.converter.DateTimeConverter.TIME_detail={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u6642\u9593\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.DateTimeConverter.DATETIME={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u65e5\u671f\u548c\u6642\u9593\u3002 -jakarta.faces.converter.DateTimeConverter.DATETIME_detail={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u65e5\u671f\u548c\u6642\u9593\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.DateTimeConverter.PATTERN_TYPE={1}\uff1a\u5fc5\u9808\u6307\u5b9a\u300cpattern\u300d\u6216\u300ctype\u300d\u5c6c\u6027\u624d\u80fd\u8f49\u63db\u503c ''{0}''\u3002 -jakarta.faces.converter.DoubleConverter.DOUBLE={2}: ''{0}'' \u5fc5\u9808\u662f\u4e00\u4f4d\u6216\u591a\u4f4d\u6578\u3002 -jakarta.faces.converter.DoubleConverter.DOUBLE_detail={2}: ''{0}'' \u5fc5\u9808\u662f\u4ecb\u65bc 4.9E-324 \u5230 1.7976931348623157E308 \u4e4b\u9593\u7684\u6578\u5b57\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.EnumConverter.ENUM={2}: ''{0}'' \u5fc5\u9808\u53ef\u8f49\u63db\u70ba enum\u3002 -jakarta.faces.converter.EnumConverter.ENUM_detail={2}: ''{0}'' \u5fc5\u9808\u53ef\u5f9e\u5305\u542b\u5e38\u6578\u300c{1}\u300d\u7684 enum \u8f49\u63db\u70ba enum\u3002 -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS={1}: ''{0}'' \u5fc5\u9808\u53ef\u5f9e enum \u8f49\u63db\u70ba enum\uff0c\u4f46\u662f\u672a\u63d0\u4f9b enum \u985e\u5225\u3002 -jakarta.faces.converter.EnumConverter.ENUM_NO_CLASS_detail={1}: ''{0}'' \u5fc5\u9808\u53ef\u5f9e enum \u8f49\u63db\u70ba enum\uff0c\u4f46\u662f\u672a\u63d0\u4f9b enum \u985e\u5225\u3002 -jakarta.faces.converter.FloatConverter.FLOAT={2}: ''{0}'' \u5fc5\u9808\u662f\u4e00\u4f4d\u6216\u591a\u4f4d\u6578\u3002 -jakarta.faces.converter.FloatConverter.FLOAT_detail={2}: ''{0}'' \u5fc5\u9808\u662f\u4ecb\u65bc 1.4E-45 \u5230 3.4028235E38 \u4e4b\u9593\u7684\u6578\u5b57\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.IntegerConverter.INTEGER={2}: ''{0}'' \u5fc5\u9808\u662f\u4e00\u4f4d\u6216\u591a\u4f4d\u6578\u3002 -jakarta.faces.converter.IntegerConverter.INTEGER_detail={2}: ''{0}'' \u5fc5\u9808\u662f\u4ecb\u65bc -2147483648 \u5230 2147483647 \u4e4b\u9593\u7684\u6578\u5b57\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.LongConverter.LONG={2}: ''{0}'' \u5fc5\u9808\u662f\u4e00\u4f4d\u6216\u591a\u4f4d\u6578\u3002 -jakarta.faces.converter.LongConverter.LONG_detail={2}: ''{0}'' \u5fc5\u9808\u662f\u4ecb\u65bc -9223372036854775808 \u5230 9223372036854775807 \u4e4b\u9593\u7684\u6578\u5b57\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.NumberConverter.CURRENCY={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u8ca8\u5e63\u503c\u3002 -jakarta.faces.converter.NumberConverter.CURRENCY_detail={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u8ca8\u5e63\u503c\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.NumberConverter.PERCENT={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u767e\u5206\u6bd4\u3002 -jakarta.faces.converter.NumberConverter.PERCENT_detail={2}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u89e3\u8b80\u70ba\u767e\u5206\u6bd4\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.NumberConverter.NUMBER={2}: ''{0}'' \u4e0d\u662f\u6578\u5b57\u3002 -jakarta.faces.converter.NumberConverter.NUMBER_detail={2}: ''{0}'' \u4e0d\u662f\u6578\u5b57\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.NumberConverter.PATTERN={2}: ''{0}'' \u4e0d\u662f\u6578\u5b57\u6a23\u5f0f\u3002 -jakarta.faces.converter.NumberConverter.PATTERN_detail={2}: ''{0}'' \u4e0d\u662f\u6578\u5b57\u6a23\u5f0f\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.ShortConverter.SHORT={2}: ''{0}'' \u5fc5\u9808\u662f\u4e00\u4f4d\u6216\u591a\u4f4d\u6578\u3002 -jakarta.faces.converter.ShortConverter.SHORT_detail={2}: ''{0}'' \u5fc5\u9808\u662f\u4ecb\u65bc -32768 \u5230 32767 \u4e4b\u9593\u7684\u6578\u5b57\u3002\u7bc4\u4f8b: {1} -jakarta.faces.converter.STRING={1}\uff1a\u7121\u6cd5\u5c07 ''{0}'' \u8f49\u63db\u70ba\u5b57\u4e32\u3002 - - -# ============================================================================== -# Validator Errors -# ============================================================================== -jakarta.faces.validator.DoubleRangeValidator.MAXIMUM={1}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u503c\u5927\u65bc\u5141\u8a31\u7684\u6700\u5927\u503c ''{0}'' -jakarta.faces.validator.DoubleRangeValidator.MINIMUM={1}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u503c\u5c0f\u65bc\u5141\u8a31\u7684\u6700\u5c0f\u503c ''{0}'' -jakarta.faces.validator.DoubleRangeValidator.NOT_IN_RANGE={2}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u6307\u5b9a\u7684\u5c6c\u6027\u4e0d\u5728\u9810\u671f\u503c {0} \u548c {1} \u4e4b\u9593\u3002 -jakarta.faces.validator.DoubleRangeValidator.TYPE={0}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u503c\u4e0d\u5c6c\u65bc\u6b63\u78ba\u7684\u985e\u578b -jakarta.faces.validator.LengthValidator.MAXIMUM={1}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u9577\u5ea6\u5927\u65bc\u5141\u8a31\u7684\u6700\u5927\u503c ''{0}'' -jakarta.faces.validator.LengthValidator.MINIMUM={1}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u9577\u5ea6\u5c0f\u65bc\u5141\u8a31\u7684\u6700\u5c0f\u503c ''{0}'' -jakarta.faces.validator.LongRangeValidator.MAXIMUM={1}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u503c\u5927\u65bc\u5141\u8a31\u7684\u6700\u5927\u503c ''{0}'' -jakarta.faces.validator.LongRangeValidator.MINIMUM={1}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u503c\u5c0f\u65bc\u5141\u8a31\u7684\u6700\u5c0f\u503c ''{0}'' -jakarta.faces.validator.LongRangeValidator.NOT_IN_RANGE={2}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u6307\u5b9a\u7684\u5c6c\u6027\u4e0d\u5728\u9810\u671f\u503c {0} \u548c {1} \u4e4b\u9593\u3002 -jakarta.faces.validator.LongRangeValidator.TYPE={0}\uff1a\u9a57\u8b49\u932f\u8aa4\uff1a\u503c\u4e0d\u5c6c\u65bc\u6b63\u78ba\u7684\u985e\u578b\u3002 -jakarta.faces.validator.NOT_IN_RANGE=\u9a57\u8b49\u932f\u8aa4\uff1a\u6307\u5b9a\u7684\u5c6c\u6027\u4e0d\u5728\u9810\u671f\u503c {0} \u548c {1} \u4e4b\u9593\u3002 -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET=\u5fc5\u9808\u8a2d\u5b9a\u5e38\u898f\u8868\u793a\u5f0f\u6a21\u5f0f\u3002 -jakarta.faces.validator.RegexValidator.PATTERN_NOT_SET_detail=\u5fc5\u9808\u5c07\u5e38\u898f\u8868\u793a\u5f0f\u6a21\u5f0f\u8a2d\u70ba\u975e\u7a7a\u767d\u503c\u3002 -jakarta.faces.validator.RegexValidator.NOT_MATCHED=\u4e0d\u7b26\u5e38\u898f\u8868\u793a\u5f0f\u6a21\u5f0f -jakarta.faces.validator.RegexValidator.NOT_MATCHED_detail=\u4e0d\u7b26 ''{0}'' \u5e38\u898f\u8868\u793a\u5f0f\u6a21\u5f0f -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION=\u5e38\u898f\u8868\u793a\u5f0f\u767c\u751f\u932f\u8aa4\u3002 -jakarta.faces.validator.RegexValidator.MATCH_EXCEPTION_detail=\u5e38\u898f\u8868\u793a\u5f0f\u767c\u751f\u932f\u8aa4\uff0c''{0}'' -jakarta.faces.validator.BeanValidator.MESSAGE={0} diff --git a/impl/src/test/java/com/sun/faces/application/FacesMessageTest.java b/impl/src/test/java/com/sun/faces/application/FacesMessageTest.java index fe3a2f9c73..8ef9baef1d 100644 --- a/impl/src/test/java/com/sun/faces/application/FacesMessageTest.java +++ b/impl/src/test/java/com/sun/faces/application/FacesMessageTest.java @@ -69,7 +69,6 @@ private void persistAndCheck(FacesMessage message) { String mDetail, mDetail1 = null; String severity, severity1 = null; ByteArrayOutputStream bos = null; - ByteArrayInputStream bis = null; mSummary = message.getSummary(); mDetail = message.getDetail(); diff --git a/impl/src/test/java/com/sun/faces/config/DigesterFactory.java b/impl/src/test/java/com/sun/faces/config/DigesterFactory.java index 244fa13480..82b7402e4b 100644 --- a/impl/src/test/java/com/sun/faces/config/DigesterFactory.java +++ b/impl/src/test/java/com/sun/faces/config/DigesterFactory.java @@ -91,9 +91,9 @@ public class DigesterFactory { * The ThreadLocal variable used to record the VersionListener * instance for each processing thread.

      */ - private static ThreadLocal versionListener = new ThreadLocal() { + private static ThreadLocal versionListener = new ThreadLocal<>() { @Override - protected Object initialValue() { + protected VersionListener initialValue() { return (null); } }; @@ -168,7 +168,7 @@ public static DigesterFactory newInstance(boolean isValidating, } // END newInstance public static VersionListener getVersionListener() { - return ((VersionListener) versionListener.get()); + return (versionListener.get()); } public static void releaseDigester(Digester toRelease) { @@ -203,7 +203,7 @@ public interface VersionListener { * Called from the EntityResolver when we know one of the XML Grammar * elements to which this config file conforms.

      * @param grammar */ - public void takeActionOnGrammar(String grammar); + void takeActionOnGrammar(String grammar); /** *

      @@ -212,7 +212,7 @@ public interface VersionListener { * parsed.

      * @param artifactName */ - public void takeActionOnArtifact(String artifactName); + void takeActionOnArtifact(String artifactName); } // --------------------------------------------------------- Private Methods @@ -340,7 +340,7 @@ private static class JsfEntityResolver extends DefaultHandler { * Contains mapping between grammar name and the local URL to the * physical resource.

      */ - private HashMap entities = new HashMap(); + private HashMap entities = new HashMap<>(); // -------------------------------------------------------- Constructors public JsfEntityResolver() { diff --git a/impl/src/test/java/com/sun/faces/context/ExternalContextImplTest.java b/impl/src/test/java/com/sun/faces/context/ExternalContextImplTest.java index c532c1f1ae..e58f288399 100644 --- a/impl/src/test/java/com/sun/faces/context/ExternalContextImplTest.java +++ b/impl/src/test/java/com/sun/faces/context/ExternalContextImplTest.java @@ -123,13 +123,6 @@ public void testGetRequestCookieMap3() { assertTrue(e instanceof UnsupportedOperationException); } - try { - requestCookieMap.entrySet().remove("test"); - fail(); - } catch (Exception e) { - assertTrue(e instanceof UnsupportedOperationException); - } - try { requestCookieMap.keySet().remove("test"); fail(); diff --git a/impl/src/test/java/com/sun/faces/el/ELUtilsTest.java b/impl/src/test/java/com/sun/faces/el/ELUtilsTest.java index 8bd05397e0..96993245f0 100644 --- a/impl/src/test/java/com/sun/faces/el/ELUtilsTest.java +++ b/impl/src/test/java/com/sun/faces/el/ELUtilsTest.java @@ -12,14 +12,14 @@ import com.sun.faces.context.ExternalContextImpl; import com.sun.faces.context.FacesContextImpl; import com.sun.faces.lifecycle.LifecycleImpl; -import com.sun.faces.mock.MockBeanManager; +import com.sun.faces.mock.MockCDIProvider; import com.sun.faces.mock.MockHttpServletRequest; import com.sun.faces.mock.MockHttpServletResponse; import com.sun.faces.mock.MockServletContext; import jakarta.el.ELResolver; +import jakarta.enterprise.inject.spi.CDI; import jakarta.faces.FactoryFinder; -import jakarta.faces.context.FacesContext; public class ELUtilsTest { @@ -27,6 +27,8 @@ public class ELUtilsTest { @BeforeEach public void setUp() { + CDI.setCDIProvider(new MockCDIProvider()); + MockServletContext mockServletContext = new MockServletContext() { @Override public URL getResource(String path) { @@ -50,8 +52,6 @@ public URL getResource(String path) { applicationAssociate = (ApplicationAssociate) externalContext.getApplicationMap() .get(RIConstants.FACES_PREFIX + "ApplicationAssociate"); - - FacesContext.getCurrentInstance().getAttributes().put(RIConstants.CDI_BEAN_MANAGER, new MockBeanManager()); } @Test diff --git a/impl/src/test/java/com/sun/faces/junit/JUnitFacesTestCaseBase.java b/impl/src/test/java/com/sun/faces/junit/JUnitFacesTestCaseBase.java index ccf81930fd..24d58b0299 100644 --- a/impl/src/test/java/com/sun/faces/junit/JUnitFacesTestCaseBase.java +++ b/impl/src/test/java/com/sun/faces/junit/JUnitFacesTestCaseBase.java @@ -20,10 +20,17 @@ import java.util.HashMap; import java.util.Map; +import jakarta.enterprise.inject.spi.CDI; +import jakarta.faces.FactoryFinder; +import jakarta.faces.application.ApplicationFactory; +import jakarta.faces.context.FacesContextFactory; +import jakarta.faces.lifecycle.LifecycleFactory; + import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import com.sun.faces.mock.MockApplication; +import com.sun.faces.mock.MockCDIProvider; import com.sun.faces.mock.MockExternalContext; import com.sun.faces.mock.MockFacesContext; import com.sun.faces.mock.MockHttpServletRequest; @@ -33,11 +40,6 @@ import com.sun.faces.mock.MockServletConfig; import com.sun.faces.mock.MockServletContext; -import jakarta.faces.FactoryFinder; -import jakarta.faces.application.ApplicationFactory; -import jakarta.faces.context.FacesContextFactory; -import jakarta.faces.lifecycle.LifecycleFactory; - public class JUnitFacesTestCaseBase { protected MockApplication application = null; @@ -52,6 +54,9 @@ public class JUnitFacesTestCaseBase { @BeforeEach public void setUp() throws Exception { + // Set up CDI + CDI.setCDIProvider(new MockCDIProvider()); + // Set up Servlet API Objects servletContext = new MockServletContext(); servletContext.addInitParameter("appParamName", "appParamValue"); @@ -73,6 +78,8 @@ public void setUp() throws Exception { new MockFacesContext(new MockExternalContext(servletContext, request, response), new MockLifecycle()); + FactoryFinder.setFactory(FactoryFinder.FACES_SERVLET_FACTORY, + "com.sun.faces.mock.MockFacesServletFactory"); FactoryFinder.setFactory(FactoryFinder.FACES_CONTEXT_FACTORY, "com.sun.faces.mock.MockFacesContextFactory"); FactoryFinder.setFactory(FactoryFinder.LIFECYCLE_FACTORY, @@ -86,7 +93,7 @@ public void setUp() throws Exception { lifecycle = (MockLifecycle) lFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE); facesContext = (MockFacesContext) fcFactory.getFacesContext(servletContext, request, response, lifecycle); externalContext = (MockExternalContext) facesContext.getExternalContext(); - Map map = new HashMap(); + Map map = new HashMap<>(); externalContext.setRequestParameterMap(map); ApplicationFactory applicationFactory = (ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY); diff --git a/impl/src/test/java/com/sun/faces/mock/MockBeanManager.java b/impl/src/test/java/com/sun/faces/mock/MockBeanManager.java index 6eda0eb22c..73e6d796ee 100644 --- a/impl/src/test/java/com/sun/faces/mock/MockBeanManager.java +++ b/impl/src/test/java/com/sun/faces/mock/MockBeanManager.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023, 2024 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -16,8 +17,11 @@ package com.sun.faces.mock; +import static java.util.Collections.emptySet; + import java.lang.annotation.Annotation; import java.lang.reflect.Type; +import java.util.Collection; import java.util.List; import java.util.Set; @@ -45,15 +49,16 @@ import jakarta.enterprise.inject.spi.Interceptor; import jakarta.enterprise.inject.spi.ObserverMethod; import jakarta.enterprise.inject.spi.ProducerFactory; +import jakarta.enterprise.inject.spi.el.ELAwareBeanManager; -public class MockBeanManager implements BeanManager { +public class MockBeanManager implements BeanManager, ELAwareBeanManager { private ELResolver elResolver; - + public MockBeanManager() { this.elResolver = new MockELResolver(); } - + @Override public Object getReference(Bean bean, Type beanType, CreationalContext ctx) { return null; @@ -71,12 +76,12 @@ public CreationalContext createCreationalContext(Contextual contextual @Override public Set> getBeans(Type beanType, Annotation... qualifiers) { - return null; + return emptySet(); } @Override public Set> getBeans(String name) { - return null; + return emptySet(); } @Override @@ -136,7 +141,7 @@ public Bean getPassivationCapableBean(String id) { @Override public void validate(InjectionPoint injectionPoint) { - + } @Override @@ -156,12 +161,12 @@ public boolean isPassivatingScope(Class annotationType) { @Override public Set getInterceptorBindingDefinition(Class bindingType) { - return null; + return emptySet(); } @Override public Set getStereotypeDefinition(Class stereotype) { - return null; + return emptySet(); } @Override @@ -256,4 +261,19 @@ public InterceptionFactory createInterceptionFactory(CreationalContext return null; } + @Override + public Collection getContexts(Class scopeType) { + return null; + } + + @Override + public boolean isMatchingBean(Set beanTypes, Set beanQualifiers, Type requiredType, Set requiredQualifiers) { + return false; + } + + @Override + public boolean isMatchingEvent(Type specifiedType, Set specifiedQualifiers, Type observedEventType, Set observedEventQualifiers) { + return false; + } + } diff --git a/impl/src/test/java/com/sun/faces/mock/MockCDI.java b/impl/src/test/java/com/sun/faces/mock/MockCDI.java new file mode 100644 index 0000000000..4f6867cde5 --- /dev/null +++ b/impl/src/test/java/com/sun/faces/mock/MockCDI.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.faces.mock; + +import java.lang.annotation.Annotation; +import java.util.Iterator; + +import jakarta.enterprise.inject.Instance; +import jakarta.enterprise.inject.spi.BeanManager; +import jakarta.enterprise.inject.spi.CDI; +import jakarta.enterprise.util.TypeLiteral; + +public class MockCDI extends CDI { + + @Override + public BeanManager getBeanManager() { + return new MockBeanManager(); + } + + @Override + public Instance select(Annotation... qualifiers) { + throw new UnsupportedOperationException(); + } + + @Override + public Instance select(Class subtype, Annotation... qualifiers) { + throw new UnsupportedOperationException(); + } + + @Override + public Instance select(TypeLiteral subtype, Annotation... qualifiers) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean isUnsatisfied() { + throw new UnsupportedOperationException(); + } + + @Override + public boolean isAmbiguous() { + throw new UnsupportedOperationException(); + } + + @Override + public void destroy(T instance) { + throw new UnsupportedOperationException(); + } + + @Override + public Handle getHandle() { + throw new UnsupportedOperationException(); + } + + @Override + public Iterable> handles() { + throw new UnsupportedOperationException(); + } + + @Override + public Iterator iterator() { + throw new UnsupportedOperationException(); + } + + @Override + public T get() { + throw new UnsupportedOperationException(); + } +} diff --git a/impl/src/test/java/com/sun/faces/mock/MockCDIProvider.java b/impl/src/test/java/com/sun/faces/mock/MockCDIProvider.java new file mode 100644 index 0000000000..79c7ff1c7f --- /dev/null +++ b/impl/src/test/java/com/sun/faces/mock/MockCDIProvider.java @@ -0,0 +1,13 @@ +package com.sun.faces.mock; + +import jakarta.enterprise.inject.spi.CDI; +import jakarta.enterprise.inject.spi.CDIProvider; + +public class MockCDIProvider implements CDIProvider { + + @Override + public CDI getCDI() { + return new MockCDI(); + } + +} diff --git a/impl/src/test/java/com/sun/faces/mock/MockELResolver.java b/impl/src/test/java/com/sun/faces/mock/MockELResolver.java index 944153aa4e..1df3cc5065 100644 --- a/impl/src/test/java/com/sun/faces/mock/MockELResolver.java +++ b/impl/src/test/java/com/sun/faces/mock/MockELResolver.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -150,11 +151,6 @@ public boolean isReadOnly(ELContext context, Object base, Object property) throw return result; } - @Override - public Iterator getFeatureDescriptors(ELContext context, Object base) { - return null; - } - @Override public Class getCommonPropertyType(ELContext context, Object base) { return null; diff --git a/impl/src/test/java/com/sun/faces/mock/MockFacesContext.java b/impl/src/test/java/com/sun/faces/mock/MockFacesContext.java index 8d1893d42a..d4f0e3318e 100644 --- a/impl/src/test/java/com/sun/faces/mock/MockFacesContext.java +++ b/impl/src/test/java/com/sun/faces/mock/MockFacesContext.java @@ -24,6 +24,7 @@ import java.util.Locale; import java.util.Map; +import com.sun.faces.RIConstants; import com.sun.faces.context.ExceptionHandlerFactoryImpl; import com.sun.faces.renderkit.RenderKitUtils; @@ -62,6 +63,7 @@ public class MockFacesContext extends FacesContext { public MockFacesContext() { super(); setCurrentInstance(this); + getAttributes().put(RIConstants.CDI_BEAN_MANAGER, new MockBeanManager()); } public MockFacesContext(ExternalContext externalContext) { diff --git a/impl/src/test/java/com/sun/faces/mock/MockFacesServletFactory.java b/impl/src/test/java/com/sun/faces/mock/MockFacesServletFactory.java new file mode 100644 index 0000000000..7824d4fe90 --- /dev/null +++ b/impl/src/test/java/com/sun/faces/mock/MockFacesServletFactory.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.faces.mock; + +import jakarta.faces.FactoryFinder; +import jakarta.faces.webapp.FacesServletFactory; +import jakarta.servlet.Servlet; +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletException; + +import com.sun.faces.webapp.FacesServletImpl; + +public class MockFacesServletFactory extends FacesServletFactory { + public MockFacesServletFactory() { + System.setProperty(FactoryFinder.FACES_SERVLET_FACTORY, this.getClass().getName()); + } + + @Override + public Servlet getFacesServlet(ServletConfig config) { + Servlet facesServlet = new FacesServletImpl(); + try { + facesServlet.init(config); + } catch (ServletException e) { + throw new IllegalStateException(e); + } + return facesServlet; + } + + @Override + public FacesServletFactory getWrapped() { + return null; + } +} diff --git a/impl/src/test/java/com/sun/faces/mock/MockHttpServletRequest.java b/impl/src/test/java/com/sun/faces/mock/MockHttpServletRequest.java index 89fceed2ac..c55709f601 100644 --- a/impl/src/test/java/com/sun/faces/mock/MockHttpServletRequest.java +++ b/impl/src/test/java/com/sun/faces/mock/MockHttpServletRequest.java @@ -196,7 +196,7 @@ public String getRequestedSessionId() { @Override public String getRequestURI() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if (contextPath != null) { sb.append(contextPath); } @@ -330,7 +330,7 @@ public Enumeration getLocales() { @Override public String getParameter(String name) { - String values[] = parameters.get(name); + String[] values = parameters.get(name); if (values != null) { return (values[0]); } else { diff --git a/impl/src/test/java/com/sun/faces/mock/MockHttpServletResponse.java b/impl/src/test/java/com/sun/faces/mock/MockHttpServletResponse.java index 00a15e8c89..2ac78cbbfc 100644 --- a/impl/src/test/java/com/sun/faces/mock/MockHttpServletResponse.java +++ b/impl/src/test/java/com/sun/faces/mock/MockHttpServletResponse.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -203,4 +204,9 @@ public Collection getHeaderNames() { public void setContentLengthLong(long len) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } + + @Override + public void sendRedirect(String location, int sc, boolean clearBuffer) throws IOException { + throw new UnsupportedOperationException("Not supported yet."); + } } diff --git a/impl/src/test/java/com/sun/faces/mock/MockResultSetMetaData.java b/impl/src/test/java/com/sun/faces/mock/MockResultSetMetaData.java index cfad0ee596..01c59e16db 100644 --- a/impl/src/test/java/com/sun/faces/mock/MockResultSetMetaData.java +++ b/impl/src/test/java/com/sun/faces/mock/MockResultSetMetaData.java @@ -36,7 +36,7 @@ public class MockResultSetMetaData implements ResultSetMetaData { * * @param clazz Class whose properties we treat like columns */ - public MockResultSetMetaData(Class clazz) throws SQLException { + public MockResultSetMetaData(Class clazz) throws SQLException { try { descriptors = Introspector.getBeanInfo(clazz).getPropertyDescriptors(); diff --git a/impl/src/test/java/com/sun/faces/mock/MockServletConfig.java b/impl/src/test/java/com/sun/faces/mock/MockServletConfig.java index e838cee073..d4cdd5bd21 100644 --- a/impl/src/test/java/com/sun/faces/mock/MockServletConfig.java +++ b/impl/src/test/java/com/sun/faces/mock/MockServletConfig.java @@ -32,7 +32,7 @@ public MockServletConfig(ServletContext context) { setServletContext(context); } - private Hashtable parameters = new Hashtable(); + private Hashtable parameters = new Hashtable<>(); private ServletContext context; // --------------------------------------------------------- Public Methods @@ -47,11 +47,11 @@ public void setServletContext(ServletContext context) { // -------------------------------------------------- ServletConfig Methods @Override public String getInitParameter(String name) { - return ((String) parameters.get(name)); + return (parameters.get(name)); } @Override - public Enumeration getInitParameterNames() { + public Enumeration getInitParameterNames() { return (parameters.keys()); } diff --git a/impl/src/test/java/com/sun/faces/renderkit/html_basic/BodyRendererTest.java b/impl/src/test/java/com/sun/faces/renderkit/html_basic/BodyRendererTest.java index bf156463db..5d88c84add 100644 --- a/impl/src/test/java/com/sun/faces/renderkit/html_basic/BodyRendererTest.java +++ b/impl/src/test/java/com/sun/faces/renderkit/html_basic/BodyRendererTest.java @@ -23,16 +23,17 @@ import java.io.StringWriter; import java.util.Collections; -import org.junit.jupiter.api.Test; -import org.mockito.Mockito; - import jakarta.faces.application.Application; import jakarta.faces.application.ProjectStage; +import jakarta.faces.component.Doctype; import jakarta.faces.component.UIViewRoot; import jakarta.faces.component.html.HtmlBody; import jakarta.faces.context.FacesContext; import jakarta.faces.context.ResponseWriter; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; + /** * The JUnit tests for the BodyRenderer class. */ @@ -57,11 +58,18 @@ public void testEncodeBegin() throws Exception { StringWriter writer = new StringWriter(); ResponseWriter testResponseWriter = new TestResponseWriter(writer); FacesContext facesContext = Mockito.mock(FacesContext.class); + UIViewRoot viewRoot = Mockito.mock(UIViewRoot.class); + Doctype doctype = Mockito.mock(Doctype.class); BodyRenderer bodyRenderer = new BodyRenderer(); HtmlBody htmlBody = new HtmlBody(); htmlBody.getAttributes().put("styleClass", "myclass"); when(facesContext.getResponseWriter()).thenReturn(testResponseWriter); + when(facesContext.getViewRoot()).thenReturn(viewRoot); + when(viewRoot.getDoctype()).thenReturn(doctype); + when(doctype.getRootElement()).thenReturn("html"); + when(doctype.getPublic()).thenReturn(null); + when(doctype.getSystem()).thenReturn(null); bodyRenderer.encodeBegin(facesContext, htmlBody); String html = writer.toString(); @@ -102,11 +110,11 @@ public void testEncodeEnd() throws Exception { HtmlBody htmlBody = new HtmlBody(); when(facesContext.getApplication()).thenReturn(application); - when(facesContext.getClientIdsWithMessages()).thenReturn(Collections.EMPTY_LIST.iterator()); + when(facesContext.getClientIdsWithMessages()).thenReturn(Collections.emptyList().iterator()); when(facesContext.getResponseWriter()).thenReturn(testResponseWriter); when(facesContext.getViewRoot()).thenReturn(viewRoot); when(facesContext.isProjectStage(ProjectStage.Development)).thenReturn(false); - when(viewRoot.getComponentResources(facesContext, "body")).thenReturn(Collections.EMPTY_LIST); + when(viewRoot.getComponentResources(facesContext, "body")).thenReturn(Collections.emptyList()); bodyRenderer.encodeEnd(facesContext, htmlBody); String html = writer.toString(); diff --git a/impl/src/test/java/com/sun/faces/renderkit/html_basic/HeadRendererTest.java b/impl/src/test/java/com/sun/faces/renderkit/html_basic/HeadRendererTest.java index 4797a39a7c..ccc36072a5 100644 --- a/impl/src/test/java/com/sun/faces/renderkit/html_basic/HeadRendererTest.java +++ b/impl/src/test/java/com/sun/faces/renderkit/html_basic/HeadRendererTest.java @@ -25,6 +25,7 @@ import org.junit.jupiter.api.Test; import org.mockito.Mockito; +import jakarta.faces.component.Doctype; import jakarta.faces.component.UIViewRoot; import jakarta.faces.component.html.HtmlHead; import jakarta.faces.context.FacesContext; @@ -51,13 +52,24 @@ public void testDecode() { */ @Test public void testEncodeBegin() throws Exception { - // - // TODO: Note we are not testing this method as its complexity is too - // high, because it uses WebConfiguration.getInstance to get - // configuration information that should be readily available to the - // renderer through either the FacesContext or the component being - // rendered. - // + StringWriter writer = new StringWriter(); + ResponseWriter testResponseWriter = new TestResponseWriter(writer); + FacesContext facesContext = Mockito.mock(FacesContext.class, "getResponseWriter"); + UIViewRoot viewRoot = Mockito.mock(UIViewRoot.class); + Doctype doctype = Mockito.mock(Doctype.class); + HeadRenderer headRenderer = new HeadRenderer(); + HtmlHead htmlHead = new HtmlHead(); + + when(facesContext.getResponseWriter()).thenReturn(testResponseWriter); + when(facesContext.getViewRoot()).thenReturn(viewRoot); + when(viewRoot.getDoctype()).thenReturn(doctype); + when(doctype.getRootElement()).thenReturn("html"); + when(doctype.getPublic()).thenReturn(null); + when(doctype.getSystem()).thenReturn(null); + + headRenderer.encodeBegin(facesContext, htmlHead); + String html = writer.toString(); + assertTrue(html.contains(" sut.decrypt(value)); diff --git a/impl/src/test/java/jakarta/faces/FacesWrapperTestCase.java b/impl/src/test/java/jakarta/faces/FacesWrapperTestCase.java deleted file mode 100644 index f8c6c76daa..0000000000 --- a/impl/src/test/java/jakarta/faces/FacesWrapperTestCase.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces; - -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - -import java.io.File; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -/** - *

      - * A unit test to make sure all classes implementing {@link FacesWrapper} are - * actually wrapping all public and protected methods of the wrapped class. This - * should help to keep the wrapper classes in synch with the wrapped classes. - *

      - */ -public class FacesWrapperTestCase { - - private static List> wrapperClasses; - private static List> noWrapperClasses; - private static List methodsToIgnore; - private static final String JAVAX_FACES_PKG = "jakarta.faces."; - - /** - * Perform class-level initialization for test - lookup for classes - * implementing FacesWrapper. - * @throws java.lang.Exception - */ - @BeforeEach - public void setUp() throws Exception { - if (wrapperClasses == null) { - loadWrapperClasses(); - methodsToIgnore = new ArrayList(); - methodsToIgnore.add(Object.class.getMethod("toString", new Class[0])); - } - } - - /** - * Unit test to assert wrapperClasses list was loaded (see {@link #setUp()}. - */ - @Test - public void testWrapperClassesLoaded() { - assertNotNull(wrapperClasses); - assertTrue(!wrapperClasses.isEmpty()); - } - - /** - * Unit test to assert there are no *Wrapper classes not implementing - * FacesWrapper. - */ - @Test - public void testWrapperClassesImplementFacesWrapper() { - assertNotNull(noWrapperClasses); - if (noWrapperClasses.size() > 0) { - System.out.println("Wrapper classes not implementing jakarta.faces.FacesWrapper:"); - System.out.println(noWrapperClasses.toString()); - } - assertTrue(noWrapperClasses - .isEmpty()); - } - - /** - * The main goal of this TestSuite: unit test to assert all classes - * implementing FacesWrapper do wrap all public and protected methods of the - * wrapped class. - */ - @Test - public void testWrapperClassWrapsPublicAndProtectedMethods() { - for (Class wrapper : wrapperClasses) { - if (wrapper.isInterface()) { - continue; - } - List wrapperMethods = getPublicAndProtectedMethods(wrapper); - List methodsToWrap = getPublicAndProtectedMethods(wrapper.getSuperclass()); - - System.out.println("verify " + wrapper.getName() + " is wrapping " - + wrapper.getSuperclass().getName() + " well"); - String msg = wrapper.getCanonicalName() + " does not wrap method: "; - for (Method m : methodsToWrap) { - if (isMethodContained(m, methodsToIgnore)) { - continue; - } - assertTrue(isMethodContained(m, wrapperMethods), msg + m.toString()); - } - } - } - - // private methods - /** - * Returns true it the passed method is contained in the also passed list of - * methods by also comparing matching parameters. - * - * @param m the method (from the wrapped class) to compare against. - * @param wrapperMethods the list of methods of the wrapper class. - */ - private boolean isMethodContained(Method m, List wrapperMethods) { - String name = m.getName(); - Class[] paramTypes = m.getParameterTypes(); - Class returnType = m.getReturnType(); - for (Method wm : wrapperMethods) { - if (name.equals(wm.getName()) && Arrays.equals(paramTypes, wm.getParameterTypes()) - && returnType == wm.getReturnType()) { - return true; - } - } - - return false; - } - - /** - * Collect public and protected methods of a class. - * - * @param wrapper the class to find its methods. - * @return list of found methods. - */ - private List getPublicAndProtectedMethods(Class wrapper) { - List mList = new ArrayList(); - if (Object.class == wrapper) { - return mList; - } - - Method[] methods = wrapper.getDeclaredMethods(); - for (Method m : methods) { - int mod = m.getModifiers(); - if (!Modifier.isStatic(mod) && (Modifier.isPublic(mod) || Modifier.isProtected(mod))) { - mList.add(m); - } - } - return mList; - } - - /** - * Collect the wrapper classes. - */ - private void loadWrapperClasses() { - wrapperClasses = new ArrayList<>(); - noWrapperClasses = new ArrayList<>(); - - ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); - try { - collectWrapperClasses( - classLoader, - JAVAX_FACES_PKG, - new File(classLoader.getResource("jakarta/faces/Messages.properties").getFile()) - .getParentFile()); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Walk package tree for collecting wrapper classes. - * - * @param classLoader the ClassLoader. - * @param pkg package name. - * @param jakartaFacesFolder current File (directory or file) - * @throws Exception might throw ClassNotFoundException from class loading. - */ - private void collectWrapperClasses(ClassLoader classLoader, String pkg, File jakartaFacesFolder) throws Exception { - for (File file : jakartaFacesFolder.listFiles()) { - if (file.isDirectory()) { - collectWrapperClasses(classLoader, pkg + file.getName() + ".", file); - } else { - addWrapperClassToWrapperClassesList(classLoader, pkg, file); - } - } - } - - /** - * Add classes that are assignable to FacesWrapper class to the - * wrapperClasses list - and also add classes with a name ending on - * "Wrapper" but being not assignable to FacesWrapper to the - * noWrapperClasses list. - * - * @param cl the ClasslOader used to load the class. - * @param pkg the name of the package working in. - * @param f the File to analyse. - * @throws Exception ClassLoader exceptions. - */ - private void addWrapperClassToWrapperClassesList(ClassLoader cl, String pkg, File f) - throws Exception { - String name = f.getName(); - if (!name.endsWith(".class")) { - return; - } - String className = pkg + name.substring(0, name.length() - 6); - Class c = cl.loadClass(className); - Class wrappedClass = c.getSuperclass(); - if (wrappedClass != null) { - // we are not interested in interfaces extending FacesWrapper interface. - // also skip classes implementing FacesWrapper but extend from Object (e.g. factories). - if (FacesWrapper.class.isAssignableFrom(wrappedClass) || wrappedClass == Object.class) { - return; - } - } - if (FacesWrapper.class.isAssignableFrom(c)) { - wrapperClasses.add(c); - } else if (c != FacesWrapper.class && c.getName().endsWith("Wrapper")) { - noWrapperClasses.add(c); - } - } -} diff --git a/impl/src/test/java/jakarta/faces/FactoryFinderTestCase.java b/impl/src/test/java/jakarta/faces/FactoryFinderTestCase.java index 4dc3fbe6f1..0738dfd342 100644 --- a/impl/src/test/java/jakarta/faces/FactoryFinderTestCase.java +++ b/impl/src/test/java/jakarta/faces/FactoryFinderTestCase.java @@ -264,9 +264,11 @@ public void testNoFacesContextInitially() throws Exception { Object response = new MockHttpServletResponse(); Object containerContext = new MockServletContext(); Lifecycle l = lFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE); + @SuppressWarnings("unused") FacesContext context = fcFactory.getFacesContext(containerContext, request, response, l); ApplicationFactory aFactory = (ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY); + @SuppressWarnings("unused") Application app = aFactory.getApplication(); FactoryFinder.releaseFactories(); } diff --git a/impl/src/test/java/jakarta/faces/component/ActionListenerTestImpl.java b/impl/src/test/java/jakarta/faces/component/ActionListenerTestImpl.java index 4c8ae1c89f..0ddcf20643 100644 --- a/impl/src/test/java/jakarta/faces/component/ActionListenerTestImpl.java +++ b/impl/src/test/java/jakarta/faces/component/ActionListenerTestImpl.java @@ -64,7 +64,7 @@ public boolean equals(Object otherObj) { // ---------------------------------------------------- Static Trace Methods // Accumulated trace log - private static StringBuffer trace = new StringBuffer(); + private static final StringBuffer trace = new StringBuffer(); // Append to the current trace log (or clear if null) public static void trace(String text) { diff --git a/impl/src/test/java/jakarta/faces/component/UIComponentBaseTestCase.java b/impl/src/test/java/jakarta/faces/component/UIComponentBaseTestCase.java index c3f39023dd..b07172cd55 100644 --- a/impl/src/test/java/jakarta/faces/component/UIComponentBaseTestCase.java +++ b/impl/src/test/java/jakarta/faces/component/UIComponentBaseTestCase.java @@ -30,6 +30,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -737,16 +738,16 @@ protected UIComponent createComponent() { * @return */ protected String lifecycleTrace(String lmethod, String cmethod) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); lifecycleTrace(lmethod, cmethod, component, sb); return sb.toString(); } - protected void lifecycleTrace(String lmethod, String cmethod, UIComponent component, StringBuffer sb) { + protected void lifecycleTrace(String lmethod, String cmethod, UIComponent component, StringBuilder sb) { // Append the call for this lifecycle method String id = component.getId(); - sb.append("/").append(lmethod).append("-").append(id); + sb.append('/').append(lmethod).append('-').append(id); if (!component.isRendered()) { return; } @@ -755,9 +756,9 @@ protected void lifecycleTrace(String lmethod, String cmethod, UIComponent compon Iterator names = component.getFacets().keySet().iterator(); while (names.hasNext()) { String name = names.next(); - sb.append("/").append(lmethod).append("-").append(name); + sb.append('/').append(lmethod).append('-').append(name); if (cmethod != null && component.getFacets().get(name).isRendered()) { - sb.append("/").append(cmethod).append("-").append(name); + sb.append('/').append(cmethod).append('-').append(name); } } @@ -770,7 +771,7 @@ protected void lifecycleTrace(String lmethod, String cmethod, UIComponent compon // Append the call for this component's component method if (cmethod != null && component.isRendered()) { - sb.append("/").append(cmethod).append("-").append(id); + sb.append('/').append(cmethod).append('-').append(id); } } diff --git a/impl/src/test/java/jakarta/faces/convert/BigIntegerConverterTest.java b/impl/src/test/java/jakarta/faces/convert/BigIntegerConverterTest.java deleted file mode 100644 index 70f8a6c468..0000000000 --- a/impl/src/test/java/jakarta/faces/convert/BigIntegerConverterTest.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.convert; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - -import java.math.BigInteger; - -import org.junit.jupiter.api.Test; -import org.mockito.Mockito; - -import jakarta.faces.component.UIPanel; -import jakarta.faces.context.FacesContext; - -/** - * The JUnit tests for the BigIntegerConverter class. - */ -public class BigIntegerConverterTest { - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject() { - BigIntegerConverter converter = new BigIntegerConverter(); - assertThrows(NullPointerException.class, () -> converter.getAsObject(null, null, null)); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject2() { - BigIntegerConverter converter = new BigIntegerConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertNull(converter.getAsObject(facesContext, new UIPanel(), null)); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject3() { - BigIntegerConverter converter = new BigIntegerConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertNull(converter.getAsObject(facesContext, new UIPanel(), " ")); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject4() { - BigIntegerConverter converter = new BigIntegerConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals(BigInteger.valueOf(123), converter.getAsObject(facesContext, new UIPanel(), "123")); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString() { - BigIntegerConverter converter = new BigIntegerConverter(); - assertThrows(NullPointerException.class, () -> converter.getAsString(null, null, null)); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString2() { - BigIntegerConverter converter = new BigIntegerConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("", converter.getAsString(facesContext, new UIPanel(), null)); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString3() { - BigIntegerConverter converter = new BigIntegerConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("123", converter.getAsString(facesContext, new UIPanel(), "123")); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString4() { - BigIntegerConverter converter = new BigIntegerConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("123", converter.getAsString(facesContext, new UIPanel(), BigInteger.valueOf(123))); - } -} diff --git a/impl/src/test/java/jakarta/faces/convert/DoubleConverterTest.java b/impl/src/test/java/jakarta/faces/convert/DoubleConverterTest.java deleted file mode 100644 index 976600b158..0000000000 --- a/impl/src/test/java/jakarta/faces/convert/DoubleConverterTest.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.convert; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - -import org.junit.jupiter.api.Test; -import org.mockito.Mockito; - -import jakarta.faces.component.UIPanel; -import jakarta.faces.context.FacesContext; - -/** - * The JUnit tests for the DoubleConverter class. - */ -public class DoubleConverterTest { - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject() { - DoubleConverter converter = new DoubleConverter(); - assertThrows(NullPointerException.class, () -> converter.getAsObject(null, null, null)); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject2() { - DoubleConverter converter = new DoubleConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertNull(converter.getAsObject(facesContext, new UIPanel(), null)); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject3() { - DoubleConverter converter = new DoubleConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertNull(converter.getAsObject(facesContext, new UIPanel(), " ")); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject4() { - DoubleConverter converter = new DoubleConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals(Double.valueOf("12.3"), converter.getAsObject(facesContext, new UIPanel(), "12.3")); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString() { - DoubleConverter converter = new DoubleConverter(); - assertThrows(NullPointerException.class, () -> converter.getAsString(null, null, null)); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString2() { - DoubleConverter converter = new DoubleConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("", converter.getAsString(facesContext, new UIPanel(), null)); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString3() { - DoubleConverter converter = new DoubleConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("12.3", converter.getAsString(facesContext, new UIPanel(), "12.3")); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString4() { - DoubleConverter converter = new DoubleConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("12.3", converter.getAsString(facesContext, new UIPanel(), Double.valueOf("12.3"))); - } -} diff --git a/impl/src/test/java/jakarta/faces/convert/FloatConverterTest.java b/impl/src/test/java/jakarta/faces/convert/FloatConverterTest.java deleted file mode 100644 index 446940f431..0000000000 --- a/impl/src/test/java/jakarta/faces/convert/FloatConverterTest.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.convert; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - -import org.junit.jupiter.api.Test; -import org.mockito.Mockito; - -import jakarta.faces.component.UIPanel; -import jakarta.faces.context.FacesContext; - -/** - * The JUnit tests for the FloatConverter class. - */ -public class FloatConverterTest { - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject() { - FloatConverter converter = new FloatConverter(); - assertThrows(NullPointerException.class, () -> converter.getAsObject(null, null, null)); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject2() { - FloatConverter converter = new FloatConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertNull(converter.getAsObject(facesContext, new UIPanel(), null)); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject3() { - FloatConverter converter = new FloatConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertNull(converter.getAsObject(facesContext, new UIPanel(), " ")); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject4() { - FloatConverter converter = new FloatConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals(Float.valueOf("12.3"), converter.getAsObject(facesContext, new UIPanel(), "12.3")); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString() { - FloatConverter converter = new FloatConverter(); - assertThrows(NullPointerException.class, () -> converter.getAsString(null, null, null)); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString2() { - FloatConverter converter = new FloatConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("", converter.getAsString(facesContext, new UIPanel(), null)); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString3() { - FloatConverter converter = new FloatConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("12.3", converter.getAsString(facesContext, new UIPanel(), "12.3")); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString4() { - FloatConverter converter = new FloatConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("12.3", converter.getAsString(facesContext, new UIPanel(), Float.valueOf("12.3"))); - } -} diff --git a/impl/src/test/java/jakarta/faces/convert/IntegerConverterTest.java b/impl/src/test/java/jakarta/faces/convert/IntegerConverterTest.java deleted file mode 100644 index 4427b9441d..0000000000 --- a/impl/src/test/java/jakarta/faces/convert/IntegerConverterTest.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.convert; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - -import org.junit.jupiter.api.Test; -import org.mockito.Mockito; - -import jakarta.faces.component.UIPanel; -import jakarta.faces.context.FacesContext; - -/** - * The JUnit tests for the IntegerConverter class. - */ -public class IntegerConverterTest { - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject() { - IntegerConverter converter = new IntegerConverter(); - assertThrows(NullPointerException.class, () -> converter.getAsObject(null, null, null)); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject2() { - IntegerConverter converter = new IntegerConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertNull(converter.getAsObject(facesContext, new UIPanel(), null)); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject3() { - IntegerConverter converter = new IntegerConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertNull(converter.getAsObject(facesContext, new UIPanel(), " ")); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject4() { - IntegerConverter converter = new IntegerConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals(Integer.valueOf("123"), converter.getAsObject(facesContext, new UIPanel(), "123")); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString() { - IntegerConverter converter = new IntegerConverter(); - assertThrows(NullPointerException.class, () -> converter.getAsString(null, null, null)); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString2() { - IntegerConverter converter = new IntegerConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("", converter.getAsString(facesContext, new UIPanel(), null)); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString3() { - IntegerConverter converter = new IntegerConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("123", converter.getAsString(facesContext, new UIPanel(), "123")); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString4() { - IntegerConverter converter = new IntegerConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("123", converter.getAsString(facesContext, new UIPanel(), Integer.valueOf("123"))); - } -} diff --git a/impl/src/test/java/jakarta/faces/convert/LongConverterTest.java b/impl/src/test/java/jakarta/faces/convert/LongConverterTest.java deleted file mode 100644 index 27e7f8fa6f..0000000000 --- a/impl/src/test/java/jakarta/faces/convert/LongConverterTest.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.convert; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - -import org.junit.jupiter.api.Test; -import org.mockito.Mockito; - -import jakarta.faces.component.UIPanel; -import jakarta.faces.context.FacesContext; - -/** - * The JUnit tests for the LongConverter class. - */ -public class LongConverterTest { - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject() { - LongConverter converter = new LongConverter(); - assertThrows(NullPointerException.class, () -> converter.getAsObject(null, null, null)); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject2() { - LongConverter converter = new LongConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertNull(converter.getAsObject(facesContext, new UIPanel(), null)); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject3() { - LongConverter converter = new LongConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertNull(converter.getAsObject(facesContext, new UIPanel(), " ")); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject4() { - LongConverter converter = new LongConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals(Long.valueOf("123"), converter.getAsObject(facesContext, new UIPanel(), "123")); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString() { - LongConverter converter = new LongConverter(); - assertThrows(NullPointerException.class, () -> converter.getAsString(null, null, null)); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString2() { - LongConverter converter = new LongConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("", converter.getAsString(facesContext, new UIPanel(), null)); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString3() { - LongConverter converter = new LongConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("123", converter.getAsString(facesContext, new UIPanel(), "123")); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString4() { - LongConverter converter = new LongConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("123", converter.getAsString(facesContext, new UIPanel(), Long.valueOf("123"))); - } -} diff --git a/impl/src/test/java/jakarta/faces/convert/ShortConverterTest.java b/impl/src/test/java/jakarta/faces/convert/ShortConverterTest.java deleted file mode 100644 index 5223c7cb6d..0000000000 --- a/impl/src/test/java/jakarta/faces/convert/ShortConverterTest.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.convert; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - -import org.junit.jupiter.api.Test; -import org.mockito.Mockito; - -import jakarta.faces.component.UIPanel; -import jakarta.faces.context.FacesContext; - -/** - * The JUnit tests for the ShortConverter class. - */ -public class ShortConverterTest { - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject() { - ShortConverter converter = new ShortConverter(); - assertThrows(NullPointerException.class, () -> converter.getAsObject(null, null, null)); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject2() { - ShortConverter converter = new ShortConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertNull(converter.getAsObject(facesContext, new UIPanel(), null)); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject3() { - ShortConverter converter = new ShortConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertNull(converter.getAsObject(facesContext, new UIPanel(), " ")); - } - - /** - * Test getAsObject method. - */ - @Test - public void testGetAsObject4() { - ShortConverter converter = new ShortConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals(Short.valueOf("123"), converter.getAsObject(facesContext, new UIPanel(), "123")); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString() { - ShortConverter converter = new ShortConverter(); - assertThrows(NullPointerException.class, () -> converter.getAsString(null, null, null)); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString2() { - ShortConverter converter = new ShortConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("", converter.getAsString(facesContext, new UIPanel(), null)); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString3() { - ShortConverter converter = new ShortConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("123", converter.getAsString(facesContext, new UIPanel(), "123")); - } - - /** - * Test getAsString method. - */ - @Test - public void testGetAsString4() { - ShortConverter converter = new ShortConverter(); - FacesContext facesContext = Mockito.mock(FacesContext.class); - assertEquals("123", converter.getAsString(facesContext, new UIPanel(), Short.valueOf("123"))); - } -} diff --git a/impl/src/test/java/jakarta/faces/event/PhaseIdTest.java b/impl/src/test/java/jakarta/faces/event/PhaseIdTest.java deleted file mode 100644 index e8174cb3f0..0000000000 --- a/impl/src/test/java/jakarta/faces/event/PhaseIdTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.event; - -import static org.junit.jupiter.api.Assertions.assertTrue; - -import java.util.Iterator; - -import org.junit.jupiter.api.Test; - -public class PhaseIdTest { - - @Test - public void testToString() { - Iterator valueIter = PhaseId.VALUES.iterator(); - String cur = null; - while (valueIter.hasNext()) { - cur = valueIter.next().toString(); - System.out.println(cur); - assertTrue(cur.length() > 3); - } - - } - -} // end of class PhaseIdTest diff --git a/impl/src/test/java/jakarta/faces/model/ArrayDataModelTestCase.java b/impl/src/test/java/jakarta/faces/model/ArrayDataModelTestCase.java deleted file mode 100644 index 2e179c117a..0000000000 --- a/impl/src/test/java/jakarta/faces/model/ArrayDataModelTestCase.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.model; - -import org.junit.jupiter.api.BeforeEach; - -/** - *

      - * Unit tests for {@link ArrayDataModel}.

      - */ -public class ArrayDataModelTestCase extends DataModelTestCaseBase { - - // ------------------------------------------------------ Instance Variables - // ---------------------------------------------------- Overall Test Methods - // Set up instance variables required by this test case. - @BeforeEach - public void setUp() throws Exception { - beans = new BeanTestImpl[5]; - for (int i = 0; i < beans.length; i++) { - beans[i] = new BeanTestImpl(); - } - configure(); - model = new ArrayDataModel(beans); - } - - // ------------------------------------------------- Individual Test Methods - // ------------------------------------------------------- Protected Methods -} diff --git a/impl/src/test/java/jakarta/faces/model/BeanTestImpl.java b/impl/src/test/java/jakarta/faces/model/BeanTestImpl.java deleted file mode 100644 index 063aa320c6..0000000000 --- a/impl/src/test/java/jakarta/faces/model/BeanTestImpl.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.model; - -/** - *

      - * JavaBean for data model tests.

      - */ -public class BeanTestImpl extends com.sun.faces.mock.model.BeanTestImpl { - -} diff --git a/impl/src/test/java/jakarta/faces/model/CollectionDataModelTest.java b/impl/src/test/java/jakarta/faces/model/CollectionDataModelTest.java deleted file mode 100644 index ea45e8dce4..0000000000 --- a/impl/src/test/java/jakarta/faces/model/CollectionDataModelTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.model; - -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; - -import java.util.ArrayList; - -import org.junit.jupiter.api.Test; - -/** - * The JUnit tests for CollectionDataModel. - * - * @author Manfred Riem - */ -public class CollectionDataModelTest { - - /** - * Test getWrappedData method. - */ - @Test - public void testGetWrappedData() { - CollectionDataModel model = new CollectionDataModel(); - assertNull(model.getWrappedData()); - ArrayList list = new ArrayList(); - model.setWrappedData(list); - assertNotNull(model.getWrappedData()); - model.setWrappedData(null); - assertNull(model.getWrappedData()); - } -} diff --git a/impl/src/test/java/jakarta/faces/model/DataModelTestCaseBase.java b/impl/src/test/java/jakarta/faces/model/DataModelTestCaseBase.java deleted file mode 100644 index 5784515f72..0000000000 --- a/impl/src/test/java/jakarta/faces/model/DataModelTestCaseBase.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.model; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.fail; - -import java.lang.reflect.Method; -import java.util.Iterator; -import java.util.Map; -import java.util.NoSuchElementException; - -import org.junit.jupiter.api.Test; - -/** - *

      - * Abstract base class for {@link DataModel} tests.

      - */ -public abstract class DataModelTestCaseBase { - - // ------------------------------------------------------ Instance Variables - // The array of beans we will be wrapping (must be initialized before setUp) - protected BeanTestImpl beans[] = new BeanTestImpl[0]; - - // The DataModel we are testing - protected DataModel model = null; - - // ---------------------------------------------------- Overall Test Methods - // Configure the properties of the beans we will be wrapping - protected void configure() { - for (int i = 0; i < beans.length; i++) { - BeanTestImpl bean = beans[i]; - bean.setBooleanProperty((i % 2) == 0); - bean.setBooleanSecond(!bean.getBooleanProperty()); - bean.setByteProperty((byte) i); - bean.setDoubleProperty((i) * 100.0); - bean.setFloatProperty((i) * ((float) 10.0)); - bean.setIntProperty(1000 * i); - bean.setLongProperty((long) 10000 * (long) i); - bean.setStringProperty("This is string " + i); - } - } - - // ------------------------------------------------- Individual Test Methods - - // Test invalid arguments to listener methods - @Test - public void testInvalidListeners() throws Exception { - try { - model.addDataModelListener(null); - fail("Should have thrown NullPointerException"); - } catch (NullPointerException e) { - // Expected result - } - - try { - model.removeDataModelListener(null); - fail("Should have thrown NullPointerException"); - } catch (NullPointerException e) { - // Expected result - } - } - - // Test positioning to all rows in ascending order - @Test - public void testPositionAscending() throws Exception { - StringBuffer sb = new StringBuffer(); - model.setRowIndex(-1); - model.addDataModelListener(new ListenerTestImpl()); - ListenerTestImpl.trace(null); - - int n = model.getRowCount(); - for (int i = 0; i < n; i++) { - checkRow(i); - sb.append("/").append(i); - } - assertEquals(sb.toString(), ListenerTestImpl.trace()); - } - - // Test positioning to all rows in descending order - @Test - public void testPositionDescending() throws Exception { - StringBuffer sb = new StringBuffer(); - model.setRowIndex(-1); - model.addDataModelListener(new ListenerTestImpl()); - ListenerTestImpl.trace(null); - - int n = model.getRowCount(); - for (int i = (n - 1); i >= 0; i--) { - checkRow(i); - sb.append("/").append(i); - } - assertEquals(sb.toString(), ListenerTestImpl.trace()); - } - - // Test a pristine DataModel instance - @Test - public void testPristine() throws Exception { - // Unopened instance - assertNotNull(beans); - assertNotNull(model); - - // Correct row count - if (model instanceof ResultSetDataModel) { - assertEquals(-1, model.getRowCount()); - } else { - assertEquals(beans.length, - model.getRowCount()); - } - - // Correct row index - assertEquals(0, model.getRowIndex()); - } - - // Test removing listener - @Test - public void testRemoveListener() throws Exception { - ListenerTestImpl listener = new ListenerTestImpl(); - ListenerTestImpl.trace(null); - model.addDataModelListener(listener); - model.setRowIndex(-1); - model.setRowIndex(0); - model.setRowIndex(0); // No movement so no event - model.setRowIndex(-1); - model.removeDataModelListener(listener); - model.setRowIndex(0); - assertEquals("/-1/0/-1", ListenerTestImpl.trace()); - } - - // Test resetting the wrapped data (should trigger an event - @Test - public void testReset() throws Exception { - ListenerTestImpl listener = new ListenerTestImpl(); - ListenerTestImpl.trace(null); - model.addDataModelListener(listener); - - assertEquals(0, model.getRowIndex()); - model.setWrappedData(model.getWrappedData()); - assertEquals("/0", ListenerTestImpl.trace()); - } - - // Test row available manipulations - @Test - public void testRowAvailable() throws Exception { - // Position to the "no current row" position - model.setRowIndex(-1); - assertTrue(!model.isRowAvailable()); - - // Position to an arbitrarily high row number - model.setRowIndex(beans.length); - assertTrue(!model.isRowAvailable()); - - // Position to a known good row number - model.setRowIndex(0); - assertTrue(model.isRowAvailable()); - } - - // Test the ability to update through the Map returned by getRowData() - @Test - public void testRowData() throws Exception { - // Retrieve the row data for row zero - model.setRowIndex(0); - Object data = model.getRowData(); - assertNotNull(data); - - // Modify several property values - BeanTestImpl bean = beans[0]; - bean.setBooleanProperty(!bean.getBooleanProperty()); - if (data instanceof Map) { - ((Map) data).put("booleanProperty", - bean.getBooleanProperty() - ? Boolean.TRUE : Boolean.FALSE); - } else { - Method m = data.getClass().getMethod("setBooleanProperty", Boolean.TYPE); - m.invoke(data, bean.getBooleanProperty() ? Boolean.TRUE : Boolean.FALSE); - } - bean.setIntProperty(bean.getIntProperty() + 5); - if (data instanceof Map) { - ((Map) data).put("intProperty", - bean.getIntProperty()); - } else { - Method m = data.getClass().getMethod("setIntProperty", Integer.TYPE); - m.invoke(data, bean.getIntProperty()); - } - bean.setStringProperty(bean.getStringProperty() + "XYZ"); - if (data instanceof Map) { - ((Map) data).put("stringProperty", - bean.getStringProperty() + "XYZ"); - } else { - Method m = data.getClass().getMethod("setStringProperty", String.class); - m.invoke(data, bean.getStringProperty()); - } - - // Ensure that all the modifications flowed through to beans[0] - assertEquals(bean.getBooleanProperty(), - beans[0].getBooleanProperty()); - assertEquals(bean.isBooleanSecond(), - beans[0].isBooleanSecond()); - assertEquals(bean.getByteProperty(), - beans[0].getByteProperty()); - assertEquals(bean.getDoubleProperty(), - beans[0].getDoubleProperty(), 0.005); - assertEquals(bean.getFloatProperty(), - beans[0].getFloatProperty(), (float) 0.005); - assertEquals(bean.getIntProperty(), - beans[0].getIntProperty()); - assertEquals(bean.getLongProperty(), - beans[0].getLongProperty()); - assertEquals(bean.getStringProperty(), - beans[0].getStringProperty()); - } - - // Test row index manipulations - @Test - public void testRowIndex() throws Exception { - assertEquals(0, model.getRowIndex()); - - // Positive setRowIndex() tests - model.setRowIndex(0); - model.setRowIndex(-1); - - // Negative setRowIndex() tests - try { - model.setRowIndex(-2); - fail("Should have thrown IllegalArgumentException"); - } catch (IllegalArgumentException e) { - // Expected result - } - } - - @Test - public void testIterator() { - Iterator iterator = model.iterator(); - if (!(model instanceof ScalarDataModel)) { - for (int i = 0; i < 5; i++) { - System.out.println("Index: " + i); - assertTrue(iterator.hasNext()); - assertNotNull(iterator.next()); - } - } else { - assertTrue(iterator.hasNext()); - assertNotNull(iterator.next()); - } - - assertTrue(!iterator.hasNext()); - try { - iterator.next(); - assertTrue(false); - } catch (NoSuchElementException nsee) { - // expected - } - } - - // Test resetting the wrapped data to null - @Test - public void testWrapped() throws Exception { - model.setWrappedData(null); - assertTrue(!model.isRowAvailable()); - assertEquals(-1, model.getRowCount()); - assertNull(model.getRowData()); - assertEquals(-1, model.getRowIndex()); - assertNull(model.getWrappedData()); - } - - // ------------------------------------------------------- Protected Methods - protected BeanTestImpl data() throws Exception { - Object data = model.getRowData(); - assertNotNull(data); - assertTrue(data instanceof BeanTestImpl); - return ((BeanTestImpl) data); - } - - protected void checkRow(int i) throws Exception { - model.setRowIndex(i); - String prompt = "Row " + i + " property "; - BeanTestImpl bean = data(); - assertNotNull(bean, "Row " + i + " data"); - assertEquals( - beans[i].getBooleanProperty(), - bean.getBooleanProperty(), prompt + "booleanProperty"); - assertEquals( - beans[i].isBooleanSecond(), - bean.isBooleanSecond(), prompt + "booleanSecond"); - assertEquals( - beans[i].getByteProperty(), - bean.getByteProperty(), prompt + "byteProperty"); - assertEquals( - "" + beans[i].getDoubleProperty(), - "" + bean.getDoubleProperty(), prompt + "doubleProperty"); - assertEquals( - "" + beans[i].getFloatProperty(), - "" + bean.getFloatProperty(), prompt + "floatProperty"); - assertEquals( - beans[i].getIntProperty(), - bean.getIntProperty(), prompt + "intProperty"); - assertEquals( - beans[i].getLongProperty(), - bean.getLongProperty(), prompt + "longProperty"); - assertEquals( - beans[i].getNullProperty(), - bean.getNullProperty(), prompt + "nullProperty"); - assertEquals( - beans[i].getReadOnlyProperty(), - bean.getReadOnlyProperty(), prompt + "readOnlyProperty"); - assertEquals( - beans[i].getShortProperty(), - bean.getShortProperty(), prompt + "shortProperty"); - assertEquals( - beans[i].getStringProperty(), - bean.getStringProperty(), prompt + "stringProperty"); - assertEquals( - beans[i].getWriteOnlyPropertyValue(), - bean.getWriteOnlyPropertyValue(), prompt + "writeOnlyProperty"); - } -} diff --git a/impl/src/test/java/jakarta/faces/model/ListDataModelTestCase.java b/impl/src/test/java/jakarta/faces/model/ListDataModelTestCase.java deleted file mode 100644 index 552542f90e..0000000000 --- a/impl/src/test/java/jakarta/faces/model/ListDataModelTestCase.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.model; - -import java.util.ArrayList; -import java.util.List; - -import org.junit.jupiter.api.BeforeEach; - -/** - *

      - * Unit tests for {@link ListDataModel}.

      - */ -public class ListDataModelTestCase extends DataModelTestCaseBase { - - // ------------------------------------------------------ Instance Variables - // ---------------------------------------------------- Overall Test Methods - // Set up instance variables required by this test case. - @BeforeEach - public void setUp() throws Exception { - List list = new ArrayList(); - for (int i = 0; i < 5; i++) { - list.add(new BeanTestImpl()); - } - beans = list.toArray(new BeanTestImpl[5]); - configure(); - model = new ListDataModel(list); - } - - // ------------------------------------------------- Individual Test Methods - // ------------------------------------------------------- Protected Methods -} diff --git a/impl/src/test/java/jakarta/faces/model/ListenerTestImpl.java b/impl/src/test/java/jakarta/faces/model/ListenerTestImpl.java deleted file mode 100644 index de1a9dcaeb..0000000000 --- a/impl/src/test/java/jakarta/faces/model/ListenerTestImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.model; - -/** - *

      - * Test implementation of DataModelListener.

      - */ -public class ListenerTestImpl implements DataModelListener { - - // ----------------------------------------------- DataModelListener Methods - @Override - public void rowSelected(DataModelEvent event) { - Object rowData = event.getRowData(); - int rowIndex = event.getRowIndex(); - trace("" + rowIndex); - if ((rowIndex >= 0) && (rowData == null)) { - throw new IllegalArgumentException("rowIndex=" + rowIndex - + " but rowData is null"); - } else if ((rowIndex == -1) && (rowData != null)) { - throw new IllegalArgumentException("rowIndex=" + rowIndex - + " but rowData is not null"); - } else if (rowIndex < -1) { - throw new IllegalArgumentException("rowIndex=" + rowIndex); - } - - } - - // ---------------------------------------------------------- Static Methods - private static StringBuffer trace = new StringBuffer(); - - public static String trace() { - return (trace.toString()); - } - - public static void trace(String value) { - if (value == null) { - trace = new StringBuffer(); - } else { - trace.append("/"); - trace.append(value); - } - } -} diff --git a/impl/src/test/java/jakarta/faces/model/ResultSetDataModelTestCase.java b/impl/src/test/java/jakarta/faces/model/ResultSetDataModelTestCase.java deleted file mode 100644 index 635edacba9..0000000000 --- a/impl/src/test/java/jakarta/faces/model/ResultSetDataModelTestCase.java +++ /dev/null @@ -1,548 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.model; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.fail; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -import com.sun.faces.mock.MockResultSet; - -/** - *

      - * Unit tests for {@link ArrayDataModel}.

      - */ -public class ResultSetDataModelTestCase extends DataModelTestCaseBase { - - // ------------------------------------------------------ Instance Variables - // The ResultSet passed to our ResultSetDataModel - protected MockResultSet result = null; - - // ---------------------------------------------------- Overall Test Methods - // Set up instance variables required by this test case. - @BeforeEach - public void setUp() throws Exception { - beans = new BeanTestImpl[5]; - for (int i = 0; i < beans.length; i++) { - beans[i] = new BeanTestImpl(); - } - configure(); - result = new MockResultSet(beans); - model = new ResultSetDataModel(result); - } - - // ------------------------------------------------- Individual Test Methods - // Test ((Map) getRowData()).containsKey() - @Test - public void testRowDataContainsKey() throws Exception { - // Position to row 1 and retrieve the corresponding Map - model.setRowIndex(1); - assertTrue(model.isRowAvailable()); - Object data = model.getRowData(); - assertNotNull(data); - assertTrue(data instanceof Map); - Map map = (Map) data; - - // Test exact match on column names - assertTrue(map.containsKey("booleanProperty")); - assertTrue(map.containsKey("booleanSecond")); - assertTrue(map.containsKey("byteProperty")); - assertTrue(map.containsKey("doubleProperty")); - assertTrue(map.containsKey("floatProperty")); - assertTrue(map.containsKey("intProperty")); - assertTrue(map.containsKey("longProperty")); - assertTrue(map.containsKey("stringProperty")); - - // Test inexact match on column names - assertTrue(map.containsKey("booleanPROPERTY")); - assertTrue(map.containsKey("booleanSECOND")); - assertTrue(map.containsKey("bytePROPERTY")); - assertTrue(map.containsKey("doublePROPERTY")); - assertTrue(map.containsKey("floatPROPERTY")); - assertTrue(map.containsKey("intPROPERTY")); - assertTrue(map.containsKey("longPROPERTY")); - assertTrue(map.containsKey("stringPROPERTY")); - - // Test false return on invalid column names - assertTrue(!map.containsKey("foo")); - assertTrue(!map.containsKey("FOO")); - assertTrue(!map.containsKey("bar")); - assertTrue(!map.containsKey("BAR")); - } - - // Test ((Map) getRowData()).containsValue() - @Test - public void testRowDataContainsValue() throws Exception { - // Position to row 1 and retrieve the corresponding Map - model.setRowIndex(1); - assertTrue(model.isRowAvailable()); - Object data = model.getRowData(); - assertNotNull(data); - assertTrue(data instanceof Map); - Map map = (Map) data; - - // Test positive results - assertTrue(map.containsValue(Boolean.TRUE)); - assertTrue(map.containsValue(Boolean.FALSE)); - assertTrue(map.containsValue(Byte.valueOf((byte) 1))); - assertTrue(map.containsValue(Double.valueOf(100.0))); - assertTrue(map.containsValue(Float.valueOf((float) 10.0))); - assertTrue(map.containsValue(Integer.valueOf(1000))); - assertTrue(map.containsValue(Long.valueOf(10000l))); - assertTrue(map.containsValue("This is string 1")); - - // Test negative results - assertTrue(!map.containsValue("foo")); - assertTrue(!map.containsValue(Integer.valueOf(654321))); - } - - // Test ((Map) getRowData()).entrySet() - @Test - public void testRowDataEntrySet() throws Exception { - // Position to row 1 and retrieve the corresponding Map - model.setRowIndex(1); - assertTrue(model.isRowAvailable()); - Object data = model.getRowData(); - assertNotNull(data); - assertTrue(data instanceof Map); - Map map = (Map) data; - Set set = map.entrySet(); - - // Test exact match postive results - assertTrue(set.contains(new TestEntry("booleanProperty", Boolean.FALSE))); - assertTrue(set.contains(new TestEntry("booleanSecond", Boolean.TRUE))); - assertTrue(set.contains(new TestEntry("byteProperty", Byte.valueOf((byte) 1)))); - assertTrue(set.contains(new TestEntry("doubleProperty", Double.valueOf(100.0)))); - assertTrue(set.contains(new TestEntry("floatProperty", Float.valueOf((float) 10.0)))); - assertTrue(set.contains(new TestEntry("intProperty", Integer.valueOf(1000)))); - assertTrue(set.contains(new TestEntry("longProperty", Long.valueOf(10000l)))); - assertTrue(set.contains(new TestEntry("stringProperty", "This is string 1"))); - - // Test exact match postive results - assertTrue(set.contains(new TestEntry("booleanPROPERTY", Boolean.FALSE))); - assertTrue(set.contains(new TestEntry("booleanSECOND", Boolean.TRUE))); - assertTrue(set.contains(new TestEntry("bytePROPERTY", Byte.valueOf((byte) 1)))); - assertTrue(set.contains(new TestEntry("doublePROPERTY", Double.valueOf(100.0)))); - assertTrue(set.contains(new TestEntry("floatPROPERTY", Float.valueOf((float) 10.0)))); - assertTrue(set.contains(new TestEntry("intPROPERTY", Integer.valueOf(1000)))); - assertTrue(set.contains(new TestEntry("longPROPERTY", Long.valueOf(10000l)))); - assertTrue(set.contains(new TestEntry("stringPROPERTY", "This is string 1"))); - - // Test negative results - assertTrue(!set.contains(new TestEntry("foo", "bar"))); - assertTrue(!set.contains(new TestEntry("FOO", "bar"))); - assertTrue(!set.contains(new TestEntry("baz", "bop"))); - assertTrue(!set.contains(new TestEntry("BAZ", "bop"))); - - // Test other methods - assertTrue(!set.isEmpty()); - - // Test updating through the entry set - Iterator entries = set.iterator(); - while (entries.hasNext()) { - Map.Entry entry = (Map.Entry) entries.next(); - if ("stringProperty".equalsIgnoreCase((String) entry.getKey())) { - entry.setValue("This is string 1 modified"); - } - } - assertEquals("This is string 1 modified", - beans[1].getStringProperty()); - assertEquals("This is string 1 modified", - map.get("stringProperty")); - assertEquals("This is string 1 modified", - map.get("stringPROPERTY")); - result.absolute(2); // ResultSet indexing is one-relative - assertEquals("This is string 1 modified", - result.getObject("stringProperty")); - } - - // Test ((Map) getRowData()).get() - @Test - public void testRowDataGet() throws Exception { - // Position to row 1 and retrieve the corresponding Map - model.setRowIndex(1); - assertTrue(model.isRowAvailable()); - Object data = model.getRowData(); - assertNotNull(data); - assertTrue(data instanceof Map); - Map map = (Map) data; - - // Test exact match on column names - assertEquals(Boolean.FALSE, map.get("booleanProperty")); - assertEquals(Boolean.TRUE, map.get("booleanSecond")); - assertEquals(Byte.valueOf((byte) 1), map.get("byteProperty")); - assertEquals(Double.valueOf(100.0), map.get("doubleProperty")); - assertEquals(Float.valueOf((float) 10.0), map.get("floatProperty")); - assertEquals(Integer.valueOf(1000), map.get("intProperty")); - assertEquals(Long.valueOf(10000l), map.get("longProperty")); - assertEquals("This is string 1", map.get("stringProperty")); - - // Test inexact match on column names - assertEquals(Boolean.FALSE, map.get("booleanPROPERTY")); - assertEquals(Boolean.TRUE, map.get("booleanSECOND")); - assertEquals(Byte.valueOf((byte) 1), map.get("bytePROPERTY")); - assertEquals(Double.valueOf(100.0), map.get("doublePROPERTY")); - assertEquals(Float.valueOf((float) 10.0), map.get("floatPROPERTY")); - assertEquals(Integer.valueOf(1000), map.get("intPROPERTY")); - assertEquals(Long.valueOf(10000l), map.get("longPROPERTY")); - assertEquals("This is string 1", map.get("stringPROPERTY")); - - // Test null return on non-existent column names - assertNull(map.get("foo")); - assertNull(map.get("FOO")); - assertNull(map.get("bar")); - assertNull(map.get("bar")); - } - - // Test ((Map) getRowData()).keySet() - @Test - public void testRowDataKeySet() throws Exception { - // Position to row 1 and retrieve the corresponding Map - model.setRowIndex(1); - assertTrue(model.isRowAvailable()); - Object data = model.getRowData(); - assertNotNull(data); - assertTrue(data instanceof Map); - Map map = (Map) data; - Set set = map.keySet(); - - // Test exact match postive results - assertTrue(set.contains("booleanProperty")); - assertTrue(set.contains("booleanSecond")); - assertTrue(set.contains("byteProperty")); - assertTrue(set.contains("doubleProperty")); - assertTrue(set.contains("floatProperty")); - assertTrue(set.contains("intProperty")); - assertTrue(set.contains("longProperty")); - assertTrue(set.contains("stringProperty")); - - // Test inexact match positive results - assertTrue(set.contains("booleanPROPERTY")); - assertTrue(set.contains("booleanSECOND")); - assertTrue(set.contains("bytePROPERTY")); - assertTrue(set.contains("doublePROPERTY")); - assertTrue(set.contains("floatPROPERTY")); - assertTrue(set.contains("intPROPERTY")); - assertTrue(set.contains("longPROPERTY")); - assertTrue(set.contains("stringPROPERTY")); - - // Test negative results - assertTrue(!set.contains("foo")); - assertTrue(!set.contains("FOO")); - assertTrue(!set.contains("bar")); - assertTrue(!set.contains("BAR")); - - // Test other methods - assertTrue(!set.isEmpty()); - } - - // Test ((Map) getRowData()).put() - @Test - public void testRowDataPut() throws Exception { - // Position to row 1 and retrieve the corresponding Map - model.setRowIndex(1); - assertTrue(model.isRowAvailable()); - Object data = model.getRowData(); - assertNotNull(data); - assertTrue(data instanceof Map); - Map map = (Map) data; - } - - // Test unsupported operations on ((Map) getRowData()) - @Test - public void testRowDataUnsupported() throws Exception { - // Position to row 1 and retrieve the corresponding Map - model.setRowIndex(1); - assertTrue(model.isRowAvailable()); - Object data = model.getRowData(); - assertNotNull(data); - assertTrue(data instanceof Map); - Map map = (Map) data; - - // clear() - try { - map.clear(); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - - // entrySet() - Set entrySet = map.entrySet(); - try { - entrySet.add(new TestEntry("foo", "bar")); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - List mapEntries = new ArrayList(); - mapEntries.add(new TestEntry("foo", "bar")); - mapEntries.add(new TestEntry("baz", "bop")); - try { - entrySet.addAll(mapEntries); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - try { - entrySet.clear(); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - try { - Iterator iterator = entrySet.iterator(); - iterator.next(); - iterator.remove(); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - try { - entrySet.remove(new TestEntry("foo", "bar")); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - try { - entrySet.removeAll(mapEntries); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - try { - entrySet.retainAll(mapEntries); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - - // keySet() - Set keySet = map.keySet(); - try { - keySet.add("foo"); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - List mapKeys = new ArrayList(); - mapKeys.add("foo"); - mapKeys.add("bar"); - try { - keySet.addAll(mapKeys); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - try { - keySet.clear(); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - try { - Iterator iterator = keySet.iterator(); - iterator.next(); - iterator.remove(); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - try { - keySet.remove(new TestEntry("foo", "bar")); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - try { - keySet.removeAll(mapKeys); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - try { - keySet.retainAll(mapKeys); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - - // remove() - try { - map.remove("foo"); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - - // values() - Collection values = map.values(); - try { - values.add("foo"); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - List list = new ArrayList(); - list.add("foo"); - list.add("bar"); - try { - values.addAll(list); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - try { - values.clear(); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - try { - Iterator iterator = values.iterator(); - iterator.next(); - iterator.remove(); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - try { - values.remove("foo"); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - try { - values.removeAll(list); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - try { - values.retainAll(list); - fail("Should have thrown UnsupportedOperationException"); - } catch (UnsupportedOperationException e) { - // Expected result - } - - } - - // Test ((Map) getRowData()).values() - @Test - public void testRowDataValues() throws Exception { - // Position to row 1 and retrieve the corresponding Map - model.setRowIndex(1); - assertTrue(model.isRowAvailable()); - Object data = model.getRowData(); - assertNotNull(data); - assertTrue(data instanceof Map); - Map map = (Map) data; - Collection values = map.values(); - - // Test positive results - assertTrue(values.contains(Boolean.TRUE)); - assertTrue(values.contains(Boolean.FALSE)); - assertTrue(values.contains(Byte.valueOf((byte) 1))); - assertTrue(values.contains(Double.valueOf(100.0))); - assertTrue(values.contains(Float.valueOf((float) 10.0))); - assertTrue(values.contains(Integer.valueOf(1000))); - assertTrue(values.contains(Long.valueOf(10000l))); - assertTrue(values.contains("This is string 1")); - - // Test negative results - assertTrue(!values.contains("foo")); - assertTrue(!values.contains(Integer.valueOf(654321))); - - // Test other methods - assertTrue(!values.isEmpty()); - } - - // ------------------------------------------------------- Protected Methods - @Override - protected BeanTestImpl data() throws Exception { - Object data = model.getRowData(); - assertTrue(data instanceof Map); - BeanTestImpl bean = new BeanTestImpl(); - Map map = (Map) data; - - bean.setBooleanProperty(((Boolean) map.get("booleanProperty")).booleanValue()); - bean.setBooleanSecond(((Boolean) map.get("booleanSecond")).booleanValue()); - bean.setByteProperty(((Byte) map.get("byteProperty")).byteValue()); - bean.setDoubleProperty(((Double) map.get("doubleProperty")).doubleValue()); - bean.setFloatProperty(((Float) map.get("floatProperty")).floatValue()); - bean.setIntProperty(((Integer) map.get("intProperty")).intValue()); - bean.setLongProperty(((Long) map.get("longProperty")).longValue()); - bean.setNullProperty((String) map.get("nullProperty")); - bean.setShortProperty(((Short) map.get("shortProperty")).shortValue()); - bean.setStringProperty((String) map.get("stringProperty")); - bean.setWriteOnlyProperty((String) map.get("writeOnlyPropertyValue")); - - return (bean); - } - - class TestEntry implements Map.Entry { - - public TestEntry(Object key, Object value) { - this.key = key; - this.value = value; - } - - private Object key; - private Object value; - - @Override - public Object getKey() { - return key; - } - - @Override - public Object getValue() { - return value; - } - - @Override - public Object setValue(Object value) { - Object previous = this.value; - this.value = value; - return previous; - } - - @Override - public boolean equals(Object o) { - if (!(o instanceof Map.Entry)) { - return (false); - } - Map.Entry e = (Map.Entry) o; - return (key == null - ? e.getKey() == null : key.equals(e.getKey())) - && (value == null - ? e.getValue() == null : value.equals(e.getValue())); - } - } -} diff --git a/impl/src/test/java/jakarta/faces/model/ScalarDataModelTestCase.java b/impl/src/test/java/jakarta/faces/model/ScalarDataModelTestCase.java deleted file mode 100644 index 96d6cba224..0000000000 --- a/impl/src/test/java/jakarta/faces/model/ScalarDataModelTestCase.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.model; - -import org.junit.jupiter.api.BeforeEach; - -/** - *

      - * Unit tests for {@link ScalarDataModel}.

      - */ -public class ScalarDataModelTestCase extends DataModelTestCaseBase { - - // ------------------------------------------------------ Instance Variables - // ---------------------------------------------------- Overall Test Methods - // Set up instance variables required by this test case. - @BeforeEach - public void setUp() throws Exception { - beans = new BeanTestImpl[1]; - beans[0] = new BeanTestImpl(); - configure(); - model = new ScalarDataModel(beans[0]); - } - - // ------------------------------------------------- Individual Test Methods - // ------------------------------------------------------- Protected Methods -} diff --git a/impl/src/test/java/jakarta/faces/validator/BeanValidatorTestCase.java b/impl/src/test/java/jakarta/faces/validator/BeanValidatorTestCase.java deleted file mode 100644 index f711dc736a..0000000000 --- a/impl/src/test/java/jakarta/faces/validator/BeanValidatorTestCase.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2022, 2022 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.validator; - -import java.util.Locale; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -import jakarta.faces.component.UIInput; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; - -/** - *

      Unit tests for {@link BeanValidator}.

      - * - * @author rmartinc - */ -public class BeanValidatorTestCase extends ValidatorTestCase { - - /** - * Test class for the bean validator. - */ - public static class TestBean { - - @NotNull - @Size(min = 1, max = 64) - private String message; - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - } - - // ------------------------------------------------- Individual Test Methods - @Test - public void testMessageOK() { - BeanValidator validator = new BeanValidator(); - Locale.setDefault(Locale.US); - facesContext.getViewRoot().setLocale(Locale.US); - UIInput component = new UIInput(); - request.setAttribute("test", new TestBean()); - component.setValueExpression("value", application.getExpressionFactory().createValueExpression(facesContext.getELContext(), "#{test.message}", String.class)); - - validator.validate(facesContext, component, "something"); - } - - @Test - public void testMessageKO() { - BeanValidator validator = new BeanValidator(); - Locale.setDefault(Locale.US); - facesContext.getViewRoot().setLocale(Locale.US); - UIInput component = new UIInput(); - request.setAttribute("test", new TestBean()); - component.setValueExpression("value", application.getExpressionFactory().createValueExpression(facesContext.getELContext(), "#{test.message}", String.class)); - - try { - validator.validate(facesContext, component, ""); - Assertions.fail("ValidatorException expected"); - } catch (ValidatorException e) { - Assertions.assertEquals("size must be between 1 and 64", e.getMessage()); - } - } - - @Test - public void testNoBase() { - BeanValidator validator = new BeanValidator(); - Locale.setDefault(Locale.US); - facesContext.getViewRoot().setLocale(Locale.US); - UIInput component = new UIInput(); - component.setValueExpression("value", application.getExpressionFactory().createValueExpression(facesContext.getELContext(), "#{something}", String.class)); - - validator.validate(facesContext, component, "something"); - } -} diff --git a/impl/src/test/java/jakarta/faces/validator/CastingValidatorTestCase.java b/impl/src/test/java/jakarta/faces/validator/CastingValidatorTestCase.java deleted file mode 100644 index 63aeaa206a..0000000000 --- a/impl/src/test/java/jakarta/faces/validator/CastingValidatorTestCase.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.validator; - -import org.junit.jupiter.api.Test; - -/** - *

      - * Unit tests for JLS casting rules

      - */ -public class CastingValidatorTestCase extends ValidatorTestCase { - - // ------------------------------------------------- Individual Test Methods - @Test - public void testWithGenericCanCastToRaw() { - - Validator validatorWithGeneric = (context, component, value) -> {}; - - Validator validatorRaw = validatorWithGeneric; - } - -} diff --git a/impl/src/test/java/jakarta/faces/validator/DoubleRangeValidatorTestCase.java b/impl/src/test/java/jakarta/faces/validator/DoubleRangeValidatorTestCase.java deleted file mode 100644 index 5daa37ed77..0000000000 --- a/impl/src/test/java/jakarta/faces/validator/DoubleRangeValidatorTestCase.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.validator; - -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.fail; - -import java.util.Locale; - -import org.junit.jupiter.api.Test; - -import jakarta.faces.component.UIInput; - -/** - *

      - * Unit tests for {@link DoubleRangeValidator}.

      - */ -public class DoubleRangeValidatorTestCase extends ValidatorTestCase { - - // ------------------------------------------------- Individual Test Methods - @Test - public void testLocaleHonored() { - DoubleRangeValidator validator = new DoubleRangeValidator(); - validator.setMinimum(10.1); - validator.setMaximum(20.1); - boolean exceptionThrown = false; - UIInput component = new UIInput(); - String message; - Locale.setDefault(Locale.US); - facesContext.getViewRoot().setLocale(Locale.US); - - try { - validator.validate(facesContext, component, "5.1"); - fail("Exception not thrown"); - } catch (ValidatorException e) { - exceptionThrown = true; - message = e.getMessage(); - assertTrue( - -1 != message.indexOf("10.1"), "message: \"" + message + "\" missing localized chars."); - assertTrue( - -1 != message.indexOf("20.1"), "message: \"" + message + "\" missing localized chars."); - } - assertTrue(exceptionThrown); - - exceptionThrown = false; - Locale.setDefault(Locale.GERMAN); - facesContext.getViewRoot().setLocale(Locale.GERMAN); - - try { - validator.validate(facesContext, component, "5"); - fail("Exception not thrown"); - } catch (ValidatorException e) { - exceptionThrown = true; - message = e.getMessage(); - assertTrue( - -1 != message.indexOf("10,1"), "message: \"" + message + "\" missing localized chars."); - assertTrue( - -1 != message.indexOf("20,1"), "message: \"" + message + "\" missing localized chars."); - } - assertTrue(exceptionThrown); - } - - @Test - public void testHashCode() { - DoubleRangeValidator validator1 = new DoubleRangeValidator(); - DoubleRangeValidator validator2 = new DoubleRangeValidator(); - - validator1.setMinimum(10.0d); - validator1.setMaximum(15.1d); - validator2.setMinimum(10.0d); - validator2.setMaximum(15.1d); - - assertTrue(validator1.hashCode() == validator2.hashCode()); - assertTrue(validator1.hashCode() == validator2.hashCode()); - - validator2.setMaximum(15.2d); - - assertTrue(validator1.hashCode() != validator2.hashCode()); - - validator1 = new DoubleRangeValidator(); - validator2 = new DoubleRangeValidator(); - - validator1.setMinimum(10.0d); - validator2.setMinimum(10.0d); - - assertTrue(validator1.hashCode() == validator2.hashCode()); - assertTrue(validator1.hashCode() == validator2.hashCode()); - - validator1.setMinimum(11.0d); - - assertTrue(validator1.hashCode() != validator2.hashCode()); - - validator1.setMinimum(10.0d); - validator1.setMaximum(10.1d); - - assertTrue(validator1.hashCode() != validator2.hashCode()); - } -} diff --git a/impl/src/test/java/jakarta/faces/validator/LengthValidatorTestCase.java b/impl/src/test/java/jakarta/faces/validator/LengthValidatorTestCase.java deleted file mode 100644 index 97e4414b3f..0000000000 --- a/impl/src/test/java/jakarta/faces/validator/LengthValidatorTestCase.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.validator; - -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.fail; - -import java.util.Locale; - -import org.junit.jupiter.api.Test; - -import jakarta.faces.component.UIInput; - -/** - *

      - * Unit tests for {@link LengthValidator}.

      - */ -public class LengthValidatorTestCase extends ValidatorTestCase { - - // ------------------------------------------------- Individual Test Methods - @Test - public void testLocaleHonored() { - LengthValidator validator = new LengthValidator(); - validator.setMinimum(1000); - validator.setMaximum(2000); - boolean exceptionThrown = false; - UIInput component = new UIInput(); - String message; - Locale.setDefault(Locale.US); - facesContext.getViewRoot().setLocale(Locale.US); - - try { - validator.validate(facesContext, component, - "Not at all long enough"); - fail("Exception not thrown"); - } catch (ValidatorException e) { - exceptionThrown = true; - message = e.getMessage(); - assertTrue( - -1 != message.indexOf("1,000"), "message: \"" + message + "\" missing localized chars."); - } - assertTrue(exceptionThrown); - - exceptionThrown = false; - Locale.setDefault(Locale.GERMAN); - facesContext.getViewRoot().setLocale(Locale.GERMAN); - - try { - validator.validate(facesContext, component, - "Still not long enough"); - fail("Exception not thrown"); - } catch (ValidatorException e) { - exceptionThrown = true; - message = e.getMessage(); - assertTrue( - -1 != message.indexOf("1.000"), "message: \"" + message + "\" missing localized chars."); - } - assertTrue(exceptionThrown); - } - - @Test - public void testHashCode() { - LengthValidator validator1 = new LengthValidator(); - LengthValidator validator2 = new LengthValidator(); - - validator1.setMinimum(10); - validator1.setMaximum(15); - validator2.setMinimum(10); - validator2.setMaximum(15); - - assertTrue(validator1.hashCode() == validator2.hashCode()); - assertTrue(validator1.hashCode() == validator2.hashCode()); - - validator2.setMaximum(16); - - assertTrue(validator1.hashCode() != validator2.hashCode()); - - validator1 = new LengthValidator(); - validator2 = new LengthValidator(); - - validator1.setMinimum(10); - validator2.setMinimum(10); - - assertTrue(validator1.hashCode() == validator2.hashCode()); - assertTrue(validator1.hashCode() == validator2.hashCode()); - - validator1.setMinimum(11); - - assertTrue(validator1.hashCode() != validator2.hashCode()); - - validator1.setMinimum(10); - validator1.setMaximum(10); - - assertTrue(validator1.hashCode() != validator2.hashCode()); - } -} diff --git a/impl/src/test/java/jakarta/faces/validator/LongRangeValidatorTestCase.java b/impl/src/test/java/jakarta/faces/validator/LongRangeValidatorTestCase.java deleted file mode 100644 index c59b18fdcc..0000000000 --- a/impl/src/test/java/jakarta/faces/validator/LongRangeValidatorTestCase.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.validator; - -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.fail; - -import java.util.Locale; - -import org.junit.jupiter.api.Test; - -import jakarta.faces.component.UIInput; - -/** - *

      - * Unit tests for {@link LongRangeValidator}.

      - */ -public class LongRangeValidatorTestCase extends ValidatorTestCase { - - // ------------------------------------------------- Individual Test Methods - @Test - public void testLocaleHonored() { - LongRangeValidator validator = new LongRangeValidator(); - validator.setMinimum(10100); - validator.setMaximum(20100); - boolean exceptionThrown = false; - UIInput component = new UIInput(); - String message; - Locale.setDefault(Locale.US); - facesContext.getViewRoot().setLocale(Locale.US); - - try { - validator.validate(facesContext, component, "5100"); - fail("Exception not thrown"); - } catch (ValidatorException e) { - exceptionThrown = true; - message = e.getMessage(); - assertTrue( - -1 != message.indexOf("10,100"), "message: \"" + message + "\" missing localized chars."); - assertTrue( - -1 != message.indexOf("20,100"), "message: \"" + message + "\" missing localized chars."); - } - assertTrue(exceptionThrown); - - exceptionThrown = false; - Locale.setDefault(Locale.GERMAN); - facesContext.getViewRoot().setLocale(Locale.GERMAN); - - try { - validator.validate(facesContext, component, "5100"); - fail("Exception not thrown"); - } catch (ValidatorException e) { - exceptionThrown = true; - message = e.getMessage(); - assertTrue( - -1 != message.indexOf("10.100"), "message: \"" + message + "\" missing localized chars."); - assertTrue( - -1 != message.indexOf("20.100"), "message: \"" + message + "\" missing localized chars."); - } - assertTrue(exceptionThrown); - } - - @Test - public void testHashCode() { - LongRangeValidator validator1 = new LongRangeValidator(); - LongRangeValidator validator2 = new LongRangeValidator(); - - validator1.setMinimum(10l); - validator1.setMaximum(15l); - validator2.setMinimum(10l); - validator2.setMaximum(15l); - - assertTrue(validator1.hashCode() == validator2.hashCode()); - assertTrue(validator1.hashCode() == validator2.hashCode()); - - validator2.setMaximum(16l); - - assertTrue(validator1.hashCode() != validator2.hashCode()); - - validator1 = new LongRangeValidator(); - validator2 = new LongRangeValidator(); - - validator1.setMinimum(10l); - validator2.setMinimum(10l); - - assertTrue(validator1.hashCode() == validator2.hashCode()); - assertTrue(validator1.hashCode() == validator2.hashCode()); - - validator1.setMinimum(11l); - - assertTrue(validator1.hashCode() != validator2.hashCode()); - - validator1.setMinimum(10l); - validator1.setMaximum(11l); - - assertTrue(validator1.hashCode() != validator2.hashCode()); - } -} diff --git a/impl/src/test/java/jakarta/faces/validator/RegexValidatorTestCase.java b/impl/src/test/java/jakarta/faces/validator/RegexValidatorTestCase.java deleted file mode 100644 index 189ae63241..0000000000 --- a/impl/src/test/java/jakarta/faces/validator/RegexValidatorTestCase.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.validator; - -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.fail; - -import java.util.Locale; - -import org.junit.jupiter.api.Test; - -import jakarta.faces.component.UIInput; - -/** - *

      - * Unit tests for {@link RegexValidator}.

      - */ -public class RegexValidatorTestCase extends ValidatorTestCase { - - // ------------------------------------------------- Individual Test Methods - @Test - public void testPatternMatch() { - String patternStr = "t.*"; - RegexValidator validator = new RegexValidator(); - validator.setPattern(patternStr); - UIInput component = new UIInput(); - String checkme = "test"; - try { - validator.validate(facesContext, component, checkme); - assertTrue(true); - } catch (ValidatorException ve) { - fail("Exception thrown " + ve.getMessage()); - } - } - - @Test - public void testPatterMismatch() { - String patternStr = "t.*"; - facesContext.getViewRoot().setLocale(Locale.US); - RegexValidator validator = new RegexValidator(); - validator.setPattern(patternStr); - UIInput component = new UIInput(); - String checkme = "jest"; - try { - validator.validate(facesContext, component, checkme); - fail("Exception not thrown when tested " + checkme + " against " + patternStr); - } catch (ValidatorException ve) { - String detail = ve.getFacesMessage().getDetail(); - System.out.println("Detail in test: " + detail); - assertTrue(detail.equalsIgnoreCase("Regex pattern of 't.*' not matched")); - } - } -} diff --git a/impl/src/test/java/jakarta/faces/validator/RequiredValidatorTest.java b/impl/src/test/java/jakarta/faces/validator/RequiredValidatorTest.java deleted file mode 100644 index 4ed683411c..0000000000 --- a/impl/src/test/java/jakarta/faces/validator/RequiredValidatorTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.validator; - -import org.junit.jupiter.api.Test; - -/** - * The JUnit tests for the RequiredValidator class. - */ -public class RequiredValidatorTest { - - /** - * Test validate method. - */ - @Test - public void testValidate() { - RequiredValidator validator = new RequiredValidator(); - validator.validate(null, null, "notempty"); - } -} diff --git a/impl/src/test/java/jakarta/faces/validator/ValidatorTestCase.java b/impl/src/test/java/jakarta/faces/validator/ValidatorTestCase.java deleted file mode 100644 index 740b917d76..0000000000 --- a/impl/src/test/java/jakarta/faces/validator/ValidatorTestCase.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package jakarta.faces.validator; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -import com.sun.faces.junit.JUnitFacesTestCaseBase; -import com.sun.faces.mock.MockRenderKit; - -import jakarta.faces.FactoryFinder; -import jakarta.faces.component.UIViewRoot; -import jakarta.faces.render.RenderKit; -import jakarta.faces.render.RenderKitFactory; - -/** - *

      - * Base unit tests for all {@link Validator} implementations.

      - */ -public class ValidatorTestCase extends JUnitFacesTestCaseBase { - - // ---------------------------------------------------- Overall Test Methods - // Set up instance variables required by this test case. - @Override - @BeforeEach - public void setUp() throws Exception { - super.setUp(); - UIViewRoot root = facesContext.getApplication().getViewHandler().createView(facesContext, null); - root.setViewId("/viewId"); - facesContext.setViewRoot(root); - RenderKitFactory renderKitFactory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY); - RenderKit renderKit = new MockRenderKit(); - try { - renderKitFactory.addRenderKit(RenderKitFactory.HTML_BASIC_RENDER_KIT, - renderKit); - } catch (IllegalArgumentException e) { - } - - } - - @Test - public void testNoOp() { - } -} diff --git a/impl/src/test/java/jakarta/faces/webapp/ConfigFileTestCase.java b/impl/src/test/java/jakarta/faces/webapp/ConfigFileTestCase.java index 13831245c6..18b6e4594d 100644 --- a/impl/src/test/java/jakarta/faces/webapp/ConfigFileTestCase.java +++ b/impl/src/test/java/jakarta/faces/webapp/ConfigFileTestCase.java @@ -80,7 +80,7 @@ public void testFull() throws Exception { assertEquals("com.mycompany.MyNavigationHandler", base.getNavigationHandler()); // - Map components = base.getComponents(); + Map components = base.getComponents(); assertNotNull(components); ConfigComponent ccomp1 = (ConfigComponent) components.get("Command"); assertNotNull(ccomp1); @@ -94,7 +94,7 @@ public void testFull() throws Exception { assertEquals(0, ccomp1.getProperties().size()); // - Map converters = base.getConverters(); + Map converters = base.getConverters(); assertNotNull(converters); ConfigConverter cc1 = (ConfigConverter) converters.get("First"); assertNotNull(cc1); @@ -134,7 +134,7 @@ public void testFull() throws Exception { assertEquals("java.lang.String", cc2p1.getPropertyClass()); // - Map validators = base.getValidators(); + Map validators = base.getValidators(); assertNotNull(validators); ConfigValidator cv1 = (ConfigValidator) validators.get("First"); assertNotNull(cv1); @@ -276,6 +276,6 @@ protected ConfigBase parseConfig(URL config) throws Exception { // Return the URL of the specified path, relative to our base directory protected URL relativeURL(String relativePath) throws Exception { File file = new File(System.getProperty("base.dir"), relativePath); - return (file.toURL()); + return (file.toURI().toURL()); } } diff --git a/impl/src/test/java/jakarta/faces/webapp/FacesServletTestCase.java b/impl/src/test/java/jakarta/faces/webapp/FacesServletTestCase.java index 7e9fa7ea6d..727ee4b52c 100644 --- a/impl/src/test/java/jakarta/faces/webapp/FacesServletTestCase.java +++ b/impl/src/test/java/jakarta/faces/webapp/FacesServletTestCase.java @@ -18,18 +18,18 @@ import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -import com.sun.faces.junit.JUnitFacesTestCaseBase; -import com.sun.faces.mock.MockRenderKit; - import jakarta.faces.FactoryFinder; import jakarta.faces.component.UIViewRoot; import jakarta.faces.render.RenderKit; import jakarta.faces.render.RenderKitFactory; import jakarta.servlet.http.HttpServletResponse; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import com.sun.faces.junit.JUnitFacesTestCaseBase; +import com.sun.faces.mock.MockRenderKit; + public class FacesServletTestCase extends JUnitFacesTestCaseBase { // this is private in FacesServlet to not break backwards compatibility diff --git a/impl/src/test/resources/javax/servlet/http/LocalStrings.properties b/impl/src/test/resources/javax/servlet/http/LocalStrings.properties deleted file mode 100644 index 28d1d88696..0000000000 --- a/impl/src/test/resources/javax/servlet/http/LocalStrings.properties +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# Default localized string information -# Localized for Locale en_US - -err.cookie_name_is_token=Cookie name \"{0}\" is a reserved token -err.io.negativelength=Negative Length given in write method -err.io.short_read=Short Read - -http.method_not_implemented=Method {0} is not defined in RFC 2068 and is not supported by the Servlet API - -http.method_get_not_supported=HTTP method GET is not supported by this URL -http.method_post_not_supported=HTTP method POST is not supported by this URL -http.method_put_not_supported=HTTP method PUT is not supported by this URL -http.method_delete_not_supported=Http method DELETE is not supported by this URL diff --git a/pom.xml b/pom.xml index 31c48d761a..a5bf7e8053 100644 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,6 @@ + - org.apache.maven.plugins maven-enforcer-plugin - 3.0.0 - enforce-maven + enforce-versions enforce @@ -79,11 +71,39 @@ 3.6.0 + + [17,) + + + + + maven-compiler-plugin + 3.11.0 + + 17 + -Xlint:unchecked + + + + + + api + + false + + + + faces/api + + + + + diff --git a/rest/pom.xml b/rest/pom.xml deleted file mode 100644 index 8b899a5d58..0000000000 --- a/rest/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - 4.0.0 - - - org.glassfish - mojarra-parent - 4.0.9-SNAPSHOT - - - org.eclipse.mojarra - mojarra-rest - jar - - Mojarra ${project.version} - REST - - - - jakarta.enterprise - jakarta.enterprise.cdi-api - 4.0.0 - provided - - - jakarta.servlet - jakarta.servlet-api - 6.0.0 - provided - - - jakarta.json.bind - jakarta.json.bind-api - 3.0.0 - provided - - - org.glassfish - jakarta.faces - ${project.version} - provided - - - diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/DefaultJsonResponseWriter.java b/rest/src/main/java/org/eclipse/mojarra/rest/DefaultJsonResponseWriter.java deleted file mode 100644 index 7952c05650..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/DefaultJsonResponseWriter.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import java.io.IOException; -import java.io.Writer; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.faces.FacesException; -import jakarta.faces.context.FacesContext; -import jakarta.json.bind.Jsonb; -import jakarta.json.bind.JsonbBuilder; - -/** - * The JSON (application/json) response writer. - */ -@ApplicationScoped -@RestResponseWriterContentType("application/json") -public class DefaultJsonResponseWriter implements RestResponseWriter { - - /** - * Stores the JSON-B builder. - */ - private final JsonbBuilder jsonbBuilder; - - /** - * Stores the JSON-B context. - */ - private final Jsonb jsonb; - - /** - * Constructor. - */ - public DefaultJsonResponseWriter() { - jsonbBuilder = JsonbBuilder.newBuilder(); - jsonb = jsonbBuilder.build(); - } - - @Override - public void writeResponse(FacesContext facesContext) { - Object result = facesContext.getAttributes().get( - RestLifecycle.class.getPackage().getName() + ".RestResult"); - if (result == null) { - try { - facesContext.getExternalContext().responseSendError(204, "No content"); - facesContext.responseComplete(); - } catch (IOException ioe) { - throw new FacesException(ioe); - } - } else { - try { - Writer writer = facesContext.getExternalContext().getResponseOutputWriter(); - writer.write(jsonb.toJson(result)); - writer.flush(); - facesContext.responseComplete(); - } catch (IOException ioe) { - throw new FacesException(ioe); - } - } - } -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/DefaultResponseWriter.java b/rest/src/main/java/org/eclipse/mojarra/rest/DefaultResponseWriter.java deleted file mode 100644 index 0f0d7f29b4..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/DefaultResponseWriter.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.enterprise.inject.Default; -import jakarta.faces.FacesException; -import jakarta.faces.context.FacesContext; - -/** - * The default RestResponseWriter. - */ -@ApplicationScoped -@Default -public class DefaultResponseWriter implements RestResponseWriter { - - @Override - public void writeResponse(FacesContext facesContext) { - throw new FacesException("Not implemented yet!"); - } -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/DefaultRestMappingMatcher.java b/rest/src/main/java/org/eclipse/mojarra/rest/DefaultRestMappingMatcher.java deleted file mode 100644 index 030c04cc64..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/DefaultRestMappingMatcher.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import java.util.Iterator; -import java.util.Set; -import java.util.regex.Pattern; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.enterprise.inject.Any; -import jakarta.enterprise.inject.spi.AnnotatedMethod; -import jakarta.enterprise.inject.spi.AnnotatedType; -import jakarta.enterprise.inject.spi.Bean; -import jakarta.enterprise.inject.spi.CDI; -import jakarta.faces.context.FacesContext; - -/** - * The default RestMappingMatcher. - */ -@ApplicationScoped -public class DefaultRestMappingMatcher implements RestMappingMatcher { - - /** - * Find the REST mapping for the given bean. - * - * @param facesContext the Faces context. - * @param bean the bean. - * @return the REST mapping match, or null if not found. - */ - private RestMappingMatch determineRestMappingMatch(FacesContext facesContext, Bean bean) { - RestMappingMatch result = null; - Class clazz = bean.getBeanClass(); - AnnotatedType annotatedType = CDI.current().getBeanManager().createAnnotatedType(clazz); - Set annotatedMethodSet = annotatedType.getMethods(); - for (AnnotatedMethod method : annotatedMethodSet) { - if (method.isAnnotationPresent(RestPath.class)) { - RestPath restPath = method.getAnnotation(RestPath.class); - String path = restPath.value(); - String pathInfo = facesContext.getExternalContext().getRequestPathInfo(); - if (Pattern.matches(path, pathInfo)) { - result = new RestMappingMatch(); - result.setBean(bean); - result.setMethod(method.getJavaMember()); - result.setPathInfo(pathInfo); - result.setRestPath(path); - } - } - } - return result; - } - - /** - * Get the beans. - * - * @return the beans. - */ - private Iterator> getBeans() { - Set> beans = CDI.current().getBeanManager().getBeans( - Object.class, Any.Literal.INSTANCE); - return beans.iterator(); - } - - @Override - public RestMappingMatch match(FacesContext facesContext) { - RestMappingMatch match = null; - Iterator> beans = getBeans(); - while (beans.hasNext()) { - Bean bean = beans.next(); - RestMappingMatch candidate = determineRestMappingMatch(facesContext, bean); - if (match == null) { - match = candidate; - } else if (candidate != null && candidate.getLength() > match.getLength()) { - match = candidate; - } - } - return match; - } -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/DefaultRestMethodExecutor.java b/rest/src/main/java/org/eclipse/mojarra/rest/DefaultRestMethodExecutor.java deleted file mode 100644 index dadde7948a..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/DefaultRestMethodExecutor.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.enterprise.inject.Any; -import jakarta.enterprise.inject.Instance; -import jakarta.enterprise.inject.spi.CDI; -import jakarta.faces.FacesException; -import jakarta.faces.context.FacesContext; -import jakarta.inject.Inject; - -/** - * The default RestMethodExecutor. - */ -@ApplicationScoped -public class DefaultRestMethodExecutor implements RestMethodExecutor { - - /** - * Stores the REST parameter producer. - */ - @Inject - private RestParameterProducer restParameterProducer; - - @Override - public Object execute(FacesContext facesContext, RestMappingMatch restMappingMatch) { - Instance instance = CDI.current().select( - restMappingMatch.getBean().getBeanClass(), Any.Literal.INSTANCE); - Object result; - try { - Object[] parameters = new Object[restMappingMatch.getMethod().getParameterCount()]; - if (parameters.length > 0) { - for (int i = 0; i < parameters.length; i++) { - parameters[i] = restParameterProducer.produce( - facesContext, - restMappingMatch, - restMappingMatch.getMethod().getParameterTypes()[i], - restMappingMatch.getMethod().getParameterAnnotations()[i]); - } - } - result = restMappingMatch.getMethod().invoke(instance.get(), parameters); - } catch (Throwable throwable) { - throw new FacesException(throwable); - } - return result; - } -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/DefaultRestParameterProducer.java b/rest/src/main/java/org/eclipse/mojarra/rest/DefaultRestParameterProducer.java deleted file mode 100644 index d567e15638..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/DefaultRestParameterProducer.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import java.lang.annotation.Annotation; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.enterprise.inject.Any; -import jakarta.enterprise.inject.spi.CDI; -import jakarta.faces.FacesException; -import jakarta.faces.context.FacesContext; - -/** - * The default RestParameterProducer. - */ -@ApplicationScoped -public class DefaultRestParameterProducer implements RestParameterProducer { - - @Override - public Object produce(FacesContext facesContext, - RestMappingMatch restMappingMatch, Class parameterType, - Annotation[] parameterAnnotations) { - - RestHeaderParameter header = getRestHeaderParameterAnnotation(parameterAnnotations); - if (header != null) { - String[] value = facesContext.getExternalContext().getRequestHeaderValuesMap().get(header.value()); - return value != null ? value : new String[] {}; - } - - RestPathParameter path = getRestPathParameterAnnotation(parameterAnnotations); - if (path != null) { - Pattern pattern = Pattern.compile(restMappingMatch.getRestPath()); - Matcher matcher = pattern.matcher(restMappingMatch.getPathInfo()); - if (matcher.matches()) { - return matcher.group(path.value()); - } else { - throw new FacesException("Unable to match @RestPathParameter: " + path.value()); - } - } - - RestQueryParameter query = getRestQueryParameterAnnotation(parameterAnnotations); - if (query != null) { - return facesContext.getExternalContext().getRequestParameterMap().get(query.value()); - } - - return CDI.current().select(parameterType, Any.Literal.INSTANCE).get(); - } - - /** - * Get the @RestHeaderParameter annotation (if present). - * - * @return the @RestHeaderParameter annotation, or null if not present. - */ - private RestHeaderParameter getRestHeaderParameterAnnotation(Annotation[] annotations) { - RestHeaderParameter result = null; - if (annotations != null && annotations.length > 0) { - for (Annotation annotation : annotations) { - if (annotation instanceof RestHeaderParameter) { - result = (RestHeaderParameter) annotation; - break; - } - } - } - return result; - } - - /** - * Get the @RestPathParameter annotation (if present). - * - * @return the @RestPathParameter annotation, or null if not present. - */ - private RestPathParameter getRestPathParameterAnnotation(Annotation[] annotations) { - RestPathParameter result = null; - if (annotations != null && annotations.length > 0) { - for (Annotation annotation : annotations) { - if (annotation instanceof RestPathParameter) { - result = (RestPathParameter) annotation; - break; - } - } - } - return result; - } - - /** - * Get the @RestQueryParameter annotation (if present). - * - * @return the @RestQueryParameter annotation, or null if not present. - */ - private RestQueryParameter getRestQueryParameterAnnotation(Annotation[] annotations) { - RestQueryParameter result = null; - if (annotations != null && annotations.length > 0) { - for (Annotation annotation : annotations) { - if (annotation instanceof RestQueryParameter) { - result = (RestQueryParameter) annotation; - break; - } - } - } - return result; - } -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/DefaultRestResponseMatcher.java b/rest/src/main/java/org/eclipse/mojarra/rest/DefaultRestResponseMatcher.java deleted file mode 100644 index 66e6cc5267..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/DefaultRestResponseMatcher.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import java.util.Iterator; -import java.util.Set; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.enterprise.inject.Default; -import jakarta.enterprise.inject.spi.AnnotatedType; -import jakarta.enterprise.inject.spi.Bean; -import jakarta.enterprise.inject.spi.BeanManager; -import jakarta.enterprise.inject.spi.CDI; -import jakarta.inject.Inject; - -/** - * The default RestResponseMatcher. - */ -@ApplicationScoped -public class DefaultRestResponseMatcher implements RestResponseMatcher { - - /** - * Stores the bean manager. - */ - @Inject - private BeanManager beanManager; - - @Override - public RestResponseWriter getResponseWriter(String responseContentType) { - RestResponseWriter result = null; - AnnotatedType type = beanManager.createAnnotatedType(RestResponseWriter.class); - Set> beans = beanManager.getBeans(type.getBaseType()); - Iterator> iterator = beans.iterator(); - while (iterator.hasNext()) { - Bean bean = iterator.next(); - RestResponseWriterContentType contentType = bean.getBeanClass().getAnnotation(RestResponseWriterContentType.class); - if (contentType != null && contentType.value().equals(responseContentType)) { - result = (RestResponseWriter) CDI.current().select(bean.getBeanClass()).get(); - break; - } - } - if (result == null) { - beans = beanManager.getBeans(type.getBaseType(), new Default.Literal()); - iterator = beans.iterator(); - Bean bean = iterator.next(); - result = (RestResponseWriter) CDI.current().select(bean.getBeanClass()).get(); - } - return result; - } -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/DefaultTextResponseWriter.java b/rest/src/main/java/org/eclipse/mojarra/rest/DefaultTextResponseWriter.java deleted file mode 100644 index 2232d84352..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/DefaultTextResponseWriter.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import java.io.IOException; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.faces.FacesException; -import jakarta.faces.context.FacesContext; -import jakarta.faces.context.ResponseWriter; - -/** - * The text/plain response writer. - */ -@ApplicationScoped -@RestResponseWriterContentType("text/plain") -public class DefaultTextResponseWriter implements RestResponseWriter { - - @Override - public void writeResponse(FacesContext facesContext) { - Object result = facesContext.getAttributes().get( - RestLifecycle.class.getPackage().getName() + ".RestResult"); - if (result == null) { - try { - facesContext.getExternalContext().responseSendError(204, "No content"); - facesContext.responseComplete(); - } catch (IOException ioe) { - throw new FacesException(ioe); - } - } else { - try { - ResponseWriter responseWriter = facesContext.getResponseWriter(); - responseWriter.write(result.toString()); - } catch (IOException ioe) { - throw new FacesException(ioe); - } - } - } -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/RestHeaderParameter.java b/rest/src/main/java/org/eclipse/mojarra/rest/RestHeaderParameter.java deleted file mode 100644 index fd992c6669..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/RestHeaderParameter.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import java.lang.annotation.Documented; -import static java.lang.annotation.ElementType.PARAMETER; -import java.lang.annotation.Retention; -import static java.lang.annotation.RetentionPolicy.RUNTIME; -import java.lang.annotation.Target; - -/** - * The RestHeaderParameter annotation. - */ -@Documented -@Target(value = {PARAMETER}) -@Retention(value = RUNTIME) -public @interface RestHeaderParameter { - - /** - * Stores the name. - * - * @return the name. - */ - public String value() default ""; -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/RestInitializer.java b/rest/src/main/java/org/eclipse/mojarra/rest/RestInitializer.java deleted file mode 100644 index d52fa72506..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/RestInitializer.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import java.util.Set; -import jakarta.faces.webapp.FacesServlet; -import jakarta.servlet.ServletContainerInitializer; -import jakarta.servlet.ServletContext; -import jakarta.servlet.ServletException; -import jakarta.servlet.ServletRegistration.Dynamic; - -/** - * The ServletContainerInitializer that automatically registers the Faces REST - * Servlet and the '/rest/*' mapping if the Faces REST Servlet has not - * already been registered. - */ -public class RestInitializer implements ServletContainerInitializer { - - @Override - public void onStartup(Set> classes, ServletContext servletContext) - throws ServletException { - if (servletContext.getServletRegistration("Faces REST Servlet") == null) { - Dynamic dynamic = servletContext.addServlet("Faces REST Servlet", FacesServlet.class.getName()); - dynamic.addMapping("/rest/*"); - dynamic.setInitParameter("jakarta.faces.LIFECYCLE_ID", RestLifecycle.class.getName()); - } - } -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/RestLifecycle.java b/rest/src/main/java/org/eclipse/mojarra/rest/RestLifecycle.java deleted file mode 100644 index e38b8616d1..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/RestLifecycle.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import java.io.IOException; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.faces.FacesException; -import jakarta.faces.context.ExternalContext; -import jakarta.faces.context.FacesContext; -import jakarta.faces.event.PhaseListener; -import jakarta.faces.lifecycle.Lifecycle; -import jakarta.inject.Inject; -import jakarta.inject.Named; - -/** - * The RestLifecycle. - */ -@ApplicationScoped -@Named("org.eclipse.mojarra.rest.RestLifecycle") -public class RestLifecycle extends Lifecycle { - - /** - * Stores the RestMappingMatcher. - */ - @Inject - private RestMappingMatcher restMappingMatcher; - - /** - * Stores the RestMethodExecutor. - */ - @Inject - private RestMethodExecutor restMethodExecutor; - - /** - * Stores the RestResponseMatcher. - */ - @Inject - private RestResponseMatcher restResponseMatcher; - - /** - * Add a phase listener. - * - *

      - * This is ignored by the REST lifecycle. - * - * @param phaseListener the phase listener. - */ - @Override - public void addPhaseListener(PhaseListener phaseListener) { - } - - @Override - public void execute(FacesContext facesContext) throws FacesException { - RestMappingMatch match = restMappingMatcher.match(facesContext); - if (match != null) { - Object result = restMethodExecutor.execute(facesContext, match); - facesContext.getAttributes().put( - RestLifecycle.class.getPackage().getName() + ".RestResult", result); - } else { - try { - facesContext.getExternalContext().responseSendError(404, "Unable to match request"); - facesContext.responseComplete(); - } catch (IOException ioe) { - throw new FacesException(ioe); - } - } - } - - /** - * Get the phase listeners. - * - *

      - * As phase listeners are ignored by the REST life-cycle this will always - * return a zero length array. - * - * @return the empty array of phase listeners. - */ - @Override - public PhaseListener[] getPhaseListeners() { - return new PhaseListener[0]; - } - - /** - * Remove a phase listener. - * - *

      - * This is ignored by the REST life-cycle. - * - * @param phaseListener the phase listener. - */ - @Override - public void removePhaseListener(PhaseListener phaseListener) { - } - - @Override - public void render(FacesContext facesContext) throws FacesException { - if (!facesContext.getResponseComplete()) { - ExternalContext externalContext = facesContext.getExternalContext(); - String responseContentType = externalContext.getResponseContentType(); - if (responseContentType == null) { - externalContext.setResponseContentType("application/json"); - responseContentType = "application/json"; - } - restResponseMatcher.getResponseWriter(responseContentType).writeResponse(facesContext); - } - } -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/RestMappingMatch.java b/rest/src/main/java/org/eclipse/mojarra/rest/RestMappingMatch.java deleted file mode 100644 index 4f67446d91..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/RestMappingMatch.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import java.lang.reflect.Method; -import jakarta.enterprise.inject.spi.Bean; - -/** - * The RestMappingMatch. - */ -public class RestMappingMatch { - - /** - * Stores the bean. - */ - private Bean bean; - - /** - * Stores the method. - */ - private Method method; - - /** - * Stores the path info. - */ - private String pathInfo; - - /** - * Stores the RestPath. - */ - private String restPath; - - /** - * Get the bean. - * - * @return the bean. - */ - public Bean getBean() { - return bean; - } - - /** - * Get the length. - * - * @return the length. - */ - public int getLength() { - return pathInfo.length(); - } - - /** - * Get the method. - * - * @return the method. - */ - public Method getMethod() { - return method; - } - - /** - * Get the path info. - * - * @return the path info. - */ - public String getPathInfo() { - return pathInfo; - } - - /** - * Get the REST path. - * - * @return the REST path. - */ - public String getRestPath() { - return restPath; - } - - /** - * Set the bean. - * - * @param bean the bean. - */ - public void setBean(Bean bean) { - this.bean = bean; - } - - /** - * Set the method. - * - * @param method the method. - */ - public void setMethod(Method method) { - this.method = method; - } - - /** - * Set the path info. - * - * @param pathInfo the path info. - */ - public void setPathInfo(String pathInfo) { - this.pathInfo = pathInfo; - } - - /** - * Set the REST path. - * - * @param restPath the REST path. - */ - public void setRestPath(String restPath) { - this.restPath = restPath; - } -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/RestMappingMatcher.java b/rest/src/main/java/org/eclipse/mojarra/rest/RestMappingMatcher.java deleted file mode 100644 index 52341d303e..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/RestMappingMatcher.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import jakarta.faces.context.FacesContext; - -/** - * The RestMappingMatcher API. - */ -public interface RestMappingMatcher { - - /** - * Match request to a REST mapping. - * - * @param facesContext the Faces context. - * @return the REST mapping match, or null if not found. - */ - public RestMappingMatch match(FacesContext facesContext); -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/RestMethod.java b/rest/src/main/java/org/eclipse/mojarra/rest/RestMethod.java deleted file mode 100644 index 26e10312f4..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/RestMethod.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import java.lang.annotation.Documented; -import static java.lang.annotation.ElementType.METHOD; -import java.lang.annotation.Retention; -import static java.lang.annotation.RetentionPolicy.RUNTIME; -import java.lang.annotation.Target; - -/** - * The RestMethod. - * - *

      - * This mapping type is used to limit the REST mapping to a specific HTTP method - * (eg. GET / POST / HEAD / DELETE). - */ -@Documented -@Target(value = {METHOD}) -@Retention(value = RUNTIME) -public @interface RestMethod { - - /** - * Get the HTTP method. - * - * @return the HTTP method. - */ - String value() default "GET"; -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/RestMethodExecutor.java b/rest/src/main/java/org/eclipse/mojarra/rest/RestMethodExecutor.java deleted file mode 100644 index 0add62f699..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/RestMethodExecutor.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import jakarta.faces.context.FacesContext; - -/** - * The RestMethodExecutor API. - */ -public interface RestMethodExecutor { - - /** - * Execute the method. - * - * @param facesContext the Faces context. - * @param restMappingMatch the REST mapping match. - * @return the result. - */ - public Object execute(FacesContext facesContext, RestMappingMatch restMappingMatch); -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/RestParameterProducer.java b/rest/src/main/java/org/eclipse/mojarra/rest/RestParameterProducer.java deleted file mode 100644 index feb691c813..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/RestParameterProducer.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import java.lang.annotation.Annotation; -import jakarta.faces.context.FacesContext; - -/** - * The RestParameterProducer API. - */ -public interface RestParameterProducer { - - /** - * Produce an instance for the given type. - * - * @param facesContext the Faces context. - * @param restMappingMatch the REST mapping match. - * @param parameterType the parameter type. - * @param parameterAnnotations the annotations. - * @return the instance. - */ - public Object produce( - FacesContext facesContext, - RestMappingMatch restMappingMatch, - Class parameterType, - Annotation[] parameterAnnotations); -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/RestPath.java b/rest/src/main/java/org/eclipse/mojarra/rest/RestPath.java deleted file mode 100644 index ba6ca778a2..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/RestPath.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import java.lang.annotation.Documented; -import static java.lang.annotation.ElementType.METHOD; -import java.lang.annotation.Retention; -import static java.lang.annotation.RetentionPolicy.RUNTIME; -import java.lang.annotation.Target; - -/** - * The RestPath. - * - *

      - * This mapping type uses the same syntax as the regular expression API in Java. - */ -@Documented -@Target(value = {METHOD}) -@Retention(value = RUNTIME) -public @interface RestPath { - - /** - * Get the regular expression. - * - * @return the regular expression. - */ - String value() default "(.*)"; -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/RestPathParameter.java b/rest/src/main/java/org/eclipse/mojarra/rest/RestPathParameter.java deleted file mode 100644 index 2cffec22da..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/RestPathParameter.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import java.lang.annotation.Documented; -import static java.lang.annotation.ElementType.PARAMETER; -import java.lang.annotation.Retention; -import static java.lang.annotation.RetentionPolicy.RUNTIME; -import java.lang.annotation.Target; - -/** - * The RestPathParameter annotation. - */ -@Documented -@Target(value = {PARAMETER}) -@Retention(value = RUNTIME) -public @interface RestPathParameter { - - /** - * Stores the name (a.k.a capturing group). - * - * @return the name (a.k.a capturing group). - */ - public String value() default ""; -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/RestQueryParameter.java b/rest/src/main/java/org/eclipse/mojarra/rest/RestQueryParameter.java deleted file mode 100644 index aa87b14a17..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/RestQueryParameter.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import java.lang.annotation.Documented; -import static java.lang.annotation.ElementType.PARAMETER; -import java.lang.annotation.Retention; -import static java.lang.annotation.RetentionPolicy.RUNTIME; -import java.lang.annotation.Target; - -/** - * The RestQueryParameter annotation. - */ -@Documented -@Target(value = {PARAMETER}) -@Retention(value = RUNTIME) -public @interface RestQueryParameter { - - /** - * Stores the name. - * - * @return the name. - */ - public String value() default ""; -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/RestResponseContentType.java b/rest/src/main/java/org/eclipse/mojarra/rest/RestResponseContentType.java deleted file mode 100644 index cf542095ee..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/RestResponseContentType.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import java.lang.annotation.Documented; -import static java.lang.annotation.ElementType.METHOD; -import java.lang.annotation.Retention; -import static java.lang.annotation.RetentionPolicy.RUNTIME; -import java.lang.annotation.Target; - - -/** - * The RestResponseContentType. - * - *

      - * The response content type is used to determine which REST response writer - * is used to write out the result coming from the REST method invocation. - */ -@Documented -@Target(value = {METHOD}) -@Retention(value = RUNTIME) -public @interface RestResponseContentType { - - /** - * Get the response content type. - * - * @return the response content type. - */ - String value() default "application/json"; -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/RestResponseMatcher.java b/rest/src/main/java/org/eclipse/mojarra/rest/RestResponseMatcher.java deleted file mode 100644 index 4e9a899fbc..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/RestResponseMatcher.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -/** - * The RestResponseMatcher API. - */ -public interface RestResponseMatcher { - - /** - * Get the response writer. - * - * @param responseContentType the response content type. - * @return the response writer. - */ - RestResponseWriter getResponseWriter(String responseContentType); -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/RestResponseWriter.java b/rest/src/main/java/org/eclipse/mojarra/rest/RestResponseWriter.java deleted file mode 100644 index ac04fbc609..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/RestResponseWriter.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import jakarta.faces.context.FacesContext; - -/** - * The RestResponseWriter API. - */ -public interface RestResponseWriter { - - /** - * Write the response. - * - * @param facesContext the Faces context. - */ - public void writeResponse(FacesContext facesContext); -} diff --git a/rest/src/main/java/org/eclipse/mojarra/rest/RestResponseWriterContentType.java b/rest/src/main/java/org/eclipse/mojarra/rest/RestResponseWriterContentType.java deleted file mode 100644 index d48a1d5ac7..0000000000 --- a/rest/src/main/java/org/eclipse/mojarra/rest/RestResponseWriterContentType.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2021 Contributors to Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ -package org.eclipse.mojarra.rest; - -import java.lang.annotation.Documented; -import static java.lang.annotation.ElementType.TYPE; -import java.lang.annotation.Retention; -import static java.lang.annotation.RetentionPolicy.RUNTIME; -import java.lang.annotation.Target; - - -/** - * The RestResponseWriterContentType. - * - *

      - * The REST response writer content type is used to associate a response writer - * implementation with the content type it produces. - */ -@Documented -@Target(value = {TYPE}) -@Retention(value = RUNTIME) -public @interface RestResponseWriterContentType { - - /** - * Get the content type. - * - * @return the content type. - */ - String value() default "application/json"; -} diff --git a/rest/src/main/resources/META-INF/beans.xml b/rest/src/main/resources/META-INF/beans.xml deleted file mode 100644 index d620baae68..0000000000 --- a/rest/src/main/resources/META-INF/beans.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/rest/src/main/resources/META-INF/faces-config.xml b/rest/src/main/resources/META-INF/faces-config.xml deleted file mode 100644 index e73ae28547..0000000000 --- a/rest/src/main/resources/META-INF/faces-config.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/rest/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer b/rest/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer deleted file mode 100644 index 81577b18eb..0000000000 --- a/rest/src/main/resources/META-INF/services/jakarta.servlet.ServletContainerInitializer +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.mojarra.rest.RestInitializer diff --git a/test/base/pom.xml b/test/base/pom.xml deleted file mode 100644 index 0b19f63add..0000000000 --- a/test/base/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - 4.0.0 - - - org.eclipse.mojarra.test - pom - 4.0.9-SNAPSHOT - - - base - jar - - Mojarra ${project.version} - INTEGRATION TESTS - ${project.artifactId} - - - - org.junit.jupiter - junit-jupiter - 5.10.3 - - - org.jboss.arquillian.junit5 - arquillian-junit5-container - 1.9.1.Final - - - org.jboss.shrinkwrap.resolver - shrinkwrap-resolver-impl-maven - 3.3.0 - - - org.seleniumhq.selenium - selenium-java - 4.23.0 - - - io.github.bonigarcia - webdrivermanager - 5.9.2 - - - diff --git a/test/base/src/main/java/org/eclipse/mojarra/test/base/BaseIT.java b/test/base/src/main/java/org/eclipse/mojarra/test/base/BaseIT.java deleted file mode 100644 index 1978a849fd..0000000000 --- a/test/base/src/main/java/org/eclipse/mojarra/test/base/BaseIT.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) Contributors to the Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 - * which is available at https://www.apache.org/licenses/LICENSE-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GPL-2.0 with Classpath-exception-2.0 which - * is available at https://openjdk.java.net/legal/gplv2+ce.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 or Apache-2.0 - */ -package org.eclipse.mojarra.test.base; - -import static java.lang.System.getProperty; -import static java.time.Duration.ofSeconds; -import static org.jboss.shrinkwrap.api.ShrinkWrap.create; - -import java.io.File; -import java.net.URL; -import java.util.UUID; -import java.util.function.BooleanSupplier; -import java.util.logging.Level; -import java.util.regex.Pattern; - -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.importer.ZipImporter; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.TestInstance; -import org.junit.jupiter.api.TestInstance.Lifecycle; -import org.junit.jupiter.api.extension.ExtendWith; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.chrome.ChromeOptions; -import org.openqa.selenium.support.PageFactory; -import org.openqa.selenium.support.ui.WebDriverWait; - -import io.github.bonigarcia.wdm.WebDriverManager; - -@ExtendWith(ArquillianExtension.class) -@TestInstance(Lifecycle.PER_CLASS) -public abstract class BaseIT { - - private WebDriver browser; - - @ArquillianResource - private URL baseURL; - - @Deployment(testable = false) - public static WebArchive createDeployment() { - String warFileName = getProperty("war.file.name") + ".war"; - return create(ZipImporter.class, warFileName) - .importFrom(new File("target/" + warFileName)) - .as(WebArchive.class); - } - - @BeforeAll - public void setup() { - String arquillianBrowser = System.getProperty("arquillian.browser"); - - switch (arquillianBrowser) { - case "chrome": - WebDriverManager.chromedriver().setup(); - ChromeDriver chrome = new ChromeDriver(new ChromeOptions().addArguments("--no-sandbox", "--headless")); - chrome.setLogLevel(Level.INFO); - browser = chrome; - break; - default: - throw new UnsupportedOperationException("arquillian.browser='" + arquillianBrowser + "' is not yet supported"); - } - - PageFactory.initElements(browser, this); - } - - @AfterAll - public void teardown() { - browser.quit(); - } - - protected void open(String resource) { - browser.get(baseURL + resource); - } - - protected String getPageTitle() { - return browser.getTitle(); - } - - protected String getPageSource() { - return browser.getPageSource(); - } - - protected String getHrefURI(WebElement link) { - String uri = link.getAttribute("href").substring(baseURL.toExternalForm().length()); - String uriWithoutJsessionId = uri.split(";jsessionid=", 2)[0]; - String[] uriAndQueryString = uri.split(Pattern.quote("?"), 2); - - if (uriAndQueryString.length == 2) { - uriWithoutJsessionId += "?" + uriAndQueryString[1]; - } - - return uriWithoutJsessionId; - } - - protected void guardHttp(Runnable action) { - action.run(); - waitUntil(() -> executeScript("return document.readyState=='complete'")); - } - - protected void guardAjax(Runnable action) { - String uuid = UUID.randomUUID().toString(); - executeScript("window.$ajax = true; faces.ajax.addOnEvent(data => { if (data.status == 'complete') window.$ajax = '" + uuid + "'; })"); - action.run(); - waitUntil(() -> executeScript("return window.$ajax == '" + uuid + "' || (!window.$ajax && document.readyState == 'complete');")); - } - - @SuppressWarnings("unchecked") - private T executeScript(String script) { - return (T) ((JavascriptExecutor) browser).executeScript(script); - } - - private void waitUntil(BooleanSupplier predicate) { - new WebDriverWait(browser, ofSeconds(5)).until($ -> predicate.getAsBoolean()); - } -} diff --git a/test/issue5460/pom.xml b/test/issue5460/pom.xml deleted file mode 100644 index 50c4f35a6c..0000000000 --- a/test/issue5460/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - 4.0.0 - - - org.eclipse.mojarra.test - pom - 4.0.9-SNAPSHOT - - - issue5460 - war - - Mojarra ${project.version} - INTEGRATION TESTS - ${project.artifactId} - - - - org.eclipse.mojarra.test - base - ${project.version} - test - - - diff --git a/test/issue5460/src/main/java/org/eclipse/mojarra/test/issue5460/Issue5460Bean.java b/test/issue5460/src/main/java/org/eclipse/mojarra/test/issue5460/Issue5460Bean.java deleted file mode 100644 index c06fc082fe..0000000000 --- a/test/issue5460/src/main/java/org/eclipse/mojarra/test/issue5460/Issue5460Bean.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Contributors to the Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 - * which is available at https://www.apache.org/licenses/LICENSE-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GPL-2.0 with Classpath-exception-2.0 which - * is available at https://openjdk.java.net/legal/gplv2+ce.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 or Apache-2.0 - */ -package org.eclipse.mojarra.test.issue5460; - -import jakarta.enterprise.context.RequestScoped; -import jakarta.inject.Named; - -@Named -@RequestScoped -public class Issue5460Bean { - - private String cc1; - private String cc2; - private String cc3; - private String cc4; - private String cc5; - private String cc6; - - public String getCc1() { - return cc1; - } - - public void setCc1(String cc1) { - this.cc1 = cc1; - } - - public String getCc2() { - return cc2; - } - - public void setCc2(String cc2) { - this.cc2 = cc2; - } - - public String getCc3() { - return cc3; - } - - public void setCc3(String cc3) { - this.cc3 = cc3; - } - - public String getCc4() { - return cc4; - } - - public void setCc4(String cc4) { - this.cc4 = cc4; - } - - public String getCc5() { - return cc5; - } - - public void setCc5(String cc5) { - this.cc5 = cc5; - } - - public String getCc6() { - return cc6; - } - - public void setCc6(String cc6) { - this.cc6 = cc6; - } -} diff --git a/test/issue5460/src/main/java/org/eclipse/mojarra/test/issue5460/Issue5460Component.java b/test/issue5460/src/main/java/org/eclipse/mojarra/test/issue5460/Issue5460Component.java deleted file mode 100644 index e60626463e..0000000000 --- a/test/issue5460/src/main/java/org/eclipse/mojarra/test/issue5460/Issue5460Component.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Contributors to the Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 - * which is available at https://www.apache.org/licenses/LICENSE-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GPL-2.0 with Classpath-exception-2.0 which - * is available at https://openjdk.java.net/legal/gplv2+ce.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 or Apache-2.0 - */ -package org.eclipse.mojarra.test.issue5460; - -import jakarta.faces.component.FacesComponent; -import jakarta.faces.component.NamingContainer; -import jakarta.faces.component.UIInput; -import jakarta.faces.component.UINamingContainer; -import jakarta.faces.context.FacesContext; - -@FacesComponent("issue5460Component") -public class Issue5460Component extends UIInput implements NamingContainer { - - @Override - public String getFamily() { - return UINamingContainer.COMPONENT_FAMILY; - } - - @Override - public void decode(FacesContext context) { - Object value = getValue(); - setSubmittedValue(value == null ? "" : value); - super.decode(context); - } - - public String getAttributeResults() { - return getAttributes().get("required") + " " + getAttributes().get("styleClass"); - } -} diff --git a/test/issue5460/src/main/webapp/WEB-INF/web.xml b/test/issue5460/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 8784690178..0000000000 --- a/test/issue5460/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - facesServlet - jakarta.faces.webapp.FacesServlet - 1 - - - facesServlet - *.xhtml - - \ No newline at end of file diff --git a/test/issue5460/src/main/webapp/issue5460.xhtml b/test/issue5460/src/main/webapp/issue5460.xhtml deleted file mode 100644 index 756955e4a6..0000000000 --- a/test/issue5460/src/main/webapp/issue5460.xhtml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - issue5460 - - - -

      - -
      -
      - -
      -
      - -
      -
      - -
      -
      - -
      -
      - -
      -
      - - - -
      - - - diff --git a/test/issue5460/src/main/webapp/resources/components/component.xhtml b/test/issue5460/src/main/webapp/resources/components/component.xhtml deleted file mode 100644 index 6bd6f08e63..0000000000 --- a/test/issue5460/src/main/webapp/resources/components/component.xhtml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - -
      - - - - - - -
      -
      -
      diff --git a/test/issue5460/src/test/java/org/eclipse/mojarra/test/issue5460/Issue5460IT.java b/test/issue5460/src/test/java/org/eclipse/mojarra/test/issue5460/Issue5460IT.java deleted file mode 100644 index 410a202281..0000000000 --- a/test/issue5460/src/test/java/org/eclipse/mojarra/test/issue5460/Issue5460IT.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (c) Contributors to the Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 - * which is available at https://www.apache.org/licenses/LICENSE-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GPL-2.0 with Classpath-exception-2.0 which - * is available at https://openjdk.java.net/legal/gplv2+ce.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 or Apache-2.0 - */ -package org.eclipse.mojarra.test.issue5460; - -import static org.junit.jupiter.api.Assertions.assertAll; -import static org.junit.jupiter.api.Assertions.assertEquals; - -import org.eclipse.mojarra.test.base.BaseIT; -import org.junit.jupiter.api.Test; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -class Issue5460IT extends BaseIT { - - @FindBy(id = "form:cc1:required") - private WebElement cc1required; - - @FindBy(id = "form:cc1:valid") - private WebElement cc1valid; - - @FindBy(id = "form:cc1:message") - private WebElement cc1message; - - @FindBy(id = "form:cc1:attributeResults") - private WebElement cc1attributeResults; - - @FindBy(id = "form:cc2:required") - private WebElement cc2required; - - @FindBy(id = "form:cc2:valid") - private WebElement cc2valid; - - @FindBy(id = "form:cc2:message") - private WebElement cc2message; - - @FindBy(id = "form:cc2:attributeResults") - private WebElement cc2attributeResults; - - @FindBy(id = "form:cc3:required") - private WebElement cc3required; - - @FindBy(id = "form:cc3:valid") - private WebElement cc3valid; - - @FindBy(id = "form:cc3:message") - private WebElement cc3message; - - @FindBy(id = "form:cc3:attributeResults") - private WebElement cc3attributeResults; - - @FindBy(id = "form:cc4:required") - private WebElement cc4required; - - @FindBy(id = "form:cc4:valid") - private WebElement cc4valid; - - @FindBy(id = "form:cc4:message") - private WebElement cc4message; - - @FindBy(id = "form:cc4:attributeResults") - private WebElement cc4attributeResults; - - @FindBy(id = "form:cc5:required") - private WebElement cc5required; - - @FindBy(id = "form:cc5:valid") - private WebElement cc5valid; - - @FindBy(id = "form:cc5:message") - private WebElement cc5message; - - @FindBy(id = "form:cc5:attributeResults") - private WebElement cc5attributeResults; - - @FindBy(id = "form:cc6:required") - private WebElement cc6required; - - @FindBy(id = "form:cc6:valid") - private WebElement cc6valid; - - @FindBy(id = "form:cc6:message") - private WebElement cc6message; - - @FindBy(id = "form:cc6:attributeResults") - private WebElement cc6attributeResults; - - @FindBy(id = "form:submit") - private WebElement submit; - - /** - * https://github.com/eclipse-ee4j/mojarra/issues/5460 - * https://github.com/eclipse-ee4j/mojarra/issues/5417 - */ - @Test - void test() { - open("issue5460.xhtml"); - - assertAll( - () -> assertEquals("false", cc1required.getText()), () -> assertEquals("true", cc1valid.getText()), - () -> assertEquals("false defaultClass", cc1attributeResults.getText()), - () -> assertEquals("", cc1message.getText()), () -> assertEquals("false", cc2required.getText()), - () -> assertEquals("true", cc2valid.getText()), - () -> assertEquals("false randomClass", cc2attributeResults.getText()), - () -> assertEquals("", cc2message.getText()), () -> assertEquals("true", cc3required.getText()), - () -> assertEquals("true", cc3valid.getText()), - () -> assertEquals("true defaultClass", cc3attributeResults.getText()), - () -> assertEquals("", cc3message.getText()), () -> assertEquals("true", cc4required.getText()), - () -> assertEquals("true", cc4valid.getText()), - () -> assertEquals("true randomClass", cc4attributeResults.getText()), - () -> assertEquals("", cc4message.getText()), () -> assertEquals("true", cc5required.getText()), - () -> assertEquals("true", cc5valid.getText()), - () -> assertEquals("true defaultClass", cc5attributeResults.getText()), - () -> assertEquals("", cc5message.getText()), () -> assertEquals("true", cc6required.getText()), - () -> assertEquals("true", cc6valid.getText()), - () -> assertEquals("true randomClass", cc6attributeResults.getText()), - () -> assertEquals("", cc6message.getText()) - ); - - guardAjax(submit::click); - - assertAll( - () -> assertEquals("false", cc1required.getText()), () -> assertEquals("true", cc1valid.getText()), - () -> assertEquals("false defaultClass", cc1attributeResults.getText()), - () -> assertEquals("", cc1message.getText()), () -> assertEquals("false", cc2required.getText()), - () -> assertEquals("true", cc2valid.getText()), - () -> assertEquals("false randomClass", cc2attributeResults.getText()), - () -> assertEquals("", cc2message.getText()), () -> assertEquals("true", cc3required.getText()), - () -> assertEquals("false", cc3valid.getText()), - () -> assertEquals("true defaultClass", cc3attributeResults.getText()), - () -> assertEquals("form:cc3: Validation Error: Value is required.", cc3message.getText()), - () -> assertEquals("true", cc4required.getText()), () -> assertEquals("false", cc4valid.getText()), - () -> assertEquals("true randomClass", cc4attributeResults.getText()), - () -> assertEquals("form:cc4: Validation Error: Value is required.", cc4message.getText()), - () -> assertEquals("true", cc5required.getText()), () -> assertEquals("false", cc5valid.getText()), - () -> assertEquals("true defaultClass", cc5attributeResults.getText()), - () -> assertEquals("form:cc5: Validation Error: Value is required.", cc5message.getText()), - () -> assertEquals("true", cc6required.getText()), () -> assertEquals("false", cc6valid.getText()), - () -> assertEquals("true randomClass", cc6attributeResults.getText()), - () -> assertEquals("form:cc6: Validation Error: Value is required.", cc6message.getText()) - ); - } -} diff --git a/test/issue5464/pom.xml b/test/issue5464/pom.xml deleted file mode 100644 index 086548c0f5..0000000000 --- a/test/issue5464/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - 4.0.0 - - - org.eclipse.mojarra.test - pom - 4.0.9-SNAPSHOT - - - issue5464 - war - - Mojarra ${project.version} - INTEGRATION TESTS - ${project.artifactId} - - - - org.eclipse.mojarra.test - base - ${project.version} - test - - - diff --git a/test/issue5464/src/main/java/org/eclipse/mojarra/test/issue5464/Issue5464Bean.java b/test/issue5464/src/main/java/org/eclipse/mojarra/test/issue5464/Issue5464Bean.java deleted file mode 100644 index e112d31356..0000000000 --- a/test/issue5464/src/main/java/org/eclipse/mojarra/test/issue5464/Issue5464Bean.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Contributors to the Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 - * which is available at https://www.apache.org/licenses/LICENSE-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GPL-2.0 with Classpath-exception-2.0 which - * is available at https://openjdk.java.net/legal/gplv2+ce.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 or Apache-2.0 - */ -package org.eclipse.mojarra.test.issue5464; - -import jakarta.enterprise.context.RequestScoped; -import jakarta.inject.Named; - -@Named -@RequestScoped -public class Issue5464Bean { - - private String input; - private String output; - - public void submit() { - output = "Result: " + input; - } - - public String getInput() { - return input; - } - - public void setInput(String input) { - this.input = input; - } - - public String getOutput() { - return output; - } -} diff --git a/test/issue5464/src/main/webapp/WEB-INF/web.xml b/test/issue5464/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 8784690178..0000000000 --- a/test/issue5464/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - facesServlet - jakarta.faces.webapp.FacesServlet - 1 - - - facesServlet - *.xhtml - - \ No newline at end of file diff --git a/test/issue5464/src/main/webapp/issue5464.xhtml b/test/issue5464/src/main/webapp/issue5464.xhtml deleted file mode 100644 index cd60f8927c..0000000000 --- a/test/issue5464/src/main/webapp/issue5464.xhtml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - issue5464 - - - -
      - -
      -
      - - - -
      -
      - -
      -
      -
      - diff --git a/test/issue5464/src/test/java/org/eclipse/mojarra/test/issue5464/Issue5464IT.java b/test/issue5464/src/test/java/org/eclipse/mojarra/test/issue5464/Issue5464IT.java deleted file mode 100644 index a53d5c4cd2..0000000000 --- a/test/issue5464/src/test/java/org/eclipse/mojarra/test/issue5464/Issue5464IT.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Contributors to the Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 - * which is available at https://www.apache.org/licenses/LICENSE-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GPL-2.0 with Classpath-exception-2.0 which - * is available at https://openjdk.java.net/legal/gplv2+ce.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 or Apache-2.0 - */ -package org.eclipse.mojarra.test.issue5464; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import org.eclipse.mojarra.test.base.BaseIT; -import org.junit.jupiter.api.Test; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -class Issue5464IT extends BaseIT { - - @FindBy(id = "form:input") - private WebElement input; - - @FindBy(id = "form:submit") - private WebElement submit; - - @FindBy(id = "form:output") - private WebElement output; - - /** - * https://github.com/eclipse-ee4j/mojarra/issues/5464 - */ - @Test - void testFFFE() { - open("issue5464.xhtml"); - input.sendKeys("f\uFFFEoo"); - guardAjax(submit::click); - assertEquals("Result: foo", output.getText()); - } - - /** - * https://github.com/eclipse-ee4j/mojarra/issues/4516 - */ - @Test - void test000C() { - open("issue5464.xhtml"); - input.sendKeys("f\u000Coo"); - guardAjax(submit::click); - assertEquals("Result: foo", output.getText()); - } -} diff --git a/test/issue5488/pom.xml b/test/issue5488/pom.xml deleted file mode 100644 index 8709a85197..0000000000 --- a/test/issue5488/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - 4.0.0 - - - org.eclipse.mojarra.test - pom - 4.0.9-SNAPSHOT - - - issue5488 - war - - Mojarra ${project.version} - INTEGRATION TESTS - ${project.artifactId} - - - - org.eclipse.mojarra.test - base - ${project.version} - test - - - diff --git a/test/issue5488/src/main/java/org/eclipse/mojarra/test/issue5488/Issue5488Bean.java b/test/issue5488/src/main/java/org/eclipse/mojarra/test/issue5488/Issue5488Bean.java deleted file mode 100644 index d81d9dd42e..0000000000 --- a/test/issue5488/src/main/java/org/eclipse/mojarra/test/issue5488/Issue5488Bean.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Contributors to the Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 - * which is available at https://www.apache.org/licenses/LICENSE-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GPL-2.0 with Classpath-exception-2.0 which - * is available at https://openjdk.java.net/legal/gplv2+ce.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 or Apache-2.0 - */ -package org.eclipse.mojarra.test.issue5488; - -import static jakarta.faces.component.UIComponent.getCurrentComponent; - -import jakarta.enterprise.context.RequestScoped; -import jakarta.faces.application.FacesMessage; -import jakarta.faces.context.FacesContext; -import jakarta.inject.Named; - -@Named -@RequestScoped -public class Issue5488Bean { - - public void listener() { - addInvokedMessage("listener"); - } - - public void action() { - addInvokedMessage("action"); - } - - private static void addInvokedMessage(String methodName) { - FacesContext context = FacesContext.getCurrentInstance(); - context.addMessage(null, new FacesMessage(methodName + " invoked on " + getCurrentComponent(context).getClientId(context))); - } -} diff --git a/test/issue5488/src/main/webapp/WEB-INF/web.xml b/test/issue5488/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 8784690178..0000000000 --- a/test/issue5488/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - facesServlet - jakarta.faces.webapp.FacesServlet - 1 - - - facesServlet - *.xhtml - - \ No newline at end of file diff --git a/test/issue5488/src/main/webapp/issue5488.xhtml b/test/issue5488/src/main/webapp/issue5488.xhtml deleted file mode 100644 index 1b33c3c1a4..0000000000 --- a/test/issue5488/src/main/webapp/issue5488.xhtml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - issue5488 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/issue5488/src/test/java/org/eclipse/mojarra/test/issue5488/Issue5488IT.java b/test/issue5488/src/test/java/org/eclipse/mojarra/test/issue5488/Issue5488IT.java deleted file mode 100644 index 5706e5e0cf..0000000000 --- a/test/issue5488/src/test/java/org/eclipse/mojarra/test/issue5488/Issue5488IT.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) Contributors to the Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 - * which is available at https://www.apache.org/licenses/LICENSE-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GPL-2.0 with Classpath-exception-2.0 which - * is available at https://openjdk.java.net/legal/gplv2+ce.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 or Apache-2.0 - */ -package org.eclipse.mojarra.test.issue5488; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import org.eclipse.mojarra.test.base.BaseIT; -import org.junit.jupiter.api.Test; -import org.openqa.selenium.Keys; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -class Issue5488IT extends BaseIT { - - @FindBy(id = "form1:input") - private WebElement form1input; - - @FindBy(id = "form1:button") - private WebElement form1button; - - @FindBy(id = "form1:messages") - private WebElement form1messages; - - @FindBy(id = "form2:input") - private WebElement form2input; - - @FindBy(id = "form2:link") - private WebElement form2link; - - @FindBy(id = "form2:messages") - private WebElement form2messages; - - @FindBy(id = "form3:button1") - private WebElement form3button1; - - @FindBy(id = "form3:button2") - private WebElement form3button2; - - @FindBy(id = "form3:messages") - private WebElement form3messages; - - /** - * https://github.com/eclipse-ee4j/mojarra/issues/5488 - */ - @Test - void testCommandButtonBlurred() { - open("issue5488.xhtml"); - form1input.sendKeys(Keys.TAB); - guardAjax(() -> form1button.sendKeys(Keys.TAB)); - - var messages = form1messages.getText(); - assertEquals("listener invoked on form1:button", messages); // and thus not action invoked as well - } - - /** - * https://github.com/eclipse-ee4j/mojarra/issues/5488 - */ - @Test - void testCommandButtonClicked() { - open("issue5488.xhtml"); - guardAjax(form1button::click); - assertEquals("action invoked on form1:button", form1messages.getText()); // and thus not listener invoked as well - } - - /** - * https://github.com/eclipse-ee4j/mojarra/issues/5488 - */ - @Test - void testCommandLinkBlurred() { - open("issue5488.xhtml"); - form2input.sendKeys(Keys.TAB); - guardAjax(() -> form2link.sendKeys(Keys.TAB)); - assertEquals("listener invoked on form2:link", form2messages.getText()); // and thus not action invoked as well - } - - /** - * https://github.com/eclipse-ee4j/mojarra/issues/5488 - */ - @Test - void testCommandLinkClicked() { - open("issue5488.xhtml"); - guardAjax(form2link::click); - assertEquals("action invoked on form2:link", form2messages.getText()); // and thus not listener invoked as well - } - - /** - * https://github.com/eclipse-ee4j/mojarra/issues/3355 - */ - @Test - void testPlainButton1() { - open("issue5488.xhtml"); - guardAjax(form3button1::click); - assertEquals("listener invoked on form3:button1", form3messages.getText()); // and thus not on form3:button2 as well - } - - /** - * https://github.com/eclipse-ee4j/mojarra/issues/3355 - */ - @Test - void testPlainButton2() { - open("issue5488.xhtml"); - guardAjax(form3button2::click); - assertEquals("listener invoked on form3:button2", form3messages.getText()); // and thus not on form3:button1 as well - } -} diff --git a/test/issue5503/pom.xml b/test/issue5503/pom.xml deleted file mode 100644 index 400074772f..0000000000 --- a/test/issue5503/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - 4.0.0 - - - org.eclipse.mojarra.test - pom - 4.0.9-SNAPSHOT - - - issue5503 - war - - Mojarra ${project.version} - INTEGRATION TESTS - ${project.artifactId} - - - - org.eclipse.mojarra.test - base - ${project.version} - test - - - diff --git a/test/issue5503/src/main/webapp/WEB-INF/beans.xml b/test/issue5503/src/main/webapp/WEB-INF/beans.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue5503/src/main/webapp/WEB-INF/errorpages/issue5503-ProtectedViewException.xhtml b/test/issue5503/src/main/webapp/WEB-INF/errorpages/issue5503-ProtectedViewException.xhtml deleted file mode 100644 index 2729763738..0000000000 --- a/test/issue5503/src/main/webapp/WEB-INF/errorpages/issue5503-ProtectedViewException.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - issue5503 - ProtectedViewException - - -

      issue5503 - ProtectedViewException

      -
      - diff --git a/test/issue5503/src/main/webapp/WEB-INF/faces-config.xml b/test/issue5503/src/main/webapp/WEB-INF/faces-config.xml deleted file mode 100644 index 9b3563a11f..0000000000 --- a/test/issue5503/src/main/webapp/WEB-INF/faces-config.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - /issue5503-protected.xhtml - - diff --git a/test/issue5503/src/main/webapp/WEB-INF/web.xml b/test/issue5503/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 943813c0a7..0000000000 --- a/test/issue5503/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - facesServlet - jakarta.faces.webapp.FacesServlet - 1 - - - facesServlet - *.xhtml - *.jsf - /faces/* - - - - jakarta.faces.application.ProtectedViewException - /WEB-INF/errorpages/issue5503-ProtectedViewException.xhtml - - diff --git a/test/issue5503/src/main/webapp/issue5503-protected.xhtml b/test/issue5503/src/main/webapp/issue5503-protected.xhtml deleted file mode 100644 index f9e328d93a..0000000000 --- a/test/issue5503/src/main/webapp/issue5503-protected.xhtml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - issue5503 - protected view - - -

      issue5503 - protected view

      - - -
      - diff --git a/test/issue5503/src/main/webapp/issue5503-unprotected.xhtml b/test/issue5503/src/main/webapp/issue5503-unprotected.xhtml deleted file mode 100644 index ba739ffd84..0000000000 --- a/test/issue5503/src/main/webapp/issue5503-unprotected.xhtml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - issue5503 - unprotected view - - -

      issue5503 - unprotected view

      - - -
      - diff --git a/test/issue5503/src/test/java/org/eclipse/mojarra/test/issue5503/Issue5503IT.java b/test/issue5503/src/test/java/org/eclipse/mojarra/test/issue5503/Issue5503IT.java deleted file mode 100644 index 6581157a15..0000000000 --- a/test/issue5503/src/test/java/org/eclipse/mojarra/test/issue5503/Issue5503IT.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) Contributors to the Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 - * which is available at https://www.apache.org/licenses/LICENSE-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GPL-2.0 with Classpath-exception-2.0 which - * is available at https://openjdk.java.net/legal/gplv2+ce.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 or Apache-2.0 - */ -package org.eclipse.mojarra.test.issue5503; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - -import org.eclipse.mojarra.test.base.BaseIT; -import org.junit.jupiter.api.Test; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * https://github.com/eclipse-ee4j/mojarra/issues/5503 - */ -class Issue5503IT extends BaseIT { - - @FindBy(id = "protectedViewLink") - private WebElement protectedViewLink; - - @FindBy(id = "unprotectedViewLink") - private WebElement unprotectedViewLink; - - @Test - void testOpeningProtectedViewWithXhtmlMapping() { - open("issue5503-protected.xhtml"); - assertEquals("issue5503 - ProtectedViewException", getPageTitle()); - } - - @Test - void testOpeningProtectedViewWithJsfMapping() { - open("issue5503-protected.jsf"); - assertEquals("issue5503 - ProtectedViewException", getPageTitle()); - } - - @Test - void testOpeningProtectedViewWithFacesMapping() { - open("faces/issue5503-protected.xhtml"); - assertEquals("issue5503 - ProtectedViewException", getPageTitle()); - } - - @Test - void testLinkingProtectedViewWithXhtmlMapping() { - open("issue5503-unprotected.xhtml"); - assertEquals("issue5503 - unprotected view", getPageTitle()); - assertEquals("issue5503-unprotected.xhtml", getHrefURI(unprotectedViewLink)); - assertTrue(getHrefURI(protectedViewLink).startsWith("issue5503-protected.xhtml?jakarta.faces.Token="), "'" + getHrefURI(protectedViewLink) + "' starts with 'issue5503-protected.xhtml?jakarta.faces.Token='"); - - guardHttp(protectedViewLink::click); - assertEquals("issue5503 - protected view", getPageTitle()); - assertEquals("issue5503-unprotected.xhtml", getHrefURI(unprotectedViewLink)); - assertTrue(getHrefURI(protectedViewLink).startsWith("issue5503-protected.xhtml?jakarta.faces.Token="), "'" + getHrefURI(protectedViewLink) + "' starts with 'issue5503-protected.xhtml?jakarta.faces.Token='"); - } - - @Test - void testLinkingProtectedViewWithJsfMapping() { - open("issue5503-unprotected.jsf"); - assertEquals("issue5503 - unprotected view", getPageTitle()); - assertEquals("issue5503-unprotected.jsf", getHrefURI(unprotectedViewLink)); - assertTrue(getHrefURI(protectedViewLink).startsWith("issue5503-protected.jsf?jakarta.faces.Token="), "'" + getHrefURI(protectedViewLink) + "' starts with 'issue5503-protected.jsf?jakarta.faces.Token='"); - - guardHttp(protectedViewLink::click); - assertEquals("issue5503 - protected view", getPageTitle()); - assertEquals("issue5503-unprotected.jsf", getHrefURI(unprotectedViewLink)); - assertTrue(getHrefURI(protectedViewLink).startsWith("issue5503-protected.jsf?jakarta.faces.Token="), "'" + getHrefURI(protectedViewLink) + "' starts with 'issue5503-protected.jsf?jakarta.faces.Token='"); - } - - @Test - void testLinkingProtectedViewWithFacesMapping() { - open("faces/issue5503-unprotected.xhtml"); - assertEquals("issue5503 - unprotected view", getPageTitle()); - assertEquals("faces/issue5503-unprotected.xhtml", getHrefURI(unprotectedViewLink)); - assertTrue(getHrefURI(protectedViewLink).startsWith("faces/issue5503-protected.xhtml?jakarta.faces.Token="), "'" + getHrefURI(protectedViewLink) + "' starts with 'faces/issue5503-protected.xhtml?jakarta.faces.Token='"); - - guardHttp(protectedViewLink::click); - assertEquals("issue5503 - protected view", getPageTitle()); - assertEquals("faces/issue5503-unprotected.xhtml", getHrefURI(unprotectedViewLink)); - assertTrue(getHrefURI(protectedViewLink).startsWith("faces/issue5503-protected.xhtml?jakarta.faces.Token="), "'" + getHrefURI(protectedViewLink) + "' starts with 'faces/issue5503-protected.xhtml?jakarta.faces.Token='"); - } -} diff --git a/test/issue5507/pom.xml b/test/issue5507/pom.xml deleted file mode 100644 index 89ebfcdb45..0000000000 --- a/test/issue5507/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - 4.0.0 - - - org.eclipse.mojarra.test - pom - 4.0.9-SNAPSHOT - - - issue5507 - war - - Mojarra ${project.version} - INTEGRATION TESTS - ${project.artifactId} - - - - org.eclipse.mojarra.test - base - ${project.version} - test - - - diff --git a/test/issue5507/src/main/webapp/WEB-INF/beans.xml b/test/issue5507/src/main/webapp/WEB-INF/beans.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue5507/src/main/webapp/WEB-INF/web.xml b/test/issue5507/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 31ee2d0dbe..0000000000 --- a/test/issue5507/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - facesServlet - jakarta.faces.webapp.FacesServlet - 1 - - - facesServlet - *.xhtml - *.jsf - /faces/* - - diff --git a/test/issue5507/src/main/webapp/issue5507.xhtml b/test/issue5507/src/main/webapp/issue5507.xhtml deleted file mode 100644 index 1611cdd893..0000000000 --- a/test/issue5507/src/main/webapp/issue5507.xhtml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - issue5507 - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/issue5507/src/test/java/org/eclipse/mojarra/test/issue5507/Issue5507IT.java b/test/issue5507/src/test/java/org/eclipse/mojarra/test/issue5507/Issue5507IT.java deleted file mode 100644 index ae3dcd6114..0000000000 --- a/test/issue5507/src/test/java/org/eclipse/mojarra/test/issue5507/Issue5507IT.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Contributors to the Eclipse Foundation. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 - * which is available at https://www.apache.org/licenses/LICENSE-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the Eclipse - * Public License v. 2.0 are satisfied: GPL-2.0 with Classpath-exception-2.0 which - * is available at https://openjdk.java.net/legal/gplv2+ce.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 or Apache-2.0 - */ -package org.eclipse.mojarra.test.issue5507; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import org.eclipse.mojarra.test.base.BaseIT; -import org.junit.jupiter.api.Test; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * https://github.com/eclipse-ee4j/mojarra/issues/5507 - */ -class Issue5507IT extends BaseIT { - - @FindBy(id = "form1:table:0:radio") - private WebElement form1Radio1; - - @FindBy(id = "form1:table:1:radio") - private WebElement form1Radio2; - - @FindBy(id = "form1:table:2:radio") - private WebElement form1Radio3; - - @FindBy(id = "form1:table:3:radio") - private WebElement form1Radio4; - - @FindBy(id = "form2:radio1") - private WebElement form2Radio1; - - @FindBy(id = "form2:radio2") - private WebElement form2Radio2; - - @FindBy(id = "form2:radio3") - private WebElement form2Radio3; - - @FindBy(id = "form2:radio4") - private WebElement form2Radio4; - - @Test - void testSelectOneRadioStyleClassAttributeRendering() { - open("issue5507.xhtml"); - assertEquals("someStyleClass", form1Radio1.getAttribute("class")); - assertEquals("someStyleClass", form1Radio2.getAttribute("class")); - assertEquals("someStyleClass", form1Radio3.getAttribute("class")); - assertEquals("someStyleClass", form1Radio4.getAttribute("class")); - assertEquals("someStyleClass", form2Radio1.getAttribute("class")); - assertEquals("otherStyleClass", form2Radio2.getAttribute("class")); - assertEquals("", form2Radio3.getAttribute("class")); - assertEquals("", form2Radio4.getAttribute("class")); - } - - @Test - void testSelectOneRadioStyleAttributeRendering() { - open("issue5507.xhtml"); - assertEquals("accent-color: blue;", form1Radio1.getAttribute("style")); - assertEquals("accent-color: blue;", form1Radio2.getAttribute("style")); - assertEquals("accent-color: blue;", form1Radio3.getAttribute("style")); - assertEquals("accent-color: blue;", form1Radio4.getAttribute("style")); - assertEquals("accent-color: red;", form2Radio1.getAttribute("style")); - assertEquals("", form2Radio2.getAttribute("style")); - assertEquals("", form2Radio3.getAttribute("style")); - assertEquals("accent-color: green;", form2Radio4.getAttribute("style")); - } - -} diff --git a/test/pom.xml b/test/pom.xml deleted file mode 100644 index 04ded8897b..0000000000 --- a/test/pom.xml +++ /dev/null @@ -1,199 +0,0 @@ - - - - 4.0.0 - - - org.glassfish - mojarra-parent - 4.0.9-SNAPSHOT - - - org.eclipse.mojarra.test - pom - pom - - Mojarra ${project.version} - INTEGRATION TESTS - - - base - issue5460 - issue5464 - issue5488 - issue5503 - issue5507 - - - - 7.0.16 - chrome - - - - - jakarta.platform - jakarta.jakartaee-web-api - 10.0.0 - provided - - - org.junit.jupiter - junit-jupiter - 5.10.3 - test - - - org.jboss.arquillian.junit5 - arquillian-junit5-container - 1.8.0.Final - test - - - org.jboss.shrinkwrap.resolver - shrinkwrap-resolver-impl-maven - 3.3.0 - test - - - org.seleniumhq.selenium - selenium-java - 4.23.0 - test - - - io.github.bonigarcia - webdrivermanager - 5.9.2 - test - - - - - - - org.apache.maven.plugins - maven-war-plugin - 3.4.0 - - false - - - - org.apache.maven.plugins - maven-dependency-plugin - 3.7.1 - - ${project.build.directory} - - - - org.apache.maven.plugins - maven-failsafe-plugin - 3.3.1 - - - - integration-test - verify - - - - - - ${arquillian.browser} - ${project.build.finalName} - - - - - - - - - glassfish - - true - - - - org.omnifaces.arquillian - arquillian-glassfish-server-managed - 1.4 - test - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-glassfish - process-test-classes - - unpack - - - - - org.glassfish.main.distributions - glassfish - ${glassfish.version} - zip - - - - - - update-mojarra - process-test-classes - - copy - - - - - org.glassfish - jakarta.faces - ${project.version} - jar - true - ${project.build.directory}/glassfish7/glassfish/modules - jakarta.faces.jar - - - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - - - ${project.build.directory}/glassfish7 - - - - - - - -