[S2] Problem with simple theme javascript validation

2007-10-23 Thread Gabriel Belingueres
Hi, I'm trying to perform some basic javascript validation using a form with the simple theme. I just added the onsubmit parameter in the form tag: s:form onsubmit=return validate(); but the form is ALWAYS posted, so there might be an error somewhere. Looking at the html source code,

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

Re: isUserInRole on JSP page...

2007-11-16 Thread Gabriel Belingueres
I personally tried with struts tags and JSTL tags I decided to give up after a while (I solved it by creating my own isUserInRole tag.) This in fact would be a nice addition to the struts 2 tags, it even can be implemented by delegating to the if tag implementation, so that you can have automatic

Re: Application initialization at startup

2007-11-30 Thread Gabriel Belingueres
you could use a servlet context listener. Gabriel 2007/11/30, Shyamal Mehta [EMAIL PROTECTED]: For struts 2 what is the recommended/best way of executing any application specific code at application startup? In struts 1.x we used to create a plugin and configure its startOnLoad property to

[S2] Log4J error on application stop

2007-12-10 Thread Gabriel Belingueres
Hi, Tomcat's log is displaying this text when I stop the application (and when I shutdown the server too): log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository. I googled about it but there is not too much information yet, only

Re: ExceptionHandling in Struts2.0

2007-12-17 Thread Gabriel Belingueres
http://struts.apache.org/2.0.11/docs/exception-configuration.html 2007/12/17, Rajasekhar [EMAIL PROTECTED]: hi how can i use Exception Handling in struts2.0 does anyone have information pls send me Best Regards, Rajasekhar Yenduva B.tech(IT), Jr J2EE Developer, Miracle Software

Re: Why two struts2 projects can not exsits in one server at one time

2007-12-23 Thread Gabriel Belingueres
Are you _actually_ starting up two JBoss servers with identical port configurations in the same computer? Please provide us with more information. Gabriel 2007/12/23, Ray [EMAIL PROTECTED]: So it's because two projects can not use the same port number right? thank u. -- Ray Chen

Re: [S2] Opening a new window upon a link click without Javascript

2008-01-03 Thread Gabriel Belingueres
AFAIK, the s:a tag is best used when designing ajax applications, meaning the usual interaction is to update the same browser window. I would stay with the common HTML anchor tag to open a new window. Gabriel 2008/1/3, Al Sutton [EMAIL PROTECTED]: Heres channelge for the day... I have a

[S2] OpenSessionInView implementation with Spring

2008-01-09 Thread Gabriel Belingueres
Hi, I'm developing a new application using S2 + Spring 2.0 + Hibernate 3.2.5. I wanted to know which would be the best way of implementing the Open Session in View pattern in S2: Is there any standard implementation for S2? I''ve seen it implemented as a servlet filter, but I think it would be

[S2] How to allow escaping or HTML characters in s:select?

2008-01-28 Thread Gabriel Belingueres
Hi, I need a s:select in my page for selecting an option, showing a tree-like structure, so I need to indent some way the option elements into the HTML select, however, the s:select tag doesn't allow me to use the HTML space (nbsp;) for indentation, since it does escape it by default producing

Re: Dynamic indexed field name in validation?

2008-02-28 Thread Gabriel Belingueres
I had got the same problem some time ago. I couldn't specify an expression for the validator to iterate for each element of the collection. I finally opted for writing a validation method in the action class. 2008/2/10, j alex [EMAIL PROTECTED]: I used a custom validator to loop thru each

Re: Conversation Scope?

2008-03-04 Thread Gabriel Belingueres
Why model-driven? I don't fully get it. I've done several S2 apps by now and never fell the time to use the model driven interface before (for me this is syntax sugar.) Now why is this important for supporting conversation scope? Is it for not writing code like

Re: Conversation Scope?

