admin@glassfish.java.net

Re: calendar component

From: Senthil Chidambaram <cchidamb_at_sun.com>
Date: Mon, 16 Apr 2007 13:57:48 -0700

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>

>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>





Screenshot.png
(image/png attachment: Screenshot.png)