Re: Christmas Riddle

2009-01-15 Thread Dirk Forchel
. Got some other problems, but don't > know if it's related. Have you looked into redirecting and using the > MessageStoreInterceptor [1]? > > Nils-H > > [1] - http://struts.apache.org/2.0.14/docs/message-store-interceptor.html > > On Fri, Dec 19, 2008 at 9:04 PM,

Re: [S2] Result Type Dispatch problem with relative Action calls

2009-01-15 Thread Dirk Forchel
rrect that this is a common pattern. When I have > implemented a QuickSearch in the global nav, I use option #1 and display > any errors or results on a results page. I think what makes your pattern > unique is that you want to display the error in the original page. > > p.s

Re: [S2] Result Type Dispatch problem with relative Action calls

2009-01-13 Thread Dirk Forchel
ed entirely - instead the request is forwarded to the "input" result defined in the struts mapping of that action class. See also http://www.nabble.com/Struts-2%3A-Action-chaining-behaving-differently-when-validations-fire-td17065631.html#a17070480. Has anybody a solution for that behavi

Re: Conditional Annotation based Validation

2009-01-09 Thread Dirk Forchel
Thank you for your good explanation. Nevertheless I'll prefer to do it the Java way 'cos the validation is more complicated than just do some tests for required string properties. Dirk Forchel Greg Lindholm wrote: > > I see what you are asking for, but sorry I'm sure it

[S2] Result Type Dispatch problem with relative Action calls

2009-01-09 Thread Dirk Forchel
I could not resolve my problem yet. How can I use the "dispatch" result type to forward to actions (or maybe tiles definitions) rather than to JSPs? In my application are some situations where I have to forward the error messages or the field validation errors to to a different action. I can not u

Re: Conditional Annotation based Validation

2009-01-08 Thread Dirk Forchel
uot;required", key = > ERROR_PASSWORD_REQUIRED) > public void setPassword(String password) > { > _password = password; > } > > If the expression is false then the validation fails, so with reversed > logic this says: if doing a create then password is

Re: Conditional Annotation based Validation

2009-01-07 Thread Dirk Forchel
ust think it's easier to > maintain and much more clear. > > I'll sometimes use a combination of both Java-based and either XML or > annotations if it makes sense to. > > On a side note, IIRC the "trim" attribute/parameter only applies the > trim dur

Conditional Annotation based Validation

2009-01-07 Thread Dirk Forchel
I have two radio buttons for a form property named "privatePerson" with two possible values ('true' and 'false') which toogles the view of my input form with three different input fields (number1, number2, name). If the user choose "private" the number1, number2 and name input fields are shown, if

Re: Christmas Riddle

2008-12-21 Thread Dirk Forchel
.0.14/docs/message-store-interceptor.html > > On Fri, Dec 19, 2008 at 9:04 PM, Dirk Forchel > wrote: >> >> This result type invokes an entire other action, complete with it's own >> interceptor stack and result. As you can read here >> (http://struts.apache.or

Re: Christmas Riddle

2008-12-19 Thread Dirk Forchel
e: > > In that case, I'm out of ideas. If referrer always is an action, have > you tried using the chain result type instead? Probably needs a bit > more parsing of the action and namespace (or look it up from the > action invocation) though. > > Nils-H > > On Fri,

Re: Christmas Riddle

2008-12-19 Thread Dirk Forchel
-Helge Garli wrote: > > I think the error is in your web.xml. Try adding > > REQUEST > FORWARD > > in the filter mapping configuration for the struts 2 filter. > > Nils-H > > On Fri, Dec 19, 2008 at 10:38 AM, Dirk Forchel > wrote: >> >> Here i

Christmas Riddle

2008-12-19 Thread Dirk Forchel
Here is my riddle: Why does a dispatch forward to an absolute URL-path e.g. "http://localhost:9001/welcome.action"; not work. Using a relative URL like "/welcome.action" doesn't work either. Only something dispatch forwards like "/jsp/pages/welcome.jsp" or similiar (a relative URL with a JSP resou

Re: [S2] ServletDispatcherResult (dispatcher) and forwarding to Actions

2008-12-16 Thread Dirk Forchel
okay, I could strip off the context path from my "referer", but using a relative URL like "/welcome.action" or "/demostore/welcome.action" doesn't work either. Only something like "/jsp/pages/welcome.jsp" or similiar (a relative URL with a JSP resource) works for me. But I wanna use Tiles, so this

