status messages in html:link tag
I want to implement a status message on a rollover for some of my links. I was considering doing something like: html:link href=http://www.google.com; target=_blank onmouseover=window.status='Go go google';return true which works fine. However, what I really want to do is pull the status message from my struts message-resources bundle for I18N. The only way I can think to do this is to use a scriptlet like : html:link href=http://www.google.com; target=_blank onmouseover=window.status='% getMessage(message.key);%';return true 2 questions... 1) is this the best way to do this? 2) if so, what can I use in the scriptlet (the getMessage() is fictional) to access the message? Thanks for your patience.. Vincent Fumo System Development Specialist ACS Municipal Services Government Systems 609-823-6587 AIM : neodem2001 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: status messages in html:link tag
cool.. thanks! -Original Message- From: Bob Arnott [mailto:[EMAIL PROTECTED] Sent: Thursday, March 31, 2005 12:41 PM To: Struts Users Mailing List Subject: Re: status messages in html:link tag Fumo, Vince wrote: I want to implement a status message on a rollover for some of my links. I was considering doing something like: html:link href=http://www.google.com; target=_blank onmouseover=window.status='Go go google';return true which works fine. However, what I really want to do is pull the status message from my struts message-resources bundle for I18N. The only way I can think to do this is to use a scriptlet like : html:link href=http://www.google.com; target=_blank onmouseover=window.status='% getMessage(message.key);%';return true Off the top of my head, you could try something like this - bean:define id=rollOverText type=java.lang.Stringbean:message key=my.key //bean:define html:link href=http://www.google.com; target=_blank onmouseover=window.status='%=rollOverText%'; return true;... -- Bob Arnott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: status messages in html:link tag
ok follow-up and I'm sure this one will take 2 seconds to answer.. part 1) is there a JSTL way to do the bean:define? part 2) What does it mean when the status message from the below code by Bob comes out as a literal (i.e.. %=rollOverText%) instead of the string it represents? I've checked the scriptlet outside of the tag and it outputs correctly. I'm thinking that the html:link tag isn't pre-processing the scriptlet? -Original Message- From: Bob Arnott [mailto:[EMAIL PROTECTED] Sent: Thursday, March 31, 2005 12:41 PM To: Struts Users Mailing List Subject: Re: status messages in html:link tag Fumo, Vince wrote: I want to implement a status message on a rollover for some of my links. I was considering doing something like: html:link href=http://www.google.com; target=_blank onmouseover=window.status='Go go google';return true which works fine. However, what I really want to do is pull the status message from my struts message-resources bundle for I18N. The only way I can think to do this is to use a scriptlet like : html:link href=http://www.google.com; target=_blank onmouseover=window.status='% getMessage(message.key);%';return true Off the top of my head, you could try something like this - bean:define id=rollOverText type=java.lang.Stringbean:message key=my.key //bean:define html:link href=http://www.google.com; target=_blank onmouseover=window.status='%=rollOverText%'; return true;... -- Bob Arnott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts + Spring or Struts versus Spring
Don't know if it's appropriate to do this, but I am adding my 2c as well. I've been using Spring and Hibernate with Struts for some time now and have found it to be excellent. If you are the book type, there is a very good book on Spring from Apress titled Pro Spring that covers the entire framework quite well. -Original Message- From: Joe Germuska [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 30, 2005 9:40 AM To: Ted Husted; Struts Users Mailing List Subject: Re: Struts + Spring or Struts versus Spring In short, what Ted said. More elaborately, I've been using Spring with a lot of Struts web apps, and I'm very happy with the combination. Spring does a whole lot more than Struts ever wanted to do, and you can use as much or as little of it as you like. And even though Spring MVC exists as a self-contained webapp framework, they also have some nice Struts-specific support, including base Action classes which are aware of Spring and going as far as an alternate RequestProcessor which supports using Spring as an Action factory where the Actions it creates are wired with references to your business expert collaborators. http://www.springframework.org/docs/api_1.2/org/springframework/web/struts/p ackage-summary.html The Spring WebFlow project also looks promising. This too comes with some Struts support. http://www.theserverside.com/common/printthread.tss?thread_id=32676 http://opensource.atlassian.com/confluence/spring/display/WEBFLOW/Home Joe At 7:35 AM -0500 3/30/05, Ted Husted wrote: Spring is a large project with several components. The Spring Core works just fine with Struts. You can use it to instantiate your business objects from Struts Actions. Aside from Spring Core, the Spring project also includes a Spring MVC component. Spring MVC does overlap with Struts. Spring MVC is a fine framework. Use whichever one works best for you. Yes, Struts + Spring + hibernate (or iBATIS) is an excellent approach. -Ted. On Wed, 30 Mar 2005 13:22:00 +0200, Rodolfo GarcĂa Esteban/CYII [EMAIL PROTECTED] wrote: Hi, I have been reading about frameworks and I have seen something about Spring, and I have a lot of doubts. Spring is complementary or is then same place?. In some places said that Spring is complementary thats threats about the middle tier, but I have seen some examples and Spring replaces the action servlet and has his own Controller. What do you think Spring is compatible with Struts?, is better Struts than Spring? is better Spring. Do you think the solution Struts + Spring + hibernate could be a good approach? Best Regards Rodolfo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com Narrow minds are weapons made for mass destruction -The Ex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
using fmt:message with Tiles and Struts
I am building a Struts Web application and I'm using Tiles for the first time. I have it all set up and working nicely. My problem comes in the fact that I want to use a standard messages.resources file for my page titles. For example home.title=Main Home Page info.title=Intro Page etc. I am used to setting the bundle at the top of the page like: fmt:setBundle basename=messages/ and then directly accessing keys as follows: fmt:message key=home.title/ however I am now using tiles so what I had hoped was to use a tiles attribute to pass the key : definition name=.home extends=.baseDef put name=titleKey value=title.home / /definition and then use the key in the tile like: fmt:message key=${titleKey}/ however, nothing I've tried has worked (including just trying the fmt:message tag w/o using Tiles like : c:set var=titleKey value=home.title/) . For some reason, the fmt:message tag refuses to accept expression values. Can anyone offer me a best practice on how to handle this? Or at least solve my problem? Vincent Fumo System Development Specialist ACS Municipal Services Government Systems 609-823-6587 AIM : neodem2001 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: using fmt:message with Tiles and Struts
That was close to the first way I went about it. I did the following: tiles:useAttribute name=titleKey scope=page/ and then I was able to access the key just fine ( I did a test of c:out value=${titleKey} / and got home.title), proving that the problem wasn't in the way I was using the tiles attribute. For some reason, when I plugged in : fmt:message key=${titleKey}/ I got the usual ???${titleKey}??? message from the fmt:message tag Perhaps I'm doing something wrong somewhere. I even tried just doing the following as a test: c:set var=titleKey value=home.title/ fmt:message key=${titleKey}/ fmt:message key=home.title/ and I got the following: ???${titleKey}??? Main Home Page -Original Message- From: Benedict, Paul C [mailto:[EMAIL PROTECTED] Sent: Friday, March 25, 2005 2:27 PM To: 'Struts Users Mailing List' Subject: RE: using fmt:message with Tiles and Struts Vince, You need to import the Tiles attribute before you reference it: tiles:importAttribute name=titleKey ignore=true / c:out value=${titleKey} / Thanks, Paul -Original Message- From: Fumo, Vince [mailto:[EMAIL PROTECTED] Sent: Friday, March 25, 2005 2:11 PM To: 'user@struts.apache.org' Subject: using fmt:message with Tiles and Struts I am building a Struts Web application and I'm using Tiles for the first time. I have it all set up and working nicely. My problem comes in the fact that I want to use a standard messages.resources file for my page titles. For example home.title=Main Home Page info.title=Intro Page etc. I am used to setting the bundle at the top of the page like: fmt:setBundle basename=messages/ and then directly accessing keys as follows: fmt:message key=home.title/ however I am now using tiles so what I had hoped was to use a tiles attribute to pass the key : definition name=.home extends=.baseDef put name=titleKey value=title.home / /definition and then use the key in the tile like: fmt:message key=${titleKey}/ however, nothing I've tried has worked (including just trying the fmt:message tag w/o using Tiles like : c:set var=titleKey value=home.title/) . For some reason, the fmt:message tag refuses to accept expression values. Can anyone offer me a best practice on how to handle this? Or at least solve my problem? Vincent Fumo System Development Specialist ACS Municipal Services Government Systems 609-823-6587 AIM : neodem2001 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: using fmt:message with Tiles and Struts
I'm assuming you mean the jar? It's just the usual jstl.jar and the tld is fmt.tld hnm.. I just looked at the tld and I've got class names like : tag description Maps key to localized message and performs parametric replacement /description namemessage/name tag-classorg.apache.taglibs.standard.tag.rt.fmt.MessageTag/tag-class I'm assuming now that I somehow am using the wrong tld.. if I am, can you direct me to the correct one? -Original Message- From: Benedict, Paul C [mailto:[EMAIL PROTECTED] Sent: Friday, March 25, 2005 2:43 PM To: 'Struts Users Mailing List' Subject: RE: using fmt:message with Tiles and Struts Did you accidentally include the run-time version of fmt? -Original Message- From: Fumo, Vince [mailto:[EMAIL PROTECTED] Sent: Friday, March 25, 2005 2:38 PM To: 'Struts Users Mailing List' Subject: RE: using fmt:message with Tiles and Struts That was close to the first way I went about it. I did the following: tiles:useAttribute name=titleKey scope=page/ and then I was able to access the key just fine ( I did a test of c:out value=${titleKey} / and got home.title), proving that the problem wasn't in the way I was using the tiles attribute. For some reason, when I plugged in : fmt:message key=${titleKey}/ I got the usual ???${titleKey}??? message from the fmt:message tag Perhaps I'm doing something wrong somewhere. I even tried just doing the following as a test: c:set var=titleKey value=home.title/ fmt:message key=${titleKey}/ fmt:message key=home.title/ and I got the following: ???${titleKey}??? Main Home Page -Original Message- From: Benedict, Paul C [mailto:[EMAIL PROTECTED] Sent: Friday, March 25, 2005 2:27 PM To: 'Struts Users Mailing List' Subject: RE: using fmt:message with Tiles and Struts Vince, You need to import the Tiles attribute before you reference it: tiles:importAttribute name=titleKey ignore=true / c:out value=${titleKey} / Thanks, Paul -Original Message- From: Fumo, Vince [mailto:[EMAIL PROTECTED] Sent: Friday, March 25, 2005 2:11 PM To: 'user@struts.apache.org' Subject: using fmt:message with Tiles and Struts I am building a Struts Web application and I'm using Tiles for the first time. I have it all set up and working nicely. My problem comes in the fact that I want to use a standard messages.resources file for my page titles. For example home.title=Main Home Page info.title=Intro Page etc. I am used to setting the bundle at the top of the page like: fmt:setBundle basename=messages/ and then directly accessing keys as follows: fmt:message key=home.title/ however I am now using tiles so what I had hoped was to use a tiles attribute to pass the key : definition name=.home extends=.baseDef put name=titleKey value=title.home / /definition and then use the key in the tile like: fmt:message key=${titleKey}/ however, nothing I've tried has worked (including just trying the fmt:message tag w/o using Tiles like : c:set var=titleKey value=home.title/) . For some reason, the fmt:message tag refuses to accept expression values. Can anyone offer me a best practice on how to handle this? Or at least solve my problem? Vincent Fumo System Development Specialist ACS Municipal Services Government Systems 609-823-6587 AIM : neodem2001 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu
RE: using fmt:message with Tiles and Struts
thank you.. I totally missed that.. Appreciated! -Original Message- From: Benedict, Paul C [mailto:[EMAIL PROTECTED] Sent: Friday, March 25, 2005 2:57 PM To: 'Struts Users Mailing List' Subject: RE: using fmt:message with Tiles and Struts Ah. Yes, that's the problem... The tag is the rt version (run time) which does not accept expressions. JSTL comes with 2 sets of tags. One el (expression-language) and the other rt (runtime), which allows scriplets to be entered into tags. Download them here: http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi -Original Message- From: Fumo, Vince [mailto:[EMAIL PROTECTED] Sent: Friday, March 25, 2005 2:50 PM To: 'Struts Users Mailing List' Subject: RE: using fmt:message with Tiles and Struts I'm assuming you mean the jar? It's just the usual jstl.jar and the tld is fmt.tld hnm.. I just looked at the tld and I've got class names like : tag description Maps key to localized message and performs parametric replacement /description namemessage/name tag-classorg.apache.taglibs.standard.tag.rt.fmt.MessageTag/tag-class I'm assuming now that I somehow am using the wrong tld.. if I am, can you direct me to the correct one? -Original Message- From: Benedict, Paul C [mailto:[EMAIL PROTECTED] Sent: Friday, March 25, 2005 2:43 PM To: 'Struts Users Mailing List' Subject: RE: using fmt:message with Tiles and Struts Did you accidentally include the run-time version of fmt? -Original Message- From: Fumo, Vince [mailto:[EMAIL PROTECTED] Sent: Friday, March 25, 2005 2:38 PM To: 'Struts Users Mailing List' Subject: RE: using fmt:message with Tiles and Struts That was close to the first way I went about it. I did the following: tiles:useAttribute name=titleKey scope=page/ and then I was able to access the key just fine ( I did a test of c:out value=${titleKey} / and got home.title), proving that the problem wasn't in the way I was using the tiles attribute. For some reason, when I plugged in : fmt:message key=${titleKey}/ I got the usual ???${titleKey}??? message from the fmt:message tag Perhaps I'm doing something wrong somewhere. I even tried just doing the following as a test: c:set var=titleKey value=home.title/ fmt:message key=${titleKey}/ fmt:message key=home.title/ and I got the following: ???${titleKey}??? Main Home Page -Original Message- From: Benedict, Paul C [mailto:[EMAIL PROTECTED] Sent: Friday, March 25, 2005 2:27 PM To: 'Struts Users Mailing List' Subject: RE: using fmt:message with Tiles and Struts Vince, You need to import the Tiles attribute before you reference it: tiles:importAttribute name=titleKey ignore=true / c:out value=${titleKey} / Thanks, Paul -Original Message- From: Fumo, Vince [mailto:[EMAIL PROTECTED] Sent: Friday, March 25, 2005 2:11 PM To: 'user@struts.apache.org' Subject: using fmt:message with Tiles and Struts I am building a Struts Web application and I'm using Tiles for the first time. I have it all set up and working nicely. My problem comes in the fact that I want to use a standard messages.resources file for my page titles. For example home.title=Main Home Page info.title=Intro Page etc. I am used to setting the bundle at the top of the page like: fmt:setBundle basename=messages/ and then directly accessing keys as follows: fmt:message key=home.title/ however I am now using tiles so what I had hoped was to use a tiles attribute to pass the key : definition name=.home extends=.baseDef put name=titleKey value=title.home / /definition and then use the key in the tile like: fmt:message key=${titleKey}/ however, nothing I've tried has worked (including just trying the fmt:message tag w/o using Tiles like : c:set var=titleKey value=home.title/) . For some reason, the fmt:message tag refuses to accept expression values. Can anyone offer me a best practice on how to handle this? Or at least solve my problem? Vincent Fumo System Development Specialist ACS Municipal Services Government Systems 609-823-6587 AIM : neodem2001 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system