Call Dynamic Table values Onselect from listItems
up vote
0
down vote
favorite
I would like to know if possible to get dynamic table values onSelect from listItems.
controller.js
onPress : function(oEvent){
var oSelectedItem = oEvent.getSource();
var oContext = oSelectedItem.getBindingContext("invoice");
var sPath = oContext.getPath();
var oListItem= this.getView().byId("BoM");
oListItem.bindItems({
path : "invoice>/ProductHeadSet('12345')/ProductHead2BOM",
template : new sap.m.ColumnListItem({
cells: [
new sap.m.Text({
text: "{invoice>Material}"
}),
new sap.m.Text({
text: "{invoice>Component}"
}),
new sap.m.Text({
text: "{invoice>Brand}"
})
]
})
});
}
});
Above is my controller, when i make onPress, i could receive the values from "12345". But when i try to make an dynamic onPress by removing (12345)"invoice>/ProductHeadSet/ProductHead2BOM"". It throws me an error like this "The request URI is invalid. The ProductHeadSet segment refers to an entity set and not to a single entity".
Thanks and Regards.
sapui5
add a comment |
up vote
0
down vote
favorite
I would like to know if possible to get dynamic table values onSelect from listItems.
controller.js
onPress : function(oEvent){
var oSelectedItem = oEvent.getSource();
var oContext = oSelectedItem.getBindingContext("invoice");
var sPath = oContext.getPath();
var oListItem= this.getView().byId("BoM");
oListItem.bindItems({
path : "invoice>/ProductHeadSet('12345')/ProductHead2BOM",
template : new sap.m.ColumnListItem({
cells: [
new sap.m.Text({
text: "{invoice>Material}"
}),
new sap.m.Text({
text: "{invoice>Component}"
}),
new sap.m.Text({
text: "{invoice>Brand}"
})
]
})
});
}
});
Above is my controller, when i make onPress, i could receive the values from "12345". But when i try to make an dynamic onPress by removing (12345)"invoice>/ProductHeadSet/ProductHead2BOM"". It throws me an error like this "The request URI is invalid. The ProductHeadSet segment refers to an entity set and not to a single entity".
Thanks and Regards.
sapui5
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I would like to know if possible to get dynamic table values onSelect from listItems.
controller.js
onPress : function(oEvent){
var oSelectedItem = oEvent.getSource();
var oContext = oSelectedItem.getBindingContext("invoice");
var sPath = oContext.getPath();
var oListItem= this.getView().byId("BoM");
oListItem.bindItems({
path : "invoice>/ProductHeadSet('12345')/ProductHead2BOM",
template : new sap.m.ColumnListItem({
cells: [
new sap.m.Text({
text: "{invoice>Material}"
}),
new sap.m.Text({
text: "{invoice>Component}"
}),
new sap.m.Text({
text: "{invoice>Brand}"
})
]
})
});
}
});
Above is my controller, when i make onPress, i could receive the values from "12345". But when i try to make an dynamic onPress by removing (12345)"invoice>/ProductHeadSet/ProductHead2BOM"". It throws me an error like this "The request URI is invalid. The ProductHeadSet segment refers to an entity set and not to a single entity".
Thanks and Regards.
sapui5
I would like to know if possible to get dynamic table values onSelect from listItems.
controller.js
onPress : function(oEvent){
var oSelectedItem = oEvent.getSource();
var oContext = oSelectedItem.getBindingContext("invoice");
var sPath = oContext.getPath();
var oListItem= this.getView().byId("BoM");
oListItem.bindItems({
path : "invoice>/ProductHeadSet('12345')/ProductHead2BOM",
template : new sap.m.ColumnListItem({
cells: [
new sap.m.Text({
text: "{invoice>Material}"
}),
new sap.m.Text({
text: "{invoice>Component}"
}),
new sap.m.Text({
text: "{invoice>Brand}"
})
]
})
});
}
});
Above is my controller, when i make onPress, i could receive the values from "12345". But when i try to make an dynamic onPress by removing (12345)"invoice>/ProductHeadSet/ProductHead2BOM"". It throws me an error like this "The request URI is invalid. The ProductHeadSet segment refers to an entity set and not to a single entity".
Thanks and Regards.
sapui5
sapui5
asked yesterday
Rocket
55
55
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Your answer is right there
"The request URI is invalid. The ProductHeadSet segment refers to an entity set and not to a single entity".
Int the below code, the number within the brackets help identify which index in the array should be bound to the list.
invoice>/ProductHeadSet('12345')/ProductHead2BOM
Without the number, you are trying to bind the entire array to oListItem.
EDIT
This is a little difficult to answer without seeing the model and bindings, But instead of doingpath : "invoice>/ProductHeadSet('12345')/ProductHead2BOM"
Dopath : "invoice>"+sPath+"/ProductHead2BOM"
Yes, i was binding with static model. But i would like to do it with dynamic. Below url have the same issue which i have found, unfortune i couldn't find the solution. archive.sap.com/discussions/message/16559631#16559631
– Rocket
yesterday
So, How can i achieve this? without the number.
– Rocket
yesterday
I have edited the answer to explain. I assumed that the sPath has the value /ProductHeadSet('12345')
– d01ph1n
yesterday
Perfect !!! Thank you for the reply. It was the answer i was looking for.
– Rocket
yesterday
Is it possible to know, if i wanted to switch between the iconTabs using the above code. Can be done ?
– Rocket
yesterday
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Your answer is right there
"The request URI is invalid. The ProductHeadSet segment refers to an entity set and not to a single entity".
Int the below code, the number within the brackets help identify which index in the array should be bound to the list.
invoice>/ProductHeadSet('12345')/ProductHead2BOM
Without the number, you are trying to bind the entire array to oListItem.
EDIT
This is a little difficult to answer without seeing the model and bindings, But instead of doingpath : "invoice>/ProductHeadSet('12345')/ProductHead2BOM"
Dopath : "invoice>"+sPath+"/ProductHead2BOM"
Yes, i was binding with static model. But i would like to do it with dynamic. Below url have the same issue which i have found, unfortune i couldn't find the solution. archive.sap.com/discussions/message/16559631#16559631
– Rocket
yesterday
So, How can i achieve this? without the number.
– Rocket
yesterday
I have edited the answer to explain. I assumed that the sPath has the value /ProductHeadSet('12345')
– d01ph1n
yesterday
Perfect !!! Thank you for the reply. It was the answer i was looking for.
– Rocket
yesterday
Is it possible to know, if i wanted to switch between the iconTabs using the above code. Can be done ?
– Rocket
yesterday
add a comment |
up vote
0
down vote
accepted
Your answer is right there
"The request URI is invalid. The ProductHeadSet segment refers to an entity set and not to a single entity".
Int the below code, the number within the brackets help identify which index in the array should be bound to the list.
invoice>/ProductHeadSet('12345')/ProductHead2BOM
Without the number, you are trying to bind the entire array to oListItem.
EDIT
This is a little difficult to answer without seeing the model and bindings, But instead of doingpath : "invoice>/ProductHeadSet('12345')/ProductHead2BOM"
Dopath : "invoice>"+sPath+"/ProductHead2BOM"
Yes, i was binding with static model. But i would like to do it with dynamic. Below url have the same issue which i have found, unfortune i couldn't find the solution. archive.sap.com/discussions/message/16559631#16559631
– Rocket
yesterday
So, How can i achieve this? without the number.
– Rocket
yesterday
I have edited the answer to explain. I assumed that the sPath has the value /ProductHeadSet('12345')
– d01ph1n
yesterday
Perfect !!! Thank you for the reply. It was the answer i was looking for.
– Rocket
yesterday
Is it possible to know, if i wanted to switch between the iconTabs using the above code. Can be done ?
– Rocket
yesterday
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Your answer is right there
"The request URI is invalid. The ProductHeadSet segment refers to an entity set and not to a single entity".
Int the below code, the number within the brackets help identify which index in the array should be bound to the list.
invoice>/ProductHeadSet('12345')/ProductHead2BOM
Without the number, you are trying to bind the entire array to oListItem.
EDIT
This is a little difficult to answer without seeing the model and bindings, But instead of doingpath : "invoice>/ProductHeadSet('12345')/ProductHead2BOM"
Dopath : "invoice>"+sPath+"/ProductHead2BOM"
Your answer is right there
"The request URI is invalid. The ProductHeadSet segment refers to an entity set and not to a single entity".
Int the below code, the number within the brackets help identify which index in the array should be bound to the list.
invoice>/ProductHeadSet('12345')/ProductHead2BOM
Without the number, you are trying to bind the entire array to oListItem.
EDIT
This is a little difficult to answer without seeing the model and bindings, But instead of doingpath : "invoice>/ProductHeadSet('12345')/ProductHead2BOM"
Dopath : "invoice>"+sPath+"/ProductHead2BOM"
edited yesterday
answered yesterday
d01ph1n
364
364
Yes, i was binding with static model. But i would like to do it with dynamic. Below url have the same issue which i have found, unfortune i couldn't find the solution. archive.sap.com/discussions/message/16559631#16559631
– Rocket
yesterday
So, How can i achieve this? without the number.
– Rocket
yesterday
I have edited the answer to explain. I assumed that the sPath has the value /ProductHeadSet('12345')
– d01ph1n
yesterday
Perfect !!! Thank you for the reply. It was the answer i was looking for.
– Rocket
yesterday
Is it possible to know, if i wanted to switch between the iconTabs using the above code. Can be done ?
– Rocket
yesterday
add a comment |
Yes, i was binding with static model. But i would like to do it with dynamic. Below url have the same issue which i have found, unfortune i couldn't find the solution. archive.sap.com/discussions/message/16559631#16559631
– Rocket
yesterday
So, How can i achieve this? without the number.
– Rocket
yesterday
I have edited the answer to explain. I assumed that the sPath has the value /ProductHeadSet('12345')
– d01ph1n
yesterday
Perfect !!! Thank you for the reply. It was the answer i was looking for.
– Rocket
yesterday
Is it possible to know, if i wanted to switch between the iconTabs using the above code. Can be done ?
– Rocket
yesterday
Yes, i was binding with static model. But i would like to do it with dynamic. Below url have the same issue which i have found, unfortune i couldn't find the solution. archive.sap.com/discussions/message/16559631#16559631
– Rocket
yesterday
Yes, i was binding with static model. But i would like to do it with dynamic. Below url have the same issue which i have found, unfortune i couldn't find the solution. archive.sap.com/discussions/message/16559631#16559631
– Rocket
yesterday
So, How can i achieve this? without the number.
– Rocket
yesterday
So, How can i achieve this? without the number.
– Rocket
yesterday
I have edited the answer to explain. I assumed that the sPath has the value /ProductHeadSet('12345')
– d01ph1n
yesterday
I have edited the answer to explain. I assumed that the sPath has the value /ProductHeadSet('12345')
– d01ph1n
yesterday
Perfect !!! Thank you for the reply. It was the answer i was looking for.
– Rocket
yesterday
Perfect !!! Thank you for the reply. It was the answer i was looking for.
– Rocket
yesterday
Is it possible to know, if i wanted to switch between the iconTabs using the above code. Can be done ?
– Rocket
yesterday
Is it possible to know, if i wanted to switch between the iconTabs using the above code. Can be done ?
– Rocket
yesterday
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53371240%2fcall-dynamic-table-values-onselect-from-listitems%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown