Package org.apache.struts2.interceptor.DateTextFieldInterceptor

Examples of org.apache.struts2.interceptor.DateTextFieldInterceptor.DateWord


        ServletActionContext.setRequest(request);
        ServletActionContext.setResponse(response);
        ServletActionContext.setServletContext(servletContext);

        ActionMapping mapping = null;
        return dispatcher.getContainer()
           .getInstance(ActionProxyFactory.class)
           .createActionProxy(
            namespace,
            actionName,
View Full Code Here


              .getValue().toString(), invocation));
        }
      }
    }

    StringBuffer tmpLocation = new StringBuffer(actionMapper.getUriFromActionMapping(new ActionMapping(actionName,
        namespace, method, null)));
    UrlHelper.buildParametersString(requestParameters, tmpLocation, "&");

    setLocation(tmpLocation.toString());
View Full Code Here

            fullPath.append(namespace).append("/");
        } else {
            fullPath.append("/");
        }
        fullPath.append(defaultAction);
        ActionMapping mapping = new ActionMapping();
        mapping.setName(getActionName(fullPath.toString()));
        mapping.setNamespace(getNamespace(fullPath.toString()));
        if(method != null) {
          mapping.setMethod(method);
        }
        actionMap.put(portletMode, mapping);
    }
View Full Code Here

     *
     * @param request the PortletRequest object.
     * @return the namespace of the action.
     */
    protected ActionMapping getActionMapping(final PortletRequest request) {
        ActionMapping mapping = null;
        String actionPath = null;
        if (resetAction(request)) {
            mapping = (ActionMapping) actionMap.get(request.getPortletMode());
        } else {
            actionPath = request.getParameter(ACTION_PARAM);
View Full Code Here

      init.initStaticContentLoader(config, dispatcher);

      prepare = new PrepareOperations(filterConfig.getServletContext(),
          dispatcher);
      execute = new ExecuteOperations(filterConfig.getServletContext(),
          dispatcher);
      this.excludedPatterns = init.buildExcludedPatternsList(dispatcher);

      postInit(dispatcher, filterConfig);
    } finally {
View Full Code Here

public class GaePrepareAndExecuteFilter extends StrutsPrepareAndExecuteFilter {

  @Override
  public void init(FilterConfig filterConfig) throws ServletException {
    InitOperations init = new GaeInitOperations();
    try {
      FilterHostConfig config = new FilterHostConfig(filterConfig);
      init.initLogging(config);
      Dispatcher dispatcher = init.initDispatcher(config);

      init.initStaticContentLoader(config, dispatcher);

      prepare = new PrepareOperations(filterConfig.getServletContext(),
          dispatcher);
      execute = new ExecuteOperations(filterConfig.getServletContext(),
          dispatcher);
      this.excludedPatterns = init.buildExcludedPatternsList(dispatcher);

      postInit(dispatcher, filterConfig);
    } finally {
      init.cleanup();
    }
  }
View Full Code Here

      init.initLogging(config);
      Dispatcher dispatcher = init.initDispatcher(config);

      init.initStaticContentLoader(config, dispatcher);

      prepare = new PrepareOperations(filterConfig.getServletContext(),
          dispatcher);
      execute = new ExecuteOperations(filterConfig.getServletContext(),
          dispatcher);
      this.excludedPatterns = init.buildExcludedPatternsList(dispatcher);
View Full Code Here

  @Override
  public void init(FilterConfig filterConfig) throws ServletException {
    InitOperations init = new GaeInitOperations();
    try {
      FilterHostConfig config = new FilterHostConfig(filterConfig);
      init.initLogging(config);
      Dispatcher dispatcher = init.initDispatcher(config);

      init.initStaticContentLoader(config, dispatcher);
View Full Code Here

           
            Character antC = null;
            for (Character c : format.toCharArray()) {
             
              try {
                DateWord dateWord = DateWord.get(c);
                if (!c.equals(antC)) {
                 
                  String cssClass = "date_" + dateWord.getDescription();
                  if (params.get("cssClass") != null) {
                    cssClass += " " + params.get("cssClass");
                  }
                 
                  attr = new Attributes();
                      attr.add("type", "text")
                              .addIfExists("class", cssClass)
                              .addIfExists("size", dateWord.getLength())
                              .addIfExists("maxlength", dateWord.getLength())
                              .addIfTrue("disabled", params.get("disabled"))
                              .addIfTrue("readonly", params.get("readonly"))
                              .addIfExists("tabindex", params.get("tabindex"))
                              .addIfExists("style", params.get("cssStyle"))
                              .addIfExists("title", params.get("title"));
                     
                      if (id != null && !"".equals(id)) {
                          attr.addDefaultToEmpty("id", "__" + dateWord.getDescription() + "_" + id);
                      }
                      if (name != null && !"".equals(id)) {
                          attr.addDefaultToEmpty("name", "__" + dateWord.getDescription() + "_" + name);
                      } else {
                          attr.addDefaultToEmpty("name", dateWord.getDescription());
                      }
                      if (date != null) {
                        SimpleDateFormat formatter = new SimpleDateFormat(dateWord.getDateType());
                        attr.addIfExists("value", formatter.format(date), false);
                      }
                     
                      super.start("input", attr);
                      super.end("input");
View Full Code Here

     * the {@link PortletActionContext}into an {@link ApplicationMap}.
     *
     * @return a Map of all application attributes.
     */
    protected Map getApplicationMap() {
        return new PortletApplicationMap(getPortletContext());
    }
View Full Code Here

TOP

Related Classes of org.apache.struts2.interceptor.DateTextFieldInterceptor.DateWord

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.