Re: JavaScript / AJAX + Struts 2?

2009-12-17 Thread james billa
Pawel, I am doing something like shown below and it works good for me. Isn't it calling the values from model/stack value from java script? zipCodes is in my model. Please tell me ur option. that would help me underst it better. I am using struts 2.1.6. Thanks. function showmylist() { var

Where does Struts looks for Validation xml file?

2009-11-24 Thread james billa
I have a JSP page with two fields user name, college name and a submit button. I have a xml validation file SubmitUserAction-validation.xml to validate both the fields on the screen. The action is mapped to SubmitUserAction. On clicking the submit button it gets executed executed successfully and

Passing values from one Action to Other

2009-11-03 Thread james billa
1 . Using struts (2.1.6) how would you pass values from one action to another other than keeping them in model? Is there any other way? 2. I am redirecting one action to second action using type=redirect. Version Struts 2.1.6. Below is the xml code. If I set some actionerrors/fielderros in

execute() not getting executed

2009-10-16 Thread james billa
Hi - I am using struts 2.1.6. From my jsp on submitting the form, the control goes to my action class, methods prepare() and validate() gets executed. But after that the execute() is not getting called. I don't have any error messages printed on my console. I have only system.out in prepare() and

Re: Changing the border color of a text field

2009-10-13 Thread james billa
next code: s:set var=zipCodeErrors value=%{fieldErrors['zipCode[' + #rowstatus.index + ']']}/ s:textfield ... cssStyle=%{(#zipCodeErrors != null #zipCodeErrors.size 0) ? 'border: 1px solid red;' : ''} ... / james billa wrote: Hi, I have a field called Preferred Zip codes

Changing the border color of a text field

2009-10-12 Thread james billa
Hi, I have a field called Preferred Zip codes : . The user is provided with 10 textfields for this to enter. He may enter 1 or more and submit the form. If any of the zip codes that he entered is not in my database, I need to change the border color of that textfield containing incorrect zip

Do something based on existence of action error - How?

2009-10-09 Thread james billa
Hi , I am using Struts 2.1.6. I want to show the content a tr only if action error exists. If not I don't want to show the content of my tr. How do I check whether action error exists or not in my page? The action error is set by my action class if there is an error. I have done to coding (CSS)

Multiple text box to one field

2009-10-07 Thread james billa
action class. Can some one suggest what is the best way to do this or any sample codes? Thanks James Billa