> Hi,
>
> Please give me some feedback on this idea:
>
> AFAIK the DateSelector defaults to containing the current
> date when you
> create it without a date. I want to leave a null choice, in the
> dateselector. This would cause an extra option with empty
> string text to be
> added at the beginning of each <select> element, and if the
> blank option is
> selected for each element (date, month and year) then the
> date will be null.
>
>
> Does anyone else think this would be a useful feature?
>
> If so, should it be an extra boolean parameter in the DateSelector
> constructor, or a setNullable method, or both?
I think both would be correct. Create an addional constructor with the
extra param and the method to control the behavior.
Use the constructor with the most parameters, and add your new one in a new
construtor.
public DateSelector( String selName, Calendar useDate, boolean nullChoice )
{
...
this.nullChoice = nullChoice;
}
Now, there are static methods to get the selectors. These static methods
cannot check the non-static members. So you could only use the datamember
in methods that are not static ( like ecsOutput ). This is what is done
with showDays.
So I suppose you would have to create additional static versions of the
methods that take the nullChoice boolean to determine how to build the
select object. Or see if there is a way to 'shove' the null choice into the
select list after you get it. Then you could do it all in ecsOutput().
> If some of the fields are left blank, but others are filled in, the
> ParameterParser.getDate can either throw an exception, or use
> the Calendar
> default: Year = 1970, Month=January, Date = 1...which one of these is
> better?
I'd say through an exception. Currently setLeinent is false, so if the date
is not correct an exception is thrown.
> It looks like this would require changes to the DateSelector
> class and the
> ParameterParser class, is there anything I'm missing?
Sounds about right.
------------------------------------------------------------------------
This message has been scanned for viruses with Trend Micro's Interscan VirusWall.
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]