如何在 taglib 中创建自定义是或否警报弹出框消息,同时在 grails 中删除一行。
这是我的代码。
def submitDeleteButtonAttrs=['class':'delete', 'action':'delete','src':'../images/user_delete.png'
,'value':deleteLabel
,'formnovalidate':''
,'onclick':'return confirm('+deleteMessage+');' ]
def deleteButton=g.actionSubmitImage(submitDeleteButtonAttrs);
def searchTextHiddenFieldAttrs=['name':'searchText',
'value':searchTextValue]
def searchTextHiddenField=g.hiddenField(searchTextHiddenFieldAttrs);
def advSearchTextHiddenFieldAttrs=['name':'advancedSearchText',
'value':advancedSearchTextValue];
def advsearchTextHiddenField=g.hiddenField(advSearchTextHiddenFieldAttrs);
def searchCriteriaHiddenFieldAttrs=['name':'searchCriteria',
'value':searchCriteriaValue];
def searchCriteriaHiddenField=g.hiddenField(searchCriteriaHiddenFieldAttrs);
def operationAttrs=['name':'searchOperator','value':searchOperatorValue];
def operationSelectHiddenField= g.hiddenField(operationAttrs);
def uIDAttrs=['name':'id',
'value':subscriberForUID[0]];
def uidField=g.hiddenField(uIDAttrs);
htmlOutput <<"""<td class="${innerClassName}"><form method="post">${uidField} ${searchTextHiddenField} ${advsearchTextHiddenField} ${deleteButton}</form></td>"""
在此代码中,弹出窗口无法正常工作。
任何人都可以帮助我在上面的代码中犯错的地方。