iteration - selection based on the row number

2005-10-17 Thread Raghu Kanchustambham
Hi, I am using the to iterate over a list and create some dynamic drop boxes on consecutive rows. For example: On first row, I want to solicit "Batchelors" related information from the student. In the second row, I want to solicit "Masters" related information. So the value XXX should be somethin

Re: So boring issues about character encoding in action ......

2005-10-17 Thread Tony Lu
I don't think so. I have set '' in struts-config.xml So the action don't need to specially add statement ' res.setCharacterEncoding("UTF-8")'. I also have tested it like this. But it seems it's no use. On 10/18/05, Deepesh Nandal <[EMAIL PROTECTED]> wrote: > > Hi, > In the struts action you are s

Re: So boring issues about character encoding in action ......

2005-10-17 Thread Deepesh Nandal
Hi, In the struts action you are setting character encoding on 'request' object req ,it however needs to be on 'response' ie res. Deepesh. public class TestAction extends Action{ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletRespon

So boring issues about character encoding in action ......

2005-10-17 Thread Tony Lu
I need to create an internationalized Web application by struts,mysql and hibernate. Each component Character Encoding is utf8. It runs well when I run a pure servlet to save 'Chinese Character' to database and load it from database. But when I implement it with struts action, the application can

Re: [ot]Date utilitiy to take date String, add a day, and return sql date?

2005-10-17 Thread Sunil_Sahu
noofDays is the Number of days which you want to add in the date. Laurie Harper <[EMAIL PROTECTED]> Sent by: news <[EMAIL PROTECTED]> 10/18/2005 10:33 AM Please respond to "Struts Users Mailing List" To user@struts.apache.org cc Subject Re: [ot]Date utilitiy to take date String, add a day,

Re: [ot]Date utilitiy to take date String, add a day, and return sql date?

2005-10-17 Thread Laurie Harper
[EMAIL PROTECTED] wrote: [...] public static String addDaysToDate( String strDate, String noofDays, String dateFormat ) throws Exception noofDays? What are those? Days 30 minutes offset from everywhere else? ;-) L. -

Re: I am getting frustrated with LookupDispatchAction

2005-10-17 Thread Laurie Harper
Those are two different things. 'parameter' is a standard attribute of the 'action' element, which many of the standard action classes expect (and can access via getParameter()). The 'set-property' element is a means of passing arbitrary additional parameters to an action. The two aren't interc

Re: I am getting frustrated with LookupDispatchAction

2005-10-17 Thread rajasekhar . cherukuri
Have you extended LookUpDipatchAction your "ddPSLUserWizardAction" ?? Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, prin

Re: I am getting frustrated with LookupDispatchAction

2005-10-17 Thread Sunil_Sahu
Did you implement the getKeyMethodMap() method in the subclass of LookupDispatchAction. Sunil <[EMAIL PROTECTED]> 10/18/2005 03:48 AM Please respond to "Struts Users Mailing List" To cc Subject I am getting frustrated with LookupDispatchAction Hi. I am using struts 1.2.7. My strut

Re: [ot]Date utilitiy to take date String, add a day, and return sql date?

2005-10-17 Thread Sunil_Sahu
Mick, You can refer following code but still you have to convert the type in the last because this method returns string. public static String addDaysToDate( String strDate, String noofDays, String dateFormat ) throws Exception { Calendar calendar =

Re: Unit Testing of Action class which are using Spring - JDBCTemplate

2005-10-17 Thread Sunil_Sahu
Bakul, I am also facing same problem but mine is little bit different. I have written some code over spring(Wrapper class) so that might be creating problem for me but if you are using struts and spring directly then i think u can refer appfuse code(Matt Raiable), StrutsTestCase is being used

Re: I am getting frustrated with LookupDispatchAction

2005-10-17 Thread Wendy Smoak
From: <[EMAIL PROTECTED]> my jsp has the following: key="button.next"/> But I get the following error in tomcat: javax.servlet.ServletException: Request[/mywizard1] does not contain handler parameter named 'method'. Can someone save me from insanity? No, but you can save yourself. :) First

