Re: AjaxTag 1.3 support?

2008-02-01 Thread Dave Newton
--- Jeromy Evans <[EMAIL PROTECTED]> wrote: > For Ajax/JS libraries that use JSON, the JSON Plugin (JSON ResultType) > [2] will serialize your action into JSON automatically > The XSL ResultType will serialize your action into XML if you provide a > stylesheet [3] > The REST plugin includes code

Re: AjaxTag 1.3 support?

2008-02-01 Thread Jeromy Evans
My 2c: I think this is a bad solution and shouldn't be encouraged. It's marginally better than writing a custom servlet. Struts2 ResultTypes [1] are designed specifically for controlling the type and content of results from actions to separate the view from the model, even if the "view" is X

RE: AjaxTag 1.3 support?

2008-02-01 Thread Hodgins, Grant
I was able to get the AjaxTags stuff working (with Tiles2 although I don't think that matters at all). As Dave said, your action should return null since you want the action to return XML in the response. Instead, in addition to returning a null result, I simply wrote the xml to the response:

RE: AjaxTag 1.3 support?

2008-02-01 Thread Dave Newton
--- "Griffith, Michael *" <[EMAIL PROTECTED]> wrote: > I guess I should have said freemarker instead of sitemesh...? Most (all?) of the HTML-oriented tags are dependent on FreeMarker, not just the Ajax tags. That's how themes and templates are implemented. > At any rate, when the docs don't match

RE: AjaxTag 1.3 support?

2008-02-01 Thread Griffith, Michael *
Dave, Thanks for the reply. I guess I should have said freemarker instead of sitemesh...? At any rate, when the docs don't match the release, it's a bad thing. I shouldn't need to do any of this should I? Can you point me at a simple, minimalist example of the tag? mg -Original Message--

Re: AjaxTag 1.3 support?

2008-02-01 Thread Dave Newton
--- "Griffith, Michael *" <[EMAIL PROTECTED]> wrote: > public class QuestionAction extends BaseAction implements > ModelDriven, Preparable, ServletRequestAware, > ServletResponseAware { > public String getSearchTerm() throws Exception { > System.out.println(" Question Search

AjaxTag 1.3 support?

2008-02-01 Thread Griffith, Michael *
Hi all, I can't seem to get a simple Ajax based look ahead search to work. I am trying to use AjaxTags 1.3 (http://ajaxtags.sourceforge.net/) in my Struts2 application. What is the correct response to return? I am also using Tiles2. If I write the response directly to the output stream, that's w

Re: Doubleselect tag

2008-02-01 Thread stanlick
Hey brah -- I actually have not been back to it yet, but I think your remarks about the dot notation is on the mark! Scott On Feb 1, 2008 4:04 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > --- [EMAIL PROTECTED] wrote: > > I'll drop the m on the Manning site in a couple minutes. > > "anning"? > >

Re: Doubleselect tag

2008-02-01 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > I'll drop the m on the Manning site in a couple minutes. "anning"? Did you get the #request issue worked out? I probably missed your followup. d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For a

Re: Doubleselect tag

2008-02-01 Thread stanlick
I'll drop the m on the Manning site in a couple minutes. Holler if you need more help. Scot On Feb 1, 2008 11:45 AM, Stanley, Eric <[EMAIL PROTECTED]> wrote: > Could you please show me the classes state and city? I think that would > help. And thanks for the reply :) > > -Ryan > > -Original

Re: Populate Form from DAO

2008-02-01 Thread Wes Wannemacher
If the beans match, you could probably use commons-beanutils, but IIRC, you'll incur a performance penalty. http://commons.apache.org/beanutils/apidocs/org/apache/commons/beanutils/BeanUtils.html#copyProperties(java.lang.Object,%20java.lang.Object) By doing it explicitly though, you allow yoursel

Integrating Struts2 and JSF

2008-02-01 Thread Manasa Inaganti
Hi, I am kind of Newbie to Struts2 and JSF. I am trying to call a JSF page from Struts2. For this, I am using JSF plugin and followed the showcase example given in the site, which is not quite clear to me. Can anyone help me with this by letting me know about what exact changes should I need to

Re: Newbie to Struts 2 - Question about Interceptors

2008-02-01 Thread daveck
I ended up solving the problem using an Interceptor and saving the parameter Map to the session. session.setAttribute("input_params", request.getParameterMap(); Then in my action I implemented SessionAware and utililized BeanUtils from Jakarta Commons to re-populate the properties in my action c

Re: Mail list XML/HTML/tag eatery?

2008-02-01 Thread Dave Newton
The weird thing is that *sometimes* it works fine. Like my tags always seem to come through, yours did now (including my paste of your email), and so on. I guess it's a client thing and/or people are sending HTML email, etc. Total PITA. Thanks, Dave --- Antonio Petrelli <[EMAIL PROTECTED]> wrote

Re: Mail list XML/HTML/tag eatery?

2008-02-01 Thread Antonio Petrelli
2008/2/1, Dave Newton <[EMAIL PROTECTED]>: > Hey all, > > I don't know if tags/etc. don't come through because of my Yahoo account, > something in the list handler, or what. > > Do other people have huge issues with tags dropping out (even when viewing > source) and all that? It's really frustratin

Re: Can I use these two together?

2008-02-01 Thread Antonio Petrelli
2008/2/1, javaskull <[EMAIL PROTECTED]>: > Can I use Tiles 2.05 and Struts 1.38 together? Yes, as long as you don't use integration code, such as forward to a Tiles definition. There is a Struts 1/Tiles 2 plugin in the SVN trunk for the future Struts 1.4 but we really don't know when it will be re

Mail list XML/HTML/tag eatery?

2008-02-01 Thread Dave Newton
Hey all, I don't know if tags/etc. don't come through because of my Yahoo account, something in the list handler, or what. Do other people have huge issues with tags dropping out (even when viewing source) and all that? It's really frustrating. Thanks, Dave ---

Re: actions defined in a package are visible in other packages??

2008-02-01 Thread paulbrickell
laurie, I have examples of one page in a namespace invoking action in the same namespace and now I know how to call across to it from my root it all looks good. My problem is that I want to use actions in the target namespace from my root namespace as simple links. so I think (being a bit of a

Can I use these two together?

2008-02-01 Thread javaskull
I am using RAD 7.0 and targeting WebSphere 6.1 using JDK 5.0. I recently moved from RAD 6.0 and WAS 5.1. I removed Struts 1.1 and Tiles 1.1 from the project facets, and then added the JARS for Apache Tiles 2.05 and Struts 1.38 (and DisplayTag 1.1.1). Can I use Tiles 2.05 and Struts 1.38 togethe

RE: Doubleselect tag

2008-02-01 Thread Stanley, Eric
Could you please show me the classes state and city? I think that would help. And thanks for the reply :) -Ryan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, February 01, 2008 9:39 AM To: Struts Users Mailing List Subject: Re: Doubleselect tag Greet

Re: actions defined in a package are visible in other packages??

2008-02-01 Thread Dave Newton
--- paulbrickell <[EMAIL PROTECTED]> wrote: > I don't think I was clear about what I am seeing. If I have an action tag > in my page like this... > > > > > > And a struts.xml file that defines a package with the namespace > 'some-namespace' that contains an action called myAction I see no call

Re: actions defined in a package are visible in other packages??

2008-02-01 Thread Laurie Harper
http://struts.apache.org/2.0.11/docs/action.html Did you try executeResult="true"/>? If the namespace of the action that renders this page is also some-namespace you should be able to leave out the namespace attribute, too, and just use action="myAction". L. paulbrickell wrote: Cool the doc

Re: actions defined in a package are visible in other packages??

2008-02-01 Thread Dave Newton
--- paulbrickell <[EMAIL PROTECTED]> wrote: > Actuallt it not clear to how I might build a link to an action in a > namespace if... > > /namespace/myAction doesn't work. > > What AM I doing wrong? Not using the "namespace" attribute. Dave -

Re: Newbie to Struts 2 - Question about Interceptors

2008-02-01 Thread Laurie Harper
daveck wrote: Hello, I need to put up a "Confirmation Screen" in between my input jsp and my success jsp. byproduct.action -> byproduct-input.jsp byproduct-input.jsp -> confirm.jsp (If yes...) confirm.jsp -> byproduct.action byproduct.action -> byproduct-success.action Is there a Struts 2 way t

Re: actions defined in a package are visible in other packages??

2008-02-01 Thread paulbrickell
Actuallt it not clear to how I might build a link to an action in a namespace if... /namespace/myAction doesn't work. What AM I doing wrong? Cheers, Paul B. newton.dave wrote: > > --- paulbrickell <[EMAIL PROTECTED]> wrote: >> I had seen those, but the problem I was having was that at no po

Re: ActionContext.getContext().getSession return null when I test Struts2 action by JUnit.

2008-02-01 Thread Laurie Harper
For completeness: you could also re-work your action to implement SessionAware instead of using ActionContext.getContext().getSession(). Unit testing would then simply involve calling setSession() on the action under test. The SessionAware interface exists, in part, to make testing easier by de

Re: [struts] Struts2 tags loops

2008-02-01 Thread Dale Newfield
Filipe David Manana wrote: The jstl tag, as well as all other jstl tags, is not allowed in struts 2.0.11, afaik. This is in no way the case. What is disallowed in 2.0.11 is el expressions as struts tag attributes. -Dale - T

RE: Help with (1...N) Editing using Ajax?

2008-02-01 Thread Griffith, Michael *
Laurie, Thanks for your reply. You have nailed the problem! It seems like the 2nd solution is the more elegant one. Are there any reference implementations or examples you could point me to that might show me how to populate the form using JSON data? MG -Original Message- From: news [m

Re: actions defined in a package are visible in other packages??

2008-02-01 Thread paulbrickell
Cool the docs would make life easier for us poor saps. I don't think I was clear about what I am seeing. If I have an action tag in my page like this... And a struts.xml file that defines a package with the namespace 'some-namespace' that contains an action called myAction I see no call to t

Re: Help with (1...N) Editing using Ajax?

2008-02-01 Thread Laurie Harper
The problem is that you're rendering the form before you've stored anything under #session['guide']. I assume when you say you want to 'bind the form to the object' your Ajax request places in the session, you mean you want to populate the form fields with data from that object? That can't wor

Re: Doubleselect tag

2008-02-01 Thread stanlick
Greetings-- I have added an example of doing this at S2iAthat I think describes this usage a little better. Scott On Jan 31, 2008 5:07 PM, Stanley, Eric <[EMAIL PROTECTED]> wrote: > I'd like to have a pair of selects, the first

Re: actions defined in a package are visible in other packages??

2008-02-01 Thread Dave Newton
--- paulbrickell <[EMAIL PROTECTED]> wrote: > I had seen those, but the problem I was having was that at no point in the > docs (afaik) is there an example of a URL to actually target an action in a > namespace. Noted, although the [1] and [2] tag documentation does list the "namespace" attribute

Newbie to Struts 2 - Question about Interceptors

2008-02-01 Thread daveck
Hello, I need to put up a "Confirmation Screen" in between my input jsp and my success jsp. byproduct.action -> byproduct-input.jsp byproduct-input.jsp -> confirm.jsp (If yes...) confirm.jsp -> byproduct.action byproduct.action -> byproduct-success.action Is there a Struts 2 way to carry the inp

RE: Struts validator

2008-02-01 Thread Dave Newton
--- "Zhang, Larry (L.)" <[EMAIL PROTECTED]> wrote: > No, I am using struts 1.1, Oh, wow. Does validwhen[1] not exist in S1.1? You can always create a custom validator as well if you find your validation stretches what's easy to do with the existing validation configuration possibilities. You may

RE: Struts validator

2008-02-01 Thread Zhang, Larry (L.)
Struts valdiator developers, Doesn't struts support this requirment? -Original Message- From: Zhang, Larry (L.) Sent: Friday, February 01, 2008 10:55 AM To: 'Struts Users Mailing List' Subject: RE: Struts validator No, I am using struts 1.1, I would like to implement the following case:

Re: actions defined in a package are visible in other packages??

2008-02-01 Thread paulbrickell
Thanks, I had seen those, but the problem I was having was that at no point in the docs (afaik) is there an example of a URL to actually target an action in a namespace. Through a (very tedious) process of trial and error I finally stumbled upon a (the?) solution. Actions like these... Do

RE: Struts validator

2008-02-01 Thread Zhang, Larry (L.)
No, I am using struts 1.1, I would like to implement the following case: In valiation.xml:

RE: Struts validator

2008-02-01 Thread Dave Newton
--- "Zhang, Larry (L.)" <[EMAIL PROTECTED]> wrote: > We are not using Struts 2 tag and thus I can't use s:submit tag. Are you using Struts 2 at all? You can still use the generated HTML as a template to create your own HTML, although... not sure why you wouldn't just use the tag in this case. D

Re: actions defined in a package are visible in other packages??

2008-02-01 Thread Dave Newton
Oops. --- paulbrickell <[EMAIL PROTECTED]> wrote: > Could you post a link to the section in the docs. I just cant work this > out.:confused: Work what out? Packages and namespaces are discussed (at least) at [1, 2]. Dave [1] http://struts.apache.org/2.x/docs/package-configuration.html [2] http

Re: actions defined in a package are visible in other packages??

2008-02-01 Thread Dave Newton
--- paulbrickell <[EMAIL PROTECTED]> wrote: > Could you post a link to the section in the docs. I just cant work this > out.:confused: Work what out? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-m

RE: Struts validator

2008-02-01 Thread Zhang, Larry (L.)
We are not using Struts 2 tag and thus I can't use s:submit tag. -Original Message- From: David Harland [mailto:[EMAIL PROTECTED] Sent: Friday, February 01, 2008 10:01 AM To: Struts Users Mailing List Subject: RE: Struts validator You can do it by having 3 different methods such as met

Re: Struts2 tags loops

2008-02-01 Thread Randy Burgess
That limitation is only for struts tags, for example , otherwise you shouldn't have problems with JSTL. I haven't run into any on 2.0.11. Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications > From: Filipe David Manana <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing L

RE: Struts validator

2008-02-01 Thread David Harland
You can do it by having 3 different methods such as method1() method2() method3() and then have validateMethod1() validateMethod2() validateMethod3() then in your form or you can do by using action aliases and have three validation xml files. http://struts.apache.org/2.0.11/docs/vali

RE: Struts validator

2008-02-01 Thread Zhang, Larry (L.)
Can some Struts guru answer the following questions? -Original Message- From: Zhang, Larry (L.) Sent: Thursday, January 31, 2008 3:27 PM To: 'Struts Users Mailing List' Subject: Struts validator Hello coworkers, I have a questions regarding the struts validation..., say I have three te

Re: Populate Form from DAO

2008-02-01 Thread Al Sutton
Any reason you're not using ModelDriven? - Original Message - From: "Richard Sayre" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Friday, February 01, 2008 1:01 PM Subject: Re: Populate Form from DAO Yes, I know I can do it this way. I'm just being lazy. I want: To

RE: preparable vs modelDriven

2008-02-01 Thread Shannon, Andrew
I recently made use of model driven and preparable using some of the advice provided in Roughley's book, and got a clear picture of how these interceptors work from the forthcoming Manning book. Our situation required 2 different actions (one provides the form that posts to another that does the s

Re: Struts and Windows Authentication

2008-02-01 Thread Cory D. Wiles
At my job we authenticate our users directly using Active Directory using container managed security. What container are you using? On Feb 1, 2008 4:48 AM, Antonio Petrelli <[EMAIL PROTECTED]> wrote: > 2008/2/1, Arun <[EMAIL PROTECTED]>: > > Hi, > > > > I have a web application in which I need t

Re: actions defined in a package are visible in other packages??

2008-02-01 Thread paulbrickell
Could you post a link to the section in the docs. I just cant work this out.:confused: Roberto Nunnari wrote: > > oops.. I should have read the docs a bit more before posting.. > > sorry.. for the noise! > > -- > Robi. > > > --

Re: Populate Form from DAO

2008-02-01 Thread Richard Sayre
Yes, I know I can do it this way. I'm just being lazy. I want: To automatically get/set MyObject.getMeember1() rather then it automatically setting it in the Action and then having me create the Object and populate it with values. On Feb 1, 2008 9:10 AM, LEONARD Julien (Consulting for AC

RE: Populate Form from DAO

2008-02-01 Thread LEONARD Julien (Consulting for ACCOR Hotels)
Did you try : MyObject theObject; (geter and setter on theObject) execute () { theObject = myDAO.getRecord(id); } And in the JSP : -Message d'origine- De : Richard Sayre [mailto:[EMAIL PROTECTED] Envoyé : vendredi 1 février 2008 13:37 À : Struts Users Mailing List Objet : Popula

Populate Form from DAO

2008-02-01 Thread Richard Sayre
Struts 2 allows us to automatically populate our forms if we name our fields correctly, which is wonderful. My actions usually go something like this execute () { MyObject o = myDAO.getRecord(id); member1 = o.getMember1(); member2 = o.getMember2(); } MyObject is a JO for hold a row

Re: Struts and Windows Authentication

2008-02-01 Thread Antonio Petrelli
2008/2/1, Arun <[EMAIL PROTECTED]>: > Hi, > > I have a web application in which I need to implement windows > authentication. > Basically there is a login screen where we can enter username and password. > These users are the users that are there in OS. > The username is like domainname\username an

Struts and Windows Authentication

2008-02-01 Thread Arun
Hi, I have a web application in which I need to implement windows authentication. Basically there is a login screen where we can enter username and password. These users are the users that are there in OS. The username is like domainname\username and password is the password. A basic authenticati

Re: PO Question about Struts2

2008-02-01 Thread issueTracker
thanks for your reply. Got it now =) -- View this message in context: http://www.nabble.com/PO-Question-about-Struts2-tp15209261p15223362.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e

Re: ActionContext.getContext().getSession return null when I test Struts2 action by JUnit.

2008-02-01 Thread Joey
I found it . like this. Map param = new HashMap(); ActionContext.getContext().setSession(param); Thanks for your help On Feb 1, 2008 4:53 PM, Joey <[EMAIL PROTECTED]> wrote: > Thanks, I just checked testing class in Struts2 package, but I am a > newbie for Struts2. I cannot und

Re: ActionContext.getContext().getSession return null when I test Struts2 action by JUnit.

2008-02-01 Thread Joey
Thanks, I just checked testing class in Struts2 package, but I am a newbie for Struts2. I cannot understant Struts2 very well, so if you don't mind, pls tell me which testing class I can learn from. Thanks again On Feb 1, 2008 4:31 PM, Nils-Helge Garli Hegvik <[EMAIL PROTECTED]> wrote: > You ne

Re: Struts tags and Filter Dispatcher Url Pattern-struts 2.1.1

2008-02-01 Thread Al Sutton
As a first side note S2.1.1 hasn't been released, so you're either using the very old S2.1.0 snapshot, or you're using the latest from the Subversion repository. Most of the tags in S2.1 need the stack due to the way they are rendered, if you are using any tags you should have the filter in pl

Re: ActionContext.getContext().getSession return null when I test Struts2 action by JUnit.

2008-02-01 Thread Nils-Helge Garli Hegvik
You need to initialize the ActionContext in your unit tests. Take a look at the Struts 2 tests how it is solved there. Nils-H On Feb 1, 2008 9:28 AM, Joey Watson <[EMAIL PROTECTED]> wrote: > Hi everybody. > > I want to test a action class (Struts2) by JUnit. and then method in > this action need

ActionContext.getContext().getSession return null when I test Struts2 action by JUnit.

2008-02-01 Thread Joey Watson
Hi everybody. I want to test a action class (Struts2) by JUnit. and then method in this action need a value in session, then when I run my JUnit test class, ActionContext.getContext().getSession return null. (not ActionContext.getContext().getSession().get("XXX") return null). this action class i

Re: Struts2 tags loops

2008-02-01 Thread Filipe David Manana
Nop. Neither way works. This has a single iteration, and the value outputted is the value of the variable (10 for example). The jstl tag, as well as all other jstl tags, is not allowed in struts 2.0.11, afaik. On Feb 1, 2008 12:24 AM, Dave Newton <[EMAIL PROTECTED]> wrote: > --- Filipe