Child pages
  • GSoC HTML5 inputFileUpload Prototype
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 .


Extends: t:inputFileUpload (I don't think a dependency to Tomahawk is good. So, need to rewrite that stuff or copy them, preferably with maven-dependency-plugin)







true or false(default).

File upload input type supports 'multiple' attribute. With HTML5, browsers can upload multiple files at once. Default to false.



true or false(default).

Same with <t:inputFileUpload> 'required' except, 'required' attribute of HTML 'input' element is also used this time.



EL and literal

This attribute will allow us to change the style of the component on a drag into the component. With no automatic mechanism, one can do this by listening dragenter events, and changing the style; and removing that style on dragleave respectively. Instead, we will this attribute, so the renderer can render Javascript and other stuff automatically for changing the style on drag.

  • I wanted to use HTML5 Drag and Drop here, but not sure what else to include in the component. Selection of the files on DnD to input is done by browser. Nothing to do at the component.
  • Async file upload: Not sure about this feature is possible with HTML5 standards. So, better implementing this later.

Usage of prototypes:

usage with multiple and styleClassOnDrag
<hx:inputFileUpload value="#{someBean.uploadedFiles}" multiple="true" styleClassOnDrag="someClass" />
expected HTML5 code
<input type="file" multiple="true" ondragenter="addClass(this,'someClass');" ondragleave="removeClass(this,'someClass')" />

usage multiple=false
<hx:inputFileUpload value="#{someBean.uploadedFile}" multiple="false"/>
expected HTML5 code
<input type="file" multiple="false"/>
  • No labels