Re: I am getting frustrated with LookupDispatchAction

2005-10-17 Thread Martin Gainty
I have not seen parameter as an attribute of Anyone else??? M- - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Monday, October 17, 2005 6:18 PM Subject: I am getting frustrated with LookupDispatchAction Hi. I am using struts 1.2.7. My struts-config-xml file has the followin

Re: Clever trick required

2005-10-17 Thread Murray Collingwood
Thanks Tamas - exactly what I was after! Kind regards mc On 17 Oct 2005 at 21:04, Tamas Szabo wrote: > Hi mate :-), > > using the indexId property in the second logic:iterate and displaying > > only if indexId is 0 would do waht you want? > > > Tamas > > > On 10/17/05, Murray Collingwood <

Re: What's wrong with DTOs?

2005-10-17 Thread Ted Husted
The original idea was that one Data Transfer Object could be used to represent many domain objects. Perhaps even *all* the domain objects. The view tier could then ferry back and forth this one object instead of having to deal with a plethora of finely grained objects. All the view layer sees is a

Re: I am getting frustrated with LookupDispatchAction

2005-10-17 Thread Kishore Senji
I guess you don't have a property for "button.next" defined in your MessageResources. Please make sure you have defined that property in the resources. On 10/17/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi. I am using struts 1.2.7. My struts-config-xml file has the following: > > name=

Re: I am getting frustrated with LookupDispatchAction

2005-10-17 Thread Paul Benedict
> Can someone save me from insanity? Questionable... > But I get the following error in tomcat: > javax.servlet.ServletException: Request[/mywizard1] > does not contain handler parameter named 'method'. Do you have a method named 'method'? It should look like the typical Struts execute method.

I am getting frustrated with LookupDispatchAction

2005-10-17 Thread bsimonin
Hi. I am using struts 1.2.7. My struts-config-xml file has the following: my jsp has the following: But I get the following error in tomcat: javax.servlet.ServletException: Request[/mywizard1] does not contain handler parameter named 'method'. Can someone save me

Re: struts plugin and destroy()

2005-10-17 Thread erikweber
If you are using java.util.Timer, see the constructor that takes a boolean parameter. Setting the Timer as a daemon means it won't keep the JVM running. Erik -Original Message- From: sudip shrestha <[EMAIL PROTECTED]> Sent: Oct 17, 2005 4:40 PM To: Struts Users Mailing List Subject: st

struts plugin and destroy()

2005-10-17 Thread sudip shrestha
I have a struts plugin that works wellbut I realized that it was not executing the destroy() method when the tomcat-server was shutdown. I have a timer that needs to run timertask at a certain interval and have implemented timer.cancel() method inside the destroy() methodBut there seems no

Re: Validation and error messages in session

2005-10-17 Thread Adam Hardy
It's a shame no-one answered this. I was interested in reading a reply. My situation is that on validation failure, my 'input' mapping is to another action, not direct to a JSP, so that I can carry out the necessary view helper code. As part of this I can also grab the validation errors from t

Re: Upload To URL of another Server

2005-10-17 Thread Laurie Harper
Scott Purcell wrote: Hello, I have the need to upload a multipart file to another server so therefore another url. The other server is not of the struts platform. The form in which I am uploading from has three (form fields) plus the upload file part. I do need to validate that the form field

Re: logic:present and html:text tags problem

2005-10-17 Thread Laurie Harper
Emmanuel.Leguy wrote: Wendy Smoak a écrit : From: "Emmanuel.Leguy" [EMAIL PROTECTED]> Wendy wrote: In Action code, before forwarding to the JSP, look up the Person object and pre-populate the form bean's 'name' property. Is it possible with a dynaActionForm? Sure. DynaActionForm dFo

Re: What's wrong with DTOs?

