RE: Difference between Tiles and Templates ?

2003-02-10 Thread Míguel Ángel Mulero Martínez
Tiles is the new versión of Templates.



-Mensaje original-
De: Rao, Nagraj [mailto:[EMAIL PROTECTED]]
Enviado el: lunes, 10 de febrero de 2003 16:39
Para: 'Struts Users Mailing List'
Asunto: Difference between Tiles and Templates ?

Is there any difference between teh template tags and the Tiles tag lbraries
?
They seem to be very similar in their usage.

Cheers,
Naggi

-
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: ? on logic:empty - any hints

2003-01-30 Thread Míguel Ángel Mulero Martínez
Use the logic:present

Regards,
Miguel

-Mensaje original-
De: Jörg Maurer [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 30 de enero de 2003 9:32
Para: Struts Users Mailing List (E-mail)
Asunto: ? on logic:empty - any hints

Hi!

I want to test in jsp if user does need to log in, e.g. if user has
already logged in and by back button is calling login.jsp for second
time.

My login.jsp has code :

logic:empty name=%= IAppConstants.USER_CONTAINER_KEY%
scope=session

html:form action=/login

/html:form

/logic:empty

logic:notEmpty name=%= IAppConstants.USER_CONTAINER_KEY%
scope=session
logic:notEqual name=%= IAppConstants.USER_CONTAINER_KEY%
property=userViewR value=false scope=session
You are already logged in!
/logic:notEqual
/logic:notEmpty

So i test for that bean named UserContainer in session scope, where it
resides when login completes.

Unfortunatly, if user not logged - it throws
[ServletException in:/login.jsp] Cannot find bean UserContainer in
scope session'

Reading api docu, I thought logic:empty would test bean for
null(existing or not existing)?

Can any of you help me ?

-
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: Clarification with Struts

2003-01-29 Thread Míguel Ángel Mulero Martínez
You must use and ActionForm with
String[] get() and setX(String[] )

If you create the ActionForm, use the set to put the values and use the
request.setAttribute(actionform) before call the JSP, all is done.

Regards,
Miguel

-Mensaje original-
De: Uday [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 29 de enero de 2003 10:41
Para: [EMAIL PROTECTED]
Asunto: Clarification with Struts

Hi All,


I have table in which one column is with all checkboxes. These checkboxes i
generated using structs-taglib multibox tag.
While generating checkboxes, i named the values of each checkboxes with
0,1,2, etc., by incrementing the i value.
If user selects any checkbox, its value (it can be 0 or 1 or 2) will be
sending to action class and the action class get the data from the bean
depending on the index (0 or 1 or 2) and write it to file.


Now my requirement is when the user log in to the same page, the previously
selected checkboxes to be cheked true.

Can any one of you tell me how to do it ?

It is very urgent.



Have a nice day

Regards,
Uday



-
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: Hi

2003-01-27 Thread Míguel Ángel Mulero Martínez
In what file? If I'm not wrong, you must read the file in an Action, and
then process it (if needed) and put the result in the request for the JSP.

Regards,
Miguel

-Mensaje original-
De: Uday [mailto:[EMAIL PROTECTED]]
Enviado el: martes, 28 de enero de 2003 8:35
Para: [EMAIL PROTECTED]
Asunto: Hi

Hi,


I want to read and write from/into the file using strtus (struts-taglibs).
Can you tell me how to do it.

It is very urgent. Tell me is there any code available on the net.


Have a nice day

Regards,
Uday

--
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]




Pasar atributos a un bean:include

2003-01-17 Thread Míguel Ángel Mulero Martínez
Hola a todos,
Estoy usando la linea:
bean:include id=text page=/test/detalle.jsp /

para almacenar en la variable text el contenido de la pagina despues de ser
ejecutado. Mi problema es que tengo un bean en la pagina actual que no es
visible para la pagina incluida, por lo tanto quiero pasarselo. ¿Hay alguna
forma de hacer esto? Al estilo del template:put.

Gracias a todos,
Miguel



Pasa artributwa to a bean:include (SORRY FOR MY EARLIER SPANISH POST)

2003-01-17 Thread Míguel Ángel Mulero Martínez
Hi to all,
I’m using the sentence:
bean:include id=text page=/test/detalle.jsp /

to save in “text” the content of the page after its execution. My problem is
that I’ve got a bean in the actual page that it’s not visible for the
included page. How can I pass it? Something similar to template:put?

Thanks to all!
Miguel




Scriptlet not executed

2003-01-16 Thread Míguel Ángel Mulero Martínez
Hi all!
I’ve seen in a example of the Struts Documentation how to merge scriptlets
with tags. I’ve tried this:

html:multibox property=’buscoCooperacion.checkAnyoEmpresa
onclick=marcaMaximoCheckbox(0,, %=pos%);’
   bean:write name=elementoCreacion /
/html:multibox

But the code generated is:
input type=checkbox name=buscoCooperacion.checkAnyoEmpresa value=No
clasifi onclick=marcaMaximoCheckbox(0,, %=pos%);

So the %=pos% is not executed. I’ve tried a lot of things similar to this.
Someone could help me?

Thanks!
Miguel






RE: Scriptlet not executed

2003-01-16 Thread Míguel Ángel Mulero Martínez
This works, thanks, I tried somithing like this before but didn't work. I
don't kwon why.

Thanks again!
Miguel

-Mensaje original-
De: Harinath DP [mailto:[EMAIL PROTECTED]]
Enviado el: jueves, 16 de enero de 2003 12:14
Para: Struts Users Mailing List
Asunto: RE: Scriptlet not executed

Try this

onclick='%= marcaMaximoCheckbox(0,,  + pos + ) %'



-Original Message-
From: Míguel Ángel Mulero Martínez
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 4:27 PM
To: Lista Struts
Subject: Scriptlet not executed

Hi all!
I've seen in a example of the Struts Documentation how to merge scriptlets
with tags. I've tried this:

html:multibox property='buscoCooperacion.checkAnyoEmpresa
onclick=marcaMaximoCheckbox(0,, %=pos%);'
   bean:write name=elementoCreacion /
/html:multibox

But the code generated is:
input type=checkbox name=buscoCooperacion.checkAnyoEmpresa value=No
clasifi onclick=marcaMaximoCheckbox(0,, %=pos%);

So the %=pos% is not executed. I've tried a lot of things similar to this.
Someone could help me?

Thanks!
Miguel





--
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]