2008-03-04 Thread Gabriel Belingueres
or a separate s:conversation tag ? M- - Original Message - From: Gabriel Belingueres [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, March 04, 2008 8:00 AM Subject: Re: Conversation Scope? Why model-driven? I don't fully get it. I've done

Re: Struts - Spring - hibernate and lazy initialization

2008-04-02 Thread Gabriel Belingueres
Try to post a stack trace or something more meaningful, but first of all, as a general architectural guideline, try first to refactor your code to avoid circular dependencies. 2008/4/2, Yayo [EMAIL PROTECTED]: Hi, I'm developing a struts - spring based application. I've got

Re: [OT] Re: Struts2 and display:table tag

2008-04-06 Thread Gabriel Belingueres
Seems you missed to add the Apache Commons Lang library jar file. I have projects running with displaytag 1.1.1 and commons-lang 2.3. (Don't know if the last 2.4 version work though.) Gabriel 2008/4/5, Dave Newton [EMAIL PROTECTED]: --- aum strut [EMAIL PROTECTED] wrote: here is the

Struts 2 exception-mappings with messages?

2007-06-06 Thread Gabriel Belingueres
Hi, I wonder if I can attach an error message to the exceptions specified in the struts.xml file, using exception-mapping and global-exception-mapping. I tried to achieve this by adding s:param inside the exception-mapping tag without success (it seems to me that they do nothing). How can I

Struts 2 exception-mappings with messages?

2007-06-07 Thread Gabriel Belingueres
Hi, I wonder if I can attach an error message to the exceptions specified in the struts.xml file, using exception-mapping and global-exception-mapping. I tried to achieve this by adding s:param inside the exception-mapping tag without success (it seems to me that they do nothing). How can I

Re: [S2] Could not parse struts.locale setting

2007-06-14 Thread Gabriel Belingueres
I'm getting the same warning setting the constant in the struts.xml file. Didn't test using struts.properties. Upgrading to v2.0.8 didn't solve the problem either. 2007/6/13, Danny Hurlburt [EMAIL PROTECTED]: I was getting the same warning. I was able to remove the warning by creating a

[S2] actionmessages not surviving between requests (redirect-after-post)

2007-06-14 Thread Gabriel Belingueres
Hi, I'm trying to develop my app following the redirect-after-post pattern. Of course s:actionmessages do not survive between requests, but this is the main paradigm behind the pattern (showing the page by doing _other_ request). The question is which are my options to make my actionMessages

[S2] Any example of using ScopeInterceptor to implement a wizard

2007-06-21 Thread Gabriel Belingueres
Hi, I need to implement a wizard that collects data in several forms, which fields are stored in a single session scoped object. The problem is I didn't found any working example of using ScopeInterceptor. Even this interceptor is not in the default stack, so I don't know if it is widely used

Re: [S2] Session Invalidation through SessionAware interface

2007-07-03 Thread Gabriel Belingueres
Changing the SessionAware interface would certainly break backward compatibility, plus it would affect action testability. If you don't like the downcast to SessionMap, I would rather consider creating an additional interface, something like: public interface SessionMapAware { public void

[S2] How to obtain current action name from JSP?

2007-07-10 Thread Gabriel Belingueres
Hi, Which OGNL / JSTL expression could I use from a JSP page that will return the currently executed action's name? TIA, Gabriel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [S2] How to obtain current action name from JSP?

2007-07-10 Thread Gabriel Belingueres
other ideas are welcomed. :) Gabriel 2007/7/10, Musachy Barroso [EMAIL PROTECTED]: Try: [EMAIL PROTECTED]@ACTION_NAME] //are you sure you need that? musachy On 7/10/07, Gabriel Belingueres [EMAIL PROTECTED] wrote: Hi, Which OGNL / JSTL expression could I use from a JSP page

Re: [s2] What is the name attribute of exception-mapping tag for?

2007-07-11 Thread Gabriel Belingueres
And what about the param tag? The DTD admits as valid the following: exception-mapping exception=java.lang.Exception result=exception param name=aaabbb/param /exception-mapping however, I don't know what would be the semantic here. 2007/7/10, petchia [EMAIL PROTECTED]: I've

Re: [S2] No data in the value stack when refreshing the jsp page

2007-07-23 Thread Gabriel Belingueres
Show us your struts.xml file please. 2007/7/23, Freakman [EMAIL PROTECTED]: I'm using Struts 2 for a relatively simple web application. And while so far I've been very satisfied with the platform, I have a minor problem that persists : the refresh feature (such as a F5/Ctrl+R) is seemingly

Re: [S2] No data in the value stack when refreshing the jsp page

2007-07-24 Thread Gabriel Belingueres
hmm it's hard to tell from this alone. But probably you are calling /searchResult.action somewhere in your code? 2007/7/24, Freakman [EMAIL PROTECTED]: My bad I should have included that first. Gabriel Belingueres wrote: Show us your struts.xml file please. ?xml version=1.0 encoding=UTF-8

[S2] how to prevent the results pages get saved in the browser's cache

2007-07-26 Thread Gabriel Belingueres
Hi, Which is the best (right?) way of setting the HTTP headers in a S2 app to prevent the browser to cache the result pages? I'm testing right now with a servlet filter which match all /* URLs but the back button is still working (i.e. the previous page is stored in the browser cache). Here is

