0

MVVM Conditional EL Expression [closed]

asked 2013-11-07 15:57:57 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2617 3 8
http://emrpms.blogspot.in...

Hi

One of the property may be null, so in the listbox, i just want to display empty when it is null, i just tried the following statement, but still shows "NULL" in the column

<listcell label="@load(p1.mobile eq null ? ' ' : p1.mobile)" <="" p="">

delete flag offensive retag edit

The question has been closed for the following reason "the question is answered, right answer was accepted" by Senthilchettyin
close date 2013-11-08 07:03:59

Comments

What is the type of 'mobile' variable ? I think it is int type and it cannot be null.

psingh ( 2013-11-08 06:07:48 +0800 )edit

3 Answers

Sort by ยป oldest newest most voted
1

answered 2013-11-08 01:32:07 +0800

RaymondChao gravatar image RaymondChao
386 1 4

updated 2013-11-08 01:32:31 +0800

Hello Senthilchettyi,

I try the expression and it shows empty instead of "NULL". Please take a look at the sample code here.

Is it the statement what you tried?

link publish delete flag offensive edit
0

answered 2013-11-08 07:03:31 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2617 3 8
http://emrpms.blogspot.in...

String only, anyway for now, i just managed as follows

<listcell label="@load(p1.mobile eq 'NULL' ? ' ' : p1.mobile)" />

Thank you very much for doing this example for me

link publish delete flag offensive edit
0

answered 2013-11-08 07:02:21 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2617 3 8
http://emrpms.blogspot.in...

Hi it is string only, Somehow i have managed as follows

<listcell label="@load(p1.mobile eq 'NULL' ? ' ' : p1.mobile)" />

But anyway, thank you very much for doing this example for me.

link publish delete flag offensive edit
0

answered 2013-11-08 02:14:31 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2617 3 8
http://emrpms.blogspot.in...

Yes. But how come same is not working for me :(

link publish delete flag offensive edit

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-11-07 15:57:57 +0800

Seen: 10 times

Last updated: Nov 08 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More