form generated code error

2002-12-23 Thread Míguel Ángel Mulero Martínez
I’ve got a JSP with several forms. For example:

html:form action=busquedaProgramasAction.do
/html:form

html:form action=busquedaNoticiasAction.do
…..
/html:form

….

In this way I’ve got 6 forms in the same JSP. The struts-config.xml is like:


action path=/busquedaProgramasAction

type=es.ceei.ceeieuropa.programas.actions.BusquedaProgramasAction
name=busquedaProgramasForm
scope=request
input=/programas/busquedaProgramasTemp.jsp
validate=true
forward name=resultadoProgramasJSP
path=/programas/resultadoProgramasTemp.jsp/
/action

action path=/busquedaNoticiasAction

type=es.ceei.ceeieuropa.noticias.actions.BusquedaNoticiasAction
name=busquedaNoticiasForm
scope=request
input=/noticias/busquedaNoticiasTemp.jsp
validate=true
forward name=resultadoNoticiasJSP
path=/noticias/resultadoNoticiasTemp.jsp/
/action

……

My problem is than in all the code generated, the ActionForm (name)
associated to all the forms is the first form I define
(busquedaProgramasForm):

  form name=busquedaProgramasForm method=POST
action=/ceeieuropa/busquedaProgramasAction.do
…..
  /form

  form name=busquedaProgramasForm method=POST
action=/ceeieuropa/busquedaNoticiasAction.do
…..
  /form
…..

I use Struts 1.02. Someone can help me?

Thanks!
Miguel



RE: How to Format default input text value according to user request?

2002-12-11 Thread Míguel Ángel Mulero Martínez
The Locale object exists in the Actions. Use an Action before the JSP that
creates this bean. In this way you can format the text before call the
bean:write

Regards,
Miguel

-Mensaje original-
De: Renato Aganippe [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 11 de diciembre de 2002 9:48
Para: Struts Users Mailing List
Asunto: How to Format default input text value according to user request?

Hello everybody,

Please help, I can't get through this problem and it drives me crazy!

I need to initialize the default field value from a html:text tag with
a timestamp field from a Bean according to the user's request Locale.

I am looking for an equivalent of formatKey attribute from bean:write

Thanks a lot,

Renato


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




Detecting value in a template

2002-12-03 Thread Míguel Ángel Mulero Martínez
Hi all,
I'm using templates from Struts 1.0.2 and I can't use tiles. Mi problem is
that I would like to pass a value with template:put and in the target JSP
change the behaviour attending this value (with something like logic:equal
or logic:present.

Anybody knows how to verify if exists or the value without a scriptlet?

Thanks!
Miguel


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




RE: Passing an argument from struts-config.xml to an action.

2002-11-28 Thread Míguel Ángel Mulero Martínez
Use the DispatchAction. See the documentation.

 -Mensaje original-
 De: ROSSEL Olivier [mailto:[EMAIL PROTECTED]]
 Enviado el: jueves, 28 de noviembre de 2002 13:08
 Para: 'Struts Users Mailing List'
 Asunto: RE: Passing an argument from struts-config.xml to an action.


 Sure.
 From a user point of view, I want to change slightly the bahviour
 of my Action depending on a parameter.
 I presume it is not possible.

  -Message d'origine-
  De: Gemes Tibor [mailto:[EMAIL PROTECTED]]
  Date: jeudi 28 novembre 2002 13:03
  À: Struts Users Mailing List
  Objet: Re: Passing an argument from struts-config.xml to an action.
 
 
  2002. november 28. 12:13 dátummal ROSSEL Olivier ezt írtad:
   I read on the list that it is impossible to pass a property from
   struts-config.xml
   to an Action.
  
   Example:
  
   action
   
   set-property name=foo valuebar/
   /action
  
   except if you overload the ActionMapping used for that statement.
  
   Is it still the case in Struts-1.1 ?
 
  set-property calls a setter. So unless you have the setFoo on the
  ActionMapping you cannot use it.
 
  How do you expect the ActionMapping to handle a value for
  which it is not
  prepared to receive? set-property is there for cases in which
  you want to
  extend the ActionMapping (and other classes) and you want to
  pass your
  mapping a parameter (which is not declared in its parent),
  and still want to
  conform the DTD of the struts-config.
 
  Tib
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
  This mail has originated outside your organization,
  either from an external partner or the Global Internet.
  Keep this in mind if you answer this message.
 

 This e-mail is intended only for the above addressee. It may contain
 privileged information. If you are not the addressee you must not copy,
 distribute, disclose or use any of the information in it. If you have
 received it in error please delete it and immediately notify the sender.
 Security Notice: all e-mail, sent to or from this address, may be
 accessed by someone other than the recipient, for system management and
 security reasons. This access is controlled under Regulation of
 Investigatory Powers Act 2000, Lawful Business Practises.

 --
 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]




RE: great error in struts! Include a JSP result of an Action in other JSP

2002-11-27 Thread Míguel Ángel Mulero Martínez
Yes!! This works. I've tried this for my yesterday problem. Only one change:
bean:write name=text / don't work because Struts scapes the  and 
simbols (¿security?). I have used %=text% and all ok.

Thanks!!!
Miguel

 -Mensaje original-
 De: Gemes Tibor [mailto:[EMAIL PROTECTED]]
 Enviado el: miércoles, 27 de noviembre de 2002 13:09
 Para: Struts Users Mailing List
 Asunto: Re: great error in struts! Include a JSP result of an Action in
 other JSP


 2002. november 27. 12:56 dátummal Carlos Grima ezt írtad:
  %@ taglib uri=/WEB-INF/struts-template.tld prefix=template %

 Afaik the template tag is deprecated.

 I solved this kind of problem with the help of an intermediate file which
 calls the file with struts tags:


 bean:include id=text
 href=/myApp/myModule/myAction.do?myFirsParam=1mySecondParam=2 /
 bean:write name=text

 And inserted this file into the template.

 Hth,

 Tib

 Btw


 --
 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]




