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;








1















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.










share|improve this question
























  • 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


















1















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.










share|improve this question
























  • 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














1












1








1








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.










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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


















  • 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













1 Answer
1






active

oldest

votes


















1
















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.






share|improve this answer



























    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
    );



    );














    draft saved

    draft discarded
















    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









    1
















    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.






    share|improve this answer





























      1
















      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.






      share|improve this answer



























        1














        1










        1









        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.






        share|improve this answer













        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 28 at 22:47









        JorgJorg

        5,9963 gold badges32 silver badges55 bronze badges




        5,9963 gold badges32 silver badges55 bronze badges

































            draft saved

            draft discarded















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현