1 20 package net.mlw.vlh.web.util; 21 22 import javax.servlet.jsp.PageContext ; 23 24 import org.apache.commons.logging.Log; 25 import org.apache.commons.logging.LogFactory; 26 27 51 public final class ImagesHomeDisplayHelper implements DisplayHelper 52 { 53 56 private static final Log LOGGER = LogFactory 57 .getLog(ImagesHomeDisplayHelper.class); 58 59 65 public static final String IMAGES_HOME_ATTRIBUTE_KEY = "VALUELIST_IMAGE_HOME_ATTRIBUTE_KEY"; 66 67 71 public String help(PageContext pageContext, String key) 72 { 73 if (LOGGER.isDebugEnabled()) 74 { 75 LOGGER.debug("Replacing images home '" 76 + (String ) pageContext 77 .getAttribute(IMAGES_HOME_ATTRIBUTE_KEY) 78 + "' in key '" + key + "'"); 79 } 80 81 return key.replaceAll("@IMAGES_HOME@", (String ) pageContext 82 .getAttribute(IMAGES_HOME_ATTRIBUTE_KEY)); 83 } 84 } | Popular Tags |