Re: Redirects - Dynamic Parameters

2007-11-06 Thread Gary Affonso
I knew I had done this before, I just found the code. Your redirect needs to look something like... myAction.action${foo ? '?foo=' + foo : ''} Note that I'm pretty sure your OGNL lookups are not going to get url-escaped. The above assumes that "foo" is a property of the Action an

Re: Annotation Validation, per method?

2007-11-06 Thread Gary Affonso
Ted Husted wrote: Of course, if you use one-action-method per Action-class, then all the annotations work just fine. +1 on one-action-method per Action class. My personal opinion (after nearly 5 years of heavy WebWork/s2 use) is that this is the best-practice and that multiple action methods

Re: Struts2 Configutation alternative to sessions?

2007-11-06 Thread Gary Affonso
James Carr wrote: Hi All, I'm using struts 2 for a small web app that has an action attribute that needs to maintain state. Currently I'm using sessions but I would like to reconfigure my application to use something besides sessions, perhaps something like viewState in .NET that would be availbl

Re: S2: input by method for validations

2007-11-06 Thread Gary Affonso
Maybe this is obvious, but why not just break this into two different action classes? Then you get easy control of where you map the "INPUT" result code generated when the DefaultWorkflowInterceptor detects a validation error. - Gary Manuel Correa wrote: I found this:

Re: Struts2 Configutation alternative to sessions?

2007-11-06 Thread James Carr
Sessions aren't currently available on the server and I don't want to have to wait till the end of the week for my client to view the application. Thanks, James On Nov 6, 2007 12:11 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > --- James Carr wrote: > > Currently I'm using sessions but I would lik

RE: S2: input by method for validations

2007-11-06 Thread Manuel Correa
I found this: inputA That is the way that you can change the default input. My question is: I using wildcards for instance the methods... I can do this: input_{1} (This doesn't work) I need

Re: Annotation Validation, per method?

2007-11-06 Thread Ted Husted
There's a setting that you can change, but when you do, you lose inherited property validations. * https://issues.apache.org/struts/browse/WW-2191 So, it's still not an optimal situation. :( Ideally, we should be able to have per-method validations and inherit methods placed on properties. Of

Re: Struts2 Configutation alternative to sessions?

2007-11-06 Thread Dave Newton
--- James Carr wrote: > Currently I'm using sessions but I would like to > reconfigure my application to use something besides > sessions, perhaps something like viewState in .NET that > would be availble via a hidden input or get parameter. Why are you trying to avoid the session? > I'm sure s

RE: S2: input by method for validations

2007-11-06 Thread Dave Newton
You *might* be able to use an OGNL property to configure the name of the input result as an interceptor param; I don't know if they support parsing, though. d. --- Manuel Correa <[EMAIL PROTECTED]> wrote: > The validations works fine. Sorry about the mistake. > The problem is the result: The inp

Struts2 Configutation alternative to sessions?

2007-11-06 Thread James Carr
Hi All, I'm using struts 2 for a small web app that has an action attribute that needs to maintain state. Currently I'm using sessions but I would like to reconfigure my application to use something besides sessions, perhaps something like viewState in .NET that would be availble via a hidden input

RE: S2: input by method for validations

2007-11-06 Thread Manuel Correa
The validations works fine. Sorry about the mistake. The problem is the result: The input. When something is wrong with the fields..by default the validation stack forward to the INPUT, I need to define depends of the method which is the input. Manuel Correa. -Original Message- From:

Re: S2: input by method for validations

2007-11-06 Thread Fátima Silveira
the name of the XML must be like ClassName-actionAlias_methodName-validation.xml so you must rename your xml to Class-classAction_methodA-validation.xml Class-classAction_methodB-validation.xml On 11/6/07, Manuel Correa <[EMAIL PROTECTED]> wrote: > > I need to define a custom input for method

Re: Redirects - Dynamic Parameters

2007-11-06 Thread Gary Affonso
I think you already know this, but in case you don't... When you specify the action to redirect to, you have access to the OGNL stack. So your redirect may look something like this.. myAction.action?param=${paramValue} I think what you're asking is, if "param" has no value, you don't want

S2: input by method for validations

2007-11-06 Thread Manuel Correa
I need to define a custom input for method in the same action. For example, I have the "methodA" that receive the information from inputA.jsp I have "methodB" that receive from inputB.jsp I use the validation for each one: classAction_methodA-validation.xml classAction_methodB-valida

Re: [struts] jsp pages cahces on struts

2007-11-06 Thread Wes Wannemacher
I actually ran into this once where the JSP was not being updated, and the issue was that for some reason (incorrect time on my workstation or something), the timestamp on the JSP file was older than the timestamp of the compiled JSP. Usually when the JSP is broken, Tomcat will recognize that it wo

Re: [struts] jsp pages cahces on struts

2007-11-06 Thread Dale Newfield
Odelya Glick wrote: I deleted the files under: TOMCAT_HOME\work\Cataline\localhost\myProjectName But is there a better way to never cache it? .jsp gets converted to .java which then gets compiled to a .class, which is then loaded and executed. You do *not* want to go through that process fo

Redirects - Dynamic Parameters

2007-11-06 Thread Gunnar Hillert
Hi, A typical requirement in my webapps is to "redirect" to result pages after form submission. This is quite nicely described here: http://www.vitarara.org/cms/struts_2_cookbook/post_and_redirect This works great but here is my question: Is there a way to dynamically create parameters? For ins

RE: [S2] Restricting paths?

2007-11-06 Thread Jake Robb
Thanks, that did it! I didn't have namespace attributes for any of my packages. :) -Original Message- From: Gary Affonso [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 06, 2007 9:33 AM To: Struts Users Mailing List Subject: Re: [S2] Restricting paths? Did you checkout the namespace

Re: [S2] Restricting paths?

2007-11-06 Thread Gary Affonso
Did you checkout the namespace setting of your package? - Gary Jake Robb wrote: I have an action called MainMenu. It's defined as follows: mainMenu (I'm using the Spring plugin - mainMenuAction is the name of the spring bean) I want MainMenu to be accessible at

[S2] Restricting paths?

2007-11-06 Thread Jake Robb
I have an action called MainMenu. It's defined as follows: mainMenu (I'm using the Spring plugin - mainMenuAction is the name of the spring bean) I want MainMenu to be accessible at the following URL: http://server/main/MainMenu.action And, as expected, it is ava

