Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.util
Class ComponentUtils

    java.lang.Object
      org.apache.struts2.util.ComponentUtils

    public class ComponentUtils

extends Object

Various static methods used with components

Constructor Summary
`ComponentUtils()`

Method Summary
`static boolean` | `altSyntax(ValueStack stack)` Is the altSyntax enabled? [TRUE]
`static boolean` | `containsExpression(String expr)`
`static boolean` | `isExpression(String expr)` Check if object is expression base on altSyntax
`static String` | `stripExpressionIfAltSyntax(ValueStack stack, String expr)` If altSyntax (%{...}) is applied, simply strip the "%{" and "}" off.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ComponentUtils

    public ComponentUtils()

Method Detail

### stripExpressionIfAltSyntax

    public static String stripExpressionIfAltSyntax(ValueStack stack,
                                                    String expr)

  If altSyntax (%{...}) is applied, simply strip the "%{" and "}" off.

  Parameters:
    `stack` - the ValueStack where the context value is searched for.
    `expr` - the expression (must be not null)
  Returns:
    the stripped expression if altSyntax is enabled. Otherwise the parameter expression is returned as is.

### altSyntax

    public static boolean altSyntax(ValueStack stack)

  Is the altSyntax enabled? [TRUE]

  Parameters:
    `stack` - the ValueStack where the context value is searched for.
  Returns:
    true if altSyntax is activated. False otherwise. See `struts.properties` where the altSyntax flag is defined.

### isExpression

    public static boolean isExpression(String expr)

  Check if object is expression base on altSyntax

  Parameters:
    `expr` - to treat as an expression
  Returns:
    true if it is an expression

### containsExpression

    public static boolean containsExpression(String expr)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000–2017 Apache Software Foundation. All rights reserved.