Form-Widget call multiple services?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
30 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Form-Widget date format

Jacek Wagner
All,

All the dates in ofbiz are stored and presented as SQL type DATE.
They always look something like 2008-11-08
In my project I have to present them in the calendar format such as
11/08/2008.
Is there any way in form-widget to change the field date format?

Jacek
Reply | Threaded
Open this post in threaded view
|

Re: Form-Widget date format

Todor Spasov
Hi Jacek,
You can use in form-widget something like this:
        <field name="someDate">
            <display description="${bsh:
                import java.text.SimpleDateFormat;
                import java.util.Date;
                SimpleDateFormat formater = new SimpleDateFormat(&quot;EEE dd/MM&quot;, locale);
                Date currentDate = new Date(someDate.getTime());
                return formater.format(currentDate);
            }"/>
        </field>

The only thing that you must change is the date format in the SimpleDateTime constructor.

Hope that helps,
Todor

On Fri, 2009-02-06 at 08:38 -0800, Jacek Wagner wrote:
> All,
>
> All the dates in ofbiz are stored and presented as SQL type DATE.
> They always look something like 2008-11-08
> In my project I have to present them in the calendar format such as
> 11/08/2008.
> Is there any way in form-widget to change the field date format?
>
> Jacek

Reply | Threaded
Open this post in threaded view
|

Re: Form-Widget date format

Adrian Crum
In reply to this post by Jacek Wagner
There was some discussion about date/time formats a few years ago on the
dev mailing list. Some changes were made to the framework to support a
configurable format, but the work was never finished.

-Adrian

Jacek Wagner wrote:

> All,
>
> All the dates in ofbiz are stored and presented as SQL type DATE.
> They always look something like 2008-11-08
> In my project I have to present them in the calendar format such as
> 11/08/2008.
> Is there any way in form-widget to change the field date format?
>
> Jacek
>
Reply | Threaded
Open this post in threaded view
|

Re: Form-Widget date format

Jacek Wagner
In reply to this post by Todor Spasov
Todor Spasov wrote:

> Hi Jacek,
> You can use in form-widget something like this:
>         <field name="someDate">
>             <display description="${bsh:
>                 import java.text.SimpleDateFormat;
>                 import java.util.Date;
>                 SimpleDateFormat formater = new SimpleDateFormat(&quot;EEE dd/MM&quot;, locale);
>                 Date currentDate = new Date(someDate.getTime());
>                 return formater.format(currentDate);
>             }"/>
>         </field>
>
> The only thing that you must change is the date format in the SimpleDateTime constructor.
>
> Hope that helps,
> Todor
>
> On Fri, 2009-02-06 at 08:38 -0800, Jacek Wagner wrote:
>  
>> All,
>>
>> All the dates in ofbiz are stored and presented as SQL type DATE.
>> They always look something like 2008-11-08
>> In my project I have to present them in the calendar format such as
>> 11/08/2008.
>> Is there any way in form-widget to change the field date format?
>>
>> Jacek
>>    
>
>  
Todor, You made my day!!! Jacek
Reply | Threaded
Open this post in threaded view
|

Re: Form-Widget date format

Jacques Le Roux
Administrator
In reply to this post by Adrian Crum
Todor's answer was great, but I think we should really care about that (imagine all date fields...)

Thanks

Jacques

From: "Adrian Crum" <[hidden email]>

> There was some discussion about date/time formats a few years ago on the
> dev mailing list. Some changes were made to the framework to support a
> configurable format, but the work was never finished.
>
> -Adrian
>
> Jacek Wagner wrote:
>> All,
>>
>> All the dates in ofbiz are stored and presented as SQL type DATE.
>> They always look something like 2008-11-08
>> In my project I have to present them in the calendar format such as
>> 11/08/2008.
>> Is there any way in form-widget to change the field date format?
>>
>> Jacek
>>
>

Reply | Threaded
Open this post in threaded view
|

ofbiz deployment

Jacek Wagner
All,

Can ofbiz be deployed on Linux?

Jacek
Reply | Threaded
Open this post in threaded view
|

Re: ofbiz deployment

Jacques Le Roux
Administrator
Are you serious :D ?

Jacques
PS : of course it can!


From: "Jacek Wagner" <[hidden email]>
> All,
>
> Can ofbiz be deployed on Linux?
>
> Jacek
>

Reply | Threaded
Open this post in threaded view
|

Re: ofbiz deployment

Sven Wesley
Or as we use to say were I come from: Do the bears shit in the woods? ;)
Yes of course, Linux is no problem.



2009/2/10 Jacques Le Roux <[hidden email]>

> Are you serious :D ?
>
> Jacques
> PS : of course it can!
>
>
> From: "Jacek Wagner" <[hidden email]>
>
>  All,
>>
>> Can ofbiz be deployed on Linux?
>>
>> Jacek
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: ofbiz deployment

Jacek Wagner
In reply to this post by Jacques Le Roux
Jacques Le Roux wrote:

> Are you serious :D ?
>
> Jacques
> PS : of course it can!
>
>
> From: "Jacek Wagner" <[hidden email]>
>> All,
>>
>> Can ofbiz be deployed on Linux?
>>
>> Jacek
>>
>
I know it was a  dam question. Sorry.
Reply | Threaded
Open this post in threaded view
|

Re: ofbiz deployment

Sven Wesley
In my opinion a little bit too obvious, but you never now before you ask.
You know, there are no stupid questions. :)

2009/2/10 Jacek Wagner <[hidden email]>

> Jacques Le Roux wrote:
>
>> Are you serious :D ?
>>
>> Jacques
>> PS : of course it can!
>>
>>
>> From: "Jacek Wagner" <[hidden email]>
>>
>>> All,
>>>
>>> Can ofbiz be deployed on Linux?
>>>
>>> Jacek
>>>
>>>
>>  I know it was a  dam question. Sorry.
>
12