struts2

Dynamic tab generation in struts2

I need to dynamically create the tabs in struts2 using struts2-jquery-grid-plugin, like selecting from multiple select box and then dynamically getting the tabs generated in the grid. Any suggestions? Thanks. ...

Setting value of dojo datetimepicker

I want to set the value of datetimepicker tag through code please help me! ...

Struts2 validation bypass/block, table pagination

hi, I have two action classes, UserAction(methods: login, logout) & EmployeeAction(methods: add, update, view) both have a validate method. It is invoked for every method by default. Is there a way to bypass call to validate method on say logout, as doing so throws an nullpointer exception on fields. Same for view method, that doesn't ne...

Can i use iterator within iterator on jsp in struts2.0 ?

This is the ArrayList defined in the private ArrayList<LocWiseSaleParam> locWiseSaleList; where LocWiseSaleParam is myaction class I am using a iterator on jsp and accessing its values. but can i use the iterator with the same value as nested iterator <s:iterator value="locWiseSaleList" id="list" > <s:iterator value="l...

Struts2 escaping select values

I have text in a option (using a select tag) that has multiple spaces. These spaces are then converted into one space. I then tried to escape the spaces with &nbsp; but it then converts it to: which is not what I want. Is there anyway to disable escaping in Strut2 or have it always escape spaces for me for select tags? There is a ...

[struts2] After modifying xml files, do I have to always restart the server?

I'm using eclipse(galileo) and struts2 framework and tiles. It seems that modifying xml files(struts.xml, tiles-config.xml, etc) is not affected until I restart the server. It is very annoying and it takes more time. Is there any way not to restart? ...

Trying to create a table in Struts2 from an ArrayList

Hi, I am trying to create a table to display some data I pulled out from a database into a JSP page (all part of a Struts2 application), and I don't know what I'm doing wrong here... This is the part of my JSP page where I create the table: <table> <s:iterator value="table" id="row"> <tr> <s:iterator value="row" id="...

Downloading a file from a Struts2 action in a portlet

I've got a basic file download action that is working in the standalone version of my Struts2 webapp, but when I try to use it in the portlet version (using struts2-portlet-plugin), I'm having troubles. First it said it didn't support "text/plain", so I added that to my portlet.xml supports section. Now it's saying java.lang.IllegalSta...

Problem with loading data from Java Struts2 Action into jqGrid using Java Struts2 jQuery Plugin

Hi I'm using Java at the core backend and JSP pages as GUI frontend. and also I'm using Struts2 to connect JSP Pages to my Java Core. struts2 jQuery plugin provides jquery capabilities as struts tags. see the showcase here: now I wanna load 2 very simple 1 columned rows into the grid provided by jQuery Plugin. I've got just this tag in...

Cross-browser CSS for right align label position of textfield

Hi. I'm using rightToLeft language for my UI, so I need to have label of textfield on right side. I tried using div with float:right for label and div with float:left for textfield. but it still doesn't align correctly in my form. This is code sample: <s:form action="processRegister" cssClass="form"> <div style="float:right;text-a...

how to validate a text field using selection of a radion button in struts2

I need to validate two text fields as email and mobile number. I need to validate these based on the user selection of radio buttons. If the user selected the email option in radio button, then email text filed should be validated if he selected mobile number then need to validate mobile number text field. Since I use struts2 I have no ...

How to send value of textfield using onClickTopics struts2 jquery plugin

Hi all, I'd like to send my textfield value when onClickTopics of one button. This button will reload the data from Jquery grid, but before reloading back bean of struts needs to compare few values from textfield. This is my button tag: <sj:a button="true" onClickTopics="submitSuccess" indicator="indicator" targets="result">Tampilkan</...

Migration from Struts 1.2 -> Struts2 vs Spring-MVC (primarily vis-a-vis Struts1.2 taglib support)

Primary Question: If my app is CURRENTLY using Struts 1.x - and I am considering migrating to EITHER Spring-MVC or Struts2 for the MVC-framework - is there anything about either one that would make it easier to migrate from Struts1.2? To clarify, I am NOT asking whether SpringMVC or Struts2 is better overall (there are a number of exis...

[Struts2] The sequence of ModelDriven and Prepare?

I put the println() in each method of Action class. public String execute() throws Exception { System.out.println("execute"); //... } public void prepare() throws Exception { System.out.println("prepare"); //... } public Object getModel() { System.out.print("getModel"); //... } I thought the order would be; prepare → ...

Getting URL value from HashMap in a JSP page (Using Struts2)

Hi, I am trying to get my page to link to a certain URL that is stored in a HashMap (the key is some name, and the value is the URL I want to link to). I'm not very good at describing this, but here is my code: For the JSP page: <table> <s:iterator value="dependenciesList" id="dependency"> <tr><td> <a href="<s:url value="pro...

backsapce not working in file upload control

Hi All, I am using struts 2. I need a file upload control in a jsp. I added that control by using the following code snnipet: <ww:file name="upload" label="FileUpload" /> It is working fine on my local jboss server (Windows machine) But when i deploy this code on web sphere server (Linux machine) everything works fine except backspa...

How to populate struts2 combo with string array

statesList is ArrayList that contains String object. String[] states = new String[2]; states[0] = "CA"; states[1] = "California"; statesList.add(states); //--- <s:select list="statesList" headerKey="" headerValue="Select State" name="state" listKey="?" listValue="?" /> What to mention in listKey and listValue?? ...

How to use multiple buttons (one on each line) for JSP page using Struts2

Hi, I don't really know how to title my question, but I have a JSP page with a table displaying elements from a database, and I want to have a button for each row to either delete or edit that particular row. Here is the part of my JSP page where I generate the table (the table and buttons are generated fine) <style type="text/css"> ...

JSF 2.0 (Facelets) and Struts

Hello I am a newbie with Java EE 6. I started with JSF 2.0, Facelets, Managed Beans and really liked it. It was a great switch from JSP and servlets. It also made me a confused person. It may be the lack of my knowledge, but I have many questions swirling in my mind. Are Facelets and Managed beans a direct replacement of JSP and Servle...

Struts 2 + Export to Excel NOT working in IE6 (Works in IE7 and Firefox)

I have implemented export to excel feature in struts 2 using apache POI. It works in IE7 and Firefox on Windows XP. But does not work in IE6. The pop up dialog to open or save excel does not show up on IE6. I get no errors or exceptions. This is the result type. <action name="exportToExcelRIQueue" class="queuesAction" method="expo...