On 4/26/07, tibi <[EMAIL PROTECTED]> wrote:
why does the BaseObject not have a getText method?

Because it's part of the model/dao layer.  You might want to use
something like the following to 1i8n-ize your data tier.

http://www.theserverside.com/tt/blogs/showblog.tss?id=HibernateInternational

Matt


tibi

tibi wrote:
> mmm its business knowledge i like it to be in the model.
> and i like to simplify my jsp as much as possible.
> i could push my action into my model and use the getText method.
>
> a bit wierd but seems logical.
>
> there are more examples where a getText comes in handy. like if you
> want the date.format
>
> tibi
>
> Matt Raible wrote:
>> I would do some checking in your view - i.e. <c:if test="${empty
>> locations}"><fmt:message key="traveling.key"/></c:if>, otherwise show
>> city.
>>
>> Matt
>>
>> On 4/26/07, tibi <[EMAIL PROTECTED]> wrote:
>>> pseudo code:
>>>
>>> class Event
>>>
>>> list locations
>>>
>>> String getSimpleLocation(){
>>> if(locations.size()==1){
>>> return location.get(0).getCity();
>>> }
>>> return 'traveling';
>>> }
>>>
>>> someting like this?
>>>
>>> tibi
>>>
>>>
>>> Matt Raible wrote:
>>> > I don't understand what you're trying to do - can you post code?
>>> >
>>> > On 4/26/07, tibi <[EMAIL PROTECTED]> wrote:
>>> >> i have an event with a  getSimpleLocation in it.
>>> >> my object can have multiple location
>>> >> if there is 1 location return the location
>>> >> if there are multple return 'traveling'
>>> >>
>>> >> tibi
>>> >>
>>> >> Matt Raible wrote:
>>> >> > How do you want to use i18n in your models?
>>> >> >
>>> >> > On 4/26/07, tibi <[EMAIL PROTECTED]> wrote:
>>> >> >> ok it works in actions but how can i use it in my models?
>>> >> >> should i pass my action into the moddel to use her getText
>>> method?
>>> >> >>
>>> >> >> tibi
>>> >> >>
>>> >> >> tibi wrote:
>>> >> >> > ahhh it must be the super.getText("") method ;)
>>> >> >> >
>>> >> >> > tibi
>>> >> >> >
>>> >> >> > tibi wrote:
>>> >> >> >> hi,
>>> >> >> >>
>>> >> >> >> i can't find an example of how to use i18n from within my
>>> actions.
>>> >> >> >> in struts it used to something like this:
>>> >> >> >> errors.add(ActionErrors.GLOBAL_ERROR, new
>>> >> >> >> ActionError("key.order.no.item"));
>>> >> >> >>
>>> >> >> >> but in struts2 this will not work.
>>> >> >> >>
>>> >> >> >> anyone?
>>> >> >> >>
>>> >> >> >> thanks
>>> >> >> >>
>>> >> >> >> tibi
>>> >> >> >>
>>> >> >> >>
>>> >>
>>> ---------------------------------------------------------------------
>>> >> >> >> 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]
>>> >> >> >
>>> >> >> >
>>> >> >>
>>> >> >>
>>> ---------------------------------------------------------------------
>>> >> >> 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]
>>> >>
>>> >>
>>> >
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> 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]
>
>

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




--
http://raibledesigns.com

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

Reply via email to