Skip to end of metadata
Go to start of metadata

The prototypes here were used for getting the feedback of other developers, during the first part (design part) of GSOC project. They are all obsolete now, and only kept as a reference example for future students .

<hx:inputDateTime>

Extends: h:inputText
Attributes not present in ancestor:

Name

Required?

Values

Description

type

optional

'datetime'(default), 'date', 'time', 'month', 'week', 'datetime-local'

Type of the date-time input. Type names are exactly the same with the html5 spec, in order to keep things more self-explained.

suggestions 

optional

Can be comma seperated strings, array and collection of "javax.faces.SelectItem"s

Static(not Ajax or smthg) suggestion values. this attribute should not be defined if "datalist" is set.

required

optional

EL and literal

Same with h:inputText 'required' except, 'required' attribute of HTML 'input' element is used this time

autocomplete

optional

'true' or 'false'. By default nothing will be rendered.

To override owner form's autocomplete attribute for its children.

autofocus

optional

'true' of 'false'(default)

As soon as the page is loaded, allows the user to just start typing without having to manually focus the main control.

datalist

optional

EL and literal

Id of <hx:datalist> for suggestions mechanism. By this way, suggestion options(datalist) can be shared across several input elements.

step

optional

String and number

Used for 'datetime', 'datetime-local' and 'time' types. Defines the accuracy of the selectable time (in seconds if no format is defined).
Formats can be applied with the rules at java.text.SimpleDateFormat. e.g. "1H":one hour, "10m":10 minutes, etc.
If it is not defined, 'any' will be rendered as the attr value; thus it is up to browser (opera uses 1 minute by default). Can be minimum:0.01

Notes: 
  • Cannot extend hx:inputText, since this doesn't have size, pattern, placeholder, etc. attributes! Will extend an abstract middle component.
  • Date range to select is driven by <fx:validateDateRange>
References:

<fx:validateDateRange>

Notes: 
  • This component will have the exact semantics with Trinidad's <tr:validateDateRange>. Since a dependency to Trinidad won't be good, I am planning this to be a copy of that component.
  • min/max attributes rendered by <hx:inputDateTime>'s renderer are driven by this validator. HTML5 allows us to set min/max dates that can be selected.
  • This validator will allow applications to validate the input on both server-side and client-side.
References:

Usage of prototypes:

usage: date
expected HTML5 code



usage datetime and step
expected HTML5 code



usage: type month with no restrictions
expected HTML5 code
Labels
  • No labels