Re: [S2] getText() and #attr

2007-11-06 Thread Marco Machmer
hi Vinicius, this works fine. the correct syntax for me is: s:url id=image value=%{getText('common.themes.'+#attr.THEME + '.reference.edit.24')}/ because the variable THEME is stored in the request or session or action. thanx a lot. regards marco Vinicius Medeiros Peretti wrote: Hi Marco

[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 s:div id=myDivId theme=ajax href=%{url} formId=frmMyForm showLoadingText=false updateFreq=5000 autoStart=false startTimerListenTopics=/startTimer stopTimerListenTopics=/stopTimer / then I have

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

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

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 user@struts.apache.org Date: Mon, 5 Nov 2007 17:58:32 +0100 Subject: Re: Annotation

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 question or

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: action name=home class=com.tj.actions.HomeAction result type=tilesjsp/home.jsp/result ^ /action I think it should

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:

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

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

[S2] Restricting paths?

2007-11-06 Thread Jake Robb
I have an action called MainMenu. It's defined as follows: action name=MainMenu class=mainMenuAction result name=success type=tilesmainMenu/result /action (I'm using the Spring plugin - mainMenuAction is the name of the spring bean) I want MainMenu to be accessible

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: action name=MainMenu class=mainMenuAction result name=success type=tilesmainMenu/result /action (I'm using the Spring plugin

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

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

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

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

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

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.. result name=successtype=redirect myAction.action?param=${paramValue} /result I think what you're asking is,

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 in

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

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: 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

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 input.

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: S2: input by method for validations

2007-11-06 Thread Manuel Correa
I found this: interceptor-ref name=workflow param name=inputResultName inputA/param /interceptor-ref 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:

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 like to

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

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: 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: interceptor-ref

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... result name=success type=redirect param name=location myAction.action${foo ? '?foo=' + foo : ''} /param /result Note that I'm pretty sure your OGNL lookups are not going to get