javascript - How do you load a Store in ExtJS from an Oracle Application Express backend -


i attempting load data extjs v4.2.1 store apex backend via ajax.

using apex's htmldb_get function, able call application process interacts database , returns/modifies data accordingly.

however when trying load data extjs store, things bit tricky.

my store looks this:

ext.define('documenteditor.store.nodes', {     alias: 'store.nodes',     extend: 'ext.data.store',     requires: [         'documenteditor.proxy.ajax',         'documenteditor.model.node'     ],      storeid: 'nodes',      model: 'documenteditor.model.node',      remotesort: true,     remotefilter: true,     remotegroup: true,      proxy: {         type: 'ajax',          url: '/clms/wwv_flow.show/',          format: 'json',          actionmethods: {             create: 'post',             read: 'post',             update: 'post',             destroy: 'post'         },          extraparams: {             'p_request': 'application_process=my_process',             'p_instance': instance,             'p_flow_id': flow,             'p_flow_step_id': flow_step         },          nocache: false,          limitparam: 'max',         startparam: 'offset',         sortparam: 'sortorder',          writer: {             type: 'json',             writeallfields: true         },         reader: {             type: 'json',             root: 'results',             totalproperty: 'count'         }     } }); 

executing this:

var x = ext.create('documenteditor.store.nodes'); x.load(); 

generates post:

post 1

and response apex:

error

err-7620: not determine workspace application (200).

expecting p_company or wwv_flow_company cookie contain security group id of application owner.

but executing this:

var x = new htmldb_get(null, app_id, 'application_process=my_process', page_id); x.getasync(function (response) {     console.log(response); } 

generates post:

post 2

and response expect.

my question:

1) how htmldb_get functionality within extjs ajax proxy enable me retrieve data? (or how can populate store data apex?)

2) how can first post respond 404: not found, while second (identical, exact same url) responds 200: ok?

any appreciated.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -