logic:empty probelm in struts
Hi guys,
Now I want to use logic:empty tags in struts. But i want to check like
if(a == 0 and b==0) condition.I want to check Multiple condition.
Now I have two property files One is Warning Address and another one Failure Address. I want to check both properties in one Logic:empty tag.
Now this is working properly.
<logic:empty name="BeanForm" property="warningAddress" scope="request">
No Records.
</logic:empty>
Is it possible to check two conditions like
<logic:empty name="BeanForm" property="warningAddress and "failureAddress" scope="request">
No Records
</logic:empty>
awaiting for kind reply
Regards
Pooja
# 1
> Hi guys,
>
> Now I want to use logic:empty tags in struts. But
> i want to check like
>
> if(a == 0 and b==0) condition.I want to check
> Multiple condition.
>
Using Struts taglibs you can definitely do that.
>
> Now I have two property files One is Warning Address
> and another one Failure Address. I want to check both
> properties in one Logic:empty tag.
>
Why do you want to do that only using ONE logic:empty tag? Why not TWO?
> Now this is working properly.
>
> <logic:empty name="BeanForm"
> property="warningAddress" scope="request">
> o Records.
> </logic:empty>
>
That definitely works!!
> Is it possible to check two conditions like
> <logic:empty name="BeanForm" property="warningAddress
> and "failureAddress" scope="request">
> No Records
> /logic:empty>
You can check for two conditions using TWO logic:empty tags
<logic:empty name="BeanForm" property="warningAddress" scope="request">
//Put your message here when warning address doesn't exist
<logic:empty name="BeanForm" property="failureAddress" scope="request">
//Put your message here when warning address and failure address doesn't exist
</logic:empty>
</logic:empty>
>
> awaiting for kind reply
> Regards
> Pooja
You can refer to the taglibs at http://struts.apache.org/1.x/struts-taglib/tlddoc/index.html.
SirG
# 2
hi pooja,
You can check the two conditions using TWO logic:empty tags
<logic:empty name="BeanForm" property="warningAddress" scope="request">
//message - when warning address doesn't exist
<logic:empty name="BeanForm" property="failureAddress" scope="request">
//message - when warning address and failure address doesn't exist
</logic:empty>
</logic:empty>
for more clarifications kindly go thru the following link
http://struts.apache.org/1.1/userGuide/printer/struts-logic.html