RE: struts 2 vs struts 1+spring

2007-12-21 Thread Joe Yuen
Thanks that was a good analogy. I have used Spring and and I like it but then let me turn the question around, what do we gain by adding Struts 2 to be used with Spring? -Joe From: Gary Affonso [mailto:[EMAIL PROTECTED] Sent: Fri 12/21/2007 8:27 PM To: Strut

Re: struts 2 vs struts 1+spring

2007-12-21 Thread Jeromy Evans
Or maybe you're just using Spring for one little thing (like an smtp library) and nothing else? I've seen this, too. Spring is like a buffet. You can take what you want and you can pretty much ignore everything else. You just want the pudding? Just eat the pudding. But it's when you

Re: struts 2 vs struts 1+spring

2007-12-21 Thread Gary Affonso
Joe Yuen wrote: Well, that's kind of the essence of the question. What would you loose if you did? It seems to me that there is quite a bit over overlap to Struts2 and Spring. I guess it depends on the app. In most spring apps I've worked with losing Spring is sort of like losing the hub of

conversion is not happening for nested properties of action class; (XW-297

2007-12-21 Thread ravi_eze
hi, issue: An action class has a dto(say EmployeeDto) in it. In a particular scenario (when object to string is happening) we are finding that dto-conversion.porperties (EmployeeDto-conversion.properties) is being called instead of actionClass-conversion.properties. This shouldn't happen accordin

Re: struts 2 vs struts 1+spring

2007-12-21 Thread Jeromy Evans
Joe Yuen wrote: Well, that's kind of the essence of the question. What would you loose if you did? It seems to me that there is quite a bit over overlap to Struts2 and Spring. No, there's no significant overlap between Struts2 and Spring (except spring-mvc of course) I'm not sure how to

Re: JSON and ExtJS

2007-12-21 Thread joey
ExtJS script submit code is sth like this : fs.submit({url:'save.action', waitMsg:'Saving Data...'}); ExtJS form submit action is an xhr request to your form url,You just handle it in struts2 as you did in a normal html form.But your response must have the same format with your extjs form reader.

Re: struts 2 vs struts 1+spring

2007-12-21 Thread Alberto A. Flores
This sounds like you need to ask this question in the Spring Forum, not here. If you don't understand the value of Spring in your current app, go ahead and try. Hopefully that will be illustrative. I can assure that some of the things you will lose (if you are using at all) are not provided in

Re: REST and JSON

2007-12-21 Thread Jeromy Evans
Frans Thamura wrote: hi there i just want to map my architecture is the JSON Plugins will become part of REST or both are separated. They are separate. The REST plugin already includes a JSON ContentTypeHandler using xstream: http://xstream.codehaus.org/json-tutorial.html Essentially x

RE: struts 2 vs struts 1+spring

2007-12-21 Thread Joe Yuen
Well, that's kind of the essence of the question. What would you loose if you did? It seems to me that there is quite a bit over overlap to Struts2 and Spring. From: Gary Affonso [mailto:[EMAIL PROTECTED] Sent: Fri 12/21/2007 1:51 PM To: Struts Users Mailing Li

Re: JSON and ExtJS

2007-12-21 Thread Frans Thamura
just a little another question i try to use JSON as the communication between S2 and my ExtJS Apps but I can see we can use Form in ExtJS to replace the Form in HTML i still dont get how to develop a good JSON based S2, and also the good ExtJS apps in the client esp i am very weak in JSON RPC w

Re: REST and JSON

2007-12-21 Thread Frans Thamura
hi there i just want to map my architecture is the JSON Plugins will become part of REST or both are separated. will the JSON become stable version after REST stable ? and will REST become official feature in 2.1 NB: anyone have a binary?

Re: struts 2 vs struts 1+spring

2007-12-21 Thread Gary Affonso
Joe Yuen wrote: I have an application that currently is implemented using struts 1.2.8 + spring 1.2.8 + hibernate. What would be the advantages to migrate this > to a struts 2 + hibernate solution? Er, huh? In my experience it's *spring* that sits at the core of an app. That's the thing tha

Re: struts 2 vs struts 1+spring

2007-12-21 Thread Ted Husted
On Dec 21, 2007 4:12 PM, Joe Yuen <[EMAIL PROTECTED]> wrote: > I have an application that currently is implemented using struts 1.2.8 + > spring 1.2.8 + > hibernate. What would be the advantages to migrate this to a struts 2 + > hibernate solution? The Spring integration in Struts 2 is simpler t

struts 2 vs struts 1+spring

2007-12-21 Thread Joe Yuen
I have an application that currently is implemented using struts 1.2.8 + spring 1.2.8 + hibernate. What would be the advantages to migrate this to a struts 2 + hibernate solution?

Re: Mixing Struts 1 and Struts 2

2007-12-21 Thread Radu Solomon
Thank you Ray. It works great. I was thinking far to complicated to even consider this. Ray Clough wrote: The S1 action can be mapped to a S2-url. This is a redirect, not a forward. Something like this: Or you can try a simple 'f

Re: OGNL and action property

2007-12-21 Thread [EMAIL PROTECTED]
Thanks so much, Dave. Both work. On Dec 21, 2007 3:49 PM, Hernandez, David <[EMAIL PROTECTED]> wrote: > > Try removing the value attribute: > > Although, I believe > > Should do the same thing . . . > > David Hernandez > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PRO

RE: OGNL and action property

2007-12-21 Thread Hernandez, David
Try removing the value attribute: Although, I believe Should do the same thing . . . David Hernandez -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, December 21, 2007 3:46 PM To: Struts Users Mailing List Subject: Re: OGNL and action property Hi Da

Re: OGNL and action property

2007-12-21 Thread [EMAIL PROTECTED]
Hi Dave, > You would not want to use the "#" character, just "brand". It works without prefixing it with "#". Thanks. To pass "brand" value to the action specified in the same page, I use hidden field but it doesn't work. Can you help me with that? I tried these and none works. Is there

Re: [S2]Using javascript to hide a struts tag

2007-12-21 Thread Justin Frost
OK seeing how I can not wrap tags in a , how would I go about using the default theme to remove the whole that has the label and field? I'm out of my knowledge area with this one. newton.dave wrote: > > --- Justin Frost <[EMAIL PROTECTED]> wrote: >> I want to be able to hide an entire tag

Re: Struts 2.1.x vs. 2.0.x

2007-12-21 Thread Alberto A. Flores
will do... thanks a lot! Dave Newton wrote: --- "Alberto A. Flores" <[EMAIL PROTECTED]> wrote: I was wondering about the differences between these two. I have heard a lot about some differences, but it doesn't look like the Apache site has a direct link to 2.1.x release. Is it even a release?

Re: Struts 2.1.x vs. 2.0.x

2007-12-21 Thread Dave Newton
--- "Alberto A. Flores" <[EMAIL PROTECTED]> wrote: > I was wondering about the differences between these two. I have heard a > lot about some differences, but it doesn't look like the Apache site has > a direct link to 2.1.x release. Is it even a release? Nope. > Should I be preparing our appl

Re: Struts 2 XML based validation not working

2007-12-21 Thread Dave Newton
Please reply to struts-user and not directly to responders. --- Filipe David Manana <[EMAIL PROTECTED]> wrote: > > [...] > The struts.xml section: > > [...] If you submit to the "login" action won't it just run the "input" method again, hence bypassing validation? I don't see where you

Struts 2.1.x vs. 2.0.x

2007-12-21 Thread Alberto A. Flores
Folks, I was wondering about the differences between these two. I have heard a lot about some differences, but it doesn't look like the Apache site has a direct link to 2.1.x release. Is it even a release? Should I be preparing our application for an upgrade? Any feedback will be appreciated

Re: OGNL and action property

2007-12-21 Thread Dave Newton
--- "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > What is an action property? I thought it is a private attribute in an > action class with its getter and setter methods but now I think it's > wrong as I defined such an attribute "brand" but it can't be used > in OGNL: ... You would not want

Re: 2.0.11 Documentation Confusion

2007-12-21 Thread Dave Newton
--- Kevin Decker <[EMAIL PROTECTED]> wrote: > The following page does not seem to reflect the actual source > functionality released with this version. In particular, it does not > appear that the WW-2027 changes have been applied to the source tree but > they have been applied to the documentation

OGNL and action property

2007-12-21 Thread [EMAIL PROTECTED]
Hi all, What is an action property? I thought it is a private attribute in an action class with its getter and setter methods but now I think it's wrong as I defined such an attribute "brand" but it can't be used in OGNL: ... In the result page of the action, I can output value of the "brand" usi

Guice ObjectFactory injection into XWorkConverter problem

2007-12-21 Thread volnei Granado Munhoz
Hi, i'm using xwork 2.1 with struts 2.1 (but this occours in all versions) and Guice to Inject my dependencies. My struts.xml contains the follow line and when i start my servlet container the NPE is throwed and aplication is broken... When remove or comment the xwork-conversion.properties t

2.0.11 Documentation Confusion

2007-12-21 Thread Kevin Decker
The following page does not seem to reflect the actual source functionality released with this version. In particular, it does not appear that the WW-2027 changes have been applied to the source tree but they have been applied to the documentation located at: http://struts.apache.org/2.0.11/docs/s

Re: Struts 2 XML based validation not working

2007-12-21 Thread Dave Newton
--- Filipe David Manana <[EMAIL PROTECTED]> wrote: > When I test my webapp this validation is completely ignored. > Why is that so? Don't know; the XML and class setup seems okay. How are you testing? What's in the JSP? Does it work except for the validation? Do you extend ActionSupport (or imple

Re: ActionErrors.validate()

2007-12-21 Thread Dave Newton
--- AbelMacAdam <[EMAIL PROTECTED]> wrote: > I see. Obviously Struts 1. That will make things harder. The S2 wiki has some basic overviews and tutorials. InfoQ has Ian Roughley's intro PDF available for free, too. d. - To unsu

Re: [S2]Using javascript to hide a struts tag

2007-12-21 Thread Dave Newton
--- Justin Frost <[EMAIL PROTECTED]> wrote: > I want to be able to hide an entire tag based on an onclick event > from a > > I was not able to hide the div. > And when I tried to hide just a field only the html text box > was hidden, not the label. That's because the ID is for the textbox (wh

Re: REST and JSON

2007-12-21 Thread Jeromy Evans
Adam Hardy wrote: Jeromy Evans on 20/12/07 22:25, wrote: http://my.company.com/myapp/rest/orders/1 All you're supposed to do is assign a unique URL to each resource, which is exactly you've done. Other important aspects of the approach are: - you're binding the HTTP methods to certain operati

Struts 2 XML based validation not working

2007-12-21 Thread Filipe David Manana
Hi, I created an action name LoginAction and the corresponding validation XML file named LoginAction-validation.xml. Both files are in the same directory and the contents of the XML one are: http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd";> You have to fil

Re: [S2]Using javascript to hide a struts tag

2007-12-21 Thread Maxx
Of course the label can't be hidden as it's not the same element. It may also depend on the theme you're using. By default it's the xhtml one, and as this theme creates additional stuff around (which is really annoying and shouldn't be default IMHO), what you're doing is only hiding the inner stuf

Re: ActionErrors.validate()

2007-12-21 Thread AbelMacAdam
I see. Obviously Struts 1 :-[. newton.dave wrote: > > See, the class you mention isn't a Struts 2 class. It's a Struts 1 class. > > Perhaps I should have asked which version of Struts the book covers. > > d. > > --- AbelMacAdam <[EMAIL PROTECTED]> wrote: > >> >> I'm using Struts 2.0.11. >>

[S2]Using javascript to hide a struts tag

2007-12-21 Thread Justin Frost
I want to be able to hide an entire tag based on an onclick event from a I was not able to hide the div. And when I tried to hide just a field only the html text box was hidden, not the label. Anyone have any suggestions for me. Here is what I have: The clickProd is fired from clicking a te

RE: [S2] message properties

2007-12-21 Thread Dave Newton
--- Desbois Arnaud <[EMAIL PROTECTED]> wrote: > But with the set tag, it doesn't work: > > > > For completeness you should add how you're accessing the variable you've set, as that can also be a potential issue. (I don't believe this method would work for positional parameters, though.)

Re: [S2] message properties

2007-12-21 Thread Dave Newton
--- Desbois Arnaud <[EMAIL PROTECTED]> wrote: > > > I would have thought the second example would have worked; I use nearly the same syntax with an iterator value and it works fine (although I'm using ). I just verified that if I have an action property "foo" that the following works. > Al

Re: [S2] validator framework

2007-12-21 Thread Dave Newton
--- Adam Hardy <[EMAIL PROTECTED]> wrote: > - is there a way to have all the validation in one config file rather > than having one config file per Action class? AFAICT the validation files are looked up the same way the resource files are; for example I just added a superclass to one of my actio

RE: [S2] message properties

2007-12-21 Thread Desbois Arnaud
But with the set tag, it doesn't work: -Message d'origine- De : Maxx [mailto:[EMAIL PROTECTED] Envoyé : vendredi 21 décembre 2007 12:20 À : Struts Users Mailing List Objet : Re: [S2] message properties In a JSP, it's quite easy, you just have to use a nested inside the tag

Re: Struts 2 Extend validation

2007-12-21 Thread Dave Newton
--- Bisskit <[EMAIL PROTECTED]> wrote: > I want to use custom validators with Struts 2. In the Release Notes 2.0.8 > it says: > > "Furthermore it is no longer required, that all default validators need to > be copied > over into a customized validators.xml configuration. > Just override existing (

[S2] validator framework

2007-12-21 Thread Adam Hardy
Hi Folks, just slogging my way up the learning curve of XWorks Validation with that 'here we go again' feeling, and it occurred to me that I might be able to plug in the old commons-validator more quickly. XWorks's Struts2 validation framework is probably not that bad and of course commons-v

Re: Image Upload and Dojo

2007-12-21 Thread Wes Wannemacher
You can build it yourself pretty easily. If you have maven installed (if you don't, you should), just pull trunk from svn - `svn co https://svn.apache.org/repos/asf/struts/current/ struts` then go into the struts2 directory `cd struts/struts2` and tell maven to build it `mvn -Pall` The -Pall

Re: Struts Token help

2007-12-21 Thread Alberto A. Flores
Assuming you are referring to Struts 1.x, when you work with tokens the servlet will ensure that your response will have a hidden token everytime your action finishes execution. It does this so that it knows what to expect and control multiple logins. Once it's compared (1 and only once), the s

Re: ActionErrors.validate()

2007-12-21 Thread Dave Newton
See, the class you mention isn't a Struts 2 class. It's a Struts 1 class. Perhaps I should have asked which version of Struts the book covers. d. --- AbelMacAdam <[EMAIL PROTECTED]> wrote: > > I'm using Struts 2.0.11. > > As I'm reading a book, I'm not that random implementing code. I checked

context problem on multiple apps

2007-12-21 Thread Leonidas Papadakis
Greetings to all, i have 3 similar applications (latest struts2.0.11) under one tomcat (5.5.25). The host definition in server.xml looks like : www.test1.com reloadable="false" workDir="/var/www/www.test1.com/web/work/"> The problem is that when try to access the folder for web ap

Re: REST and JSON

2007-12-21 Thread Adam Hardy
Jeromy Evans on 20/12/07 22:25, wrote: http://my.company.com/myapp/rest/orders/1 All you're supposed to do is assign a unique URL to each resource, which is exactly you've done. Other important aspects of the approach are: - you're binding the HTTP methods to certain operations (or in the case

Re: Image Upload and Dojo

2007-12-21 Thread jogep
Does anyone know if this work with struts 2.1.1? Where can I get a complete build of the 2.1.1 distribution? Best Regards Johannes Geppert jogep wrote: > > Hi, > > i try to submit a multipart/form-data with dojo, but it > don't invoke any action. When I try it without dojo > it works fine. >

Re: [S2] message properties

2007-12-21 Thread Maxx
In a JSP, it's quite easy, you just have to use a nested inside the tag refering to your message, e.g. (of course if item is available through your action via a getItem() method - same for property "name" on your "item") For the Freemarker thing, I unfortunatel

[S2] message properties

2007-12-21 Thread Desbois Arnaud
I want to customize the messages properties (like struts 1) with {0} variable: message.remove=Are you sure you want to remove: {0}? But how I can call in my JSP the message with the variable? I try this, but it doesn't work: Also, how I can retrieve a message from the resou

Re: ActionErrors.validate()

2007-12-21 Thread AbelMacAdam
I'm using Struts 2.0.11. As I'm reading a book, I'm not that random implementing code. I checked the book several times, but could not find any mention on how ActionErrors is activated. Therefor my question. newton.dave wrote: > > Are you using Struts 1 or Struts 2? > > You need to slow down

Struts 2 Extend validation

2007-12-21 Thread Bisskit
Hi, I want to use custom validators with Struts 2. In the Release Notes 2.0.8 it says: "Furthermore it is no longer required, that all default validators need to be copied over into a customized validators.xml configuration. Just override existing (those from default) with a custom implementatio