Re: [S2] apply i18n on java entity from DB

2008-12-25 Thread Steven Yang
Dimitar thanks for the idea.And Roger thanks for your description that made me understand better what Dimitar is talking about, as I am not familiar about "database message resources". With your reference I am able to present solution to my boss better now. Thanks a lot guys learn something new t

Re: [S2] apply i18n on java entity from DB

2008-12-23 Thread Roger
> > If the "Product" described in the first message is pure fiction and > you have the ability to change the data model you can get rid of the > multiple names from the "Product" entity, put a "unique_name", use it > to point to resource in your bundle with some static prefix like > "product.name."

Re: [S2] apply i18n on java entity from DB

2008-12-23 Thread Dimitar Vlasev
Few more thoughts on this matter: I haven't explicitly said that the solution I've proposed is far from standard i18n functionality, it was my best choice for the given example. If the "Product" described in the first message is pure fiction and you have the ability to change the data model you c

Re: [S2] apply i18n on java entity from DB

2008-12-22 Thread Steven Yang
> > Thanks a lot No problem about the code I get your point clearly. I will definitely take this in to consideration. I guess I need to look back into my design patterns as well ha If anyone else have any thoughts or suggestion please fill free to hit me Thanks

Re: [S2] apply i18n on java entity from DB

2008-12-22 Thread Dimitar Vlasev
Hi Steven, I don't know what's the best practice but I'll give you my quick thoughts. It seems you have to implement some sort of logic (choosing the right name). The main question is where is the best place to put this kind of logic? IMO this kind of problems are solved using the "decorator patt