Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-1072

When editing, if property validation vetoes the save, then not handled correctly.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • core-1.8.0
    • 1.9.0
    • Core
    • None

    Description

      For example, in isis-app-todoapp, there is a (silly) rule that a completed item should have a null dueBy, however the complete() action does not actually clear this property.

      So, can do:

      • complete item
      • edit object, change description
      • hit OK to save

      then nothing seems to happen.

      If hit "OK" again, then get a concurrency exception, eg:

      Another user has just changed this data: todoapp-admin attempted to update TODO:L_2, however this object has since been modified by todoapp-admin [8 vs 7]

      and a stack trace

      org.apache.wicket.WicketRuntimeException: Exception 'todoapp-admin  attempted to update TODO:L_2, however this object has since been modified by todoapp-admin [8 vs 7]' occurred during validation org.apache.isis.viewer.wicket.ui.components.scalars.ScalarPanelTextFieldAbstract$1 on component 46:theme:entity:entity-0:entityPropertiesAndCollections:entityProperties:leftColumn:memberGroup:1:properties:1:property:scalarTypeContainer:scalarIfRegular:scalarValueContainer:scalarValue
      	at org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1535)
      	at org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1146)
      	at org.apache.wicket.markup.html.form.Form$18.validate(Form.java:1898)
      	at org.apache.wicket.markup.html.form.Form$ValidationVisitor.component(Form.java:176)
      	at org.apache.wicket.markup.html.form.Form$ValidationVisitor.component(Form.java:160)
      	at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:274)
      	at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:262)
      	at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:262)
      	at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:262)
      	at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:262)
      	at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:262)
      	at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:262)
      	at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:262)
      	at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:262)
      	at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:262)
      	at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:262)
      	at org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:245)
      	at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:389)
      	at org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1106)
      	at org.apache.wicket.markup.html.form.Form.validateComponents(Form.java:1890)
      	at org.apache.wicket.markup.html.form.Form.validate(Form.java:1832)
      	at org.apache.wicket.markup.html.form.Form.process(Form.java:907)
      	at org.apache.isis.viewer.wicket.ui.panels.FormAbstract.process(FormAbstract.java:87)
      	at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:770)
      	at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:159)
      	at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:124)
      	at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:633)
      	at sun.reflect.GeneratedMethodAccessor213.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
      	at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241)
      	at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:250)
      	at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:236)
      	at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
      	at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
      	at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
      	at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
      	at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
      	at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
      	at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
      	at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      	at org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter.doFilter(IsisLogOnExceptionFilter.java:52)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
      	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
      	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
      	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
      	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
      	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
      	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
      	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
      	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
      	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      	at org.mortbay.jetty.Server.handle(Server.java:326)
      	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
      	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
      	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
      	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      	at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
      	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      Caused by: org.apache.isis.core.metamodel.adapter.version.ConcurrencyException: todoapp-admin  attempted to update TODO:L_2, however this object has since been modified by todoapp-admin [8 vs 7]
      	at org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.adapterFor(AdapterManagerDefault.java:343)
      	at org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento$Type$2.recreateAdapter(ObjectAdapterMemento.java:112)
      	at org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento$Type.getAdapter(ObjectAdapterMemento.java:183)
      	at org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento.getObjectAdapter(ObjectAdapterMemento.java:280)
      	at org.apache.isis.viewer.wicket.model.models.ScalarModel$Kind$1.validate(ScalarModel.java:133)
      	at org.apache.isis.viewer.wicket.model.models.ScalarModel.validate(ScalarModel.java:590)
      	at org.apache.isis.viewer.wicket.ui.components.scalars.ScalarPanelTextFieldAbstract$1.validate(ScalarPanelTextFieldAbstract.java:188)
      	at org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1524)
      	... 66 more
      12:18:51,061  [RequestCycleExtra    1265898221@qtp-993887491-2 WARN ]  ********************************
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              danhaywood Daniel Keir Haywood
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: