B4J Question [ABMaterial]Problem in new modules

Philip Chatzigeorgiadis

Active Member
Licensed User
Longtime User
I have been running a web-app created with ABMaterial since mid-2016.
I upgraded to ABMaterial version 2.20 (from version 1.12) in early January, without any problems.
All the existing web-app pages operated fine. No new pages were created after upgrade to 2.20.
This week I upgraded to version 2.50. Again, all the webpages of the web-app seem to run OK.

However, now, when I try to create a new module for a new page, I face problems.
I want to create a page with an ABMPagination and a ABMTable (populated by a SQL Server query).

If I set the IsInteractive parameter in the initialization of the table to False, then the page loads fine.
However, the ABMPagination component is unresponsive.
When the ABMPagination is clicked, I get this error on the chrome console:
Uncaught ReferenceError: paginationclickarray is not defined
at HTMLButtonElement.onclick (?1486548268684:1)

Clicking on this error opens Source with a error sign at the first line of the document:
<!DOCTYPE html>

If I set the IsInteractive parameter in the initialization of the table to True, then the page has trouble loading. First these messages appear (2 or 3 times) on the B4J log:

preparing for url refresh
Disconnected
Connected
Waiting for value (1 ms)
Saving the first instance
Waiting for value (3 ms)

java.util.concurrent.TimeoutException
at anywheresoftware.b4j.object.WebSocket$SimpleFuture.getValue(WebSocket.java:63)
at com.ab.abmaterial.ABMTable.GetActiveTableRow(Unknown Source)
at com.ab.abmaterial.ABMTable.GetActiveRow(Unknown Source)
at com.ab.abmaterial.ABMTable.RefreshInternal(Unknown Source)
at com.ab.abmaterial.ABMTable.FirstRunInternal(Unknown Source)
at com.ab.abmaterial.ABMCell.RefreshInternalExtra(Unknown Source)
at com.ab.abmaterial.ABMRow.RefreshInternal(Unknown Source)
at com.ab.abmaterial.ABMPage.Refresh(Unknown Source)
at streamweb.ab.com.calcoffer._connectpage(calcoffer.java:235)
at streamweb.ab.com.calcoffer._websocket_connected(calcoffer.java:505)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
at anywheresoftware.b4j.object.WebSocketModule$Adapter$ThreadHandler.run(WebSocketModule.java:188)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

CalcOffer9bb35549-0450-413d-bcf6-51694ba92da2


Then, at some point, the page is finally loaded.
The ABMPagination remains unresponsive (same behavior as in previous case).

These two errors appear 2 or 3 times on the crhome console, before the page is loaded:


Uncaught TypeError: Cannot read property 'apply' of undefined
at b4j_runFunction (b4j_ws.min.js?1486548268684:1)
at c.<anonymous> (b4j_ws.min.js?1486548268684:1)
at c.dispatchEvent (b4j_ws.min.js?1486548268684:1)
at WebSocket.<anonymous> (b4j_ws.min.js?1486548268684:1)



Uncaught TypeError: $(...).inputmask is not a function
at eval (eval at b4j_eval (b4j_ws.min.js?1486548268684:1), <anonymous>:2:30)
at b4j_eval (b4j_ws.min.js?1486548268684:1)
at c.<anonymous> (b4j_ws.min.js?1486548268684:1)
at c.dispatchEvent (b4j_ws.min.js?1486548268684:1)
at WebSocket.<anonymous> (b4j_ws.min.js?1486548268684:1)


When clicked, they point to this source:

... function b4j_runFunction(a,b){return window[a].apply(null,b)}function b4j_eval(a,b){var c=new Function(b);return c.apply(null,a)} ...


As I said, identical code on my other (older) pages is running without problems.
My code for this module is attached.

What am I missing?

Thanks in advance for any help.
 

Attachments

  • CalcOffer.bas
    12.4 KB · Views: 256

alwaysbusy

Expert
Licensed User
Longtime User
Just to be sure before we start chasing a ghost as this sounds like it is using wrong/old library files:

1. DELETE in your www folder the folders css, js and font
2. in the remaining folder (your app name), delete all .gz files (if any)
3. Copy the tree folders from the library folder in the zip

Open your app and press CTRL-F5 to reload everything.

If this doesn't work, I'll investigate further (maybe if possible take a screenshot of the console in Chrome so we can see all errors).
 
Upvote 0

Philip Chatzigeorgiadis

Active Member
Licensed User
Longtime User
Deleted css, js and font folders in www folder.
No gz files found in my app folder.
Copied css, js and font fodler from library to my www folder.
Stopped the application and then re-executed it.
Opened app in browser and pressed CTRL-F5.

Problem persists: old pages load fine. New page has problems.

Img1 shows console errors during loading.
Img2 shows console errors when page was loaded. The last three errors came from pressing the ABMPagination.
Note that Img1 and Img2 are screenshots from 2 different runs (hence the change in error numbers).
Img3 shows an error source.
 

Attachments

  • img1.jpg
    img1.jpg
    155.9 KB · Views: 263
  • img2.jpg
    img2.jpg
    337.4 KB · Views: 237
  • img3.jpg
    img3.jpg
    69.4 KB · Views: 258
Upvote 0

Philip Chatzigeorgiadis

Active Member
Licensed User
Longtime User
I have tried to run the table with fixed values but I got the same problem.
I can't imagine where to start looking for problems in my setup, as the old pages are working fine!:confused:
 
Upvote 0

Philip Chatzigeorgiadis

Active Member
Licensed User
Longtime User
Here's what I did:

I used your Demo app as a basis.
Removed all the Demo app modules.
Added my app modules and modified the Main module.
Made some modifications in the www folder.

So far, it seems to be working fine.
However, I still have no clue what caused the problem in my original app.
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
This is as weird as me having to move BuildSheets from Buildpage to ConnectPage.
I don't think that was ever resolved??


Sorry did not see in Feedback:

Wow, that was not a bug, but a beast! But I think I got'em.

I shall have to try this in new release and see what happens...

Thanks again...
 
Upvote 0
Top