Author Login
Post Reply
user Digest 14 Apr 2008 23:44:34 -0000 Issue 7978
Topics (messages 185392 through 185421):
Re: action not getting called from struts-config
185392 by: newBea
185393 by: newBea
[S2] Spring: Interceptors, prototype or singleton?
185394 by: GF
185397 by: Randy Burgess
185398 by: Don Brown
185399 by: Brad A Cupit
185400 by: Martin Gainty
185416 by: Randy Burgess
Re: [OT] UML and Reverse Engineering
185395 by: Haroon Rafique
Ajax file upload with Struts2 having problem.
185396 by: sharath karnati
<s:iterator with range
185401 by: Danieleippoliti\.libero\.it
185402 by: Dave Newton
Re: [S2] Textfield key with resource bundle
185403 by: Kelly.Graus
[S2] Matching string validator
185404 by: Kelly.Graus
185406 by: Guillaume Bilodeau
185407 by: Dave Newton
185408 by: Kelly.Graus
185413 by: Kelly.Graus
[S1] Strecks
185405 by: Zheng, Xiahong
STruts 2 - populating an ArrayList from the JSP
185409 by: jstraub.altec.org
185410 by: Musachy Barroso
185411 by: Jukka Välimaa
Re: When do I need to extend "ActionSupport"?
185412 by: Zheng, Xiahong
185414 by: Dave Newton
Validation for multiple fields
185415 by: Décio Heinzelmann Luckow
Re: Struts 2 + AjaxTags + DisplayTag
185417 by: matt.payne
Clean some characters in request parameters
185418 by: hernan gonzalez
185419 by: hernan gonzalez
185420 by: hernan gonzalez
Struts Clustering
185421 by: Frans Thamura
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_185392.ezm (zipped)
/send.html gives be blank page...:(
Lukasz Lenart wrote:
>
>> <servlet-mapping>
>> <servlet-name>action</servlet-name>
>> <url-pattern>*.html</url-pattern>
>> </servlet-mapping>
>
> So, then try /sendmail.html
>
>
> Regards
> --
> Lukasz
>
> http://www.linkedin.com/in/lukaszlenart
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185393.ezm (zipped)
The java code inside ReminderAction:
public ActionForward execute(ActionForm form, ActionMapping mapping,
HttpServletRequest request, HttpServletResponse response) throws
IOException, ServletException{
System.out.println("Hi");
ReminderForm reminderForm = (ReminderForm) form;
if (null == reminderService){
ApplicationContext ctx =
WebApplicationContextUtils.getRequiredWebApplicationContext(servlet.getServletContext());
reminderService = (ReminderService)
ctx.getBean("reminderService");
}
reminderService.sendReminderMail();
return mapping.findForward("pass");
}
Antonio Petrelli-3 wrote:
>
> 2008/4/14, newBea <vaibhav.dalvi@(protected)>:
>>
>>
>> struts config is not getting ReminderAction...but the configuration is
>> correct i guess??
>
>
>
> I meant the Java code inside your ReminderAction class.
>
> Antonio
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185394.ezm (zipped)In a guide I found on the web, the interceptor was defined as singleton in
the Spring's ApplicationContext.
If I need to use "changeable" object properties, I need to have it as
Prototype, otherwise different requests will result in a object property
overwriting.
Is there any issues about defining an interceptor as Prototype, or is it ok?
Thanks
GF

Attachment:
user_185397.ezm (zipped)Interceptors are Singletons according to the documentation. If it were me I
would come up with another method besides Spring for changing object
properties.
Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications
> From: GF <ganfab@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Mon, 14 Apr 2008 14:51:25 +0200
> To: Struts Users ML <user@(protected)>
> Subject: [S2] Spring: Interceptors, prototype or singleton?
>
> In a guide I found on the web, the interceptor was defined as singleton in
> the Spring's ApplicationContext.
>
> If I need to use "changeable" object properties, I need to have it as
> Prototype, otherwise different requests will result in a object property
> overwriting.
> Is there any issues about defining an interceptor as Prototype, or is it ok?
>
> Thanks
>
> GF
This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.
This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

Attachment:
user_185398.ezm (zipped)To clarify, interceptors aren't technically singletons as each
instance in an interceptor stack gets its own interceptor instance.
However, for all requests using that stack, the same interceptor will
be used. Therefore, you do need to be careful. For example, most
interceptors take parameters that configure their use within the
stack, like the "validation" interceptor that takes a list of excluded
methods from validation. Interceptors can be configured at the stack
level or at the action level. If at the action level, you will get a
unique interceptor instance for that action.
If you want Spring to construct your interceptor, I recommend the
prototype scope, so that Struts gets a new instance of the interceptor
as expected.
Don
On Tue, Apr 15, 2008 at 12:48 AM, Randy Burgess <RBurgess@(protected):
> Interceptors are Singletons according to the documentation. If it were me I
> would come up with another method besides Spring for changing object
> properties.
>
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
>
>
>
> > From: GF <ganfab@(protected)>
> > Reply-To: Struts Users Mailing List <user@(protected)>
> > Date: Mon, 14 Apr 2008 14:51:25 +0200
> > To: Struts Users ML <user@(protected)>
> > Subject: [S2] Spring: Interceptors, prototype or singleton?
>
>
> >
> > In a guide I found on the web, the interceptor was defined as singleton in
> > the Spring's ApplicationContext.
> >
> > If I need to use "changeable" object properties, I need to have it as
> > Prototype, otherwise different requests will result in a object property
> > overwriting.
> > Is there any issues about defining an interceptor as Prototype, or is it ok?
> >
> > Thanks
> >
> > GF
>
>
>
> This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.
>
>
> This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_185399.ezm (zipped)wow that was a terrific explanation. Thanks Don!
[note: I was not the original poster]
Brad Cupit
Louisiana State University - UIS
e-mail: brad@(protected)
office: 225.578.4774
-----Original Message-----
From: Don Brown [mailto:donald.brown@(protected)]
Sent: Monday, April 14, 2008 10:13 AM
To: Struts Users Mailing List
Subject: Re: [S2] Spring: Interceptors, prototype or singleton?
To clarify, interceptors aren't technically singletons as each
instance in an interceptor stack gets its own interceptor instance.
However, for all requests using that stack, the same interceptor will
be used. Therefore, you do need to be careful. For example, most
interceptors take parameters that configure their use within the
stack, like the "validation" interceptor that takes a list of excluded
methods from validation. Interceptors can be configured at the stack
level or at the action level. If at the action level, you will get a
unique interceptor instance for that action.
If you want Spring to construct your interceptor, I recommend the
prototype scope, so that Struts gets a new instance of the interceptor
as expected.
Don
On Tue, Apr 15, 2008 at 12:48 AM, Randy Burgess <RBurgess@(protected)>
wrote:
> Interceptors are Singletons according to the documentation. If it were
me I
> would come up with another method besides Spring for changing object
> properties.
>
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
>
>
>
> > From: GF <ganfab@(protected)>
> > Reply-To: Struts Users Mailing List <user@(protected)>
> > Date: Mon, 14 Apr 2008 14:51:25 +0200
> > To: Struts Users ML <user@(protected)>
> > Subject: [S2] Spring: Interceptors, prototype or singleton?
>
>
> >
> > In a guide I found on the web, the interceptor was defined as
singleton in
> > the Spring's ApplicationContext.
> >
> > If I need to use "changeable" object properties, I need to have it
as
> > Prototype, otherwise different requests will result in a object
property
> > overwriting.
> > Is there any issues about defining an interceptor as Prototype, or
is it ok?
> >
> > Thanks
> >
> > GF
>
>
>
> This email and any attachments ("Message") may contain legally
privileged and/or confidential information. If you are not the
addressee, or if this Message has been addressed to you in error, you
are not authorized to read, copy, or distribute it, and we ask that you
please delete it (including all copies) and notify the sender by return
email. Delivery of this Message to any person other than the intended
recipient(s) shall not be deemed a waiver of confidentiality and/or a
privilege.
>
>
> This email and any attachments ("Message") may contain legally
privileged and/or confidential information. If you are not the
addressee, or if this Message has been addressed to you in error, you
are not authorized to read, copy, or distribute it, and we ask that you
please delete it (including all copies) and notify the sender by return
email. Delivery of this Message to any person other than the intended
recipient(s) shall not be deemed a waiver of confidentiality and/or a
privilege.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_185400.ezm (zipped)I assume you're speaking of the capabilities of the spring-plugin?
http://struts.apache.org/2.x/docs/spring-plugin.html
A very good article on Spring BeanFactory scope parameters can be found
here:
http://www.theserverside.com/tt/articles/article.tss?l=IntrotoSpring25
where Bean Factory scope is defined to be:
a.. Singleton: in this case, there's one shared instance of the object with
a particular name, which will be retrieved on lookup. This is the default,
and most often used, mode. It's ideal for stateless service objects.
a.. Prototype or non-singleton: in this case, each retrieval will result in
the creation of an independent object. For example, this could be used to
allow each caller to have a distinct object reference.
a.. Custom object "scopes", which typically interact with a store outside
the control of the container. Some of these come out of the box, such as
request and session (for web applications). Others come with third party
products, such as clustered caches. It is easy to define custom scopes in
the event that none of those provided out of the box is sufficient, through
implementing a simple interface.
Once you've committed to BeanFactory scope as either (shared) singleton or
(distinct object reference) prototype
there is no ability to change scope from then on
in /WEB-INF/web.xml you might have a way to determine the
applicationContext.xml file location such as what is displayed here
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext-*.xml,classpath*:applicationContext
-*.xml</param-value>
</context-param>
Simplest case for ./WEB-INF/applicationContext.xml configuration where bean
is declared as prototype (singleton="false")
<beans default-autowire="autodetect">
<bean id="bar" class="com.my.BarClass" singleton="false"/>
</beans>
The autowire property of struts.objectFactory.spring.autoWire is a bit
tricky as for Bean Dependency Injection you will
need an exact match on name, or class-type or constructor
HTH
Martin
----- Original Message -----
From: "GF" <ganfab@(protected)>
To: "Struts Users ML" <user@(protected)>
Sent: Monday, April 14, 2008 8:51 AM
Subject: [S2] Spring: Interceptors, prototype or singleton?
> In a guide I found on the web, the interceptor was defined as singleton in
> the Spring's ApplicationContext.
>
> If I need to use "changeable" object properties, I need to have it as
> Prototype, otherwise different requests will result in a object property
> overwriting.
> Is there any issues about defining an interceptor as Prototype, or is it
ok?
>
> Thanks
>
> GF
>

Attachment:
user_185416.ezm (zipped)So the interceptor would have to be declared at the action level in this
case then? If I have a spring bean named myBean that is default scope and I
inject another bean declared as a prototype into it, the injected bean will
still be a singleton since there will be only one instance of myBean.
Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications
> From: Don Brown <donald.brown@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Tue, 15 Apr 2008 01:12:49 +1000
> To: Struts Users Mailing List <user@(protected)>
> Subject: Re: [S2] Spring: Interceptors, prototype or singleton?
>
> To clarify, interceptors aren't technically singletons as each
> instance in an interceptor stack gets its own interceptor instance.
> However, for all requests using that stack, the same interceptor will
> be used. Therefore, you do need to be careful. For example, most
> interceptors take parameters that configure their use within the
> stack, like the "validation" interceptor that takes a list of excluded
> methods from validation. Interceptors can be configured at the stack
> level or at the action level. If at the action level, you will get a
> unique interceptor instance for that action.
>
> If you want Spring to construct your interceptor, I recommend the
> prototype scope, so that Struts gets a new instance of the interceptor
> as expected.
>
> Don
>
> On Tue, Apr 15, 2008 at 12:48 AM, Randy Burgess <RBurgess@(protected):
>> Interceptors are Singletons according to the documentation. If it were me I
>> would come up with another method besides Spring for changing object
>> properties.
>>
>> Regards,
>> Randy Burgess
>> Sr. Web Applications Developer
>> Nuvox Communications
>>
>>
>>
>>> From: GF <ganfab@(protected)>
>>> Reply-To: Struts Users Mailing List <user@(protected)>
>>> Date: Mon, 14 Apr 2008 14:51:25 +0200
>>> To: Struts Users ML <user@(protected)>
>>> Subject: [S2] Spring: Interceptors, prototype or singleton?
>>
>>
>>>
>>> In a guide I found on the web, the interceptor was defined as singleton in
>>> the Spring's ApplicationContext.
>>>
>>> If I need to use "changeable" object properties, I need to have it as
>>> Prototype, otherwise different requests will result in a object property
>>> overwriting.
>>> Is there any issues about defining an interceptor as Prototype, or is it ok?
>>>
>>> Thanks
>>>
>>> GF
>>
>>
>>
>> This email and any attachments ("Message") may contain legally privileged
>> and/or confidential information. If you are not the addressee, or if this
>> Message has been addressed to you in error, you are not authorized to read,
>> copy, or distribute it, and we ask that you please delete it (including all
>> copies) and notify the sender by return email. Delivery of this Message to
>> any person other than the intended recipient(s) shall not be deemed a waiver
>> of confidentiality and/or a privilege.
>>
>>
>> This email and any attachments ("Message") may contain legally privileged
>> and/or confidential information. If you are not the addressee, or if this
>> Message has been addressed to you in error, you are not authorized to read,
>> copy, or distribute it, and we ask that you please delete it (including all
>> copies) and notify the sender by return email. Delivery of this Message to
>> any person other than the intended recipient(s) shall not be deemed a waiver
>> of confidentiality and/or a privilege.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.
This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

Attachment:
user_185395.ezm (zipped)On Friday at 8:01am, AK=>Ashish Kulkarni <ashish.kulkarni13@(protected):
AK> Hi
AK> Is there any decent Open Source tool out there which can be used to do
AK> reverse engineering of Java code,
AK> If not open source then some thing which really works,
AK> Any input would be really appreciated
AK>
AK> Ashish
AK>
Ashish,
I have used ESS-Model in the past (long time ago). Last release was in
2003, so it might be too old of a release.
http://essmodel.sourceforge.net/
Cheers,
--
Haroon Rafique
<haroon.rafique@(protected)>

Attachment:
user_185396.ezm (zipped)Hi All,
For ajax file upload in struts2, I used below plugins(including
apache common fileupload)
AjaxFileUpload-0.03.jar
json-lib-2.0-jdk15.jar
After adding these .jar files into my project, when I try to access
one of my page which is having tabbedpane with theme="ajax", I'm
getting 'dojo' error messages in firefox console and I'm loosing tabbed pane
in web page view. I'm getting below 'dojo' errors.
dojo is not defined
dojo.require("dojo.io.BrowserIO");
dojoRequire.js (line 22)
dojo is not defined
<div
Help.action (line 360)
dojo is not defined
<div
Help.action (line 350)
dojo is not defined
null
If I remove these .jar files from my /lib folder then it is working
fine.
Regards,
Sharath.

Attachment:
user_185401.ezm (zipped)Hi,
I have a bean which have a variable List l, this list is readed from a JSP to show the elements.
But I would to show each elements in a different side in the HTML page so when i write <s:iterator value="l" i would specify the range of iteration (the first two elements...)
So I can have the elements in different side of page.
I'm afraid for my english
regards.
Daniele

Attachment:
user_185402.ezm (zipped)--- "Danieleippoliti@(protected):
> I have a bean which have a variable List l, this list is readed from a JSP
> to show the elements.
> But I would to show each elements in a different side in the HTML page so
> when i write <s:iterator value="l" i would specify the range of iteration
> (the first two elements...)
> So I can have the elements in different side of page.
The <s:iterator...> tag is limited in capability; you might want to use
JSTL's <c:forEach...>.
Or you can use the "status" attribute to make formatting decisions based on
the index, for example:
<%-- Pseudocode! Do not copy verbatim! --%>
<s:iterator value=... status="stat">
<s:if test="stat.index % 1 == 1">
</tr>
<tr>
</s:if>
</s:iterator>
or something similar depending on your needs.
Another option is to do the list manipulation in the action, creating
multiple lists for the view, and iterate over them in the JSP. This can be
done using a regular iterator tag, or the <s:merge...> tag [1] could be used.
There are plenty of options ;)
> I'm afraid for my english
I'm afraid for *my* English, and in theory, it's my native language... and I
guarantee you that your English is far, far better than my Italian.
Dave
[1] http://struts.apache.org/2.x/docs/merge.html

