Hi it seams to be the case... the f:view was in the template, we moved it here for the test's sake.
The "View Transactions" button is the one doing the problem. On the GET request (when the page is loaded for the first time) a @Factory and @Begin initialize() is called to initialize the transactionList DataModel. When the "View Transactions" is pushed the list of transactions should be filtered accordingly the restriction given in the input field "transactionCode". This happens (the filter method is called and the transactionList is updated ), but first the initialize method is called one more time. After this it works ok - pushing the "View Transactions" button only updates the model, the factory method is not called again, i.e. the conversational context is estimated. | <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | | <ui:composition template="template.xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" > | | <!-- content --> | <ui:define name="caption"> | Next generation PMX - Prototype: Transaction view | </ui:define> | <ui:define name="content"> | <f:view> | | <b> conversationId="#{conversation.id}"</b> | <h:form> | <h:outputLabel for="transactionCode">Transaction code:</h:outputLabel> | <h:inputText id="transactionCode" value="#{transactionView.txidentifier}" /> | | <h:commandButton id="viewTransactions" type="submit" value="View transactions" action="#{transactionView.viewTransactions}" class="button"/> | <h:commandButton id="newTransaction" type="submit" value="Create new transaction" action="#{transactionView.gotoNewTransaction}" class="button"/> | </h:form> | <h:outputText value="No transactions found" rendered="#{transactionList == null or empty transactionList}" /> | <div class="section"> | <h:dataTable class="datatable" value="#{transactionList}" var="trans" rendered="#{transactionList != null and not empty transactionList}"> | <h:column> | <f:facet name="header">Transaction code</f:facet> | #{trans.identifier} | </h:column> | <h:column> | <f:facet name="header">Description</f:facet> | #{trans.description} | </h:column> | <h:column> | <f:facet name="header">Type</f:facet> | #{trans.transactionType} | </h:column> | <h:column> | <f:facet name="header">Status</f:facet> | <h:outputText value="New" rendered="#{trans.materialLot==null}"/> | <h:outputText value="Processed" rendered="#{trans.materialLot!=null}"/> | </h:column> | <h:column> | <f:facet name="header">Supplier</f:facet> | #{trans.materialDefinition.supplier} | </h:column> | <h:column> | <f:facet name="header">Material</f:facet> | #{trans.materialDefinition.identifier} | </h:column> | <h:column> | </h:column> | <h:column> | <f:facet name="header">Quantity</f:facet> | #{trans.orderedQuantity.value} | #{trans.orderedQuantity.unit} | </h:column> | <h:column> | <f:facet name="header">Edit</f:facet> | <h:commandLink action="#{transactionView.gotoEditTransaction}" rendered="#{trans.materialLot==null}">Edit</h:commandLink> | </h:column> | <h:column> | <f:facet name="header">Process</f:facet> | <h:commandLink action="#{transactionView.gotoProcessTransaction}" rendered="#{trans.materialLot==null}">Process</h:commandLink> | </h:column> | <h:column> | <f:facet name="header">View</f:facet> | <h:commandLink action="#{transactionView.viewTxDetails}" rendered="#{trans.materialLot!=null}">View</h:commandLink> | </h:column> | </h:dataTable> | <h:messages globalOnly="true" /> | </div> | </f:view> | </ui:define> | </ui:composition> | Regards, View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3927787#3927787 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3927787 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
