Hi Sarath,

this is content of my TestAction:
---------------------------------------------------------------------------
    public List<String> getMyList() {
        ArrayList<String> result = new ArrayList<String>();
        result.add("1.");
        result.add("2..");
        result.add("3...");
        return result;
    }

    public String getDeploymentVersion() {
        return "All";
    }
---------------------------------------------------------------------------


this is content of my test.jsp
---------------------------------------------------------------------------
Test:<br>
<s:iterator value="myList" id="entr">
        entry: <s:property value="entr"/>, <s:property value="length()"/>
        <s:if test="deploymentVersion != 'All'">
                not equal
        </s:if>
        <s:if test="deploymentVersion == 'All'">
                equal
        </s:if>
        <br>
</s:iterator>
---------------------------------------------------------------------------

and this is the output:
---------------------------------------------------------------------------
Test:
entry: 1., 2 equal
entry: 2.., 3 equal
entry: 3..., 4 equal
---------------------------------------------------------------------------

So if i properly understod Your problem i have no such one.
Any thoughts?
My environement: S2 2.0.11.1

Best greetings,
Paweł Wielgus.


On 26/06/2008, sharath karnati <[EMAIL PROTECTED]> wrote:
> The deploymentVersion is from 'action'. I even tried with <c:if> and it is 
> also having same issue.
>
>  Thanks,
>  Sharath.
>
>  --- On Wed, 6/25/08, Paweł Wielgus <[EMAIL PROTECTED]> wrote:
>
>  From: Paweł Wielgus <[EMAIL PROTECTED]>
>  Subject: Re: weird problem <s:iterator> tag.
>  To: "Struts Users Mailing List" <user@struts.apache.org>, [EMAIL PROTECTED]
>  Date: Wednesday, June 25, 2008, 5:38 PM
>
>
>  Hi Sarath,
>  where from this deploymentVersion is from (action, session)?
>  Such construction works for me in many places, so i would like to
>  replicate this problem.
>
>  Best greetings,
>  Paweł Wielgus.
>
>
>  2008/6/25 sharath karnati <[EMAIL PROTECTED]>:
>  > Hi All,
>  >
>  >     In .jsp file, I'm having following code which is using
>  <s:iterator> tag.
>  >
>  >    <s:iterator value="userCommentsList"
>  id="usercomment">
>  >  <tr>
>  >   <td align="center"> <s:property
>  value="#usercomment.projectNm" /> </td>
>  >   <td align="center"> <s:property
>  value="#usercomment.subject" /> </td>
>  >   <td align="center"> <s:property
>  value="#usercomment.comments" /> </td>
>  >
>  >   <s:if test="%{deploymentVersion !='All'}">
>  >    <td align="center"> <s:date
>  name="#usercomment.closingDate" format="MM/dd/yyyy" />
>  </td>
>  >   </s:if>
>  >  </tr>
>  >  </s:iterator>
>  >
>  >    The <s:iterator> tag is showing properties values(projectNm,
>  subject,comments)correctly. 'deploymentVersion' property is not a
>  member of  'usercomment' and when it is having value 'All'
>  still it is displaying '#usercomment.closingDate' value. I think that
>  it is not validating <s:if> condition correctly inside
>  <s:iterator>. If I move this condition outside of <s:iterator> it
>  is working as expected.
>  >
>  >    Please let me know, how to validate the properties which are not member
>  of <s:iterator> value.
>  >
>  > Thanks,Sharath.
>  >
>  >
>  >
>  >
>
>
>

Reply via email to