struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shuai Zheng" <zhengshuai1...@gmail.com>
Subject How to compare String in OGNL?
Date Mon, 07 Jan 2008 11:44:01 GMT
Dear All,

I want to know how to compare String using OGNL in jsp page for struts 2:

I have following codes:

<s:property value="%{(invProducts.type == 'T')?'Type A':' Type B '}"/>,

But always nothing return, and I try many different ways but the operator ==
looks like can't support String type.

I believe there should have a simple way to do it or I make some stupid
mistakes but I can't find it out by myself

Thanks very much,

Regards,

Zheng Shuai

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message