Include an Action in a page

2002-11-26 Thread Míguel Ángel Mulero Martínez
Hi all, I've got a little problem.

I'm using Struts 1.0.2, and I'm using Templates (not Tiles). I use
template:insert to include a little page inside my page. This work great
with HTML and JSP, but not with actions. How can I do it for:

template:insert template=action.do /

Is there other way to do this?

Thanks to all!!
Miguel


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




RE: Struts: a Graphic Artist blessing or curse?

2002-11-25 Thread Míguel Ángel Mulero Martínez
Have you looked at this?
http://jakarta.apache.org/taglibs/doc/ultradev4-doc/intro.html

I don't have tried it, so if you do it please comment to group.


 -Mensaje original-
 De: Foong Tzer [mailto:[EMAIL PROTECTED]]
 Enviado el: lunes, 25 de noviembre de 2002 14:31
 Para: Struts Users Mailing List; Struts Users Mailing List
 Asunto: Struts: a Graphic Artist blessing or curse?


 Dear Struts supporter,

 There seems to be a real world problem with using Struts (well, not
 really Struts, but JSP Tag Libraries). It seems despite zero java coding
 on the JSP pages, those 'funny' tags are still not digest-able by average
 graphic designers. I mean, if they were to use Macromedia DreamWeaver, it
 would not've rendered the look and feel if the tags were something like
 this: -

 html:img page=/nice.gif altKey=Nice/

 html:html locale=true  /html:html

 html:link page=/another.jspbean:message
 key=another.title//html:link


 As opposed to the native standard HTML tags?

 I'm really not sure whether Macromedia or any other popular graphic
 artiste tool would render these Struts JSP pages properly. Anybody here
 has any experience solving this real world problem?

 Thanks. Any help would be much appreciated.
 Regards,

   Tzer
   [EMAIL PROTECTED]

 Is J2EE messing up your mind?
 http://www.see-consulting.com

 --
 http://fastmail.fm - Or how I learned to stop worrying and
   love email again

 --
 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]




RE: Application Resources problems

2002-11-22 Thread Míguel Ángel Mulero Martínez
Can you put the JSP code of your startup JSP?

Regards

 -Mensaje original-
 De: Jim Collins [mailto:[EMAIL PROTECTED]]
 Enviado el: viernes, 22 de noviembre de 2002 13:54
 Para: Struts Users Mailing List
 Asunto: Application Resources problems


 Hi,

 I am pulling my hair out with this problem. I have my resources
 file in the
 following directory:

 myApp/Web-inf/classes/org/comp/ApplicationResources.properties

 And in the web.xml file I have the following entry:

 init-param
   param-nameapplication/param-name
   param-valueorg.comp.ApplicationResources/param-value
   /init-param

 When I goto my startup jsp page which has a bean:message tag I get the
 following error:

 org.apache.jasper.JasperException: Cannot find bean namespace in
 scope null
  at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrap
 per.java:2
 48)

 If I change the entry in the web.xml file to:

 init-param
   param-nameapplication/param-name
   param-valueorg.comp.ApplicationResources.properties/param-value
   /init-param

 I get a different error message saying:

 org.apache.jasper.JasperException: Missing message for key app.title

 I know for a fact that there is a message for this key in the resources
 file. This problem is driving me crazy any help would be appreciated.

 Thanks

 Jim.





 --
 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]




RE: Réf. : RE: Tomcat 4.1 and indexId

2002-11-21 Thread Míguel Ángel Mulero Martínez
I don't know if this is your case, but version 4.10  4.11 had a bug under
windows if you install it in a different drive from C:. They fail when try
to compile JSP.

Alos it isn't your case, I recommend to you change to version 4.12 or 4.05
(other versions have a security problem with default servlet that allows to
see the code of your JSP or other resources).

