Re: Design problem

2005-05-21 Thread Dakota Jack
The tag populates your ActionMapping. The ActionMapping class as getParameter() and setParameter(String parameter) methods. If you set the parameter in the tag to "show", then the value of the private String parameter; field in the Action Mapping will be "show" so that in the action when you us

Re: DynaActionForm and the 'pull' model

2005-05-21 Thread Dakota Jack
You are just coding on the JSP page, which for reasons that have been discussed to death is a bad idea. If you like it, have at it. But, generally speaking this is a very bad idea. On 5/19/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > Adam Hardy wrote: > > Laurie, > > > > my chosen option woul

Re: DynaActionForm and the 'pull' model

2005-05-21 Thread Dakota Jack
A few thoughts: (1) The push/pull dichotomy really does not apply to what you are talking about. That relationship is between the client and the server and has more to do with the nature of the protocol, viz. HTTP, being employed in a browser context. (2) Likewise, some of the other things you s

RE: [OT] Help with REgular Expressions in Validate()

2005-05-21 Thread meyawn
or if you want the negative of that "^[^a-zA-Z]$" -Original Message- From: meyawn [mailto:[EMAIL PROTECTED] Sent: Saturday, May 21, 2005 11:53 PM To: Struts Users Mailing List Subject: RE: [OT] Help with REgular Expressions in Validate() wait a min... \w = word character: [a-zA-Z_0-9] \

RE: [OT] Help with REgular Expressions in Validate()

2005-05-21 Thread meyawn
wait a min... \w = word character: [a-zA-Z_0-9] \W (capital w) = non-word character: [^\w] so in case you wanna ban _ and digits you have to use "^[a-zA-Z]$" -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Laurie Harper Sent: Saturday, May 21, 2005 11:47 PM To: user@stru

Re: [OT] Help with REgular Expressions in Validate()

2005-05-21 Thread Laurie Harper
Or better yet, "^\\W+$", if whitespace is the only thing you want to exclude; your original expression says 'match one more non-whitespace characters', so with the input 'My Name' the expression matches 'My'. What you want to say is that the entire input must match \\W+, hence the ^/$. L. me

Re: DynaActionForm and the 'pull' model

2005-05-21 Thread Laurie Harper
Adam Hardy wrote: I'm not really keen to 'pollute' the view objects with String-type derived properties just for the HTML presentation; the view objects are how any client (web app, web service, Swing GUI, etc) would interact with the application. This also implies having String-to-model conve

RE: file upload struts - pdf corrupted

2005-05-21 Thread meyawn
yup.readLine() - if a newline char was not found at the end of the chunk read, it would end up doing an extra read and not do anything with the read character. this combined with the fact that createLocalFile was adding a newline aFTER the readLine() meant that the character was being replaced with

Re: file upload struts - pdf corrupted

2005-05-21 Thread Laurie Harper
Ugh, I found the same bug in the multipart parse we were using in my last job. The problem was that readLine() removed the end-of-line characters and they were added back somewhere else, if I recall correctly. If it got a full 4092 characters in one read, there was no way to know if it had read

Re: DynaActionForm and the 'pull' model

2005-05-21 Thread Laurie Harper
Adam Hardy wrote: On 19/05/05 21:29 Laurie Harper wrote: This is what I decided to try first. I threw together a prototype last night, and it seams to work well. Basically, the idea is: - extend the view API to include 'View.toMap(Map props)' and 'void View.fromMap(Map props)' on each view c

Re: DynaActionForm and the 'pull' model

2005-05-21 Thread Laurie Harper
Adam Hardy wrote: I'm not really keen to 'pollute' the view objects with String-type derived properties just for the HTML presentation; the view objects are how any client (web app, web service, Swing GUI, etc) would interact with the application. This also implies having String-to-model conve

Re: Design problem

2005-05-21 Thread Erik Weber
The "parameter" attribute can have whatever value you want and be used however you want. I use it as a poor man's dispatch action. For example, you have an actor called a "customer". The customer can log on and perform some actions with regard to his details. Let's say one action is to view, a

MyEclipse with Struts 1.2

2005-05-21 Thread Harry Hartley
Based on many of the comments I have found here, I decided to download MyEclipse. I see in the documents online and in the tool that there is support for struts 1.0 and 1.1. I would like to know if there is support for Struts 1.2 or easy workarounds to support Struts 1.2 before my forehead

RE: file upload struts - pdf corrupted

2005-05-21 Thread meyawn
i found out what the problem was..the problem that happens is that if a file has a line more than 4096 then you can see a character missing and instead of it you will find a newline char..happens with every file, not only PDFmaybe this problem is not in later version of struts but sure is in 1.

Re: file upload struts - pdf corrupted

2005-05-21 Thread Adam Hardy
On 20/05/05 10:33 Nandan wrote: Hello, I am using struts 1.0.2 to upload files. However sometimes a PDF file gets corrupted after a file upload. I see that random characters are replaced a hex 0A. Is this is a known bug? Please let me know GP Try checking bugzilla for commons-fileupload, or a

Re: DynaActionForm and the 'pull' model

2005-05-21 Thread Adam Hardy
On 19/05/05 21:29 Laurie Harper wrote: This is what I decided to try first. I threw together a prototype last night, and it seams to work well. Basically, the idea is: - extend the view API to include 'View.toMap(Map props)' and 'void View.fromMap(Map props)' on each view class - you can the

Re: DynaActionForm and the 'pull' model

2005-05-21 Thread Adam Hardy
On 19/05/05 21:29 Laurie Harper wrote: my chosen option would be to use your view objects as form objects, where you modify the view object by adding string-typed getters and setters for every property. I'm not really keen to 'pollute' the view objects with String-type derived properties ju

Re: How can we send parameter's value to javascript function ??

2005-05-21 Thread Saul Qunming Yuan
Try build the whole javascript function part in scriplet as follows: onclick="<%='javascript:whichAuctionType(' + rId + ');'%>"> in your Hope that helps. Saul - Original Message - From: "minhnguyet" <[EMAIL PROTECTED]> To: Sent: Friday, May 20, 2005 10:47 PM Subject: How can w

Using validation from a locale different from that of user

2005-05-21 Thread Muhammad Momin Rashid
Hello All, Recently I faced a problem in which I needed to validate data according to rules defined in a different locale (other than the current users). I eventually solved the problem by overwriting the validate method (of relevent From Beans) and changing the locale before calling super.v

RE: [OT] Help with REgular Expressions in Validate()

2005-05-21 Thread meyawn
try this as your pattern "^[a-z]+$" this will match all lower case...you can use a modifier for ignoring case..i think its "i" but am too lazy to look it up..figure it out yourself :) -Original Message- From: Brady Hegberg [mailto:[EMAIL PROTECTED] Sent: Saturday, May 21, 2005 2:20 AM To:

Re: DownLoad Action - exceptions

2005-05-21 Thread Frank W. Zammetti
Well, I'm not sure there is any one correct answer. I personally would view this no differently than I view any other exception thrown in a Struts app, which means I would use a GlobalExceptionHandler. I'm not sure what is considered best practice, but my approach is that I only try...catch b

Re: Design problem

2005-05-21 Thread K Rajesh
i have done only one struts application. but the below action tag, i can't understand. could you anybody give me some code to let me know about the parameter="show" attribute Rj On 3/9/05, Nicolas De Loof <[EMAIL PROTECTED]> wrote: > > Each mapping have to define a parameter that sets th