Re: [OT] html:options /

2002-10-24 Thread ruben
Does wood sink in the water?

Rúben
- Original Message -
From: Galbreath, Mark [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Thursday, October 24, 2002 12:58 PM
Subject: RE: [OT] html:options /


 Now, how can we be certain she's made of wood?

 -Original Message-
 From: Rúben Carvalho [mailto:ruben.carvalho;inesc.pt]
 Sent: Thursday, October 24, 2002 7:51 AM

 is she made of wood?

 Burn her! Burn her!

 Rúben

 - Original Message -
 From: Galbreath, Mark [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]

  Now, how can we tell if she's really a witch?
 
  -Original Message-
  From: Andrew Hill [mailto:andrew.david.hill;gridnode.com]
  Sent: Thursday, October 24, 2002 7:46 AM
 
  Burn her anyway!
 
  -Original Message-
  From: Galbreath, Mark [mailto:Galbreath;tessco.com]
  Sent: Thursday, October 24, 2002 19:46
 
  I got betta
 
  -Original Message-
  From: Andrew Hill [mailto:andrew.david.hill;gridnode.com]
  Sent: Thursday, October 24, 2002 7:39 AM
 
  a newt?
 
  -Original Message-
  From: Galbreath, Mark [mailto:Galbreath;tessco.com]
  Sent: Thursday, October 24, 2002 19:33
 
  She turned me into a newt!
 
  -Original Message-
  From: Andrew Hill [mailto:andrew.david.hill;gridnode.com]
  Sent: Thursday, October 24, 2002 7:12 AM
 
  ..ng() values witch is not very us..
 
  A witch!
  burn her!
  burn her!
 
  -Original Message-
  From: Roland Carlsson [mailto:roland.c;swetravel.se]
  Sent: Thursday, October 24, 2002 19:05
 
  Hello!
  I'm trying to use html:options/ but the only thing I get get into the
 list
  are Object.toString() values witch is not very useful for the user.
 
  --
  To unsubscribe, e-mail:
  mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
  mailto:struts-user-help;jakarta.apache.org
 
 
  --
  To unsubscribe, e-mail:
  mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
  mailto:struts-user-help;jakarta.apache.org
 
  --
  To unsubscribe, e-mail:
  mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
  mailto:struts-user-help;jakarta.apache.org
 
 
  --
  To unsubscribe, e-mail:
  mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
  mailto:struts-user-help;jakarta.apache.org
 
  --
  To unsubscribe, e-mail:
 mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
 mailto:struts-user-help;jakarta.apache.org
 



 --
 To unsubscribe, e-mail:
 mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
 mailto:struts-user-help;jakarta.apache.org


 --
 To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org



--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Re: [OT] html:options /

2002-10-24 Thread ruben
AH Ha, can't we make bridges out of stones too?

Rúben
- Original Message -
From: Galbreath, Mark [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Thursday, October 24, 2002 12:58 PM
Subject: RE: [OT] html:options /


 Now, how can we be certain she's made of wood?

 -Original Message-
 From: Rúben Carvalho [mailto:ruben.carvalho;inesc.pt]
 Sent: Thursday, October 24, 2002 7:51 AM

 is she made of wood?

 Burn her! Burn her!

 Rúben

 - Original Message -
 From: Galbreath, Mark [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]

  Now, how can we tell if she's really a witch?
 
  -Original Message-
  From: Andrew Hill [mailto:andrew.david.hill;gridnode.com]
  Sent: Thursday, October 24, 2002 7:46 AM
 
  Burn her anyway!
 
  -Original Message-
  From: Galbreath, Mark [mailto:Galbreath;tessco.com]
  Sent: Thursday, October 24, 2002 19:46
 
  I got betta
 
  -Original Message-
  From: Andrew Hill [mailto:andrew.david.hill;gridnode.com]
  Sent: Thursday, October 24, 2002 7:39 AM
 
  a newt?
 
  -Original Message-
  From: Galbreath, Mark [mailto:Galbreath;tessco.com]
  Sent: Thursday, October 24, 2002 19:33
 
  She turned me into a newt!
 
  -Original Message-
  From: Andrew Hill [mailto:andrew.david.hill;gridnode.com]
  Sent: Thursday, October 24, 2002 7:12 AM
 
  ..ng() values witch is not very us..
 
  A witch!
  burn her!
  burn her!
 
  -Original Message-
  From: Roland Carlsson [mailto:roland.c;swetravel.se]
  Sent: Thursday, October 24, 2002 19:05
 
  Hello!
  I'm trying to use html:options/ but the only thing I get get into the
 list
  are Object.toString() values witch is not very useful for the user.
 
  --
  To unsubscribe, e-mail:
  mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
  mailto:struts-user-help;jakarta.apache.org
 
 
  --
  To unsubscribe, e-mail:
  mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
  mailto:struts-user-help;jakarta.apache.org
 
  --
  To unsubscribe, e-mail:
  mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
  mailto:struts-user-help;jakarta.apache.org
 
 
  --
  To unsubscribe, e-mail:
  mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
  mailto:struts-user-help;jakarta.apache.org
 
  --
  To unsubscribe, e-mail:
 mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
 mailto:struts-user-help;jakarta.apache.org
 



 --
 To unsubscribe, e-mail:
 mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
 mailto:struts-user-help;jakarta.apache.org


 --
 To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org



--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Re: [OT] html:options /

2002-10-24 Thread ruben
But, what else floats in the water?

King Arthur's turn

Rúben
- Original Message -
From: Andrew Hill [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, October 24, 2002 12:54 PM
Subject: RE: [OT] html:options /


 We burn witches so witches must be made of wood. So if shes made of wood
 then shes a witch!

 -Original Message-
 From: Galbreath, Mark [mailto:Galbreath;tessco.com]
 Sent: Thursday, October 24, 2002 19:50
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] html:options /


 Now, how can we tell if she's really a witch?

 -Original Message-
 From: Andrew Hill [mailto:andrew.david.hill;gridnode.com]
 Sent: Thursday, October 24, 2002 7:46 AM

 Burn her anyway!

 -Original Message-
 From: Galbreath, Mark [mailto:Galbreath;tessco.com]
 Sent: Thursday, October 24, 2002 19:46

 I got betta

 -Original Message-
 From: Andrew Hill [mailto:andrew.david.hill;gridnode.com]
 Sent: Thursday, October 24, 2002 7:39 AM

 a newt?

 -Original Message-
 From: Galbreath, Mark [mailto:Galbreath;tessco.com]
 Sent: Thursday, October 24, 2002 19:33

 She turned me into a newt!

 -Original Message-
 From: Andrew Hill [mailto:andrew.david.hill;gridnode.com]
 Sent: Thursday, October 24, 2002 7:12 AM

 ..ng() values witch is not very us..

 A witch!
 burn her!
 burn her!

 -Original Message-
 From: Roland Carlsson [mailto:roland.c;swetravel.se]
 Sent: Thursday, October 24, 2002 19:05

 Hello!
 I'm trying to use html:options/ but the only thing I get get into the
list
 are Object.toString() values witch is not very useful for the user.

 --
 To unsubscribe, e-mail:
 mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
 mailto:struts-user-help;jakarta.apache.org


 --
 To unsubscribe, e-mail:
 mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
 mailto:struts-user-help;jakarta.apache.org

 --
 To unsubscribe, e-mail:
 mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
 mailto:struts-user-help;jakarta.apache.org


 --
 To unsubscribe, e-mail:
 mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
 mailto:struts-user-help;jakarta.apache.org

 --
 To unsubscribe, e-mail:
 mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
 mailto:struts-user-help;jakarta.apache.org


 --
 To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org



--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Re: [OT] html:options /

2002-10-24 Thread ruben
If the weigh is the same,

SHE'S A WITCH

By the way, did you dress her up like this?

Rúben
- Original Message -
From: Galbreath, Mark [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Thursday, October 24, 2002 1:19 PM
Subject: RE: [OT] html:options /


 So if we weigh a duck and the witch, what can we deduce?

 -Original Message-
 From: Marcus Andersson [mailto:marcus.andersson;active-tv.com]
 Sent: Thursday, October 24, 2002 8:13 AM

  A duck!

 -Ursprungligt meddelande-
 Från: ruben
 Till: Struts Users Mailing List; [EMAIL PROTECTED]
 But, what else floats in the water?

 King Arthur's turn

 Rúben
 - Original Message -
 From: Andrew Hill [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Thursday, October 24, 2002 12:54 PM
 Subject: RE: [OT] html:options /


  We burn witches so witches must be made of wood. So if shes made of
 wood
  then shes a witch!
 
  -Original Message-
  From: Galbreath, Mark [mailto:Galbreath;tessco.com]
  Sent: Thursday, October 24, 2002 19:50
  To: 'Struts Users Mailing List'
  Subject: RE: [OT] html:options /
 
 
  Now, how can we tell if she's really a witch?
 
  -Original Message-
  From: Andrew Hill [mailto:andrew.david.hill;gridnode.com]
  Sent: Thursday, October 24, 2002 7:46 AM
 
  Burn her anyway!
 
  -Original Message-
  From: Galbreath, Mark [mailto:Galbreath;tessco.com]
  Sent: Thursday, October 24, 2002 19:46
 
  I got betta
 
  -Original Message-
  From: Andrew Hill [mailto:andrew.david.hill;gridnode.com]
  Sent: Thursday, October 24, 2002 7:39 AM
 
  a newt?
 
  -Original Message-
  From: Galbreath, Mark [mailto:Galbreath;tessco.com]
  Sent: Thursday, October 24, 2002 19:33
 
  She turned me into a newt!
 
  -Original Message-
  From: Andrew Hill [mailto:andrew.david.hill;gridnode.com]
  Sent: Thursday, October 24, 2002 7:12 AM
 
  ..ng() values witch is not very us..
 
  A witch!
  burn her!
  burn her!
 
  -Original Message-
  From: Roland Carlsson [mailto:roland.c;swetravel.se]
  Sent: Thursday, October 24, 2002 19:05
 
  Hello!
  I'm trying to use html:options/ but the only thing I get get into
 the
 list
  are Object.toString() values witch is not very useful for the user.
 
  --
  To unsubscribe, e-mail:
  mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
  mailto:struts-user-help;jakarta.apache.org
 
 
  --
  To unsubscribe, e-mail:
  mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
  mailto:struts-user-help;jakarta.apache.org
 
  --
  To unsubscribe, e-mail:
  mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
  mailto:struts-user-help;jakarta.apache.org
 
 
  --
  To unsubscribe, e-mail:
  mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
  mailto:struts-user-help;jakarta.apache.org
 
  --
  To unsubscribe, e-mail:
  mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
  mailto:struts-user-help;jakarta.apache.org
 
 
  --
  To unsubscribe, e-mail:
 mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
 mailto:struts-user-help;jakarta.apache.org
 


 --
 To unsubscribe, e-mail:
 mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
 mailto:struts-user-help;jakarta.apache.org

 --
 To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org



--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




which is better, use a display for paginating or ...

2003-05-29 Thread ruben
Well, this is my question, what do you think is better for do the
pagination, a display tag or maybe to call the database in all the
access to get the data 10 by 10?
Thanks


[OT] Components and package

2003-06-04 Thread ruben
Hi everybody, i'm doing a design documentation of an application based
on struts and I want to know, if someone can help me, which elements of
the framework are components (like EJB are components of the model), and
which elements are package inside the framework
Thanks a lot and best regards.


RE: [OT] Components and package

2003-06-05 Thread ruben
Well, i think that components are an interface linking with an
implementation, and I access the component through the interface. I
think package it's more a group of components or a group of classes that
have some similar characteristic. I have some dudes, but I think that
should be some similar of that  
What do you think could be components of the framework struts 

-Mensaje original-
De: Andrew Hill [mailto:[EMAIL PROTECTED] 
Enviado el: miércoles, 04 de junio de 2003 13:44
Para: Struts Users Mailing List
Asunto: RE: [OT] Components and package

u... guess I slept through that lecture back in comsci 101
can you define what you mean by 'component' and 'package', as I fear my
understanding of those terms is subtly different.

-Original Message-
From: ruben [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 4 June 2003 19:27
To: [EMAIL PROTECTED]
Subject: [OT] Components and package


Hi everybody, i'm doing a design documentation of an application based
on struts and I want to know, if someone can help me, which elements of
the framework are components (like EJB are components of the model), and
which elements are package inside the framework
Thanks a lot and best regards.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



newbie q why this doesn`t work?

2003-06-19 Thread ruben
Hi everybody, i’ve got the next problem.
I’ve got a 404 when I click on the link that I show below. The action
retrieve the data from model(and it is called), but when redirect it
doesn’t show the jsp.
 
Persistencia.jsp is on the root , with inicio.jsp
 
This is my struts-config.xml
…..
action
   input=/Persistencia.jsp name=persistenciaForm
   parameter=method path=/Persistencia scope=request
   type=struts.persistencia.PersistenciaAction
validate=false   
   set-property
property=inicioResults value=true/
forward name=mostrado
path=/Persistencia.jsp redirect=true/
   /action
 
and the jsp that call the action is …
…
html:link style=color:blue; action=/Persistencia.do?method=muestra
aqui /html:link
 
…
 
the action class is simple 
 
public ActionForward muestra(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response) throws
IOException,ServletException
  {
 
  //En este método encapsulamos la funcionalidad del controlador
  
  String target=new String(mostrado);
  
  
  HttpSession s = request.getSession(true);
  
  IPedirHabitaciones pedir =
(IPedirHabitaciones)FactoriaEJB.createEJB(PedirHabitacionesBean);
  s.setAttribute(habitaciones,pedir.habitacionesLibres());
  
  
  
System.out.println(mapping.getPath());
return mapping.findForward(target);  
  }
 
thanks and best regards


RE: newbie q why this doesn`t work?

2003-06-19 Thread ruben
Thanks Mike,

But i think that it find it because it do the work of the method
muestra, I mean, it call the EJB, and do the work of this DispatchAction
method, it redirect to a 404 for target mostrado.


-Mensaje original-
De: Mike Jasnowski [mailto:[EMAIL PROTECTED] 
Enviado el: jueves, 19 de junio de 2003 20:20
Para: Struts Users Mailing List
Asunto: RE: newbie q why this doesn`t work?

Are you by chance using a dispatch action? From appearances you might
be.
In the case of DispatchActions when it can't find the method you named,
it
calls a supplied method named unspecified(). The default
implementation of
this method returns a 404 I believe.

-Original Message-
From: ruben [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 2:17 PM
To: 'Struts Users Mailing List'
Subject: newbie q why this doesn`t work?


Hi everybody, i’ve got the next problem.
I’ve got a 404 when I click on the link that I show below. The action
retrieve the data from model(and it is called), but when redirect it
doesn’t show the jsp.

Persistencia.jsp is on the root , with inicio.jsp

This is my struts-config.xml
…..
action
   input=/Persistencia.jsp name=persistenciaForm
   parameter=method path=/Persistencia scope=request
   type=struts.persistencia.PersistenciaAction
validate=false
   set-property
property=inicioResults value=true/
forward name=mostrado
path=/Persistencia.jsp redirect=true/
   /action

and the jsp that call the action is …
…
html:link style=color:blue; action=/Persistencia.do?method=muestra
aqui /html:link

…

the action class is simple

public ActionForward muestra(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response) throws
IOException,ServletException
  {

  //En este método encapsulamos la funcionalidad del controlador

  String target=new String(mostrado);


  HttpSession s = request.getSession(true);

  IPedirHabitaciones pedir =
(IPedirHabitaciones)FactoriaEJB.createEJB(PedirHabitacionesBean);
  s.setAttribute(habitaciones,pedir.habitacionesLibres());



System.out.println(mapping.getPath());
return mapping.findForward(target);
  }

thanks and best regards


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:rewrite action problem

2004-03-24 Thread ruben
It works well, thanks.

try page=/SomeAction.do

On 24 Mar 2004, at 17:50, Ruben Pardo wrote:

i've got the next tag
html:rewrite
action=/SomeAction?prefix=page=/SomePage
and in the actionConfig  action path=/SomeAction
type=org.apache.type=org.apache.struts.actions.SwitchAction
/action


but i always get an error saying that attribute action
does not defined in the tld?
what could it be?
thanks in advance.
___
Yahoo! Messenger - Nueva versión GRATIS
Super Webcam, voz, caritas animadas, y más...
http://messenger.yahoo.es
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


html:rewrite action problem

2004-03-24 Thread ruben
i've got the next tag
html:rewrite action=/SomeAction?prefix=page=/SomePage
and in the actionConfig  
action path=/SomeAction 
type=org.apache.type=org.apache.struts.actions.SwitchAction /action

but i always get an error saying that attribute action does not defined 
in the tld?
what could it be?
thanks in advance.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: is it possible to define a validation that runs only server side or client side (validation.xml )

2004-03-25 Thread ruben
Seyhan BASMACI (Internet Yazilimlari Yetkilisi) wrote:

I have a LoginForm form extends ValidatorForm and I want to decide 
a validaton runs only on the server or client side, (or both )
is there any way to do this_? 

form name=LoginForm
 field property=userno depends=required
   arg0 key=caption.wusernono/
 /field
/form 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

hi,
if you want to call th javascript validation you only have to call the 
function
validateLoginForm(form); if you don't call this function, client side 
validation is not called.
the case of server side validation is more complex, if you only want to 
call the client side validation and not the server side, you have to 
overwrite the method validate of the ActionForm, and do nothing on it, 
returning null.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


problem with module

2004-03-25 Thread ruben
hi everybody, excuse me for my english,
that is the scenario,
i've got 2 modules, default and mod1, i call from mod1 an action that  
load a page with  2 iframes, that load a page resource, these resources 
are in the /page context, struts add /mod1 to the context, and i have to 
use a SwitchAction. My problem is when load a form that is in the page 
resource,i've got a ServletException: Cannot retrieve mapping for action 
/GestionUbicacion,
i try to prepend /mod1 but i've got the same error, does anybody know 
the way to slove this?
thanks a lot.

  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: problem with module

2004-03-25 Thread ruben
Daniel wrote:

If someone know the solution help us..

- Original Message - 
From: Daniel [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 11:01 AM
Subject: Re: problem with module

 

Hi I have the the same problem, but in other situation, I using popups
windows of other modules, if you find the solution tell me , if I find the
solution I tell you...
- Original Message - 
From: ruben [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 6:19 AM
Subject: problem with module

   

hi everybody, excuse me for my english,
that is the scenario,
i've got 2 modules, default and mod1, i call from mod1 an action that
load a page with  2 iframes, that load a page resource, these resources
are in the /page context, struts add /mod1 to the context, and i have to
use a SwitchAction. My problem is when load a form that is in the page
resource,i've got a ServletException: Cannot retrieve mapping for action
/GestionUbicacion,
i try to prepend /mod1 but i've got the same error, does anybody know
the way to slove this?
thanks a lot.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

hi, i solve this. I do the next thing that i found in the archives ...

http://www.mail-archive.com/[EMAIL PROTECTED]/msg96007.html

i change the module before call the page, and it seems to work in this 
scenario,





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


html inside an action

2004-03-25 Thread ruben
hi!
how can i get the output generate in a .jsp inside an action like it was 
a resource that i can process(a String or something else)???
thanks a lot in advance.

PD: I need to call jasper compiler or something similar? what can i do 
that? thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: html inside an action

2004-03-25 Thread ruben
Qureshi, Affan wrote:

What part of JSP do you want to generate? Is it Java code in the JSP that you want to generate or static HTML/JavaScript? You might want to look at Tag Libraries as well.

-Original Message-
From: ruben [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 10:00 AM
To: Struts Users Mailing List
Subject: html inside an action
hi!
how can i get the output generate in a .jsp inside an action like it was 
a resource that i can process(a String or something else)???
thanks a lot in advance.

PD: I need to call jasper compiler or something similar? what can i do 
that? thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

hi, thanks for the response, i want the code generated 
(HTML/javascript), it's like redirect the output to a resource that i 
can process in the action instead of send to the navigator,
thanks a lot

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: html inside an action

2004-03-25 Thread ruben
hi
These are my requirements, i have to convert objects to html, in my 
action and get this html in a String, i thought that the jsp is a good 
way to do this,
I want the code that   jsp generate (that is sent to the browser) on my 
action , is it possible? thanks a lot ,
Regards.

Qureshi, Affan wrote:

So why cant you use simple JSTL or struts-EL tags to do it? Ideally you shouldn't be doing any client-side stuff in your Actions. 

A cleaner approach would be to use Custom Tags to have the HTML generation code and you can call them from your JSPs. (Remember that JSPs are not sent to the browser, it is the code they generate that is sent to the client browser). 

Or maybe I dont understand your requirements.

Regards.

-Original Message-
From: ruben [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 10:19 AM
To: Struts Users Mailing List
Subject: Re: html inside an action
Qureshi, Affan wrote:

 

What part of JSP do you want to generate? Is it Java code in the JSP that you want to generate or static HTML/JavaScript? You might want to look at Tag Libraries as well.

-Original Message-
From: ruben [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 10:00 AM
To: Struts Users Mailing List
Subject: html inside an action
hi!
how can i get the output generate in a .jsp inside an action like it was 
a resource that i can process(a String or something else)???
thanks a lot in advance.

PD: I need to call jasper compiler or something similar? what can i do 
that? thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


   

hi, thanks for the response, i want the code generated 
(HTML/javascript), it's like redirect the output to a resource that i 
can process in the action instead of send to the navigator,
thanks a lot

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: html inside an action

2004-03-25 Thread ruben
hi
Those are my requirements, i have to convert objects to html, in my 
action and get this html in a String, i thought that the jsp is a good 
way to do this,
I want the code that   jsp generate (that is sent to the browser) on my 
action , is it possible? thanks a lot ,
Regards.

Qureshi, Affan wrote:

So why cant you use simple JSTL or struts-EL tags to do it? Ideally you 
shouldn't be doing any client-side stuff in your Actions.
A cleaner approach would be to use Custom Tags to have the HTML 
generation code and you can call them from your JSPs. (Remember that 
JSPs are not sent to the browser, it is the code they generate that is 
sent to the client browser).
Or maybe I dont understand your requirements.

Regards.

-Original Message-
From: ruben [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 10:19 AM
To: Struts Users Mailing List
Subject: Re: html inside an action
Qureshi, Affan wrote:



What part of JSP do you want to generate? Is it Java code in the JSP 
that you want to generate or static HTML/JavaScript? You might want to 
look at Tag Libraries as well.

-Original Message-
From: ruben [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 10:00 AM
To: Struts Users Mailing List
Subject: html inside an action
hi!
how can i get the output generate in a .jsp inside an action like it 
was a resource that i can process(a String or something else)???
thanks a lot in advance.

PD: I need to call jasper compiler or something similar? what can i do 
that? thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  
hi, thanks for the response, i want the code generated 
(HTML/javascript), it's like redirect the output to a resource that i 
can process in the action instead of send to the navigator,
thanks a lot

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Res: html inside an action

2004-03-25 Thread ruben
hi
Those are my requirements, i have to convert objects to html, in my 
action and get this html in a String, i thought that the jsp is a good 
way to do this,
I want the code that   jsp generate (that is sent to the browser) on my 
action , is it possible? thanks a lot ,
Regards.



Qureshi, Affan wrote:

So why cant you use simple JSTL or struts-EL tags to do it? Ideally 
you shouldn't be doing any client-side stuff in your Actions.
A cleaner approach would be to use Custom Tags to have the HTML 
generation code and you can call them from your JSPs. (Remember that 
JSPs are not sent to the browser, it is the code they generate that is 
sent to the client browser).
Or maybe I dont understand your requirements.

Regards.

-Original Message-
From: ruben [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 10:19 AM
To: Struts Users Mailing List
Subject: Re: html inside an action
Qureshi, Affan wrote:



What part of JSP do you want to generate? Is it Java code in the JSP 
that you want to generate or static HTML/JavaScript? You might want 
to look at Tag Libraries as well.

-Original Message-
From: ruben [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 10:00 AM
To: Struts Users Mailing List
Subject: html inside an action
hi!
how can i get the output generate in a .jsp inside an action like it 
was a resource that i can process(a String or something else)???
thanks a lot in advance.

PD: I need to call jasper compiler or something similar? what can i 
do that? thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


hi, thanks for the response, i want the code generated 
(HTML/javascript), it's like redirect the output to a resource that i 
can process in the action instead of send to the navigator,
thanks a lot

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: html inside an action

2004-03-26 Thread ruben
Hi,
thanks everybody for the responses, they help us a lot to make a 
decision, i think that it could be better solution trying to do my 
requirements with tags , but i need that an import could load a resource 
dinamycally, something like these 

c:import url=${sessionScope.SomeVariable} /

and SomeVariable has a String with the name of the resource,
is this possible? i try to do but it doesn't work ...
thanks a lot,
Brendan Richards wrote:

There's also jakarkta commons-httpclient

http://jakarta.apache.org/commons/httpclient/

-Original Message-
From: Qureshi, Affan [mailto:[EMAIL PROTECTED] 
Sent: 25 March 2004 17:04
To: Struts Users Mailing List
Subject: RE: html inside an action

HttpUnit is also a neat tool which might help. Have a JSP generate the
HTML and access that using HttpUnit (or a simple URLConnection/Socket
for that matter). And you can get the generated HTML in your Action. 

I hope I understand you this time.

-Original Message-
From: ruben [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 10:54 AM
To: Struts Users Mailing List
Subject: Re: html inside an action
hi
Those are my requirements, i have to convert objects to html, in my 
action and get this html in a String, i thought that the jsp is a good 
way to do this,
I want the code that   jsp generate (that is sent to the browser) on my 
action , is it possible? thanks a lot ,
Regards.

Qureshi, Affan wrote:

So why cant you use simple JSTL or struts-EL tags to do it? Ideally you 
shouldn't be doing any client-side stuff in your Actions.
A cleaner approach would be to use Custom Tags to have the HTML 
generation code and you can call them from your JSPs. (Remember that 
JSPs are not sent to the browser, it is the code they generate that is 
sent to the client browser).
Or maybe I dont understand your requirements.

Regards.

-Original Message-
From: ruben [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 10:19 AM
To: Struts Users Mailing List
Subject: Re: html inside an action
Qureshi, Affan wrote:



 

What part of JSP do you want to generate? Is it Java code in the JSP 
that you want to generate or static HTML/JavaScript? You might want to
   

 

look at Tag Libraries as well.

-Original Message-
From: ruben [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 10:00 AM
To: Struts Users Mailing List
Subject: html inside an action
hi!
how can i get the output generate in a .jsp inside an action like it 
was a resource that i can process(a String or something else)???
thanks a lot in advance.

PD: I need to call jasper compiler or something similar? what can i do
   

 

that? thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 
   

hi, thanks for the response, i want the code generated 
(HTML/javascript), it's like redirect the output to a resource that i 
can process in the action instead of send to the navigator,
thanks a lot

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Struts-el book

2003-03-30 Thread Ruben Pardo

Hi everybody!
 Is there any book that explain in detail struts-el and JSTL? I'm searching in Struts 
in action by ted husted, Programming Jakarta Struts by chuck cavaness, and Mastering 
Jakarta struts by james goodwill, but I  don't find anything.
Any suggestion?
 


-
Yahoo! Messenger
Nueva versioacute;n: Super Webcam, voz, caritas animadas, y maacute;s #161;Gratis!

Struts doesn't love me

2003-03-31 Thread Ruben Pardo

Hi everybody!

  I've got the next problem. I don't know how I can pass a business object to a logic 
iterate tag when it's call from an action,  

in struts-config.xml

action path=/Proyectos

validate=true

type=com.profesor.proyectos.ProyectosAction  

scope=request

name=proyectosForm 

parameter=method

set-property property=inicioResults value=true /

  forward name=exito path=/muestraProyectos.jsp redirect=true / 

 /action

In my Dispatch action i've got 

public ActionForward mostrar(ActionMapping mapping,

ActionForm form,

HttpServletRequest request,

HttpServletResponse response) throws IOException,ServletException

{

String target=new String(exito);

BusinessObject = getProyectos();

???

return mapping.findForward(target); 

}

And in my muestraProyectos.jsp... and I don't know 

   logic:iterate id=muestra name= parameter= 

  bean:write name=muestra /

  /logic:iterate

I test almost everything and i search in documentation but i don't know what i have to 
write that fit it properly.

 

Thanks,




-
Yahoo! Messenger
Nueva versioacute;n: Super Webcam, voz, caritas animadas, y maacute;s #161;Gratis!

Re: New to Struts

2003-04-02 Thread Ruben Pardo

But ... why are dynaforms  better than BaseMap Form's? i'm using BaseMap Form and i 
think that is a good choice, and if i have to do something in the reset method, i only 
inherit from the BaseMap, in dynaform you can't do a specific reset am i wrong?
Ruben.


-
Yahoo! Messenger
Nueva versioacute;n: Super Webcam, voz, caritas animadas, y maacute;s #161;Gratis!

updates and dispatcher

2003-04-03 Thread Ruben Pardo

Hi!
That is the problem. I've got a alta.jsp and edita.jsp, the only difference between 
alta.jsp and edita.jsp is the path of the Dispatcher action, because i want the same 
action to be sent the form.
html:form action=/Proyectos?method=alta 
../html:form
and in edita.jsp html:form action=/Proyectos?method=edita
.../html:form
I would like to have only a form instead of two. Is there any way to do that?
thanks


-
Yahoo! Messenger
Nueva versioacute;n: Super Webcam, voz, caritas animadas, y maacute;s #161;Gratis!

One form, multiple JSPs, multiple validations

2003-09-15 Thread Ruben Carvalho
Good afternoon helpers,
 
I've started a new application using struts 1.1 and I'm having some problems with some 
new concepts.
 
I want to use XML form validation (DynaValidatorForm) using validator-rules.xml and my 
validaton.xml. Right now my application is working fine. Now I want to use different 
validation rules for the same form, accross multiple JSPs. For example:
 
- TestForm is a DynaValidatorForm
  String name
  String address
 
- test1.jsp
  I want to show one text box to fill the name property:
 
(...)
  html:text property=name /
(...)
 
- test2.jsp
  I want to show one text box to fill the address property:
 
(...)
  html:text property=address /
(...)
 
- struts-config.xml
(...)
form-beans
form-bean name=testForm type=org.apache.struts.validator.DynaValidatorForm
  form-property name=name type=java.lang.String/
  form-property name=address type=java.lang.String/
/form-bean
/form-beans
(...)
 
- validaton.xml
(...)
formset
form name=logonForm
field property=username depends=required
arg0   key=prompt.username/
/field
field property=address depends=required
arg0   key=prompt.address/
/field
/form
/formset
(...)
 
Now, I run http://localhost/app/test1.jsp and I fill in my name property. Then I 
want my app to validate only the name property. Then I forward to test2.jsp, fill 
the address property and now I want to validate only the address property. How can 
I do this? The problem is, what identifies a rule in validation.xml is the form name. 
I could define different names for my form in the struts-config.xml but imagine if I 
had 10 JSPs for each form.
 
Thanks in advance
 
Rben Carvalho
 
 
 
 
 


RE: One form, multiple JSPs, multiple validations

2003-09-15 Thread Ruben Carvalho
Thank you Matt and K.C. for being so helpful.
 
Sorry everybody for posting such a basic question. I'll try to open my eyes next time 
(and the userguide).
 
Ruben Carvalho
 
Come on now sugar / Bring it on bring it on yeah / Just remember me when / You're good 
to go / Come on now honey / Bring it on bring it on yeah / Just remember me when
We used to be friends / A long time ago / We used to be friends / A long time ago / We 
used to be friends / A long time ago / We used to be friends 
Yeahh
The Dandy Warhols

-Mensagem original- 
De: Sgarlata Matt [mailto:[EMAIL PROTECTED] 
Enviada: seg 15-09-2003 20:43 
Para: Struts Users Mailing List 
Cc: 
Assunto: Re: One form, multiple JSPs, multiple validations



Check out

http://jakarta.apache.org/struts/userGuide/dev_validator.html

Under Pluggable Validators there is a section called Multi Page Forms.
I've not done this before, but I think this wizard-like functionality you
are trying to build is built directly into Struts and the Validator.

Matt
- Original Message -
From: Ruben Carvalho [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 15, 2003 12:19 PM
Subject: One form, multiple JSPs, multiple validations


 Good afternoon helpers,

 I've started a new application using struts 1.1 and I'm having some
problems with some new concepts.

 I want to use XML form validation (DynaValidatorForm) using
validator-rules.xml and my validaton.xml. Right now my application is
working fine. Now I want to use different validation rules for the same
form, accross multiple JSPs. For example:

 - TestForm is a DynaValidatorForm
   String name
   String address

 - test1.jsp
   I want to show one text box to fill the name property:

 (...)
   html:text property=name /
 (...)

 - test2.jsp
   I want to show one text box to fill the address property:

 (...)
   html:text property=address /
 (...)

 - struts-config.xml
 (...)
 form-beans
 form-bean name=testForm
type=org.apache.struts.validator.DynaValidatorForm
   form-property name=name type=java.lang.String/
   form-property name=address type=java.lang.String/
 /form-bean
 /form-beans
 (...)

 - validaton.xml
 (...)
 formset
 form name=logonForm
 field property=username depends=required
 arg0   key=prompt.username/
 /field
 field property=address depends=required
 arg0   key=prompt.address/
 /field
 /form
 /formset
 (...)

 Now, I run http://localhost/app/test1.jsp and I fill in my name
property. Then I want my app to validate only the name property. Then I
forward to test2.jsp, fill the address property and now I want to validate
only the address property. How can I do this? The problem is, what
identifies a rule in validation.xml is the form name. I could define
different names for my form in the struts-config.xml but imagine if I had 10
JSPs for each form.

 Thanks in advance

 Rben Carvalho








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Future releases

2003-09-16 Thread Ruben Carvalho
Marco,
 
I think it's a bad practice to ask for new releases of open source software but who am 
I to say that, it's just an opinion.
 
About the books, here's a helpful link:
 
http://jakarta.apache.org/struts/resources/books.html
 
You'll see that there are many books about Struts already and we're still on version 
1.1
 
Rben Carvalho
 

-Original Message- 
From: Marco Tedone [mailto:[EMAIL PROTECTED] 
Sent: Tue 9/16/2003 10:19 AM 
To: Struts-user-list 
Cc: 
Subject: Future releases



Hi,

is there planned any future release of Struts (i.e. Struts 1.2...); my
question is intended to know if a book on Struts, JSTL and Struts-el will be
written somewhen (hopefully not too late...).

Thanks,

Marco




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: DynaValidatorForm and Multi-page validation

2003-09-16 Thread Ruben Carvalho
You don't have to add the page property to your form since both ValidatorForm and 
DynaValidatorForm have teh attribute protected int page. What you have to do, and 
that's where I have my problem, is to put a value in it. I'll send my question in a 
different mail.
 
Ruben Carvalho
 

-Mensagem original- 
De: Natalie D Rassmann [mailto:[EMAIL PROTECTED] 
Enviada: ter 16-09-2003 12:27 
Para: Struts Users Mailing List 
Cc: 
Assunto: Re: DynaValidatorForm and Multi-page validation



When I type to add the page property as a java.lang.Integer, I get a null
pointer exception in the struts validator.  I am using Struts 1.1 Final
Release.  What were you using?

Natalie

Erez Efrati wrote:

 I use it in my application and I added to my DynaValidationForm
 configuration a 'page' property of type java.lang.Integer, and it works.

 Erez

 -Original Message-
 From: Natalie D Rassmann [mailto:[EMAIL PROTECTED]
 Sent: Monday, September 15, 2003 3:11 PM
 To: Struts Users Mailing List
 Subject: DynaValidatorForm and Multi-page validation

 Hi -

 I am having trouble with my DynaValidatorForm and Multi-page
 validation.  It does not seem to utilize the page property.
 I tried putting in a page property but I get Struts errors.  When I add
 the page property to the struts-config file for that form, and I add the
 page property as an integer, I get a Null pointer exception.  When I put
 the page property as a string, I get a ClassCastException.  No matter
 what I do, I can't get the page validation to work.  Does anyone have a
 clue?  Can anyone help me??

 Thanks in advance,

 Natalie

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Multiple validation, one form

2003-09-16 Thread Ruben Carvalho
Hi again,
 
I'm getting a bit confused with the XML validation system. I have one form 
(DynaValidatorForm), 3 JSPs followed by 3 actions that do nothing. My Form has 3 
fields:
 
name, address and phone, all String
 
Now, I have 3 different JSPs, test1, test2 and test3.jsp, each of them followed by an 
Action like this:
test1.jsp -- Test1Action -- test2.jsp -- Test2Action -- test3.jsp -- Test3Action
 
All of the JSP have the same code. I want to validate: the first field after 
submitting the first page, the second field after submitting the second page and the 
3rd field after submitting the third page. My JSPs look like this:

(...)
html:hidden property=page value=MY_PROBLEM /
TABLE border=0
 TBODY
  TR
   THname/TH
   TDhtml:text property=name //TD
  /TR
  TR
   THaddress/TH
   TDhtml:text property=address //TD
  /TR
  TR
   THphone/TH
   TDhtml:text property=phone //TD
  /TR
  TR
   TDhtml:submit property=submit value=Submit //TD
   TDhtml:reset //TD
  /TR
 /TBODY
/TABLE
(...)

My validation.xml looks like this:
(...)
form name=testeForm
 field property=name depends=required page=0
  arg0 key=prompt.name /
 /field
 field property=address depends=required page=1
  arg0 key=prompt.address /
 /field
 field property=phone depends=required page=2
  arg0 key=prompt.phone /
 /field
/form
(...)
 
Which value should I write in my page property inside the JSPs?
 
if I put:
html:hidden property=page value=0 /
in my test1.jsp I get the error that Name is required. Great. But then I put
html:hidden property=page value=1 /
in my test2.jsp and when I submit I don't get any error. And I get the same when I 
submit the 3rd JSP.
 
Does anybody know how to use this page property correctly?
 
Thanks a lot
 
Rben Carvalho
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Multiple validation, one form

2003-09-17 Thread Ruben Carvalho
Sorry for sending this message again but I got no answer with the first one and I'm 
really getting crazy with it.
 
I'm getting a bit confused with the XML validation system. I have one form 
(DynaValidatorForm), 3 JSPs followed by 3 actions that do nothing. My Form has 3 
fields:
 
name, address and phone, all String
 
Now, I have 3 different JSPs, test1, test2 and test3.jsp, each of them followed by an 
Action like this:
test1.jsp -- Test1Action -- test2.jsp -- Test2Action -- test3.jsp -- Test3Action
 
All of the JSP have the same code. I want to validate: the first field after 
submitting the first page, the second field after submitting the second page and the 
3rd field after submitting the third page. My JSPs look like this:

(...)
html:hidden property=page value=MY_PROBLEM /
TABLE border=0
 TBODY
  TR
   THname/TH
   TDhtml:text property=name //TD
  /TR
  TR
   THaddress/TH
   TDhtml:text property=address //TD
  /TR
  TR
   THphone/TH
   TDhtml:text property=phone //TD
  /TR
  TR
   TDhtml:submit property=submit value=Submit //TD
   TDhtml:reset //TD
  /TR
 /TBODY
/TABLE
(...)

My validation.xml looks like this:
(...)
form name=testeForm
 field property=name depends=required page=0
  arg0 key=prompt.name /
 /field
 field property=address depends=required page=1
  arg0 key=prompt.address /
 /field
 field property=phone depends=required page=2
  arg0 key=prompt.phone /
 /field
/form
(...)
 
Which value should I write in my page property inside the JSPs?
 
if I put:
html:hidden property=page value=0 /
in my test1.jsp I get the error that Name is required. Great. But then I put
html:hidden property=page value=1 /
in my test2.jsp and when I submit I don't get any error. And I get the same when I 
submit the 3rd JSP.
 
Does anybody know how to use this page property correctly?
 
Thanks a lot
 
Rben Carvalho


Need some help

2003-09-17 Thread Ruben Carvalho
Did anyone work with Struts validation and the page attribute in the field tag? To 
validate different parts of the form?
 
I'm really stucked in a moment and I can't get out of it.
 
Thank you,
 
Rben Carvalho


RE: I webshpere Struts

2003-09-18 Thread Ruben Carvalho
I've just started developing a new project using Websphere IDE but the application 
will run on Weblogic. We're using the TestServer that comes with Websphere and we're 
having the same problem with the Database access, using entity beans. Eventhough the 
server has the JNDI names configured properly, I keep getting an exception saying that 
the JNDI name can't be found. I manage to call the session beans in my web module but 
no entity beans.
 
Is there anybody using this arquitecture?
 
Thanks
 
Rben Carvalho

-Mensagem original- 
De: Abhijeet Mahalkar [mailto:[EMAIL PROTECTED] 
Enviada: qui 18-09-2003 11:29 
Para: Struts Users Mailing List 
Cc: 
Assunto: I webshpere Struts 



Is there anybody working on struts -- websphere server architecture i have few 
queries regarding deploying the complete module using JSp-- structs -- sessionbeans 
--- entitybeans --- Database architecture it's not getting deployed properly...
can anyone guide me to get the proper link on this...

thanks
abhijeet


- Original Message -
From: Andrew Hill [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 2:56 PM
Subject: RE: calls each method twice , logging everthing twice?


I had a similar bug in IE6 where I had a submit button that invoked a js
method that did some stuff and then called form.submit(). In IE5 Id only
have one submission, but in 6 it would do the submission from my call to
submit() AND do the submit buttons submit as well.

-Original Message-
From: Raju, Saravanan [mailto:[EMAIL PROTECTED]
Sent: Thursday, 18 September 2003 16:09
To: Struts Users Mailing List
Subject: RE: calls each method twice , logging everthing twice?


please check that you are not submitting the form twice using java script or
so.

one in onSubmit handler and other progrmatically using form.submit();


 Thanks,
 --
 Saravanan Raju
 Sr.Analyst
 SYNTEL (India) Ltd.
 Chennai Development Centre
 Tel: +91-44-22301101 (Board) Extn : 202
 Fax: +91-44-22300369
 e-mail :  mailto:[EMAIL PROTECTED]
 Website:  http://www.syntelinc.com
 --



 -Original Message-
 From: Andrew Hill [SMTP:[EMAIL PROTECTED]
 Sent: Thursday, September 18, 2003 12:15 PM
 To: Struts Users Mailing List
 Subject: RE: calls each method twice , logging everthing twice?

 It looks as though the browser is sending two requests for the page.

 Not familiar with tiles so am not sure about the exception your getting
 though.

 -Original Message-
 From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi)
 [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 18 September 2003 14:26
 To: Struts Users Mailing List
 Subject: calls each method twice , logging everthing twice?


 hi,
 we are using jdeveloper as ide , and struts as framework ,,
 I dont know when it is started but in debug mode it calls each method
 twice
 (calls action class execute method twice ) and struts gives followig
 message
 after calling my first action class (loginAction)  ,,
 it seccessfull execute and fiinds mapping for the login,,
 but gives the following message while sending response to the client,
 is there anybody encountered with this problem ?

 here is the STRUTS log info, as you can see it does processActionForward
 twice

 [INFO] RequestProcessor - -Processing a 'POST' for path '/Login'
 [INFO] RequestProcessor - -Processing a 'POST' for path '/Login'
 processActionForward(/pages/bireysel/common/welcome.jsp, false)
 processActionForward(/pages/bireysel/common/welcome.jsp, false)


 ERROR on the browser:

 java.lang.NullPointerException
 org.apache.struts.tiles.ComponentDefinition
 org.apache.struts.tiles.xmlDefinition.FactorySet.getDefinition(java.lang.S
 tr
 ing, javax.servlet.ServletRequest, javax.servlet.ServletContext)
 FactorySet.java:156
 org.apache.struts.tiles.ComponentDefinition
 org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.getD
 ef
 inition(java.lang.String, javax.servlet.ServletRequest,
 javax.servlet.ServletContext)
 ComponentDefinitionsFactoryWrapper.java:56

RE: I webshpere Struts

2003-09-18 Thread Ruben Carvalho
I think everything is configured properly. When I ask for a JNDI name starting with 
java:comp/env/--- I always get that --- wasn't found. Can I ask you for a bit of your 
web.xml where you define an entity and a session bean and a bit of your ejb.xml with 
the same?
 
Thanks a lot.
 
Rben

-Mensagem original- 
De: Kazda Juraj [mailto:[EMAIL PROTECTED] 
Enviada: qui 18-09-2003 12:09 
Para: Struts Users Mailing List 
Cc: 
Assunto: RE: I webshpere Struts



I'm using this architecture and everything works... What kind of JNDI name it 
can't find? Bean or Datasource? Do you really have declared in web.xml and implemented 
corresponding interfaces (ie. local reference vs local interface)?

In case of local, are you using in your code java:comp/env namespace?

-juraj.




-Original Message-
From: Ruben Carvalho [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 12:48 PM
To: Struts Users Mailing List
Subject: RE: I webshpere Struts

I've just started developing a new project using Websphere IDE but the 
application will run on Weblogic. We're using the TestServer that comes with Websphere 
and we're having the same problem with the Database access, using entity beans. 
Eventhough the server has the JNDI names configured properly, I keep getting an 
exception saying that the JNDI name can't be found. I manage to call the session beans 
in my web module but no entity beans.

Is there anybody using this arquitecture?

Thanks

Rben Carvalho

-Mensagem original-
De: Abhijeet Mahalkar [mailto:[EMAIL PROTECTED]
Enviada: qui 18-09-2003 11:29
Para: Struts Users Mailing List
Cc:
Assunto: I webshpere Struts
   
   

Is there anybody working on struts -- websphere server architecture i 
have few queries regarding deploying the complete module using JSp-- structs -- 
sessionbeans --- entitybeans --- Database architecture it's not getting deployed 
properly...
can anyone guide me to get the proper link on this...
   
thanks
abhijeet
   
   
- Original Message -
From: Andrew Hill [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 2:56 PM
Subject: RE: calls each method twice , logging everthing twice?
   
   
I had a similar bug in IE6 where I had a submit button that invoked a 
js
method that did some stuff and then called form.submit(). In IE5 Id 
only
have one submission, but in 6 it would do the submission from my call 
to
submit() AND do the submit buttons submit as well.
   
-Original Message-
From: Raju, Saravanan [mailto:[EMAIL PROTECTED]
Sent: Thursday, 18 September 2003 16:09
To: Struts Users Mailing List
Subject: RE: calls each method twice , logging everthing twice?
   
   
please check that you are not submitting the form twice using java 
script or
so.
   
one in onSubmit handler and other progrmatically using form.submit();
   
   
 Thanks,
 --
 Saravanan Raju
 Sr.Analyst
 SYNTEL (India) Ltd.
 Chennai Development Centre
 Tel: +91-44-22301101 (Board) Extn : 202
 Fax: +91-44-22300369
 e-mail :  mailto:[EMAIL PROTECTED]
 Website:  http://www.syntelinc.com
 --



 -Original Message-
 From: Andrew Hill [SMTP:[EMAIL PROTECTED]
 Sent: Thursday, September 18, 2003 12:15 PM
 To: Struts Users Mailing List
 Subject: RE: calls each method twice , logging everthing twice?

 It looks as though the browser is sending two requests for the page.

 Not familiar with tiles so am not sure about the exception your 
getting
 though.

 -Original Message-
 From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi)
 [mailto:[EMAIL PROTECTED]
 Sent

RE: Need some help

2003-09-18 Thread Ruben Carvalho
Dear Natalie,
 
10 thank yous for your help. The problem was I wasn't calling the 
super.validate() method. You don't really need to set the page attribute inside your 
validate method. Your validate method has to look like this:
 
public ActionErrors validate(ActionMapping mapping,
   HttpServletRequest request) {

  return super.validate(mapping,request);
}
 
Now, inside every JSP you want to use with the form, you only have to set the property 
page:
html:hidden property=page value=0 
html:hidden property=page value=1 
html:hidden property=page value=2
 
depending on witch JSP you are, 1st, 2nd or 3rd. Of course you can do it inside an 
Action too.
 
As soon as I saw your validate method I slapped my front and said 3 bad words :)
 
Many thanks again for your help.
 
Ruben Carvalho

-Mensagem original- 
De: Natalie D Rassmann [mailto:[EMAIL PROTECTED] 
Enviada: qui 18-09-2003 14:26 
Para: Struts Users Mailing List 
Cc: 
Assunto: Re: Need some help



Ruben,

After many trials, I finally got the page attribute to work.  This is what I 
did.

I am using a DynaValidatorForm so I created my own Form class and extended 
DynaValidatorForm.  I only have one method in
there; the validator method.

Here is a copy of my source code

public class ReviewRecordForm extends DynaValidatorForm {

  public ActionErrors validate(ActionMapping mapping,
   HttpServletRequest request) {

String screen = request.getParameter(page);

//set page property in form
this.setPage(Integer.parseInt(request.getParameter(page)));

//Call the Validator Framework
ActionErrors errors = super.validate(mapping,request);

return errors;

  }
}

In my validation.xml file, I added the page=X attribute to the field 
property line.  (Where X is the page number).  Here
is a sample from my validation.xml file:

   field property=phaseSelected depends=required,isNotSelectOption 
page=0
  arg0 key=label.revRec.phase/
   /field

   field property=dispositionSelected 
depends=required,isNotSelectOption page=3
  arg0 key=label.revRec.disposition/
   /field

I wrote the isNotSelectOption validation rule.

I hope this helps

Natalie

Ruben Carvalho wrote:

 Did anyone work with Struts validation and the page attribute in the field 
tag? To validate different parts of the form?

 I'm really stucked in a moment and I can't get out of it.

 Thank you,

 Rben Carvalho



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Websphere and Struts modules

2003-09-30 Thread Ruben Carvalho
Hello everybody,
 
I have a stupid error which I think is because of IBM but I can't prove it.
 
I'm trying to use modules with IBM, I've configured web.xml like:
 
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/conf/struts-default.xml/param-value
/init-param
init-param
  param-nameconfig/module1/param-name
  param-value/WEB-INF/conf/struts-module1.xml/param-value
/init-param
 
Imagine that I want to use an action inside a JSP. I create a new action-mapping like 
this:
 
actionpath=/myAction
   type=mypackage.MyAction
  attribute=myForm
  scope=session
  forward name=success  path=/myJSP.jsp/
/action
 
In my JSP I put html:form action=/myAction
 
Now, Websphere gives me a warning like this:
Target /myJSP.jsp cannot be resolved in the context of the following modules: /module1
 
I've added
 
  controller
!-- The input parameter on action elements is the name of a
 local or global forward rather than a module-relative path --
set-property property=inputForward value=true/
  /controller
 
to struts-config but even without it it doesn't work
 
Can somebody help me? Am I doing anything wrong? Or is it possible that Websphere 
doesn't recognize this?
 
Many thanks
 
Rben Carvalho


RE: Websphere and Struts modules

2003-09-30 Thread Ruben Carvalho
My application is working fine. The problem is I can't look at those errors :)
 
Are there any other opinions?
 
Rben Carvalho

-Mensagem original- 
De: Susan Bradeen [mailto:[EMAIL PROTECTED] 
Enviada: ter 30-09-2003 19:17 
Para: Struts Users Mailing List 
Cc: 
Assunto: Re: Websphere and Struts modules



Is your application really not working? I get these same errors for my
default module (I'm not using different modules), but my application is
correct and works fine. It seems that WebSphere tries to get overly
helpful with its syntax validation at times.

Susan Bradeen

On 09/30/2003 01:24:17 PM Ruben Carvalho wrote:

 Hello everybody,

 I have a stupid error which I think is because of IBM but I can't prove
it.

 I'm trying to use modules with IBM, I've configured web.xml like:

 init-param
 param-nameconfig/param-name
 param-value/WEB-INF/conf/struts-default.xml/param-value
 /init-param
 init-param
 param-nameconfig/module1/param-name
 param-value/WEB-INF/conf/struts-module1.xml/param-value
 /init-param

 Imagine that I want to use an action inside a JSP. I create a new
 action-mapping like this:

 actionpath=/myAction
 type=mypackage.MyAction
 attribute=myForm
 scope=session
 forward name=success  path=/myJSP.jsp/
 /action

 In my JSP I put html:form action=/myAction

 Now, Websphere gives me a warning like this:
 Target /myJSP.jsp cannot be resolved in the context of the following
modules:
 /module1

 I've added

 controller
 !-- The input parameter on action elements is the name of a
 local or global forward rather than a module-relative path --
 set-property property=inputForward value=true/
 /controller

 to struts-config but even without it it doesn't work

 Can somebody help me? Am I doing anything wrong? Or is it possible that
 Websphere doesn't recognize this?

 Many thanks

 Rben Carvalho

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

dynamic generation of select fields problem

2003-12-05 Thread Ruben Pardo
Hi everybody!

  This is my problem, i've to generate a variable
quantity of select fields. The solution i thougth was
a map backed form, that dynamically generate the names
of this fields with JSTL, something like this:

c:forEach  items=${sessionScope} var =farmacia
varStatus=st
 .
  html-el:select property=value(campos${st.count})
   ..
   ..
  /html:select


/c:forEach 

but qhen i try to run this, i've got an
NullPointerException saying me that no getter for
property value(campo1) ...

I don't know what could be the problem, or how i can
solve in other way.

Thanks a lot and any type of help could be aprecciated.

___
Yahoo! Sorteos
¡Ya puedes comprar Lotería de Navidad!
http://yahoo.ventura24.es/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Send the response to a different frame

2004-03-02 Thread Ruben Pardo
Hi , 
I've got a page with 3 frames, the action, forward  to
reload always the page with the 3 frames. If there is
an error, i want to reload only one frame, how can i 
send the response  
from the action to only one frame??
thanks

___
Yahoo! Messenger - Nueva versión GRATIS
Super Webcam, voz, caritas animadas, y más...
http://messenger.yahoo.es

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Multiple validation

2004-03-09 Thread Ruben Pardo
Hi, here is the scenario ...
i've got 4 different validation depending on 4
different javascript tab, i want to do a validation
depending on the tab that you are localized, ie, i
want to validate one field if the user is in the tab
1, other if the user are in tab 2 and so on.
I define in validation.xml 4 different form, and 
call some validate...Form(), or other depending of the
tab, but it doesn't work properly because some code
overwrite other, 
what i could do?
thanks, 


___
Yahoo! Messenger - Nueva versión GRATIS
Super Webcam, voz, caritas animadas, y más...
http://messenger.yahoo.es

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



html:rewrite action problem

2004-03-24 Thread Ruben Pardo
i've got the next tag
html:rewrite
action=/SomeAction?prefix=page=/SomePage

and in the actionConfig  action path=/SomeAction
type=org.apache.type=org.apache.struts.actions.SwitchAction
/action

but i always get an error saying that attribute action
does not defined in the tld?
what could it be?
thanks in advance. 

___
Yahoo! Messenger - Nueva versión GRATIS
Super Webcam, voz, caritas animadas, y más...
http://messenger.yahoo.es

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem with application scope data

2002-11-21 Thread Jorge Ruben Macias Lopez
Hi, I've been reading through the lists archive and still can't find the way
to make this work. I'm doing the following:

- Created a subclass from ActionServlet, with the following code:

public class IDCVActionServlet extends ActionServlet{

public void init() throws ServletException {

try{
super.init();
}
catch(ServletException e){
throw(e);
}
initIDCV();
}

protected void initIDCV(){
getServletContext().setAttribute(demo, new ValueBean(Mensaje
Demo));
}
}

the class ValueBean is the following:

public class ValueBean{
protected String data;

public ValueBean(String data){
this.data = data;
}

public String getData(){
return(this.data);
}

public void setData(String data){
this.data = data;
}
}

I modified web.xml to load my custom class instead of the standard
ActionServlet, then I try to print demo.data in a jsp, like this:
bean:write scope=application name=demo property=data/

but I get a nullPointerException, can someone point me to the right way of
doing this?  

Regards, 
Jorge Macias

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Problem with LookupDispatchAction and pressing ENTER in a text

2002-11-21 Thread Jorge Ruben Macias Lopez
I think there's an even handler in the html:form tag which lets you assign
a javascript action to be executed when the form is submitted.

-Mensaje original-
De: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Enviado el: Jueves, 21 de Noviembre de 2002 01:07 p.m.
Para: [EMAIL PROTECTED]
Asunto: Problem with LookupDispatchAction and pressing ENTER in a text


Pressing  'Enter' inside a text form, the form is submited, 
and the 'method' parameter  that is the name of all my submit buttons,
takes no value,  and  so the LookupDispatchAction fails

Any solution?

Thanks.

Example



--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Tomcat Freezes when an Action or ActionForm is updated

2002-11-26 Thread Jorge Ruben Macias Lopez
Hello, I hope some of you guys has seen something like this and knows how to
prevent it, I'm running struts 1.02 with tomcat 4.0.1 on Win2K Server.  I'm
using Eclipse for IDE and everytime I save one of my Action or ActionForm
classes on Eclipse, I see in the tomcat console the message:
WebappClassLoader: Resource whatever  was modified, so it is fine.  But
the problem is after that, tomcat will answer no more requests, unitl I shut
it down and restart it.  
 
Thanks for your time guys, 
 
Jorge Macias



requiredif don't execute the condition

2003-10-27 Thread Ruben Orta Magan
Hello.

I've got a problem with the requiredif condition in the struts validator.
I'm using this dtd:

http://jakarta.apache.org/commons/dtds/validator_1_0.dtd

http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd

The validation rule is:
formset
form name=icytReviForm

field
property=tituloRevista
depends=requiredif
arg0 key=icytReviForm.tituloRevista.displayname/
var
var-namefield[0]/var-name
var-valueaccion/var-value
  /var
  var
var-namefieldTest[0]/var-name
var-valueEQUAL/var-value
  /var
  var
var-namefieldValue[0]/var-name
var-valuealta/var-value
  /var
/field
/form
/formset

accion is a hidden value that it's set when i put a submit button...the form
is

html:form action=/icytReviAction onsubmit=return
validateIcytReviForm(this)

Titulo:/tdtdhtml:text property=tituloRevista size=80/
html:submit value=alta
onclick=javascript:document.forms[0].accion.value='alta';/
html:text property=accion value=alta/

/html:form

When I push the alta submit button the validator don't execute the
requiredif condition and don't validate
my form. Any suggestion about the problem?

Thanks.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: requiredif

2003-10-28 Thread Ruben Orta Magan

- Original Message - 
From: Marc Dugger [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]


 The new validwhen validation rule, which will be included into the Struts
 release immediately after the 1.1 release...

 I am using the nightly build to develop my app and am hoping 1.2 will be
 release by the time I'm ready to deploy.  So far, validwhen is operating
as
 promised.  I haven't run into any problems, but you may search the
archives
 to view other opinions.

How I can download the nightly build version?

Thanks


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



validwhen kills me!

2003-10-28 Thread Ruben Orta Magan
Hello.I've got a problem with validwhen. I've got a form with two buttons.one 
makes and insert in the database, and the other makes a searchI want to make a 
validation only when the insert button is pushed and i don't know if i understand 
correctly how validwhen works.

I've got this form

html:form action=/icytReviAction onsubmit=return validateIcytReviForm(this)

html:text property=name/
html:text property=email/

html:hidden property=act/

html:submit value=alta onclick=javascript:document.forms[0].act.value='insert';/
html:submit value=alta onclick=javascript:document.forms[0].act.value='search';/

/html:form
The hidden input called act that is filled with the word search or insert, the 
value depends of the button you push.

I want to set name as a required field and email has a required, email mask field. 

If i put this validation don't run :\

field
property=name
depends=validwhen
arg0 key=icytReviForm.name.displayname/
var
var-nametest/var-name
var-value(act == 'alta')/var-value
/var 
/field

field
property=email
depends=validwhen,email
arg0 key=icytReviForm.name.displayname/
msg name=email key=errors.icytReviForm.formatoCOZ/
var
var-nametest/var-name
var-value(act == 'alta')/var-value
/var 
/field

Some one knows how to validate correctly?? Someone use validwhen and it's validate 
correctly?

Thanks in advance

Re: validwhen kills me!

2003-10-28 Thread Ruben Orta Magan
Sorry I've got and error...change

this line

var-value(act == 'alta')/var-value

with this

var-value(act == 'insert')/var-value

Thanks

- Original Message - 
From: Ruben Orta Magan [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, October 28, 2003 2:02 PM
Subject: validwhen kills me!


Hello.I've got a problem with validwhen. I've got a form with two
buttons.one makes and insert in the database, and the other makes a
searchI want to make a validation only when the insert button is pushed
and i don't know if i understand correctly how validwhen works.

I've got this form

html:form action=/icytReviAction onsubmit=return
validateIcytReviForm(this)

html:text property=name/
html:text property=email/

html:hidden property=act/

html:submit value=alta
onclick=javascript:document.forms[0].act.value='insert';/
html:submit value=alta
onclick=javascript:document.forms[0].act.value='search';/

/html:form
The hidden input called act that is filled with the word search or
insert, the value depends of the button you push.

I want to set name as a required field and email has a required, email mask
field.

If i put this validation don't run :\

field
property=name
depends=validwhen
arg0 key=icytReviForm.name.displayname/
var
var-nametest/var-name
var-value(act == 'alta')/var-value
/var
/field

field
property=email
depends=validwhen,email
arg0 key=icytReviForm.name.displayname/
msg name=email key=errors.icytReviForm.formatoCOZ/
var
var-nametest/var-name
var-value(act == 'alta')/var-value
/var
/field

Some one knows how to validate correctly?? Someone use validwhen and it's
validate correctly?

Thanks in advance


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



code generate by validwhen doesn't exists

2003-10-28 Thread Ruben Orta Magan
Hello again. I'm fighting with validwhen againi've got the lastest nightly 
build(jakarta-struts-20031027.zip) and it looks like when you use validwhen validation 
no javascript code is generated and inserted in the jsp file. If i use this validation 
definition:

field
property=tituloRevista
depends=required
arg0 key=icytReviForm.tituloRevista.displayname/


/field

field 
property=tipoAdquisicion
depends=required
arg0 key=icytReviForm.tipoAdquisicion.displayname/
/field   

The javascript code inserted in my jsp page is:

function validateIcytReviForm(form) {  
 
if (bCancel) 
  return true; 
else 
 var formValidationResult;
   formValidationResult = validateRequired(form); 
 return (formValidationResult == 1);
   } 

function required () { 
 this.aa = new Array(tituloRevista, El título es un campo obligatorio, new 
Function (varName,  return this[varName];));
 this.ab = new Array(tipoAdquisicion, El tipo de adquisición es un campo 
obligatorio, new Function (varName,  return this[varName];));
} 


But if I add a new field validation in my validation.xml :

field
property=tituloRevista
depends=required
arg0 key=icytReviForm.tituloRevista.displayname/


/field

field 
property=tipoAdquisicion
depends=required
arg0 key=icytReviForm.tipoAdquisicion.displayname/
/field   


!-- new field --
field 
property=tituloAbreviado
depends=validwhen
arg0 key=icytReviForm.tituloAbreviado.displayname/
  var
var-nametest/var-name
var-value(tituloRevista != null)/var-value
  /var
/field 

The javascript code generated is the same!

function validateIcytReviForm(form) {  
 
if (bCancel) 
  return true; 
else 
 var formValidationResult;
   formValidationResult = validateRequired(form); 
 return (formValidationResult == 1);
   } 

function required () { 
 this.aa = new Array(tituloRevista, El título es un campo obligatorio, new 
Function (varName,  return this[varName];));
 this.ab = new Array(tipoAdquisicion, El tipo de adquisición es un campo 
obligatorio, new Function (varName,  return this[varName];));
} 

Please someone can help me??? is the validwhen running correctly? is the problem in 
the definition??? 

Thanks...