Re: Struts validator Regular Expressions

2004-03-24 Thread Frank Schaare
Hi, this should be very close to \d{1,3}[.]\d{1,3}[.]\d{1,3}[.]\d{1,3} I need to validate an IP address and I don't know how is the syntax in the validator config file. take your time to study this: http://java.sun.com/docs/books/tutorial/extra/regex/ It's worth the trouble, regex rox !

Re: Submit Once, Validate Twice -- but how ?

2004-03-24 Thread Frank Schaare
Hi, thank you, that helps. Now i still need to know how to access the input page (set in action mapping with the input="sample.jsp" tag)... I don't have sample code but are you looking for something like this: // in Action execute... ActionErrors errors = new ActionErrors(); // add errors... .

Submit Once, Validate Twice -- but how ?

2004-03-24 Thread Frank Schaare
Hi, just read this article on husted.com and it seems to be good advice. When the user submits a page, passes validation without errors, is there a chance to validate business logic in the action ? Therefor i need to - make my validation, - get an errors object, - store the error, - put the err

HowTo logical date validation

2004-03-18 Thread Frank Schaare
Hi all, i´m looking for some kind of 'logical date validation' which means that dates like '2004-02-31' are filtered out and sent back to input page. Has anyone ever done this before (i´m sure you have ;-)) ? Are there any sites dealing with this problem ? thanks for your reply... -

How to validate selects

2004-03-17 Thread Frank Schaare
Hi all, i´m doing some selects like this: Now, i have to validate, that the user has made his choice, which means that the 'foo' property is notNull. Does anyone have an idea how to realise this in struts ? Thanks - To

rePost: How to set the selected value in an select rendered by optionsCollection

2004-03-11 Thread Frank Schaare
Hi all, i´m reposting my problem trying to be a little bit more specific. This problem is very important for me, though i made another 'book like' example to show where i am. There are three beans playing in my theatre: 1. the CommonValuesBean which stores frequently asked data for my JSP HTML

Re: How to set the selected value in an select rendered by optionsCollection

2004-03-11 Thread Frank Schaare
Hi Hubert, This would only be true if the action that was called specified that form in its mapping. If this is a preprocessing action (that's being called to provide an HTML form with data to show), and there's no "name" attribute to tie a form to it, Struts will not create/populate a form (beca

Re: How to set the selected value in an select rendered by optionsCollection

2004-03-10 Thread Frank Schaare
Hi Wendy, thx for your reply, but there are some questions left: this is where i am: there is my business object 'sb' and the upcoming DynaActionForm. sb extends ActionForm, there should be sb.execute(). Nope. It goes request->form creation->action. You are being passed the form in the signatur

How to set the selected value in an select rendered by optionsCollection

2004-03-10 Thread Frank Schaare
I´ve got this select rendered with data from my applicationwide formularBean: This renders a select like this: Mrs. Mr. Dr. . . The formular fields in my JSP should be prefilled with data from my person bean ("sb") which has a Title property,

optionsCollection with another default value

2003-11-24 Thread Frank Schaare
Hallo, i´ve made a select from an optionsCollection Tag. The values are read from a hashmap like value1 = one value2 = two value3 = three Now i´d like to set a default value for this select, which is NOT PART of my HashMap, f.e "please select..." The rendered select should look like this: plea

Re: Accessing application scope in Action.execute()

2003-11-10 Thread Frank Schaare
Hi David, getServlet() followed by two more commands: getServlet().getServletContext().getAttribute(String); OR getServlet().getServletContext().setAttribute(String, obj); Regards, this was a great help for me thank you. Hope my name is shown correctly now... --