RE: I18N Issues and Best Practices

2002-12-12 Thread Karr, David
The most important documentation is the JSTL specification.  Struts-EL
is very simple.  It just uses the JSTL EL engine for evaluating
attribute values.  You can get information about the JSTL specification
at .

> -Original Message-
> From: Paul Hodgetts, Agile Logic [mailto:[EMAIL PROTECTED]]
> 
> Thank you Eddie and David!  struts-el looks like just the
> type of thing I was looking for.  I wasn't aware there was
> something available that had the expression evaluation.
> Now if I can only find some documentation on it...  ;-)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: I18N Issues and Best Practices

2002-12-12 Thread Paul Hodgetts, Agile Logic
Thank you Eddie and David!  struts-el looks like just the
type of thing I was looking for.  I wasn't aware there was
something available that had the expression evaluation.
Now if I can only find some documentation on it...  ;-)

Thanks again,
Paul


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: I18N Issues and Best Practices

2002-12-12 Thread Eddie Bush
Karr, David wrote:


Note that rtexprvalues have to be the ENTIRE attribute value,


Man ... I always forget that until I fudge up and have to go back ...


not just a
portion, so your examples like "header-<%=countryCode%>" can't work like
that.  If you still wanted to use rtexprvalues, you'd have to use
something like '<% "header-" + countryCode %>'.


... he means <%= "header=" + countryCode %> :-)


A cleaner solution is probably to use the JSTL and Struts-EL.
Referencing bean values in the EL is much easier than referencing
rtexprvalues.  For some simple examples in your case:

  

  

  

Struts-EL is normally in the Struts nightly build, but the last few days
we've had an unknown problem that is preventing it from going into the
distribution.


I had to change some things in the struts-el build file to get it to 
build, but, even after I got that going, it still didn't place a copy of 
struts-el.jar into ${struts.home}/target/library.  Was that the intent?

--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



RE: I18N Issues and Best Practices

2002-12-12 Thread Karr, David
Note that rtexprvalues have to be the ENTIRE attribute value, not just a
portion, so your examples like "header-<%=countryCode%>" can't work like
that.  If you still wanted to use rtexprvalues, you'd have to use
something like '<% "header-" + countryCode %>'.

A cleaner solution is probably to use the JSTL and Struts-EL.
Referencing bean values in the EL is much easier than referencing
rtexprvalues.  For some simple examples in your case:

   

   

   

Struts-EL is normally in the Struts nightly build, but the last few days
we've had an unknown problem that is preventing it from going into the
distribution.

> -Original Message-
> From: Paul Hodgetts, Agile Logic [mailto:[EMAIL PROTECTED]]
> 
> I've been working on a site that is intended to be fully
> I18N.  It's the first site I've tried where I'm really
> going for a full and clean separation of the layout from
> the content, so please forgive any rookie questions.
> 
> I've looked into getting strings into resource files and
> also the ways that struts and tiles can choose layouts
> based on the country/language as well.  I think I can
> figure these out with a little reading and experimenting.
> 
> One issue that's got me stumped is how to deal with some
> of the finer-grained things on the page.  For example,
> when the path and/or name of a graphic file needs to be
> dynamically constructed, or the page name for a link, or
> the value for a select option.
> 
> I find in these areas that the only solution I can get
> to work is to embed a piece of scriptlet into the struts
> or html tag.  It doesn't seem to be able to parse an
> embedded tag that is stuck in the middle of attribute
> definition of another tag.
> 
> Here's a couple of examples:
> 
> * A div where the class name is built with some dynamic
> data:
>
> 
> * A struts html:form tag where the action URL is built
> using dynamic data:
>
> 
> * A select option where the value comes from a bean:
>">
>
> 
> * An image where the source needs a path dynamically
>generated:
>  mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: I18N Issues and Best Practices

2002-12-12 Thread Eddie Bush
You're using run-time expressions.  They aren't quite as evil as 
scriplets, but I don't blame you for wanting to stay away from them. 
Have you learned of the JSTL yet?  That's certainly one way to go. 
Also, you may want to look into the struts-el contributed taglib.  The 
struts-el taglib gives you struts-specific tags (for places you need 
them) which have the power of the JSTL Expression Language (typically 
called "the EL", which is where struts-el gets it's name).

http://jakarta.apache.org/taglibs -- look for the JSTL or the "standard" 
taglib.

--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



I18N Issues and Best Practices

2002-12-12 Thread Paul Hodgetts, Agile Logic
I've been working on a site that is intended to be fully
I18N.  It's the first site I've tried where I'm really
going for a full and clean separation of the layout from
the content, so please forgive any rookie questions.

I've looked into getting strings into resource files and
also the ways that struts and tiles can choose layouts
based on the country/language as well.  I think I can
figure these out with a little reading and experimenting.

One issue that's got me stumped is how to deal with some
of the finer-grained things on the page.  For example,
when the path and/or name of a graphic file needs to be
dynamically constructed, or the page name for a link, or
the value for a select option.

I find in these areas that the only solution I can get
to work is to embed a piece of scriptlet into the struts
or html tag.  It doesn't seem to be able to parse an
embedded tag that is stuck in the middle of attribute
definition of another tag.

Here's a couple of examples:

* A div where the class name is built with some dynamic
data:
  

* A struts html:form tag where the action URL is built
using dynamic data:
  

* A select option where the value comes from a bean:
  ">
  

* An image where the source needs a path dynamically
  generated:
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: