struts2-jquery

Jquery progress bar server side

僤鯓⒐⒋嵵緔 提交于 2021-02-07 09:14:15
问题 I have a long running process(not definite time) in server-side(which runs number of queries in db) which takes more than 30s. I want to display the progress in % to the user. I'm using jquery ,struts in my application. Is there a way to do it? 回答1: This is how we did it. When the process is triggered create a GUID from the client and pass it to the server. In the server side, run the process and during the run, keep storing the progress in session/cache using the GUID as key. In the client

Struts 2 jquery plugin, chart plugin does not support categories

依然范特西╮ 提交于 2021-01-24 08:31:54
问题 The chart component in the Struts 2 jQuery plugin version 3.6 seems not supporting the category plugin for the sjc:chart . I want to use Flot With “String” x-axis for chart and the best solution is to use jquery.flot.categories.js (Described at Flot With "String" x-axis). As I reviewed some struts-jquery-plugin code, I found that the jquery.chart.struts2.js does not use this plugin, on the other hand the jquery.flot.categories.js file is in the struts2-jquery-chart-plugin-3.7.1.jar file.

Struts 2 jquery plugin, chart plugin does not support categories

孤街浪徒 提交于 2021-01-24 08:31:09
问题 The chart component in the Struts 2 jQuery plugin version 3.6 seems not supporting the category plugin for the sjc:chart . I want to use Flot With “String” x-axis for chart and the best solution is to use jquery.flot.categories.js (Described at Flot With "String" x-axis). As I reviewed some struts-jquery-plugin code, I found that the jquery.chart.struts2.js does not use this plugin, on the other hand the jquery.flot.categories.js file is in the struts2-jquery-chart-plugin-3.7.1.jar file.

Struts 2 jquery plugin, chart plugin does not support categories

旧街凉风 提交于 2021-01-24 08:30:10
问题 The chart component in the Struts 2 jQuery plugin version 3.6 seems not supporting the category plugin for the sjc:chart . I want to use Flot With “String” x-axis for chart and the best solution is to use jquery.flot.categories.js (Described at Flot With "String" x-axis). As I reviewed some struts-jquery-plugin code, I found that the jquery.chart.struts2.js does not use this plugin, on the other hand the jquery.flot.categories.js file is in the struts2-jquery-chart-plugin-3.7.1.jar file.

Struts2 jQuery UI dynamic Menu from Action List

谁说我不能喝 提交于 2020-04-30 07:50:21
问题 How can I generate dynamic menu & menu items from a list generated at Action? I tried this approach but it is generating only main menu but not sub-menus. Action class: private List<String> menuList = new ArrayList<String>(); public String execute(){ menuList.add("Menu1"); menuList.add("Menu2"); menuList.add("Menu3"); menuList.add("Menu4"); return "success"; } public List<String> getMenuList() { return menuList; } public void setMenuList(List<String> menuList) { this.menuList = menuList; }

How to implement export to excel functionality in java struts2

青春壹個敷衍的年華 提交于 2020-01-25 08:04:27
问题 I am using struts2 jQuery plugin in my project. I use grid to display items.. How to export the items present in the grid to microsoft excel on click of a button? 回答1: Post the List displayed by the jqGrid to an Action (let's say ExcelExportAction). In the execute() method, create an Excel using JExcel or Apache POI. Populate the Excel with the data from the List. Google it, it's full of examples out there. Expose the result of the Excel through an InputStream from the Action (and its Getter)

No result defined for action after using autocomplete in Struts 2

风流意气都作罢 提交于 2020-01-25 00:20:06
问题 I am getting an error of No result defined for action for result input. It was not coming till the time I used Struts2 autocomplete. This is my autocomplete code : <s:form class="form-horizontal" style="margin:0 auto" role="form" theme="simple" action="Reports_open_cases"> <h4>Open Cases</h4> ..some controls here <div class="form-group"> <div class="col-xs-12 col-sm-4 col-md-4"></div> <div class="col-xs-12 col-sm-4 col-md-4" > <s:url id="advURL" action="xyz_action"/> <sj:select id="abc" name=

onsubmit event not working for asynchronous form submit

无人久伴 提交于 2020-01-04 13:46:32
问题 I have created a form using struts tags. I have submitted the form asynchronously using struts jquery's submit tag. Now before i submit my form i want to call a javascript function checkUser() , that checks if there is some client side error And prevents the form from submitting. The form with the javascript function is as follows: <script type="text/javascript"> function loadXMLDoc() { var xmlhttp; var k = document.getElementById("register_userDetails_username").value; var urls = "pass.jsp

dynamic data reload to struts2 jquery grid on form submit

怎甘沉沦 提交于 2019-12-31 03:51:12
问题 I have a grid which load data on page load. I also have a form that on submit calls an action correctly, but it doesn't load new data on my grid. List is correctly geting and also correctly setting in my grid model From my Action class but while on return SUCCESS it simply returns data in this form(see below output)... {"authFirstname":null,"authLastname":null,"bookDetailsobj":null,"bookTitile":null,"get":{"authFirstname":null,"authLastname":null,"bookTitile":null,"coverId":null,"createdDate"

Struts2 jQuery Grid reload issue

别等时光非礼了梦想. 提交于 2019-12-25 08:14:25
问题 I have following jQGrid in my page <sjg:grid id="reportGrid" gridModel="gridModel" autowidth="true" reloadTopics="refreshGrid" gridview="true" onGridCompleteTopics="gridLoadComplete" onSuccessTopics="dataLoadCompleted" navigator="true" pager="true" navigatorSearch="true" navigatorSearchOptions="{multipleSearch:true}" scroll="true" rowNum="10000" hoverrows="false" groupColumnShow="false" groupField="['field1','field2']" href="webReport" formIds="myform" dataType="json" loadonce="true" > ......