Skip to Content
0
Jun 05, 2018 at 01:31 PM

Dialog it closes alone

77 Views

Hi community i'm facing a problem and i've tried but with out lucky, i don't know if it's my manifest, views, controllers etc this is my dialog :

<core:FragmentDefinition
   xmlns="sap.m"
   xmlns:core="sap.ui.core"
   xmlns:tnt="sap.tnt">
   <Dialog
      id="userDialog"
      title="{i18n>TituloDialogUsuario}">
   
      <Panel class="">
      <MessageStrip
      			id="msgErrorAsesor"
				text="Error al cargar datos!"
				type="Error"
				showIcon="true"
				showCloseButton="true"
				class="sapUiMediumMarginBottom"
				visible="false">
	  </MessageStrip>
			
	      <Input placeholder="Usuario" width="100%" id="usuario"/>
      </Panel>
   <beginButton>
         <Button
            text="Ok"
            press="getInfo"
            type="Accept"/>
   </beginButton>
   <endButton>
		<Button text="Close" press="closeDialog"/>
	</endButton>
   </Dialog>
</core:FragmentDefinition>

and this is where i call it, i use two diferent ways and still the same result, it opens an after appears my view and dissapear the dialog

onInit : function() {
	this.varGlob = new JSONModel();	
	this.varGlob.asesor = "";
	this.oDialog();
},// onInit

the other way

onInit : function() {
this._oRouter = sap.ui.core.UIComponent.getRouterFor(this);
this._oRouter.getRoute("Main").attachMatched(this.handleRouteMatched, this);},


handleRouteMatched : function (evt) {
	this.oDialog();
},

dialog.png like the third thime that comes here it close the dialog

after that render my view

Attachments

dialog.png (12.3 kB)
myview.png (13.4 kB)