@Override public ActionParameters getActionParameters() { return ((ActionRequest)wrapped).getActionParameters(); }
/** * Producer method for the action parameters. */ @Produces @PortletRequestScoped @Named("actionParams") @Typed(ActionParameters.class) public static ActionParameters getActionParameters() { PortletArtifactProducer pap = producers.get(); assert pap != null; ActionParameters obj = null; if (pap.req instanceof ActionRequest) { obj = ((ActionRequest)pap.req).getActionParameters(); } return obj; }
@Override public void processAction(ActionRequest req, ActionResponse resp) throws PortletException, IOException { String an = req.getActionParameters().getValue(ACTION_NAME); String id = (an != null) ? an : ""; MethodIdentifier mi = new MethodIdentifier(portletName, id, MethodType.ACTION); List<AnnotatedMethod> meths = getMethods(mi); if (meths.size() == 0) { // If an action URL was activated, but action method could not be // found, // add appropriate error string. StringBuilder txt = new StringBuilder(128); txt.append("Action method not found. Action name=\"").append(an).append("\""); LOG.warn(txt.toString()); return; } assert meths.size() == 1; AnnotatedMethod meth = meths.get(0); // Set up the method arguments and do the incovation Object[] args = new Object[] { req, resp }; invokePortletMethod(meth, args); }
setAttribute(request, "clientDataRequest"); if (request instanceof ActionRequest) { setAttribute(((ActionRequest) request).getActionParameters(), "actionParameters"); } else { setAttribute(((ResourceRequest) request).getResourceParameters(), "resourceParameters");