ofbiz-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Heath <doo...@brainfood.com>
Subject Re: svn commit: r966203 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
Date Wed, 21 Jul 2010 22:52:01 GMT
Scott Gray wrote:
> If it is just a drop down then it should probably just not have an initial value.

If all time fields that have no value suddenly start defaulting to
00:00, then how can one have a field where the time value is not required?

00:00 is not the same thing as null.  This change should be backed out.

> 
> Regards
> Scott
> 
> On 22/07/2010, at 10:09 AM, Jacques Le Roux wrote:
> 
>> Yes sure, just that it needs a little effort and is not how things are commonly handled
in OFBiz.
>> I'd think now is a better default because who care about 00:00? But yes it's subjective
and I agree not a big deal...
>>
>> This question also because I'm not quite sure what is the origin for the time 00:00
or now? (and how long is now, a bit of philo/humour never hurt ;o)
>>
>> Jacques
>>
>> Scott Gray wrote:
>>> As long as it doesn't break the default-value attribute I don't care, you can
easily get the old behavior by using <date-time
>>> default-value="${nowTimestamp}"/>
>>>
>>> Regards
>>> Scott
>>>
>>> HotWax Media
>>> http://www.hotwaxmedia.com
>>>
>>> On 22/07/2010, at 1:04 AM, Jacques Le Roux wrote:
>>>
>>>> Everybody agree about that?
>>>>
>>>> Jacques
>>>>
>>>>> Author: erwan
>>>>> Date: Wed Jul 21 12:14:08 2010
>>>>> New Revision: 966203
>>>>>
>>>>> URL: http://svn.apache.org/viewvc?rev=966203&view=rev
>>>>> Log:
>>>>> if a time-dropdown has no value then 00:00 is displayed instead of the
current time
>>>>>
>>>>> Modified:
>>>>>  ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
>>>>>
>>>>> Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
>>>>> URL:
>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=966203&r1=966202&r2=966203&view=diff
>>>>> ==============================================================================
---
>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
(original) +++
>>>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
Wed Jul 21 12:14:08 2010 @@ -571,7 +571,7 @@
>>>>> public class MacroFormRenderer implement
>>>>>
>>>>>       // if we have an input method of time-dropdown, then render two
>>>>>       // dropdowns
>>>>> -        if ("time-dropdown".equals(dateTimeField.getInputMethod()))
{
>>>>> +        if ("time-dropdown".equals(dateTimeField.getInputMethod()) &&
UtilValidate.isNotEmpty(value)) {
>>>>>           className = modelFormField.getWidgetStyle();
>>>>>           classString = (className != null ? className : "");
>>>>>           isTwelveHour = "12".equals(dateTimeField.getClock()); 
>>
> 


Mime
View raw message