gspからextjs関数を呼び出そうとしています。基本的に、この関数は、gspヘッダーで参照しているdeleteFiling.jsにあります。
<g:javascript src="deleteConfirm.js"></g:javascript>
およびdeleteConfirm.js:
Ext.onReady(function(){
Ext.BLANK_IMAGE_URL = appContextRoot
+ '/js/extjs/resources/images/default/s.gif';
var theme = appContextRoot
+ "/js/extjs/resources/css/xtheme-gray.css";
Ext.util.CSS.swapStyleSheet("theme", theme)
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'side';
function confirmFiling(){
Ext.MessageBox.show({
title:'Commit Confirmation',
msg: 'You are about to <strong>Delete</strong> the entire <strong>Filing</strong>. This \n action cannot be reversed. \n\nAre you sure you want to Proceed',
buttons: Ext.MessageBox.YESNO,
fn: processDelete,
icon: Ext.MessageBox.QUESTION
});
}})
そして私は次のようにconfirmFiling関数を呼び出しています:
<g:link action="deleteFiling" id="${filingInstance.id}" onclick="confirmFiling()"> <img src="${resource(dir:'images',file:'trash.gif')}" title="Delete" />
関数が定義されていません。私はextjsなしでこれを行うことができることを知っていますが、私の質問は、htmlまたはgspファイルからextjs関数を呼び出す方法です。
ありがとう