entity update query triggered by it self with JPDL pageflow
salski22 Feb 8, 2010 9:24 AMHi
I'm facing with jpdl pageflow. Here's the thing:
I have list with edit button, when edit button is pressed the conversation pageflow will start. In the next page where I can edit inputtext fields I have cancel and next button. When I press next button I want to go to next pege with summary of edited entries and update button.
And here accours the problem. When I press next button the entity will be updated by calling hibernate update query.
Why whis happening since in JPDL I have no action defined for next button? What triggers that update query and why?
My jpdl
<pageflow-definition
xmlns="http://jboss.com/products/seam/pageflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-2.2.xsd"
name="edit-event">
<start-page name="list-event" view-id="/listEvents.xhtml">
<redirect/>
<transition name="edit" to="edit-event">
<action expression="#{eventList.editEvent}"/>
</transition>
</start-page>
<page view-id="/editEvent.xhtml" name="edit-event">
<redirect/>
<transition name="next" to="event-sum">
</transition>
<transition name="cancel" to="event-canceled">
<action expression="#{eventList.cancelEditEvent}"/>
</transition>
</page>
<page view-id="/editEventSum.xhtml" name="event-sum">
<redirect/>
<transition name="update" to="event-added">
<action expression="#{eventList.saveEvent}"/>
</transition>
<transition name="cancel" to="event-canceled">
<action expression="#{eventList.cancelEditEvent}"/>
</transition>
</page>
<page name="event-added" view-id="/eventAdded.xhtml">
<end-conversation/>
<redirect/>
</page>
<page name="event-canceled" view-id="/listEvents.xhtml">
<end-conversation/>
<redirect/>
</page>
</pageflow-definition> and my buttons on editEvent.xhtml page
.... <h:commandButton type="submit" value="NEXT" action="next" /> <h:commandButton type="submit" value="CANCEL" action="cancel" immediate="true"/> ....
and my buttons on summary page editEventSum.xhtml
.... <h:commandButton type="submit" value="UPDATE" action="update" /> <h:commandButton type="submit" value="CANCEL" action="cancel" immediate="true" /> ....
What should I do to update the entity on summary page and not on edit page