Package org.apache.struts2.components

Examples of org.apache.struts2.components.Anchor


    assert (body != null);

    try {
      writer.write(body);
    } catch (IOException e) {
      throw new StrutsException("IOError while writing the body: " + e.getMessage(), e);
    }
    if (popComponentStack) {
      popComponentStack();
    }
    return false;
View Full Code Here


        + getComponentName()
        + "', field '"
        + field
        + (parameters != null && parameters.containsKey("name") ? "', name '"
            + parameters.get("name") : "") + "': " + errorMsg;
    throw new StrutsException(msg, e);
  }
View Full Code Here

      }
      try {
        objectFactory.getClassInstance(actionClass.getName());
      } catch (ClassNotFoundException e) {
        logger.error("Object Factory was unable to load class {}", actionClass.getName());
        throw new StrutsException("Object Factory was unable to load class " + actionClass.getName(),
            e);
      }
      String[] beanNames = beanNameFinder.getBeanNames(actionClass);
      switch (beanNames.length) {
      case 0:
View Full Code Here

                if(it.hasNext()) {
                    sb.append("&");
                }
            }
            } catch (UnsupportedEncodingException e) {
                throw new StrutsException("Encoding "+ENCODING+" not found");
            }
        }
        RenderResponse resp = PortletActionContext.getRenderResponse();
        RenderRequest req = PortletActionContext.getRenderRequest();
        return resp.encodeURL(req.getContextPath() + sb.toString());
View Full Code Here

                mapping = actionMapper.getMapping(httpRequest, dispatcherUtils.getConfigurationManager());
            }
        }
       
        if (mapping == null) {
            throw new StrutsException("Unable to locate action mapping for request, probably due to " +
                    "an invalid action path: "+actionPath);
        }
        return mapping;
    }
View Full Code Here

    protected String portletUrlType;
    protected String anchor;
    protected String forceAddSchemeHostAndPort;
   
    public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new Anchor(stack, req, res);
    }
View Full Code Here

    }
   
    protected void populateParams() {
        super.populateParams();

        Anchor tag = (Anchor) component;
        tag.setHref(href);
        tag.setIncludeParams(includeParams);
        tag.setScheme(scheme);
        tag.setValue(value);
        tag.setMethod(method);
        tag.setNamespace(namespace);
        tag.setAction(action);
        tag.setPortletMode(portletMode);
        tag.setPortletUrlType(portletUrlType);
        tag.setWindowState(windowState);
        tag.setAnchor(anchor);

        if (encode != null) {
            tag.setEncode(Boolean.valueOf(encode).booleanValue());
        }
        if (includeContext != null) {
            tag.setIncludeContext(Boolean.valueOf(includeContext).booleanValue());
        }
        if (escapeAmp != null) {
            tag.setEscapeAmp(Boolean.valueOf(escapeAmp).booleanValue());
        }
      if (forceAddSchemeHostAndPort != null) {
            tag.setForceAddSchemeHostAndPort(Boolean.valueOf(forceAddSchemeHostAndPort).booleanValue());
        }
    }
View Full Code Here

    public String getBeanName() {
        return "a";
    }

    protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new Anchor(stack, req, res);
    }
View Full Code Here

        expectFind("actionErrors", this.errors);
    }

    @Override
    protected UIBean getUIBean() {
        return new Anchor(stack, request, response);
    }
View Full Code Here

    public String getBeanName() {
        return "a";
    }

    protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new Anchor(stack, req, res);
    }
View Full Code Here

TOP

Related Classes of org.apache.struts2.components.Anchor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.