Hi,
I am posting 2 prototypes inline, since they seem easy convenience tags.

===============================
==========<hx:inputColor>=========
===============================
REFS:
[0]
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#the-input-element
[1]
http://www.whatwg.org/specs/web-apps/current-work/multipage/number-state.html#color-state
[2]
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary

EXTENDS:
<h:inputText>
 ATTRIBUTES not present in ancestor:
suggestions: same suggestion mechanism with <hx:inputText>
autocomplete: to override owner form's autocomplete attribute for its
children. can be 'on' 'off' 'default'(default)

NOTES:
Cannot extend hx:inputText, since this doesn't have
size,pattern,placeholder, etc. attributes! Will create an abstract middle
component.
No browser support for this yet!
For suggestions and more, see hx:inputText usage.

<!-- - - - - - - - - -usage- - - - - - - - - -  - - - - - - - - - - --  -->
<hx:inputColor value="#{someBean.someField}" />
<!-- expected HTML5 code -->
<input type="color" value="" />


<!-- - - - - - - - - -usage- - - - - - - - - -  - - - - - - - - - - --  -->
<hx:inputRange value="#{someBean.someField}"  suggestions="#000000,
#FFFFFF"/>
<!-- expected HTML5 code -->
<input list="idOfDataList" type="color" />
<datalist id="idOfDataList">
<option value="#000000" label="#000000" />
<option value="#FFFFFF" label="#FFFFFF" />
</datalist>


===============================
==========<hx:inputEmail>======
===============================
REFS:
[0]
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#the-input-element
[1]
http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#e-mail-state
[2]
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
 EXTENDS:
hx:inputText

ATTRIBUTES not present in ancestor:
multiple: email input type supports 'multiple' attribute. can be used with
datalist(suggestions). default to 'false'.
see:
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#attr-input-multiple
 NOTES:
About 'pattern': browsers should make the email validation. this attribute
can be used for extra validation.
For suggestions and more, see hx:inputText usage.

<!-- - - - - - - - - -usage- - - - - - - - - -  - - - - - - - - - - --  -->
<hx:inputEmail value="#{someBean.email}" suggestions="em...@example.org,
anotherem...@example.org"/>
<!-- expected HTML5 code-->
<input type="email" value="" list="idOfDataList"/>
<datalist id="idOfDataList">
<option value="em...@example.org" label="em...@example.org" />
<option value="anotherem...@example.org" label="anotherem...@example.org" />
</datalist>


<!-- - - - - - - - - -usage- - - - - - - - - -  - - - - - - - - - - --  -->
<hx:inputEmail value="#{someBean.email}"
suggestions="#{someBean.emailSuggestions}" multiple="true"/>
<!-- expected HTML5 code-->
<input type="email" value="" list="idOfDataList"/>
<datalist id="idOfDataList">
<option value="em...@example.org" label="Email 1" />
<option value="anotherem...@example.org" label="Email 2" />
<option value="theotherem...@example.org" label="Email 3" />
</datalist>


Thanks for feedback,
Ali

-- 
My Blog: http://blog.aliok.com.tr
Twitter: http://twitter.com/aliok_tr

Reply via email to