How do I access the values in the JSON model in my Dialogue list?How can I pass a value from an XML view to the controller?How to access Model from Controller in OpenUI5 1.3 Beta Tutorial Step 7: JSON Model?How to traverse JSON model?Hierarchial JSON model and UI5Core model not accessibleSAPUI5 XML View Binding with parameters from same modelJavascript / SAPUI5 : Binding a JSONArray to a ListItemSAPUI5 access getProperty() of Json Model (undefined). The Model itself is accessibleBind Default value to Combox from OData responseSAPUI5 Planning Calendar with Drag and Drop functionality using OData Model V2 (sap.m.planningcalendar)
Are lawyers allowed to come to agreements with opposing lawyers without the client's knowledge or consent?
Subverting the emotional woman and stoic man trope
Comma Code - Automate the Boring Stuff with Python
Safe to use 220V electric clothes dryer when building has been bridged down to 110V?
To change trains = cambiare treno?
A delve into extraordinary chess problems: Selfmate 1
Co-Supervisor comes to office to help her students which distracts me
Why does (inf + 0j)*1 evaluate to inf + nanj?
Is it impolite to ask for an in-flight catalogue with no intention of buying?
word frequency from file using partial match
Why does this image of Jupiter look so strange?
Is it really necessary to have a four hour meeting in Sprint planning?
Can a broken/split chain be reassembled?
Lettrine + string manipulation + some fonts = errors and weird issues
What is the meaning of word 'crack' in chapter 33 of A Game of Thrones?
How to conceptualize Newton's apple?
My manager quit. Should I agree to defer wage increase to accommodate budget concerns?
Why does NASA publish all the results/data it gets?
Building a nine - region cluster chart with Tooltip to display labels associated with 2D points
A food item only made possible by time-freezing storage?
What is the difference between an astronaut in the ISS and a freediver in perfect neutral buoyancy?
Do we know the situation in Britain before Sealion (summer 1940)?
Social leper versus social leopard
Does Sitecore have support for Sitecore products in containers?
How do I access the values in the JSON model in my Dialogue list?
How can I pass a value from an XML view to the controller?How to access Model from Controller in OpenUI5 1.3 Beta Tutorial Step 7: JSON Model?How to traverse JSON model?Hierarchial JSON model and UI5Core model not accessibleSAPUI5 XML View Binding with parameters from same modelJavascript / SAPUI5 : Binding a JSONArray to a ListItemSAPUI5 access getProperty() of Json Model (undefined). The Model itself is accessibleBind Default value to Combox from OData responseSAPUI5 Planning Calendar with Drag and Drop functionality using OData Model V2 (sap.m.planningcalendar)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have retrieved a JSON model from an ajax call in UI5 but I can't access its members. I have seen examples of people doing something similar but it isn't working for me. Here is my code:
onSumbmitFlowGAkQ: function () {
var oParameters =
"value": this.getView().byId("flowInputGAK").getValue()
;
$.ajax(
url: "private url",
type: 'POST',
data: JSON.stringify(oParameters),
contentType: 'application/json',
success: function (data)
this.getView().setModel(new JSONModel(data), "guidedAssistanceGAK");
this.setUpDialog();
.bind(this),
error: function (e)
MessageToast.show(e.status);
);
setUpDialog: function ()
var lst = new List(
items:
path: "guidedAssistanceGAK>/flow",
template: new StandardListItem(
title: "guidedAssistanceGAK>value",
counter: "guidedAssistanceGAK>ID"
)
);
var dialog = new Dialog(
title: "choose one",
content: lst,
beginButton: new Button(
text: "OK",
press: function ()
dialog.close();
),
afterClose: function ()
dialog.destroy();
);
dialog.open();
//this.oEditor.oRichTextEditor.setValue(this.getView().getModel("guidedAssistanceGAK").getProperty("/flow"));
,
I am using the syntax "guidedAssistanceGAK>/flow" to access the data but it isn't working. I think this is a binding error. I was wondering what would be the right way to do this.
sapui5
add a comment
|
I have retrieved a JSON model from an ajax call in UI5 but I can't access its members. I have seen examples of people doing something similar but it isn't working for me. Here is my code:
onSumbmitFlowGAkQ: function () {
var oParameters =
"value": this.getView().byId("flowInputGAK").getValue()
;
$.ajax(
url: "private url",
type: 'POST',
data: JSON.stringify(oParameters),
contentType: 'application/json',
success: function (data)
this.getView().setModel(new JSONModel(data), "guidedAssistanceGAK");
this.setUpDialog();
.bind(this),
error: function (e)
MessageToast.show(e.status);
);
setUpDialog: function ()
var lst = new List(
items:
path: "guidedAssistanceGAK>/flow",
template: new StandardListItem(
title: "guidedAssistanceGAK>value",
counter: "guidedAssistanceGAK>ID"
)
);
var dialog = new Dialog(
title: "choose one",
content: lst,
beginButton: new Button(
text: "OK",
press: function ()
dialog.close();
),
afterClose: function ()
dialog.destroy();
);
dialog.open();
//this.oEditor.oRichTextEditor.setValue(this.getView().getModel("guidedAssistanceGAK").getProperty("/flow"));
,
I am using the syntax "guidedAssistanceGAK>/flow" to access the data but it isn't working. I think this is a binding error. I was wondering what would be the right way to do this.
sapui5
I recommend to use the UI5 framework with MVC. so dont create your view controls inside of the controller. for more help I need some more information, maybe an online demo. at least the json one additional thing I saw is that you do your setmodel on this.getView(). but your dialog fragment is another new view. try to first create the dialog and set the model into this new view.
– DubZ
Mar 28 at 22:08
add a comment
|
I have retrieved a JSON model from an ajax call in UI5 but I can't access its members. I have seen examples of people doing something similar but it isn't working for me. Here is my code:
onSumbmitFlowGAkQ: function () {
var oParameters =
"value": this.getView().byId("flowInputGAK").getValue()
;
$.ajax(
url: "private url",
type: 'POST',
data: JSON.stringify(oParameters),
contentType: 'application/json',
success: function (data)
this.getView().setModel(new JSONModel(data), "guidedAssistanceGAK");
this.setUpDialog();
.bind(this),
error: function (e)
MessageToast.show(e.status);
);
setUpDialog: function ()
var lst = new List(
items:
path: "guidedAssistanceGAK>/flow",
template: new StandardListItem(
title: "guidedAssistanceGAK>value",
counter: "guidedAssistanceGAK>ID"
)
);
var dialog = new Dialog(
title: "choose one",
content: lst,
beginButton: new Button(
text: "OK",
press: function ()
dialog.close();
),
afterClose: function ()
dialog.destroy();
);
dialog.open();
//this.oEditor.oRichTextEditor.setValue(this.getView().getModel("guidedAssistanceGAK").getProperty("/flow"));
,
I am using the syntax "guidedAssistanceGAK>/flow" to access the data but it isn't working. I think this is a binding error. I was wondering what would be the right way to do this.
sapui5
I have retrieved a JSON model from an ajax call in UI5 but I can't access its members. I have seen examples of people doing something similar but it isn't working for me. Here is my code:
onSumbmitFlowGAkQ: function () {
var oParameters =
"value": this.getView().byId("flowInputGAK").getValue()
;
$.ajax(
url: "private url",
type: 'POST',
data: JSON.stringify(oParameters),
contentType: 'application/json',
success: function (data)
this.getView().setModel(new JSONModel(data), "guidedAssistanceGAK");
this.setUpDialog();
.bind(this),
error: function (e)
MessageToast.show(e.status);
);
setUpDialog: function ()
var lst = new List(
items:
path: "guidedAssistanceGAK>/flow",
template: new StandardListItem(
title: "guidedAssistanceGAK>value",
counter: "guidedAssistanceGAK>ID"
)
);
var dialog = new Dialog(
title: "choose one",
content: lst,
beginButton: new Button(
text: "OK",
press: function ()
dialog.close();
),
afterClose: function ()
dialog.destroy();
);
dialog.open();
//this.oEditor.oRichTextEditor.setValue(this.getView().getModel("guidedAssistanceGAK").getProperty("/flow"));
,
I am using the syntax "guidedAssistanceGAK>/flow" to access the data but it isn't working. I think this is a binding error. I was wondering what would be the right way to do this.
sapui5
sapui5
asked Mar 28 at 17:02
kingofjongkingofjong
426 bronze badges
426 bronze badges
I recommend to use the UI5 framework with MVC. so dont create your view controls inside of the controller. for more help I need some more information, maybe an online demo. at least the json one additional thing I saw is that you do your setmodel on this.getView(). but your dialog fragment is another new view. try to first create the dialog and set the model into this new view.
– DubZ
Mar 28 at 22:08
add a comment
|
I recommend to use the UI5 framework with MVC. so dont create your view controls inside of the controller. for more help I need some more information, maybe an online demo. at least the json one additional thing I saw is that you do your setmodel on this.getView(). but your dialog fragment is another new view. try to first create the dialog and set the model into this new view.
– DubZ
Mar 28 at 22:08
I recommend to use the UI5 framework with MVC. so dont create your view controls inside of the controller. for more help I need some more information, maybe an online demo. at least the json one additional thing I saw is that you do your setmodel on this.getView(). but your dialog fragment is another new view. try to first create the dialog and set the model into this new view.
– DubZ
Mar 28 at 22:08
I recommend to use the UI5 framework with MVC. so dont create your view controls inside of the controller. for more help I need some more information, maybe an online demo. at least the json one additional thing I saw is that you do your setmodel on this.getView(). but your dialog fragment is another new view. try to first create the dialog and set the model into this new view.
– DubZ
Mar 28 at 22:08
add a comment
|
1 Answer
1
active
oldest
votes
The new dialog doesn't look to be part of the view, which is where your model lives. You could either do this.getView().addDependent(dialog)
, or you could attach the model to the dialog with dialog.setModel
.
add a comment
|
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
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%2f55403200%2fhow-do-i-access-the-values-in-the-json-model-in-my-dialogue-list%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The new dialog doesn't look to be part of the view, which is where your model lives. You could either do this.getView().addDependent(dialog)
, or you could attach the model to the dialog with dialog.setModel
.
add a comment
|
The new dialog doesn't look to be part of the view, which is where your model lives. You could either do this.getView().addDependent(dialog)
, or you could attach the model to the dialog with dialog.setModel
.
add a comment
|
The new dialog doesn't look to be part of the view, which is where your model lives. You could either do this.getView().addDependent(dialog)
, or you could attach the model to the dialog with dialog.setModel
.
The new dialog doesn't look to be part of the view, which is where your model lives. You could either do this.getView().addDependent(dialog)
, or you could attach the model to the dialog with dialog.setModel
.
answered Mar 28 at 22:47
JorgJorg
5,9963 gold badges32 silver badges55 bronze badges
5,9963 gold badges32 silver badges55 bronze badges
add a comment
|
add a comment
|
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2f55403200%2fhow-do-i-access-the-values-in-the-json-model-in-my-dialogue-list%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
I recommend to use the UI5 framework with MVC. so dont create your view controls inside of the controller. for more help I need some more information, maybe an online demo. at least the json one additional thing I saw is that you do your setmodel on this.getView(). but your dialog fragment is another new view. try to first create the dialog and set the model into this new view.
– DubZ
Mar 28 at 22:08