Locale

Change the locale of the datepicker, schedule and client side validation messages.

Language
English
English
English
French
German
German
German
Italian
Korean
Spanish
Catalan
Dutch
Portuguese
Portuguese
Arabic
Arabic
Bulgarian
Bangla
Bosnian
Czech
Greek
Persian
Finnish
Danish
Hindi
Indonesian
Croatian
Japanese
Hungarian
Hebrew
Georgian
Central Kurdish
Khmer
Kyrgyz
Kazakh
Lithuanian
Latvian
Malay
Norwegian
Polish
Romanian
Russian
Slovak
Slovenian
Serbian
Serbian
Swedish
Thai
Turkish
Ukrainian
Uzbek
Vietnamese
Chinese
Chinese

Input Style

Themes

PrimeOne
Saga Blue Saga Blue
Vela Blue Vela Blue
Arya Blue Arya Blue
Bootstrap
Bootstrap Blue Light Bootstrap Blue Light
Bootstrap Purple Light Bootstrap Purple Light
Bootstrap Blue Dark Bootstrap Blue Dark
Bootstrap Purple Dark Bootstrap Purple Dark
Material Design
Material Indigo Light Material Indigo Light
Material Deep Purple Light Material Deep Purple Light
Material Indigo Dark Material Indigo Dark
Material Deep Purple Dark Material Deep Purple Dark
Material Design Compact
Material Compact Indigo Light Material Compact Indigo Light
Material Compact Deep Purple Light Material Compact Deep Purple Light
Material Compact Indigo Dark Material Compact Indigo Dark
Material Compact Deep Purple Dark Material Compact Deep Purple Dark
Legacy
Nova Light Nova Light
Nova Dark Nova Dark
Nova Colored Nova Colored
Luna Amber Luna Amber
Luna Blue Luna Blue
Luna Green Luna Green
Luna Pink Luna Pink

FileUpload Simple

Simple uploader uses native browser file upload.

Unskinned

Per default, simple FileUpload just renders the native HTML markup.

Single

Single mode allows only one file to be selected at a time from the native file dialog.

Choose
Multiple

Multiple mode allows multiple files to be selected from the native file dialog, if supported by the browser.

Choose
Single & Validation

FileUpload integrates p:validateFile for validation. Even Client-Side-Validation is supported.

Choose
Auto & Single

Auto-Mode uploads the file immediately via AJAX.

Choose
Auto & Single & allowTyes validation

Use Case to demonstrate the integrity for multiple features.

Choose
Auto & Multiple

Use Case to demonstrate the integrity for multiple features.

Choose
Custom Drag&Drop

Per default, the FileUpload itself is the drop zone. In addition FileUpload supports a custom dropZone.

Choose

<style>
    body .card.ui-state-drag {
        background-color: #ffffd6;
    }
</style>


<p:growl id="growl" showDetail="true" keepAlive="true"/>

<div class="card">
    <h5>Unskinned</h5>

    <p>Per default, simple FileUpload just renders the native HTML markup.</p>

    <h:form id="unskinned" enctype="multipart/form-data">
        <p:fileUpload id="upload" value="#{fileUploadView.file}" mode="simple" />

        <p:commandButton id="submit" value="Submit" ajax="false" action="#{fileUploadView.upload}" styleClass="mt-3 ui-button-outlined block"/>
    </h:form>
</div>

<div class="card">
    <h5>Single</h5>

    <p>Single mode allows only one file to be selected at a time from the native file dialog.</p>

    <h:form id="single" enctype="multipart/form-data">
        <p:fileUpload id="upload" value="#{fileUploadView.file}" mode="simple" skinSimple="true"/>

        <p:commandButton id="submit" value="Submit" ajax="false" action="#{fileUploadView.upload}" styleClass="mt-3 ui-button-outlined block"/>
    </h:form>
</div>

<div class="card">
    <h5>Multiple</h5>

    <p>Multiple mode allows multiple files to be selected from the native file dialog, if supported by the browser.</p>

    <h:form id="multiple" enctype="multipart/form-data">
        <p:fileUpload id="upload" value="#{fileUploadView.files}" mode="simple" skinSimple="true" multiple="true"/>
        <p:commandButton id="submit" value="Submit" ajax="false" action="#{fileUploadView.uploadMultiple}" styleClass="mt-3 ui-button-outlined block"/>
    </h:form>
</div>

<div class="card">
    <h5>Single &amp; Validation</h5>

    <p>FileUpload integrates p:validateFile for validation. Even Client-Side-Validation is supported.</p>

    <h:form id="singleValidation" enctype="multipart/form-data">
        <p:fileUpload id="upload" value="#{fileUploadView.file}" mode="simple" skinSimple="true">
            <p:validateFile allowTypes="/(\.|\/)(pdf)$/" />
        </p:fileUpload>

        <p:commandButton id="submit" value="Submit" action="#{fileUploadView.upload}" styleClass="mt-3 ui-button-outlined block"
                         validateClient="false" process="@form" update=":growl"/>

        <p:commandButton id="submitCSV" value="Submit (+ validateClient)" action="#{fileUploadView.upload}" styleClass="mt-3 ui-button-outlined block"
                         validateClient="true" process="@form" update=":growl"/>
    </h:form>
</div>


<div class="card">
    <h5>Auto &amp; Single</h5>

    <p>Auto-Mode uploads the file immediately via AJAX.</p>

    <h:form id="autoSingle">
        <p:fileUpload id="upload" value="#{fileUploadView.file}"
                      mode="simple" skinSimple="true" auto="true"
                      process="@this" update=":growl"
                      listener="#{fileUploadView.handleFileUpload}" />
    </h:form>
</div>

<div class="card">
    <h5>Auto &amp; Single &amp; allowTyes validation</h5>

    <p>Use Case to demonstrate the integrity for multiple features.</p>

    <h:form id="autoSingleValidation">
        <p:fileUpload id="upload" value="#{fileUploadView.file}"
                      mode="simple" skinSimple="true" auto="true"
                      process="@this" update=":growl"
                      listener="#{fileUploadView.handleFileUpload}">
            <p:validateFile allowTypes="/(\.|\/)(pdf)$/" sizeLimit="100" />
        </p:fileUpload>
    </h:form>
</div>

<div class="card">
    <h5>Auto &amp; Multiple</h5>

    <p>Use Case to demonstrate the integrity for multiple features.</p>

    <h:form id="autoMultiple">
        <p:fileUpload id="upload" value="#{fileUploadView.files}"
                      mode="simple" skinSimple="true" multiple="true" auto="true"
                      process="@this" update=":growl"
                      listener="#{fileUploadView.handleFilesUpload}"/>
    </h:form>
</div>

<div class="card" jsf:id="dropzone">
    <h5>Custom Drag&amp;Drop</h5>

    <p>Per default, the FileUpload itself is the drop zone. In addition FileUpload supports a custom dropZone.</p>

    <h:form>
        <p:growl id="growl" showDetail="true"/>

        <p:fileUpload listener="#{fileUploadView.handleFileUpload}"
                      mode="simple"
                      dropZone="@form:@parent"
                      skinSimple="true"
                      auto="true"
                      update="@form">
            <p:validateFile allowTypes="/(\.|\/)(gif|jpeg|jpg|png)$/" sizeLimit="100000" />
        </p:fileUpload>
    </h:form>
</div>