on 08-26-2014 2:08 PM
Hi guys,
there are some layout properties you can change while you are in design time, top margin - left margin....
I want to change them e.g on button press in additional properties.
Is that possible?
What I found is this.owner.oComponentProperties.margintop, but nothing happened after I set it to another value.
best regards
Hi Juri,
you could try to access / modify the following properties from your additional property sheet:
WIDTH
HEIGHT
TOP_MARGIN
RIGHT_MARGIN
BOTTOM_MARGIN
LEFT_MARGIN
CSS_CLASS
DATA_SOURCE_ALIAS_REF
Those properties are not documented in the SDK. For some purposes it is essential though to know whether they have changed in the regular properties dialogue. For example, keeping track of DATA_SOURCE_ALIAS_REF is useful if you are presenting a list of dimensions to select from in the additional property sheet.
Cheers,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mustafa,
with DATA_SOURCE_ALIAS_REF you will only be notified of a different selection of data source in the regular properties dialogue of a data bound SDK extension. You will receive the data source's identifier ("DS_1" for example) only. In case this happens, you would need to update the corresponding dimension metadata in the additional property sheet yourself.
One way to do this is to use the SDK's callRuntimeHandler method. In this case, you would need to provide a separate getter method in your component which returns the metadata it receives for data binding in JSON format - I believe callRuntimeHandler calls are only allowed to returned the SDK subset of JavaScript data types, i.e. int, float, String etc.
Kind regards,
Daniel
Hi Juri,
If you simply want to provide the ability to change layout of standard or SDK components based on events such as a button click during run-time, this can be done with standard BIAL scripting as shown below:
In design-time, the layout properties can be changed via the Standard Properties sheet. Can you clarify why you need to be able to change the standard layout properties in the Additional Properties sheet?
Regards,
Mustafa.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mustafa,
I build a component, that has different container. Usually you can just drag the whole component,
but I managed it, that in design time you can drag also the inner container in the component.
When I move it, the layout properties change - I want to save them, what I already did, and modify them in the SDK.
Changing them in Additional Properties was just an example, the goal would be, setting that layout properties in background(SDK), without clicking anywhere.
Hi Juri,
That sounds like an interesting component. Based on your example statement of this.owner.oComponentProperties.margintop, it seems like you are extending a UI5 control. Is that the case? This may influence the approach for updating the layout properties.
Also, are you triggering the fireDesignStudioPropertiesChanged event after changing the layout properties?
Regards,
Mustafa.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
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.