ICEfaces
  1. ICEfaces
  2. ICE-6318

Configuration parameter for MandatoryResource annotation

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major 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

        Activity

        Ted Goddard created issue -
        Ted Goddard made changes -
        Field Original Value New Value
        Assignee Mark Collette [ mark.collette ]
        Ted Goddard made changes -
        Salesforce Case []
        Fix Version/s 2.0.0 [ 10230 ]
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P1
        Assignee Mark Collette [ mark.collette ] Ted Goddard [ ted.goddard ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23371 Tue Dec 07 17:17:56 MST 2010 ted.goddard org.icefaces.mandatoryResourceConfiguration implementation (ICE-6318)
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/util/EnvUtils.java
        Hide
        Ted Goddard added a comment -

        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.)

        Show
        Ted Goddard added a comment - 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.)
        Hide
        Ted Goddard added a comment -

        This is not likely to help in the portlet case since it does not entirely prevent the JavaScript resources from being loaded – preventing that would be difficult as the components contain annotations that are automatically processed by JSF.

        Show
        Ted Goddard added a comment - This is not likely to help in the portlet case since it does not entirely prevent the JavaScript resources from being loaded – preventing that would be difficult as the components contain annotations that are automatically processed by JSF.
        Ted Goddard made changes -
        Salesforce Case []
        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
        comma separated list: named resources will be loaded

        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
        Hide
        Ted Goddard added a comment -

        It's possible that this should remain an undocumented feature since the specifics of how components declare their resources is subject to change.

        Show
        Ted Goddard added a comment - It's possible that this should remain an undocumented feature since the specifics of how components declare their resources is subject to change.
        Ted Goddard made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Ted Goddard added a comment -

        Configure as follows to suppress all preloading of YUI JavaScript:

        <context-param>
        <param-name>org.icefaces.mandatoryResourceConfiguration</param-name>
        <param-value></param-value>
        </context-param>

        If this parameter is omitted from web.xml, all YUI JavaScript will be preloaded.

        Show
        Ted Goddard added a comment - Configure as follows to suppress all preloading of YUI JavaScript: <context-param> <param-name>org.icefaces.mandatoryResourceConfiguration</param-name> <param-value></param-value> </context-param> If this parameter is omitted from web.xml, all YUI JavaScript will be preloaded.
        Hide
        Ted Goddard added a comment -

        "Suppress preloading" is likely the correct value for ace-showcase since navigation is through full page redirects.

        Show
        Ted Goddard added a comment - "Suppress preloading" is likely the correct value for ace-showcase since navigation is through full page redirects.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23389 Wed Dec 08 15:19:38 MST 2010 ted.goddard sample configuration for mandatoryResourceComponent (ICE-6318)
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/samples/ace/showcase/src/main/webapp/WEB-INF/web.xml
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1

          People

          • Assignee:
            Ted Goddard
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: