SkinExtension's getTranslatedValue performance improvement
----------------------------------------------------------

                 Key: TRINIDAD-133
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-133
             Project: MyFaces Trinidad
          Issue Type: Improvement
          Components: Skinning
            Reporter: Jeanne Waldman


 I wanted to log this TODO  to improve the performance of SkinExtension's 
getTranslatedValue:

// TODO Cache base skin's non-null translatedValue with this skin to
// make it faster.


 /**
    * Override of Skin.getTranslatedValue() which
    * supports pulling translations from Skin and if not found from the base 
Skin.
  */
  @Override
  public Object getTranslatedValue(
    LocaleContext lContext,
    String        key
    ) throws MissingResourceException
  {
    // Look for the skin's translated value (first bundle name, then registered 
bundles)
    // if that's not found, then look in the base skin's translated value.
    // getCachedTranslatedValue will protect against MissingResourceExceptions
    Object translatedValue = super.getCachedTranslatedValue(lContext, key);
    // TODO Cache base skin's non-null translatedValue with this skin to
    // make it faster.
    if (translatedValue == null)
      return getBaseSkin().getTranslatedValue(lContext, key);
    else
      return translatedValue;
  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to