struts website
was wondering whats the purpose of the links "struts applications", "struts sandbox" are? the pages they point to are virtually empty. anything coming in (for those pages) ? what's the scoop on this? is it to host sample applications that work on struts? riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: long struts-config.xml file
depends on what version of struts u're working on. (i have never worked with 200 or so actions). :) 1) i reduced the number of actions using wildcards in action mapping, and a couple of hidden parameters that i pass to actions. kind of genericised the actions. 2) use "extends" where possible, mostly Actions and Forms, _especially_ Forms. 3) using extensions of dynaforms for my base forms (reduce dumb form beans. whats the name for these info containers? i forgot). bloats struts-config but reduces code to write. 4) while this may/will not :) reduce the size of struts-config, i've found this to be invaluable with large struts-configs. with struts 1.3 (in development), u might want to check out the new "key="key" value="value" /> - ability to set arbitrary properties. assists in genericising (eg: do something/somethingextra/nothing/differentthing in the called action base on some keyed property value) ... solves a lot of my pains :) riyaz John Henry Xu wrote: Hi all, In a project I am working on, we have a very lengthy struts-config.xml file to handle complex actions jsps (200+) take. Does anyone have this situation (very complex struts-config.xml)? Please tell me about your experience. Also, anyone see a blog or forum written by struts technology? If you know, can you tell me the link? Thanks. Jack H. Xu Technology columnist and authorhttp://www.usanalyst.comhttp://www.getusjobs.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn Q
have been trying to configure my NetBeans 4.1 to use subversion (SVN) i've downloaded the svn module (beta) but can't seem to figure out how to configure it. the website (http://www.apache.org/dev/version-control.html) does not _seem_ to give how to annonymously check out data. if anybody is using this combination of software (NB41/SVN) please help riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: date validation
no i did not; but i cannot use it as i want to allow single digit months/days in user input. more generally; i wud have expected the DateValidator to return FALSE if the user input is form "1980" for pattern "-MM-dd" anybody wanna weigh in? :) riyaz [EMAIL PROTECTED] wrote: Sorry if you get this twice. Did you try DatePatternStrict? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
date validation
i've got a date validation set up with datePattern "-MM-dd", ie standard JDBC SQL format. but date validation seems to pass values of type "1980" (without month or day) and subsequently i get a SQL DATE conversion error. is this expected behavior for date validation? is there a way to enforce that year-month-day be enforced? riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OT Friday - Random sorting
i may be missing something here, but if random is what u want in a collection, then y don't u use Collections.shuffle() ? riyaz Mark Benussi wrote: Hello. I am trying to write a comparator that randomly sorts a collection. I have something like this: new Comparator() { /** * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) */ public int compare(Object object1, Object object2) { long time = new Date().getTime(); Random random1 = new Random(time); Integer x1 = new Integer(random1.nextInt()); random1.setSeed(++time); Integer x2 = new Integer(random1.nextInt()); return x1.compareTo(x2); } } But sadly to no avail. Has anyone done this before or have any suggestions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie Q - Rendering drop down menu
:) when i first read HTML, my first impression was SELECT.size was the same INPUT.size hehe. ie it renders a box/select which contains that many approximate characters IMHO, honestly, i think its a bad choice of attribute name. "rows" as in TEXTAREA.rows would have been more appropriate than "size". in fact, what's the way to set the width of a SELECT box in HTML, not using CSS ? riyaz Jeff Beal wrote: In other words, the size attribute that you are using *tells* the browser to show up to ten rows from the selection list at once. What did you think it was for, out of curiosity? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using multiple resource bundles
i'm using 1.2.x and 1.3-dev and it works fine. i do remember about an ARG bug in the earlier versions. i suggest u search this mailing list. there might be others who might remember this here. :( Duggirala, Satyavati wrote: Yes, I am doing that and "bean:message " works fine. I am having problem only with arg element in validation.xml Is arg element supported in struts1.1 or do we have to use arg0,arg1.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using multiple resource bundles
seems fine. you should declare your message resource in struts-config with the name "mybundle" and it should contain the key "myField.displayname" r u doing that? Duggirala, Satyavati wrote: I am working on a field whose value is an int in the range 0- My code looks in validation.xml looks like this- min0 max - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using multiple resource bundles
hmm. can post the file? Duggirala, Satyavati wrote: Still doesn't work. Is there a element type arg in validation.xml? Can I get any reference from where I could get some more information about using mutiple resource bundles in validator framework? Thanks Satya -Original Message- From: Riyaz Mansoor [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 31, 2005 3:26 PM To: Struts Users Mailing List Subject: Re: Using multiple resource bundles riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using multiple resource bundles
riyaz Duggirala, Satyavati wrote: Hi We use multiple resource bundles in our Application. By default Struts gets the error messages used in validation.xml from default resource bundle. (ex: prompt.username is obtained from ApplicationResources.properties) How can I make particular field validation error message to be obtained from another resource bundle. (I have prompt.username in a different bundle UsersResources.properties) thanks -Satya - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: [OT] cloudscape/derby
Leon Rosenberg wrote: Just out of sudden... Have you tried j2 or j1? whats j2 or j1 ? ^o riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] cloudscape/derby
David G. Friedman wrote: What is wrong with HSQLDB? its storing BINARY objects that are bigger than declared? eg: Photo BINARY(4096) seems to take even 50K GIFs. a way to fix this? now i really don't want to start a flame war or any war :) about which is better (or not) i checked out MySQL 5.0b. the JDBC driver does not support PreparedStatement.getParameterMetaData ResultSet.getMetaData (sorry if method names are incorrect - off the top of my head). and no replies have been made to a post i made regarding when it will be supported. the first one i can't do without, so cannot use MySQL riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] cloudscape/derby
hi guys anybody know whats the status of Derby? former IBM's Cloudscape? i need something more robust that hsqldb :) riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] MessageFormat and curly brackets
not strictly struts ... but lots of smart guys here :) String str = "how place literal curly brackets in String such that MessageFormat ignores them? thanx for helping riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
simple Validator question
i saw a doc which had wondering if multiple forms could be declared like this? sorry but am t tired to test right no :) riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator inheritance
i asked this same question and the answer i got here is: this was added to Validator but not public release has been made after this. u can download a source distro of validator and compile and use it. > the above should work as is - i am using it :) riyaz Yaroslav Novytskyy wrote: Hi! Does anyone know about the way to "inherit" (1) and "reuse" (2) validations for multiple forms in validation.xml Explanation: 1. I have a number of myForms: myForm1, myForm2, and so on they are of class MyForm (so they all have same fields) and I want them to validate the same. e.g. property="elementIndex" depends="integer"> 2. When I inherit MyExtForm from MyForm adding some fields and make form-beans myExtForms: myExtForm1, myExtForm2, and so on and would like them to "inherit" validation definitions from MyForm. //!!!validation for elementIndex field //already inherited!!! Yaroslav Novytskyy P.S. this would "compress" size of the validator.xml file (in my case 10-20 times!) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
form field formatting
hi guys. for all whose interested. all that is needed is 2 files; 1) formatter-rules.xml (of type validation-rules.xml). add file to ValidatorPlugin resource path 2) java class containing methods to execute of course, validating n formatting r very different things. but its small work and efficient. wonder y its not included ??? if any is interested, email back. will email files riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
struts 1.3 dev with validator 1.2 dev
Hi guys sort of a repost - more details using Validator 1.2 (nightly build) on struts 1.3 dev build keep getting this error during validation. and not just for "required" but all checks. error is printed on the tomcat log standard out. further the action to which the form is submitted is executed after this error is thrown. any ideas? SEVERE: org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages, javax.servlet.http.HttpServletRequest) org.apache.commons.validator.ValidatorException: org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages, javax.servlet.http.HttpServletRequest) at org.apache.commons.validator.ValidatorAction.loadValidationMethod(ValidatorAction. java:584) at org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorActi on.java:514) at org.apache.commons.validator.Field.validateForRule(Field.java:704) at org.apache.commons.validator.Field.validate(Field.java:783) at org.apache.commons.validator.Form.validate(Form.java:203) at org.apache.commons.validator.Validator.validate(Validator.java:302) at org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm.java:110) thanx riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
for input formatting
hi guys. i would like to standardize some fields on a submitted form. eg: FirstName field shud be first letter capital and the rest simple regardless of whatever Case the submitted text is. am NOT looking to validate against a mask but rather format it transparently what is the best way to do it? 1) is it possible to do this in Validator rules? Is the bean passed into validateXXX(bean, ... ) the actual object in the form or a copy? if it is actual object then i can just create a custom validateXXX() that just standardizes 2) its difficult to manipulate the as it has not built in mechanism to standardize field values. can go for a thingy (write RuleSet, custom ActionForm, custom factory ...) but it seems too much work thanx riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:multibox
hi reading from past postings this subject has been much talked about. but not finding a solution to my liking i post this question. i want a user a see a set of checkboxes some selected some not. the user is allowed to check uncheck anyone of them. upon form submission, i want the value of the checkbox which can be any value of type int to be submitted as an array to form. ie the value can be (1,2,3 ... 1000,1001,10...). also, is it possible to check a checkbox for any of these vales? my form : DynaActinForm has fields id:integer // not given here selected:integer[] all:integer[] ok: now am trouble in jsp ;( also, for form prepopulation, is it possible to set the selected,all array types with form.set("propname", index, ValueObject); does the form take care of the "increasing index" ?? thanx riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:multibox
hi reading from past postings this subject has been much talked about. but not finding a solution to my liking i post this question. i want a user a see a set of checkboxes some selected some not. the user is allowed to check uncheck anyone of them. upon form submission, i want the value of the checkbox which can be any value of type int to be submitted as an array to form. ie the value can be (1,2,3 ... 1000,1001,10...). also, is it possible to check a checkbox for any of these vales? my form : DynaActinForm has fields id:integer // not given here selected:integer[] all:integer[] ok: now am trouble in jsp ;( also, for form prepopulation, is it possible to set the selected,all array types with form.set("propname", index, ValueObject); does the form take care of the "increasing index" ?? thanx riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Html:messages vs html:errors
> I'm a Struts newbie. A lot of the books and documentation I have on Struts > is pre 1.2 and uses html:errors and ActionErrors. Given ActionErrors is > deprecated, I'd like to use ActionMessages for some new JSPs I'm writing. the usage is the same. actionerrors are dependent on certain keys such as "error.prefix" that came with the messageresources file. messageresources have no such dependencies. have a look at the struts-examples.war. u'll see all u'll need there :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]