Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

sap.m.App issue with Width

Former Member
0 Likes
492

Hi, I'm new to creating mobile apps and am having through configuring my app to be responsive.

I'm instantiating "sap.m.App" and calling "addPage" to add my layout. Is there a configuring step I'm missing? When I check the width of "sap.m.App" - I'm getting the default 100%. Any help would be great!

Here's the view code:

 /*jshint esversion: 6 */
sap.ui.jsview("fieldTech.ui.fieldTechSchedule", {
  getControllerName: function() {
    return "fieldTech.ui.fieldTechSchedule";
  },
  createContent: function(oController) {
	console.log("hitting field tech schedule")
    oController.sID = $GRE.setsID();
    const { userRoles } = $GRE.session;
//    oController.responsiveLayout = new sap.f.DynamicPage({
//    		title: new sap.f.DynamicPageTitle({
//    			heading: new sap.m.Text({text: "Field Tech Dashboard"})
//    		})
//    });
    const testPage = new sap.m.Page("page", {
    		title: "test EOS app"
    });
    const oTable = new sap.m.Table({
    		headerToolbar: new sap.m.Toolbar({
    			content: [
    				new sap.m.Label({
    					text: "Customer List"
    				})
    			]
    		}),
    		columns: [
    			new sap.m.Column({
//    				width: "2em",
    				header: new sap.m.Label({
    					text: "id"
    				})
    			}),
    			new sap.m.Column({
//    				width: "2em",
    				header: new sap.m.Label({
    					text: "name"
    				})
    			}),
    			new sap.m.Column({
//    				width: "2em",
    				header: new sap.m.Label({
    					text: "test1"
    				})
    			}),
    			new sap.m.Column({
//    				width: "2em",
    				header: new sap.m.Label({
    					text: "test2"
    				})
    			}),
    			new sap.m.Column({
//    				width: "2em",
    				header: new sap.m.Label({
    					text: "test3"
    				})
    			}),
    		]
    });
    testPage.addContent(oTable);
    oController.app = new sap.m.App({
    		mobileWebAppCapable: true
//    		initialPage: "testPage"
    			
    });
    oController.app.addPage(testPage);
    return oController.app;
  },
});

Hi, I'm new to creating mobile apps and am having through configuring my app to be responsive.

I'm instantiating "sap.m.App" and calling "addPage" to add my layout. Is there a configuring step I'm missing? When I check the width of "sap.m.App" - I'm getting the default 100%. Any help would be great!

Here's the view code:

 /*jshint esversion: 6 */
sap.ui.jsview("fieldTech.ui.fieldTechSchedule", {
  getControllerName: function() {
    return "fieldTech.ui.fieldTechSchedule";
  },
  createContent: function(oController) {
	console.log("hitting field tech schedule")
    oController.sID = $GRE.setsID();
    const { userRoles } = $GRE.session;
//    oController.responsiveLayout = new sap.f.DynamicPage({
//    		title: new sap.f.DynamicPageTitle({
//    			heading: new sap.m.Text({text: "Field Tech Dashboard"})
//    		})
//    });
    const testPage = new sap.m.Page("page", {
    		title: "test EOS app"
    });
    const oTable = new sap.m.Table({
    		headerToolbar: new sap.m.Toolbar({
    			content: [
    				new sap.m.Label({
    					text: "Customer List"
    				})
    			]
    		}),
    		columns: [
    			new sap.m.Column({
//    				width: "2em",
    				header: new sap.m.Label({
    					text: "id"
    				})
    			}),
    			new sap.m.Column({
//    				width: "2em",
    				header: new sap.m.Label({
    					text: "name"
    				})
    			}),
    			new sap.m.Column({
//    				width: "2em",
    				header: new sap.m.Label({
    					text: "test1"
    				})
    			}),
    			new sap.m.Column({
//    				width: "2em",
    				header: new sap.m.Label({
    					text: "test2"
    				})
    			}),
    			new sap.m.Column({
//    				width: "2em",
    				header: new sap.m.Label({
    					text: "test3"
    				})
    			}),
    		]
    });
    testPage.addContent(oTable);
    oController.app = new sap.m.App({
    		mobileWebAppCapable: true
//    		initialPage: "testPage"
    			
    });
    oController.app.addPage(testPage);
    return oController.app;
  },
});

0 REPLIES 0