enum « Struts « JSP-Servlet Q&A





1. struts 2 if : compare enum    stackoverflow.com

I have a Struts 2 jsp with the following code...

<s:iterator value="categories" id="category" status="iteratorStatus">
<s:if test='#category == "M" '>  snip </s:if>
The problem is the java code behind categories is..
    ...

2. How to use an enum in Struts html:select tag    stackoverflow.com

I am currently trying to create a html:select tag from an enum so it could be set in a specific object:

class someClass {
    SomeEnum someProperties = null;
  ...

3. Struts 2 iterate enum    stackoverflow.com

Is it possible in Struts 2 to iterate an enum using the tag s:iterator? Right now I'm doing it using a list of String, but is it possible to use an enum ...

4. How to access enum in jsp?    struts.1045723.n5.nabble.com

How do I reference an enum variable in an test attribute? This is the situation, and the results I get: 1) I have a enum defined as public enum ActionState { NONE, INIT, LIST, ADD, EDIT, DELETE ... } 2) ...