2005-10-17 Thread Frank W. Zammetti
On Mon, October 17, 2005 1:15 pm, Dave Newton said: > My only response would be that ultimately, I still prefer to have less > coupling: with a POJO bean and a DAO it gives me one more place I can > change implementation. That said, if you added a "setDao" or whatever to > the above Customer I migh

Re: i18n, localeaction and actions

2005-10-17 Thread Xavier Vanderstukken
Im ade a mistake in my previous message the correct code is : System.out.println(request.getLocale()); if(request.getLocale()!=null) System.out.println(request.getLocale().getLanguage()); MessageResources lang=this.getResources(request); //instead of MessageResources lang=(MessageResources)req

Re: [ot]Date utilitiy to take date String, add a day, and return sql date?

2005-10-17 Thread Dave Newton
Mick Knutson wrote: I need to see if anyone has a utility to take a String date, add 1 day, and return a java.sql.Date I'd probably check out the Calendar class. Dave Newton Technical Lead, MonkeyLips Omnigalgomon Project --

Re: Handling invalid sessions

2005-10-17 Thread Jadeler
Thanks for the suggestions. I'll try them out. Cheers, Jadeler --- Aladin Alaily <[EMAIL PROTECTED]> wrote: > Hi Jadeler, > > In response to your question about managing session > objects, I would > propose two methods: > > 1) Write a CustomRequestProcessor (which extends the > struts > Re

i18n, localeaction and actions