Regards,
Miguel

 -Mensaje original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Enviado el: jueves, 21 de noviembre de 2002 10:08
 Para: Struts Users Mailing List
 Asunto: Réf. : RE: Tomcat 4.1 and indexId




 It is the Apache Tomcat/4.1.10-LE-jdk14






 Miguel Angel Mulero

 Martinez   Pour :
 Struts Users Mailing List [EMAIL PROTECTED]
 [EMAIL PROTECTED]cc :

 csidel.es Objet :
   RE: Tomcat 4.1 and indexId


 21/11/2002 09:58

 Veuillez répondre à Struts

 Users Mailing List









 What version of tomcat 4.1? Is the 4.12 version or earlier?

 Regards

  -Mensaje original-
  De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Enviado el: jueves, 21 de noviembre de 2002 9:57
  Para: Struts Users Mailing List
  Asunto: Tomcat 4.1 and indexId
 
 
  Hello!
 
  In my application I am using the  indexId  attribute in the
  nested:iterate  tag. During
  development under NetBeans/Tomcat 4.0 all is ok.
 
  When I deploye my application with a Tomcat 4.0 server, all is ok too.
 But
  when I use a
  Tomcat 4.1 version, this error occures:
 
  Error compiling file:  editWeekDistribution_jsp.java [javac]
  Compiling 1 source file
  ...editWeekDistribution_jsp.java:271: _jspx_weekNumber_1 is
  already defined
  in
  _jspService(javax.servlet.http.HttpServletRequest,javax.servlet.ht
  tp.HttpServletResponse)
java.lang.Integer _jspx_weekNumber_1 = weekNumber;
  ^
  ...editWeekDistribution_jsp.java:271: cannot resolve symbol
  symbol  : variable weekNumber
  location: class org.apache.jsp.editWeekDistribution_jsp
java.lang.Integer _jspx_weekNumber_1 = weekNumber;
 
 
  Thanks for your help,
  Arno
 
 
 
  --
  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]






 --
 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]




Durability of a ActionForm

2002-11-21 Thread Míguel Ángel Mulero Martínez
Hi all,

My question is how can I make for extend the durability of a request scope
ActionForm. For example, in my Action I can do somethig like:

request.setAttribute(form, form);

In this way, the ActionForm that I retrieved from the JSP and arrived to the
Action, will arrive to the next JSP.
But, how can I do it in the JSP no make it arrive to the next Action?

My problem is that I wan't to use a request ActionForm (not a session), and
if I create it in the Action before the JSP, when I make a submit the
ActionForm doesn't exist and Struts creates one new. If I don't put the
Action before the JSP, then Struts creates it in the JSP and it calls the
submit function when I make submit. I wan't to achieve the second without
putting the ActionForm in session scope and creating it in the Action before
the JSP.

Thanks all!!
Miguel


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




RE: Durability of a ActionForm

2002-11-21 Thread Míguel Ángel Mulero Martínez
I'm with you, I think that I will put it in the session finally. Thanks!

Miguel

 -Mensaje original-
 De: Andrew Hill [mailto:[EMAIL PROTECTED]]
 Enviado el: viernes, 22 de noviembre de 2002 7:09
 Para: Struts Users Mailing List
 Asunto: RE: Durability of a ActionForm


 You cant.

 Once your page has been rendered to the client from the JSP your
 request is
 finished. Over. Finito. Dead. Pining for the fjiords. Joined the choir
 invisible...

 You will need to use the session.

 (Unless you want to make your ActionForm serializable, write it
 out as text
 to a hidden field or a cookie, and override the RequestProcessor to
 reinstantiate it on submission (which would still be a new
 object, but same
 data).- and you really dont want to do that...)

 -Original Message-
 From: Míguel Ángel Mulero Martínez
 [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, November 21, 2002 19:37
 To: Lista Struts
 Subject: Durability of a ActionForm


 Hi all,

 My question is how can I make for extend the durability of a request scope
 ActionForm. For example, in my Action I can do somethig like:

 request.setAttribute(form, form);

 In this way, the ActionForm that I retrieved from the JSP and
 arrived to the
 Action, will arrive to the next JSP.
 But, how can I do it in the JSP no make it arrive to the next Action?

 My problem is that I wan't to use a request ActionForm (not a
 session), and
 if I create it in the Action before the JSP, when I make a submit the
 ActionForm doesn't exist and Struts creates one new. If I don't put the
 Action before the JSP, then Struts creates it in the JSP and it calls the
 submit function when I make submit. I wan't to achieve the second without
 putting the ActionForm in session scope and creating it in the
 Action before
 the JSP.

 Thanks all!!
 Miguel


 --
 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]


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




RE: ArrayList disappeared in ActionForm

2002-11-20 Thread Míguel Ángel Mulero Martínez
Hi all. I don't have find anything in the sources.
I have made a little ugly patch to my application. If in the validate I
have errors and must return to the HTML. I reload the ArrayList from the
database. Doing this, I have found one thing more:
- I arrive to the HTML form. I press submit. If the validate has errors, I
reload the ArrayList from database. I return to the HTML form.
- I submit the HTML form again. This time THE ARRAYLIST HAVEN'T DISAPPEARED.

I don't know why, but only disappear the first time I submit the form. Some
idea? (apart from a bug of garbage collector)

