RE: ugly ugly ugly [SOLVED]

2003-10-14 Thread Fenderbosch, Eric
Yeah...
Changed it to that about 10 minutes after posting. :o

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 14, 2003 13:04
To: Struts Users Mailing List
Subject: RE: ugly ugly ugly [SOLVED]



--- "Fenderbosch, Eric" <[EMAIL PROTECTED]> wrote:
> I finally got it to work like this:
> 
> 
>   
> 

Why are you using  and ?  Wouldn't this work:


   


David

> 
> -Original Message-
> From: Fenderbosch, Eric 
> Sent: Monday, October 13, 2003 12:05
> To: Struts Users Mailing List
> Subject: RE: ugly ugly ugly
> 
> 
> I'm not getting the parameter substitution to work correctly.
> Resource:
> message.benefits=The FedEx Custom Critical Shipping
> Toolkit enables you to:
> I've tried two different methods to perform the substitution.
> 
> 
>   "/>
> 
> 
> and
> 
> 
>   
> 
> 
>   
> 
> 
> But both end up creating a URL like:
> https://localhost:7002/track/tiles/{0}
> 
> If I hard code it like this
> 
>   
> 
> it works fine, so I know the param substitution itself is working, just
> not the substitution from the resource file.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

-
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: ugly ugly ugly [SOLVED]

2003-10-14 Thread David Graham

--- "Fenderbosch, Eric" <[EMAIL PROTECTED]> wrote:
> I finally got it to work like this:
> 
> 
>   
> 

Why are you using  and ?  Wouldn't this work:


   


David

> 
> -Original Message-
> From: Fenderbosch, Eric 
> Sent: Monday, October 13, 2003 12:05
> To: Struts Users Mailing List
> Subject: RE: ugly ugly ugly
> 
> 
> I'm not getting the parameter substitution to work correctly.
> Resource:
> message.benefits=The FedEx Custom Critical Shipping
> Toolkit enables you to:
> I've tried two different methods to perform the substitution.
> 
> 
>   "/>
> 
> 
> and
> 
> 
>   
> 
> 
>   
> 
> 
> But both end up creating a URL like:
> https://localhost:7002/track/tiles/{0}
> 
> If I hard code it like this
> 
>   
> 
> it works fine, so I know the param substitution itself is working, just
> not the substitution from the resource file.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



RE: ugly ugly ugly [SOLVED]

2003-10-14 Thread Fenderbosch, Eric
I finally got it to work like this:


  


-Original Message-
From: Fenderbosch, Eric 
Sent: Monday, October 13, 2003 12:05
To: Struts Users Mailing List
Subject: RE: ugly ugly ugly


I'm not getting the parameter substitution to work correctly.
Resource:
message.benefits=The FedEx Custom Critical Shipping 
Toolkit enables you to:
I've tried two different methods to perform the substitution.


  "/>


and


  


  


But both end up creating a URL like:
https://localhost:7002/track/tiles/{0}

If I hard code it like this

  

it works fine, so I know the param substitution itself is working, just not the 
substitution from the resource file.

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



RE: ugly ugly ugly

2003-10-13 Thread Fenderbosch, Eric
I'm not getting the parameter substitution to work correctly.
Resource:
message.benefits=The FedEx Custom Critical Shipping 
Toolkit enables you to:
I've tried two different methods to perform the substitution.


  "/>


and


  


  


But both end up creating a URL like:
https://localhost:7002/track/tiles/{0}

If I hard code it like this

  

it works fine, so I know the param substitution itself is working, just not the 
substitution from the resource file.

