BPM, Workflow, and Case

BPM, Workflow, and Case

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  OnLoad error for view / ???

    Posted Wed December 02, 2020 05:46 AM
    Hi All,

    I have a coach with a Tab view on it with two tabs. On both tabs there are views, within these views are further views:


    When the coach is first displayed, all of the On Load event handlers of the controls are called, and they do run without any errors.
    When the tab is changed, a service is called and then comes a Stay-on-page event, so no coach is changed:



    When I switch between the tabs more times forth and back, I get these errors (and some of the data is lost):


    It is very interesting, because 
    • as I know, the "view /" is the coach itself, but coaches do not have event handlers...
    • the On Load event handler runs only once when the page is loaded, but here I get an On Load error for tab changes on the same coach every time when I switch the tabs forth and back...
    • in all of the views on the coach I did put the event handler codes into a try - catch block with logging the error to the console, but nothing is written to the console from the catch blocks.
    In addition, I get AJAX errors too for the single selects getting values from a service after several tab changes (the drop-down button of the single selects are blinking and changing between the loading icon and drop-down icon). When the page is first displayed, no such error, the single selects are filled with the selectable values from their services and work well.

    It seems that the coach go crazy after switching between the tabs several times...
    I use the same mechanism for other coaches and there are no problems, no errors.

    I simply can't localize the place or cause of the errors shown above. UID=143, UID=145, etc. for me do not say nothing, I can't find controls using these UIDs.

    How could I localize the place or get the cause of the errors? Any ideas please? It drives me crazy...

    Thx,

    ------------------------------
    ____________________
    Laszlo
    ------------------------------


  • 2.  RE: OnLoad error for view / ???

    Posted Thu December 03, 2020 10:43 AM
    Hi Laszlo,

    It appears that your business object is getting corrupted or the reference is getting lost.  I would check to make sure you're not setting a variable to the wrong type. What is the Pre on your Stay On Page doing? Also, are your paths coming out of the Coach saving the execution context and updating the business objects?  


    ------------------------------
    Stephen Perez
    ------------------------------



  • 3.  RE: OnLoad error for view / ???

    Posted Thu December 03, 2020 10:57 AM
    Hi Stephen,

    I compared the XML representation of the business data before and after the service call, and they are totally equal. The Stay-On-Page PRE just sets a boolean field to false, so it can't make error.

    Yes, the out path saves the context. I tried to turn it off or move the context saving to another point, but it has no effect. 

    Anyway, now we redesign our coaches by moving all the controls from the second tabs to new coaches (instead of staying on the page, we direct the flow to a new coach containing only the views from the second tab). We still use the same set of views, data and services, but doing so we don't get errors. Well, I don't know why or how, but this solves the problem.

    Thx again!




    ------------------------------
    ____________________
    Laszlo
    ------------------------------



  • 4.  RE: OnLoad error for view / ???

    Posted Mon December 07, 2020 10:32 PM
    Hi Laszlo,

    To be honest, there could be a million reasons why you're getting the errors like that after a boundary event. You didn't explain how you code your views and how the onload() events are handled in those views. So it's impossible to tell why the errors occur. 

    The fact that it works once you move them to a different coach probably means there's something wrong with the way you handle change() or view() event handlers. 

    While moving to a different coach works, it reduces user friendliness/experience when your screen has to be reloaded.

    If you still want help from the community, best to replicate your problem into a small process app and wrap it up and upload here so we can see how you code your views and where things go wrong. Or just explain a bit better cohesively how things connect, down to the lowest levels.

    Regards,
    Thong Huynh 


    ------------------------------
    Thong Huynh
    Sydney NSW
    ------------------------------