Details
-
Type: New Feature
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-Beta2
-
Fix Version/s: 2.0.0
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ICEfaces, ACE
Description
A context parameter is required to configure resource loading via the MandatoryResource annotation. Currently, all resources for all components are added, whether those components are used in the application or not. For instance, fileEntry does not require any YUI resources, but is included in the same .jar file as other components that force the loading of these resources.
org.icefaces.mandatoryResourceConfiguration will be a web.xml context parameter as follows:
undefined: all resources will be loaded
empty string: no resources will be loaded
space separated list: named components will have their resources loaded
Tested in ace-showcase with the following web.xml configuration parameter:
<context-param>
<param-name>org.icefaces.mandatoryResourceConfiguration</param-name>
<param-value>org.icefaces.component.sliderentry.SliderEntry org.icefaces.component.datetimeentry.DateTimeEntry</param-value>
</context-param>
Feature was modified to expect a space-separated list rather than comma-separated. Classnames specify which components will have their resources added to every application page. If the component page is visited via a link, the resources will still be loaded for that page. (The only complication arises if a component is added dynamically via Ajax.)