Skip to content

Latest commit

 

History

History
89 lines (76 loc) · 22.5 KB

core12.md

File metadata and controls

89 lines (76 loc) · 22.5 KB

Apache MyFaces Core 1.2

Implementation of the JavaServer™ Faces (JSF) 1.2 specification.

Source

Apache GitBox / GitHub

Downloads

Mirrors Checksum Signature
binary (tar.gz) myfaces-core-assembly-1.2.12-bin.tar.gz myfaces-core-assembly-1.2.12-bin.tar.gz.md5 myfaces-core-assembly-1.2.12-bin.tar.gz.asc
binary (zip) myfaces-core-assembly-1.2.12-bin.zip myfaces-core-assembly-1.2.12-bin.zip.md5 myfaces-core-assembly-1.2.12-bin.zip.asc
source (tar.gz) myfaces-core-assembly-1.2.12-src.tar.gz myfaces-core-assembly-1.2.12-src.tar.gz.md5 myfaces-core-assembly-1.2.12-src.tar.gz.asc
source (zip) myfaces-core-assembly-1.2.12-src.zip myfaces-core-assembly-1.2.12-src.zip.md5 myfaces-core-assembly-1.2.12-src.zip.asc

Release Verification

Steps for checksum & signature verification can be found here

Dependency

<dependency>
  <groupId>org.apache.myfaces.core</groupId>
  <artifactId>myfaces-api</artifactId>
  <version>1.2.12</version>
</dependency>
<dependency>
  <groupId>org.apache.myfaces.core</groupId>
  <artifactId>myfaces-impl</artifactId>
  <version>1.2.12</version>
</dependency>

Configuration

MyFaces core behavior can be customized, adding some web config params into your WEB-INF/web.xml or META-INF/web-fragment.xml file for your custom project in this way:

<context-param>
	<param-name>org.apache.myfaces.SOME_USEFUL_PARAM</param-name>
	<param-value>someValue</param-value>
</context-param>

⚠️ The table below uses o.a.m as shortcut for org.apache.myfaces

Name Since Default value Expected values Description
javax.faces.STATE_SAVING_METHOD 1.1 server server,client Define the state method to be used. There are two different options defined by the specification: "client" and "server" state.

When "client" state is configured, all state information required to create the tree is embedded within the data rendered to the client. Note that because data received from a remote client must always be treated as "tainted", care must be taken when using such data. Some StateManager implementations may use encryption to ensure that clients cannot modify the data, and that the data received on postback is therefore trustworthy.

When "server" state is configured, the data is saved somewhere "on the back end", and (at most) a token is embedded in the data rendered to the user.
javax.faces.DEFAULT_SUFFIX 1.1 .jsp Indicate the default suffix to derive the file URI if extension mapping is used.
javax.faces.CONFIG_FILES 1.1 Comma separated list of URIs of (additional) faces config files. (e.g. /WEB-INF/my-config.xml)See JSF 1.0 PRD2, 10.3.2 Attention: You do not need to put /WEB-INF/faces-config.xml in here.
javax.faces.LIFECYCLE_ID 1.1 Identify the Lifecycle instance to be used.
o.a.m.ERROR_HANDLING 1.2.4 true true,false Indicate if myfaces is responsible to handle errors. See http://wiki.apache.org/myfaces/Handling_Server_Errors for details.
o.a.m.ERROR_HANDLER 1.2.4 If you want to choose a different class for handling the exception.

The error-handler needs to include the following methods:


handleException(FacesContext fc, Exception ex)
handleExceptionList(FacesContext facesContext, List exceptionList)
handleThrowable(FacesContext facesContext, Throwable ex)
o.a.m.ERROR_TEMPLATE_RESOURCE 1.2.4 META-INF/rsc/myfaces-dev-error.xml
o.a.m.DEBUG_TEMPLATE_RESOURCE 1.2.4 META-INF/rsc/myfaces-dev-debug.xml
o.a.m.NUMBER_OF_VIEWS_IN_SESSION 1.1 20 Only applicable if state saving method is "server" (= default). Defines the amount (default = 20) of the latest views are stored in session.
o.a.m.SERIALIZE_STATE_IN_SESSION 1.1 true Only applicable if state saving method is "server" (= default). If true (default) the state will be serialized to a byte stream before it is written to the session. If false the state will not be serialized to a byte stream.
o.a.m.COMPRESS_STATE_IN_SESSION 1.1 true Only applicable if state saving method is "server" (= default) and if org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (= default). If true (default) the serialized state will be compressed before it is written to the session. If false the state will not be compressed.
o.a.m.CACHE_OLD_VIEWS_IN_SESSION_MODE 1.2.5 off off, no, hard-soft, soft, soft-weak, weak Define the way of handle old view references(views removed from session), making possible to store it in a cache, so the state manager first try to get the view from the session. If is it not found and soft or weak ReferenceMap is used, it try to get from it. Only applicable if state saving method is "server" (= default).

