javascript - Reset View after leaving it - SAPUI5 -


i need reset search-view on button click. means when leave view through "close"-button , go search, supposed reloaded:

  • inputs empty
  • result-table hidden
  • as if reloaded

i cant make sure reload view because once called, saved in core , cant deleted, without being unable again.

right setting visibility false , true open or close view, cant find magic code here!^^

here happens when press close button:

handleschliessen : function () {         var p = this.getview('suche');         p.setvisible(false);         sap.ui.getcore().byid("handler").getmodel("datenmodel").refresh(true);         this.callbackmethod.call(this.callbackobject);     }, 

any great guys, can provide more code if need, long :)

my normal approach bind model (visibility result table, results, input fields) , set these model properties initial state when done.

for instance,

var initstate = {     tblvisible : false,     searchresults : [],     input : "" }  omodel.setproperty("/path/to/searchview/properties", initstate); 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -