return new ActionMapping(actionName, "", "", parameters);
/** * */ protected ActionMapping getActionMapping(ActionDefinition actionDefinition, Map<String, String> params) { ActionMapping actionMapping = new ActionMapping(actionDefinition.getAction(), actionDefinition.getNamespace(), actionDefinition.getMethod(), params); return actionMapping; }
ActionMapping mapping = new ActionMapping(); mapping.setName(getActionName(fullPath.toString())); mapping.setNamespace(getNamespace(fullPath.toString()));
ActionMapping mapping = new ActionMapping(); if (resetAction(request)) { mapping = (ActionMapping) actionMap.get(request.getPortletMode());
StringBuffer tmpLocation = new StringBuffer(mapper.getUriFromActionMapping(new ActionMapping(actionName, namespace, method, null))); UrlHelper.buildParametersString(requestParameters, tmpLocation, "&");
public ActionMapping getMapping(HttpServletRequest request) { ActionMapping mapping = new ActionMapping(); String uri = getUri(request); parseNameAndNamespace(uri, mapping); handleSpecialParameters(request, mapping); if (mapping.getName() == null) { return null; } // handle "name!method" convention. String name = mapping.getName(); int exclamation = name.lastIndexOf("!"); if (exclamation != -1) { mapping.setName(name.substring(0, exclamation)); mapping.setMethod(name.substring(exclamation + 1)); } return mapping; }
/** * Renders an action URL by consulting the {@link com.opensymphony.webwork.dispatcher.mapper.ActionMapper}. * @param action the action * @param namespace the namespace * @param method the method * @param req HTTP request * @param res HTTP response * @param parameters parameters * @param scheme http or https * @param includeContext should the context path be included or not * @param encodeResult should the url be encoded * @return the action url. */ protected String determineActionURL(String action, String namespace, String method, HttpServletRequest req, HttpServletResponse res, Map parameters, String scheme, boolean includeContext, boolean encodeResult, boolean escapeXml) { String finalAction = findString(action); String finalNamespace = determineNamespace(namespace, getStack(), req); ActionMapping mapping = new ActionMapping(finalAction, finalNamespace, method, parameters); ActionMapper mapper = ActionMapperFactory.getMapper(); String uri = mapper.getUriFromActionMapping(mapping); return UrlHelper.buildUrl(uri, req, res, parameters, scheme, includeContext, encodeResult, false, escapeXml); }
if (actionConfig != null) { ActionMapping mapping = new ActionMapping(action, namespace, actionMethod, parameters); String result = UrlHelper.buildUrl(ActionMapperFactory.getMapper().getUriFromActionMapping(mapping), request, response, null); addParameter("action", result);