Thanks to all!

 -Mensaje original-
 De: Míguel Ángel Mulero Martínez
 [mailto:[EMAIL PROTECTED]]
 Enviado el: lunes, 18 de noviembre de 2002 16:29
 Para: Struts Users Mailing List
 Asunto: RE: ArrayList disappeared in ActionForm


 Hi Sri,
 
  Looking at your multibox logic, is the 'rol' property in the
  'userDataBean' an array of Strings?  This should represent the
  value(s) that the user selects -- so, if the initial setting is
  all boxes un-checked, this will be an empty String[].

 Yes, the rol is a String[]. It works OK when I present the HTML form the
 first time. Afterwards I can't present it because the
 rolesPosibles doesn't
 exist.

 
  Are you modifying/setting your ArrayList (rolesPossibles) in the
  reset?  I don't see how else it can become null.  This list, as
  you know, represents all the possible checkbox values.

 The only thing I modify in the reset is the userDataBean.rol (and I have
 tried too to erase the reset function). I modify the roles
 posibles only in
 the set.

 
  I don't know if the above helped.  Another source of information
  is the html-multibox.jsp that is part of the
  struts-exercise-taglib application that ships with Struts.
 
  Sri
 

 Thanks for your help. I will take a look to the source of
 multibox to see if
 this help. It's a strange thing that. I've done a lot of HTML forms with
 Struts and never had encounter this problems.

 Thanks again!
 Miguel


 
  -Original Message-
  From: Míguel Ángel Mulero Martínez
  [mailto:[EMAIL PROTECTED]]
  Sent: Monday, November 18, 2002 2:06 AM
  To: Struts Users Mailing List
  Subject: RE: ArrayList disappeared in ActionForm
 
 
  Hi all!
 
  Thanks to both for your reply. Sorry for my late reply (and my
  poor english) but in the weekend I can't write to the group.
 
  Here some code of my classes (comments are in spanish, sorry):
 
 
  My ActionForm has:
 
  
  public class FichaUsuarioActionForm extends ActionForm {
 
  
 
 
  /** Datos del usuario */
 
  private FichaUsuarioDataBean ficha;
 
  /** Roles posibles para situar en el formulario */
 
  private ArrayList rolesPosibles;
 
 
 
  public FichaUsuarioActionForm() {
 
  log.debug(Constructor iniciado);
 
  ficha = new FichaUsuarioDataBean();
 
  log.debug(Constructor finalizado);
 
  }
 
 
 
  public FichaUsuarioDataBean getUserDataBean() {
 
  log.debug(getUserDataBean ejecutado);
 
  return ficha;
 
  }
 
 
 
  public void setUserDataBean(FichaUsuarioDataBean user) {
 
  log.debug(setLoginDataBean ejecutado);
 
  ficha = user;
 
  }
 
 
 
  public ArrayList getRolesPosibles() {
 
  log.debug(getRolesPosibles ejecutado);
 
  return rolesPosibles;
 
  }
 
 
 
  public void setRolesPosibles(ArrayList _roles) {
 
  log.debug(setRolesPosibles ejecutado);
 
  rolesPosibles = _roles;
 
  }
 
  .
 
  }
 
  ---
 
 
  ficha is used to retrieve the values of a HTML form.
  rolesPosibles is an ArrayList that I must use in the same HTML
  form (in a multicheck tag). They are private, so I must set its
  values using the set function, and this function writes to
  the log a message. The constructor writes to the log too.
 
 
  In the Action before the HTML form, I use the setRolesPosibles()
  to put an inicial ArrayList.
 
  My HTML form is in the way (login/editarUsuario.jsp):
 
  --
 
  html:form action=/modificaUsuarioAction.do
  focus=userDataBean.user enctype=multipart/form-data
 
  html:text name=fichaUsuario property=userDataBean.user
  size=60 /
 
  ..
 
  logic:iterate name=fichaUsuario property=rolesPosibles
  id=elementoListadoRoles
 
  html:multibox name=fichaUsuario property=userDataBean.rol
 
  bean:write name=elementoListadoRoles property=string1/
 
  /html:multibox
 
  bean:write name=elementoListadoRoles property=string2 /br
 
  /logic:iterate
 
  ..
 
  
 
 
  So I use the rolesPosibles to put a list of checkbox in my HTML
  form. The struts-config.xml is like:
 
  ---
 
 
 
  
 
  form-bean  name=fichaUsuario
 
 
  type=es.mulria.bonsai.login.actionform.FichaUsuarioActionForm/
 
  
 
actionpath=/modificaUsuarioAction
 
   type

RE: onclick attribute doesnt work in html:img tag?

2002-11-19 Thread Míguel Ángel Mulero Martínez
I use too the a href onClick=img /a

This works too. The a href has the onClick event.

Regards,
Miguel

 -Mensaje original-
 De: Ronald Mathies [mailto:[EMAIL PROTECTED]]
 Enviado el: martes, 19 de noviembre de 2002 8:34
 Para: Struts Users Mailing List
 Asunto: Re: onclick attribute doesnt work in html:img tag?


 I'm working on Linux with Mozilla version 1.1 and this one supports it.

 So i'm suprised that Netschape doesn't since they both use the
 Gecko engine.

 Or does the html:img give some trouble ? When it does then try to
 use the plain img onClick=/ this one should work.



 - Original Message -
 From: Míguel Ángel Mulero Martínez [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Tuesday, November 19, 2002 7:51 AM
 Subject: RE: onclick attribute doesnt work in html:img tag?


  I think Netscape 6 and 7 yes.
 
   -Mensaje original-
   De: Andrew Hill [mailto:[EMAIL PROTECTED]]
   Enviado el: martes, 19 de noviembre de 2002 4:07
   Para: Struts Users Mailing List
   Asunto: RE: onclick attribute doesnt work in html:img tag?
  
  
   Not even netscrap 6 ?
  
   -Original Message-
   From: Míguel Ángel Mulero Martínez
   [mailto:[EMAIL PROTECTED]]
   Sent: Monday, November 18, 2002 23:29
   To: Struts Users Mailing List; [EMAIL PROTECTED]
   Subject: RE: onclick attribute doesnt work in html:img tag?
  
  
   The html:img don't have onclick function. This is because Netscape
 don't
   support it (Explorer yes).
  
   regards.
  
  
-Mensaje original-
De: Drew Zimber [mailto:[EMAIL PROTECTED]]
Enviado el: lunes, 18 de noviembre de 2002 16:09
Para: 'Struts Users Mailing List'
Asunto: onclick attribute doesnt work in html:img tag?
   
   
   
   
anyone had any experience with this.  Anytime i add the onclick
attribute it
crashes the page..
   
   
dz
   
   
--
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]
  
  
   --
   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]
 


 --
 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]




