Popup

  

I am using Layout\LayoutPopup. sometimes it works fine, sometimes it opens and spans the whole page, 

and when i close the popup editor i get this error message, which gives no clue, any ideas?:


java.lang.NullPointerException
java.lang.NullPointerException: java.lang.NullPointerException
   at outsystems.hubedition.webwidgets.uicomponent.os_controls.TableRecordsRowComponent.isEven(Unknown Source)
   at outsystems.hubedition.webwidgets.renderkit.os_controls.HtmlTableRecordsDataCellRenderer.getComponentSelectedStyle(Unknown Source)
   at outsystems.hubedition.webwidgets.renderkit.os_controls.HtmlTableRecordsDataCellRenderer.getComponentSelectedStyle(Unknown Source)
   at outsystems.hubedition.webwidgets.renderkit.AbstractHtmlTableRecordsCellRenderer.writeAndGetClassAttribute(Unknown Source)
   at outsystems.hubedition.webwidgets.renderkit.AbstractHtmlTableRecordsCellRenderer.innerEncodeBegin(Unknown Source)
   at outsystems.hubedition.webwidgets.renderkit.AbstractHtmlTableRecordsCellRenderer.innerEncodeBegin(Unknown Source)
   at outsystems.hubedition.webwidgets.renderkit.AbstractHtmlRendererWithExtendedProperties.innerEncodeBegin(Unknown Source)
   at outsystems.hubedition.webwidgets.renderkit.AbstractHtmlWebRenderer.encodeBegin(Unknown Source)
   at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:816)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:928)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at outsystems.hubedition.webwidgets.uicomponent.AbstractListComponent.$utb(Unknown Source)
   at outsystems.hubedition.webwidgets.uicomponent.AbstractListComponent.$ppb(Unknown Source)
   at outsystems.hubedition.webwidgets.uicomponent.IiiIIiiIIiiI.executeImpl(Unknown Source)
   at outsystems.hubedition.webwidgets.uicomponent.IiiIIiiIIiiI.executeImpl(Unknown Source)
   at outsystems.hubedition.util.delegates.Action$Action1.executeImplLambda(Unknown Source)
   at outsystems.hubedition.util.delegates.Action$Action1_Lambda.execute(Unknown Source)
   at outsystems.hubedition.webwidgets.uicomponent.AbstractListComponent.iterateList(Unknown Source)
   at outsystems.hubedition.webwidgets.uicomponent.AbstractListComponent.iterateList(Unknown Source)
   at outsystems.hubedition.webwidgets.uicomponent.AbstractListComponent.encodeChildren(Unknown Source)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at outsystems.hubedition.webwidgets.uicomponent.os_controls.PlaceholderArgumentComponent.actuallyEncodeAll(Unknown Source)
   at outsystems.hubedition.webwidgets.renderkit.os_controls.HtmlPlaceholderRenderer.encodeChildren(Unknown Source)
   at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:840)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
   at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:840)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
   at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:268)
   at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:198)
   at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
   at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
   at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
   at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
   at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
   at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
   at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
   at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
   at outsystems.hubedition.webwidgets.BaseRequestStartupFilter.doFilter(Unknown Source)
   at oscaseregistration.RequestStartupFilter.doFilter(Unknown Source)
   at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
   at outsystems.hubedition.webwidgets.filters.HttpContextFilter.doFilter(Unknown Source)
   at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
   at outsystems.hubedition.webwidgets.filters.CacheControlFilter.doFilter(Unknown Source)
   at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
   at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
   at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
   at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3436)
   at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3402)
   at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
   at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
   at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
   at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)
   at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)
   at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
   at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)
   at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
   at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
   at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)


Hello Mariam,

The Popup Editor needs to be attached to a link, you need to pass the link id to it, which becomes available when you give a name to it.

The behaviour you described is typical from when we give a name to the text/expression inside the link, or to the element around the link, instead of the link itself.

At least in a dot net stack, this would also give another error, as soon as you enter the page tha contains the link to the popup, saying something about the popup editor having to be connected to a link/button with the method set to navigate.

If it's not this, and the same link sometimes works and sometimes not, than I'll ask for an oml that we can reproduce the error so we can investigate.

Cheers

Eduardo Jauch

Hello,

I have implemented the popup correctly.

I cannot attach my oml, because my company does not approve of that, however i tried to make a new module and reproduce the case, but it did not get reproduced.

Then in the original module i have noticed this error:

TypeError: parent.RichWidgets_Popup_Editor_Close is not a function
    at eval (eval at <anonymous> (_osjs.js?10_0_302_0:18), <anonymous>:2:8)
    at eval (<anonymous>)
    at _osjs.js?10_0_302_0:18
    at Function.globalEval (_osjs.js?10_0_302_0:18)
    at OsEvaluateUserJavaScript (_osjs.js?10_0_302_0:5)
    at OsExecuteJSONUpdate (_osjs.js?10_0_302_0:5)
    at OsJSONUpdate (_osjs.js?10_0_302_0:5)
    at eval (eval at XHRState.ProcessNextScriptBlock (_osjs.js?10_0_302_0:65), <anonymous>:2:1)
    at XHRState.ProcessNextScriptBlock (_osjs.js?10_0_302_0:65)
    at XHRState.ProcessPartialResponse (_osjs.js?10_0_302_0:65)



Hi Mariam,

The error you are seeing is because you have opened the popup as a normal screen.
When you close it, you are calling an action that is trying to close the screen as if it was a PopUp, but it isn't, so the error.

The question is "why" it do not open as PopUp sometimes.

What comes to my mind right now, is that sometimes your PopUpEditor IS in the screen, and things work as expected, and sometimes you are "taking it out" of the screen the PopUpEditor wudget, and then the error happens.

Check if this is the case, like, if you have an IF around the PopUpEditor widget that is taking him out, or any container that has the Visible property set to False or to an expression that is making it not go to the page.

When the error happens, you can click the "back" button of the browser and inspect the page to see if the widget script is there.

The PopUp should be after the link, and it will put a script there.

If, when you click the link and the error happens (the screen is opened as a full screen), and you didn't saw any error in the page where the link is, is because the widget is not there.

Cheers,
Eduardo Jauch

Hello ,

I checked, the script for opening a popup is there.

Solution

Hello Mariam

The usual errors when using the PopUp Editor are these:

1. Instead of naming the the link/button, the name is given to other element (text/expression or a div around the link). When the page is loaded, an error raises saying the method must be set to navigate. If you click in the link/button, the page is opened as a normal page.

2. The PopUp Editor and the link/button are in separated containers and an ajax refresh is made for the link/button, but not for the PopUp. The ID of the link/button will change, and the PopUp editor will not be able to work anymore. No errors raise, as the PopUp Editor does not change. If you click in the link/button, the page is opened as a normal page.

3. The PopUp Editor and the link/button are in separated containers and an ajax refresh is made for the PopUp Editor, removing it from the page. No error raises, as the PopUp Editor is not there anymore. If you If you click in the link/button, the page is opened as a normal page.

In any of those 3 situations, if after entering the page (that is not a popup anymore) and try to use PopUp_Editor_Close, you will raise the errors you showed earlier.

I'm almost sure that you probably are doing the 2 or 3.

Cheers,
Eduardo Jauch

Solution

Hello Eduardo,

Thank you so much for your help!

The solution was number 2.


Cool,

Nice you found the problem :)

Cheers,
Eduardo Jauch