Package com.opensymphony.xwork2.util

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


        bean.setLocation(location);

        ValueStack stack = ActionContext.getContext().getValueStack();
        stack.push(bean);

        assertEquals(location, stack.findValue("location"));

        result.setLocation("${location}");
        result.execute(actionInvocation);
        assertEquals(location, result.finalLocation);
    }
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  = -1868652740559524844L;

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

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

        // Construct the data source for the report.
        ValueStack stack = invocation.getStack();
        ValueStackDataSource stackDataSource = null;

        Connection conn = (Connection) stack.findValue(connection);
        if (conn == null)
            stackDataSource = new ValueStackDataSource(stack, dataSource);

        // Determine the directory that the report file is in and set the reportDirectory parameter
        // For WW 2.1.7:
View Full Code Here

                parameters.put(JRParameter.REPORT_TIME_ZONE, tz);
            }
        }

        // 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

            String listValue = (String) params.get("listValue");
            while (itt.hasNext()) {
                Object optGroupBean = itt.next();
                stack.push(optGroupBean);

                Object tmpKey = stack.findValue(listKey != null ? listKey : "top");
                String tmpKeyStr = StringUtils.defaultString(tmpKey.toString());
                Object tmpValue = stack.findValue(listValue != null ? listValue : "top");
                String tmpValueStr = StringUtils.defaultString(tmpValue.toString());
                boolean selected = ContainUtil.contains(value, tmpKeyStr);
                writeOption(tmpKeyStr, tmpValueStr, selected);
View Full Code Here

                Object optGroupBean = itt.next();
                stack.push(optGroupBean);

                Object tmpKey = stack.findValue(listKey != null ? listKey : "top");
                String tmpKeyStr = StringUtils.defaultString(tmpKey.toString());
                Object tmpValue = stack.findValue(listValue != null ? listValue : "top");
                String tmpValueStr = StringUtils.defaultString(tmpValue.toString());
                boolean selected = ContainUtil.contains(value, tmpKeyStr);
                writeOption(tmpKeyStr, tmpValueStr, selected);

                stack.pop();
View Full Code Here

    {
        String 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

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.