[S2] Access DAOs in Spring actions

2007-04-24 Thread wolverine my
Hi! I have action classes configured in struts.xml and the DataSource, SessionFactory, DAO objects configured in Spring's applicationContext.xml. How can I reference the DAO objects in my action class? Please advise, thank you! --

[S2] Initializing Actions from Spring page not found

2007-04-24 Thread wolverine my
Hi! The page is not found when we clicked on "Initializing Actions from Spring" from http://struts.apache.org/2.x/docs/why-would-we-want-to-create-action-objects-from-the-spring-configuration.html Do you have any idea of what could be the problem? --

How do I access Struts 2 action errors in request from Freemarker view.

2007-04-24 Thread Caine Lai
I'm trying to figure out a way to access the Struts 2 action messages in a Freemarker template. I copied the following code from the Struts template directory, into my Freemarker view, but the action errors do not show up, which tells me I must not be using the correct variable. [#if (actionErro

Re: Re: Null date become today in map when use textfield tag

2007-04-24 Thread longhao
Hello Dave Newton, I confirm that i define the testDate in my applicationContext.xml file. And if you use tag. the magic thing is still happen . Null date become today in map. Best regards, === At 2007-04-24, 21:27:41 you

Re: [s2] Extending struts.xml

2007-04-24 Thread Dave Newton
--- Zoran Avtarovski <[EMAIL PROTECTED]> wrote: > Thanks for the big call Dave. ;) > My concern was that 10 may introduce more issues > than it solved. So I should've said "What's the > easiest and least disruptive way to fix the > problem?" I haven't updated that far either... An XWork person

Re: [s2] Extending struts.xml

2007-04-24 Thread Zoran Avtarovski
Thanks for the big call Dave. My concern was that 10 may introduce more issues than it solved. So I should've said "What's the easiest and least disruptive way to fix the problem?" Z. > --- Zoran Avtarovski <[EMAIL PROTECTED]> wrote: >> I found some info on the mail lists pointing to an >> error

Re: [s2]theme="ajax" for form/submit button

2007-04-24 Thread Musachy Barroso
The "targets" won't be updated if they are in another frame, you can do something like this: dojo.event.topics.subscribe("/updateIframe", function(data, type, e) { if(type == "load") { //use iframe index or name here window.iframe[0].document.getElementById("divId").innerHTML = data;

Re: [s2]theme="ajax" for form/submit button

