Query in Action messages

2006-11-14 Thread Hanmay Udgiri
Hi I am doing validation in my Action Form which is extending ValidatorActionForm. In validate method,I am checking for mandatory field and adding error. The error in ApplicationResources.properties is like this. error.required=The {0) field is required field. error.notInRange=The {0} field should

Re: struts 1.3.5 tiles question

2006-11-14 Thread Antonio Petrelli
Steve Duran ha scritto: <%@ taglib uri="http://struts.apache.org/tags-tiles"; prefix="tiles" %> FooBar Here's my tiles-defs.xml: "-//Apache Software Foundation//DTD Tiles Configuration 1.3//EN" "http://struts.apache.org/dtds/tiles-config_1

RE: Preventing redisplay for .?

2006-11-14 Thread Mano Chinthaka Dasanayaka
You have to reset the field values if the insertion is successful... U can do it from the Action.. Regards, mano -Original Message- From: Mallik [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 15, 2006 12:53 PM To: user@struts.apache.org Subject: Preventing redisplay for .? Hi frien

Preventing redisplay for .?

2006-11-14 Thread Mallik
Hi friends the situation is: i have a form in that there are some text fields when i click on submit, data should save to database and the same form should display. If the any primary key problem then the form with message like "record already existed" should display. Every thing is ok but when d

Migrating Struts App From TC 4 -> 5

2006-11-14 Thread Jon Wynacht
Hi, I have a Struts-based app that is currently running on a Tomcat 4.1.29 server. I'm using Struts 1.2.9 and things have been running great. My ISP is bugging me about upgrading Tomcat to 5.5.20 so I downloaded it tonight to do a trial run and initial testing. For starters, it coughed up a ton

Re: Iterating over a Collection of Collection of Bean

2006-11-14 Thread Rasika
Try this... Tim Teulings wrote: > > Hello! > > I want to display a property in my *jsp that is of type Collection > (LinkedList) of Collection (LinkedList) of Bean - in principle a two > dimensional matrix of Beans. > > I tried to use some code like > > type="java.util.LinkedList"> > X >

Re: [s2] Requirements

2006-11-14 Thread Ted Husted
It's on the Getting Started page now, * http://struts.apache.org/WW/home.html#Home-PlatformRequirements -T. On 11/14/06, Dion Gillard <[EMAIL PROTECTED]> wrote: Not really. I would have thought it would be spelled out somewhere a little more obvious and with less technical detail, e.g.: *"Ap

Re: Validation + multiple Submit buttons

2006-11-14 Thread Laurie Harper
Andrew Martin wrote: Maybe a stupid question but is it possible to call the specifc XML configuration from within the action? Yup, just set up your validation as usual, then set validate="false" on the action mapping and call the validation by hand: ActionMessages errors = form.validate()

Re: Question on formbeans and collections in iterate tags

2006-11-14 Thread Uday Karrothi
Hi there, I never worked with a text box in the logic iterate but i worked with a radio button. Pri. Adj. for(int i=0;i May be for your Text box you can access it in the action form in this fashion for(int i=0;i wrote: Hi, Further informati

Re: Simple java question

2006-11-14 Thread Tamas Szabo
Yep, and why we are at it make sure you don't just rename one of them to afield or a_Field or something similar, you get the pattern :-D It might seem to be a good idea and saves you from coming up with some other name but it could cause headache to others or even yourself later on ... Tamas

struts 1.3.5 tiles question

2006-11-14 Thread Steve Duran
I have been unable to get Tiles to work under Struts 1.3.5. I also noticed that none of the Struts 1.3.5 examples use Tiles. Below is a summary of the problem. The only place where my implementation deviates from the documentation is in the tiles-defs.xml file. If anyone know what I need t

Re: [s2] Requirements

2006-11-14 Thread Dion Gillard
Not really. I would have thought it would be spelled out somewhere a little more obvious and with less technical detail, e.g.: *"Apache Struts 2 is an elegant, extensible framework,* well suited for creating enterprise-ready Java web applications. It extends and enhances various technologies fro

custom tag for localization

2006-11-14 Thread Mahmoud Saeed\(RSW\)
Hi, I want an open-source custom tag for localizing struts-based application using dispatch Action. thanx

Re: Simple java question

2006-11-14 Thread Christopher Goldman
On Wed, 2006-11-15 at 06:33 +0800, Tamas Szabo wrote: > Well, it isn't a global field is an instance variable of your class. > And there is another way to access it. Just rename either the instance > variable or the local variable. > > Tamas Right. While it is possible to do this, it does make i

Re: Struts 1.3.5 and Eclipse 3.2

2006-11-14 Thread James Mitchell
Well, one more thing that may or may not be the reason Eclipse is complaining. The taglib jar file (with embedded tlds) must be on the classpath of the project, which MyEclipse, Nitrox, and a few others (IBM RAD) will force upon you if the jar is under WEB-INF/lib. When I say "force", I

Re: Simple java question

2006-11-14 Thread Tamas Szabo
Well, it isn't a global field is an instance variable of your class. And there is another way to access it. Just rename either the instance variable or the local variable. Tamas On 11/15/06, temp temp <[EMAIL PROTECTED]> wrote: If I donot use this.aField implies that complier will never point

Re: Simple java question

2006-11-14 Thread paz . periasamy
Yes. You need to use the "this" qualifier to access the global variable. Thanks and regards, Pazhanikanthan. P (Paz) Consultant for AXA, Senior Software Engineer, HCL Australia Services Pty. Ltd. Off : +61-3-9618-4085 Mob : +61-0411-354-838 temp temp <[EMAIL PROTECTED]> 15/11/2006 07:22 AM

Re: Simple java question

2006-11-14 Thread temp temp
If I donot use this.aField implies that complier will never point to global field ? and only way I can access the global variable is using this ? Thanks & Regards Miro [EMAIL PROTECTED] wrote: Hello temp temp, Use this.aField inside the method. public class Test2 { private Strin

RE: Simple java question

2006-11-14 Thread Asthana, Rahul
You can do this- private void testField() { String aField = "test1"; System.out.println(aField); System.out.println("global="+this.aField); } Also, name you class Struts2 instead of Test2 so that it does not feel out of place in this List.:-) Cheer

Re: Simple java question

2006-11-14 Thread paz . periasamy
Hello temp temp, Use this.aField inside the method. public class Test2 { private String aField = " aField "; public static void main(String[] args) { Test2 test2 = new Test2(); test2.testField(); System.out.println(test2.aField); } priv

Simple java question

2006-11-14 Thread temp temp
I declared a private global field called aField. The same variable I decalred in a method . For example public class Test2 { private String aField = " aField "; public static void main(String[] args) { Test2 test2 = new Test2();

Re: setting an an html:text value with another html:text

2006-11-14 Thread Ed Griebel
This general approach would work, but if you can use JSTL, it could be written much cleaner as: ... You may be able to get away with not even having the statement and using just ${editable} On 11/14/06, Puneet Lakhina <[EMAIL PROTECTED]> wrote: On 11/14/06, Adam K <[EMAIL PROTECTED]> wrote:

Re: setting an an html:text value with another html:text

2006-11-14 Thread Adam K
That will work I suppose I was just hoping that there was a somewhat more elegant way of doing it, the fact that I'm not using JSTL should have hit me in the face that this wouldn't be elegant however. thanks for the thought. On 11/14/06, Puneet Lakhina <[EMAIL PROTECTED]> wrote: On 11/14/06,

Re: setting an an html:text value with another html:text

2006-11-14 Thread Puneet Lakhina
On 11/14/06, Adam K <[EMAIL PROTECTED]> wrote: Hi all , I am attempting to do the following, and it obviously isn't working, but I was hoping someone on the list would point me to something that might work instead: I have this text field and I want to be able to alternate the readonly property

RE: RE: RE: [HELP] struts 1.2.9 multibox/checkbox in session scoped form

2006-11-14 Thread Garner Shawn
I am not explicitly calling the reset anywhere. I've also debugged it and can not find anything out of the ordinary. From I can tell it is the request processor that is resetting my form prior to the page displaying that ends up with the checkboxes not checked. Any help? Shawn --

Re: Struts 1.3.5 and Eclipse 3.2

2006-11-14 Thread Elie Ciment
Bruno, I am running Struts 1.3.5 on Eclipse 3.2.1 and have no problem with the tld's being recognized by URI. I can even hold onto the Ctrl button and click with the mouse on the uri and it will brind me to the TLD which is packaged in the META-INF/tld within the given jar file. Which version of

setting an an html:text value with another html:text

2006-11-14 Thread Adam K
Hi all , I am attempting to do the following, and it obviously isn't working, but I was hoping someone on the list would point me to something that might work instead: I have this text field and I want to be able to alternate the readonly property from true and false. I tried to put in the below

Re: Struts 1.3.5 and Eclipse 3.2

2006-11-14 Thread Ed Griebel
I use the NitroX 2.x plugin for Eclipse (now BEA Web developer or somesuch) and I too have this problem occasionally. Usually when this happens doing Project->Clean... will clear it up as this forces the NitroX plugin to rebuild its internal database. It doesn't always work, though. -ed On 11/14

RE: Struts 1.3.5 and Eclipse 3.2

2006-11-14 Thread Bruno Melloni
I think I am being misunderstood. The problem is not related to building a WAR/EAR and running on an application server. Using the TLDs from the jars nor using the URI (thanks for the clarification Wendy) are fine for running in an application server. The problem is the annoying error message

Re: Validation + multiple Submit buttons

2006-11-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrew, Andrew Martin wrote: > That would be one solution, but in my case I have 4 submit buttons, > two of which redirect the user to another action (keeping scope set to > session) > and then back to the original form. Hmm... that makes things mor

Re: Console error message for a working tag

2006-11-14 Thread Bradley Wagner
Hi, I think u have to set the scope to session ...just try it... and let us know.. Regards, Mano Yes, for some reason, when I change the scope of the action mapping to "session" the message in the console goes away. I don't understand at all. Why it the JSP function correctly in both case

Re: Validation + multiple Submit buttons

2006-11-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lance, Lance Semmens wrote: > A JS free application? You can assume today's browsers have > javascript, the web would break otherwise. Sure there are some cross > platform issues but to go JS free is a tall order and will limit you > to a clunky UI.

RE: Validation + multiple Submit buttons

2006-11-14 Thread Andrew Martin
Thats what I thought myself, although it would be nice to be able to configure this independently within the xml configuration. Maybe a stupid question but is it possible to call the specifc XML configuration from within the action? -Oorspronkelijk bericht- Van: Ed Griebel [mailto:[EMAI

Re: Dynamically adding row!

2006-11-14 Thread Ed Griebel
You can have a form auto-populate from the javascript-generated fields, you just need to be careful what you call the generated field names. It will be hard-coded and none too attractive, but it will work. Look at the rendered HTML to see what format the field names are as an example. HTH, -ed O

Ajax+Action Problem

2006-11-14 Thread Puneet Lakhina
Hi, I want to populate dependednt drop down boxes using Ajax. I am using dom4j to build the xml response that I want to send. I have the following in My Action. DynaActionForm dynaDropDownForm = (DynaActionForm) form; String selectedVal = (String) dynaDropDownForm.get ("selectedVal");

Re: Validation + multiple Submit buttons

2006-11-14 Thread Mark Shifman
Use a Cancel button http://struts.apache.org/1.x/struts-taglib/tlddoc/html/cancel.html from javadoc Renders an HTML element of type submit. This tag is only valid when nested inside a form tag body. Pressing of this submit button causes the action servlet to bypass calling the associated form

Re: Validation + multiple Submit buttons

2006-11-14 Thread Ed Griebel
You could turn off automatic validation in struts-config.xml and call it manually in the action method when you need validation. If you are using a recent version of Struts you can use LookupDispatchAction that will call a given method based on which button was pressed. http://struts.apache.org/

Validation + multiple Submit buttons

2006-11-14 Thread Andrew Martin
Hi, I have just begun to add validation to my forms using struts validator, which is quite nice. I have however a problem when I have more than one submit button on a form. For example I have a Save button and a Back button. The Back button is also a submit (instead of a standard button - basic

RE: Validation + multiple Submit buttons

2006-11-14 Thread Andrew Martin
JS Free, clunky UI you don't have to tell us! But those are the restrictions we are working on. It basically means additional actions/forms/JSP's when we want to do anything of consequence. Usability is a big issue, but we can't do anyting about it. I don't think wrapping (nested) forms wi

RE: Validation + multiple Submit buttons

2006-11-14 Thread Lance Semmens
A JS free application? You can assume today's browsers have javascript, the web would break otherwise. Sure there are some cross platform issues but to go JS free is a tall order and will limit you to a clunky UI. If JS free is your direction, you could wrap your back button in a that posts to

Re: Validation + multiple Submit buttons

2006-11-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrew, Andrew Martin wrote: > I have just begun to add validation to my forms using struts > validator, which is quite nice. I have however a problem when I have > more than one submit button on a form. > > For example I have a Save button and a Bac

RE: setInput method of ActionMapping

2006-11-14 Thread Lance Semmens
A possible solution might be to 1. Set validate="false" for your action. 2. Configure forwards for each of your error pages 2. Explicitly call form.validate() in your action 3. Call saveErrors() if validation fails 4. Redirect to the appropriate forward Lance. -Original Message- From: N

Re: Struts 1.3.5 and Eclipse 3.2

2006-11-14 Thread Ed Griebel
YOu don't need to (and never should) extract TLD files from jars and put them into a WEB-INF directory in your war. Web app servers that follow servlet version 2.3 and up have been able to extract TLDs from jars. See for more information: http://struts.apache.org/1.2.9/userGuide/configuration.html

RE: how to add edit/add/delete functionality

2006-11-14 Thread Lance Semmens
I found this by googling struts crud http://www.learntechnology.net/struts-crud.do -Original Message- From: santas [mailto:[EMAIL PROTECTED] Sent: 14 November 2006 12:03 To: user@struts.apache.org Subject: how to add edit/add/delete functionality Hi all i am new to struts can anybody g

how to add edit/add/delete functionality

2006-11-14 Thread santas
Hi all i am new to struts can anybody give me any idea for addind add/edit/delete functionality in a struts application it will be great if i can get the flow thank you -- View this message in context: http://www.nabble.com/how-to-add-edit-add-delete-functionality-tf2629040.html#a7336292 S

RE: Validation + multiple Submit buttons

2006-11-14 Thread Andrew Martin
That is actually not too far off what I have at the moment, except I currently use to saveAction for all the submit values I will give it a go. Thanks. -Oorspronkelijk bericht- Van: Christopher Schultz [mailto:[EMAIL PROTECTED] Verzonden: dinsdag 14 november 2006 15:37 Aan: Struts Use

RE: Validation + multiple Submit buttons

2006-11-14 Thread Andrew Martin
That would be one solution, but in my case I have 4 submit buttons, two of which redirect the user to another action (keeping scope set to session) and then back to the original form. I do not want the validation to be carried out either of these two buttons but only on the SAVE submit button. (i

Re: XSS vulnerability?

2006-11-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Otsuka, otsuka wrote: > The value of "lang" attribute which tag generates is > not escaped. I think it could cause XSS problem If Accept-Language > HTTP header's value is replaced with

RE: RE: [HELP] struts 1.2.9 multibox/checkbox in session scoped form

2006-11-14 Thread Lance Semmens
The only thing I can think is maybe you're explicitly calling reset() in your action (instead of letting struts do it automatically). If not, I suggest putting a debug breakpoint on the setters for your checkboxes and see what's going on. -Original Message- From: Garner Shawn [mailto:[

RE: Dynamically adding row!

2006-11-14 Thread Lance Semmens
The least messy way is to post to an addRecord action which adds a blank record to your form. Form must be in session scope. This requires a page redraw so is less responsive but this is the approach I often use. If you add a row to your table using javascript, struts will not automatically pop

Dynamically adding row!

2006-11-14 Thread Balwinder
Hi All! I am trying to add a row in a table dynamically to add new record in Struts web application. Iam using struts 1.1 and need to implement non-Ajax solution. Will display tags has solution to this situation? Any help will be appreciated. Thanks and Regards, Balwinder Kumar --

RE: Dynamically adding row!

2006-11-14 Thread Mano Chinthaka Dasanayaka
Hi, Display tags can be used to get paging functionalities, plus sorting on a table that u display. U can simply iterate thru your record collection using a iterate tag and can display them on the page...some thing like.. to display the records u have.. Regards, Mano -Original Mess

Re: setInput method of ActionMapping

2006-11-14 Thread Nuwan Chandrasoma
As for my understanding this cantnot be set after the struts-config is loaded., - Original Message - From: "chamal desilva" <[EMAIL PROTECTED]> To: Sent: Tuesday, November 14, 2006 7:37 AM Subject: setInput method of ActionMapping Hi, I want to call mapping .setInput() method i