Re: [S2] ServletDispatcherResult (dispatcher) and forwarding to Actions

2008-12-15 Thread Dirk Forchel
on.dave wrote: > > You may be able to use the existing dynamic result configuration to > implement this; see these two links: > > http://cwiki.apache.org/WW/result-configuration.html > http://cwiki.apache.org/WW/parameters-in-configuration-results.html > > Dave > > --

Re: [S2] ServletDispatcherResult (dispatcher) and forwarding to Actions

2008-12-15 Thread Dirk Forchel
//cwiki.apache.org/WW/parameters-in-configuration-results.html > > Dave > > --- On Sun, 12/14/08, Dirk Forchel wrote: > 7:59 AM >> Has somebody any idea regarding the problem mentioned below. >> Every hint is appreciated. >> >> >> Dirk Forchel wrote: &

Re: [S2] ServletDispatcherResult (dispatcher) and forwarding to Actions

2008-12-14 Thread Dirk Forchel
Has somebody any idea regarding the problem mentioned below. Every hint is appreciated. Dirk Forchel wrote: > > I need your help. I wanna use the DispatcherResult (dispatcher) not as a > forward to a JSP (jsp/pages/test.jsp), but rather to forwarding to another > action

Re: How to use s:if

2008-12-11 Thread Dirk Forchel
First of all I recommend reading a tutorial about Struts2 and OGNL. but to answer your questions, you have to add a form property to your POJO action class (don't miss the getter and setter methods) first: public class ShowAction extends ActionSupport { public boolean all = false; public void s

Re: cannot be greater than null characters

2008-12-10 Thread Dirk Forchel
I reckon a misspelling ... rename the third 'arg' parameter to arg2 rather than arg1. that should work. m.harig wrote: > > hi all > > am newbee to struts . am doing a login application on struts . am > using Validator framework for page validation > my configuration is >

[S2] ServletDispatcherResult (dispatcher) and forwarding to Actions

2008-12-10 Thread Dirk Forchel
I need your help. I wanna use the DispatcherResult (dispatcher) not as a forward to a JSP (jsp/pages/test.jsp), but rather to forwarding to another action request e.g. /test.action?code=1. Apparently there is no need for doing that until you define something like the following in your struts.xml

Re: S2: Forward or Redirect to same page

2008-12-10 Thread Dirk Forchel
Sébastien Domergue wrote: > > we had nearly the same problem in a project and we had to build our own > stack (which contained both action and jsp names) and when we wanted to > go back we used the stack. In the meantime I wrote my own history stack with the request URIs pushed to the stack.

S2: Forward or Redirect to same page

2008-12-10 Thread Dirk Forchel
I have a problem forwarding to the same page after a request is submitted by a form. This could be straightforward until this form is only on the same page. In this case I would use a "dispatcher" to forward to the appropriate JSP. But how can I forward to the "same page" if I use the same form on

Redirect after Post and persist data

2008-12-09 Thread Dirk Forchel
Redirect after post is a common pattern to hand control overt to another resource. The most common reason for using a redirect is the need to change the URL shown in the browser and to prevent the user to re-submit the previous request by clicking the reload-button. example config in struts.xml:

Re: redirect

2008-12-08 Thread Dirk Forchel
Aditya Lukman wrote: > > Hi all,, > i want to redirect from http://localhost:8080/cimeng/adhit *to* > http://localhost:8080/cimeng/profile.action?nickname=aray > > so,, how to solve my problem > > please, give me a descriptions for my problem > thank's for your help > Seems to be quite simpl

Re: Struts2 2.0.11 problem with url and parameters

2008-11-20 Thread Dirk Forchel
Hallo Tomi, this is obviously a getter and not a setter method. try public void setIndice(int indice) { this.indice = indice } Dirk Tomi21 wrote: This is my complete URL: http://localhost:/ConfiguracionDTX2Web/EliminarSuscripcion.action?indice=4 And this this is my setter: public int

Re: Validation causing me problems

2008-11-13 Thread Dirk Forchel
lathjer wrote: > > So as I am trying to figure this out, and it has brought up some > questions. > > > lathjer wrote: >> >> >> > method="list"> >> user.list >> >> > > That mapping causes the error. When the UserAction.list() method is called > it is looking for