FAQ Database Discussion Community


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 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 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...

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 ?...