2007-04-24 Thread Harring Figueiredo
H... I sm not sure I understood. Maybe the generated code is different for: ??? If the target is used on the form, it does reference and update the right form (But I have to IFrames that I need to update and that is the reason I am using the . Harring. On 4/24/07, Musachy Barroso <[EMAIL

Re: [s2] Extending struts.xml

2007-04-24 Thread Dave Newton
--- Zoran Avtarovski <[EMAIL PROTECTED]> wrote: > I found some info on the mail lists pointing to an > error in xwork and that it was fixed in 2.08. When I > went looking to download a nightly build there > were only 2.10 builds. .10 is bigger than .08. The fix is probably still in it. d.

Re: [s2]theme="ajax" for form/submit button

2007-04-24 Thread Musachy Barroso
I think that's why it doesn't work, the ajax theme uses getElementBydId(id) (actually dojo.byId(), anyway) which returns the element in the current document, for an iframe it should be window.frames[0].document.getElementById(...). You can use the notifyTopics attribute and do it yourself inside t

Re: [s2]theme="ajax" for form/submit button

2007-04-24 Thread Harring Figueiredo
This is the generated code: The div is on a different IFrame. Harring On 4/24/07, Harring Figueiredo <[EMAIL PROTECTED]> wrote: Musachy, Thanks for the reply. I am using only one div with the id. I now tried something else while waiting for the reply: I then tried to repla

Re: [s2]theme="ajax" for form/submit button

2007-04-24 Thread Musachy Barroso
Is the target div on a different frame? musachy On 4/24/07, Harring Figueiredo <[EMAIL PROTECTED]> wrote: Musachy, Thanks for the reply. I am using only one div with the id. I now tried something else while waiting for the reply: I then tried to replace the "traget" on the form itself

[s2] Extending struts.xml

2007-04-24 Thread Zoran Avtarovski
I'm trying to extend the standard struts.xml by using includes but tomcat is throwing errors. I found some info on the mail lists pointing to an error in xwork and that it was fixed in 2.08. When I went looking to download a nightly build there were only 2.10 builds. My question is what's the eas

Response already committed

2007-04-24 Thread Gajbhe, Laxman \(Contractor\)
Hi, I've following global result to handle authentication. login /home input ... For most part this works fine. The only problem with this is that on session timeout, it opens up the login page nested inside the page being requested. For example if there are tabs on the page and i

Re: [s2]theme="ajax" for form/submit button

2007-04-24 Thread Harring Figueiredo
Musachy, Thanks for the reply. I am using only one div with the id. I now tried something else while waiting for the reply: I then tried to replace the "traget" on the form itself (since it works on the form) with: and also tried with Howver I cannot get the rigyht syntax to substitue

Re: [S2] Newbie. Authentification Interceptors

2007-04-24 Thread Zoran Avtarovski
For what it's worth we use a combination of both JAAS and a custom AuthInterceptor. JAAS handles authentication and the AuthInterceptor manages authorisation. This leverages off the strength of JAAS and has the flexibility required for our needs. A couple of sources of useful information are: 1.

Re: [s2]theme="ajax" for form/submit button

2007-04-24 Thread Musachy Barroso
After the ajax request completes, for each target in the target list this will run: dojo.byId("id").innerHTML = text; try updating the div content like that, and see what happens. This is a dumb question, but are you using the same id for more than one div? musachy On 4/24/07, Harring Figueire

[s2]theme="ajax" for form/submit button

2007-04-24 Thread Harring Figueiredo
Folks, I have a form with a submit button as follows On the page itself, I have an IFrame with the div="RightPaneWindow"; however, the updated div is the div in which the form is in. Any idea? Thank you in advance, Harring Figueiredo

ear problem

2007-04-24 Thread Ashuin Sharma Chamorro
I have 3 struts applications (.war ) inside one .ear. One of these application's classes extend a base class that is defined in an external .jar. Somehow if I deploy the three applications separately everything works fine, But once I deploy only the .ear, it fails when creating the extended clas

RE: Reset struts form values: Struts 1.3

2007-04-24 Thread Chaudhary, Harsh
Yea, that's what I was thinking too. I was just wondering if Struts (or some other API) has a built-in caching mechanism. Thanks though, Harsh. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Benedict Sent: Tuesday, April 24, 2007 4:55 PM To: Struts U

Re: ForwardAction question/issue

2007-04-24 Thread Paul Benedict
Adam, It sounds like you have your "protected" logic in the JSP. If so, then the JSP will always be rendered. You should instead put such security logic in the application, such as in the Struts Controller. It's no good putting it on the JSP. Paul On 4/24/07, Adam Gordon <[EMAIL PROTECTED]> wro

Re: Reset struts form values: Struts 1.3

2007-04-24 Thread Paul Benedict
Chaudhary, Harsh <[EMAIL PROTECTED]> wrote: Hi, I am using Struts 1.3. We have several struts forms which are pre-populated from a database. My questions is, if I want to provide the user with a way to reset the form to the initial values which were populated from the database. It sounds l

Re: [s2] Difference between actionMessages and actionErrors

2007-04-24 Thread Eric Rank
Another important difference between ActionMessages and ActionErrors has to do with how the Validation interceptor works. If you add an ActionError in the 'validate' method (or before the ValidationInterceptor get ahold of the request) of a ValidationAware action, the interceptor will see t

Reset struts form values: Struts 1.3

2007-04-24 Thread Chaudhary, Harsh
Hi, I am using Struts 1.3. We have several struts forms which are pre-populated from a database. My questions is, if I want to provide the user with a way to reset the form to the initial values which were populated from the database. Is there any API or method calls for that. Or maybe some kind

Re: S2 Tag Properties

2007-04-24 Thread Musachy Barroso
If the name is null, and there is a key, it will be used as the name. So, no, you don't need to duplicate it. musachy On 4/24/07, Harring Figueiredo <[EMAIL PROTECTED]> wrote: They can the different and serve different purposes. The name attribute that you have there means that the value will

Re: S2 Tag Properties

2007-04-24 Thread Harring Figueiredo
They can the different and serve different purposes. The name attribute that you have there means that the value will be picked from yourAction.getUser().getZip().getCity(); The key will be used to lookup the resources files using the literal string 'user.zip.city', of course. Hope this helps.

Re: [S2] Formatting inside Iterator tag

2007-04-24 Thread Harring Figueiredo
Oh Boy, I am glad to see that I was not the only one to have this problem :-) Dave, Here is how I got it to work: Edit the struts.properties with the following entry struts.custom.i18n.resources=translations Edit the properties file translations.properties with the entry format.money={0,numb

Re: [s2] Difference between actionMessages and actionErrors

2007-04-24 Thread Skip Hollowell
Harring Figueiredo wrote: Here it goes, without testing. I think that the HTML generated is slightly different so that you may apply different CSS style sheets to it. Bingo. That is exactly the reason for the two. Direct from my style sheet: span.actionMessage { background-color: Lig

S2 Tag Properties

2007-04-24 Thread stanlick
I notice key is now preferred over getText() and am now curious about something else. Is the name attribute necessary when using key? I would rather not duplicate myself unless S2 requires it. -- Scott [EMAIL PROTECTED]

Re: [s2] Difference between actionMessages and actionErrors

2007-04-24 Thread Harring Figueiredo
I was supposed to test the genereated HTML from both. (Laziness got the best of me). Here it goes, without testing. I think that the HTML generated is slightly different so that you may apply different CSS style sheets to it. harringf On 4/24/07, Musachy Barroso <[EMAIL PROTECTED]> wrote: a

ForwardAction question/issue

2007-04-24 Thread Adam Gordon
Hi- So we're using ForwardAction for URIs that can just link to a JSP page and don't need a customized Struts Action to perform tasks ahead of time. When a user connects to our website, we essentially direct the user to the default main page, which is protected, so they have to log in first

Optiontransferselect button customization.

2007-04-24 Thread Felipe Rodrigues
Hi guys, Can I somehow change the button (e.g. addAllToLeft) of a Optiontransferselect to some image? I imagine it can be done by changing the ftl, but I'd like some clues to do that. Would be great to define some id for these buttons, then we could change it by css. How about that? Thanks, Fel

Re: How to realize ajax in struts2

2007-04-24 Thread Felipe Rodrigues
I guess you're looking for custom validation. You can find it surfing at http://struts.apache.org/2.x/docs/home.html By the way, in your code, aren't you missing the tag? Struts forms are similar to HTML forms. You must wrap the ui components in a , except in special cases. Regards, Felipe r

Re: [S2] Formatting inside Iterator tag

2007-04-24 Thread Dave Newton
--- chengas123 <[EMAIL PROTECTED]> wrote: > Awesome. Got it working by adding that to a > package.properties file. I have no plans to > internationalize this site and it wasn't immediately > obvious to me that formatting would fall under the > category of localization (although I understand why

Re: S2: Disable datetimepicker

2007-04-24 Thread Musachy Barroso
That widget is long gone :) (since 2.0.3 I think) musachy On 4/24/07, Martin Gainty <[EMAIL PROTECTED]> wrote: http://www.koders.com/javascript/fidFF0542A22748F79D50156F4B75564D76676002D4.aspx I would suggest using struts.widgets.HTMLDynArchCalendar whcih inherits from dojo.widget.DomWidget

Re: S2: Disable datetimepicker

2007-04-24 Thread Musachy Barroso
In the beginning I think that was the idea(I wasn't around at that time so don't take my word for it :) ), as of 2.1 we are moving all these "ajax" tags to a "dojo" plugin, so they are dojo specific. If there was another implementation, it would be better to have a common interface, but just worki

Re: S2: Disable datetimepicker

2007-04-24 Thread Martin Gainty
http://www.koders.com/javascript/fidFF0542A22748F79D50156F4B75564D76676002D4.aspx I would suggest using struts.widgets.HTMLDynArchCalendar whcih inherits from dojo.widget.DomWidget which has the enable() and disable() methods M-- This email message and any files transmitted with it contain confid

Re: [S2] Formatting inside Iterator tag

2007-04-24 Thread chengas123
Dave Newton-4 wrote: > > --- chengas123 <[EMAIL PROTECTED]> wrote: >> Can this be any properties file or are you referring > >> to struts.properties? > > It needs to be one of the normal properties files used > for messages etc. that S2 searches for, where you keep > the rest of your message

Re: [s2] Difference between actionMessages and actionErrors

2007-04-24 Thread Musachy Barroso
actionMessages is for general messages, and actionErrors for errors. . I don't think there are any implications. regards musachy On 4/24/07, Zoran Avtarovski <[EMAIL PROTECTED]> wrote: A quick question on what the recommended method for displaying general messages when using struts 2, actionMe

Re: [S2] Newbie. Authentification Interceptors

2007-04-24 Thread Mark Menard
On 4/24/07 8:49 AM, "Shahak Nagiel" <[EMAIL PROTECTED]> wrote: > Others can chime in as well, but from my experience in the past, > container-managed authentication is a little too rigid and doesn't offer > anywhere near the flexibility of a custom-brewed authentication/authorization > scheme. Th

Re: S2: Disable datetimepicker

2007-04-24 Thread Lance
I'm not a struts2 user (unfortunately) but this seems bad to me. From what I see of the s2 tags, they abstract you from the fact that dojo is being used under the hood. Should struts2 have it's own core js that proxies through to the dojo implementation? Scott Nesbitt wrote: Works great! Tha

Re: S2: Disable datetimepicker

2007-04-24 Thread Scott Nesbitt
Works great! Thanks, Musachy. Scott --- Musachy Barroso <[EMAIL PROTECTED]> wrote: > Assign an id to your datepicker, lets say "dp1" and > do this: > > dojo.widget.byId("dp1").disable(); > > to enable it: > > dojo.widget.byId("dp1").enable(); > > musachy > > On 4/24/07, Scott Nesbitt <[EM

Re: [S2] Formatting inside Iterator tag

2007-04-24 Thread Dave Newton
--- chengas123 <[EMAIL PROTECTED]> wrote: > Can this be any properties file or are you referring > to struts.properties? It needs to be one of the normal properties files used for messages etc. that S2 searches for, where you keep the rest of your messages/properties. (So no, I don't think stru

Re: S2: Disable datetimepicker

2007-04-24 Thread Musachy Barroso
Assign an id to your datepicker, lets say "dp1" and do this: dojo.widget.byId("dp1").disable(); to enable it: dojo.widget.byId("dp1").enable(); musachy On 4/24/07, Scott Nesbitt <[EMAIL PROTECTED]> wrote: I would like to enable/disable the datetimepicker when the user selects certain radio

Can I load filter-class from custom jar file in WEB-INF/lib dir

2007-04-24 Thread Vinit N
What I need to do to load the filter-class from custon jar or war file ? I am getting this exception : http://www.nabble.com/Can-I-load-filter-class-from-custom-jar-file-in-WEB-INF-lib-dir-tf3639142.html#a10162570 Sent from the Struts - User mailing list archive at Nabble.com. -

Re: [S2] Formatting inside Iterator tag

2007-04-24 Thread chengas123
Mark Menard wrote: > > /> > > That will do the date, there are some other formats listed on the Wiki I > think. *shrug* > > Mark > When I put the exact text you gave me into my .jsp the text "format.date" is printed out to the page. After a little more research it looks like format.date ne

S2: Disable datetimepicker

2007-04-24 Thread Scott Nesbitt
I would like to enable/disable the datetimepicker when the user selects certain radio buttons. Here is my tag: I can disable (and clear) the textbox next to the calendar icon like this: var ud = getField('mainForm', 'untildate'); ud.value = ""; ud.disabled = true; But this does not

Re: Null date become today in map when use textfield tag

2007-04-24 Thread Dave Newton
--- Martin Gainty <[EMAIL PROTECTED]> wrote: > please supply the applicationContext.xml definition > for 'testDate' Huh? I'd be more likely to think it has something to do with not using the tag, but I've never been entirely sure what the relationship between it and the input tags really is. d.

Re: Another file upload question

2007-04-24 Thread Dave Newton
--- meeboo <[EMAIL PROTECTED]> wrote: > private File uploadedMovie = null; > public void setUploadedMovie(File uploadedMovie) > {this.uploadedMovie = > uploadedMovie;} > > The problem is that I can't set the name of the > uploaded file before it is > saved to the drive. I can specify the path but

Re: Null date become today in map when use textfield tag

2007-04-24 Thread Martin Gainty
please supply the applicationContext.xml definition for 'testDate' e.g. web..xml /WEB-INF/view/springExample.jsp class="org.apache.struts2.portlet.example.spring.SpringAction" singleton="false"> M- This email message and any files transmitted with it contain confiden

Another file upload question

2007-04-24 Thread meeboo
Hey all I have an action class which handles file uploads via a setter method: private File uploadedMovie = null; public void setUploadedMovie(File uploadedMovie) {this.uploadedMovie = uploadedMovie;} The problem is that I can't set the name of the uploaded file before it is saved to the drive.

Re: [S2] Newbie. Authentification Interceptors

2007-04-24 Thread Shahak Nagiel
Others can chime in as well, but from my experience in the past, container-managed authentication is a little too rigid and doesn't offer anywhere near the flexibility of a custom-brewed authentication/authorization scheme. That's not to say a "custom" scheme need be entirely proprietary; we j

Re: Use EL to access to a key from the MessageResources.properties

2007-04-24 Thread piloupy GOTTAPIL
Thank you all. The solution of Niall works. I was trying to get the fmt taglib work for nearly 2 days... without success. But I really prefer the solution of Niall, since it doesn't oblige me to declare another taglib. I really thank you guys for your help. piloupy On 4/24/07, Niall Pemberton

Re: Could not load 'dojo.widget.html.Tooltip':last tried '__package__.js'

2007-04-24 Thread Musachy Barroso
You can just ignore it. musachy On 4/23/07, red phoenix <[EMAIL PROTECTED]> wrote: I want to use ajax in struts2,but when run my code like http://localhost:8080/test/index.html,it raise following Javascript error: Line:95 Char:1 Error:Could not load 'dojo.widget.html.Tooltip':last tried '__pac

Re: Technology choice?

2007-04-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, Sullivan, David wrote: > I am assuming that I wont. However many of the examples I have seen > using the interceptor framework use Springs IoC container and I probably > wont be using that given the EJB3 specification (Glassfish and Toplink) T

Null date become today in map when use textfield tag

2007-04-24 Thread longhao
TestDateAction.java public class TestDateAction extends ActionSupport { private Date singleDate; private Map mapDate; private List listDate; @Override public String execute() throws Exception { return super.

Re: Set language in JSP

2007-04-24 Thread Niall Pemberton
On 4/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I've encountered a rather annoying issue. To select the language in which our labels should be displayed, we use fmt:setLocale. Everything works fine, everybody's happy. But. To validate our forms, we use DynaValidator. In our webapp

Re: Use EL to access to a key from the MessageResources.properties

2007-04-24 Thread Niall Pemberton
On 4/23/07, piloupy GOTTAPIL <[EMAIL PROTECTED]> wrote: Hi, I'd like to do something like this in a JSP file : Email Link where contact.mail is a key from my MessageResources.properties. I think the solution is quite simple, but I can't find how to do. How about.. Email Link Niall Than

[S2] Newbie. Authentification Interceptors

2007-04-24 Thread Roger Varley
Hi I notice that there have been a few threads over the last couple of days where people have been talking about implementing login authentication via a Struts2 interceptor. Could someone simply outline the reason why they would want to do it this way rather than using container authentication?

RE: Struts Validation Problems

2007-04-24 Thread Raghupathy, Gurumoorthy
"^\w{2}-\w{6}(-\w{2}){0,5}$ | ^[0-9]{4,6}$" "^\\w{2}-\\w{6}(-\\w{2}){0,5}|([0-9]{4,6})$"; Are different you are missing the ^ sign after the | operator... Please read the regular expression book properly .. -Original Message- From: Ferruh Zamangör [mailto:[EMAIL PROTECTED] S

[s2] Difference between actionMessages and actionErrors

2007-04-24 Thread Zoran Avtarovski
A quick question on what the recommended method for displaying general messages when using struts 2, actionMessages or actionErrors. I had a look at the ValidationAware interface and there appears to be no difference between the two. The only difference I could see what that they are accessed by

Re: Tiles 2 Lifecycycle

2007-04-24 Thread Antonio Petrelli
2007/4/23, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: Hi Antonio -- I have been teaching for the past couple weeks and now returning to S2/Tiles. I would like to understand how Tiles affects the S2 lifecycle. AFAIK Tiles affects S2 only in rendering the results. What I mean is if you are using a