Cool, very nice app!

You said that any button could be pressed, so I did ;-))

* My Assignments, select any assignment and click "show"
* Click "Delete"
* Hit Back, the data is still there
* While still on "show" page hit Refresh. Hmm, seems like the data was
not deleted.
* Click "Save" and get an exception:

=== cut here ===
wicket.WicketRuntimeException: Method public abstract void
wicket.markup.html.link.ILinkListener.onLinkClicked() of interface
java.lang.reflect.Method threw an exception
    at 
wicket.protocol.http.WebRequestCycle.invokeInterface(WebRequestCycle.java:506)
    at 
wicket.protocol.http.WebRequestCycle.invokeInterface(WebRequestCycle.java:562)
    at 
wicket.protocol.http.WebRequestCycle.callComponentListener(WebRequestCycle.java:420)
    at 
wicket.protocol.http.WebRequestCycle.parseRequest(WebRequestCycle.java:129)
    at wicket.RequestCycle.request(RequestCycle.java:403)
    at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:304)
...
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at 
wicket.protocol.http.WebRequestCycle.invokeInterface(WebRequestCycle.java:497)
    ... 71 more
Caused by: org.springframework.orm.hibernate3.HibernateSystemException:
Batch update returned unexpected row count from update: 0 actual row
count: 0 expected: 1; nested exception is
org.hibernate.StaleStateException: Batch update returned unexpected
row count from update: 0 actual row count: 0 expected: 1
    at 
org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:656)
    at 
org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:586)
    at 
org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:496)
    at 
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:435)
    at 
org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:258)
    at 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:67)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
    at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
    at $Proxy9.saveAssignmentWithLastModified(Unknown Source)
    at 
esz.app.sponsor.assignments.pages.ViewAssignmentPage$10.onClick(ViewAssignmentPage.java:248)
    at wicket.markup.html.link.Link.onLinkClicked(Link.java:181)
    ... 76 more
Caused by: org.hibernate.StaleStateException: Batch update returned
unexpected row count from update: 0 actual row count: 0 expected: 1
    at org.hibernate.jdbc.BatchingBatcher.checkRowCount(BatchingBatcher.java:92)
    at 
org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:78)
    at 
org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57)
    at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:172)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:226)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:137)
    at 
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
    at 
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:678)
    at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:309)
    at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:86)
    at 
org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:488)
    ... 84 more
=== cut here ===

This is exactly why I think that default Wicket approach with page
versioning and restoring model when Back button is pressed is faulted.
It brings too many issues. I think that the page should be
synchronized with model not the other way around. But... well, as long
as I do have an option of doing things in Wicket my way (and I do have
this option), I am not going to critique much ;)

Michael.


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to