Attachment:
user_185403.ezm (zipped)
Jeromy Evans - Blue Sky Minds wrote:
>
>
> Thanks Kelly, that would be great because I'm sure there's a bug here
> that's hard to replicate.
> The model for ModelDriven gets pushed in front of the action. If it had
> a getText(String) method it would have caused this problem.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
Hi Jeremy,
I worked on this all morning, and I believe I'm at the exact same place I
was before when it was breaking, but everything works fine now.
My model doesn't have a getText( String ) function, so I don't think that
was it.
If I run across it again, I will make a copy of the project and send it to
you.
Kelly
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185404.ezm (zipped)
Hello,
Does struts 2 have a built in validator that will allow me to make sure two
fields match (ie, two password fields). From looking around, it seems that
struts 1 had validatewhen which could be used, but I haven't been able to
find anything for struts 2.
Thanks!
Kelly
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185406.ezm (zipped)
Sure, you can use an ExpressionValidator annotation with an OGNL expression
like this:
@ExpressionValidator(expression = "password1.equals(password2)", ...)
Cheers,
GB
Kelly.Graus wrote:
>
> Hello,
>
> Does struts 2 have a built in validator that will allow me to make sure
> two fields match (ie, two password fields). From looking around, it seems
> that struts 1 had validatewhen which could be used, but I haven't been
> able to find anything for struts 2.
>
> Thanks!
>
> Kelly
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185407.ezm (zipped)--- "Kelly.Graus" <Kelly.Graus@(protected):
> Does struts 2 have a built in validator that will allow me to make sure two
> fields match (ie, two password fields). From looking around, it seems that
> struts 1 had validatewhen which could be used, but I haven't been able to
> find anything for struts 2.
http://struts.apache.org/2.x/docs/expression-validator.html
http://struts.apache.org/2.x/docs/fieldexpression-validator.html
Dave

