RE: using fmt:message with Tiles and Struts

2005-03-25 Thread Benedict, Paul C
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]



RE: using fmt:message with Tiles and Struts

2005-03-25 Thread Fumo, Vince
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

2005-03-25 Thread Benedict, Paul C
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) 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]



RE: using fmt:message with Tiles and Struts

2005-03-25 Thread Fumo, Vince
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

2005-03-25 Thread Benedict, Paul C
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.

--

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED

RE: using fmt:message with Tiles and Struts

2005-03-25 Thread Fumo, Vince
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