on 05-16-2018 10:33 PM
Hi, i have some time trying to pass a value from my view to my dialog
this is my view element
<Input width="100%" placeholder="XXXXXXXX-X" id="irut"/>
and this is my dialog view:
<Dialog
id="dialogCrear"
title="{i18n>TituloDialogUsuario}">
<f:SimpleForm id="formCrear"
editable="false"
layout="ResponsiveGridLayout"
title="Prospecto"
labelSpanXL="3"
labelSpanL="3"
labelSpanM="3"
labelSpanS="12"
adjustLabelSpan="false"
emptySpanXL="4"
emptySpanL="4"
emptySpanM="4"
emptySpanS="0"
columnsXL="1"
columnsL="1"
columnsM="1"
singleContainerFullSize="false">
<f:content>
<Label text="Rut"/>
<Input width="100%" placeholder="XXXXXXXX-X" id="crearRut" editable="false"/>
my controller
onAbrirCrear : function() {
var oView = this.getView();
var oDialog = oView.byId("dialogCrear");
var previewRut = oView.byId("irut").getValue();
var rut = this.byId("crearRut");
rut.setValue(oDatos.rut)
// create dialog lazily
if (!oDialog) { // create dialog via fragment factory
oDialog = sap.ui.xmlfragment(oView.getId(), "crm.prospecto.view.crearProspecto", this);
oView.addDependent(oDialog);
}
oDialog.open();
},
so when i open my dialog should take the value from my view and set to my dialog input but instead i get an error
Uncaught TypeError: oDatos.pais.setValue is not a function
what am i doing wrong ????
use the model to pass the value. Then the value stays in model from wherever you access it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks! Sharath M G i created a model in my component and send to my view a put both view and dialog values the same
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.