Re: [S2] Accessing objects in the Spring context?

2009-09-08 Thread James Carr
Couldn't I just make it ApplicationContextAware? On Tue, Sep 8, 2009 at 8:27 PM, Musachy Barroso wrote: > WebApplicationContextUtils.getRequiredWebApplicationContext(ServletActionContext.getServletContext()); > > On Tue, Sep 8, 2009 at 6:12 PM, James Carr wrote: >> I can try

Re: [S2] Accessing objects in the Spring context?

2009-09-08 Thread James Carr
; invocation. I would whip up a quick example but I'm on my phone, maybe > later tonight if no one else steps to the challenge. > > On 9/8/09, James Carr wrote: >> Yeah, I was looking for a way around it... these are simple hash maps >> that are used to display select optio

Re: [S2] Accessing objects in the Spring context?

2009-09-08 Thread James Carr
can either writer an Interceptor to put the beans on the stack. Thanks, James On Tue, Sep 8, 2009 at 6:30 PM, Marty Milligan wrote: > On Tue, Sep 8, 2009 at 5:55 PM, James Carr wrote: >> Yeah, I was looking for a way around it... these are simple hash maps >> that are used to display

Re: [S2] Accessing objects in the Spring context?

2009-09-08 Thread James Carr
rty... But I > don't really see how that is better than using setter-based injection. > Just because the beans are singletons doesn't mean anything special, > you still need a reference to them in your struts action. > > -Wes > > On Tue, Sep 8, 2009 at 5:13 PM, James Carr

Re: [S2] Accessing objects in the Spring context?

2009-09-08 Thread James Carr
I suppose I may use this: http://wiki.opensymphony.com/display/ABLE/Expose+Spring+Beans+in+JSP But I really wish/hope that struts2 has something built in. Thanks, James On Tue, Sep 8, 2009 at 4:13 PM, James Carr wrote: > I have several singleton based beans defined in

[S2] Accessing objects in the Spring context?

2009-09-08 Thread James Carr
I have several singleton based beans defined in my applicationContext.xml and I'd like to just use these rather than being forced to set them on my action. is there any way to accomplish this? Thanks, James - To unsubscribe, e-ma

Re: Executing the Struts2 Stack without a server running?

2009-09-02 Thread James Carr
ugins. So as Dave said, yes you can but you have to use those 2 > plugins. > > musachy > > On Wed, Sep 2, 2009 at 8:43 AM, Greg Lindholm wrote: >> On Wed, Sep 2, 2009 at 11:18 AM, Dave Newton wrote: >> >>> James Carr wrote: >>> >>>> I've

Executing the Struts2 Stack without a server running?

2009-09-02 Thread James Carr
Hi All, I've been doing a lot of rails development lately, and one thing I like is how I can use Cucumber to test my rails app through the controller, and through this I can test validation and templates that are rendered without the server running. Is it possible to do something like this for St

Re: Using a map provided by the action when using model driven?

