Re: ActionContext.getContext().getSession return null when I test Struts2 action by JUnit.

2009-08-03 Thread Juanjo Cuadrado
Hi, That is wrong... if you do this, throws a NullPointerException... 2008/2/1 Joey > I found it . like this. > >Map param = new HashMap(); >ActionContext.getContext().setSession(param); > > Thanks for your help > > On Feb 1, 2008 4:53 PM, Joey wrote: > > Thanks, I just check

Re: ActionContext.getContext().getSession return null when I test Struts2 action by JUnit.

2009-08-03 Thread Juanjo Cuadrado
go... > > Nils-H > > On Mon, Aug 3, 2009 at 12:44 PM, Juanjo Cuadrado > wrote: > > Hi, > > > > That is wrong... if you do this, throws a NullPointerException... > > > > > > 2008/2/1 Joey > > > >> I found it . like this. > >> >

Re: ActionContext.getContext().getSession return null when I test Struts2 action by JUnit.

2009-08-03 Thread Juanjo Cuadrado
does not exist. > > Nils-H > > On Mon, Aug 3, 2009 at 1:06 PM, Juanjo Cuadrado > wrote: > > And... what is the problem??? I have the same problem with junit test and > > actions. No matter how long ago the comment was written. He might have > found > > out alr

Re: ActionContext.getContext().getSession return null when I test Struts2 action by JUnit.

2009-08-03 Thread Juanjo Cuadrado
nAware if it was possible, since it's > a lot more test friendly. > > Nils-H > > On Mon, Aug 3, 2009 at 1:37 PM, Juanjo Cuadrado > wrote: > > Uummm... I haven't looked at the source, but I looked the > documentation... > > And I could see that the getContex

Re: how to avoid form's validation if the user choose cancel?

2008-02-24 Thread Juanjo Cuadrado
And in the version 1.x? 2008/1/3, xianwinwin <[EMAIL PROTECTED]>: > > > YES! exactly what I needed. thanks!!! > > > > > > Alberto A. Flores wrote: > > > > one way I did that was by using the "non-validating" method point to a > > method (in the Action class) to have the following annotation > > >

Form bean

2008-03-05 Thread Juanjo Cuadrado
Hi, Where is the Form bean into the request??? What is the label?? I want to put a actionform in the request and I dont know where... (prepopulate???) Thanks.

Re: Form bean

2008-03-06 Thread Juanjo Cuadrado
Thanks Antonio, but I need to prepopulate a ActionForm from another Action and forward it to jsp... Sorry for my English. 2008/3/6, Antonio Petrelli <[EMAIL PROTECTED]>: > > 2008/3/6, Juanjo Cuadrado <[EMAIL PROTECTED]>: > > > Hi, > > > > Where is th

[S2] Problem showing errors message with xxx-validation.xml

2008-10-14 Thread Juanjo Cuadrado
Hi, I'm having problems to show a error message with validation xml file. This is the code in my struts.xml /pages/opciones.jsp The action class is this: public class TestAction { private String dniParticipante; public String execute() { return A

Re: [S2] Problem showing errors message with xxx-validation.xml

2008-10-14 Thread Juanjo Cuadrado
gt; 5.- If you want javascript validation you must use validate="true"/> > > Nestor > On Tue, Oct 14, 2008 at 10:08 AM, Lukasz Lenart < > [EMAIL PROTECTED]> wrote: > > > 2008/10/14 Juanjo Cuadrado <[EMAIL PROTECTED]>: > > > No... but this

Re: [S2] Problem showing errors message with xxx-validation.xml

