Re: Struts 2 s:action tag doesn't render action errors if any are present

2010-10-28 Thread Li Ying
> 2. What I liked about having an action for rendering the controls it's that I > can reuse them across different JSP pages.  What other alternatives do you > suggest me that can achieve the same level of modularity? Try or . You can create a common jsp, and include it in different pages. Ac

Re: REST and Web API

2010-10-28 Thread Dale Newfield
On 10/28/10 10:31 PM, Chris Pratt wrote: That coupled with looking at how Google & FaceBook did things Careful. Read the agreements you signed to get those accounts and make sure that in reverse engineering their practices you're not violating that contract. If you're not careful they might

Re: REST and Web API

2010-10-28 Thread Chris Pratt
I downloaded the book Jordi recommended to my Kindle and it looks like a very good read. That coupled with looking at how Google & FaceBook did things and I think I'll be confident enough to design my own API. (*Chris*) On Thu, Oct 28, 2010 at 5:08 PM, Frans Thamura wrote: > The idea wanna to

Re: REST and Web API

2010-10-28 Thread Frans Thamura
The idea wanna to create a web api like facebook and google did But need a ref to strengten my reason behind creation /m/ -Original Message- From: Martin Gainty Date: Thu, 28 Oct 2010 18:30:11 To: Struts Users Mailing List Reply-To: "Struts Users Mailing List" Subject: RE: REST and W

Re: Struts 2 s:action tag doesn't render action errors if any are present

2010-10-28 Thread Maurizio Cucchiara
> I am using defaultStack but I was reading the issue you just told me: Well, default stack includes chain interceptor. > And by the way I am using the lastest version 2.2.1 Unfortunately, I'm pretty sure that chainInterceptor doesn't copy action errors (the attached patch in WW-2869 prevents thi

RE: Struts 2 s:action tag doesn't render action errors if any are present

2010-10-28 Thread Alfredo Manuel Osorio Martinez
I am using defaultStack but I was reading the issue you just told me: https://issues.apache.org/jira/browse/WW-2869 And talks about invoking an action with the action tag an ChainingInterceptor but I don't know if the actionErrors from the source action will be copied. And by the way I am using

Re: Struts 2 s:action tag doesn't render action errors if any are present

2010-10-28 Thread Maurizio Cucchiara
I don't know what struts version you are running, in 2.2.1 version, chain interceptor should copy actionError through actions. -- Maurizio Cucchiara - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional comm

RE: REST and Web API

2010-10-28 Thread Martin Gainty
is your Web Service Resource Centric ? or 1 gigantic ComplexType document? for the first go with REST for the other go with Axis-2.1.6 Martin Gainty __ Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de c

Re: Struts 2 s:action tag doesn't render action errors if any are present

2010-10-28 Thread Maurizio Cucchiara
> Which interceptor do you mean? ChainingInterceptor? I meant implementing a new Interceptor from scratch. Although this issue are related to the chainInterceptor. What interceptor stack are you using? Does your request fire chainInterceptor? 2010/10/29 Alfredo Manuel Osorio Martinez : -- Mauriz

RE: Struts 2 s:action tag doesn't render action errors if any are present

2010-10-28 Thread Alfredo Manuel Osorio Martinez
Which interceptor do you mean? ChainingInterceptor? Alfredo Osorio -Mensaje original- De: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com] Enviado el: Thursday, October 28, 2010 4:25 PM Para: Struts Users Mailing List Asunto: Re: Struts 2 s:action tag doesn't render action errors

Re: Struts 2 s:action tag doesn't render action errors if any are present

2010-10-28 Thread Maurizio Cucchiara
I totally agree with Dave: ParameterInterceptor is the better choice. BTW, I'm not sure it fits your needs but you should take a look at this issue https://issues.apache.org/jira/browse/WW-2869 and https://issues.apache.org/jira/browse/WW-3488 (especially where Lukasz talked about copyErrors and co

Re: REST and Web API

2010-10-28 Thread Jordi Fernandez
I recommend you "REST in Practice" http://amzn.to/a5svl3 On 28/10/2010 17:22, Frans Thamura wrote: hi all anyone have a literature or reference to create good WebAPI i want to create a good Web API using S2/REST like FB API, why is it good? or GData API F -

convention plugin and unit testing

2010-10-28 Thread Aaron Brown
I'm using Struts 2.1.8 with the convention plugin to configure struts2 with annotations instead of xml files. When I write unit tests for actions using StrutsSpringTestCase or StrutsTestCase, it appears that the convention plugin isn't scanning my java packages for action classes when the rest of t

RE: Struts 2 s:action tag doesn't render action errors if any are present

