[jboss-user] [JBoss Seam] - Re: Seam gen edit pages, update without press save button
rbcdexia
do-not-reply at jboss.com
Thu Jun 28 06:14:39 EDT 2007
"rbcdexia" wrote : I have an object "Operacion" that has inside an object "Entidad".
| I want to edit my Operation object.I want to change Entidad field in Operacion, so for this reason I have to press the botton. When I press the button I show a list of Entidad objects to select one of them. Then when I return to my page seam executes the update of Operaction always.
| I have done some test using properties like bypassUpdates but seam continues doing the update.
|
|
|
This is my complete edit page:
| <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:a="https://ajax4jsf.dev.java.net/ajax"
| xmlns:rich="http://richfaces.ajax4jsf.org/rich"
| template="layout/template.xhtml">
|
| <ui:define name="body">
|
| <h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
|
| <h:form id="operacion" styleClass="edit">
|
| <rich:panel>
| <f:facet name="header">Edit Operacion</f:facet>
|
|
| <s:decorate id="ctapersonasidDecoration" template="layout/edit.xhtml">
| <ui:define name="label">Id Cuenta en personas</ui:define>
| <h:inputText id="ctapersonasid"
| required="true"
| disabled="#{operacionHome.managed}"
| value="#{operacionHome.instance.ctapersonasid}">
| <a:support bypassUpdates="true" event="onblur" reRender="ctapersonasidDecoration"/>
| </h:inputText>
| </s:decorate>
|
| <s:decorate template="layout/display.xhtml">
| <ui:define name="label">Fecha</ui:define>
| <h:inputText id="fechaDecoration2" value="#{operacionHome.instance.fecha}" required="true">
| <s:convertDateTime pattern="MM/dd/yyyy"/>
| </h:inputText>
| <s:selectDate for="fechaDecoration2" startYear="1910" endYear="2007"><img src="img/calendar.gif"/></s:selectDate>
| </s:decorate>
| <!--<s:decorate id="fechaDecoration" template="layout/edit.xhtml">
| <ui:define name="label">fecha</ui:define>
| <h:inputText id="fecha"
| size="16"
| required="true"
| value="#{operacionHome.instance.fecha}">
| <s:convertDateTime type="both" dateStyle="short"/>
|
| </h:inputText>
| </s:decorate>-->
|
| <s:decorate id="volumenDecoration" template="layout/edit.xhtml">
| <ui:define name="label">Volumen</ui:define>
| <h:inputText id="volumen"
| required="true"
| value="#{operacionHome.instance.volumen}"
| size="27">
| <a:support bypassUpdates="true" event="onblur" reRender="volumenDecoration"/>
| </h:inputText>
| </s:decorate>
|
| <s:decorate id="precioDecoration" template="layout/edit.xhtml">
| <ui:define name="label">Precio</ui:define>
| <h:inputText id="precio"
| required="true"
| value="#{operacionHome.instance.precio}"
| size="27">
| <a:support bypassUpdates="true" event="onblur" reRender="precioDecoration"/>
| </h:inputText>
| </s:decorate>
|
| <s:decorate id="tipoprecioDecoration" template="layout/edit.xhtml">
| <ui:define name="label">Tipo de precio</ui:define>
| <h:inputText id="tipoprecio"
| required="true"
| value="#{operacionHome.instance.tipoprecio}">
| <a:support bypassUpdates="true" event="onblur" reRender="tipoprecioDecoration"/>
| </h:inputText>
| </s:decorate>
|
| <s:decorate id="divisaidDecoration" template="layout/edit.xhtml">
| <ui:define name="label">Id Divisa</ui:define>
| <h:inputText id="divisaid"
| required="true"
| value="#{empty divisaDivisaid ? operacionHome.instance.divisaid : operacionHome.instance.divisaid}">
|
| <a:support bypassUpdates="true" event="onblur" reRender="divisaidDecoration"/>
| </h:inputText>
| </s:decorate>
|
| <s:decorate id="activoidDecoration" template="layout/edit.xhtml">
| <ui:define name="label">Id Activo</ui:define>
| <h:inputText id="activoid"
| required="true"
| value="#{empty activoActivoid ? operacionHome.instance.activoid : operacionHome.instance.activoid}">
|
| <a:support bypassUpdates="true" event="onblur" reRender="activoidDecoration"/>
| </h:inputText>
| </s:decorate>
| <s:decorate id="mercadoidDecoration" template="layout/edit.xhtml">
| <ui:define name="label">Id mercado</ui:define>
| <h:inputText id="mercadoid"
| required="true"
| value="#{empty mercadoMercadoid ? operacionHome.instance.mercadoid : operacionHome.instance.mercadoid}">
|
| <a:support bypassUpdates="true" event="onblur" reRender="activoidDecoration"/>
| </h:inputText>
| </s:decorate>
| <s:decorate id="botonDivisa" template="layout/edit.xhtml">
| <ui:define name="label">Seleccionar Divisa</ui:define>
| <s:button value="Select divisa"
| view="/DivisaAccion.xhtml">
| <f:param name="from" value="OperacionEdit"/>
| </s:button>
| </s:decorate>
|
| <s:decorate id="botonActivo" template="layout/edit.xhtml">
| <ui:define name="label">Seleccionar Activo</ui:define>
| <s:button value="Select activo"
| view="/ActivoAccion.xhtml">
| <f:param name="from" value="OperacionEdit"/>
| </s:button>
| </s:decorate>
|
| <s:decorate id="botonMercado" template="layout/edit.xhtml">
| <ui:define name="label">Seleccionar Mercado</ui:define>
| <s:button value="Select mercado"
| view="/MercadoAccion.xhtml">
| <f:param name="from" value="OperacionEdit"/>
| </s:button>
| </s:decorate>
|
| <s:decorate id="tipoDecoration" template="layout/edit.xhtml">
| <ui:define name="label">Tipo</ui:define>
| <h:inputText id="tipo"
| required="true"
| value="#{operacionHome.instance.tipo}">
| <a:support bypassUpdates="true" event="onblur" reRender="tipoDecoration"/>
| </h:inputText>
| </s:decorate>
|
| <s:decorate id="sistemaDecoration" template="layout/edit.xhtml">
| <ui:define name="label">Sistema</ui:define>
| <h:inputText id="sistema"
| required="true"
| value="#{operacionHome.instance.sistema}">
| <a:support bypassUpdates="true" event="onblur" reRender="sistemaDecoration"/>
| </h:inputText>
| </s:decorate>
|
| <s:decorate id="referenciaDecoration" template="layout/edit.xhtml">
| <ui:define name="label">Referencia</ui:define>
| <h:inputText id="referencia"
| required="true"
| size="13"
| maxlength="13"
| value="#{operacionHome.instance.referencia}">
| <a:support bypassUpdates="true" event="onblur" reRender="referenciaDecoration"/>
| </h:inputText>
| </s:decorate>
|
| <div style="clear:both">
| <span class="required">*</span>
| required fields
| </div>
|
| </rich:panel>
|
| <div class="actionButtons">
|
| <h:commandButton id="save"
| value="Save"
| action="#{operacionHome.persist}"
| disabled="#{!operacionHome.wired}"
| rendered="#{!operacionHome.managed}"/>
|
| <h:commandButton id="update"
| value="Save"
| action="#{operacionHome.update}"
| rendered="#{operacionHome.managed}"/>
|
| <h:commandButton id="delete"
| value="Delete"
| action="#{operacionHome.remove}"
| rendered="#{operacionHome.managed}"/>
|
| <s:button id="done"
| value="Done"
| propagation="end"
| view="/Operacion.xhtml"
| rendered="#{operacionHome.managed}"/>
|
| <s:button id="cancel"
| value="Cancel"
| propagation="end"
| view="/#{empty operacionFrom ? 'OperacionList' : operacionFrom}.xhtml"
| rendered="#{!operacionHome.managed}"/>
|
| </div>
| </h:form>
|
| <rich:tabPanel switchType="ajax">
|
| <rich:tab label="entidad *" labelClass="required">
| <div class="association" id="entidadParent">
|
| <h:outputText value="No entidad"
| rendered="#{operacionHome.instance.entidad == null}"/>
|
| <rich:dataTable var="entidad"
| value="#{operacionHome.instance.entidad}"
| rendered="#{operacionHome.instance.entidad != null}"
| rowClasses="rvgRowOne,rvgRowTwo"
| id="entidadTable"
| bypassUpdates="true">
| <h:column>
| <f:facet name="header">empresa</f:facet>
| #{entidad.empresa.nombre}
| </h:column>
| <h:column>
| <f:facet name="header">nombre</f:facet>
| #{entidad.nombre}
| </h:column>
| <h:column>
| <f:facet name="header">numerocnmv</f:facet>
| #{entidad.numerocnmv}
| </h:column>
| <h:column>
| <f:facet name="header">isin</f:facet>
| #{entidad.isin}
| </h:column>
| </rich:dataTable>
|
| <div class="actionButtons">
| <s:button value="Select entidad" bypassUpdates="true"
| view="/EntidadList.xhtml">
| <f:param name="from" value="OperacionEdit"/>
| </s:button>
| </div>
|
| </div>
| </rich:tab>
| </rich:tabPanel>
| </ui:define>
|
| </ui:composition>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058655#4058655
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058655
More information about the jboss-user
mailing list