on 09-06-2017 3:05 PM
I do not know wehre the line asdf comes from.
I have two View, in the first view i can select the content of my table. Here I Typed asdf as an example. I get the right Data into the table but I have this ugly line with the name in it.
Here is my Code:
sap.ui.jsview("app.view.NodeEventsView", {
/** Specifies the Controller belonging to this View.
* In the case that it is not implemented, or that "null" is returned, this View does not have a Controller.
* @memberOf view.NodeEventsView
*/
getControllerName : function() {
return "app.controller.NodeEventsView";
},
/** Is initially called once after the Controller has been instantiated. It is the place where the UI is constructed.
* Since the Controller is given to this method, its event handlers can be attached right away.
* @memberOf view.NodeEventsView
*/
createContent : function(oController) {
var oTableNodeEvents = new sap.ui.table.Table({
id : "TableNodeEvents",
width : "100%",
visibleRowCount : 7,
selectionMode : sap.ui.table.SelectionMode.Single,
selectionBehavior : sap.ui.table.SelectionBehavior.RowOnly,
editable : true,
threshold : 100,
enableColumnReordering : false,
showColumnVisibilityMenu :true,
enableBusyIndicator : true
});
//Add Column for Event
oTableNodeEvents.addColumn(new sap.ui.table.Column({
label : new sap.m.Label({text : "{i18n>TableColEvent}"}),
template : new sap.m.Text({text : "{Event}"}),
sortProperty : "Event",
sortOrder : sap.ui.table.SortOrder.Ascending,
}));
//Add Column for Dtext
oTableNodeEvents.addColumn(new sap.ui.table.Column({
label : new sap.m.Label({text : "{i18n>TableColDtext}"}),
template : new sap.m.Text({text : "{Dtext}"}),
sortProperty : "Dtext",
sortOrder : sap.ui.table.SortOrder.Descending,
}));
//Add Column for Xbaseline
oTableNodeEvents.addColumn(new sap.ui.table.Column({
label : new sap.m.Label({text : "{i18n>TableColXbaseline}"}),
template : new sap.m.DatePicker({
value : "{path: 'Xbaseline', type: 'sap.ui.model.type.Date', formatOptions:{style:'medium', UTC: true} }",
parseError : [oController.handleParseError, oController],
validationSuccess : [oController.handleValidationSuccess, oController]
})
}));
//Add Column for Xcurrent
oTableNodeEvents.addColumn(new sap.ui.table.Column({
label : new sap.m.Label({text : "{i18n>TableColXcurrent}"}),
template : new sap.m.DatePicker({
value : "{path: 'Xcurrent', type: 'sap.ui.model.type.Date', formatOptions:{style:'medium', UTC: true} }",
parseError : [oController.handleParseError, oController],
validationSuccess : [oController.handleValidationSuccess, oController]
})
}));
//Add Column for Xforecast
oTableNodeEvents.addColumn(new sap.ui.table.Column({
label : new sap.m.Label({text : "{i18n>TableColXforecast}"}),
template : new sap.m.DatePicker({
value : "{path: 'Xforecast', type: 'sap.ui.model.type.Date', formatOptions:{style:'medium', UTC: true} }",
parseError : [oController.handleParseError, oController],
validationSuccess : [oController.handleValidationSuccess, oController]
})
}));
//Add Column for Xactual
oTableNodeEvents.addColumn(new sap.ui.table.Column({
label : new sap.m.Label({text : "{i18n>TableColXactual}"}),
template : new sap.m.DatePicker({
value : "{path: 'Xactual', type: 'sap.ui.model.type.Date', formatOptions:{style:'medium', UTC: true} }",
parseError : [oController.handleParseError, oController],
validationSuccess : [oController.handleValidationSuccess, oController]
})
}));
var oSubHeaderBar = new sap.m.Bar({
design : sap.m.BarDesign.SubHeader,
contentLeft: [
new sap.m.Button({
id : "refreshButton",
type : sap.m.ButtonType.Emphasized,
icon : "sap-icon://refresh",
iconFirst : true,
iconDensityAware : false,
text : "{i18n>refreshButtonText}",
press : [oController.handleRefreshButtonPress, oController]
})
],
contentMiddle: [new sap.m.Label({text : oTableNodeEvents.getTitle()})
],
contentRight : [
new sap.m.Button({
id : "addEventButton",
type : sap.m.ButtonType.Accept,
icon : "sap-icon://add",
iconFirst : true,
iconDensityAware : false,
text : "{i18n>addEventButtonText}",
press : [oController.handleAddEventButtonPress, oController]
}),
new sap.m.Button({
id : "saveEventsButton",
type : sap.m.ButtonType.Accept,
icon : "sap-icon://save",
iconFirst : true,
iconDensityAware : false,
text : "{i18n>saveEventsButtonText}",
press : [oController.handleSaveEventsButtonPress, oController]
})
]
});
var oSaveEventDialogButton = new sap.m.Button({
id : "saveEventDialogButton",
type : sap.m.ButtonType.Accept,
icon : "sap-icon://accept",
iconFirst : true,
iconDensityAware : false,
press : [oController.handleSaveAddEventDialogButtonPress, oController]
});
var oCancelEventDialogButton = new sap.m.Button({
id : "cancelEventDialogButton",
type : sap.m.ButtonType.Reject,
icon : "sap-icon://decline",
iconFirst : true,
iconDensityAware : false,
press : [oController.handleCloseAddEventDialogPress, oController]
});
var oDialog = new sap.m.Dialog("addEvent",{
title: "{i18n>addEventButtonText}",
icon: "sap-icon://add",
buttons: [ oSaveEventDialogButton, oCancelEventDialogButton ],
content: [
new sap.m.Label({text:"{i18n>TableColEvent}"}),
new sap.m.Input({
id:"Event",
maxLength: 5
}),
new sap.m.Label({text:"{i18n>TableColDtext}"}),
new sap.m.Input({
id:"Dtext",
maxLength: 40
})
]
});
var oNodeEventsPage = new sap.m.Page({
title: "{i18n>NodeEventsPageTitle}",
showNavButton : true,
navButtonPress : [oController.handleButtonBackPress, oController],
content: [
oSubHeaderBar,
oTableNodeEvents,
//oButtonBack
]
});
return oNodeEventsPage;
}
});
Hello,
First, do not use anymore JS View it is not a wise solution and not the best practice.
Then, probably look at the headerText property of your table. In the documentation it says :
If headerToolbar aggregation is set, then this property is ignored
src: https://sapui5.hana.ondemand.com/#/api/sap.m.ListBase
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.