Web Dynpro – Visible Binding

Home / SAP / ABAP Web Dynpro / Web Dynpro – Visible Binding

Ok, I confess, I’m writing this in advance, because I’m sure the trade show will keep me busy… and afterall, I am in Vegas as you read this =)  Now that’s out of the way, I still wanted to give you something to learn.  So, today I picked up a new trick.  I wanted to make an element dynamically appear or disappear depending on what happens in the application.  The concept is called Visible Binding.  Every element has an attribute called visible, and you can dynamically change the value by binding a variable to that attribute.

It turns out, it’s pretty easy, with just a little bit of effort.  So, here’s what you need to do…

1.  Create a context attribute.  it should be of data type wdui_visibility (I think wdy_boolean would also work).2.  Next, for every element you want to dynamically control, be sure to bind this context attribute.
3.  in your method, you simply need to set the value of the context attribute to 1 for invisible, 2 for visible.

This last part was the part that threw me off, I kept trying 0 & 1.

Have fun… and wish me luck.  If all goes well, I’m making sales right now =)

 

As always, thanks for reading and don't forget to check out our SAP Service Management Products at my other company JaveLLin Solutions,
Mike

Leave a Reply

Your email address will not be published. Required fields are marked *