BinaryResource: Add missing properties to create(BinaryResource) method
When using the copy-create() method, _all_ properties have to be copied to the new instance. Otherwise, the "cacheAllowed" flag is lost when the DynamicResourceLoader creates an alias for a resource.
Change-Id: Ia2ad3a9336e3fea8a989cd4266ff87daca130d07 Reviewed-on: https://git.eclipse.org/r/76721 Tested-by: Hudson CI Reviewed-by: Ivan Motsch <ivan.motsch@bsiag.com>
Button: Fix keyStrokeScope after model adapter split
KeyStrokeScope may not be an adapter/widget property due to following reasons: 1. The adapter properties are resolved at the initialization phase. During that phase of the button the scope (form or another field) may not be initialized and linked with the adapter yet. Even though getModelAdapter(scope) would return the adapter, adapter.widget would be empty. 2. The scope must not be linked with the button using setParent, the button is NOT the parent. This would happen if a widget property was used.
Before splitting up model adapter and widget, getOrCreateAdapter was used in the $bindTarget function. Replacing that with getOrCreateWidget would probably work for the remote case, but not for the offline case because getOrCreateWidget(adapterId) is not available for offline apps.
That is why the solution with the attach listener has been implemented.
Note: This commit also removed the setParent() call in session.getOrCreateWidget(). Changing the parent is done by the widget itself, there should be no need to do this somewhere else.