on 2019 Jan 15 9:33 AM
Hi,
I'm using a List Report template to allow users to view, edit and create some objects stored in a Z table in my backend. I'm using some properties (i.e UXHideField1) to control the visibility of some UI elements via the UI.Hidden annotation.
I'd like to hide these UI elements by default when a new entry is created. Is there a way to catch the event when the + button is pressed on the list page? Or is there a way (annotation?) to provide a default value for a boolean property or a UI.Hidden value?
Cheers,
Pierre
Request clarification before answering.
Not sure if it is the best way, but I have manipulated my hidden property via t his way:
onInit: function () {
if (this.extensionAPI) {
this.extensionAPI.attachPageDataLoaded(this._setDefaultProperty.bind(this,
"property", true));
}
},
/**
* Setter for property
* @param {String} sProperty, the property name
* @param {String} sValue, the value for the property
* @private
*/
_setDefaultProperty: function ( sProperty, sValue) {
var oModel = this.getView().getModel();
var sBindingPath = this.getView().getBindingContext().getPath();
oModel.setProperty(sBindingPath + "/" + sProperty, sValue);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
worked perfect. thanks
User | Count |
---|---|
59 | |
8 | |
7 | |
6 | |
6 | |
4 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.