2009-08-17 Thread James Carr
Nevermind, I'm a moron... The page I was trying to use it on didn't map to an action. :S Thanks, James On Mon, Aug 17, 2009 at 1:09 PM, James Carr wrote: > I'm giving up and putting it on the model. It doesn't belong there, > but at least it works. :( > > >

Re: Using a map provided by the action when using model driven?

2009-08-17 Thread James Carr
I'm giving up and putting it on the model. It doesn't belong there, but at least it works. :( On Mon, Aug 17, 2009 at 1:06 PM, James Carr wrote: > I tried #action.franchises and got the same error... is it literally > #action, or is it #nameOfActionDefinedInStrutsXml? > >

Re: Using a map provided by the action when using model driven?

2009-08-17 Thread James Carr
I tried #action.franchises and got the same error... is it literally #action, or is it #nameOfActionDefinedInStrutsXml? On Mon, Aug 17, 2009 at 11:43 AM, Musachy Barroso wrote: > On Mon, Aug 17, 2009 at 9:39 AM, James Carr wrote: >> One note of interest though is I am using the Mo

Using a map provided by the action when using model driven?

2009-08-17 Thread James Carr
Hi, Maybe I'm missing something, but I am trying to use a map that I have returned in the action (because the map is read in from a DAO) and want to use it to populate my select box. My action contains the method public Map getFranchises(){ return franchises.getFranchises(); } this m

Re: Validating that two fields match?

2009-08-13 Thread James Carr
el effet légalement obligatoire. Étant donné que les email > peuvent facilement être sujets à la manipulation, nous ne pouvons accepter > aucune responsabilité pour le contenu fourni. > > > > >> To: user@struts.apache.org >> Subject: Re: Validating that two

Re: Validating that two fields match?

2009-08-13 Thread James Carr
nValidator(expression="email.equals(confirmEmail)",? message="The > email fields do not match") > > > > Chris > > > > > -Original Message- > From: James Carr > To: Struts Users Mailing List > Sent: Wed, Aug 12, 2009 5:30 pm > S

Validating that two fields match?

2009-08-12 Thread James Carr
Hello, Is there something out of the box that will let me validate if two fields match in struts2? An example would be a form with email and confirmingEmail fields. Thanks, James - To unsubscribe, e-mail: user-unsubscr...@struts

[S2] Model Driven validation using xml?

2009-08-11 Thread James Carr
Hi All, I seem to be unable to find an example of using xml based validation with model driven. My object model is nested, most of my text fields look like: Any help or links would be much apperciated. Thanks, James - To unsu

[S2] Using an existing velocity template within struts2?

2009-01-08 Thread James Carr
Hi All, I have a small problem. I have an object that generates a velocity template that I want to use within a struts2 application that is using velocity... the method that produces the html is called from within the template. Anyhow, I cannot seem to make this work unless I call Velocity.init()

Re: Hi.. some advice please.

2008-12-27 Thread James Carr
Why are you still using java 1.4??? I mean really? On Sat, Dec 27, 2008 at 1:11 PM, Ilan wrote: > Hi, > > I am working quickly against the grain at the enterprise I work at. We are > using SAP's WebDynpro technology for the public internet facing site through > which we use to work with our custo

Re: [S2] Use i18n with parameters in velocity templates?

2008-12-18 Thread James Carr
Could you guys just tell me where the #stext velocity macro is defined? PLEASE!? On Thu, Dec 18, 2008 at 4:16 PM, James Carr wrote: > Hi All, > > We're currently using struts 2 and using velocity in order to include > some existing templates from another project. Everything h

[S2] Use i18n with parameters in velocity templates?

2008-12-18 Thread James Carr
Hi All, We're currently using struts 2 and using velocity in order to include some existing templates from another project. Everything has been working great... until we try to use i18n with parameters. I've read all the pages on the struts 2 site, there's no clear example of what we're supposed t

Re: How can I "parameterize" include files?

2008-12-17 Thread James Carr
tatement just chooses not to allow it to just work... I had to use a jakarta if tag to eval it. Thanks, james On Wed, Dec 17, 2008 at 12:01 PM, Nuwan Chandrasoma wrote: > http://struts.apache.org/2.x/docs/include.html > > why don't you try to assess it as a request param?. :) > &

Re: A complete listing of velocity struts 2 tags?

2008-12-17 Thread James Carr
exactly in reality. Thanks, James On Wed, Dec 17, 2008 at 12:07 PM, Nuwan Chandrasoma wrote: > http://struts.apache.org/2.x/docs/velocity-tags.html > > James Carr wrote: >> >> No one knows? Any ideas where I could find their definitions? The >> source I downloaded only seem

How can I "parameterize" include files?

2008-12-17 Thread James Carr
Hi all, I have a common navigation bar I have at the top of a bunch of pages, but I'd like for certain buttons to not be present on some pages. I tried using and , but to no avail. For example: and in the included file have this: However this doesn't see

Re: A complete listing of velocity struts 2 tags?

2008-12-17 Thread James Carr
No one knows? Any ideas where I could find their definitions? The source I downloaded only seems to contain velocity macros for form tags, not i18n. Thanks, James On Tue, Dec 16, 2008 at 3:44 PM, James Carr wrote: > Is there a complete listing of the struts 2 tags in velocity? > Specifica

A complete listing of velocity struts 2 tags?

2008-12-16 Thread James Carr
Is there a complete listing of the struts 2 tags in velocity? Specifically, I want to use the #stext tag with parameters (for a parameterized i18n property) but unfortunately cannot find any example at all anywhere. I tried this: #stext("name=foo.bar.baz") #sparam(1123) #end but no luck. I am

Re: [S2] Best way to provide default values for an action that takes GET parameters?

2008-12-15 Thread James Carr
Thanks! On Mon, Dec 15, 2008 at 12:59 PM, Oscar Alvarez wrote: > 2008/12/15 James Carr > >> is there a way to provide default values for action parameters without >> having to set defaults in the actual target objects? > > > May be Preparable interface meets

[S2] Best way to provide default values for an action that takes GET parameters?

2008-12-15 Thread James Carr
is there a way to provide default values for action parameters without having to set defaults in the actual target objects? I have an action with a request type object (provided from an API jar) that is populated via the GET params and submitted... however, for everyone's use they usually only mod

[S2] modifying parameters before they are set on the action?

2008-12-11 Thread James Carr
Hi All, I want to write an interceptor for some of my actions. These actions have values that are set on an object graph (i.e. request.configuration.hosts.ip) that I would like to have a more shorthand version. In other words, I'd like to have "id" map to "request.configuration.hosts.ip" and reset

[s2] Do I need to define the struts2 filter?

2008-07-29 Thread James Carr
In all the examples of tiles2+struts2 I find online, they only show using the struts2-tiles-plugin listener in the web.xml (they always omit the rest of the web.xml). Do I still need to include the struts2 filter? When i deploy, it breaks. Claiming the filter is undefined, and only does this in pr

[s2] using ognl for iterator value

2008-07-28 Thread James Carr
I have a method that takes a string arg and returns a list. the object is accessible from the action. how can I pass a value accessible on my page to the method and use the result in an iterator? thanks, james On 7/28/08, dynamicd <[EMAIL PROTECTED]> wrote: > > Hi, > > I am new to Struts2 and I

[S2] Populate a List property?

2008-04-24 Thread James Carr
Hi All, I want to be able to submit a form that can add array elements to one of my action properties. I have something like this: public class SomeAction{ private FooBar foo; // getters and setters, execute, etc. here } with public class FooBar{ private List bars; // getters

Re: dojo script for DATEPICKER tag

2008-04-23 Thread James Carr
I tried all of the above with Struts 2.0.11.1 but none of them work. SURELY there must be SOMEWAY to set the endDate attribute dynamically from the taglib!? Thanks, James On Thu, Jan 31, 2008 at 11:07 PM, Wes Wannemacher <[EMAIL PROTECTED]> wrote: > I haven't tried it, but I would think that some

ExtJS Plugin for Struts2

2007-12-27 Thread James Carr
Hi All, I've been doing a lot of work with Struts2 and ExtJS lately, and have been thinking it would be simply awesome if there was a nice plugin to integrate the two so that people could create functional extJS apps by using tags alone. I noticed that a project was started, but seems to be dead a

Re: JSON and ExtJS

2007-12-20 Thread James Carr
I am... it works pretty sweet and with minimal hassle I'm currently revising a tutorial on using Struts 2 + JSON plugin + ExtJS to make a pageable data grid. I'll let everyone know when I post it. On a side note, it was insanely easy to use. I put it all together in about 10 minutes or so. Th

S2: Struts way of submitting a value on change?

2007-11-14 Thread James Carr
Hi All, What is the "struts 2" way of using ajax to submit a value and calling a method on an action? Currently I am just having a select with a name that maps to a value via OGNL, then just using javascript to read and submit the value onchange. I keep thinking struts does this out of the box?

Re: Struts2 Configutation alternative to sessions?

2007-11-06 Thread James Carr
Sessions aren't currently available on the server and I don't want to have to wait till the end of the week for my client to view the application. Thanks, James On Nov 6, 2007 12:11 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > --- James Carr wrote: > > Currently I

Struts2 Configutation alternative to sessions?

2007-11-06 Thread James Carr
Hi All, I'm using struts 2 for a small web app that has an action attribute that needs to maintain state. Currently I'm using sessions but I would like to reconfigure my application to use something besides sessions, perhaps something like viewState in .NET that would be availble via a hidden input

Re: Anyway to have associative form properties?

2007-07-30 Thread James Carr
Nevermind... I found this, and used a little bit of hackery. I would like to know if there is a better way. http://www.bartbusschots.ie/blog/?p=262 Thanks, James On 7/30/07, James Carr <[EMAIL PROTECTED]> wrote: > Hey all, > > In php, I used to have complex forms in some of

Anyway to have associative form properties?

2007-07-30 Thread James Carr
Hey all, In php, I used to have complex forms in some of my applications associated to something, like this: Which, when posted, mapped to: $_POST['employees']['james']['address'] essentially, I'd have an employees hashMap with all of the employee names submitted, which contained information a

Re: [ANN] Struts Downloads Skyrocket in 2007

2007-07-08 Thread James Carr
congrats guys! On 7/8/07, Ted Husted <[EMAIL PROTECTED]> wrote: [Apache Struts Group] Since its release in June 2001, Apache Struts (struts.apache.org) has become the most popular web framework for Java. Six years later, by any objective measure, Struts is still Java's most popular web framework

Tiles question

2007-07-06 Thread James Carr
How can I add head elements (script, style, etc) to the head of a document created using tiles? I can add them to the body, but this is WRONG and goes against standards. Thanks, James - To unsubscribe, e-mail: [EMAIL PROTECTED]