Package com.opensymphony.xwork2.util

Examples of com.opensymphony.xwork2.util.ValueStack.findValue()


    {
        actualName = findString( nameAttr );
        String msg = null;
        ValueStack stack = getStack();
        //find the name on the valueStack, and cast it to a date
        Object dateObj = stack.findValue( actualName );

        if ( dateObj != null )
        {
            if ( dateObj instanceof Date )
            {
View Full Code Here


                rootObject = this.writeSMD(invocation);
            } else {
                // generate JSON
                if (this.root != null) {
                    ValueStack stack = invocation.getStack();
                    rootObject = stack.findValue(this.root);
                } else {
                    rootObject = invocation.getAction();
                }
            }
            json = JSONUtil.serialize(rootObject, excludeProperties, includeProperties, ignoreHierarchy, enumAsBean, excludeNullProperties);
View Full Code Here

        //root is based on OGNL expression (action by default)
        Object rootObject = null;
        if (this.root != null) {
            ValueStack stack = invocation.getStack();
            rootObject = stack.findValue(this.root);
        } else {
            rootObject = invocation.getAction();
        }

        Class clazz = rootObject.getClass();
View Full Code Here

        }

        Object rootObject;
        if (this.root != null) {
            ValueStack stack = invocation.getStack();
            rootObject = stack.findValue(this.root);

            if (rootObject == null) {
                throw new RuntimeException("Invalid root expression: '" + this.root + "'.");
            }
        } else {
View Full Code Here

        File directory = new File(systemId.substring(0, systemId.lastIndexOf(File.separator)));
        parameters.put("reportDirectory", directory);
        parameters.put(JRParameter.REPORT_LOCALE, invocation.getInvocationContext().getLocale());

        // Add any report parameters from action to param map.
        Map reportParams = (Map) stack.findValue(reportParameters);
        if (reportParams != null) {
          LOG.debug("Found report parameters; adding to parameters...");
          parameters.putAll(reportParams);
        }
View Full Code Here

                exporter = new JRRtfExporter();
            } else {
                throw new ServletException("Unknown report format: " + format);
            }
           
            Map exportParams = (Map) stack.findValue(exportParameters);
            if (exportParams != null) {
              LOG.debug("Found export parameters; adding to exporter parameters...");
              exporter.getParameters().putAll(exportParams);
            }
View Full Code Here

        final ValueStack stack = ActionContext.getContext().getValueStack();

        if (application != null)
            for (int i = 0; i < application.length; i++) {
                String string = application[i];
                Object value = stack.findValue(string);
                if (LOG.isDebugEnabled()) {
                    LOG.debug("application scoped variable saved " + string + " = " + String.valueOf(value));
                }

                //if( value != null)
View Full Code Here

                for (int i = 0; i < session.length; i++) {
                    String string = session[i];
                    if (ends) {
                        ses.remove(key + string);
                    } else {
                        Object value = stack.findValue(string);

                        if (LOG.isDebugEnabled()) {
                            LOG.debug("session scoped variable saved " + string + " = " + String.valueOf(value));
                        }
View Full Code Here

  private static final long  serialVersionUID  = RockFrameworkVersion.VERSION;

  protected Object findValue(final ActionInvocation invocation, final String expr) {
    ValueStack stack = invocation.getStack();
    return stack.findValue(expr);
  }

  protected HttpServletRequest getRequest() {
    return Struts2.getRequest();
  }
View Full Code Here

            response.setContentType(mimeType);

            Object result = invocation.getAction();
            if (exposedValue != null) {
                ValueStack stack = invocation.getStack();
                result = stack.findValue(exposedValue);
            }

            Source xmlSource = getDOMSourceForStack(result);

            // Transform the source XML to System.out.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.