/** * Wrapper for getAction(String) * * @param path Name given to local or global forward. */ public String action(String path) { return getAction(path); }
/** * Return the URL for the specified ActionMapping, * otherwise return <code>null</code>. * * @param path Name given to local or global forward. */ public String getAction(String path) { return getEncodeURL(getActionMappingURL(path)); }
/** * <p> Wrapper for getLink(String) </p> * * @param name Name given to local or global forward. */ public String link(String name) { return getLink(name); }
/** * Return the path for the specified forward, * otherwise return <code>null</code>. * * @param name Name given to local or global forward. */ public String getLink(String name) { ActionForward forward = getActionForward(name); if (forward == null) return null; StringBuffer path = new StringBuffer(this.request.getContextPath()); path.append(forward.getPath()); // :TODO: What about runtime parameters? return getEncodeURL(path.toString()); }
String servletMapping = getServletMapping(); if (question >= 0) queryString = action.substring(question); String actionMapping = getActionMappingName(action); if (servletMapping.startsWith("*.")) { value.append(actionMapping);
/** * Return the localized message for the specified key, * otherwise return <code>null</code>. * * @param key Message key */ public String getMessage(String key) { MessageResources resources = getMessageResources(); if (resources == null) return null; return resources.getMessage(RequestUtils.getUserLocale(request, null), key); }
/** * Wrapper for getMessage(String,Object[]) * * @param key Message key to be looked up and returned * @param args Replacement parameters for this message */ public String message(String key, Object args[]) { return getMessage(key, args); }
public ActionForm getActionForm() { // Is there a mapping associated with this request? ActionMapping mapping = getMapping(); if (mapping == null) return (null); // Is there a form bean associated with this mapping? String attribute = mapping.getAttribute(); if (attribute == null) return (null); // Look up the existing form bean, if any ActionForm instance = null; if ("request".equals(mapping.getScope())) { instance = (ActionForm) this.request.getAttribute(attribute); } else { instance = (ActionForm) this.session.getAttribute(attribute); } return instance; }
/** * <p> Return the path for the specified forward, otherwise return * <code>null</code>. </p> * * @param name Name given to local or global forward. */ public String getLink(String name) { ActionForward forward = getActionForward(name); if (forward == null) { return null; } StringBuffer path = new StringBuffer(this.request.getContextPath()); path.append(forward.getPath()); // :TODO: What about runtime parameters? return getEncodeURL(path.toString()); }
String servletMapping = getServletMapping(); String actionMapping = getActionMappingName(action);
/** * <p> Return the localized message for the specified key, otherwise * return <code>null</code>. </p> * * @param key Message key */ public String getMessage(String key) { MessageResources resources = getMessageResources(); if (resources == null) { return null; } return resources.getMessage(RequestUtils.getUserLocale(request, null), key); }
/** * Wrapper for getMessage(String) * * @param key Message key */ public String message(String key) { return getMessage(key); }
public ActionForm getActionForm() { // Is there a mapping associated with this request? ActionMapping mapping = getMapping(); if (mapping == null) { return (null); } // Is there a form bean associated with this mapping? String attribute = mapping.getAttribute(); if (attribute == null) { return (null); } // Look up the existing form bean, if any ActionForm instance; if ("request".equals(mapping.getScope())) { instance = (ActionForm) this.request.getAttribute(attribute); } else { instance = (ActionForm) this.session.getAttribute(attribute); } return instance; }
/** * <p> Return the URL for the specified ActionMapping, otherwise return * <code>null</code>. </p> * * @param path Name given to local or global forward. */ public String getAction(String path) { return getEncodeURL(getActionMappingURL(path)); }
/** * Return true if a message string for the specified message key * is present for the user's Locale. * * @param key Message key */ public boolean isMessage(String key) { // Look up the requested MessageResources MessageResources resources = getMessageResources(); if (resources == null) { return false; } // Return the requested message presence indicator return resources.isPresent(RequestUtils.getUserLocale(request, null), key); }
/** * <p> Wrapper for getMessage(String) </p> * * @param key Message key */ public String message(String key) { return getMessage(key); }
/** * Wrapper for getLink(String) * * @param name Name given to local or global forward. */ public String link(String name) { return getLink(name); }
/** * <p> Wrapper for getAction(String) </p> * * @param path Name given to local or global forward. */ public String action(String path) { return getAction(path); } }
/** * <p> Return true if a message string for the specified message key is * present for the user's Locale. </p> * * @param key Message key */ public boolean isMessage(String key) { // Look up the requested MessageResources MessageResources resources = getMessageResources(); if (resources == null) { return false; } // Return the requested message presence indicator return resources.isPresent(RequestUtils.getUserLocale(request, null), key); }
/** * <p> Wrapper for getMessage(String,Object[]) </p> * * @param key Message key to be looked up and returned * @param args Replacement parameters for this message */ public String message(String key, Object[] args) { return getMessage(key, args); }