struts2 jqgrid: onEditInlineErrorTopics not being called on error -


on save of jqgrid, action catches constraint violation exception , returns "error". however, oneditinlineerrortopics function not called on jsp. exception needs translated user message saying "duplicate records" code follows:

jsp grid code

<sjg:grid id="gridtable"  datatype="json"     href="%{remoteurl}"     loadonce="true"     pager="true"     navigator="true"     scroll="true"       navigatoradd="false"     navigatoredit="false"     navigatorview="false"     navigatordelete="true"     navigatordeleteoptions="{height:220,reloadaftersubmit:true,url:'%{deleteurl}'}"     gridmodel="gridmodel"     rowlist="10,15,20"     rownum="15"     navigatorrefresh="false"     navigatorsearch="false"     editurl="%{editurl}"     editinline="true"     navigatorinlineeditbuttons="true"     gridview="true"     viewrecords="false"     shrinktofit="true"     oneditinlineerrortopics="onediterror"> 

tried these tags errorelementid, errortext & onerrortopics

action header (annotations)

@parentpackage(value = "basicstruts2") @action(value = "/editdetails", results = { @result(name="success",type="json"), @result(name="error",type="json"), @result(name="none",type="json"), @result(name="input",type="json") }) 

action catch block

catch(exception e){ addactionerror("duplicate records. please enter again."); return "error"; } 

the json string created is: {"json":"error","field1":"1","field2":3,"oper":"edit","field3":5,"field4":"9","field5":null,"field6":null,"field7":"19","field8":156}

tried throwing exception in catch block shows stacktrace in popup.

tried success topic oneditinlinesuccesstopics mentioned in showcase here , works fine.


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -