Package com.opensymphony.xwork2.util

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


            try {
                // If not found, then try the ValueStack
                ctx.put("__requestWrapper.getAttribute", Boolean.TRUE);
                ValueStack stack = ctx.getValueStack();
                if (stack != null) {
                    attribute = stack.findValue(s);
                }
            } finally {
                ctx.put("__requestWrapper.getAttribute", Boolean.FALSE);
            }
        }
View Full Code Here


                if (i < expectedValues.size()) {
                    expectedValue = (String) expectedValues.get(i);
                }

                String value = (String) stack.findValue(propertyName, String.class);
                Assert.assertEquals(expectedValue, value);
            }
        } else {
            LOG.error("One of expectedValues = " + expectedValues + " and propertyNames = " + propertyNames + " was null or empty.");
            Assert.fail();
View Full Code Here

        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

                res.setContentType("text/plain");

                try {
                    PrintWriter writer =
                            ServletActionContext.getResponse().getWriter();
                    writer.print(stack.findValue(cmd));
                    writer.close();
                } catch (IOException ex) {
                    ex.printStackTrace();
                }
                cont = false;
View Full Code Here

        ValueStack stack = invocation.getStack();

        try {
            stack.push(value);

            return "'" + stack.findValue("top", String.class) + "'";
        } finally {
            stack.pop();
        }
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    public static String getConversationId(String conversationName) {
        String id = ConversationUtil.getConversationId(conversationName);
        if (id == null) {
            ValueStack stack = ActionContext.getContext().getValueStack();
            id = (String) ((Map<String, Object>) stack
                    .findValue(StrutsScopeConstants.CONVERSATION_ID_MAP_STACK_KEY))
                    .get(conversationName);
        }
        return id;
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    public static String getConversationId(String conversationName) {
        String id = ConversationUtil.getId(conversationName);
        if (id == null) {
            ValueStack stack = ActionContext.getContext().getValueStack();
            id = (String) ((Map<String, Object>) stack
                    .findValue(StrutsScopeConstants.CONVERSATION_ID_MAP_STACK_KEY))
                    .get(conversationName);
        }
        return id;
    }
View Full Code Here

//                rootObject = this..writeSMD(invocation);
//            } else {
                // generate JSON
                if (this.getRoot() != null) {
                    ValueStack stack = invocation.getStack();
                    rootObject = stack.findValue(this.getRoot());
                } else {
                    rootObject = invocation.getAction();
                }
//            }
            if(rootObject == null){
View Full Code Here

        .get(StrutsStatics.HTTP_RESPONSE);

    Object rootObject;
    if (this.getRoot() != null) {
      ValueStack stack = invocation.getStack();
      rootObject = stack.findValue(this.getRoot());
    } else {
      rootObject = invocation.getAction();
    }
    // }
    if (rootObject == null) {
View Full Code Here

  @SuppressWarnings("unchecked")
  public static String getConversationId(String conversationName) {
    String id = ConversationUtil.getConversationId(conversationName);
    if (id == null) {
      ValueStack stack = ActionContext.getContext().getValueStack();
      id = (String) ((Map<String, Object>) stack.findValue(StrutsScopeConstants.CONVERSATION_ID_MAP_STACK_KEY)).get(conversationName);
    }
    return id;
  }

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