RE: Showing the success message

2002-11-19 Thread Míguel Ángel Mulero Martínez
Put a message in the action (for example: request.setAttribute(message,
Operation OK))
And in the HTML page put: bean:write name=message ignore=true /

The ignore=true only prints the message if it exists.

Regards,
Miguel

 -Mensaje original-
 De: Alireza Fattahi [mailto:[EMAIL PROTECTED]]
 Enviado el: martes, 19 de noviembre de 2002 8:57
 Para: 'Struts Users Mailing List'
 Asunto: Showing the success message


 Hi,

 There is a form which inserts to database. We want to show a
 success message
 when this is done. The page redirects to itself after any validation error
 or any success.
 Well, we use html:error/ tag and this tag shows all the errors
 in request
 scope.
 How could we display the success messages for example The user
 inserted to
 database!?
 Is there any special mechanism in struts for this? Should we user
 html:error/ for this propose? Should we use ActionMessage?

 Thanks,
 Alireza.

 --
 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]




RE: Opening a popup from a html:link

2002-11-19 Thread Míguel Ángel Mulero Martínez
Use JavaScript. The html:link has the onclick parameter. To create a
relative path, use the html:rewrite.

Regards,
Miguel

 -Mensaje original-
 De: ROSSEL Olivier [mailto:[EMAIL PROTECTED]]
 Enviado el: martes, 19 de noviembre de 2002 12:12
 Para: '[EMAIL PROTECTED]'
 Asunto: Opening a popup from a html:link


 I have a Logout link (for the moment it is a html:link).
 Whern clicked, I would like to open a pop-up to ask
 the user to confirm the logout.

 What's the correct way to do that?
 May be, I should manage all that with standard script and a tags.
 But in that case, I will have to give a relative path to the
 target action,
 instead
 of having html:link to manage that for me (with its page attribute).


 ---cut here---


 This e-mail is intended only for the above addressee. It may contain
 privileged information. If you are not the addressee you must not copy,
 distribute, disclose or use any of the information in it. If you have
 received it in error please delete it and immediately notify the sender.
 Security Notice: all e-mail, sent to or from this address, may be
 accessed by someone other than the recipient, for system management and
 security reasons. This access is controlled under Regulation of
 Investigatory Powers Act 2000, Lawful Business Practises.

 --
 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]




RE: html:hidden and request parameter

2002-11-19 Thread Míguel Ángel Mulero Martínez
For this tag I think that the value of the hidden field must be in the
ActionForm associated with the Action in Struts-config.xml.

Regards,
Miguel


 -Mensaje original-
 De: Jean-Baptiste Onofré [mailto:[EMAIL PROTECTED]]
 Enviado el: martes, 19 de noviembre de 2002 12:49
 Para: [EMAIL PROTECTED]
 Asunto: html:hidden and request parameter


 Hello all,

 in a jsp, i use :

 input type=hidden name=command value=%
 out.print(\+request.getParameter(command)+\); %

 I would like to use the html:hidden.. tag from struts html taglib.

 Somebody has a sample ?

 Best regards
 --
 Jean-Baptiste Onofré (Nanthrax)
 Membre fondateur de phpFR.org
 http://www.phpfr.org
 [EMAIL PROTECTED]
 Membre fondateur du LUG Béziers
 http://www.lug-beziers.org
 [EMAIL PROTECTED]

 --
 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]




RE: Hidden and taglib

2002-11-19 Thread Míguel Ángel Mulero Martínez
The parameter command MUST BE in the ActionForm, not in the request.

Regards,
Miguel

 -Mensaje original-
 De: Jean-Baptiste Onofré [mailto:[EMAIL PROTECTED]]
 Enviado el: martes, 19 de noviembre de 2002 13:30
 Para: [EMAIL PROTECTED]
 Asunto: Hidden and taglib


 Re all,

 the
 html:hidden property=command/

 don't work. I have in html generated :
 input tye=hidden name=command value=

 whereas i must have, for example :
 input type=hidden name=command value=3

 With JSP pure code, it work :
 input type=hidden name=command value=%=
 request.getParameter(command) %

 In the form bean, i really have :
 String command;

 Someone has a idea ?
 --
 Jean-Baptiste Onofré (Nanthrax)
 Membre fondateur de phpFR.org
 http://www.phpfr.org
 [EMAIL PROTECTED]
 Membre fondateur du LUG Béziers
 http://www.lug-beziers.org
 [EMAIL PROTECTED]

 --
 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]




RE: html:submit -- DispatchAction

2002-11-18 Thread Míguel Ángel Mulero Martínez
You can use the html:image tag.

Regards,
Miguel

-Mensaje original-
De: Murray, Christopher [mailto:[EMAIL PROTECTED]]
Enviado el: lunes, 18 de noviembre de 2002 12:28
Para: 'Struts Users Mailing List'
Asunto: html:submit -- DispatchAction


How do you customize html:submit tags to use your own button image ?

--
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]




RE: onclick attribute doesnt work in html:img tag?