2005-10-17 Thread Xavier Vanderstukken
Hello, All my site supports i18n mechanism correctly, using Struts LocaleAction and bean taglib. However when I try to access messageresource in my action the language of the messageresource is allways the default one (in my case en_us). System.out.println(request.getLocale()); if(request.ge

[ot]Date utilitiy to take date String, add a day, and return sql date?

2005-10-17 Thread Mick Knutson
I need to see if anyone has a utility to take a String date, add 1 day, and return a java.sql.Date -- Thanks Mick Knutson (925) 951-4126 HP Consulting Services Safeway (Blackhawk Fastword Project) J2EE Architect --- "MMS " made the following annotations. --

Re: What's wrong with DTOs?

2005-10-17 Thread Dave Newton
Frank W. Zammetti wrote: So, is another way of saying what your saying is that you feel that DTO+DAO=Something Good(tm)? So, if instead of having: class CustomerDTO { public setFirstName(String); public setLastName(String); public getFirstName(String); public getLastName(String); } class C

[OT]Re: logic:present and html:text tags problem

2005-10-17 Thread Dave Newton
Emmanuel.Leguy wrote: [nothing] Why do I not see anything for Emmanuel's emails? I'm running Thunderbird on XP SP2. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Unit Testing of Action class which are using Spring - JDBCTemplate

2005-10-17 Thread Marco Mistroni
Hello, You can use spring for testing.. but you should initialize the applicationContext yourself.. You'll need to write an abstractJUnit test that does that, and extends all Your junit test from the abstract one There should be some examples on spring website HTH marco -Ori

Upload To URL of another Server

2005-10-17 Thread Scott Purcell
Hello, I have the need to upload a multipart file to another server so therefore another url. The other server is not of the struts platform. The form in which I am uploading from has three (form fields) plus the upload file part. I do need to validate that the form fields have proper data and

Re: logic:present and html:text tags problem

2005-10-17 Thread Emmanuel.Leguy
Wendy Smoak a écrit : From: "Emmanuel.Leguy" [EMAIL PROTECTED]> Wendy wrote: In Action code, before forwarding to the JSP, look up the Person object and pre-populate the form bean's 'name' property. Is it possible with a dynaActionForm? Sure. DynaActionForm dForm = (DynaActionForm) for

Re: logic:present and html:text tags problem

2005-10-17 Thread Wendy Smoak
From: "Emmanuel.Leguy" [EMAIL PROTECTED]> Wendy wrote: In Action code, before forwarding to the JSP, look up the Person object and pre-populate the form bean's 'name' property. Is it possible with a dynaActionForm? Sure. DynaActionForm dForm = (DynaActionForm) form; dForm.set( "name", person

Re: What's wrong with DTOs?

2005-10-17 Thread Rafael Nami
What I agree is that objects have to be rich in information AND associations. I don´t like(it´s just my opinion) reflecting my tables in my Objects. Like, if I have a Category and a Product, I like to associate these two objects, not just add productId in Category. About the methods, I had all the

Unit Testing of Action class which are using Spring - JDBCTemplate

2005-10-17 Thread Bakul Kakadiya
Hi, I am using struts and spring in my project. While I am trying to write unittest cases of Action class using MockStrutsTestCase (StrutsTestCase) its giving error like Application context not found. Would be thankful if any one can give some guidence or suggest any other Framework to tes

Re: logic:present and html:text tags problem

2005-10-17 Thread Emmanuel.Leguy
Wendy Smoak a écrit : From: "Emmanuel.Leguy" <[EMAIL PROTECTED]> Laurie Harper a écrit : Did you try this? No. I didn't try this. That works but if an error ocure (validate), the form is displayed with the person.name value and not with the formbean.name value. In A

Re: What's wrong with DTOs?

2005-10-17 Thread Frank W. Zammetti
So, is another way of saying what your saying is that you feel that DTO+DAO=Something Good(tm)? So, if instead of having: class CustomerDTO { private String firstName; private String lastName; private String id; public setFirstName(String); public setLastName(String); public setId(Str

Re: What's wrong with DTOs?

2005-10-17 Thread Rafael Nami
[EMAIL PROTECTED] said: *"I think it is best to use directly domain objects, i.e. ye old (but good) OOP with "real" objects."* ** +1 :) Best Regards Rafael Mauricio Nami 2005/10/17, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > I'm not a guru but... > Once I thought that DTOs are a nice way to se

Re: What's wrong with DTOs?

2005-10-17 Thread brenmcguire
I'm not a guru but... Once I thought that DTOs are a nice way to separate the webapp's layers, just because they are simply data containers and have no logic. But now I think they are completely useless, because they have no logic! I know it is stupid to use the same answer for two opposite points

Re: What's wrong with DTOs?

2005-10-17 Thread Aldo Vadillo Batista
I think DTOs is the best solution. However, is tedious to copy properties. Yes, I know that you can use BeanUtils but sometimes you need a DTO that is a combinations of two model objects and you have to use getters and setters. 2005/10/17, Vic Cekvenich <[EMAIL PROTECTED]>: > > I don't think anyt

Re: errorStyleClass with ActionMessages

2005-10-17 Thread Niall Pemberton
It should be straight forward - there are only two things you need to do: 1) Sore you ActionMessages under the standard struts "error" key - which if your using (or ) you probably are already doing anyway. If you're doing your validation in the ActionForm's validate method then this happens autom

Re: errorStyleClass with ActionMessages

2005-10-17 Thread Joe Germuska
At 3:26 PM +0100 10/17/05, [EMAIL PROTECTED] wrote: Hi there, I would like to make use of the errorStyleClass functionality with validation errors that I create in my action class using ActionMessages. I guess there must be a way of letting the ActionMessage object know which UI field it is re

Re: What's wrong with DTOs?

2005-10-17 Thread Vic Cekvenich
I don't think anything wrong w/ DTO. You have your DAO, your model... in my case I use collections as DTO, but beanutils is fine. .V [EMAIL PROTECTED] wrote: Hi, Gurus, Background: I just started a Struts project with Hibernate. I have chosen to use the Data Access Object with (Abstract F

errorStyleClass with ActionMessages

2005-10-17 Thread paul
Hi there, I would like to make use of the errorStyleClass functionality with validation errors that I create in my action class using ActionMessages. I guess there must be a way of letting the ActionMessage object know which UI field it is relating to. Has anyone managed to do this without c

What's wrong with DTOs?

2005-10-17 Thread bjester_2004
Hi, Gurus, Background: I just started a Struts project with Hibernate. I have chosen to use the Data Access Object with (Abstract Factory) design pattern because my client uses Oracle and I use Postgresql database. I am working with other teams remotely and they decided to use DTO. Problem:

Re: Clever trick required

2005-10-17 Thread Vic Cekvenich
displaytag does it, and it's in sample screens on sf.net. displaytag should be included in struts! Also... using logic tag is deprecated. use jstl instead. .V Murray Collingwood wrote: Hi all Bean 1 has a property, a list of Bean 2s. I want to display these on the screen but I don't want to

Re: logic:present and html:text tags problem

2005-10-17 Thread Wendy Smoak
From: "Emmanuel.Leguy" <[EMAIL PROTECTED]> Laurie Harper a écrit : Did you try this? No. I didn't try this. That works but if an error ocure (validate), the form is displayed with the person.name value and not with the formbean.name value. In Action code, before forwardi

Re: Clever trick required

2005-10-17 Thread Aldo Vadillo Batista
A possible solution could be:   2005/10/17, Murray Collingwood <[EMAIL PROTECTED]>: > > Hi all > > Bean 1 has a property, a list of Bean 2s. > > I want to display these on the screen but I don't want to display repeated > occurrences of > the same value from Be

Re: Clever trick required

2005-10-17 Thread Tamas Szabo
Hi mate :-), using the indexId property in the second logic:iterate and displaying only if indexId is 0 would do waht you want? Tamas On 10/17/05, Murray Collingwood <[EMAIL PROTECTED]> wrote: > > Hi all > > Bean 1 has a property, a list of Bean 2s. > > I want to display these on the screen b

