FAQ Database Discussion Community


How do I initialize in struts2 using JavaScript?

struts2,struts2-jquery,struts2-jquery-plugin
I am developing a struts2 application and have been using <sj:accordion> (https://code.google.com/p/struts2-jquery/wiki/AccordionTag). Until now, I have been initializing it on my jsp page by hardcoding the value I want in the tags but is there anyway to initialize it using JavaScript? Here is what I'm trying to solve. I have...

Struts2 jqGrid Remove x On Individual Column Filters

jquery,jqgrid,struts2-jquery,struts2-jquery-grid
I have a struts2-jquery jqGrid page that has a grid with column filters. Some of the columns are date formats, which I do not want to be visible, so I removed the input fields for that column filter using .hide(). $("#gs_fraudEndDt").hide(); However, I still have the small "x" next to...

text change event sj:autocompleter struts2 jquery

struts2,autocomplete,jquery-autocomplete,struts2-jquery
Here is what I am trying to do. If the user makes a selection from the suggested options then I display a div tag using jquery. I use onCompleteTopics to fire this event. Now when the user makes any changes to the text box I want to hide the div...

Struts2 Jquery jqGrid beforeShowForm Example

jquery,jqgrid,struts2-jquery,struts2-jquery-plugin,struts2-jquery-grid
I'm looking for a way to use the beforeShowForm event when opening the edit dialog on a struts2-jquery grid. I want to be able to add custom fields to the edit dialog. <sjg:grid altRows="false" id="gridtable" dataType="json" editurl="%{editurl}" filter="true" filterOptions="{stringResult:true}" gridModel="gridModel" height="600" href="%{remoteurl}" loadonce="true" navigator="true" navigatorAdd="%{editPermission}" navigatorAddOptions="{reloadAfterSubmit:true,addCaption:'Add Record'}" navigatorDelete="false" navigatorEdit="%{editPermission}"...

How to manipulate the list of a Struts2 before it is loaded?

ajax,struts2,struts2-jquery,jquery-selectbox,struts2-jquery-plugin
I have implemented Struts2-jQuery <sj:select/>. This select box is populated fetching a JSON object coming from an AJAX call. How can I access this JSON object before the loading of the SelectBox in javascript in order to do some processing on it ?...

Struts2 autocompleter of struts jquery tag not taking another value other then of list after setting forceValidOption to false [duplicate]

java,jsp,autocomplete,struts2,struts2-jquery
This question already has an answer here: Struts 2 jquery autocompleter with forceValidOption=“false” 1 answer I have a jsp file in which i have a struts autocompleter box of struts jquery plugin. This box is not taking any other value which is not in the autocomplete list after setting...

Struts 2 autocompleter not working as dropdown

java,jsp,struts2,struts,struts2-jquery
I have a JSP page in which I have use sx:autocompleter. It is working but at the time of typing in textbox, suggestions are not coming in dropdown, they are coming as completing the word. Like this What is the problem here ? ...

Struts2 sj:head with scriptPath

struts2,struts2-jquery
I have a web application made with Struts2 . I'm using struts2-Jquery plugin. With this setting in the jsp head section: <%@ taglib prefix="sj" uri="/struts-jquery-tags" %> <head> <sj:head/> </head> Everything is fine, the generated HTML code looks like this: <script src="/MyContextRoot/struts/js/base/jquery-1.10.0.min.js" type="text/javascript"> Regarding to the API: https://code.google.com/p/struts2-jquery/wiki/HeadTag If I change...

Struts2 jqGrid Bind afterclickPgButtons to Edit Dialog

jquery,jqgrid,struts2-jquery,struts2-jquery-grid
I have a struts2-jquery jqGrid page with a grid that uses the event dialog boxes. I'm trying to bind the event afterclickPgButtons to the edit dialog. I can bind events to the entire grid (gridTable), but I'm having issues binding the event to the dialog box. I want to modify...

Set default value for struts 2 autocompleter

jquery,jsp,struts2,struts2-jquery,struts2-jquery-plugin
I have implemented a struts 2 autocompleter in which i have used a list of String like this - <sj:autocompleter id="cityId" cssClass="txtfield8" name="outlet.cityName" list="cityList" autoComplete="true" forceValidOption="false" /> How can I set a default value for this, so that every time it loads, a default value will be shown ?...