Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-13272

The “add line” button in Stacked List demo is in the wrong location and throws null pointer exception when selected

    Details

    • Type: Bug Fix
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Sprint:
      Core 2.5.0-rc Sprint 1
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes
    • Story Points:
      2

      Description

      The “add line” button in KRAD Library --> Layout Managers → Stacked layout → stacked list is in the wrong location (it should be at the bottom) and it throws an error when selected.

      To see the issue Go to http://localhost:8080/krad-dev/kr-krad/kradsampleapp?viewId=Demo-StackedLayoutManagerView and select stacked list from the drop down.

      (It does not do this in http://krad.rice.kuali.org/kr-krad/kradsampleapp?viewId=Demo-StackedLayoutManagerView )

      java.lang.NullPointerException
      at org.kuali.rice.krad.uif.container.CollectionGroupBuilder.initializeNewCollectionLine(CollectionGroupBuilder.java:614)
      at org.kuali.rice.krad.uif.container.CollectionGroupBase.initializeNewCollectionLine(CollectionGroupBase.java:548)
      at org.kuali.rice.krad.uif.container.CollectionGroupBase.performApplyModel(CollectionGroupBase.java:358)
      at org.kuali.rice.krad.uif.lifecycle.model.ComponentDefaultApplyModelTask.performLifecycleTask(ComponentDefaultApplyModelTask.java:52)
      at org.kuali.rice.krad.uif.lifecycle.ViewLifecycleTaskBase.run(ViewLifecycleTaskBase.java:66)
      at org.kuali.rice.krad.uif.lifecycle.ViewLifecyclePhaseBase.run(ViewLifecyclePhaseBase.java:173)
      at org.kuali.rice.krad.uif.lifecycle.SynchronousViewLifecycleProcessor.performPhase(SynchronousViewLifecycleProcessor.java:192)
      at org.kuali.rice.krad.uif.lifecycle.ViewLifecycleBuild.runApplyModelPhase(ViewLifecycleBuild.java:189)
      at org.kuali.rice.krad.uif.lifecycle.ViewLifecycleBuild.run(ViewLifecycleBuild.java:69)
      at org.kuali.rice.krad.uif.lifecycle.ViewLifecycle.encapsulateLifecycle(ViewLifecycle.java:140)
      at org.kuali.rice.krad.uif.lifecycle.ViewLifecycle.performComponentLifecycle(ViewLifecycle.java:249)
      at org.kuali.rice.krad.web.service.impl.ModelAndViewServiceImpl.invokeViewLifecycle(ModelAndViewServiceImpl.java:289)
      at org.kuali.rice.krad.web.service.impl.ModelAndViewServiceImpl.prepareView(ModelAndViewServiceImpl.java:263)
      at org.kuali.rice.krad.web.controller.UifControllerHandlerInterceptor.postHandle(UifControllerHandlerInterceptor.java:188)
      at org.springframework.web.servlet.HandlerExecutionChain.applyPostHandle(HandlerExecutionChain.java:149)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:928)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
      at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:855)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
      at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.kuali.rice.krad.web.filter.CharsetFilter.doFilter(CharsetFilter.java:58)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.kuali.rice.krad.web.filter.UserLoginFilter.doFilter(UserLoginFilter.java:89)
      at org.kuali.rice.krad.web.filter.UserLoginFilter.doFilter(UserLoginFilter.java:77)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.kuali.rice.krad.web.filter.BootstrapFilterChain.doFilter(BootstrapFilter.java:327)
      at org.kuali.rice.krad.web.filter.DummyLoginFilter.doFilter(DummyLoginFilter.java:82)
      at org.kuali.rice.krad.web.filter.DummyLoginFilter.doFilter(DummyLoginFilter.java:62)
      at org.kuali.rice.krad.web.filter.BootstrapFilterChain.doFilter(BootstrapFilter.java:320)
      at org.kuali.rice.krad.web.filter.BootstrapFilter.doFilter(BootstrapFilter.java:199)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.kuali.rice.krad.web.filter.UifSessionTimeoutFilter.doFilter(UifSessionTimeoutFilter.java:130)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.kuali.rice.core.web.Log4JContextClearingFilter.doFilterInternal(Log4JContextClearingFilter.java:37)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.kuali.rice.krad.web.filter.HideWebInfFilter.doFilter(HideWebInfFilter.java:68)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.springframework.web.filter.AbstractRequestLoggingFilter.doFilterInternal(AbstractRequestLoggingFilter.java:214)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
      at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2440)
      at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2429)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Issue Links

            Activity

            Hide
            kbtaylor Kristina Taylor (Inactive) added a comment - - edited

            I think they're in the correct place. For the "x", the button is in the uif-header-rightGroup which is positioned on the right.

            .uif-header-rightGroup {
                position: absolute;
                right: 0;
                top: 0;
            }
            
            Show
            kbtaylor Kristina Taylor (Inactive) added a comment - - edited I think they're in the correct place. For the "x", the button is in the uif-header-rightGroup which is positioned on the right. .uif-header-rightGroup { position: absolute; right: 0; top: 0; }
            Hide
            shahess Shannon Hess added a comment -

            Ok, sounds good, that must have been a design change. For http://krad.rice.kuali.org/kr-krad/kradsampleapp?viewId=Demo-StackedLayoutManagerView they used to be delete buttons (rather than the x) in the footer. I'll commit the change to the buttons in "Stacked colllection With Table Sub-Collection" demo so that the buttons do not look so large in the header.

            Show
            shahess Shannon Hess added a comment - Ok, sounds good, that must have been a design change. For http://krad.rice.kuali.org/kr-krad/kradsampleapp?viewId=Demo-StackedLayoutManagerView they used to be delete buttons (rather than the x) in the footer. I'll commit the change to the buttons in "Stacked colllection With Table Sub-Collection" demo so that the buttons do not look so large in the header.
            Hide
            shahess Shannon Hess added a comment - - edited

            All,

            I have another question for everyone. I was finally able to determine why the add line button is in the wrong place on the Stacked List demo. It was due to the change made for
            KULRICE-11700 in BoxLayoutManager.performFinalize that adds the "pull-left" style class to many components. It gets added to the InputFieldBase components before the add line button, which causes the issue. When I change the code so that it doesn't add the "pull-left" style class for InputFieldBase components, the problem goes away. However, this seems hacky and I don't think it will work in all situations (i.e. If the field before the add line button is not an instance of InputFieldBase).

            if (!(c instanceof Header
              || c instanceof Container
              || c instanceof Message
              || c instanceof ProgressBar
              || c instanceof ProgressBarField
              || c instanceof InputFieldBase)) {           // Line I added to "fix" the issue
                    c.addStyleClass("pull-left");
            }
            

            Does anyone know of a potential solution for this problem? If you would prefer to discuss this and have me show the issue I can do that as well. I added Brian as a watcher to this issue since he added a couple of these components that do not get "pull-left" added as a style. I was hoping he would have additional insight.

            Thanks,
            Shannon

            Show
            shahess Shannon Hess added a comment - - edited All, I have another question for everyone. I was finally able to determine why the add line button is in the wrong place on the Stacked List demo. It was due to the change made for KULRICE-11700 in BoxLayoutManager.performFinalize that adds the "pull-left" style class to many components. It gets added to the InputFieldBase components before the add line button, which causes the issue. When I change the code so that it doesn't add the "pull-left" style class for InputFieldBase components, the problem goes away. However, this seems hacky and I don't think it will work in all situations (i.e. If the field before the add line button is not an instance of InputFieldBase). if (!(c instanceof Header || c instanceof Container || c instanceof Message || c instanceof ProgressBar || c instanceof ProgressBarField || c instanceof InputFieldBase)) { // Line I added to "fix" the issue c.addStyleClass( "pull-left" ); } Does anyone know of a potential solution for this problem? If you would prefer to discuss this and have me show the issue I can do that as well. I added Brian as a watcher to this issue since he added a couple of these components that do not get "pull-left" added as a style. I was hoping he would have additional insight. Thanks, Shannon
            Hide
            kbtaylor Kristina Taylor (Inactive) added a comment -

            The add line button not being in the correct place was not nearly as critical as the NPE being thrown, which you fixed. I would suggest opening a new issue around the first problem, putting it in 2.5.1, and assigning it to Brian with the above explanation. Then you can close this issue.

            Show
            kbtaylor Kristina Taylor (Inactive) added a comment - The add line button not being in the correct place was not nearly as critical as the NPE being thrown, which you fixed. I would suggest opening a new issue around the first problem, putting it in 2.5.1, and assigning it to Brian with the above explanation. Then you can close this issue.
            Hide
            shahess Shannon Hess added a comment -

            I created KULRICE-13304 for the remaining issue and assigned it to Brian. Thanks for all your help on this one Kristina.

            Show
            shahess Shannon Hess added a comment - I created KULRICE-13304 for the remaining issue and assigned it to Brian. Thanks for all your help on this one Kristina.

              People

              • Assignee:
                shahess Shannon Hess
                Reporter:
                shahess Shannon Hess
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: