Skip to content
Snippets Groups Projects
AnalysisEditorPageDialogs.xhtml 3.18 KiB
Newer Older
<ui:composition 
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">     

Nils Christian Ehmke's avatar
Nils Christian Ehmke committed
    <p:dialog id="manageLibrariesDlg" header="#{localizedAnalysisEditorPageMessages.libraries}" resizable="false" modal="true" widgetVar="manageLibrariesDialog">
            <p:dataTable id="currentDependencies" value="#{currentAnalysisEditorBean.libraries}" rowIndexVar="rowIndex" var="dependency" paginator="true" rows="10" paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" >     
                <p:column headerText="#{localizedAnalysisEditorPageMessages.fileName}">  
                    <h:outputText value="#{dependency}"/>
                <p:column headerText="#{localizedAnalysisEditorPageMessages.fileSize}" style="text-align: center">  
                    <h:outputText value="N/A [MiByte]"/>
                <p:column headerText="#{localizedAnalysisEditorPageMessages.libOptions}" style="text-align: center; width:40px">  
                    <p:commandButton id="deleteButton" icon="ui-icon-delete" rendered="#{rowIndex != 0}" action="#{currentAnalysisEditorBean.deleteLibrary(dependency)}" update=":dependenciesForm :messages :toolpalette"/>    
                    <p:tooltip for="deleteButton" rendered="#{rowIndex != 0}"  value="Delete Library"/>
                </p:column> 
            </p:dataTable>  
        </h:form>

        <p:spacer width="0" height="5"/>
        <div>
            <!-- This is the form for the uploading. -->
            <h:outputText value="#{localizedAnalysisEditorPageMessages.msgOnlyJar}" />
            <br />
            <br />
            <h:form enctype="multipart/form-data">
                <p:fileUpload label="#{localizedMessages.choose}" cancelLabel="#{localizedMessages.cancel}" auto="true" allowTypes="/(\.|\/)(jar)$/"  sizeLimit="104857600" mode="advanced" fileUploadListener="#{currentAnalysisEditorBean.handleLibraryFileUpload}" update=":dependenciesForm :messages :toolpalette"/>
            </h:form>
        </div>
        <hr/>
        <div style="text-align: right">
            <h:form>
                <p:commandButton value="#{localizedMessages.ok}" ajax="true" onclick="manageLibrariesDialog.hide()" />

    <p:dialog header="#{localizedMessages.saveProject}" resizable="false" modal="true" widgetVar="forceSaveDlg">
        <h:form>
            <div style="text-align: center">
                <h:outputText value="#{localizedAnalysisEditorPageMessages.msgProjectModified}" /> 
            </div>
            <hr/>
            <div style="text-align: right">
                <p:commandButton value="#{localizedMessages.yes}" onclick="preSaveProject(true)" ajax="true" oncomplete="forceSaveDlg.hide()" update=":messages" />
                <p:spacer width="10px" height="10" />
                <p:commandButton value="#{localizedMessages.cancel}" onclick="forceSaveDlg.hide()" />
            </div>
        </h:form>
    </p:dialog>