openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

Binding updates on "visible" attributes of internal controls within XMLComposite controls are not working

Open fuchsvomwalde opened this issue 8 years ago • 5 comments

OpenUI5 version: 1.58.0

Browser/version (+device/version): Chrome Canery v70 on latest macOS

Any other tested browsers/devices(OK/FAIL): –

URL (minimal example if possible): –

User/password (if required and possible - do not post any confidential information here): –

Steps to reproduce the problem:

  1. change an exposed property of the XMLComposite control binded internally to a visible attribute of an internal control (e.g. sap.m.Text, sap.m.FlexBox or any other control)

What is the expected result? The visibility of the internal control should be toggled any time the input property changes.

What happens instead? Only the first state of the property is taken into account for the visible attribute of any internal control used in the XMLComposite control. Bindings on the visible attribute behave like a one-time binding.

Any other information? (attach screenshot if possible) I'm aware of the binding limitations described in the docs: https://openui5nightly.hana.ondemand.com/#/topic/c6e0122ca9874844a214018bec02e74a But also when using simple property binding within the XML composite control, the visible attribute can not be changed anymore after the first assignment.

fuchsvomwalde avatar Aug 16 '18 14:08 fuchsvomwalde

Hello @fuchsvomwalde ,

Can you provide us with an example?

Best Regards, Gergana

GerganaKremenska avatar Aug 22 '18 07:08 GerganaKremenska

@GerganaKremenska Sure! Here is a detailed example: http://plnkr.co/edit/JXohbxXlwCeoPcave2Gs?p=preview I used three different patterns how to toggle the visibility of a sap.m.Label. As you can se it works everytime within the XML view, but only in one case when the same patterns are used in an XML composite control. I hope the example is self explaining, please don't hesitate to contact me, if you have any further questions.

fuchsvomwalde avatar Aug 22 '18 17:08 fuchsvomwalde

Hi any updates on that?

fuchsvomwalde avatar Sep 28 '18 13:09 fuchsvomwalde

Hello @fuchsvomwalde,

Thank you for the example, the issue is clear. I've created an internal incident 1880568920. The status of the issue will be updated here in GitHub.

Regards, Alexandar Mitsev

alexandar-mitsev avatar Oct 01 '18 09:10 alexandar-mitsev

Hi Fuchs,

I adapted your example. The issue is the following:

The first working Control has the label that when changing an Attribute automatically invalidates the VBox and triggers a rerendering. Thus it works.

The other examples do not work due to one root cause you should set invalidate: true on the show property. This is due to save Performance as we want to avoid a rerendering on any Control part. For all other controls than the XMLComposite such Invalidation was done by Default. Now this makes the Control with only the label as root also to work. Unfortunately the VBox does not work as this has no Attribute visible.

For you Information. If not done by yourself each XMLComposite has already a visible Attribute. You can try that.

If there are further Questions, stay in touch.

Regards Silke

Silkinator avatar Oct 01 '18 14:10 Silkinator