2002-11-18 Thread Míguel Ángel Mulero Martínez
The html:img don't have onclick function. This is because Netscape don't
support it (Explorer yes).

regards.


 -Mensaje original-
 De: Drew Zimber [mailto:[EMAIL PROTECTED]]
 Enviado el: lunes, 18 de noviembre de 2002 16:09
 Para: 'Struts Users Mailing List'
 Asunto: onclick attribute doesnt work in html:img tag?




 anyone had any experience with this.  Anytime i add the onclick
 attribute it
 crashes the page..


 dz


 --
 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]




RE: ArrayList disappeared in ActionForm

2002-11-18 Thread Míguel Ángel Mulero Martínez
Hi Sri,

 Looking at your multibox logic, is the 'rol' property in the
 'userDataBean' an array of Strings?  This should represent the
 value(s) that the user selects -- so, if the initial setting is
 all boxes un-checked, this will be an empty String[].

Yes, the rol is a String[]. It works OK when I present the HTML form the
first time. Afterwards I can't present it because the rolesPosibles doesn't
exist.


 Are you modifying/setting your ArrayList (rolesPossibles) in the
 reset?  I don't see how else it can become null.  This list, as
 you know, represents all the possible checkbox values.

The only thing I modify in the reset is the userDataBean.rol (and I have
tried too to erase the reset function). I modify the roles posibles only in
the set.


 I don't know if the above helped.  Another source of information
 is the html-multibox.jsp that is part of the
 struts-exercise-taglib application that ships with Struts.

 Sri


Thanks for your help. I will take a look to the source of multibox to see if
this help. It's a strange thing that. I've done a lot of HTML forms with
Struts and never had encounter this problems.

Thanks again!
Miguel



 -Original Message-
 From: Míguel Ángel Mulero Martínez
 [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 18, 2002 2:06 AM
 To: Struts Users Mailing List
 Subject: RE: ArrayList disappeared in ActionForm


 Hi all!

 Thanks to both for your reply. Sorry for my late reply (and my
 poor english) but in the weekend I can't write to the group.

 Here some code of my classes (comments are in spanish, sorry):


 My ActionForm has:

 
 public class FichaUsuarioActionForm extends ActionForm {

 


 /** Datos del usuario */

 private FichaUsuarioDataBean ficha;

 /** Roles posibles para situar en el formulario */

 private ArrayList rolesPosibles;



 public FichaUsuarioActionForm() {

 log.debug(Constructor iniciado);

 ficha = new FichaUsuarioDataBean();

 log.debug(Constructor finalizado);

 }



 public FichaUsuarioDataBean getUserDataBean() {

 log.debug(getUserDataBean ejecutado);

 return ficha;

 }



 public void setUserDataBean(FichaUsuarioDataBean user) {

 log.debug(setLoginDataBean ejecutado);

 ficha = user;

 }



 public ArrayList getRolesPosibles() {

 log.debug(getRolesPosibles ejecutado);

 return rolesPosibles;

 }



 public void setRolesPosibles(ArrayList _roles) {

 log.debug(setRolesPosibles ejecutado);

 rolesPosibles = _roles;

 }

 .

 }

 ---


 ficha is used to retrieve the values of a HTML form.
 rolesPosibles is an ArrayList that I must use in the same HTML
 form (in a multicheck tag). They are private, so I must set its
 values using the set function, and this function writes to
 the log a message. The constructor writes to the log too.


 In the Action before the HTML form, I use the setRolesPosibles()
 to put an inicial ArrayList.

 My HTML form is in the way (login/editarUsuario.jsp):

 --

 html:form action=/modificaUsuarioAction.do
 focus=userDataBean.user enctype=multipart/form-data

 html:text name=fichaUsuario property=userDataBean.user
 size=60 /

 ..

 logic:iterate name=fichaUsuario property=rolesPosibles
 id=elementoListadoRoles

 html:multibox name=fichaUsuario property=userDataBean.rol

 bean:write name=elementoListadoRoles property=string1/

 /html:multibox

 bean:write name=elementoListadoRoles property=string2 /br

 /logic:iterate

 ..

 


 So I use the rolesPosibles to put a list of checkbox in my HTML
 form. The struts-config.xml is like:

 ---



 

 form-bean  name=fichaUsuario


 type=es.mulria.bonsai.login.actionform.FichaUsuarioActionForm/

 

   actionpath=/modificaUsuarioAction

  type=es.mulria.bonsai.login.action.ModificarUsuariosAction

  name=fichaUsuario

  input=/login/editarUsuario.jsp

  validate=true

   /action

 ...

 ---


 My problem is that if the validate() of the ActionForm has
 errors, and returns to the HTML form, the ArrayList rolesPosibles
 has disappear (null), but the ficha not, and has all the values
 the user puts in the HTML form. The log is like (I only put the
 ActionForm log):

 --



 # The Action before the JSP creates the ActionForm with the
 ArrayList, and puts it in the request

 15 nov 2002 19:25:54,280 [Thread-7] DEBUG
 es.mulria.bonsai.login.actionform.FichaUsuarioActionForm  -
 Constructor iniciado

 15 nov 2002 19:25:54,280 [Thread-7] DEBUG
 es.mulria.bonsai.login.actionform.FichaUsuarioActionForm  -
 Constructor finalizado

 15 nov 2002 19:25:54,340 [Thread-7] DEBUG
 es.mulria.bonsai.login.actionform.FichaUsuarioActionForm  -
 setRolesPosibles ejecutado

 



 # Here rolesPosibles has an ArrayList. I can see it if I print

RE: onclick attribute doesnt work in html:img tag?

2002-11-18 Thread Míguel Ángel Mulero Martínez
I think Netscape 6 and 7 yes.

 -Mensaje original-
 De: Andrew Hill [mailto:[EMAIL PROTECTED]]
 Enviado el: martes, 19 de noviembre de 2002 4:07
 Para: Struts Users Mailing List
 Asunto: RE: onclick attribute doesnt work in html:img tag?


 Not even netscrap 6 ?

 -Original Message-
 From: Míguel Ángel Mulero Martínez
 [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 18, 2002 23:29
 To: Struts Users Mailing List; [EMAIL PROTECTED]
 Subject: RE: onclick attribute doesnt work in html:img tag?


 The html:img don't have onclick function. This is because Netscape don't
 support it (Explorer yes).

 regards.


  -Mensaje original-
  De: Drew Zimber [mailto:[EMAIL PROTECTED]]
  Enviado el: lunes, 18 de noviembre de 2002 16:09
  Para: 'Struts Users Mailing List'
  Asunto: onclick attribute doesnt work in html:img tag?
 
 
 
 
  anyone had any experience with this.  Anytime i add the onclick
  attribute it
  crashes the page..
 
 
  dz
 
 
  --
  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]


 --
 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]