The gc is responsible for remove the views, according to the rules used for soft, weak or phantom references. If a key in soft and weak mode is garbage collected, its values are purged.

By default no cache is used, so views removed from session became phantom references.

off, no: default, no cache is used
hard-soft: use an ReferenceMap(AbstractReferenceMap.HARD, AbstractReferenceMap.SOFT)
soft: use an ReferenceMap(AbstractReferenceMap.SOFT, AbstractReferenceMap.SOFT, true)
soft-weak: use an ReferenceMap(AbstractReferenceMap.SOFT, AbstractReferenceMap.WEAK, true)
weak: use an ReferenceMap(AbstractReferenceMap.WEAK, AbstractReferenceMap.WEAK, true)
o.a.m.config.annotation.LifecycleProvider 1.1
o.a.m.EL_RESOLVER_COMPARATOR 1.2.10, 2.0.2
o.a.m.PRETTY_HTML 1.1 true true,false If true, rendered HTML code will be formatted, so that it is "human readable". i.e. additional line separators and whitespace will be written, that do not influence the HTML code. Default: "true"
o.a.m.ALLOW_JAVASCRIPT 1.1 true true,false This parameter tells MyFaces if javascript code should be allowed in the rendered HTML output. If javascript is allowed, command_link anchors will have javascript code that submits the corresponding form. If javascript is not allowed, the state saving info and nested parameters ill be added as url parameters. Default: "true"
o.a.m.DETECT_JAVASCRIPT 1.1 false true,false
o.a.m.AUTO_SCROLL 1.1 false true,false If true, a javascript function will be rendered that is able to restore the former vertical scroll on every request. Convenient feature if you have pages with long lists and you do not want the browser page to always jump to the top if you trigger a link or button action that stays on the same page. Default: "false"
o.a.m.READONLY_AS_DISABLED_FOR_SELECTS 1.1 true true,false
o.a.m.CONFIG_REFRESH_PERIOD 1.1 2
o.a.m.VIEWSTATE_JAVASCRIPT 1.1 false true,false
o.a.m.RENDER_VIEWSTATE_ID 1.1 true true,false
o.a.m.STRICT_XHTML_LINKS 1.1 true true,false
o.a.m.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON 1.2.3 false true,false This param renders the clear javascript on button necessary only for compatibility with hidden fields feature of myfaces. This is done because jsf ri does not render javascript on onclick method for button, so myfaces should do this.
o.a.m.RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS 1.2.9 false true,false This param renders hidden fields at the end of h:form for link params when h:commandLink + f:param is used, instead use javascript to create them. Set this param to true also enables org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON automatically to ensure consistency. This feature is required to support Windows Mobile 6, because in this environment, document.createElement() and form.appendChild() javascript methods are not supported.
o.a.m.SAVE_FORM_SUBMIT_LINK_IE 1.1 false true,false Add a code that save the form before submit using a link (call to window.external.AutoCompleteSaveForm(form) ). It's a bug on IE.
o.a.m.DELEGATE_FACES_SERVLET 1.2.7
o.a.m.USE_ENCRYPTION 1.1.8 Indicate if the view state is encrypted or not
o.a.m.SECRET 1.1 Defines the secret (Base64 encoded) used to initialize the secret key for encryption algorithm
o.a.m.ALGORITHM 1.1 Indicate the encryption algorithm used for encrypt the view state
o.a.m.SECRET.CACHE 1.1 If is set to "false", the secret key used for encryption algorithm is not cached
o.a.m.ALGORITHM.IV 1.1 Defines the initialization vector (Base64 encoded) used for the encryption algorithm
o.a.m.ALGORITHM.PARAMETERS 1.1 Defines the default mode and padding used for the encryption algorithm
o.a.m.SERIAL_FACTORY 1.1 Defines the factory class name using for serialize/deserialize the view state returned by state manager into a byte array
o.a.m.COMPRESS_STATE_IN_CLIENT 1.1 Indicate if the view state should be compressed before encrypted(optional) and encoded
o.a.m.MAC_ALGORITHM 1.1 Indicate the algorithm used to calculate the Message Authentication Code that is added to the view state
o.a.m.MAC_SECRET 1.1 Define the initialization code that are used to initialize the secret key used on the Message Authentication Code algorithm
o.a.m.MAC_SECRET.CACHE 1.1 If is set to "false", the secret key used for MAC algorithm is not cached
o.a.m.EXPRESSION_FACTORY 1.2.7 This parameter specifies the ExpressionFactory implementation to use.