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 joey.informat...@gmail.com 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

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

2009-08-03 Thread Juanjo Cuadrado
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 already, but I not and he not has written the solution here. But I wan to say a thing... When you does

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

2009-08-03 Thread Juanjo Cuadrado
Uummm... I haven't looked at the source, but I looked the documentation... And I could see that the getContext of ActionContext never returns null http://struts.apache.org/2.1.6/struts2-core/apidocs/com/opensymphony/xwork2/ActionContext.html#getContext() Well, how have I to do the test now? How

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

2009-08-03 Thread Juanjo Cuadrado
...@gmail.com He might have found out already, considering this was posted 1,5 years ago... Nils-H On Mon, Aug 3, 2009 at 12:44 PM, Juanjo Cuadrado jjcuadr...@gmail.com wrote: Hi, That is wrong... if you do this, throws a NullPointerException... 2008/2/1

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.

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 newton.d...@yahoo.com 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

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 newton.d...@yahoo.com JSP EL isn't a scriptlet. --- On Thu, 12/18/08, Juanjo Cuadrado jjcuadr...@gmail.com wrote: From: Juanjo Cuadrado jjcuadr...@gmail.com Subject

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 ... script type=text/javascript dojo.even.topic.subscribe(treeSelected, function(e){ alert(The id is: + e.node.widgetId); }); /script ...

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 ... script type=text/javascript dojo.even.topic.subscribe(treeSelected, function(e

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
? 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 know the name of the method that will be executed for this action (in the struts.xml I

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

2008-10-29 Thread Juanjo Cuadrado
validate1() { ... } public void validate2() { ... } public void validate () { // common validation for every method } } On Wed, Oct 29, 2008 at 11:52 AM, Juanjo Cuadrado [EMAIL PROTECTED] wrote: uuummm... yes... but.. how? have you documentation

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 (display:property..) but... nothing. And another thing more... how to do for

[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 action name=addNuevaSolicitud class=es.mec.adesi.ctl.actions.solicitudes.TestAction result/pages/opciones.jsp/result /action The action class

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

2008-10-14 Thread Juanjo Cuadrado
=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 too I have tried it :( Are you extending you package from struts-default? Regards -- Lukasz http://www.lenart.org.pl

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. This is the code in my struts.xml action name=addNuevaSolicitud

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 the Form bean into the request??? What is the label

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... I think that the best way to manage it is to put a simple bean

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 (html:form action=.. html:submit /html: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

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

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'm using this feature but it only

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

Re: Dynamic links

2006-10-31 Thread Juanjo Cuadrado
10 de 2006 a las 16:48, Juanjo Cuadrado escribió: 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

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

Tags nested

2006-10-27 Thread Juanjo Cuadrado
Hi, Can`t I use this? html:link action=bean:write name='dataQueries' property='action' / bean:write name=dataQueries property=name / /html:link

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)? action path=/iRx/Admin/iRxAdminPrescriberView attribute=AdminPrescriberForm scope=request * name=AdminPrescriberForm*

Re: validation - form set

2006-09-19 Thread Juanjo Cuadrado
Hi, the problem is the sequence of tags you have to put global before fromset 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

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