Re: read init parameters in action

2005-07-11 Thread Borislav Sabev
Sure, here it is: 1. this snippet you have to add to your stuts-config.xml plug-in className=com.mycompany.myproduct.servlet.InitPlugin/plug-in 2. this is the plugin-code: public class InitPlugin implements org.apache.struts.action.PlugIn { public void destroy() { try {

Re: access entries in MessageResources.properties from java code

2005-07-11 Thread Borislav Sabev
Rivka Shisman wrote: Hi all, I have a MessageResources.properties file that contains all the messages regarding form validation. I wonder what should I do when I have a business/workflow messages (like This entry already exist in the DB), should I use the same properties file? If yes - how do

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Borislav Sabev
Rivka Shisman wrote: Hi Erik You said - My form class fields are always Strings (because of HTTP) - I'm not sure I anderstand the meaning of this - why do the fields are Strings? I have recently started working with struts and my forms contain int, short, boolean and so on, and it works

Re: dialog stuff (was) Re: Refresher for newbies...

2005-07-11 Thread Michael Jouravlev
I released Struts Dialogs 1.21. The biggest change is moving to net.jspcontrols.* package name. I wrote some docs on how to create wizards with WizardAction: http://struts.sourceforge.net/strutsdialogs/wizardaction.html Michael.

Re: two struts:logic and dynabeans questions

2005-07-11 Thread chhum
Wendy, Thanks so much for your response. Sorry I have replied until now – I’ve had my head down trying to get the coding done. I used the c:set var=jstlName bean:write name=myDynaBean property=name / /c:set c:out value=${jstlName} trick for the demo version. I will revisit this this

RE: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rivka Shisman
Hi again When you say that validation doesn't work when inserting ABC in an integer field - do you mean when using struts Validator? I'm not using the Validator - I just add if myInteger 1 in method validate(). If I define myInteger as String - how do I check that it's a valid number in the

Tiles

2005-07-11 Thread Dewitte Rémi
Hi ! I make a definition in which i put a list of tiles to include but I can't achieve to do this eg : in my tiles-defs.xml : definition name=page1-def extends=baseDef put name=page value=1/ putList name=listQuestions add

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Borislav Sabev
Rivka Shisman wrote: Hi again When you say that validation doesn't work when inserting ABC in an integer field - do you mean when using struts Validator? I'm not using the Validator - I just add if myInteger 1 in method validate(). If I define myInteger as String - how do I check that it's

Re: Tiles

2005-07-11 Thread Dewitte Rémi
I answer myself. I achieved doing this : tiles:useAttribute id=listQuestions name=listQuestions classname=java.util.List / % java.util.Iterator i=listQuestions.iterator(); while( i.hasNext() ) { String question= (String)i.next(); % tiles:insert name=%=question% flush=true / br

Re: Tiles

2005-07-11 Thread Leon Rosenberg
logic:iterate name=listQuestions id=question toScope=page type=java.lang.String tiles:insert name=%=question% flush=true / /logic:iterate Unfortunately you can't get rid of the %=question%, but it would be the only java code in the page. Regards leon -Ursprüngliche Nachricht- Von:

Re: Tiles

2005-07-11 Thread Leon Rosenberg
logic:iterate name=listQuestions id=question toScope=page type=java.lang.String tiles:insert name=%=question% flush=true / /logic:iterate Unfortunately you can't get rid of the %=question%, but it would be the only java code in the page. Regards leon -Ursprüngliche Nachricht- Von:

Re: Tiles

2005-07-11 Thread Borislav Sabev
Dewitte Rémi wrote: I answer myself. I achieved doing this : tiles:useAttribute id=listQuestions name=listQuestions classname=java.util.List / % java.util.Iterator i=listQuestions.iterator(); while( i.hasNext() ) { String question= (String)i.next(); % tiles:insert name=%=question%

Validation of mapped property

2005-07-11 Thread Lionel
Hi all I have a mapped property on a form which should be populated with integers. How can I validate the values with validator ? Form: String getMyProperty(String key); void setMyProperty(String key, String value); the html source code looks like this: input type=text name=myProperty(0) input

RE: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rivka Shisman
Hi again When you say that validation doesn't work when inserting ABC in an integer field - do you mean when using struts Validator? I'm not using the Validator - I just add if myInteger 1 in method validate(). If I define myInteger as String - how do I check that it's a valid number in the

Re: I18N by pages

2005-07-11 Thread Marc Demlenne
Hello, Maybe another idea if I understand well what you want. So you want to include a file, specific to the current locale definition. I need about the same feature, and was looking for a better way than mine to solve this. The only think is that I include a i18n _file_ in a general template,

Re: Tiles

2005-07-11 Thread Dewitte Rémi
Which does not work : Can't insert page '/Q/firstName.jsp' : Illegal to flush within a custom tag Hum ... Seems to be a bit complicated ! Thanks. Le Lundi 11 Juillet 2005 11:37, Leon Rosenberg a écrit : logic:iterate name=listQuestions id=question toScope=page type=java.lang.String

Re: I18N by pages

2005-07-11 Thread Marc Demlenne
Just a small mistake while copying my code here ... I've swapped to things. Sorry It is : jsp:include flush=false jsp:attribute name=page i18n:message bundleRef=help jsp:attribute name=key tiles:getAsString ignore=true name=help/ /jsp:attribute /i18n:message

Re: Tiles

2005-07-11 Thread Leon Rosenberg
use flush=false Flush=true works only in a top page, if you already included another page (or tile) yor aren't allowed to flush. At least in tomcat. Regards Leon -Ursprüngliche Nachricht- Von: Dewitte Rémi [mailto:[EMAIL PROTECTED] Gesendet: Montag, 11. Juli 2005 13:59 An: Struts

Re: Tiles

2005-07-11 Thread Leon Rosenberg
use flush=false Flush=true works only in a top page, if you already included another page (or tile) yor aren't allowed to flush. At least in tomcat. Regards Leon -Ursprüngliche Nachricht- Von: Dewitte Rémi [mailto:[EMAIL PROTECTED] Gesendet: Montag, 11. Juli 2005 13:59 An: Struts

RE: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread raghavendra
HI If u can use struts Validator or not here this is not matter. In Struts all in put text values takes Strings only. At the time of populating Action Form use the class org.apache.struts.util.RequestUtils class. In Struts all input values are String type, see the following code how to assign

RE: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rivka Shisman
Hi Borislav I did the test and it works fine - In my form I have: private int question_no; public void setQuestion_no(int i) { this.question_no = i; } public int getQuestion_no() { return question_no; } public ActionErrors validate(ActionMapping mapping,

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Borislav Sabev
Rivka Shisman wrote: Hi Borislav I did the test and it works fine - In my form I have: private int question_no; public void setQuestion_no(int i) { this.question_no = i; } public int getQuestion_no() { return question_no; } public ActionErrors validate(ActionMapping mapping,

Re: Tiles

2005-07-11 Thread Dewitte Rémi
Going on... tiles:useAttribute id=listQuestions name=listQuestions classname=java.util.List / c:forEach items=${listQuestions} var=question c:out value=${question}/ tiles:insert name=%=question% flush=false / /c:forEach Gives me : question cannot be resolved Seems to me it's a

RE: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Nitish Kumar
I think raghavendra is right. Rivka, your code is working because you are using primitive type int and not the wrapper type Integer. In case of primitive type in case of any exception, it gives you a default value. Thanks and Regards, Nitish Kumar -Original Message- From: Rivka

Antwort: Re: Tiles

2005-07-11 Thread Karsten Krieg
Hi! question has been set be the c:forEach tag and is not easily retrievable by %=question%. You can use: %=(String) pageContext.findAttribute(question)% which is ugly, but I don't see any other solution to a tiles inclusion in a forEach loop. hth Karsten Krieg Dewitte Rémi [EMAIL PROTECTED]

AW: Tiles

2005-07-11 Thread Leon Rosenberg
Use logic tags, they do tie tags to the jsp context. In jstl you'd have to write something like: tiles:insert name=${question} flush=false / -Ursprüngliche Nachricht- Von: Dewitte Rémi [mailto:[EMAIL PROTECTED] Gesendet: Montag, 11. Juli 2005 15:49 An: Struts Users Mailing

AW: Tiles

2005-07-11 Thread Leon Rosenberg
Use logic tags, they do tie tags to the jsp context. In jstl you'd have to write something like: tiles:insert name=${question} flush=false / -Ursprüngliche Nachricht- Von: Dewitte Rémi [mailto:[EMAIL PROTECTED] Gesendet: Montag, 11. Juli 2005 15:49 An: Struts Users Mailing

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Ted Husted
On 7/8/05, Craig McClanahan [EMAIL PROTECTED] wrote: +1 as well, and this matches the historical reason that form beans were invented in the first place. Form beans are part of the *view* tier, not the model ... their purpose in life is to represent the server side state of the HTML

[BEER] Re: [OT] versus [FRIDAY] and [BEER] (was Re: Fired??? ...)

2005-07-11 Thread Ted Husted
On 7/8/05, Craig McClanahan [EMAIL PROTECTED] wrote: If you're only here for the Friday [OT] humor, then I suggest you find a different place to cut loose. The purpose of this list is to answer user questions about Struts and all its related technologies -- and you'll sure like how you look

Re: Tiles

2005-07-11 Thread Wendy Smoak
From: Dewitte Rémi [EMAIL PROTECTED] tiles:useAttribute id=listQuestions name=listQuestions classname=java.util.List / c:forEach items=${listQuestions} var=question c:out value=${question}/ tiles:insert name=%=question% flush=false / /c:forEach Gives me : question cannot be resolved Take a

SynchroAction plus DispatchAction = (any ideas?)

2005-07-11 Thread Yaroslav Novytskyy
Hello! Iwanted to implement a token protection in my app and first found http://www.jguru.com/faq/view.jsp?EID=779112 from Ted Husted. Then I wnted to automate the precess, so I programmed myself a little, but then looking over the internet once more for token-based flow controll protection

upload/download file to/from oracle blob field with struts

2005-07-11 Thread EROL TEZCAN
Hi, I want to upload/download a file to/from oracle blob field. How can I do this ? Please give an example code. Thanks, Erol __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

Propertirs file

2005-07-11 Thread Vijay K Anand
Hi All I have a common class which gives value for keys in the properties file. How do i load / read values from properties file? Regards Vijay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

[OT] StrutsMenu Acegi security framework

2005-07-11 Thread Marco Mistroni
Hello all, Sorry for OT, but is anyone on this list using Struts Menu with Acegi security framework? I am having problems with permissions, and since I am not getting many replies from strutsmenu-user mailing list I was wondering if anyone on this list can help.. thanks in advance and

Re: Propertirs file

2005-07-11 Thread Wendy Smoak
From: Vijay K Anand [EMAIL PROTECTED] I have a common class which gives value for keys in the properties file. How do i load / read values from properties file? Many of the Struts tags have attributes such as 'altKey' 'errorKey' and 'styleKey' which will look to (usually)

tiles definition versus global forward issue

2005-07-11 Thread Faber, Szczepan
Hello Struts 1.2.7 - tile definition use problem. I cannot use tile definition within the global forward (output is http 404): html:link forward=indexRule tester/html:link def.createItineraries is configured in tiles-defs.xml: forward name=index path=def.index / and works properly if

RE: tiles definition versus global forward issue

2005-07-11 Thread Faber, Szczepan
Correction: def.createItineraries is configured in tiles-defs.xml: definition name=def.index page=/layouts/layout.jsp put name=title value= Home Page / /definition Struts-config.xml: forward name=index path=def.index / -Original

Re: Session Forms?

2005-07-11 Thread Rick Reumann
P B wrote the following on 7/10/2005 4:24 PM: Is it proper to put this non-form data in the session? That way if validation fails, the user can still see the display data required to make informed decision. I cover that exact question here:

Re: Propertirs file

2005-07-11 Thread Vijay K Anand
Hi i need to load LDAP server name , port , username from prop file . how this will help us? Thanks replying to the mail Wendy Smoak wrote: From: Vijay K Anand [EMAIL PROTECTED] I have a common class which gives value for keys in the properties file. How do i load / read values from

Re: Propertirs file

2005-07-11 Thread Leon Rosenberg
Ok, example code Properties props = new Properties(); try{ props.load(MyClassName.class.getResourceAsStream(/mail.properties)); }catch(IOException e){ log.error(load properties, e); }

Re: Propertirs file

2005-07-11 Thread Leon Rosenberg
Ok, example code Properties props = new Properties(); try{ props.load(MyClassName.class.getResourceAsStream(/mail.properties)); }catch(IOException e){ log.error(load properties, e); }

RE: Paging in DisplayTag

2005-07-11 Thread Abdullah Jibaly
Yes you can. See http://displaytag.sourceforge.net/configuration.html -Original Message- From: Phani [mailto:[EMAIL PROTECTED] Sent: Friday, July 08, 2005 12:07 PM To: Struts Users Mailing List Subject: RE: Paging in DisplayTag It worked when I set to blank -- requestURI= . How come

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Borislav Sabev
Nitish Kumar wrote: I think raghavendra is right. Rivka, your code is working because you are using primitive type int and not the wrapper type Integer. In case of primitive type in case of any exception, it gives you a default value. Thanks and Regards, Nitish Kumar I don't think

RE: tiles and multipart messages

2005-07-11 Thread Durham David R Jr Ctr 805 CSPTS/SCE
What is the recommended way of working with multipart messages and tiles at the same time? SFAIK, Tiles and multipart encoding have nothing to do with each other. You're going to have to post some more info about your problem in order to get help. Try posting the relevant Struts config items,

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Laurie Harper
Ted Husted wrote: In my own work, I tend to think of an enterprise-grade application as a set of overlapping rings, like the Olympics logo. * http://www.olympic.org/ In the Blue ring... Nice analogy! :-) -- Laurie, Open Source advocate, Java geek and novice blogger:

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Leon Rosenberg
Some time ago I tried to postulate an enterprise application as a row of mvc patterns each using the previous one as the model, and everyone laughed at me :-) Now this is the same, with a nicer metaphor :-) Leon -Ursprüngliche Nachricht- Von: news [mailto:[EMAIL PROTECTED] Im

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Leon Rosenberg
Some time ago I tried to postulate an enterprise application as a row of mvc patterns each using the previous one as the model, and everyone laughed at me :-) Now this is the same, with a nicer metaphor :-) Leon -Ursprüngliche Nachricht- Von: news [mailto:[EMAIL PROTECTED] Im

Problem with html:select

2005-07-11 Thread lk
Hi, I have a html:select that at begin is empty. Using a javascript and clicking over a button the select field can be populated? The problem is that if I try to read in my Action class the select it seems to be empty. (I use (ArrayList)((DynaValidatorForm)form).get(chosen) to get the

RE: Problem with html:select

2005-07-11 Thread Balasubramaniam, Sezhiyan
I usually set the JavaScript add-options statements using logic-iterate and on the event of user clicks a button; this function will be called which will populate the select box. function refreshSelect() { logic:iterate id=MIP_SUBGRP_CD name=MIP_SUBGRP_CD

Re: upload/download file to/from oracle blob field with struts

2005-07-11 Thread Martin Gainty
Erol Here is an article on writing BLOBS (Binary Large Object) using the Oracle JDBC Driver http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_21278328.html HTH, Martin- - Original Message - From: EROL TEZCAN [EMAIL PROTECTED] To: sturts_apache_user sturts_apache_user

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Michael Jouravlev
On 7/7/05, Laurie Harper [EMAIL PROTECTED] wrote: Personally I prefer to keep form beans and value objects seperate, for two key reasons: 1) form beans generally should consist of String data to facilitate round-tripping of invalid inputs. I like to constrain them to a clearly defined role

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Ted Husted
There's probably something to that, Leon. Of course, there's nothing new here, except maybe the metaphor. Using the layers pattern in enteprise applications is well known. I believe Bushman describes it in POSA. Here's another online treatment: * http://www.stevenblack.com/PTN-Layers.asp -Ted.

[OT] UML class diagrams

2005-07-11 Thread David Whipple
Anyone have any suggestions for an opensource/freeware tool for reverse engineering java code to class diagrams? Thanks, Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Michael Jouravlev
On 7/11/05, Michael Jouravlev [EMAIL PROTECTED] wrote: JSF still differentiates real object (whatever it might be, a real business object or a VO) from visual component data, which I don't like. From my point of view, it is much easier to have an object with an ID, to view/edit it, or to

Re: [OT] UML class diagrams

2005-07-11 Thread Nick Heudecker
ArgoUML will do it. On 7/11/05, David Whipple [EMAIL PROTECTED] wrote: Anyone have any suggestions for an opensource/freeware tool for reverse engineering java code to class diagrams? Thanks, Dave - To unsubscribe,

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Borislav Sabev
Nitish Kumar wrote: I think raghavendra is right. Rivka, your code is working because you are using primitive type int and not the wrapper type Integer. In case of primitive type in case of any exception, it gives you a default value. Thanks and Regards, Nitish Kumar So after small

Re: upload/download file to/from oracle blob field with struts

2005-07-11 Thread Frank W. Zammetti
I had to do this for an application. While the code is fairly lengthy, longer than I'd like to post here, if you come up against specific problems feel free to ping me. Although I didn't look at the article Martin referenced for you, it's a fairly generic problem, not something that you will

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rick Reumann
Borislav Sabev wrote the following on 7/11/2005 1:37 PM: In case of the Integer there is pre-load default value and EVEN if conversion fails during the population phase, it just use is the dafault value (and you think it's parsed correctly). In the previous example its a coincidence that

Changing Form Target in Action?

2005-07-11 Thread David Johnson
Hi all I have the following problem: I have a button on my form that uses javascript to change to form target before submitting because I'm exporting an RTF generated in my action to the new browser, as follows html:submit property=exportFlag onclick=set('export');setFormTarget('_export')

Re: Changing Form Target in Action?

2005-07-11 Thread Rick Reumann
David Johnson wrote the following on 7/11/2005 1:49 PM: The thing is I want to be able to use the validate() method in my Form object and return to the ORIGINAL browser if an error is encountered... Hmmm, not sure about this, this sounds tricky but I bet someone more knowledgeable knows the

Re: Changing Form Target in Action?

2005-07-11 Thread Michael Jouravlev
On 7/11/05, David Johnson [EMAIL PROTECTED] wrote: Hi all I have the following problem: I have a button on my form that uses javascript to change to form target before submitting because I'm exporting an RTF generated in my action to the new browser, as follows html:submit

Putting execute() in ActionForm

2005-07-11 Thread Schaub, Stephen
I'm interested in some feedback on the following: I prefer to develop web applications using a page-centric model. I like the simplicity of one JSP - one Java class for the view layer (not the model). Struts, with its separate Action and ActionForm classes, tends toward at least two Java

RE: tiles definition versus global forward issue

2005-07-11 Thread Faber, Szczepan
Got it. Forward must be replaced by an action: action forward=def.index path=/index / Instead of global forward: forward name=index path=def.index / -Original Message- From: Faber, Szczepan [mailto:[EMAIL PROTECTED] Sent: Monday, July 11, 2005 4:13 PM To: Struts Users Mailing List

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread netsql
of course... I use Collections (Maps and Lists) as VO/DTO. You can wrap them w/ DynaMaps, you can validate a map, you don't have to maintain deprecated gets/sets, it reduces duplication... your dao can return a map/collection/list... I think it vastly simplifies to use Maps in places

Re: Changing Form Target in Action?

2005-07-11 Thread Frank W. Zammetti
Hi David, If I'm understanding your goal correctly, then you won't be able to do this without some sort of scripting because the form target is a purely client-side attribute, you won't be able to change it from the server-side, which is really what you'd want to do. If scripting is OK with

Re: Changing Form Target in Action?

2005-07-11 Thread David Johnson
Hmm. I suppose it would be easier to just do the validation in JavaScript... but I **really** dont want to. It just seems inconsistent. So there's no way to change what browser the validate() returns to once I've submitted the form and I'm in the validate() method? Some attribute on the

Re: Changing Form Target in Action?

2005-07-11 Thread David Johnson
Joe Oh this one sounds good. I'm not sure how I'd actually DO that though.. can you provide more info? All my pages are tiles definitions right now. How would I cause the response page to use the new target (conditionally)? On 7/11/05, Joe Germuska [EMAIL PROTECTED] wrote: When I've had

I can't initialize de Serlvet Action :(

2005-07-11 Thread Mariano Petrakovsky
Throw an exception ServletAction can't load... In my .jsp say me same (I'm using eclipe)... what should be the troubble? -- Mariano G. Petrakovsky Programmer · Software Factory AXG Tecnonexo - www.tecnonexo.com Development facilities:Av. Maipú 1252 8º (C1006ACT) · Buenos Aires · Argentina.

PASSWORD DIGESTION...RealmBase import problem...help please!

2005-07-11 Thread O. Oke
Help please! BACKGROUND == I want to store the digested version of user's password in the database. Therefore, I imported org.apache.catalina.realm.RealmBase so that I can use the static DIGEST method in the class for the digestion of the password i.e.Digest(myBean.getUser_pass()). I am

Re: I can't initialize de Serlvet Action :(

2005-07-11 Thread Zarar Siddiqi
The trouble is that you're not saying much. - Original Message - From: Mariano Petrakovsky [EMAIL PROTECTED] To: Lista de correo de Struts user@struts.apache.org Sent: Monday, July 11, 2005 2:26 PM Subject: I can't initialize de Serlvet Action :( Throw an exception ServletAction

Re: Changing Form Target in Action?

2005-07-11 Thread Rick Reumann
David Johnson wrote the following on 7/11/2005 2:23 PM: Joe Oh this one sounds good. I'm not sure how I'd actually DO that though.. can you provide more info? All my pages are tiles definitions right now. How would I cause the response page to use the new target (conditionally)? what about

Re: Changing Form Target in Action?

2005-07-11 Thread Michael Jouravlev
On 7/11/05, Joe Germuska [EMAIL PROTECTED] wrote: When I've had to do something like this in the past, I didn't actually change the target, but rather caused the response page to use the new target as part of its page loading. That is, the response page would have an onload handler which

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rick Reumann
netsql wrote the following on 7/11/2005 2:15 PM: I think it vastly simplifies to use Maps in places where I used to use beans. (I even got rid of baseBeans domain how much I loved maps) Vic I think you sleep with the Map API under your pillow at night or use it as a Teddy Bear when you

Re: Vignette V6 Struts-based web application

2005-07-11 Thread Rick Reumann
Kareem Hassan wrote the following on 7/7/2005 5:59 AM: I am new to Vignette CMS and was wandering that if someone could help me out how a Struts-based web application can fit into Vignette CM model ? I'm working on a Strut-based project and am told that I have to let Vignette JSP controller to

Re: Putting execute() in ActionForm

2005-07-11 Thread Rick Reumann
Schaub, Stephen wrote the following on 7/11/2005 2:07 PM: With this approach, most JSP pages could have a single Java class -- a SimpleActionForm subclass that handles both validation and processing for the page: Michael, is this guy a plant from your StrutsDialog camp?:) -- Rick

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Larry Meadors
Hmm, of course, who needs things like refactoring, and compile time name and type checking? That's why you have users, eh? They'll find the bugs eventually. ;-) Larry On 7/11/05, netsql [EMAIL PROTECTED] wrote: of course... I use Collections (Maps and Lists) as VO/DTO. You can wrap them w/

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread netsql
Rick Reumann wrote: How does a developer working on your code know how to even get the properties out of your Map? I guess he has to look at some API contract saying put date of birth in the Map as dob not dateOfBirth. As in iBatis, name of the map property is in my case the field name in

Redirecting to input when validation fails

2005-07-11 Thread Abdullah Jibaly
Hi all, I have two action: Display.do and Process.do. Display.do forwards to a jsp page. Upon submit, Process.do is invoked. The action mapping for Process.do specifies Display.do as the input, however, when form validation for Process.do fails (validate is set to true), the url still shows

Re: Putting execute() in ActionForm

2005-07-11 Thread Rick Reumann
Schaub, Stephen wrote the following on 7/11/2005 2:07 PM: public class SimpleAction extends Action { public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { SimpleActionForm bean =

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread netsql
Larry Meadors wrote: Hmm, of course, who needs things like refactoring, and compile time name and type checking? That's why you have users, eh? They'll find the bugs eventually. ;-) Larry Get/Set, Get/Set Half the time I have no idea what the db date will come back as. Look, I think

PASSWORD DIGESTION...RealmBase import problem...help please!

2005-07-11 Thread O. Oke
Help please! BACKGROUND == I want to store the digested version of user's password in the database. Therefore, I imported org.apache.catalina.realm.RealmBase so that I can use the static DIGEST method in the class for the digestion of the password i.e.Digest(myBean.getUser_pass()). I am

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Frank W. Zammetti
It's ironic to me that I had this same discussion with someone at work just last week :) I *was* in the Maps are better camp until a few months back when I changed my mind, and it comes down to one thing: Self-documenting code is better. A bean is self-documenting in that you can

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rick Reumann
netsql wrote the following on 7/11/2005 3:25 PM: Rick Reumann wrote: How does a developer working on your code know how to even get the properties out of your Map? I guess he has to look at some API contract saying put date of birth in the Map as dob not dateOfBirth. As in iBatis, name of

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rick Reumann
Frank W. Zammetti wrote the following on 7/11/2005 3:48 PM: A bean is self-documenting in that you can immediately tell what its attributes are and what types they are. I'm not even talking about generating javadoc from the source either, but that's certainly a very nice by-product. amen:)

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Martin Gainty
-1 for maps after how strongly typed is an object??? +1 for Value Objects If you follow the axiom from Floyd Marinescu Design custom value objects that wrap arbitrary sets of data as needed by the client, completely decoupled from the layout of the domain model on the serverDesign custom value

RE: Putting execute() in ActionForm

2005-07-11 Thread Schaub, Stephen
Rick Reumann wrote: With this approach, most JSP pages could have a single Java class -- a SimpleActionForm subclass that handles both validation and processing for the page: Well they certainly wouldn't have a 'single' java class, you would have a LOT of them. Sorry -- I meant a

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Frank W. Zammetti
Rick Reumann wrote: But also remember it's not just about how nice it is to find out the types and names of the properties. Using Maps can introduce a lot of hidden bugs that are difficult to track down (mentioned just a few in last e-mail) Ditto :) (That's my Patrick Swayze moment for the

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rick Reumann
netsql wrote the following on 7/11/2005 3:36 PM: Most of the sucessfull p-langs are dynamic. In flash, array and map are same class even. I envy their sucess. For example, the home page of Spring is done in Plone. Vic, I love you man, but coming back with what Flash or some other

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Michael Jouravlev
On 7/11/05, Frank W. Zammetti [EMAIL PROTECTED] wrote: A bean is self-documenting in that you can immediately tell what its attributes are and what types they are. I'm not even talking about generating javadoc from the source either, but that's certainly a very nice by-product. If I could

[FRIDAY] Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread Rick Reumann
Frank W. Zammetti wrote the following on 7/11/2005 4:00 PM: Ditto :) (That's my Patrick Swayze moment for the day) awhhh shucks, I thought you were a Rush Ditto-head for a moment:) See I labeled this thread [FRIDAY] - I didn't want the sruts-list users police showing up (just messin

Displaying data from a form bean

2005-07-11 Thread Schaub, Stephen
Newbie question: Struts lets me bind ActionForm properties to HTML form components like this: html:form action=confirm.do Enter customer name: html:text property=customer / ... /html:form I don't have to name the form bean, because Struts will look it up in the struts-config file for me.

Re: Putting execute() in ActionForm

2005-07-11 Thread Zarar Siddiqi
I think the ideal that you're searching for is one class per view. Take a look at JSF. - Original Message - From: Schaub, Stephen [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Monday, July 11, 2005 3:56 PM Subject: RE: Putting execute() in ActionForm

Re: Vignette V6 Struts-based web application

2005-07-11 Thread Martin Gainty
For that specific capability I would contact Vignette directly at [EMAIL PROTECTED] Good Luck, - Original Message - From: Rick Reumann [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Monday, July 11, 2005 3:14 PM Subject: Re: Vignette V6 Struts-based web

RE: Putting execute() in ActionForm

2005-07-11 Thread Schaub, Stephen
Zarar Siddiqi wrote: I think the ideal that you're searching for is one class per view. Take a look at JSF. That's correct. And I'm familiar with JSF -- but it's way too complicated for my needs. Plus Struts is dictated for this project... Stephen

Re: Redirecting to input when validation fails

2005-07-11 Thread Michael Jouravlev
On 7/11/05, Abdullah Jibaly [EMAIL PROTECTED] wrote: Hi all, I have two action: Display.do and Process.do. Display.do forwards to a jsp page. Upon submit, Process.do is invoked. The action mapping for Process.do specifies Display.do as the input, however, when form validation for

Re: I can't initialize de Serlvet Action :(

2005-07-11 Thread Martin Gainty
Mariano- Can you show us the StackTrace from display or your logs??? Buena Suerte, Martin- - Original Message - From: Zarar Siddiqi [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Monday, July 11, 2005 2:32 PM Subject: Re: I can't initialize de Serlvet

Re: Putting execute() in ActionForm

2005-07-11 Thread Michael Jouravlev
On 7/11/05, Rick Reumann [EMAIL PROTECTED] wrote: Schaub, Stephen wrote the following on 7/11/2005 2:07 PM: With this approach, most JSP pages could have a single Java class -- a SimpleActionForm subclass that handles both validation and processing for the page: Michael, is this guy a

Re: Putting execute() in ActionForm

2005-07-11 Thread Rick Reumann
Schaub, Stephen wrote the following on 7/11/2005 3:56 PM: Yes -- it is supposed to be abstract -- each ActionForm subclass must define an execute() method to perform the processing for that form. (Right but in your example you were showing LoginAction as the implementing class and you still

Re: Using struts forms as Value Objects: your opinion?

2005-07-11 Thread netsql
Rick Reumann wrote: They have to look at a database model in order to figure out how to get back a dateOfBirth field? Yup. Each develolper has a 24 poster of the data model. DBA is in charge, Model Driven. Just like client server days. Now they want to iterate over this list and display

Re: Redirecting to input when validation fails

2005-07-11 Thread Rick Reumann
Michael Jouravlev wrote the following on 7/11/2005 4:11 PM: On 7/11/05, Abdullah Jibaly [EMAIL PROTECTED] wrote: Hi all, I have two action: Display.do and Process.do. Display.do forwards to a jsp page. Upon submit, Process.do is invoked. The action mapping for Process.do specifies

  1   2   >