Help with syntax struts 2

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with syntax struts 2

Deborah White
Can someone help me with the syntax on this?

<s:if test='%{reportSendType == "EMAIL" && (reportId != "-1" || reportId != "-2" || reportId != "29" || reportId != "30")}'>

CONFIDENTIALITY NOTICE: This communication with its contents may contain confidential and/or legally privileged information. It is solely for the use of the intended recipient(s). Unauthorized interception, review, use or disclosure is prohibited and may violate applicable laws including the Electronic Communications Privacy Act. If you are not the intended recipient, please contact the sender and destroy all copies of the communication.
Reply | Threaded
Open this post in threaded view
|

Re: Help with syntax struts 2

Dave Newton-6
What kind of help?

On Fri, Mar 8, 2019 at 7:05 PM Deborah White <[hidden email]>
wrote:

> Can someone help me with the syntax on this?
>
> <s:if test='%{reportSendType == "EMAIL" && (reportId != "-1" || reportId
> != "-2" || reportId != "29" || reportId != "30")}'>
>
> CONFIDENTIALITY NOTICE: This communication with its contents may contain
> confidential and/or legally privileged information. It is solely for the
> use of the intended recipient(s). Unauthorized interception, review, use or
> disclosure is prohibited and may violate applicable laws including the
> Electronic Communications Privacy Act. If you are not the intended
> recipient, please contact the sender and destroy all copies of the
> communication.
>
--
em: [hidden email]
mo: 908-380-8699
tw: @dave_newton <https://twitter.com/dave_newton>
li: dave-newton <https://www.linkedin.com/in/dave-newton/>
gh: davelnewton <https://github.com/davelnewton>
so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>
bl[0]: Bucky Bits <http://buckybits.blogspot.com/>
bl[1]: Maker's End Blog <https://blog.makersend.com>
sk: davelnewton_skype
Reply | Threaded
Open this post in threaded view
|

Re: Help with syntax struts 2

Paul Zepernick
Assuming the intention is to exclude all those report ids, they should be && and not ||

Paul

Sent from my iPhone

> On Mar 8, 2019, at 7:34 PM, Dave Newton <[hidden email]> wrote:
>
> NOTICE: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> What kind of help?
>
> On Fri, Mar 8, 2019 at 7:05 PM Deborah White <[hidden email]>
> wrote:
>
>> Can someone help me with the syntax on this?
>>
>> <s:if test='%{reportSendType == "EMAIL" && (reportId != "-1" || reportId
>> != "-2" || reportId != "29" || reportId != "30")}'>
>>
>> CONFIDENTIALITY NOTICE: This communication with its contents may contain
>> confidential and/or legally privileged information. It is solely for the
>> use of the intended recipient(s). Unauthorized interception, review, use or
>> disclosure is prohibited and may violate applicable laws including the
>> Electronic Communications Privacy Act. If you are not the intended
>> recipient, please contact the sender and destroy all copies of the
>> communication.
>>
> --
> em: [hidden email]
> mo: 908-380-8699
> tw: @dave_newton <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2Fdave_newton&amp;data=02%7C01%7CPaul.Zepernick%40healthsmart.com%7Cbccd164b9e05413a344908d6a426f7a6%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0%7C636876884606518227&amp;sdata=f4zFxZ7GmehZevyLfwCN7TWaOi7gF0opcs8QsM2JIxo%3D&amp;reserved=0>
> li: dave-newton <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linkedin.com%2Fin%2Fdave-newton%2F&amp;data=02%7C01%7CPaul.Zepernick%40healthsmart.com%7Cbccd164b9e05413a344908d6a426f7a6%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0%7C636876884606518227&amp;sdata=aKj1XOfoVCwWWfvWjJQ794zFKHIDz5e%2BzkTp0l2PVuI%3D&amp;reserved=0>
> gh: davelnewton <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdavelnewton&amp;data=02%7C01%7CPaul.Zepernick%40healthsmart.com%7Cbccd164b9e05413a344908d6a426f7a6%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0%7C636876884606518227&amp;sdata=lfhf7thvZ4DKXLn%2B86CEaBE5Kv3j29HXBBiDN49mzk4%3D&amp;reserved=0>
> so: Dave Newton <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fstackoverflow.com%2Fusers%2F438992%2Fdave-newton&amp;data=02%7C01%7CPaul.Zepernick%40healthsmart.com%7Cbccd164b9e05413a344908d6a426f7a6%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0%7C636876884606518227&amp;sdata=G6ZEm2rpkPd2cQIy%2FYk%2F2CHFAGGuMWv6n6oEcaFwD%2BM%3D&amp;reserved=0>
> bl[0]: Bucky Bits <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuckybits.blogspot.com%2F&amp;data=02%7C01%7CPaul.Zepernick%40healthsmart.com%7Cbccd164b9e05413a344908d6a426f7a6%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0%7C636876884606518227&amp;sdata=QW90IIzMh8Wkag%2F%2F0EdS%2F%2BedDeK4xAyO0he1XPqcuk4%3D&amp;reserved=0>
> bl[1]: Maker's End Blog <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fblog.makersend.com&amp;data=02%7C01%7CPaul.Zepernick%40healthsmart.com%7Cbccd164b9e05413a344908d6a426f7a6%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0%7C636876884606518227&amp;sdata=Jlm7cU1Pt8HYI1bPwVQBgKeZt2nDro%2FAeed4XqBRrS8%3D&amp;reserved=0>
> sk: davelnewton_skype
Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Help with syntax struts 2

Yasser Zamani-2
In reply to this post by Deborah White


On 3/9/2019 3:34 AM, Deborah White wrote:
> Can someone help me with the syntax on this?
>
> <s:if test='%{reportSendType == "EMAIL" && (reportId != "-1" || reportId != "-2" || reportId != "29" || reportId != "30")}'>

Hi Deborah,

I tested the syntax and it works. If it doesn't work there then I guess
if reportId is String then try <s:if
test='%{reportSendType.equalsIgnoreCase("EMAIL") && (reportId != "-1" ||
reportId != "-2" || reportId != "29" || reportId != "30")}'> else then
try <s:if test='%{reportSendType.equalsIgnoreCase("EMAIL") && (reportId
!= -1 || reportId != -2 || reportId != 29 || reportId != 30)}'>. Also
try replacing || with && or != with == variations.

Thanks for using Struts!

Regards.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]