RE: Problem with DynaActionForm in portlets

2005-10-17 Thread Tamilselvan Radha Krishnan
Can any one suggest me whether I can use DynaACtionForm in portlet development? Thanks.. tamil -Original Message- From: Tamilselvan Radha Krishnan [mailto:[EMAIL PROTECTED] Sent: Friday, October 14, 2005 8:18 PM To: Struts Users Mailing List Subject: Problem with DynaActionForm in

Serializing Form-Beans with XML

2005-10-17 Thread gollinger
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? Nice Greetings Antonio - To unsubscribe, e-mail: [EMAIL

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

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]

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

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

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

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: logic:present name=person html:text property=name value='%= person.getName() %'/ /logic:present If 'person' is not present %= person.getName() % is compiled and I get this error: membreLIFL

Re: Clever trick required

2005-10-17 Thread Tamas Szabo
Hi mate :-), using the indexId property in the second logic:iterate and displaying jsp:getProperty name=aFamily property=name/ 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

Re: Clever trick required

2005-10-17 Thread Aldo Vadillo Batista
A possible solution could be: logic:notEmpty name=family logic:iterate name=family type=Family id=aFamily logic:notEmpty name=aFamily property=members bean:define id=firstRow value=true / logic:iterate name=aFamily property=members type=Member id=aMember logic:notEqual name=firstRow value=true tr

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? logic:present name=person html:text name=person property=name/ /logic:present No. I didn't try this. That works but if an error ocure (validate), the form is displayed with the person.name value

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

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

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

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: 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 html:errors (or html:messages) you probably are already doing anyway. If you're doing your validation in the ActionForm's validate method

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

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 separate

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

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? logic:present name=person html:text name=person property=name/ /logic:present No. I didn't try this. That works but if an error ocure (validate), the form is displayed

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

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,

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) form;

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

[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: 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

[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 safeway.com made the following annotations.

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());

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: [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: 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

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 might

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 dForm

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

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

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

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: action path=/mywizard1 name=wizardForm scope=session type=edu.nmsu.psl.userwizard.AddPSLUserWizardAction input=/step1.jsp validate=false

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.

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: action

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: 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 jsp:getProperty name=aFamily property=name/ only if indexId is 0 would do waht you want? Tamas

Re: I am getting frustrated with LookupDispatchAction

2005-10-17 Thread Martin Gainty
I have not seen parameter as an attribute of action path= it is better to break the parameter away from action tag something like set-property property=method value=method/ Anyone else??? M- - Original Message - From: [EMAIL PROTECTED] To: user@struts.apache.org Sent: Monday, October

Re: I am getting frustrated with LookupDispatchAction

2005-10-17 Thread Wendy Smoak
From: [EMAIL PROTECTED] my jsp has the following: html:submit property=methodbean:message key=button.next//html:submit 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

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: [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: 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 user@struts.apache.org To user@struts.apache.org cc Subject I am getting frustrated with LookupDispatchAction

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,

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

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.

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