Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

148
Vistas
sap.m.List - change model on itemPress

I have sap.m.List with sap.m.StandardListItem within oDialog. When user opens oDialog, model is being set with main category list. Item press sets second model with child items, but List control showing blank items, first model is still set as default. What I'm doing wrong?

My code (oList):

  var oList = new sap.m.List({
        mode: "SingleSelectMaster",
        templateShareable: false,
        includeItemInSelection: true,
        itemPress: function (oEvent) {
            var sPath = oList.getSelectedItem().getBindingContext().sPath.substr(1);
            var sListID = oList.getId();

            var model = oList.getModel().getData();
            console.log("model current (press): ", model);
          
            //check item type
            var sItemType = oList.getSelectedItem().mProperties.type;
       
            if (sItemType == "Active") {
                    //do somtehing
            }
            

            //new model - child items
            var sURL = '/XMII/Runner?Transaction=Project/trasnaction&param1=' + param1;
            var oModel3 = new sap.ui.model.xml.XMLModel();
            oModel3.loadData(sURL,"Model" + sPath, false);
               
         
           
           oList.setModel(oModel3, "Model" + sPath);
           oList.setBindingContext(new sap.ui.model.Context(oModel3,  "Model" + sPath + ">/serviceInvocationResponse/responses"));
           oList.bindItems({
                            path: "/",
                            templateShareable: false,
                            template: oTemplate
                        });
        

            
            var newData = oList.getModel("Model" + sPath).getProperty("/"); //showing correct data from new model
            console.log("newData: ", newData);

            if (sItemType == "Navigation") {
                    //do somtehing
            }
        }
    });

I'm using SAP UI5 ver. 1.44.46

Thanks in advance!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda