uniform exception handling

2008-05-14 Thread Jakub Milkiewicz
Hi i would like to know what is the best practice to handle exceptions in Struts based applications. I have defined ExceptionMappingInterceptor aka exception interceptor and it works but it can not handle all kind of exceptions. I would like to have various exceptions that can occur in various pa

Re: struts2 access session Id

2008-05-14 Thread Jakub Milkiewicz
I've found the same code on Struts2 web page. Thanks anyway 2008/5/14 krishna chary <[EMAIL PROTECTED]>: > use this code you will get session id > code is > > ServletActionContext.*getRequest*().getSession().getId(); >

Re: struts2 access session Id

2008-05-13 Thread Jakub Milkiewicz
I had the same idea when i mentioned Servlet Config Interceptor below but I just thought there is an easier way. Anyway thanks for reply and it looks like i need to do just like that. 2008/5/13 Laurie Harper <[EMAIL PROTECTED]>: > Jakub Milkiewicz wrote: > > > Hi > &g

struts2 access session Id

2008-05-13 Thread Jakub Milkiewicz
Hi I have a problem with Struts 2. I am looking for a way to access httpsession id? I have tried using ActionContext.getContext().getSession().get("id") but it returns null. i 've read there is a possibility to use Servlet Config Interceptor

Re: StrutsTypeConverter 2 level nested expression

2008-04-30 Thread Jakub Milkiewicz
datePeriodFilterParameters.cos.dateFrom property What do you think of it? 2008/4/30 Jakub Milkiewicz <[EMAIL PROTECTED]>: > Hi > > I ve checked all required getters and setters million times but still > nothing. > If i just remove following line from Action-

Re: StrutsTypeConverter 2 level nested expression

2008-04-29 Thread Jakub Milkiewicz
method of my action i can see datePeriodFilterParameters.cos.dateFrom to string value i typed in in form. So if binding works with given expression: datePeriodFilterParameters.cos.dateFrom why converion mechanism do not work with it? 2008/4/30 Jeromy Evans <[EMAIL PROTECTED]>: > Jakub M

StrutsTypeConverter 2 level nested expression

2008-04-29 Thread Jakub Milkiewicz
Hi I am quite new to Struts 2 and have problems with StrutsTypeConverter I have created my custom converter but i can see it is not fired when my Action-conversion.properites contains more than 2 level property expression. Example: datePeriodFilterParameters.dateTo=MyConverter (works as exptected

extending antlr syntax in validwhen

2006-10-30 Thread Jakub Milkiewicz
Hi I am thinking of extending (hacking) antlr classes that are distributed with commons validator. I am wondering if this idea should point to struts instead of commons validator. In validwhen validator you are able to write quite complicated conditions, but the real problem for me is using validw

Re: Creating a DynaBean from an ActionForm on the fly

2006-08-25 Thread Jakub Milkiewicz
Hi Look at common beanutils documentation. There is something called WrapDynaBean . 2006/8/23, Scott Van Wart <[EMAIL PROTECTED]>: Is it possible to get a DynaBean object

Re: Struts forward and redirect

2006-07-20 Thread Jakub Milkiewicz
Hi I think storing these kind of date in a session is not great idea... I really like Refirect after post patterny by Jouravlev where author promotes saving submitted data in temporary storage (for example session) and then use redirect to output action adding some kind of identifier to data preiv

Re: Struts forward and redirect

2006-07-20 Thread Jakub Milkiewicz
Hi If it is not still clear for you read: http://organicveggie.wordpress.com/2006/01/24/struts-redirect-wparameters/ 2006/7/20, Jakub Milkiewicz <[EMAIL PROTECTED]>: Hi It is quite easy thing... If you forward, request object is passed to "new resource" and if you redirect, ser

Re: Struts forward and redirect

2006-07-20 Thread Jakub Milkiewicz
Hi It is quite easy thing... If you forward, request object is passed to "new resource" and if you redirect, server sends answer to browser to make a new request to new resource.In a latter, your request object on which you set some attributes is gone - "new resource" sees new request. I hope that

Re: dynamic checkboxes and radio buttons in one group

2006-07-20 Thread Jakub Milkiewicz
ope this will help. Thanks and Regards, Thomas Joseph - Original Message - From: Jakub Milkiewicz To: Struts Users Mailing List Sent: Thursday, July 20, 2006 4:26 PM Subject: dynamic checkboxes and radio buttons in one group Hi I have a problem with dynamic form handling. O

dynamic checkboxes and radio buttons in one group

2006-07-20 Thread Jakub Milkiewicz
Hi I have a problem with dynamic form handling. On a page i want to present a list of questions. For each question you need to make an answer, but answer widgets can be represented as 2 radio buttons or single checkbox. Initially all answer widgets should be blank - checkboxes unchecked, radio but

Re: Struts Validator: form value1 < form value2

2006-06-22 Thread Jakub Milkiewicz
Yeah validwhen can do it. anyway these antlr expressions are not very intuitive. If You have a problem let me kow i will try to help 2006/6/22, The Jasper <[EMAIL PROTECTED]>: hi, the validwhen validator can do what you want. mvg, Jasper On 6/22/06, Truong Xuan Tinh <[EMAIL PROTECTED]> wrote:

Re: Validation 'depends' attribute order, and 'validwhen'

2006-06-04 Thread Jakub Milkiewicz
Hi. Exactly boy :). 2006/6/4, Scott Van Wart <[EMAIL PROTECTED]>: Jakub Milkiewicz wrote: > If you are thinking of creating custom validator remember that even if > your > custom validator fails it doesn't mean that your form is invalid! You > must > remember to add

Re: Validation 'depends' attribute order, and 'validwhen'

2006-06-03 Thread Jakub Milkiewicz
Hi As far as i remeber It works as a chain. Struts processes validators in depends attribute from left to right. If a validator fails (returns false) struts doesn't process the next one. If you are thinking of creating custom validator remember that even if your custom validator fails it doesn't m

Re: internalization validation.xml

2006-06-03 Thread Jakub Milkiewicz
but remember to modify it to make it use these new generated files - modify imports. 4. The last thing it to modify validation-rules.xml to instruct struts to use new validwhen validator i.e. to point it to our modified ValidWhen.java I hope it will help someone... 2006/5/28, Jakub Milkiewicz <[

Re: Struts, how to create wizard pages ??

2006-05-28 Thread Jakub Milkiewicz
MAybe try stuts dialog. I have never used it but looks really nice. 2006/5/26, Chaudhary, Harsh <[EMAIL PROTECTED]>: Its not really that hard or even a design issue. Just have one separate Action class and Action form for each page. Call the action when the user hits submit, next etc. In the a

internalization validation.xml

2006-05-28 Thread Jakub Milkiewicz
Hi I am using struts validator to validate my form. I have a problem with validwhen when i use non english characters in comparison section. I tried: test (*this* == 'dowód') or

Re: [java.util.regex ]using Regular Expressions

2006-05-10 Thread Jakub Milkiewicz
As far as i remember "d" means digit, but not digits ... try to add + or *. 2006/5/10, temp temp <[EMAIL PROTECTED]>: Note: forwarded message attached. -- Blab-away for as little as 1¢/min. Make PC-to-Phone Calls

Re: highligt errors

2006-05-08 Thread Jakub Milkiewicz
newbie to creating tags. Can you give me some advices how to start. 2006/5/8, Niall Pemberton <[EMAIL PROTECTED]>: On 5/4/06, Jakub Milkiewicz <[EMAIL PROTECTED]> wrote: > Hi > I would like to highlight - change style of, labels associated with an html > input eleme

Re: page validation in wizzard app

2006-05-08 Thread Jakub Milkiewicz
d get a little confusing). Not sure you'd want to change things at this point, but that's one way to approach the problem. Q > -Original Message- > From: Jakub Milkiewicz [mailto:[EMAIL PROTECTED] > Sent: Sunday, May 07, 2006 2:14 PM > To: Struts Users Mailing

Re: page validation in wizzard app

2006-05-08 Thread Jakub Milkiewicz
do it. 2006/5/8, Richard Yee <[EMAIL PROTECTED]>: Jakub, Even though you are using autovalidation, don't you still have a validate() method in your ActionForm that is getting called? Can you alter the page attribute appropriately there (ie. if (errors.size() > 0) page--; -Richa

Re: page validation in wizzard app

2006-05-07 Thread Jakub Milkiewicz
mainly have code that calls business delegates and that necessary > for determining where to forward to. > > -Richard > > > Jakub Milkiewicz wrote: >> Hi >> I have a wizzard application with 5 screens. All user inputs are >> collected >> in one bean, wh

Re: page validation in wizzard app

2006-05-07 Thread Jakub Milkiewicz
Action class in your struts_config.xml file just as easily as a JSP, e.g. and then just 'return ActionForward("validation_failed")' if validation failed on page1. HTH, -ed On 5/6/06, Jakub Milkiewicz <[EMAIL PROTECTED]> wrote: > Hi Ed > Thanks for an answer. The p

EventDispatchAction and wizard

2006-05-06 Thread Jakub Milkiewicz
Hi I am creating wizzard application that contains 5 screens. It looks like: Action -> jsp ->Action -> jsp ->Action ->jsp ... I also use autovalidation. All my actions are setup actions (as Michael Jouravlev suggests). So if i submit a form from jsp to some Action and validation fails struts forwa

Re: Change Input parameter at run time

2006-05-06 Thread Jakub Milkiewicz
Hi I am not sure if you can do it easily. Maybe some plubing will be needed. Anyway concern validation in Action and then forward or redirect wherever you want. 2006/5/4, Troy Bull <[EMAIL PROTECTED]>: Greetings I have an application i have inherited. There is a situation where 2 jsp's submi

Re: page validation in wizzard app

2006-05-06 Thread Jakub Milkiewicz
sure is to try it out and see how it goes! -ed On 5/6/06, Jakub Milkiewicz <[EMAIL PROTECTED]> wrote: > Hi > I have a wizzard application with 5 screens. All user inputs are collected > in one bean, which is named: viewBean and is stored in HTTP session. > So each action has t

Re: page validation in wizzard app

2006-05-06 Thread Jakub Milkiewicz
n.execute method should be fairly small and mainly have code that calls business delegates and that necessary for determining where to forward to. -Richard Jakub Milkiewicz wrote: > Hi > I have a wizzard application with 5 screens. All user inputs are > collected > in one bean, which is

page validation in wizzard app

2006-05-06 Thread Jakub Milkiewicz
Hi I have a wizzard application with 5 screens. All user inputs are collected in one bean, which is named: viewBean and is stored in HTTP session. So each action has the same formBean - viewBean. I use commons-validator and viewBean properties to validate are present in validation.xml with page at

Re: FW: StrutsTestCase & Hibernate

2006-05-06 Thread Jakub Milkiewicz
Hi If you are thinking of unit tests for action i do not think it is great idea. For me actions should be as dumb as possible and just delegate business processing to another layer. 2006/5/5, Stasica, Grzegorz <[EMAIL PROTECTED]>: hi, Basically I'm interested in testing struts actions (forw

Re: How to create a Waiting Page for long requests?

2006-05-04 Thread Jakub Milkiewicz
NP 2006/5/4, Ed Griebel <[EMAIL PROTECTED]>: Great link, thanks!! -ed On 5/3/06, Jakub Milkiewicz <[EMAIL PROTECTED]> wrote: > Hi > I think JMS is only valid , i.e. following specification solution. > Take a look at: > http://www.javaran

highligt errors

2006-05-04 Thread Jakub Milkiewicz
Hi I would like to highlight - change style of, labels associated with an html input elements, i.e html:text or html:select. These tags have errorStyle attribute so changing style for a given input is not a big deal, but in addition i would like to change style of label which is situated next to i

Re: Conditional validation

2006-05-04 Thread Jakub Milkiewicz
Hi Can you point it where i can find it Thanks 2006/5/4, James Mitchell <[EMAIL PROTECTED]>: The newest version of the Struts mailreader sample app shows a best practices approach to just what you describe. Take a look at that and see if you might be able to do the same. (Specifically, look at

Re: How to avoid lots of "if else" in Action class.

2006-05-04 Thread Jakub Milkiewicz
THe gold rule use interface to encapsulte behaviour 2006/5/4, Michael Jouravlev <[EMAIL PROTECTED]>: Dispatching action. Do not use old and crusty DispatchAction. See these links: http://wiki.apache.org/struts/EventActionDispatcher http://wiki.apache.org/struts/DataEntryForm Michael. On 5/4/

Re: How to create a Waiting Page for long requests?

2006-05-03 Thread Jakub Milkiewicz
Hi I think JMS is only valid , i.e. following specification solution. Take a look at: http://www.javaranch.com/newsletter/200403/AsynchronousProcessingFromServlets.html 2006/5/3, Dave Newton <[EMAIL PROTECTED]>: Ed Griebel wrote: > The tricky part is that you can't create a new thread in your a

Re: Re: complex validation problem.

2006-04-29 Thread Jakub Milkiewicz
ateMask() Harsh. -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: Friday, April 28, 2006 4:37 PM To: user@struts.apache.org Subject: Re: complex validation problem. Jakub Milkiewicz wrote: > Hi > I have a problem with conditional validation. Curre

Re: validatewhen --- what's wrong?

2006-04-27 Thread Jakub Milkiewicz
Right This anlr gramma is quite not intuitive ... 2006/4/27, Chaudhary, Harsh <[EMAIL PROTECTED]>: > > Try it like this. > (*this* == 'password') > > -Original Message- > From: Jakub Milkiewicz [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 27, 200

Re: validatewhen --- what's wrong?

2006-04-27 Thread Jakub Milkiewicz
Hi To tell you the truth i do not understand what you wanna do... Anyway your validwhen condition is always true! Note that you are comparing *this* - for property password, with property password. It means something like 1==1. 2006/4/26, Zheng Wen Zhe <[EMAIL PROTECTED]>: > > Hey all, > > I wa

validWhen condition parsing problem.

2006-04-25 Thread Jakub Milkiewicz
Hi I am using struts 1.2.8 and i have a problem with test condition with validwhen validator. Eveything works fine except when i try to compare sth with a string containing values not from iso8859-1 charset .i.e test ( *this*

complex validation problem.

2006-04-23 Thread Jakub Milkiewicz
Hi I have a problem with conditional validation. Currently i am working with struts 1.1 - because of its WSAD support but i am thinking of migrating to the newest one. My problem is that on my jsp page i have 2 radio buttons: I am using struts validator and in my validation.xml i want to have pas