on 01-23-2018 4:47 AM
I created a template for a table on the controller that consist of some text cells that get oData but also a combo box and checkbox that had its own function, that is pretty lengthy, before creating the template. This template was originally on the XML side but had to move it to the controller side in order to filter the correct oData.
How can I add that function to the checkbox? Also, can I format the date/time to show only month like I had on the xml side?
var oTemplate = new sap.m.ColumnListItem({
cells: [
new sap.m.Text({
text: "{ID}"
}),<br>
//this does not work
new sap.m.CheckBox({
select: function(){
this.estimatePercentageSelect();}
}),<br>
new sap.m.ComboBox({
items: [new sap.ui.core.ListItem("cMonth", {
text: currentMonthName,
key: currentMonthName
}),
new sap.ui.core.ListItem("month1", {
text: monthName1,
key: monthName1
}),
new sap.ui.core.ListItem("month2", {
text: monthName2,
key: monthName2
}),
new sap.ui.core.ListItem("month3", {
text: monthName3,
key: monthName3
})]}),
new sap.m.Text({
text: "{INSTALL}"
}),
<br>//this formatting also does not work
new sap.m.Text({
text: "{DATE}"
/*,
type: "sap.ui.model.type.DateTime",
formatOptions: "{pattern: 'MMM'}" */
}),
<br>new sap.m.Text({
text: "{DWN}"
}),
new sap.m.Text({
text: "{EST}"
}),
new sap.m.Text({
text: "{PLAN}"
})
]
});
Hi,
It's not required to do it from controller. Let it be in view itself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.