Attachment:
user_185408.ezm (zipped)
Guillaume Bilodeau wrote:
>
> Sure, you can use an ExpressionValidator annotation with an OGNL
> expression like this:
>
> @ExpressionValidator(expression = "password1.equals(password2)", ...)
>
> Cheers,
> GB
>
Thanks for the reply! I'm using field validators, so I did this:
<field-validator type="fieldexpression">
<![CDATA[#password1.equals( password2 )]]>
<message>The passwords do not match!</message>
</field-validator>
Which works perfectly. Thanks!
Kelly
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185413.ezm (zipped)
Kelly.Graus wrote:
>
> Thanks for the reply! I'm using field validators, so I did this:
>
> <field-validator type="fieldexpression">
> <![CDATA[#password1.equals( password2 )]]>
> <message>The passwords do not match!</message>
> </field-validator>
>
> Which works perfectly. Thanks!
>
> Kelly
>
Actually, it should be:
<field-validator type="fieldexpression">
<![CDATA[password1.equals( password2 )]]>
<message>The passwords do not match!</message>
</field-validator>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185405.ezm (zipped)Anybody used Strecks with Struts 1.x? I was made aware of this extension
project and it seems very attractive for integrating existing struts 1.x
applications for struts 2 like features while preserve backward
compatibility. Any thoughts? The mailing list seems to be dead; the last
message posted was more than 1 year ago.

Attachment:
user_185409.ezm (zipped)I am having a similar problem to Ancat:
I have an arrayList named 'students' in an action. I use this action to
load values for a .jsp which contains the following code:
<s:form action="Instructor/Home!saveChanges">
<s:iterator status="stat" value="students">
<s:textfield name="students[#stat.index].lastName" /></td>
<s:textfield name="students[#stat.index].firstName" /></td>
<s:textfield name="students[#stat.index].userName" /></td>
<s:textfield name="students[#stat.index].userPassword" /></td>
</s:iterator>
</s:form>
This displays my arrayList correctly, but when I submit to my action, I
cannot retrieve the modified arrayList.
Am I mistaken in thinking I simply need a getter/setter for an arrayList
named "students" in my receiving action?

Attachment:
user_185410.ezm (zipped)Look at your HTML and you will see why, you need to add %{} around
#stat.index, so the name of the fields are students[0], students[1],
etc.
musachy
On Mon, Apr 14, 2008 at 6:54 PM, <jstraub@(protected):
> I am having a similar problem to Ancat:
>
> I have an arrayList named 'students' in an action. I use this action to
> load values for a .jsp which contains the following code:
>
> <s:form action="Instructor/Home!saveChanges">
>
> <s:iterator status="stat" value="students">
> <s:textfield name="students[#stat.index].lastName" /></td>
> <s:textfield name="students[#stat.index].firstName" /></td>
> <s:textfield name="students[#stat.index].userName" /></td>
> <s:textfield name="students[#stat.index].userPassword" /></td>
> </s:iterator>
>
> </s:form>
>
> This displays my arrayList correctly, but when I submit to my action, I
> cannot retrieve the modified arrayList.
>
> Am I mistaken in thinking I simply need a getter/setter for an arrayList
> named "students" in my receiving action?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_185411.ezm (zipped)Hi,
You do need a getter for list. I don't think you need a setter, though.
Your textfields should have a value attribute in addition to name, to access
the getters, which I suppose you have even if you don't show them, since it
displays your arraylist correctly. Is using #stat.index enough without
using ognl? Look at your page source. If the #stat.indexes are not replaced
by numbers, use this: %{#stat.index}.
Jukka
On Mon, Apr 14, 2008 at 9:54 PM, <jstraub@(protected):
> I am having a similar problem to Ancat:
>
> I have an arrayList named 'students' in an action. I use this action to
> load values for a .jsp which contains the following code:
>
> <s:form action="Instructor/Home!saveChanges">
>
> <s:iterator status="stat" value="students">
> <s:textfield name="students[#stat.index].lastName" /></td>
> <s:textfield name="students[#stat.index].firstName" /></td>
> <s:textfield name="students[#stat.index].userName" /></td>
> <s:textfield name="students[#stat.index].userPassword" /></td>
> </s:iterator>
>
> </s:form>
>
> This displays my arrayList correctly, but when I submit to my action, I
> cannot retrieve the modified arrayList.
>
> Am I mistaken in thinking I simply need a getter/setter for an arrayList
> named "students" in my receiving action?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_185412.ezm (zipped)Struts 2 promotes POJO based action. However I found most of the Action
classes from the sample application extends ActionSupport? By looking at
the ActionSupport class in Xwork, I found it implements quite a few
interfaces, e.g. Valicateable, ValidationAware, TextProvider,
LocalProvider and Action. My question is if I don't extend
ActionSupport, do I lose all the above functionalities, validation,
locale, etc, even if I have the corresponding interceptors configured?

Attachment:
user_185414.ezm (zipped)--- "Zheng, Xiahong" <Xiahong.Zheng@(protected):
> Struts 2 promotes POJO based action. However I found most of the Action
> classes from the sample application extends ActionSupport? By looking at
> the ActionSupport class in Xwork, I found it implements quite a few
> interfaces, e.g. Valicateable, ValidationAware, TextProvider,
> LocalProvider and Action. My question is if I don't extend
> ActionSupport, do I lose all the above functionalities, validation,
> locale, etc, even if I have the corresponding interceptors configured?
Yes (more or less; some annotations may provide functionality without
explicit interface implementation).
The interceptors (and other functions that expect the interfaces, like I18N)
use the interfaces as markers to indicate that a various action should be
performed, identify the existence of functionality, and so on.
Dave

Attachment:
user_185415.ezm (zipped)Hi All,
Struts have some way to do the validation for multiple fields?
Décio

Attachment:
user_185417.ezm (zipped)
You could try struts2 + jquery + jgrid
(http://trirand.com/jqgrid/jqgrid.html)
If you need ajax, you need something that returns an json or xml response
(insert you velocity, freemarker, json result, jsp result here).
Matt
Márcio Gurgel wrote:
>
> Hi all!
>
> Since this morning I'm having troubles to configure ajaxTags in my
> project.
> I followed the steps from ajaxTags web site, I also saw the ajaxTags show
> case wich contains a example of display:table.
> But doen't work...
>
> Is there some kind os special configuration for struts 2?
> My displayTable is inside a <sx:tabbedPanel><sx:div>
>
> I also tried to use: useSelectedTabCookie="useSelectedTabCookie" to select
> the correct tab when my displayTable pagination submits the page.
> In this case, the content of the first tab doesn't appear.
>
> Regards.
>
> Márcio Gurgel
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185418.ezm (zipped)Assume I have a lot of html forms with text inputs, and I want to
palce some restrictions for the set of allowed chars. Sort of a sanity
check, at the charset level.
For a concrete example, my storage (db) uses LATIN9 (iso-8859-15), and
the user sometimes can enter the non-allowed acute-accent (instead of
the intended-correct apostrophe). In this -and similar cases- I want
to detect it (replacing it with the "good" character, or throwing an
error). I wish to do it globally, not field by field... though not for
the entire application, but for a set of actions.
I was thinking of an interceptor that operates at the
HttpServletRequest level, before the ParametersInterceptor is applied
(I don't care if the http param corresponds to a String property), but
this does not seem very straightforward , as the HttpServletRequest
does not allow to manipulate the params.
Any suggestion or pointer?
Hernán

Attachment:
user_185419.ezm (zipped)Assume I have a lot of html forms with text inputs, and I want to
palce some restrictions for the set of allowed chars. Sort of a sanity
check, at the charset level.
For a concrete example, my storage (db) uses LATIN9 (iso-8859-15), and
the user sometimes can enter the non-allowed acute-accent (instead of
the intended-correct apostrophe). In this -and similar cases- I want
to detect it (replacing it with the "good" character, or throwing an
error). I wish to do it globally, not field by field... though not for
the entire application, but for a set of actions.
I was thinking of an interceptor that operates at the
HttpServletRequest level, before the ParametersInterceptor is applied
(I don't care if the http param corresponds to a String property), but
this does not seem very straightforward , as the HttpServletRequest
does not allow to manipulate the params.
Any suggestion or pointer?
Hernán

Attachment:
user_185420.ezm (zipped)Assume I have a lot of html forms with text inputs, and I want to
palce some restrictions for the set of allowed chars. Sort of a sanity
check, at the charset level.
For a concrete example, my storage (db) uses LATIN9 (iso-8859-15), and
the user sometimes can enter the non-allowed acute-accent (instead of
the intended-correct apostrophe). In this -and similar cases- I want
to detect it (replacing it with the "good" character, or throwing an
error). I wish to do it globally, not field by field... though not for
the entire application, but for a set of actions.
I was thinking of an interceptor that operates at the
HttpServletRequest level, before the ParametersInterceptor is applied
(I don't care if the http param corresponds to a String property), but
this does not seem very straightforward , as the HttpServletRequest
does not allow to manipulate the params.
Any suggestion or pointer?
Hernán

Attachment:
user_185421.ezm (zipped)hi all
we are try to make clusteirng in Struts2,
and we are see Terracotta as the candidate integration
any experience with clustering, is terracotta the best one
F