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]