Jump to content
We've recently updated our Privacy Statement, available here ×

multiple conditional expression for a textfield


sulalith

Recommended Posts

Hi:

 

I want to have a text field expression like

 

"if ($V{cars}.equals(new String("BLACK")))

$V{carName}

else if ($V{cars}.equals(new String("RED")))

$V{carMake}"

 

You can one conditional expression but how can you have multiple conditional expressions for a text field expression.

 

Thanks,

 

Sulalith

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Or make three textfiels on the same place and for the first textfield the print when expression:

new Boolean($V{cars}.stringValue == new String("BLACK"))

for the second texftield print when:

new Boolean($V{cars}.stringValue == new String("RED"))

.....

But codyjasperforge his solution is nicer I think :)

mine is easier to understand (I think?)

Post edited by: giroe, at: 2007/07/27 07:15

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...