I am already stock.. I had created an extra button for struts2 jQuery Grid.. When I click the button, It should go to my Action. How to do this on click? Here is parts of my code.
navigatorExtraButtons="{
seperator: {
title : 'seperator'
},
hide : {
title : 'Show/Hide',
icon: 'ui-icon-wrench',
onclick: function(){ load('<s:url action="ProductInitialise"/>') } //--> this doesn't work.
},
alert : {
title : 'Alert',
caption : 'Show Alert!',
onclick: function(){ alert('Grid Button clicked!') }
}
}"
navigatorExtraButtonsis a parameter of the<sjg:grid />Struts2(-jQuery Plugin) tag.You can’t put a Struts2 tag inside another Struts2 tag;
to do that, you must use
OGNL, and in the case ofURLs you should define theURLs outside the grid tag, and refer to them withOGNL, like that:….
Assuming all the rest is working (the
loadfunction for example), this should be enough to make it works.