Senthil Chidambaram wrote:
> Bill Shannon wrote:
>
>> Senthil Chidambaram wrote:
>>
>>> Bill,
>>> Calendar component allows us to pick the date based on the locale.
>>> This particular use case is when we create a timer event management
>>> rule, this takes a property called pattern where user can enter any
>>> kind of pattern he/she wants. In this case can we enforce the pattern
>>> to be locale specific, and don't even show the pattern textfield on
>>> the screen.
>>
>>
>> Why is it important that the user be able to enter a pattern?
>
> Pattern is an optional property, as per the dtd management-rule (event)
> takes property <!ELEMENT event (description?, property*)>
>
>>
>> Is the pattern defined by an existing java.* class, or do you define
>> and interpret the pattern yourself?
>
> I don't define it. This is one of the optional properties used when we
> create a management rule of event type timer. I'm attaching the GUI
> screenshot with this, just for you to take a look at how the current UI
> is with Date String, and Pattern specified. Calendar component will be
> used for Date String. Once you create the management-rule, this is how
> the property (name=value) is written in domain.xml
>
> <management-rule enabled="true" name="mgmtRule"> <event
> level="INFO" record-event="true" type="timer">
> <property name="datestring" value="12/12/07"/>
> <property name="pattern" value="mm/dd/yyyy"/>
> </event> </management-rule>
Perhaps I've forgotten how all this stuff works...
The timer rule is something we defined, and is new to GlassFish v2, right?
Why did we feel the need to define the timer rule to accept a date
pattern? Just because we didn't want to force people to enter the
datestring property using a specific pre-defined locale-specific
format?
Is the set of allowed patterns defined by the timer rule? Or is it a
SimpleDateFormat pattern?
Is the "datestring" property just a String-valued property on a bean?
How does the GUI know to use a calendar component for that String-valued
property? Does the GUI have specific knowledge of the timer rule? Is
the timer rule built-in or is it a pluggable component? Can I write my
own timer rule that works in a similar manner, including date entry
using the calendar component?