struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry D. Wilson (JIRA)" <>
Subject [jira] [Created] (WW-4382) Enhance Single Character Test
Date Mon, 04 Aug 2014 18:36:13 GMT
Larry D. Wilson created WW-4382:

             Summary: Enhance Single Character Test
                 Key: WW-4382
             Project: Struts 2
          Issue Type: Improvement
    Affects Versions:
         Environment: Any
            Reporter: Larry D. Wilson
            Priority: Minor

When testing for a single character, Struts2 requires a very specific format that is not required
for strings longer than 1 character:

<!-- 1 - Doesn't display anything -->
<s:property value="hasLoginAccess" />
<s:if test="hasLoginAccess == 'Y'">

<!-- 2 - Displays checkmark -->
<s:if test='hasLoginAccess == "Y"'>

While single quotes works comparing strings longer than 1 character, it does not work with
1 character strings. This is inconsistent behavior.

For example, this test code matches because the string is longer than 1 character:
<s:if test="clientUser.userName == ''">

This message was sent by Atlassian JIRA

View raw message