Re: logic:present and html:text tags problem

2005-10-17 Thread Emmanuel.Leguy
Laurie Harper a écrit : Emmanuel.Leguy wrote: Hello, I use the following code in a jsp: If 'person' is not present <%= person.getName() %> is compiled and I get this error: membreLIFL cannot be resolved If i use this code: "/> No problem. How can i use the html:t

Clever trick required

2005-10-17 Thread Murray Collingwood
Hi all Bean 1 has a property, a list of Bean 2s. I want to display these on the screen but I don't want to display repeated occurrences of the same value from Bean 1. For example, lets assume Bean 1 is surname and Bean 2 is first names, and we have families, and what I want is something like

Re: Handling invalid sessions

2005-10-17 Thread Aladin Alaily
Hi Jadeler, In response to your question about managing session objects, I would propose two methods: 1) Write a CustomRequestProcessor (which extends the struts RequestProcessor), and put your management code in there. As a struts programmer, you know that all requests *should* go through

Re:SV: Serializing Form-Beans with XML

2005-10-17 Thread gollinger
Thank you for your answers I'll try it! Nice greetings Antonio -- Initial Header --- >From : [EMAIL PROTECTED] To : user@struts.apache.org Cc : Date : Mon, 17 Oct 2005 12:48:56 +0200 Subject : SV: Serializing Form-Beans with XML > Hi > > Also

SV: Serializing Form-Beans with XML

2005-10-17 Thread hermod.opstvedt
Hi Also there are a number of other API's for doing stuff like that, including the Java extention from Sun: JAXB Hermod -Opprinnelig melding- Fra: Bob Arnott [mailto:[EMAIL PROTECTED] Sendt: 17. oktober 2005 11:15 Til: Struts Users Mailing List Emne: Re: Serializing Form-Beans with XML

Re: Playing with the file system

2005-10-17 Thread Benjamin Lerman
Thanks for your answers, it helps me resolved my problem. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Serializing Form-Beans with XML

2005-10-17 Thread Bob Arnott
gollinger wrote: Hi, has someone made experiences in using a tool which can serialize Beans to XML-Files and works stable and properly. For example that can also handle String Arrays? http://jakarta.apache.org/commons/betwixt/ "The Betwixt library provides an XML introspection mechanism for