Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

159
Views
sap.m.List - cambiar modelo en itemPress

Tengo sap.m.List con sap.m.StandardListItem dentro de oDialog. Cuando el usuario abre oDialog, el modelo se configura con la lista de categorías principales. La pulsación de elementos establece el segundo modelo con elementos secundarios, pero el control Lista muestra elementos en blanco, el primer modelo aún está configurado como predeterminado. ¿Qué estoy haciendo mal?

Mi código (oLista):

 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 } } });

Estoy usando SAP UI5 ver. 1.44.46

¡Gracias por adelantado!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!