RE: MySQL connection pooling problems!! (please help)

2002-11-18 Thread Míguel Ángel Mulero Martínez
I don't know it this would help, but I use the pooling classes of jakarta.
Take a look at:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how
to.html

It's an example under Tomcat.

Regards,
Miguel

 -Mensaje original-
 De: andres garcia [mailto:[EMAIL PROTECTED]]
 Enviado el: lunes, 18 de noviembre de 2002 22:46
 Para: [EMAIL PROTECTED]
 Asunto: MySQL connection pooling problems!! (please help)


 Hi.
 I'm new to struts, and i have find it great, until connection
 poolling. I'm
 using the GenericDataSurce implementation and my aplicattion uses a
 singleton to access de connection. All the code was in a Wrox book
 (Beginning jsp).
 I'm having this problem:
 I have a action servlet that query the database using a connection of the
 pool. The first times the connection is recicled, but after some
 requests,
 the pool creates a new connection and the first one is lost. I'm
 sure that
 the action servlet is closing the connections because i'm logging
 this (the
 file seems ok: open - close - open -close). With more request to
 the action
 all the connections are used and i can`t connect any more to the
 database.
 I'm the only client (the server is my pc)!!. What is going on?
 What is the
 problem?
 Is a bug of the GenericDataSource? (if i should use other pool, please
 recommend me one easy to install)

 Other question: The connection pooling must be supported by the
 driver or is
 independant? (i'm using the mm.mysql driver latest release)

 _
 Charla con tus amigos en línea mediante MSN Messenger:
 http://messenger.microsoft.com/es


 --
 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]




RE: ArrayList disappeared in ActionForm

2002-11-17 Thread Míguel Ángel Mulero Martínez
 2002 15:48
Para: [EMAIL PROTECTED]
Asunto: RE: ArrayList disappeared in ActionForm


Hi,
I didnt understand your problem very well.But some points U should know.

 I use the log4j, and the constructor of the ActionForm isn't
 called. The set for the ArrayList isn't called too.

Struts uuses Class.forName() .newInstance() to instantiate new form objects.
So the default constructor will be called in this case.So Any lists etc u
need
to set must Be initialised in the default constructor.

-Original Message-
From: Sri.Sankaran [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 15, 2002 3:18 PM
To: struts-user
Subject: RE: ArrayList disappeared in ActionForm


Intermixed...

 -Original Message-
 From: Míguel Ángel Mulero Martínez
 [mailto:[EMAIL PROTECTED]]
 Sent: Friday, November 15, 2002 2:03 AM
 To: Lista Struts
 Subject: ArrayList disappeared in ActionForm


 Hi all! I've got a little problem with Struts 1.0.2.

 I've got an ActionForm with two objects: one for save the
 values of a HTML form, and an ArrayList with Strings to print
 in the HTML form.

I don't follow.  Why do you need separate objects for display and for
capture.
That  is the purpose of the ActionForm.


 The HTML form inits well, reading the values (object and
 ArrayList) from the ActionForm created in an Action before.
 When I press the submit button, the reset function is called
 and afterwards the object is updated with the new values. My
 problem is that if I read the ArrayList, it is null.

How do the objects in your ActionForm map to your ArrayList.  Need to see
some
code.  Send appropriate sections of your JSP, form-bean (ActionForm) and
Action
class.


 I use the log4j, and the constructor of the ActionForm isn't
 called. The set for the ArrayList isn't called too.

 Where is my ArrayList? Why it's null?

 Thanks to all!

 Miguel


Sri



 --
 To unsubscribe, e-mail:
 mailto:struts-user- [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]



--
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]




ArrayList disappeared in ActionForm

2002-11-14 Thread Míguel Ángel Mulero Martínez
Hi all! I've got a little problem with Struts 1.0.2.

I've got an ActionForm with two objects: one for save the values of a HTML
form, and an ArrayList with Strings to print in the HTML form.

The HTML form inits well, reading the values (object and ArrayList) from the
ActionForm created in an Action before. When I press the submit button, the
reset function is called and afterwards the object is updated with the new
values. My problem is that if I read the ArrayList, it is null.

I use the log4j, and the constructor of the ActionForm isn't called. The
set for the ArrayList isn't called too.

Where is my ArrayList? Why it's null?

Thanks to all!

Miguel



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