2008-10-14 Thread Juanjo Cuadrado
No... but this too I have tried it :( 2008/10/14 Lukasz Lenart <[EMAIL PROTECTED]> > 2008/10/14 Juanjo Cuadrado <[EMAIL PROTECTED]>: > > Hi, > > > > I'm having problems to show a error message with validation xml file. >

How to change the param name for paging in the display:table tag

2008-10-28 Thread Juanjo Cuadrado
Hi, I have a Struts2 application and I'm using the display:table tag. My problem is that I want to change the param's name for paging (in my case "d-457775-p") for another... How can I do it? I have seen the parameters (

How to recover the action's name executed

2008-10-29 Thread Juanjo Cuadrado
Hi, I need to know how to recover (from the validation method) the name of de action that has been invoked. I want to know the name of the method that will be executed for this action (in the struts.xml I have put diferents methods for the same action class). Thanks.

Re: How to recover the action's name executed

2008-10-29 Thread Juanjo Cuadrado
thod > from each action method ? > > > On Wed, Oct 29, 2008 at 10:55 AM, Juanjo Cuadrado <[EMAIL PROTECTED]> > wrote: > > Hi, > > > > I need to know how to recover (from the validation method) the name of de > > action that has been invoked. I want to k

Re: How to recover the action's name executed [SOLVED]

2008-10-29 Thread Juanjo Cuadrado
if(hasErrors()) return INPUT; > ... // real method1 work > } > > > public void validate1() { > ... > } > > public void validate2() { > ... > } > > public void validate () { > // common validation for every method >

Problem with tree tag (event selected)

2008-12-11 Thread Juanjo Cuadrado
Hi, I'm working with s:tree tag, but it not working for me. I have this code in my jsp ... dojo.even.topic.subscribe("treeSelected", function(e){ alert("The id is:" + e.node.widgetId); }); ...

Re: Problem with tree tag (event selected)

2008-12-11 Thread Juanjo Cuadrado
Sorry... I'm using Struts 2.0.11.2 2008/12/11 Juanjo Cuadrado <[EMAIL PROTECTED]> > Hi, > > I'm working with s:tree tag, but it not working for me. > > I have this code in my jsp > > ... > > dojo.even.topic.subscribe("treeSele

Recover property's value of bean from jsp

2008-12-18 Thread Juanjo Cuadrado
Hi, I have a Action class than extends ActionSupport and implements ModelDriven and Preparable. Into prepare method, I put in request scope a class bean. If in my jsp (into a form) I can recover the property's value with a s:textfield, but how to recover this value without s:textfield? Ej. Z

Re: Recover property's value of bean from jsp

2008-12-18 Thread Juanjo Cuadrado
I would like not user Java scriptlet in my JSP. Only tags. have you any examples? 2008/12/18 Dave Newton > > Into prepare method, I put in request scope a class bean. > > If in my jsp (into form) I can recover the property's value > > with a s:textfield, but how to recover this value without >

Re: Recover property's value of bean from jsp

2008-12-18 Thread Juanjo Cuadrado
Sorry, I don't knew it. But, can you give me any example, please? Or, any URL with info about this. 2008/12/18 Dave Newton > JSP EL isn't a scriptlet. > > --- On Thu, 12/18/08, Juanjo Cuadrado wrote: > > From: Juanjo Cuadrado > Subject: Re: Recover property&#

Re: Form bean

2008-03-06 Thread Juanjo Cuadrado
Great idea Thanks! 2008/3/6, Antonio Petrelli <[EMAIL PROTECTED]>: > > 2008/3/6, Juanjo Cuadrado <[EMAIL PROTECTED]>: > > > > > Thanks Antonio, but I need to prepopulate a ActionForm from another > Action > > and forward it to jsp... > > > &

Preserve datas in form

2008-03-06 Thread Juanjo Cuadrado
Hi, How I can preserve the data in the form when I do submit the form and ActionForm finds a error? When it return to jsp, the form's field are voids. Thanks

Re: Preserve datas in form

2008-03-06 Thread Juanjo Cuadrado
Hi, I have a form (... ) and a ActionForm. In the method validate I have a errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("errors.required", "Name"))... and in the struts-config I have declared a action element wiht scope="session" I think that all is OK, but don't work..

Re: validation - form set

2006-09-19 Thread Juanjo Cuadrado
Hi, the problem is the sequence of tags you have to put before Sorry for my English. 2006/9/19, Tom Jerry <[EMAIL PROTECTED]>: why do I get this error ? SEVERE: Parse Error at line 87 column 19: The content of element type "form-validation" must match "(global*,formset*)". org.x

Re: Two drop downs, and I need that the contents of the second dependent on the value selected in the first!!!

2006-09-19 Thread Juanjo Cuadrado
Hi, I don't know if I have you understands, but I think that this mail of Eric Givler responds to your question You'd need to rebuild the second list on the posting of the form, i.e. 1. get value selected from first list 2. invoke method to refresh dependent list based on user prm from fis

Re: Question about warning when pre-loading a form

2006-09-21 Thread Juanjo Cuadrado
Hi, Can you try to to put the attribute "name" in the tag action (in struct-config.xml)? I hope help you 2006/9/21, Yamir Encarnacion <[EMAIL PROTECTED]>: Hello, I am getting the following warning (log4j) when pre-loading a form and was wondering i

Tags nested

2006-10-27 Thread Juanjo Cuadrado
Hi, Can`t I use this?

Dynamic links

2006-10-30 Thread Juanjo Cuadrado
Hi, I need to use the <[EMAIL PROTECTED] file= a dynamic way. Ej. <[EMAIL PROTECTED] file="/WEB-INF/jspf/${query.action}.jspf"%> or <[EMAIL PROTECTED] file="/WEB-INF/jspf/<%= query.getAction() %>.jspf"%> but I can't do it... I only get the follow trace: org.apache.jasper.JasperExce

Re: Dynamic links

2006-10-31 Thread Juanjo Cuadrado
uot;%> <%@ taglib uri="/tags/smartcv2" prefix="s" %> <%@ taglib uri="/tags/jstl-c" prefix="c" %> El lun, 30 de 10 de 2006 a las 16:48, Juanjo Cuadrado escribió: > Hi, > > I need to use the <[EMAIL PROTECTED] file= a d

Re: Error Pages in Struts App

2006-11-02 Thread Juanjo Cuadrado
Hi, I think that you have to put the follow in the first line of your error page: <%@ page isErrorPage="true" %> 2006/10/30, Chetan Pandey <[EMAIL PROTECTED]>: Hi All: I am trying to include an Error Page in my Struts-based Web App. The following is what I have in my web.xml 40

Problems with validator

2006-11-15 Thread Juanjo Cuadrado
Hi, Can I use the forms of kinds "ValidatorActionForm" and "ValidatorForm" with the feature validator? I'm using this feature but it only works when my forms are of kinds "DynaValidatorForm".

Re: Problems with validator

2006-11-15 Thread Juanjo Cuadrado
Sorry, my question already was answered in another thread. The next time, I will search for before to ask. 2006/11/15, Juanjo Cuadrado <[EMAIL PROTECTED]>: Hi, Can I use the forms of kinds "ValidatorActionForm" and "ValidatorForm" with the feature validator? I&#