cancel
Showing results for 
Search instead for 
Did you mean: 

XML formatter for button not working

Former Member
0 Kudos

Hello all,

I am working on this XML formatter.I want to display button depending on the value of Stats,I have written code as below but its not working.

<Button text = "New"     

        press = "create" 

        id = "id1"

    enabled = "{= ${Stats} == '2'}" />

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member183518
Active Participant
0 Kudos

The expression binding *only* allows strict comparison. As santhosh has suggested, you'll have to use '===' for comparison.


<Button text = "New"   

        press = "create"

        id = "id1"

    enabled = "{= ${Stats} === '2'}" />

Check the below link for the list of operators supported.

Expression Binding - User Interface Add-On for SAP NetWeaver - SAP Library

santhu_gowdaz
Active Contributor
0 Kudos

Try,

"{= ${Stats}=== '2'}"

or

"{= ${Stats}=== '2'?true:false}"