-Original Message-
From: Evan Schnell [mailto:[EMAIL PROTECTED]
Sent: Friday, October 10, 2003 17:10
To: Struts Users Mailing List
Subject: Re: ugly ugly ugly


David Graham wrote:

 From my experience working with human translators this might be a 
better approach.  Translators like to be able to manipulate word order 
and punctuation. 
It is a little more code but I'll argue that it is not any less 
readable. Most importantly it works with Struts links and will properly 
encode the URL:


applicationResources.properties:
message.benefits=The FedEx Custom Critical {0} enables ...
mainPage.shippingLinkName=Shipping Toolkit


Put this at the top of the JSP:



   

 

In the body of the jsp:

 



Regards, Evan.

-- 
Evan Schnell, Project Lead
nVISIA, Twin Cities  "Enterprise Architecture and Construction"
7701 France Ave. S, Edina, MN 55435
Voice: 952.837.2577 -- Fax: 952.837.2578 -- Mobile: 612.232.5972


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



Re: ugly ugly ugly

2003-10-11 Thread Adam Hardy
On 10/10/2003 11:09 PM Evan Schnell wrote:
 From my experience working with human translators this might be a 
better approach.  Translators like to be able to manipulate word order 
and punctuation. It is a little more code but I'll argue that it is not 
any less readable. Most importantly it works with Struts links and will 
properly encode the URL:

applicationResources.properties:
message.benefits=The FedEx Custom Critical {0} enables ...
mainPage.shippingLinkName=Shipping Toolkit
Put this at the top of the JSP:


   
  
   


In the body of the jsp:



Regards, Evan.

Very elegant solution.



--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: ugly ugly ugly

2003-10-10 Thread David Graham

--- Derek Richardson <[EMAIL PROTECTED]> wrote:
> Do I still declare my properties files in struts-config and associate
> them with keys?

Yes, and add this to you web.xml file so  will also know
where to find your messages:


javax.servlet.jsp.jstl.fmtlocalizationContext
com.yourcorp.Resources


David

> 
> Knew it is a part of the JSTL, didn't know it's a drop-in replacement
> for b:message.
> 
> -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 10, 2003 5:48 PM
> To: Struts Users Mailing List
> Subject: RE: ugly ugly ugly
> 
> 
> 
> --- Derek Richardson <[EMAIL PROTECTED]> wrote:
> > Is fmt:message a complete replacement for b:message? What do I have to
> > know to use it? 
> 
> Yes.   is part of the JSTL 
> http://java.sun.com/products/jsp/jstl/
> 
> David
> 
> > 
> > -Original Message-
> > From: David Graham [mailto:[EMAIL PROTECTED]
> > Sent: Friday, October 10, 2003 4:35 PM
> > To: Struts Users Mailing List
> > Subject: Re: ugly ugly ugly
> > 
> > ...
> > That's what I would do except use the JSTL version:
> > 
> > ...
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
> 
> -
> 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]
> 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



RE: ugly ugly ugly

2003-10-10 Thread Derek Richardson
Do I still declare my properties files in struts-config and associate them with keys?

Knew it is a part of the JSTL, didn't know it's a drop-in replacement for b:message.

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Friday, October 10, 2003 5:48 PM
To: Struts Users Mailing List
Subject: RE: ugly ugly ugly



--- Derek Richardson <[EMAIL PROTECTED]> wrote:
> Is fmt:message a complete replacement for b:message? What do I have to
> know to use it? 

Yes.   is part of the JSTL 
http://java.sun.com/products/jsp/jstl/

David

> 
> -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 10, 2003 4:35 PM
> To: Struts Users Mailing List
> Subject: Re: ugly ugly ugly
> 
> ...
> That's what I would do except use the JSTL version:
> 
> ...
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

-
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: ugly ugly ugly

2003-10-10 Thread David Graham

--- Derek Richardson <[EMAIL PROTECTED]> wrote:
> Is fmt:message a complete replacement for b:message? What do I have to
> know to use it? 

Yes.   is part of the JSTL 
http://java.sun.com/products/jsp/jstl/

David

> 
> -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 10, 2003 4:35 PM
> To: Struts Users Mailing List
> Subject: Re: ugly ugly ugly
> 
> ...
> That's what I would do except use the JSTL version:
> 
> ...
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



RE: ugly ugly ugly

2003-10-10 Thread Derek Richardson
Is fmt:message a complete replacement for b:message? What do I have to know to use it? 

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Friday, October 10, 2003 4:35 PM
To: Struts Users Mailing List
Subject: Re: ugly ugly ugly

...
That's what I would do except use the JSTL version:

...

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



Re: ugly ugly ugly

2003-10-10 Thread Evan Schnell
David Graham wrote:

--- "Fenderbosch, Eric" <[EMAIL PROTECTED]> wrote:
 

The whole use-a-named-property-for-everything is great so that marketing
can change the text/copy without involving a HTML/JSP developer, as well
as the future ability to I18N a site down the road.  However some things
just get ugly.
Example:
Old line of HTML:
The FedEx Custom Critical Shipping
Toolkit enables you to:
New lines w/ tags:
 
">
 

 
(I know I could use a  tag)

Any ideas for making this simpler?  Should I just define one large
resource like:
message.benefits=The FedEx Custom Critical Shipping Toolkit enables you
to:
Then simply do:

   

That's what I would do except use the JSTL version:

 

From my experience working with human translators this might be a 
better approach.  Translators like to be able to manipulate word order 
and punctuation. 
It is a little more code but I'll argue that it is not any less 
readable. Most importantly it works with Struts links and will properly 
encode the URL:

applicationResources.properties:
message.benefits=The FedEx Custom Critical {0} enables ...
mainPage.shippingLinkName=Shipping Toolkit
Put this at the top of the JSP:


   
  
   


In the body of the jsp:



Regards, Evan.

--
Evan Schnell, Project Lead
nVISIA, Twin Cities  "Enterprise Architecture and Construction"
7701 France Ave. S, Edina, MN 55435
Voice: 952.837.2577 -- Fax: 952.837.2578 -- Mobile: 612.232.5972


smime.p7s
Description: S/MIME Cryptographic Signature


Re: ugly ugly ugly

2003-10-10 Thread David Graham

--- "Fenderbosch, Eric" <[EMAIL PROTECTED]> wrote:
> The whole use-a-named-property-for-everything is great so that marketing
> can change the text/copy without involving a HTML/JSP developer, as well
> as the future ability to I18N a site down the road.  However some things
> just get ugly.
> Example:
> Old line of HTML:
> The FedEx Custom Critical Shipping
> Toolkit enables you to:
> 
> New lines w/ tags:
>  
> ">
>   
> 
>  
> 
> (I know I could use a  tag)
> 
> Any ideas for making this simpler?  Should I just define one large
> resource like:
> 
> message.benefits=The FedEx Custom Critical  href="/us/shipping/default.shtml">Shipping Toolkit enables you
> to:
> 
> Then simply do:
> 

That's what I would do except use the JSTL version:


It's generally not a good idea to store markup in resource files but if it
simplifies the page and you don't need to use the message in non-html
pages it's fine.

David


> 
> ???
> 
> Thanks.
> 
> Eric
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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