Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

doble condition with ternary operator  RSS feed

 
jhon masco
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I want to do this:

but....how to use scriplet in the JSP page is Bad then I am using ternary operators. I trying something as:

but not work!!! with "&&" conditional, is to say, not work for 2 condition, only one.
if i write this:

work fine.

Then my question is How I write a double condition with ternary operators ??? Please

Muchas Gracias
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66205
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The same way that you would in Java: proper use of parentheses.
 
jhon masco
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:The same way that you would in Java: proper use of parentheses.

Good night bear Thanks for the reply.
You mean :

or

because both not work!!!

PD: I trying to write <-a></a-> labels correctly but the system not permit me
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's unreadable like that anyway: move the declaration out of the tag and just set the hidden or visible part.
 
jhon masco
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:It's unreadable like that anyway: move the declaration out of the tag and just set the hidden or visible part.



 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!