on 07-27-2015 2:14 AM
Hi,
I have two related screen fields in Webdynpro, and I want one to be visible when the other is not.
I figured I could do this by defining 'visible' property bindings to a WDY_BOOLEAN attribute (called "INTERNAL_CHANNEL") in the View context.
Field 1's 'visible' property is bound to this attribute.
Field 2's 'visible' property is bound to the same attribute, but with the 'Invert Attribute/Property ("NOT")' flag set.
Is this the right way to do it?
I ask because it is shortdumping with the error "Could not find attribute INTERNAL_CHANNEL:NOT".
When I debug IF_WD_CONTEXT_NODE_INFO~GET_ATTRIBUTE, I can see that it finds the attribute INTERNAL_CHANNEL, but gets upset when it can't explicitly find INTERNAL_CHANNEL:NOT.
I've been aware of the 'Invert ' feature for a long time, but this is the first time I've actually used it.
It's hard to believe that such a basic feature has a bug, so I must be doing something wrong...
thanks in advance for your help
Paul Bakker
Hi,
I found the answer - 'solved by self', as they say.
It's an issue that is specific to FMCA Formbundle webdynpros - my visibility flags were apparently clashing with built-in behavior that switches fields on and off based on their prefix (eg 'C_DATE').
I solved it by putting the relevant fields inside a transparent container. I now control the visibility of the container instead.
Thanks for your fast and helpful responses!
cheers
Paul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Paul,
I suggest not to select invert attribute / property ( "not"). Better two context attributes of type WDY_BOOLEAN and bind the attributes to visibile property of fields seperately.
Now based on your requirement, set the property of boolean attribute to abap_true / abap_false.
Hope this helps you to resolve the issue.Revert back with your queries.
Thanks
KH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Paul,
Create two attributes(with the type of WDY_BOOLEAN) to control the visibility property of those two fields ,
Take an example A1 , A2 are your fields and V1 , V2 are the visibility control fields & do the binding as follows
Visibility property of A1 -> bind it with V1
Visibility property of A2 -> bind it with V2
call the following code to make A1 as visible & A2 as invisible.
Element->set_attribute( EXPORTING name = `V1` value = ABAP_TRUE).
Element->set_attribute( EXPORTING name = `V2` value = ABAP_FALSE ).
Similarly do the vise versa to make A1 as invisible & A2 as visible.
- Gowtham
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.