How to use panelload/panelbeforelod in appframework 3

475 views Asked by At

af3 removed data-load, I notice it added panelload, but it won't trigger in my app, here is my code, any one can help?

<div data-left-drawer="left" class="panel" id="plugins" data-title="plugins" panelload="plugins_load" panelbeforeload="plugins_beforeload">
                loading...
 </div>

and function defined:

var plugins_beforeload = function(obj) {
    alert('plugins_beforeload');
}
2

There are 2 answers

0
Ignazio Secci On

I think you cannot reach your goal in that way with af3. The "new way" is implementing it in your javascript code. I wrote something like..

$(document).on("panelload",".panel#your_panel_id",function(){
    alert("Ciao!!");
});
0
Stagg On
$("#pagenamehere").on("loadpanel",function(){
     alert("Hello World!");
 });

I found the documentation is not always as clear as I would like it to be. Hope this helps!