In order to adopt the JSF 2.0 standard for Trinidad, we have to introduce the ProjectStage API and should use it, where it actually makes sense.
list of all Trinidad configuration parameters
System Properties ( => System.getProperty(....))
- org.apache.myfaces.trinidad.CHECK_STATE_SERIALIZATION
documentation is here:
does make sense to port to ProjectStage API
The trinidad-config.xml file
See here for infos about it:
I think that ONLY this element could make sense:
<debug-output> (e.g. as for PRODUCTION you want FALSE here... )
Settings in the WEB.XML (aka Context Parameters)
Some info is here as well:
The web.xml has different types of settings (some fit to ProjectStage, some not)
Here is a grouped list, where I think they do not make sense with project_stage at all:
- org.apache.myfaces.trinidad.CACHE_VIEW_ROOT
- org.apache.myfaces.trinidad.CLIENT_STATE_METHOD
- org.apache.myfaces.trinidad.CLIENT_STATE_MAX_TOKENS
- org.apache.myfaces.trinidad.CHANGE_PERSISTENCE
- org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE
- org.apache.myfaces.trinidad.ENABLE_LIGHTWEIGHT_DIALOGS
- org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER
- org.apache.myfaces.trinidad.FACELETS_VIEW_MAPPINGS
- org.apache.myfaces.trinidad.UPLOAD_MAX_MEMORY
- org.apache.myfaces.trinidad.UPLOAD_MAX_DISK_SPACE
- org.apache.myfaces.trinidad.UPLOAD_TEMP_DIR
These parameters do make sense:
- org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT
- org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION
- org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION
- org.apache.myfaces.trinidad.resource.DEBUG
This parameter may make sense (caution: it is an internal and temporary param):
org.apache.myfaces.trinidadinternal.ENABLE_PPR_OPTIMIZATION (See http://issues.apache.org/jira/browse/TRINIDAD-1368)
List of valid candidates for ProjectStage API and their values
- org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT
Production => FALSE
other stages => TRUE
- org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION
Production => FALSE
other stages => TRUE
- org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION
Production => FALSE
other stages => TRUE
- org.apache.myfaces.trinidad.resource.DEBUG
Production => FALSE
other stages => TRUE
- org.apache.myfaces.trinidadinternal.ENABLE_PPR_OPTIMIZATION (see above)
Production => FALSE (current default)
other stages => TRUE
<debug-output> (from trinidad-config.xml file)
Production => FALSE
other stages => TRUE
- org.apache.myfaces.trinidad.CHECK_STATE_SERIALIZATION (System Property)
Production => NONE
Development and UnitTest => SESSION,TREE
SystemTest => ALL
Overriding single settings
Perhaps we want to be able to still override settings, regardless for the current STAGE. Means: If the application runs in ProjectStage.Production, we do CSS ompression. BUT... if the web.xml says org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION => TRUE, we should honor that... This would give users a more fine grained control over these configuration settings. Once a user actually overrides stuff, we log a WARNING
Current implementation in Trinidad 2.x
Not all options of the above valid candidate list have been implemented. For instance the ENABLE_PPR_OPTIMIZATION should not be changed by application developers. Similar with the CHECK_STATE_SERIALIZATION parameter: it should be only effected via System Property
- org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT
Production => FALSE
other stages => TRUE
- org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION
Production => FALSE
other stages => TRUE
- org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION
Production => FALSE
other stages => TRUE
- org.apache.myfaces.trinidad.resource.DEBUG
Production => FALSE
other stages => TRUE
<debug-output> (from trinidad-config.xml file)
Production => FALSE
other stages => TRUE
However, in PRODUCTION we generate an additional warning if they have been set (via XML) to some undesired value.
Currently we also generate warning if the org.apache.myfaces.trinidad.CLIENT_ID_CACHING System Property has been disabled in PRODUCTION