jakartaee / faces

Jakarta Faces
Other
107 stars 55 forks source link

EL support in faces-config.xml for dynamic contracts #1313

Open eclipse-faces-bot opened 10 years ago

eclipse-faces-bot commented 10 years ago

Motivation

Introducing dynamic contracts is a tedious task because one has to change every view (http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/ResourceLibraryContract/resourceLibraryContract.html, "Changing Templates Dynamically") and the introduction of EL support for the faces-config would centralize this behavior in one place.

Proposal

Support the use of EL in the faces-config, e.g. to set the value of a "contracts" node of a "contract-mapping" similar to the following:

<faces-config version="2.2" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
    http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
    <application>
        <resource-library-contracts>
            <contract-mapping>
<url-pattern>/*</url-pattern>
<contracts>#{contracts.contract}</contracts>
            </contract-mapping>
        </resource-library-contracts>

    <!-- ... --->

Where contracts is a bean holding the contract string as contract property.

Affected Versions

[2.2]

eclipse-faces-bot commented 5 years ago
eclipse-faces-bot commented 10 years ago

@glassfishrobot Commented Reported by smutje

eclipse-faces-bot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-1313