2010-10-28 Thread Alfredo Manuel Osorio Martinez
The problem is that the functionality it's already working except for the validation message part. Also the scenario was just an example it's not the real code from the application. In my application I have 4 controls Country, State, City and Postal Code and I need to use that four controls on

Re: Struts 2 s:action tag doesn't render action errors if any are present

2010-10-28 Thread Dave Newton
You could try keeping them in the session, but that might involve tricky configuration sometimes--not sure. You're rendering a single control; I don't see that you're saving much... I still believe Preparable is a cleaner choice. You might be able to configure the action in such a way that the act

RE: Struts 2 s:action tag doesn't render action errors if any are present

2010-10-28 Thread Alfredo Manuel Osorio Martinez
Hello Dave and thank you for your quick response, 1. Let's say I want to keep doing the rendering of the control in that way. How would I solve the problem with the action error messages? 2. What I liked about having an action for rendering the controls it's that I can reuse them across differen

Re: Struts 2 s:action tag doesn't render action errors if any are present

2010-10-28 Thread Dave Newton
Rendering a control (and repopulating its values) is a different thing than displaying validation error messages. IMO the way you're doing it isn't a particularly good idea; it would be better to render the control on the page, *possibly* using s:action to create the list of possible values (which

Struts 2 s:action tag doesn't render action errors if any are present

2010-10-28 Thread Alfredo Manuel Osorio Martinez
For example I have the following: struts.xml: /jsp/personForm.jsp /jsp/successSave.jsp /jsp/personForm.jsp /jsp/countries.jsp personForm.jsp: <%@ taglib prefix="s" uri="/struts-tags" %> CountriesAction.java: public cla

Re: The requested list key 'prices' could not be resolved as a collection/array/map/enumeration/iterator type.

2010-10-28 Thread Dave Newton
But refactor that Java code anyway--it's a mess. On Thu, Oct 28, 2010 at 11:31 AM, cellterry wrote: > > Thanks all, > > It is my fault. During rewriting the jsp, I found that I forgot to delete > the hidden field: > > > > Terry. > > > Li Ying wrote: >> >> You may need check: >> (1)Which jsp page

Re: The requested list key 'prices' could not be resolved as a collection/array/map/enumeration/iterator type.

2010-10-28 Thread cellterry
Thanks all, It is my fault. During rewriting the jsp, I found that I forgot to delete the hidden field: Terry. Li Ying wrote: > > You may need check: > (1)Which jsp pages is executed when you submit your page? > (2)Before the tag reference the list which named "prices", > are you sure you

REST and Web API

2010-10-28 Thread Frans Thamura
hi all anyone have a literature or reference to create good WebAPI i want to create a good Web API using S2/REST like FB API, why is it good? or GData API F

RE: Get s:url in action

2010-10-28 Thread Altenhof, David Aron
I need to create a link to an action, and then send it off in an email. I'll try Li's suggestion, and see if that works. Thanks! -David -Original Message- From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com] Sent: Thursday, October 28, 2010 6:31 AM To: Struts Users Mailing Li

Re: Struts nested and tags

2010-10-28 Thread Dave Westerman
Thanks to you too, Dave. The problem is that I'm a web app newbie, so I wasn't quite sure what you meant. Maurizio just happened to zero in on exactly what I needed to do! :-) > From: Dave Newton > To: Struts Users Mailing List > Date: 10/28/2010 09:05 AM > Subject: Re: Struts nested and tag

Re: The requested list key 'prices' could not be resolved as a collection/array/map/enumeration/iterator type.

2010-10-28 Thread Li Ying
You may need check: (1)Which jsp pages is executed when you submit your page? (2)Before the tag reference the list which named "prices", are you sure you have created it? Because I find the "prices" is created in only one if-else branches.

Re: The requested list key 'prices' could not be resolved as a collection/array/map/enumeration/iterator type.

2010-10-28 Thread Dave Newton
On Thu, Oct 28, 2010 at 8:54 AM, cellterry wrote: > Actually, it gives the same error for another 2 buttons "OK" and "Save". > Sorry for not mentioning about it. It's essentially impossible to debug that code. You'll have to dig through that morass of nested if-elses to determine why your list is

Re: Struts nested and tags

2010-10-28 Thread Dave Newton
I wrote: > If you're not, the entire form needs to reflect it'll be uploading a file. ... On Thu, Oct 28, 2010 at 8:53 AM, Dave Westerman wrote: > Thanks, Maurizio! That was my problem, I never even noticed that. > >> >> The first form doesn't contains enctype attribute. Did you try to set >> it

Re: The requested list key 'prices' could not be resolved as a collection/array/map/enumeration/iterator type.

