publisherRevision.xhtml 4 KB
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:jsf="http://xmlns.jcp.org/jsf"
      >
<head>
<f:metadata>
    <f:viewParam name="publisherRevisionId" value="#{publisherRevisionView.publisherRevisionId}" />
    <f:viewAction action="#{publisherRevisionView.loadData}" />
</f:metadata>
</head>
<body>

<h:form>
    <h:commandLink action="home">
        <h:outputText value="Menu principal"/>
    </h:commandLink>

    <h:panelGrid columns="2">
        <h:outputText value='publisherName'/>
        <h:inputText value='#{publisherRevisionView.publisherName}' disabled="#{not publisherRevisionView.editMode}"/>
        <h:outputText value='publisherStreetAddress'/>
        <h:inputText value='#{publisherRevisionView.publisherStreetAddress}' disabled="#{not publisherRevisionView.editMode}"/>
        <h:outputText value='publisherPostalCode'/>
        <h:inputText value='#{publisherRevisionView.publisherPostalCode}' disabled="#{not publisherRevisionView.editMode}"/>
        <h:outputText value='publisherPostOfficeBoxNumber'/>
        <h:inputText value='#{publisherRevisionView.publisherPostOfficeBoxNumber}' disabled="#{not publisherRevisionView.editMode}"/>
        <h:outputText value='publisherAddressRegion'/>
        <h:inputText value='#{publisherRevisionView.publisherAddressRegion}' disabled="#{not publisherRevisionView.editMode}"/>
        <h:outputText value='publisherAddressLocality'/>
        <h:inputText value='#{publisherRevisionView.publisherAddressLocality}' disabled="#{not publisherRevisionView.editMode}"/>

        <h:outputText value='publisherAddressCountry'/>
        <ui:remove>
            <h:outputText value='#{publisherRevisionView.publisherAddressCountry.countryName}'/>
        </ui:remove>
    <h:selectOneMenu value="#{publisherRevisionView.publisherAddressCountry}" converter="omnifaces.SelectItemsConverter" disabled="#{not publisherRevisionView.editMode}">
        <f:selectItems value="#{publisherRevisionView.availableCountries}" var="country" itemLabel="#{country.countryName}"/>
    </h:selectOneMenu>

        <h:outputText value='publisherTelephone'/>
        <h:inputText value='#{publisherRevisionView.publisherTelephone}' disabled="#{not publisherRevisionView.editMode}"/>
        <h:outputText value='publisherEmail'/>
        <h:inputText value='#{publisherRevisionView.publisherEmail}' disabled="#{not publisherRevisionView.editMode}"/>
        <h:outputText value='publisherURL'/>
        <h:inputText value='#{publisherRevisionView.publisherURL}' disabled="#{not publisherRevisionView.editMode}"/>

        <h:outputText value='publisherActive'/>
        <ui:remove>
        <h:outputText value="#{publisherRevisionView.publisherActive}"/>
        </ui:remove>
            <h:selectBooleanCheckbox value="#{publisherRevisionView.publisherActive}" disabled="#{not publisherRevisionView.editMode}"/>

        <h:outputText value='publisherHistory'/>
        <h:inputText value='#{publisherRevisionView.publisherHistory}' disabled="#{not publisherRevisionView.editMode}"/>
        <h:outputText value="publisherRevisionAuthor"/>
        <h:outputText value="#{publisherRevisionView.publisherRevisionAuthor.displayName}"/>
        <h:outputText value="publisherRevisionDatetime"/>
        <h:outputText value="#{publisherRevisionView.publisherRevisionDatetime}"/>
        <h:commandButton value="Edit" action="#{publisherRevisionView.edit}" rendered="#{not publisherRevisionView.editMode}"/>
        <h:commandButton value="Cancel" action="#{publisherRevisionView.cancel}" rendered="#{publisherRevisionView.editMode}"/>
        <ui:remove>
            <h:outputText value='Add'/>
            <h:commandButton action="#{publisherRevisionView.update}" value="Add"/>
        </ui:remove>
    </h:panelGrid>
</h:form>
</body>
</html>