[jboss-user] [JBoss Seam] - Aditional update without press update button
rbcdexia
do-not-reply at jboss.com
Thu Oct 25 11:25:34 EDT 2007
I have a relation 1...n between Boleta pojo and Contrapartida pojo. When I want to update the Boleta fields and I have to select a Contrapartida pojo, Seam makes a default update without I have press update button.
I use bypassUpdates="true" with the simple Boleta fields and it works fine(not additional updates). The problem comes when I want to update the Boleta pojo setting a new Contrapartida When I return from Auditoria Select page to Boleta Edit page it makes an additional update without I have pressed any button.
How can I change this? How can I controll the transaction? Why does seam realice this additional update?
This is my BoletaEdit.page.xml.
| <page no-conversation-view-id="/BoletaList.xhtml"
| login-required="true">
|
| <begin-conversation join="true"/>
|
| <action execute="#{boletaHome.wire}"/>
|
| <param name="boletaFrom"/>
| <param name="boletaBoletaid" value="#{boletaHome.boletaBoletaid}"/>
| <param name="contrapartidaFrom"/>
| <param name="contrapartidaContrapartidaid" value="#{contrapartidaHome.contrapartidaContrapartidaid}"/>
|
| <navigation from-action="#{boletaHome.persist}">
| <end-conversation/>
| <redirect view-id="/Boleta.xhtml"/>
| </navigation>
|
| <navigation from-action="#{boletaHome.update}">
| <end-conversation/>
| <redirect view-id="/Boleta.xhtml"/>
| </navigation>
|
|
| <navigation from-action="#{boletaHome.remove}">
| <end-conversation/>
| <redirect view-id="/BoletaList.xhtml"/>
| </navigation>
|
| </page>
|
This is my BoletaEdit.xhtml
| <ui:define name="body">
|
| <h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
|
| <h:form id="boleta" styleClass="edit">
|
| <rich:panel>
| <f:facet name="header">#{messages['Edit']} #{messages['Boleta']}</f:facet>
| <s:decorate id="loginDecoration" template="layout/edit.xhtml">
| <ui:define name="label">#{messages['Usuario']}</ui:define>
| <h:inputText id="login"
| required="true"
| size="12"
| maxlength="12"
| value="#{boletaHome.instance.login}">
| <a:support event="onblur" reRender="loginDecoration" bypassUpdates="true"/>
| </h:inputText>
| </s:decorate>
|
|
| <s:decorate id="tipoopeDecoration" template="layout/edit.xhtml">
| <ui:define name="label">#{messages['Tipo operación']}</ui:define>
| <h:inputText id="tipoope"
| required="true"
| size="2"
| maxlength="2"
| value="#{boletaHome.instance.tipoope}">
| <a:support event="onblur" reRender="tipoopeDecoration" bypassUpdates="true"/>
| </h:inputText>
| </s:decorate>
|
| <div style="clear:both">
| <span class="required">*</span>
| #{messages['required.fields']}
| </div>
|
| </rich:panel>
|
| <div class="actionButtons">
|
| <h:commandButton id="save"
| value="#{messages['Save']}"
| action="#{boletaHome.persist}"
| disabled="#{!boletaHome.wired}"
| rendered="#{!boletaHome.managed}"/>
|
| <h:commandButton id="update"
| value="#{messages['Update']}"
| action="#{boletaHome.update}"
| rendered="#{boletaHome.managed}"/>
|
| <s:button id="done"
| value="#{messages['Done']}"
| propagation="end"
| view="/Boleta.xhtml"
| rendered="#{boletaHome.managed}"/>
|
| <s:button id="cancel"
| value="#{messages['Cancel']}"
| propagation="end"
| view="/#{empty boletaFrom ? 'BoletaList' : boletaFrom}.xhtml"
| rendered="#{!boletaHome.managed}"/>
|
| </div>
| </h:form>
|
| <rich:tabPanel switchType="ajax">
| <rich:tab label="#{messages['Contrapartida']} *" labelClass="required">
| <div class="association" id="contrapartidaParent">
|
| <h:outputText value="#{messages['No hay asociada una contrapartida']}"
| rendered="#{boletaHome.instance.contrapartida == null}"/>
|
| <rich:dataTable var="contrapartida"
| value="#{boletaHome.instance.contrapartida}"
| rendered="#{boletaHome.instance.contrapartida != null}"
| rowClasses="rvgRowOne,rvgRowTwo"
| id="contrapartidaTable">
| <h:column>
| <f:facet name="header">#{messages['Nombre']}</f:facet>
| #{contrapartida.nombre}
| </h:column>
| <h:column>
| <f:facet name="header">#{messages['Cuenta']}</f:facet>
| #{contrapartida.cuenta}
| </h:column>
| <h:column>
| <f:facet name="header">#{messages['BIC']}</f:facet>
| #{contrapartida.bic}
| </h:column>
| <h:column>
| <f:facet name="header">#{messages['action']}</f:facet>
| <s:link view="/Contrapartida.xhtml"
| id="viewcontrapartida"
| value="#{messages['View']}"
| propagation="none">
| <f:param name="contrapartidaContrapartidaid"
| value="#{contrapartida.contrapartidaid}"/>
| </s:link>
| </h:column>
| </rich:dataTable>
|
| <div class="actionButtons">
| <s:button value="#{messages['Select']} #{messages['Contrapartida']}"
| view="/ContrapartidaList.xhtml">
| <f:param name="from" value="BoletaEdit"/>
| </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=4098881#4098881
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098881
More information about the jboss-user
mailing list