2010-10-28 Thread cellterry
Actually, it gives the same error for another 2 buttons "OK" and "Save". Sorry for not mentioning about it. Dave Newton-6 wrote: > > Are you sure you understand what the cancel Button actually does? > > That aside, I'd reconsider the use of a cancel button... > > http://www.useit.com/alertbox

Re: Struts nested and tags

2010-10-28 Thread Dave Westerman
Thanks, Maurizio! That was my problem, I never even noticed that. > > The first form doesn't contains enctype attribute. Did you try to set > it to multipart/form-data? >

Re: The requested list key 'prices' could not be resolved as a collection/array/map/enumeration/iterator type.

2010-10-28 Thread Dave Newton
Holy crap. On Thu, Oct 28, 2010 at 8:42 AM, cellterry wrote: > > Yes, sure, here in below: > > > package action; > > > > import java.util.*; > > import javax.servlet.http.HttpServletRequest; > > import org.apache.struts2.ServletActionContext; > > import com.opensymphony.xwork2.ActionContext; > >

Re: The requested list key 'prices' could not be resolved as a collection/array/map/enumeration/iterator type.

2010-10-28 Thread cellterry
Yes, sure, here in below: package action; import java.util.*; import javax.servlet.http.HttpServletRequest; import org.apache.struts2.ServletActionContext; import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.ActionSupport; @SuppressWarnings("serial") public cl

Re: The requested list key 'prices' could not be resolved as a collection/array/map/enumeration/iterator type.

2010-10-28 Thread Dave Newton
Are you sure you understand what the cancel Button actually does? That aside, I'd reconsider the use of a cancel button... http://www.useit.com/alertbox/2416.html Dave On Thursday, October 28, 2010, cellterry wrote: > > Hello all, > > I encountered a strange problem today: > > so.detail.js

Re: The requested list key 'prices' could not be resolved as a collection/array/map/enumeration/iterator type.

2010-10-28 Thread Mead Lai
add the tag to check the objects on that page. Regards, Mead

Re: Get s:url in action

2010-10-28 Thread Dave Newton
On Wed, Oct 27, 2010 at 5:43 PM, Altenhof, David Aron wrote: > I need to create a URL, like one would get from , but in an action. > Are there any easy ways to do this Struts2, or should I try to fiddle aroung > getting a url from ServletContext? Other than the action extension (if you have one),

Re: Get s:url in action

2010-10-28 Thread Maurizio Cucchiara
In struts2 it's up to ActionMapper to map url action (see http://struts.apache.org/2.1.8.1/docs/actionmapper.html for further details). I'm not sure it's the right approach but you could inject actionMapper inside your action class. It's unusually question because action mapping task should be impl

Re: The requested list key 'prices' could not be resolved as a collection/array/map/enumeration/iterator type.

2010-10-28 Thread Maurizio Cucchiara
Did you try to without chain result? -- Maurizio Cucchiara - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: The requested list key 'prices' could not be resolved as a collection/array/map/enumeration/iterator type.

2010-10-28 Thread Li Ying
I need see all your code before I can find what's going wrong. Can you show me the whole Action class and JSP? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.

Re: The requested list key 'prices' could not be resolved as a collection/array/map/enumeration/iterator type.

2010-10-28 Thread cellterry
Yes, I create it inside the action but the error happened before running the first sentence of the "soDetail" action. Li Ying wrote: > > Did you create the list which is referenced in your JSP? > > > 2010/10/28 cellterry : >> >> Hello all, >> >> I encountered a strange problem today: >> >> so

Re: The requested list key 'prices' could not be resolved as a collection/array/map/enumeration/iterator type.

2010-10-28 Thread Li Ying
Did you create the list which is referenced in your JSP? 2010/10/28 cellterry : > > Hello all, > > I encountered a strange problem today: > > so.detail.jsp: > … > > … >                                                        key="price" list="prices" listKey="id" > listValue="price" >          

The requested list key 'prices' could not be resolved as a collection/array/map/enumeration/iterator type.

2010-10-28 Thread cellterry
Hello all, I encountered a strange problem today: so.detail.jsp: … … … … … The selection box got what I wanted when loading at first. When I pressed cancel button in so.detail.jsp, the following error occurred: org.apache.jasper.JasperExcept

Re: Struts nested and tags

2010-10-28 Thread Mead Lai
Why not using the tag, I haven't use the tag like that, which a form nested another form. Regards, Mead On Thu, Oct 28, 2010 at 7:51 AM, Maurizio Cucchiara < maurizio.cucchi...@gmail.com> wrote: > The first form doesn't contains enctype attribute. Did you try to set > it to multipart/form-dat