Ok here's the scenario ....
My (opensource) application is going to be available in the users language.
All my struts localisation stuff is working fine, all the labels and stuff are stored in property files etc.
I am using hibernate for persistance.
JSTL does not allow you to call functions on objects.
It only allows you to access the properties of beans. ie you cannot do ${object.getDesctription("fr")}
One of my hibernate POJO's house has got a hash of descriptions inside it.
The descriptions are going to be referenced by java.util.Locale objects
The reason is so that the description of the house itself is going to be localised.
------------------------------------------------------------------------------
So what I want to do is either create or use a tag which will allow me to do the
following.
<c:set var="forsale" value="${FOR_SALE_PROPERTY}"/>
<blah:localizeddesc value="${forsale.shortDescriptions}/>
or
<blah:localizeddesc value="${forsale.shortDescriptions} default="${DEFAULT_LOCALE}"/>
The tag will then access the struts session and see what Locale the person is
using.
If there is a description that matches that locale it will be outputted , if not the description matching the default locale will be used.
Perhaps I am looking in completely the wrong direction.
If I am being stupid here please feel free to alert me
I've been trying to decide the best approach for about 2 weeks.
I don't really think this belongs in the DAO or hibernate layers as it is kinda a presentation issue.
Is anyone else working with something similar ? Or do I have to build up a tag lib from scratch ?
Thanks
Bryan
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]