Re: Action Execute Being called 2 times

2008-08-01 Thread Joachim Ansorg
Hi, you use the same action to render the welcome screen and Registrer.jsp. So this means that when you display the welcome screen execute() is called and when you display the Registrer.jsp page. Either use two separate actions or just return null in execute and have another action method

Re: Iterator index: how to index html elements?

2008-07-28 Thread Joachim Ansorg
Hi, I use this code: s:iterator value=lawDraft.docs id=doc status=document s:param name=rawMainDocIdParam value=attachedMainDocRows:property value=document.index// tr id=%{#rawMainDocIdParam} some content /tr /s:iterator For this I usually do something like

Re: Compose String value and stack value into String, set result as property value of struts2 tag

2008-07-28 Thread Joachim Ansorg
Hi, This is my code: s:a id= showLoadingText=false targets=%{'attachedMainDocRow'#document.count} Use something like targets=attachedMainDocRow%{#status.index} . Joachim - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Unit testing Struts2 + Spring application?

2008-07-23 Thread Joachim Ansorg
Hi, I'm working on a Struts2 application which uses Spring as factory. I'm using Struts 2.1 and Spring 2.5. The problem is for me that - I don't know how to use StrutsTestCase so the created action are spring-wired - How to make the tests use my /WEB-INF/struts.xml file as Struts

Re: Spring autowiring null values

2008-05-19 Thread Joachim Ansorg
AFAIK Struts2 tries to set a new value to an object if it's currently null. E.g. a new value for person.address.street should be set in a request. If person is created in the prepare() method and if the action uses an paramsPrepareParams stack then Struts2 tries to create the person object in

Automatic creation of beans

2008-03-26 Thread Joachim Ansorg
Hi there, I have an action which is configured to use the paramsPrepareParams interceptor. Basically the action is: public class UserAdminAction implements Preparable { // user is an interface, prepare() assign an implementation to the field private User user; private String

Re: tag writers resources?

2008-01-29 Thread Joachim Ansorg
Hi Darren, the example that I posted is just for JSP. But if you look at the struts2 examples it shouldn't be that hard to make a tag usable in freemarker or velocity as well. As you can see the information available on writing native Struts2 tags is quite hard to find. The most important

Re: [struts] tag writers resources?

2008-01-29 Thread Joachim Ansorg
Dale, this is useful information for me. Thanks for pointing this out. I'll make use of this class, I think. Joachim P.P.S: If your question is really how do i evaluate tag arguments that are really ognl expressions, then TagUtils.getStack() is probably what you're looking for:

Re: tag writers resources?

2008-01-28 Thread Joachim Ansorg
Hi Darren, writing a simple Struts2 tag is not that difficult. But getting started is. The documentation of the tag api is not very good, imho. The best start is in my opinion to get the Struts2 sources and read the source code of the existing struts2 tags. I'm posting a simple example with

Re: Application, Session, Request - Struts2 related ..

2008-01-11 Thread Joachim Ansorg
Hi, Que 2. Are their performance implications to be kept in mind since now action instances are not shared per request and each instance has its own copy of the attributes ? If you use the Struts2 spring-pugin it is possible to set the action scope to singleton, session, request and

Re: struts2 spring plugin

2008-01-06 Thread Joachim Ansorg
Brian, I guess you are using Spring 2.x. I think you have to use scope=prototype (or scope=session if you need it) instead of singleton=false. Joachim I have read through the spring plugin wiki page http://struts.apache.org/2.0.11/docs/spring-plugin.html for struts2. I want my actions to be

Re: [S2] [ANN] S2 plugin for JetBrains IntelliJ IDEA 7

2008-01-02 Thread Joachim Ansorg
Hi Yann, I'm using your plugin - it's a really great help for Struts2 development. Thanks a lot! The one thing which is missing for me is that Spring beans are not recognized as action classes. Joachim Hello all, some of the IDEA users here may already have seen it: there's a new plugin to

Re: S2: Struts2 @SkipValidation does not work

2007-12-20 Thread Joachim Ansorg
Hi, I think an interceptor is getting in between, as you mentioned further down the thread. I found out on my project that if the workflow interceptor finds error messages for the page the default result INPUT is returned. You can change that with this in your own interceptor stack:

[S2] Writing an enhanced tree component...

2007-12-14 Thread Joachim Ansorg
Hi all, for the application I'm working on I need a tree component which is more configurable/capable than the current Struts2 s:tree component. Basically I want to use it like this: t:tree rootNode=%{rootNode} typeProperty=type childCollectionPropert=children t:treeNode type=group

S2 action mapping: How to return to previous action?

2007-12-05 Thread Joachim Ansorg
Hi all, I have two actions (action1 and action2) which both call a third action. How can I do the mapping of the third action so that the calling action is called again (i.e. action1 or action2)? Thanks, Joachim - To

Empty pages returned for actions - how do I debug this?

2007-11-27 Thread Joachim Ansorg
Hi all, I'm still new to Struts 2. I like the framework as a whole. A part which I find quite difficult to use is the debugging support. But I guess I'm missing something. I have sometime the problem that Struts returns an empty page. Nothing, no html at all. No exception in the log, even

[S2] Spring validator integrated in Struts actions?

2007-11-26 Thread Joachim Ansorg
Hi, I want to use the Spring validation framework in Struts2 action classes. Has such an integration already been done in a project? Thanks a lot! Joachim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Components for Struts2?

2007-11-22 Thread Joachim Ansorg
Hi all, I'm new to this list. I started to use Struts2 for a new project. I like it quite a lot compared to the frameworks I used before. Are there any additional component/tag libraries available for Struts2? Thanks a lot, Joachim

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