Re: Validation Best Practices?

2007-11-06 Thread Tom Schneider
That looks like an interesting project. There are a lot of things that I like about what they are doing. There are a lot of things that could be handle that way. My fear with making everything a seperate Rule class is that some things cannot be encoded as a simple rule. Somevalidation needs to

Re: [OT] Write a thread to check database in web application

2007-11-06 Thread Gabriel Belingueres
Hi, If you are deploying on a full blown EJB container, you can use the TimerService too. I personally used Spring to run periodic TimerTasks and it works well. You don't need to use Quartz if your scheduling needs are simple (like run each 10 minutes). 2007/11/5, Antonio Petrelli <[EMAIL PROTEC

Re: Problem with Tiles decoration and struts2

2007-11-06 Thread Ghislain VANDERPOTTE
Oups, and I forgot the fact that the result has to be defined in the tiles.xml file, it will not work by just adding the result type. -- Ghislain - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

Re: Problem with Tiles decoration and struts2

2007-11-06 Thread Ghislain VANDERPOTTE
Hi, by quickly looking at your struts.xml, it seems that the result type misses: jsp/home.jsp ^ I think it should now work Cheers Ghislain

Re: Problem with Tiles decoration and struts2

2007-11-06 Thread Antonio Petrelli
2007/11/6, Amit Rana <[EMAIL PROTECTED]>: > > I am trying to get TilesDecorationFilter > (http://tiles.apache.org/tutorial/advanced/utils.html) to work with > struts2.0.9 without any success. Can anyone please help me figure out > where am I going wrong? I am not sure if this is a tiles list questi

Re: Annotation Validation, per method?

2007-11-06 Thread Martin Gilday
Thanks. Is this not a severe limitation of the annotation version if it is more limited than the xml version? - Original message - From: "Fátima Silveira" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Date: Mon, 5 Nov 2007 17:58:32 +0100 Subject: Re: Annotation Validation, per met

Problem with Tiles decoration and struts2

2007-11-06 Thread Amit Rana
Hi, I am trying to get TilesDecorationFilter (http://tiles.apache.org/tutorial/advanced/utils.html) to work with struts2.0.9 without any success. Can anyone please help me figure out where am I going wrong? I am not sure if this is a tiles list question or struts? Tiles is decorating jsps but n

[S2] Change updateFreq in a DIV

2007-11-06 Thread Grish
Ok I've made some progress but now i'm stuck. What I did was have a a div tag then I have select box then on my updateFreq function i have the following: function updateFreq(obj) { if (obj.selectedIndex == 0) { dojo.event.topic.publish("/stopTimer"); }

Re: Validation Best Practices?

2007-11-06 Thread Joachim Ansorg
Tom, I've read this thread with great interest. Currently I'm thinking about the validation problem as well. I looked at springmodule's Bean validation framework. (https://springmodules.dev.java.net/docs/reference/0.8/html/validation.html#beanValidator). Looks quite interesting to me. Does som

Re: [S2] getText() and #attr

2007-11-06 Thread Marco Machmer
hi Vinicius, this works fine. the correct syntax for me is: because the variable THEME is stored in the request or session or action. thanx a lot. regards marco Vinicius Medeiros Peretti wrote: > > Hi Marco > I use: > value="%{getText( #Variable+'.string.constant.label.'+OtherVariable)}" >