maia_modificado/.svn/pristine/b2/b2aa8c27982f7c4ecfd2cd2037e...

105 lines
6.4 KiB
Plaintext
Executable File

<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions"
xmlns:maia="http://java.sun.com/jsf/composite/maiaComponents"
template="/WEB-INF/templates/template.xhtml">
<ui:define name="content">
<h:form id="formTable">
<maia:pageEvents controller="#{catalogDetailController}"
queryProcess=":formTable:filters"
queryUpdate=":formTable:catalogdetail"
saveProcess=""
saveUpdate=""
focusContainer=":formTable:filters" />
<p:panelGrid id="filters" columns="9" styleClass="m-filters">
<f:facet name="header">
<h:outputText value="#{msg_general.lbl_filters}" />
</f:facet>
<p:outputLabel for="fpkmod" value="#{msg_general.lbl_code}:" />
<p:inputText id="fpkmod" value="#{catalogDetailController.mfilters['pk.catalogcode']}" style="width: 140px;" disabled="true" />
<p:outputLabel for="fname" value="#{msg_general.lbl_description}:" />
<p:inputText id="fname" value="#{catalogDetailController.mfilelds['catalogname']}" style="width: 360px;" disabled="true" />
<p:commandButton id="lovCatalog" icon="ui-icon-link" actionListener="#{catalogDetailController.openCatalogLov()}" process="@this" styleClass="m-lov-button">
<p:ajax event="dialogReturn" listener="#{catalogDetailController.onReturnCatalogLov}" update="filters,data-content" />
</p:commandButton>
</p:panelGrid>
<h:panelGrid columns="7" id="controls" styleClass="m-controls">
<maia:pageControls controller="#{catalogDetailController}"
queryProcess=":formTable:filters"
queryUpdate=":formTable:filters :formTable:catalogdetail"
createUpdate=":formProcess:pEdit"
dialogWidgetVar="dialog" />
</h:panelGrid>
<p:panelGrid id="data-content" columns="1" styleClass="m-data-content">
<f:facet name="header">
<h:outputText value="#{msg_general.htbl_catalogdetail}" />
</f:facet>
<p:dataTable id="catalogdetail" var="row" value="#{catalogDetailController.lrecord}" rows="200" style="min-width: 500px; width: auto;" rowKey="#{row.rowkey()}" selectionMode="single">
<p:column headerText="#{msg_general.lbl_code}" resizable="true" sortBy="#{row.pk.catalog}">
<h:outputText value="#{row.pk.catalog}" />
</p:column>
<p:column headerText="#{msg_general.lbl_description}" resizable="true" sortBy="#{row.description}" >
<h:outputText value="#{row.description}" />
</p:column>
<p:column styleClass="m-action-column">
<p:commandButton value="#{msg_general.btn_edit}" update=":formProcess:pEdit" oncomplete="PF('dialog').show()" styleClass="m-action-button" icon="ui-icon-pencil" process="@this, :formTable:data-content">
<f:setPropertyActionListener target="#{catalogDetailController.record}" value="#{row}" />
<f:setPropertyActionListener target="#{catalogDetailController.showRow}" value="#{false}" />
<f:setPropertyActionListener target="#{catalogDetailController.newRow}" value="#{false}" />
</p:commandButton>
</p:column>
<p:column styleClass="m-action-column">
<p:commandButton value="#{msg_general.btn_delete}" update=":formTable:data-content" styleClass="m-action-button" icon="ui-icon-trash" action="#{catalogDetailController.remove()}" process="@this, :formTable:data-content">
<f:setPropertyActionListener target="#{catalogDetailController.record}" value="#{row}" />
</p:commandButton>
</p:column>
</p:dataTable>
</p:panelGrid>
</h:form>
<p:dialog widgetVar="dialog" resizable="false" closeOnEscape="true" modal="true" appendTo="@(body)" showEffect="explode" hideEffect="explode"
styleClass="m-dialog">
<f:facet name="header">
<h:outputText value="#{msg_general.lbl_createoredit}" />
</f:facet>
<h:form id="formProcess">
<p:messages id="messages" autoUpdate="true" globalOnly="true"/>
<h:panelGrid id="pEdit" columns="3">
<p:outputLabel for="pkcatalog" value="#{msg_general.lbl_code}:" />
<p:inputText id="pkcatalog" value="#{catalogDetailController.record.pk.catalog}" required="true" maxlength="20" style="width:160px;"
onkeyup="Maia.forceupper(event, this);" />
<p:message for="pkcatalog" />
<p:outputLabel for="desc" value="#{msg_general.lbl_description}:" />
<p:inputText id="desc" value="#{catalogDetailController.record.description}" required="true" maxlength="60" style="width:360px;"
onkeyup="Maia.forceupper(event, this);" />
<p:message for="desc" />
<p:outputLabel for="aux" value="#{msg_general.lbl_auxiliar}:" />
<p:inputText id="aux" value="#{catalogDetailController.record.legalcode}" maxlength="60" style="width:360px;"
onkeyup="Maia.forceupper(event, this);" />
</h:panelGrid>
<h:panelGrid columns="2" styleClass="m-dialog-controls">
<maia:dialogControls controller="#{catalogDetailController}"
process=":formProcess:pEdit"
update=":formProcess:pEdit, :formTable:catalogdetail "
dialogWidgetVar="dialog" />
</h:panelGrid>
</h:form>
</p:dialog>
</ui:define>
</ui:composition>