B4J Library [ABMaterial] Framework for WebApps

alwaysbusy

Expert
Licensed User
there is a problem: after some time, the application is disconnected and is no longer reachable. There is a timer that stops or after a little time?
Can you give me some more info about this? I have seen a similar thing myself, but I also noticed this only happened when I was debugging a lot and I was starting and stopping the server a lot, while keeping my Chrome browser open, which sometimes confused the jServer library (jetty). ABMaterial has a build in 'timer' in the browser part where, if it loses connection starts a timer every 3 seconds to reconnect. You can see this in the b4j_ws.js file in the www/js/ folder.
 

Gabino A. de la Gala

Active Member
Licensed User
A mail with an update of ABMaterial has been sent to the donators containing a fix for the refresh() problem. As this one is rather important for everyone, it would be nice if I could get some quick feedback so I can put this release out for everyone.
I send you a mail with problem detected with the update of tables.

Thanks for your work.
 

alwaysbusy

Expert
Licensed User
@Gabino A. de la Gala I'll send an update in about half an hour. Seems a big chunk of code was somehow deleted in the lib I've send you. (e.g. I don't think that you have the method called tbl.SetString(row, col, value). Also, I forgot one crucial piece of information. I'll explain more in the mail.
 

Roberto P.

Well-Known Member
Licensed User
Can you give me some more info about this? I have seen a similar thing myself, but I also noticed this only happened when I was debugging a lot and I was starting and stopping the server a lot, while keeping my Chrome browser open, which sometimes confused the jServer library (jetty). ABMaterial has a build in 'timer' in the browser part where, if it loses connection starts a timer every 3 seconds to reconnect. You can see this in the b4j_ws.js file in the www/js/ folder.
like you said, if I keep the browser open and without any operation, after about 20 minutes the system is no longer available. If I press a button appears red "Disconnected". If it happens, I do print screen.

I am using the example standar.

I try now with the new version that you sent and if it happens, I am sending my ip public server.

Hello
 

Roberto P.

Well-Known Member
Licensed User
Hello
I also tried the new version and the problem remains.
If you leave the brower any page ABMaterial demo open for about 20/30 minutes crashes.
This problem is much thanks and should be fixed.
thank you
Roberto
 

Roberto P.

Well-Known Member
Licensed User
Alain
would be interesting to also implement Ajax, if possible, to avoid that when you press a menu to be recharged all pages, not just the modified part.
I hope you feel this interesting.
Thank you
 

alwaysbusy

Expert
Licensed User
@Roberto P. Nothing about your crash problem has changed in v1.02. I don't seem to be able to reproduce it over here. Page has been open for hours and still does what it has to do. Also, the server app does not report a problem.

Can you give me the exact steps you're doing? I need as much information as possible. Some things that may help identifying the problem:
Do you see disconnects in B4J?
Do you get crash logs in B4J?
Using chrome, pressing F12 and looking into the console, do you see crash logs?

As for Ajax. As long as you stay on the same page, there is Ajax-like behaviour. That is why components have a refresh() method. e.g. if you do tbl.refresh(), the page is not reloaded but only the table is changed using DOM manipulation. This is also why you should avoid page.refresh() as this is almost the same as navigating to the page again.

Only when you use the navigation bar the new page is loaded (but this is normal, as it actually navigates to another html page). It does not recharge all pages, just the page belonging to the menu item. And it is impossible to put all the b4j pages into one html file. I've tried that in the beginning with iFrames and it immediately was causing a lot of trouble. Also, it was much harder to build WebApps in B4J. It was very easy to write code that crashed the whole app (e.g. using the same id for a component between pages).

It was a matter of balance of creating a framework that is easy to use in B4J (server side) and what happens on the client side (browser). I decided to use B4J to build ABMaterial to make it easy for the programmer. It does not, like B4A or B4i, 'translate' the B4J code to another programming language.

So in short, no. ABMNavigationBar behaviour will not change, at least not in the near future.
 

billyrudi

Active Member
Licensed User
Hi, AlwaysBusy,
tank you you for all job!
In my smartphone S6 edge the tostmessage when the text is long does not appear appear correctly. the panel's heigth does not increment itself so the text is out of it both upper than down.
wath i can do?
 

alwaysbusy

Expert
Licensed User
There is a future feature to do this, but THIS IS COMPLETELY UNTESTED! If it does not work, I'm not going to be able to look into this as I still got a lot on my plate.

Page has two methods:

page.AddExtraJavaScriptFile(fileName)
page.AddExtraCSSFile(fileName)

files need to be placed in the js folder and css files in the css folder.

In theory, you should be able to use the default B4J page.ws.RunFunction() and page.ws.RunFuctionWithResult() methods.

If it does work, it would be great if you could report this to the forum, as other could use it too.
 

alwaysbusy

Expert
Licensed User
@billyrudi
In my smartphone S6 edge the tostmessage when the text is long does not appear appear correctly. the panel's heigth does not increment itself so the text is out of it both upper than down.
wath i can do?
nothing I'm afraid. This is the case in the materialize.css framework I'm using and until those guys fix this, that's how it appears in ABMaterial.
 
Last edited:

Roberto P.

Well-Known Member
Licensed User
@Roberto P. Nothing about your crash problem has changed in v1.02. I don't seem to be able to reproduce it over here. Page has been open for hours and still does what it has to do. Also, the server app does not report a problem.

Can you give me the exact steps you're doing? I need as much information as possible. Some things that may help identifying the problem:
Do you see disconnects in B4J?
Do you get crash logs in B4J?
Using chrome, pressing F12 and looking into the console, do you see crash logs?

As for Ajax. As long as you stay on the same page, there is Ajax-like behaviour. That is why components have a refresh() method. e.g. if you do tbl.refresh(), the page is not reloaded but only the table is changed using DOM manipulation. This is also why you should avoid page.refresh() as this is almost the same as navigating to the page again.

Only when you use the navigation bar the new page is loaded (but this is normal, as it actually navigates to another html page). It does not recharge all pages, just the page belonging to the menu item. And it is impossible to put all the b4j pages into one html file. I've tried that in the beginning with iFrames and it immediately was causing a lot of trouble. Also, it was much harder to build WebApps in B4J. It was very easy to write code that crashed the whole app (e.g. using the same id for a component between pages).

It was a matter of balance of creating a framework that is easy to use in B4J (server side) and what happens on the client side (browser). I decided to use B4J to build ABMaterial to make it easy for the programmer. It does not, like B4A or B4i, 'translate' the B4J code to another programming language.

So in short, no. ABMNavigationBar behaviour will not change, at least not in the near future.
Hello
I found the cause of the problem: using the program in an ADSL network without a fixed IP, the program disconnects.
Fixed IP is ok.

I understand that implementing Ajax is complicated, but it is nice to see the load of the entire site when running the press the main menu.
We expect .....
 

Gabino A. de la Gala

Active Member
Licensed User
Is it possible to raise a double click event in the cells of tables?

If very complicated. Is there a way to set the duration of the click to jump event?.

My request is the following. On the computer there is not much problem , since the scroll is done with the mouse and the corresponding displacement bar . The problem we have when we use the web from a smartphone or tablet, as we need to nibble on the grid itself to achieve vertical or horizontal motion. And that simple touch to "move" is considered like a click , triggering the event.
 

Roberto P.

Well-Known Member
Licensed User
hello Alain
I requested hoping not to be too picky, but only to improve the framework!

It would be helpful to have two new controls that do not think I have seen:

- Autocomplete
- TreeView

Thank you in advance
Greetings
 

alwaysbusy

Expert
Licensed User
I would like to release version 1.02 somewhere next to the public, so if there are bugs (no new features!) in 1.02, please let me know.

I would suggest you'll mail me the feature requests and bugs, because a lot is going to be lost in the forum I'm afraid.

Maybe also keep posting it in the forum so everyone can see it do avoid doubles
.

Use the following subjects in the mail (I'm using rules in my email program to get things organized):

Features subject line:
ABMaterial FEATURE

Bug subject line:
ABMaterial BUG

Also, know not all requests will make it. I'm currently working on the calendar control and it's a monster! Already spend every morning and night this week before and after my day job on it and there is still a lot, lot, lot of work to do on it!

But it is starting to look nice into the framework:

 
Last edited:

Roberto P.

Well-Known Member
Licensed User
Alain goes well, we will write email
Great view of the calendar ... Fantastic!
Thank you
Roberto
 

Gabino A. de la Gala

Active Member
Licensed User
Are there something similar to the event " keypressed " in edit fields?

And so we can try to make suggestions in a list or something similar
 
Top