I'm porting this sample scala/wicket application from Wicket 1.4 to 1.5. 
I've almost completely got it figured out except for this bit of code from a
class that extends RequestCycle (it does some basic
EntityManager/Transaction stuff):

  override def onEndRequest =
  {
    super.onEndRequest()
    if (em != null)
    {
      if (em.getTransaction().isActive()) em.getTransaction().commit()
      em.close()
    }

    // TODO: in 1.5 page maps no longer in use - not sure why they'd want to
do this to begin with...
    // TODO: ahhh, maybe to prevent hitting 'back button'?
    //if (_endConversation) getRequest().getPage().getPageMap().remove()
  }


The line I have commented out at the end is what I can't find an equivalent
for in Wicket 1.5.

Whether or not this is the proper way to do database stuff is really not
important to me - please don't let that distract from the question.  For
those that are curious, the _endConversation flag is set in the body of a
form's onSubmit() method, after data is written to the database.

What I'm really interested in is 

a) Why would someone want to remove the page map from the session in Wicket
1.4? like above  Is my comment correct that it prevents hitting the back
button and re-submitting a form?

b) What is the Wicket 1.5 way of handling a situation like this?  I looked
at some other related posts on these forums, but haven't found a good
description yet.

c) In general, how does page caching work in Wicket 1.5?  There isn't much
on the migrating wiki page...

Thanks,

-Doug


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PageMap-in-1-5-tp3685858p3685858.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to