[S2] Is there some BigDecimal validator and conversion routines?

2007-08-01 Thread Gabriel Belingueres
Hi, I want to enter numeric data in my form and I want it to go into a BigDecimal action value, however it seems that I can't validate it using some bigdecimal validator in the *-validation.xml file. There is a double validator, but I don't know if it will introduce rounding or truncation errors

Re: [S2] Is there some BigDecimal validator and conversion routines?

2007-08-03 Thread Gabriel Belingueres
easy to implement (eg. extend FieldValidatorSupport). For registering, see http://cwiki.apache.org/confluence/display/WW/Validation BTW, is it really validation you are searching for, or is it conversion (or both)? Note that these are two different topics. Regards, Rene Gabriel Belingueres

[S2] dynamic validation.xml file iterating of form elements

2007-09-07 Thread Gabriel Belingueres
Hi, Looking at the example of making a form using an indexed list in the following URL: http://struts.apache.org/2.0.9/docs/type-conversion.html Take for example a form with the following fields: s:iterator id=contacto value=referidos status=status tr td del

Re: Struts 2 : application-wide values initialization.

2007-09-08 Thread Gabriel Belingueres
Another option is to subclass the Struts 2 FilterDispatcher to perform initializations: public class YourAppDispatcher extends FilterDispatcher { public void init(FilterConfig filterConfig) throws ServletException { super.init(filterConfig); // your initialization code here... } }

Re: How to invalidate a session in struts 2.0

2007-09-11 Thread Gabriel Belingueres
Personally, I use the good old % session.invalidate(); % as the last instruction of my logout.jsp page. AFAIK, to invalidate the session inside an action, you must downcast the session Map (from the SessionAware interface) to a SessionMap class, which seems little awkward to me. Besides, using

Re: How to invalidate a session in struts 2.0

2007-09-12 Thread Gabriel Belingueres
this as a possible character flaw.). - Ray Clough - Original Message - From: Gabriel Belingueres [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Subject: Re: How to invalidate a session in struts 2.0 Date: Tue, 11 Sep 2007 16:16:41 -0300 Personally, I use the good

Re: How to invalidate a session in struts 2.0

2007-09-12 Thread Gabriel Belingueres
that in very small apps is ok to do a little scripting. Alvaro. On 9/12/07, Gabriel Belingueres [EMAIL PROTECTED] wrote: I'm not a purist myself, so it may break the MVC model somewhere, but (at lest in the apps I coded) I didn't find any use case that forced my to invalidate the session

Re: How to invalidate a session in struts 2.0

2007-09-13 Thread Gabriel Belingueres
]: There is one extra reason in favour of doing in the action: it's really simple. Sure. You can implement ServletRequestAware, an call request.getSession().invalidate(); Alvaro. On 9/13/07, Chris Pratt [EMAIL PROTECTED] wrote: On 9/12/07, Gabriel Belingueres [EMAIL PROTECTED] wrote: I

Re: [S2] dynamic validation.xml file iterating of form elements

2007-09-21 Thread Gabriel Belingueres
form fields? Gabriel 2007/9/7, Gabriel Belingueres [EMAIL PROTECTED]: Hi, Looking at the example of making a form using an indexed list in the following URL: http://struts.apache.org/2.0.9/docs/type-conversion.html Take for example a form with the following fields: s:iterator id

[S2] Why Interceptors implements Serializable?

2007-09-26 Thread Gabriel Belingueres
Hi, I've found intriguing that the Interceptor interface extends from Serializable. Why is that? I mean, if interceptors need to be stateless then there is no state to save/restore. Or is it because they are stored in application scope? Gabriel

Re: Where are the logic: tags?

2007-10-01 Thread Gabriel Belingueres
To use the s:select tag you need to somehow put the consecutive integers into a collection or Iterator. AFAIK there is no way to define this collection easily using OGNL or JSTL (something like comprehension lists in Haskell). 2007/10/1, Marcos Hernandez [EMAIL PROTECTED]: Thanks Cesar, but

Re: Setting/Accessing List Size on JSP

2007-10-01 Thread Gabriel Belingueres
try: s:set name=myListSize value=myList.size()/ 2007/10/1, Cory D. Wiles [EMAIL PROTECTED]: How do I set/display the size of my list in the result of my jsp? I am able to check for the size in my iterator tag, but I would like to be able to display the size as a property. I have tried the

Re: [S2] Indexed properties

2007-10-11 Thread Gabriel Belingueres
You are not the only one that thinks so. There are some OGNL expression issues involved that are confusing too: s:iterator id=contacto value=referidos status=status s:fielderror s:param value=%{'referidos[' + #status.index + '].email'}/ /s:fielderror s:textfield

Re: Disable validation when delete button is pressed

2007-10-17 Thread Gabriel Belingueres
I've solved this by changing the action in the form: s:submit value=Delete onclick=this.form.action= 'delete.action'; / but you must rename your CustomerCRUD-validation.xml file to CustomerCRUD-ActionThatNeedsValidation-validation.xml file. Just don't define any validation file for the delete

Re: Scheduled DB clean up service with Struts2

2008-04-11 Thread Gabriel Belingueres
I've been doing periodic tasks in my web app: I'm using Spring and setting a periodic task to execute is kind of straightforward, but has nothing to do with Struts 2. 2008/4/11, Peter Theissen [EMAIL PROTECTED]: Hello, I now searched a while to get an idea how to implement a DB clean up

Re: Scheduled DB clean up service with Struts2

2008-04-11 Thread Gabriel Belingueres
I doubt that this filter/interceptor approach to executing a task periodically would be a good idea: What if it is take too long? What happens to the current user request? What if it just time out? Typical periodic clean up tasks are better performed when nobody is using the system (or at least

Re: Scheduled DB clean up service with Struts2

2008-04-11 Thread Gabriel Belingueres
Then I guess it would be a good excercice to refactor that database access code into a DAO to decouple your actions from the DB. 2008/4/11, Peter Theissen [EMAIL PROTECTED]: No, no dependencies at all. It should just do the cleanup every day. However, I would like to use my certain action

Re: [OT] Scheduled DB clean up service with Spring

2008-04-15 Thread Gabriel Belingueres
INF/applicationContext.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/quartz/SimpleTrigger You missed some quartz jar file. 2008/4/15, Peter Theissen [EMAIL PROTECTED]: Hi, back again with my problem. The root cause is:

Re: [OT] Scheduled DB clean up service with Spring

2008-04-15 Thread Gabriel Belingueres
As a basic rule of thumb, you shall _never_ add the servlet-api.jar or servlet.jar to the WEB-INF/lib folder (if that's what you are doing) Consider reading this: http://tomcat.apache.org/tomcat-6.0-doc/appdev/deployment.html http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html If

Re: ParameterAware Arrays

2008-04-16 Thread Gabriel Belingueres
You can of course set up instance variables in your action class with identical names as the parameters you intend to use. 2008/4/16, Dustin S. [EMAIL PROTECTED]: I noticed the the map for setParameters is String, String[]. If I intend to always only use [0], is there any easy way to accomplish

Re: Overriding subset of interceptor params

2008-04-16 Thread Gabriel Belingueres
Seems OK to me (according to the current documentation.) I've only overriden interceptor parameters in the declaration of a new stack, and it is working OK: interceptor-stack name=secureStack interceptor-ref name=auth / interceptor-ref name=defaultStack param

Re: s2 in tomcats shared lib/

2008-04-19 Thread Gabriel Belingueres
Well it depends if you are ALWAYS developing using the same library versions or not. Be aware that Struts level of compatibility changes from version to version: For example, from 2.09 to 2.0.11 imposes several constraints in its tag library, so you may want to prevent this to be in a common

Re: Passing a List through a hidden field

2008-04-23 Thread Gabriel Belingueres
You need to iterate the list with an status variable and produce hidden fields of the following form: s:hidden name=resend.ids[%{#status.index}] / 2008/4/23, Steve Akins [EMAIL PROTECTED]: I have a List called ids which contains 4 Strings 22030, 6496, 6457, 6448 When the following tag is

Re: Passing a List through a hidden field

2008-04-23 Thread Gabriel Belingueres
But it translates the List into a meaningful string because the contents are Strings or Integers, but what about other objects that doesn't override the toString() method? Anyway, I suppose you could write a custom type converter for your List, but I think the current multiple hidden fields

Re: default interceptor stack

2008-05-10 Thread Gabriel Belingueres
2008/5/9, David Harland [EMAIL PROTECTED]: Is it possible to set a different default interceptor stack per package using default-interceptor-ref? Yes. I have split my struts configuration into mutiple files each with a different package name. I have set the default in the first file and the

Re: Hello all: Date Validation... An old issue, i guess...

2008-05-22 Thread Gabriel Belingueres
did you tried ${dateStart}? 2008/5/20, [EMAIL PROTECTED] [EMAIL PROTECTED]: Hi all, i'm Dome, from Italy, and i'm having my troubles with Date Validation on Struts 2 :| Using xml validation, and need to validate a date. Let's say i have 2 dates taken from html form. I need the second one

Re: model conversation scope doesn' t work as property in a base action class

2008-05-22 Thread Gabriel Belingueres
I certainly did not use any of these conversation implementations (I decided to write my own) but I suspect that you have defined the interceptors in the opposite order: I think you should first set to execute the defaultStack and then call the conversation interceptor. 2008/5/22, Canny Duck

Re: model conversation scope doesn' t work as property in a base action class

2008-05-22 Thread Gabriel Belingueres
implementation... 2008/5/22, Canny Duck [EMAIL PROTECTED]: I tried to change to order of the interceptors, but without any success. The model is still not set. You implemented the post-redirect-get pattern in your own implementation? Is it possible to publish your implementation? Gabriel Belingueres

Re: Hello all: Date Validation... An old issue, i guess...

2008-05-22 Thread Gabriel Belingueres
:1656) at ognl.ASTProperty.setValueBody(ASTProperty.java:101) ... Then I tried in my action class to represent date for datetimepicker field as String (because of format problem), but I got the same error ? -- Thx, Milan Gabriel Belingueres [EMAIL PROTECTED] wrote: did you tried

Re: Move query to interceptor

2008-06-06 Thread Gabriel Belingueres
AFAIK, It is a very common to use an interceptor/servlet filter to factor out authentication/authorization functionality. 2008/6/6, Frans Thamura [EMAIL PROTECTED]: hi all we want to move the repeated query on our apps to become a interceptor, this is our file anyone can give the experience

Re: default result name other than SUCCESS?

2008-06-18 Thread Gabriel Belingueres
I don't really know if you can change this default, but here is a workaround: Write a custom interceptor that each time your action result is LIST, you change it to SUCCESS. This way you could leave your result tags untouched. However, right now I could not imagine the value of doing that.

Re: default result name other than SUCCESS?

2008-06-18 Thread Gabriel Belingueres
Thanks Dave! PreResultListener is the answer. 2008/6/18, Dave Newton [EMAIL PROTECTED]: The result has already been rendered after invoke() has been called. PreResultListener is where to look--although I don't as that would work either. I think both solutions are sub-optimal and not worth

[S2] adding serialVersionUID to actions

2008-06-30 Thread Gabriel Belingueres
Hi, Is there any value in adding the serialVersionUID to all our actions? My idea is just to add a @SupressWarning(serial) to each action. AFAIK, the actions are newly created in each request and are never put into session or application scope (by Struts itself at least). Any ideas of why the

Re: Anyone want to show me up...

2008-07-03 Thread Gabriel Belingueres
simple ways like: input type=hidden name=uri value=%= request.getRequestURI() %/ though I sometimes feel guilty for not using the equivalent S2 tag :P 2008/7/3 Musachy Barroso [EMAIL PROTECTED]: #request is just a map with the request attributes. If you want the real request object:

Re: Anyone want to show me up...

2008-07-04 Thread Gabriel Belingueres
That's right. But in this case it is a hidden field. 2008/7/4 Al Sutton [EMAIL PROTECTED]: The problem with straight input.. is that you don't get the theme based formatting :( Gabriel Belingueres wrote: simple ways like: input type=hidden name=uri value=%= request.getRequestURI

Re: Good reasons to migrate from Struts 1 to Struts 2 ?

2008-07-04 Thread Gabriel Belingueres
Check this out: http://struts.apache.org/2.0.11.2/docs/comparing-struts-1-and-2.html 2008/7/4 Fernandes Celinio SGCF [EMAIL PROTECTED]: Hi, we have several web apps that have been developed with S1. I am currently learning S2 and i am studying the reasons why we should migrate to S2. Can

[S2] Problem injecting String with Spring plugin

2008-07-07 Thread Gabriel Belingueres
Hi, I want to inject a String defined in the Spring's applicationContext.xml file like this: bean id=templatesDir class=java.lang.String constructor-argvalue/WEB-INF/templates//value/constructor-arg /bean but the Spring plugin does not try to inject it (It works with my other injected, non

Re: [S2] Problem injecting String with Spring plugin

2008-07-07 Thread Gabriel Belingueres
2.5.5 and S2 2.1.2. 2008/7/7, Musachy Barroso [EMAIL PROTECTED]: The plugin doesn't really inject anything, it is all up to Spring. musachy On Mon, Jul 7, 2008 at 3:03 PM, Gabriel Belingueres [EMAIL PROTECTED] wrote: Hi, I want to inject a String defined in the Spring's

Re: [S2] Problem injecting String with Spring plugin

2008-07-07 Thread Gabriel Belingueres
in your spring config(s) file(s). musachy On Mon, Jul 7, 2008 at 4:09 PM, Gabriel Belingueres [EMAIL PROTECTED] wrote: Debugging the Spring output I found the following: 2008-07-07 16:52:40,421 DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory:214) - Returning

Re: Struts1 and Struts2 mailing lists separation ?

2008-07-07 Thread Gabriel Belingueres
I personally would like to interact using a web based forum where you can post with formatted java and xml code and even with emoticons instead of this email based mailing list, but this would be even more utopianphpBB would do :) 2008/7/7 Jason Wyatt [EMAIL PROTECTED]: Dave, may I ask why

Re: [S2] Problem injecting String with Spring plugin

2008-07-08 Thread Gabriel Belingueres
the ServletDispatcherResult has a constructor with a String parameter, but no constructor taking an Integer. From this I guess that something (Struts? the Spring plugin?) is trying to set the bean into the wrong object? 2008/7/7 Gabriel Belingueres [EMAIL PROTECTED]: Thanks Musachy for your quick answer

Re: Injecting singleton beans into Servlets

2008-07-08 Thread Gabriel Belingueres
2008/7/8 Kleiderman, Matthew [EMAIL PROTECTED]: Is there any way to inject beans defined in struts.xml with scope=singleton into a Servlet so that it's available when the Servlet's init method is called? Did you really meant injecting a bean defined inside Spring's applicationContext.xml file

Re: Action method specific custom validation

2008-07-09 Thread Gabriel Belingueres
Yes. To form the validation method name just concatenate validate with your action's method name. 2008/7/9 ManiKanta G [EMAIL PROTECTED]: Hi, I've three execute() kind of methods in single action. To validate the data, we can use actionName-actionAliasName-validation.xml for validating

Re: [S2] Struts configuration vizualization

2008-07-09 Thread Gabriel Belingueres
You may need common-logging jar files to actually execute the plugin, that is, in your java classpath. 2008/7/9 Milan Milanovic [EMAIL PROTECTED]: It's wierd because I have in that lib directory: commons-logging-1.0.4.jar commons-logging-api-1.1.jar -- Milan Milan Milanovic wrote:

Re: looking for suggestion regarding interceptor

2008-07-09 Thread Gabriel Belingueres
Wow it is amazing how S2 can be used. This is a use of interceptor I've never seen before. IMHO, I think it is too much trouble to declare an xxxAware interface and an xxxInterceptor to just share the same database data across multiple pages. I would stick to store the data in session or

Re: RE: RE: RE: Re: [S2] Struts configuration vizualization

2008-07-10 Thread Gabriel Belingueres
You didn't unclude the most important part of all your command line: java -cp Obviously you failed to add the commons logging jar file to the classpath. Try: java -cp path/to/the/following/file/commons-logging-1.0.4.jar;... .. 2008/7/10 Milan Milanovic [EMAIL PROTECTED]: Dear Dave,

Re: looking for suggestion regarding interceptor

2008-07-10 Thread Gabriel Belingueres
, Jul 9, 2008 at 6:10 PM, Gabriel Belingueres [EMAIL PROTECTED] wrote: Wow it is amazing how S2 can be used. This is a use of interceptor I've never seen before. IMHO, I think it is too much trouble to declare an xxxAware interface and an xxxInterceptor to just share the same database data

Re: looking for suggestion regarding interceptor

2008-07-10 Thread Gabriel Belingueres
need it to also inject the Service? (*Chris*) On Thu, Jul 10, 2008 at 10:41 AM, Gabriel Belingueres [EMAIL PROTECTED] wrote: IMHO both approaches are similar, as the intention is to inject the required data when you need it. The difference is that you created both an interface

Re: [S2] Recipe for Action and View

2008-07-11 Thread Gabriel Belingueres
You can also opt for sharing the prepare() code through inheritance, meaning that you create a superclass action holding the prepare() code, instead of coding a custom interceptor. 2008/7/11 Andreas Mähler [EMAIL PROTECTED]: Thanks for your Answer, Lukasz. I already know the PrepareInterceptor

Re: [S2] Recipe for Action and View

2008-07-12 Thread Gabriel Belingueres
) for the Button: s:submit name=submit label=OK value=true type=button / Comments and suggestions are welcome :-) ~Andreas Gabriel Belingueres schrieb: You can also opt for sharing the prepare() code through inheritance, meaning that you create a superclass action holding the prepare() code, instead

Re: Problem with s:set and s:if

2008-07-12 Thread Gabriel Belingueres
Looking at the docs: http://struts.apache.org/2.1.2/docs/ognl.html there is no #page notation when using struts taglibs, since they all use OGNL syntax. If you need to access a page scoped object, you need to use the #attr notation. 2008/7/12 Othon Reyes Sanchez [EMAIL PROTECTED]: #page is not

Re: [S2] Recipe for Action and View

2008-07-12 Thread Gabriel Belingueres
nothing and will return INPUT as the result, thus forwarding the response to the page with the form. [1] http://struts.apache.org/2.1.2/struts2-core/apidocs/com/opensymphony/xwork2/ActionSupport.html#input() 2008/7/12 Andreas Mähler [EMAIL PROTECTED]: Hello again, Gabriel Belingueres schrieb

Re: Referring to Properties object via OGNL?

2008-07-13 Thread Gabriel Belingueres
Properties implements the Map interface, so AFAIK, it should work accessing it as a Map. Did you tried #attr.mapname[somekey]? 2008/7/13 Dave Belfer-Shevett [EMAIL PROTECTED]: I have a situateion where I'm loading application specific settings via a Properties object on initialization. I'm

Re: [S2] Recipe for Action and View

2008-07-14 Thread Gabriel Belingueres
preprocessing to display it. After the page is done by user it has to be processed. Can you please elaborate on the soln given? ravi Gabriel Belingueres-2 wrote: Sorry it seems I entered the conversation later and didn't saw that email. The problem you want to solve is very common

Re: [S2] s:property - how to use CSS on it?

2008-07-14 Thread Gabriel Belingueres
You could pass a css class to the s:actionerror tag. If the HTML code that produces s:actionerror doesn't satisfy you, you can define your own actionerror.ftl template. 2008/7/14 wild_oscar [EMAIL PROTECTED]: Because I want just a simple list of actionErrors, I have an iterator for the

Re: Struts2 configuration problems

2008-07-14 Thread Gabriel Belingueres
struts-config is not a the document root element of S2's struts.xml file. That's the root element of S1 configuration file. 2008/7/14 Jan Froehlich [EMAIL PROTECTED]: Hello List... I tried to extend a existing webapp based on a own framework with some actions using struts2. After I added all

Re: [S2] newly-created Session context

2008-07-14 Thread Gabriel Belingueres
Where in the interceptor chain do your custom interceptor execute? 2008/7/14 Pierre Thibaudeau [EMAIL PROTECTED]: I have an interceptor that puts an object in the Session scope. The interceptor calls the following when retrieving the Session: public String intercept(ActionInvocation

Re: [S2] newly-created Session context

2008-07-14 Thread Gabriel Belingueres
That's strange. Which S2 version are you using? 2008/7/14 Pierre Thibaudeau [EMAIL PROTECTED]: Extra update. What makes this even more puzzling is that EL can find the object while OGNL cannot. On the first request, ${userLanguage} will display the correct value, but s:property

Re: [S2] newly-created Session context

2008-07-14 Thread Gabriel Belingueres
Please test your interceptor using the following to get the session: Map session = invocation.getInvocationContext().getSession(); 2008/7/14 Pierre Thibaudeau [EMAIL PROTECTED]: 2008/7/14 Gabriel Belingueres [EMAIL PROTECTED]: That's strange. Which S2 version are you using? Struts 2.1.2

Re: [S2] newly-created Session context

2008-07-14 Thread Gabriel Belingueres
is an adapter to ease unit testing of actions, and every change is is done to the SessionMap it is delegated to the HTTPSession object. 2008/7/14 Pierre Thibaudeau [EMAIL PROTECTED]: 2008/7/14 Gabriel Belingueres [EMAIL PROTECTED]: Please test your interceptor using the following to get the session

Re: 'include' struts.xml stuff is broken?

2008-07-16 Thread Gabriel Belingueres
In your struts-editevent.xml: http://pastebin.stonekeep.com/4956 action tags must be inside a package, and they are inside struts. See the http://struts.apache.org/dtds/struts-2.0.dtd file 2008/7/16 Dave Belfer-Shevett [EMAIL PROTECTED]: This seems like it should work, but I'm getting all sorts

Re: How can I store temporary data during user input procedure?

2008-07-18 Thread Gabriel Belingueres
1 and 2: You could choose store your objects in session scope. Even it may be the only way to do it, because you say that there are Law fields that the user can't modify, which it discards the option of rewriting those fields as hidden fields in your form (for security reasons) 2008/7/18 holod

Re: Why we need struts.action.extension property

2008-07-18 Thread Gabriel Belingueres
AFAIK, the Servlet API doesn't expose any standard way to know the mapping associated to a filter. Maybe that's way. 2008/7/18 Igor Vlasov [EMAIL PROTECTED]: Hello. I wrote a simple s2 application. I described a filter in web.xml filter filter-namestruts2/filter-name

[S2] Conversion validation issue

2008-07-21 Thread Gabriel Belingueres
Hi, I'm using Struts 2.1.2: I have a validation file like this: field name=codigoValidacion !-- field-validator type=conversion short-circuit=true message key=invalid.fieldvalue.codigoValidacion / /field-validator -- field-validator type=required short-circuit=true

Re: need some help regarding Display List and Update In Struts2

2008-07-21 Thread Gabriel Belingueres
I recommend using displaytag [1] for showing the user list. How to know which user you want to delete/update? You need to add a parameter to the delete/update action URL to identify the specific user, usually the user's primary key or if your user list is stored in session scope you could use the

Re: [S2] Conversion validation issue

2008-07-22 Thread Gabriel Belingueres
But then again, eliminating the conversionError interceptor from the stack would prevent conversion errors to appear as fieldErrors in the input form, but this would force to use the conversion validator everywhere a non String object is setted by the ParametersInterceptor to show the error? Is

[S2] Why there is no support for client side date validator?

2008-07-22 Thread Gabriel Belingueres
Hi, Seeing the file form-close-validate.ftl (in xhtml theme) I see that there is no javascript code for the date validator. Seems like a straightforward addition. Or is there some error condition or limitation that I'm not aware of? Regards, Gabriel

Re: [S2] Conversion validation issue

2008-07-23 Thread Gabriel Belingueres
the DefaultActionValidatorManager.validate() method to check first if the field is in the conversionError map (in that case it should skip validation of that field). 2008/7/22 Dave Newton [EMAIL PROTECTED]: --- On Tue, 7/22/08, Gabriel Belingueres [EMAIL PROTECTED] wrote: But then again, eliminating the conversionError

Re: Adding Linstener tag in web.xml results in Resource not found error on browser

2008-07-23 Thread Gabriel Belingueres
that could be a sign that your context listener is not initializing correctly. Take a look at your server log. 2008/7/23 anaeem [EMAIL PROTECTED]: Can any one who has used ServletContextListener class, share their build.xml. Thanks much newton.dave wrote: --- On Wed, 7/23/08, anaeem

Re: What is the best way to handle cancel, Update, Back Buttons in Struts2

2008-07-23 Thread Gabriel Belingueres
The defaultStack interceptor stack provides you with convenient method name defaults which will not run validations. When you call an action executing any of these method names: input, back, cancel or browse, the validations will not execute. 2008/7/23 hisameer [EMAIL PROTECTED]: Hello Everyone

Re: [s2] Making textfield input optional

2008-07-24 Thread Gabriel Belingueres
Which is the data type of inValue? 2008/7/24 Milan Milanovic [EMAIL PROTECTED]: Hi, I have one form with multiple textfields, and I want to one of that textfield be optional for user, i.e., he doesn't need to enter information in that particular field. Now, when user don't enter I get this

Re: [s2] Making textfield input optional

2008-07-24 Thread Gabriel Belingueres
usually get thrown when, in this case, ViewAction doesn't have a setInValue() method? jk On Thu, Jul 24, 2008 at 10:31 AM, Gabriel Belingueres [EMAIL PROTECTED] wrote: Which is the data type of inValue? 2008/7/24 Milan Milanovic [EMAIL PROTECTED]: Hi, I have one form with multiple

Re: [s2] Making textfield input optional

2008-07-24 Thread Gabriel Belingueres
must have get/set methods for it. -- Thx, Milan Gabriel Belingueres-2 wrote: instead of: public vlid setInValue(BigDecimal x) { this.x = x; } test with this: public vlid setInValue(String s) { this.x = new BigDecimal(s); } 2008/7/24 Milan Milanovic [EMAIL PROTECTED]: Hi

  1   2   3   >