| Page 1 of 1 | [ 2 posts ] |
|
Hello this is my first post here.
I am a YUI rookie, and have a question. I am using YUI 2.9 and Oracle WebCenter IDE. When my portal page first loads, the yui loader successfully loads my requested widgets into the DOM and executes the onSuccess functions which loads the widgets with data linked to divs I have marked up on the page. When I execute an action method, (which does a round trip back to the server for some functions, and then a GET to the page), I find that the onSuccess functions are not executed, and hence my widgets functions are not executed, and only the base markup is appearing on the page. The YUI widgets are still loaded into the DOM though. Is this because a separate instance of the Yui loader is created on the page GET and since everything was already loaded the first time it did not get to the onSuccess callback? Any help or solution recommendation would be appreciated. Thanks! SteveC72, YUI rookie here is the js i have written... ------------------------------------- (function() { // Instantiate and configure YUI Loader: var loader = new YAHOO.util.YUILoader({ base: "http://yui.yahooapis.com/2.9.0/build/", // location of YUI build directory require: ["datatable","logger","menu","yuiloader-dom-event"], loadOptional: true, // load any optional dependencies combine: true, // don't combine files into a single request; requires special server-side file filter: "RAW", // use the minimized version of the files: also valid are "RAW" and "DEBUG" // force: ["yuiloader-dom-event"], // force loader onsuccess after portlet event steve allowRollup: true, // rollup files, e.g. (yahoo.js, event.js, & dom.js can be combined into yahoo-dom-event.js) onSuccess: function() { // YAHOO.log('onSuccess start'); console.warn('onSuccess: function() start'); // code for DataTable, using markup html as the data source var myColumnDefs = [ {key:"casenumber",label:"casenumberl",sortable:true}, {key:"lastname",label:"lastnamel", sortable:true}, {key:"casetype",label:"casetypel",sortable:true}, {key:"caseservice",label:"caseservicel",sortable:true} ]; // console.debug('you are inbetween myColumnDefs and myDataSource'); this.myDataSource = new YAHOO.util.DataSource(YAHOO.util.Dom.get("testtable")); this.myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; this.myDataSource.responseSchema = { fields: [{key:"casenumber"}, {key:"lastname"}, {key:"casetype"}, {key:"caseservice"} ] }; this.myDataTable = new YAHOO.widget.DataTable("markup", myColumnDefs, this.myDataSource, {caption:"Example: query result from Markup", sortedBy:{key:"casenumber",dir:"asc"}} ); // end of data table code //********************** menu var oMenu; YAHOO.util.Event.onContentReady("basicmenu", function () { oMenu = new YAHOO.widget.Menu("basicmenu"); oMenu.render(); oMenu.show(); // console.debug('basicmenu render and show'); }); //******** end of menu //******** menuButtonID open and close var fnCallback = function(e) { // alert ("menuButtonOpenID was clicked"); oMenu.show(); // console.debug('omenu.show()'); }; YAHOO.util.Event.addListener('menuButtonOpenID','click',fnCallback); // console.debug('onSuccess done'); // end of data table code } // end of onSuccess }); loader.onFailure = function (o) { alert ('error: '+YAHOO.lang.dump(o)); } // Load the files using the insert() function. loader.insert(); }()); ----------------------------------- |
|
Hi Steve,
What is the "action" method that you refer to? ( The only handler I see defined is the click handler on menuButtonOpenID ) Are you using HTML Forms with an 'action="URL?....."' or something similar? Does your DataTable render properly? Are you trying to load some information via Ajax or some other remote method? For example, are you trying to reload the DataTable remotely? If we get some more information we might be able to help get you moving forward. Thanks, Todd |
| Page 1 of 1 | [ 2 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group