struts2-json-plugin

Using JSON-RPC in Struts2

拈花ヽ惹草 提交于 2019-12-10 11:24:42
问题 I use the following JavaScript/jQuery function to make a remote procedure call. <script src="../js/jquery-1.8.0.min.js" type="text/javascript"></script> <s:url var="testJsonUrl" action="testJsonAction"/> var timeout; var request; $(document).ready(function(){ $("#btnUser").click(function(){ if(!request) { request = $.ajax({ datatype:"json", type: "GET", data: JSON.stringify({jsonrpc:'2.0', method:'getUser', id:'jsonrpc'}), contentType: "application/json-rpc; charset=utf-8", url: "<s:property

Struts2-Jquery Grid CSS Editing [closed]

自闭症网瘾萝莉.ら 提交于 2019-12-09 06:42:26
Closed . This question needs details or clarity . It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post . Closed 4 years ago . I have a Struts2-jquery Grid component on my webpage. It works perfectly, but how can I edit the CSS rules for the Struts2-jQuery-Grid plugin ? Can I apply my custom CSS rules to this grid view ? To answer your question: how to create a new jquery theme? Just like @Andrea mentioned, You should use jQuery ThemeRoller Define your sj:head like this <%@ taglib prefix="s" uri="/struts-tags"%> <%@

Struts2 jquery Grid ajax data reload on form submit

大城市里の小女人 提交于 2019-12-08 11:08:52
问题 I have a fairly simple use case in which, I have a search form and a Grid The grid is suppose to show some default results on loadSearch.action. When the user enters few criteria in search form and hit submit button then ajax results must be reloaded in the grid below. I am getting the results via post response but not able to show them inside grid. Here is my code <%@ taglib prefix="s" uri="/struts-tags"%><%@ taglib prefix="sx" uri="/struts-dojo-tags" %> <%@ taglib prefix="sj" uri="/struts

Ajax error struts2?

爱⌒轻易说出口 提交于 2019-12-06 12:47:43
I have in my action class: try{ tspNameIdMap = slsReqMgmtCommonRemote.getTspNameIdMap(Integer.parseInt(circleId)); throw new ReqMgmtException("Message test"); } catch(ReqMgmtException rEx){ addActionError("Action-Error: Request Management Exception thrown"); return ERROR; } I am doing an AJAX call and using Struts2-Json-plugin to get tspNameIdMap in JSON form. JS: Part of AJAX: success: function(data){ alert('Updated DB'); }, error: function(data){ alert(data); } My struts.xml : <action name="findTspNameIdMap" class="cdot.oss.cmsat.gma.struts.ConfigureTspThresholdAction" method=

Using JSON-RPC in Struts2

泄露秘密 提交于 2019-12-06 12:09:38
I use the following JavaScript/jQuery function to make a remote procedure call. <script src="../js/jquery-1.8.0.min.js" type="text/javascript"></script> <s:url var="testJsonUrl" action="testJsonAction"/> var timeout; var request; $(document).ready(function(){ $("#btnUser").click(function(){ if(!request) { request = $.ajax({ datatype:"json", type: "GET", data: JSON.stringify({jsonrpc:'2.0', method:'getUser', id:'jsonrpc'}), contentType: "application/json-rpc; charset=utf-8", url: "<s:property value='#testJsonUrl'/>", success: function(response) { var user = response.result; alert(JSON.stringify

Im trying to get JSON data from js and receiving null in action class

China☆狼群 提交于 2019-12-06 04:21:42
I'm getting JSON from client side. I want to send it through ajax. However, i'm getting null inside my action class. my JSON string {"data":[{"id":"","col":1,"row":1,"size_x":1,"size_y":1}, {"id":"","col":1,"row":2,"size_x":1,"size_y":1}, {"id":"","col":1,"row":3,"size_x":1,"size_y":1}, {"id":"","col":1,"row":4,"size_x":1,"size_y":1}, {"id":"","col":1,"row":6,"size_x":1,"size_y":1}, {"id":"","col":1,"row":5,"size_x":1,"size_y":1} ] } AJAX var seats = {"data" : positions}; var seatPosition = JSON.stringify(seats); console.log(seatPosition); $.ajax({ url: 'retrieve-seat', data: seatPosition,

Retrieve data from handsontable to Struts2 Action via JSON not working

妖精的绣舞 提交于 2019-12-04 08:39:00
问题 I am using struts2-json plugin to generate JSON data and Ajax to populate table (handsontable) with data from that JSON (according to the source). Now, I need to retrieve data from table to Struts2 Action using Ajax by JSON. First I've implemented populating table with data passed by JSON from Struts2 Action to Handsontable, that was quite easy and it works. But why save do not work as you can see in attached code below? As I see in a firebug the POST is sent and in debug the request is

can not access a member of class org.springframework.aop.TruePointcut with modifiers public

╄→гoц情女王★ 提交于 2019-12-03 12:36:34
问题 I am developing a Spring application using Struts and the Struts JSON plugin. When I run the application it gives the following error (in Firebug): org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: java.lang.IllegalAccessException: Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframework.aop.TruePointcut with modifiers public This is full stack trace:

How to bind JSON to Java object in Struts2 using struts2-json-plugin

泄露秘密 提交于 2019-12-03 11:53:51
I want to deserialize (bind) JSON to java object. How to do it in Struts2? I am trying to do it with struts2-json-plugin as you can see in code below, but sent JSON from frontend is not binding to my java object. Could you help me, please how to make this code to work correctly? Please take a look at my Action class, I am not sure if I'm handling JSON correctly in this Action, or maybe I missed something? JSON which I am trying to bind: {"data":[ {"active":true,"color":"orange","date":"2008-01-01","id":1,"name":"Chris"}, {"active":false,"color":"blue","date":"2013-03-03","id":2,"name":"Kate"},

can not access a member of class org.springframework.aop.TruePointcut with modifiers public

孤人 提交于 2019-12-03 02:09:42
I am developing a Spring application using Struts and the Struts JSON plugin. When I run the application it gives the following error (in Firebug): org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: java.lang.IllegalAccessException: Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframework.aop.TruePointcut with modifiers public This is full stack trace: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json