B4J Library [BANano] Kendo UI Core - Wrapper

Hello,

i would like to present my first version of a BANano wrapper for Kendo UI Core.

You can see a demo version here: http://banano.tuebben.de/kendoui/demo/

What is Kendo UI Core?

Kendo UI is a library that provides some powerful and nicely designed controls. Besides the paid full version there is a free core version which does not include some controls (like the grid, scheduler, charts, etc.).

Here is an overview of the available controls in the core version: https://github.com/telerik/kendo-ui-core

Please note:

Currently the wrapper has the status of a 'proof of concept'.
Not all controls have been implemented yet.
And the already implemented controls do not yet support all properties and methods.
The documentation still needs some work.

For this reason only the brave and fearless would be able to work with the library at the moment. ;)

If you are interested, I can publish the library and a demo code.

Greetings ... Peter

// Edit (03.03.2019 16:00): I have now added the required files to this posting.

Quick installation guide:
  1. Extract the files in Library.zip into the Additional Files folder.
  2. Extract the files in BANanoKendoUIDemo.zip into a folder of your choice and start B4J with BANanoKendoUIDemo.b4j.
  3. Adjust the path in BANano.Build() according to your needs.
// Edit (14.03.2019 15:45): The library has been updated to version 0.14
 

Attachments

  • BANanoKendoUIDemo.zip
    159.1 KB · Views: 975
  • Library.zip
    178.8 KB · Views: 1,015
Last edited:

Roberto P.

Well-Known Member
Licensed User
Longtime User
I like the the Ui library, for me it's the best UI library.

Can you publish the source code? thank
 

luc-dev

Member
Licensed User
Longtime User
This in very impressing. I am looking for a way to move a window application to the web and ABMaterial / BANano could be a great solution!

Thanks for all the work done on those frameworks and for this KendoUI wrapping demo.

I will love to have a look at a source code example too!
 

Kiffi

Well-Known Member
Licensed User
Longtime User
I have now added the required files to my first posting.

Quick installation guide:
  1. Extract the files in Library.zip into the Additional Files folder.
  2. Extract the files in BANanoKendoUIDemo.zip into a folder of your choice and start B4J with BANanoKendoUIDemo.b4j.
  3. Adjust the path in BANano.Build() according to your needs.

I will publish some sample codes in the near future.

Feel free to post questions, suggestions or bug reports in this thread.

Greetings ... Peter
 

korshkov

Member
Licensed User
Longtime User
How resolve problem with this errors on Log then compiling demo?
"java.lang.UnsupportedClassVersionError: b4j/example/kendo has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0"
 

RWK

Member
Licensed User
Longtime User
Hmmm...
but there are no kendo libraries source code to recompile...

Grüße
Rainer
 

Kiffi

Well-Known Member
Licensed User
Longtime User
but there are no kendo libraries source code to recompile...

Michael1968, who posted the same error message as korshkov, solved the problem by moving the library from the internal library folder to the additional library folder. Maybe this solves korshkov's problem.
 

korshkov

Member
Licensed User
Longtime User
I try all variants for place:
1. Delete from internal library and move to Additional
2. Use in Internal
3. Use in Additional

Error is not changed.
 

joulongleu

Active Member
Licensed User
Longtime User
Hi::)Kiffi The BANanoKendoUI example is very popular, can you add BANanoKendoDataSource new, update, delete examples?:)
 

Kiffi

Well-Known Member
Licensed User
Longtime User

Note: For this tutorial you need at least version 0.14 of the BANanoKendo library, which you can download in the first article of this thread.


Tutorial: BANanoKendoDataSource (Part 1)
(you can find part 2 of this tutorial here)

The BANanoKendoDataSource is a central data management component. It serves the data for many BANanoKendo components (such as Listbox, ListView, ComboBox, etc.).

The DataSource is created and initialized as follows:

B4X:
Dim myDataSource As BANanoKendoDataSource
myDataSource.Initialize(Me, "myDataSource")

Now you can add any objects in the form of a map to the DataSource:

B4X:
myDataSource.Add(CreateMap("name": "Jane Doe", "age": "30"))
myDataSource.Add(CreateMap("name": "John Doe", "age": "33"))

For example, you can use a list box to see which data is now available in the DataSource:

B4X:
Dim myListbox As BANanoKendoListbox
myListbox.Initialize(Me, "myListBox", "myListBox")
myListbox.AddToParent("body")
myListbox.DataSource = myDataSource
myListbox.Template = "#:name# is #:age# years old"

NUNbLaa.png


Please note: To change the content of the list box, you only need to change the underlying DataSource!

Here we add another item to the DataSource:

B4X:
myDataSource.Add(CreateMap("name": "Jill Doe", "age": "55"))

fTJZKDB.png


You can also remove items from the DataSource

B4X:
myDataSource.RemoveAt(1) ' removes John

I1CD9JP.png


You can update DataSource items as follows:

B4X:
Dim Jill As BANanoKendoDataSourceItem
Jill.Initialize(myDataSource.At(1))
Jill.Set("age", 44)

yYK5pvd.png


New items can also be inserted at certain positions:

B4X:
myDataSource.Insert(0, CreateMap("name": "Jock Doe", "age": "99")) ' Insert Jock at index 0

GZRXLLz.png


The items of a DataSource can also be sorted. Here we sort by age in ascending order:

B4X:
Dim SortMap As Map = CreateMap("field": "age", "dir": "asc")
myDataSource.Sort = SortMap

wCHhCP3.png


That's it for now. The KendoDataSource is very powerful. In further tutorials I go into further functionalities.

Greetings ... Peter
 
Last edited:

Michael1968

Active Member
Licensed User
Longtime User
Hi Kiffi,
compiling the KendoUIDemo i get the this Error Messages:
Banano V2.33
BAnanoKendoUI V0.14

Building C:\inetpub\wwwroot\BANano\BANanoKendoUI\scripts\app.js
Loading layout comboboxlayout...
Loading layout progressbarlayout...
Loading layout sliderlayout...
Loading layout splitterlayout...
Loading layout tabstriplayout...
Loading layout toolbarlayout...
Loading layout windowlayout...
Loading layout dateandtimelayout...
Loading layout dialoglayout...
Loading layout listboxlayout...
Loading layout listviewlayout...
Loading layout mainlayout...
Loading layout panelbarlayout...
Loading layout predefineddialogslayout...
ERROR 22: [DialogDemo,initialize, around line: 18] kendo(GLOBALMYCLASSVAR) is not supported in BANano!
--> Kendo_OpenConsole
--> Current index: 1
--> Var : B4JName: kendo, JSName: _kendo ,ISPRIVATE: true,B4JTYPE: kendo, IsArray: false, InitValue: /* NOT SUPPORTED */
--> Method : ---- METHOD: initialize (MODULE: DialogDemo, ISPRIVATE: false) ----
B4J DECLARE:
LINE NUMBER: 14
ORIGINAL LINE: Public Sub Initialize
CLEANED LINE: public sub initialize
WORDS: public|sub|initialize|
INTERNAL VARS:
RETURNS: B4JTYPE: string, IsArray: false, InitValue: ''
------------------------------
ERROR 22: [DialogDemo,initialize, around line: 29] bananokendodialog(GLOBALMYCLASSVAR) is not supported in BANano!
--> Dialog1.Actions = Actions
--> Current index: 1
--> Var : B4JName: dialog1, JSName: _dialog1 ,ISPRIVATE: true,B4JTYPE: bananokendodialog, IsArray: false, InitValue: /* NOT SUPPORTED */

best regards
Michael
 

Ilya G.

Active Member
Licensed User
Longtime User
I try to compiling the BANanoKendoUIDemo and get this error too
Banano V2.34
BAnanoKendoUI V0.14

Reading B4J INI in C:\Users\Администратор\AppData\Roaming\Anywhere Software\B4J to find Additional Libraries folder...
Found Additional Libraries folder: C:\Users\Администратор\YandexDisk\B4X Library\JLibraries
Building C:\Users\836D~1\YANDEX~1\B4X\!9B6C~1\BANano2.34\DEMO2~1\Objects\BANanoKendoUI\scripts\app.js
Loading layout comboboxlayout...
Loading layout progressbarlayout...
Loading layout sliderlayout...
Loading layout splitterlayout...
Loading layout tabstriplayout...
Loading layout toolbarlayout...
Loading layout windowlayout...
Loading layout dateandtimelayout...
Loading layout dialoglayout...
Loading layout listboxlayout...
Loading layout listviewlayout...
Loading layout mainlayout...
Loading layout panelbarlayout...
Loading layout predefineddialogslayout...
Loading library: C:\Users\Администратор\YandexDisk\B4X Library\JLibraries\bananokendoui.xml
java.net.MalformedURLException: unknown protocol: c
at java.net.URL.<init>(URL.java:600)
at java.net.URL.<init>(URL.java:490)
at java.net.URL.<init>(URL.java:439)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:620)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:148)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:805)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:274)
at com.ab.banano.BANano.a(Unknown Source)
at com.ab.banano.BANano.b(Unknown Source)
at com.ab.banano.BANano.a(Unknown Source)
at com.ab.banano.BANano.Build(Unknown Source)
at b4j.example.main._appstart(main.java:96)
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:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
at b4j.example.main.start(main.java:37)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:748)
Library: C:\Users\Администратор\YandexDisk\B4X Library\JLibraries\bananokendoui.xml is not a BANano library!
ERROR 22: [DialogDemo,initialize, around line: 18] kendo(GLOBALMYCLASSVAR) is not supported in BANano!
--> Kendo_OpenConsole

.....

ERROR 22: [WindowDemo,window1_dragend, around line: 45] kendo(GLOBALMYCLASSVAR) is not supported in BANano!
ERROR 22: [WindowDemo,window1_dragstart, around line: 49] kendo(GLOBALMYCLASSVAR) is not supported in BANano!
ERROR 22: [WindowDemo,window1_error, around line: 53] kendo(GLOBALMYCLASSVAR) is not supported in BANano!
ERROR 22: [WindowDemo,window1_maximize, around line: 57] kendo(GLOBALMYCLASSVAR) is not supported in BANano!
ERROR 22: [WindowDemo,window1_minimize, around line: 61] kendo(GLOBALMYCLASSVAR) is not supported in BANano!
ERROR 22: [WindowDemo,window1_open, around line: 65] kendo(GLOBALMYCLASSVAR) is not supported in BANano!
ERROR 22: [WindowDemo,window1_refresh, around line: 69] kendo(GLOBALMYCLASSVAR) is not supported in BANano!
ERROR 22: [WindowDemo,window1_resize, around line: 73] kendo(GLOBALMYCLASSVAR) is not supported in BANano!
ERROR 22: [WindowDemo,beforeunload, around line: 78] bananokendowindow(GLOBALMYCLASSVAR) is not supported in BANano!
ERROR 22: [WindowDemo,beforeunload, around line: 79] kendo(GLOBALMYCLASSVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 49] kendo(GLOBALMYCLASSVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 51] kendo(GLOBALMYCLASSVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 92] bananokendodatasource(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 94] bananokendodatasource(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 95] bananokendodatasource(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 96] bananokendodatasource(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 97] bananokendodatasource(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 98] bananokendodatasource(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 99] bananokendodatasource(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 100] bananokendodatasource(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 101] bananokendodatasource(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 102] bananokendodatasource(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 103] bananokendodatasource(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 104] bananokendodatasource(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 105] bananokendodatasource(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 106] bananokendodatasource(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 107] bananokendodatasource(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 108] bananokendodatasource(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 110] bananokendodropdownlist(GLOBALMYCLASSVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 111] bananokendodropdownlist(GLOBALMYCLASSVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 113] bananokendodropdownlist(GLOBALMYCLASSVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,bananokendoui_ready, around line: 115] bananokendodropdownlist(GLOBALMYCLASSVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,addbuttontosidebar, around line: 125] bananokendobutton(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,addbuttontosidebar, around line: 127] bananokendobutton(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,addbuttontosidebar, around line: 131] bananokendobutton(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,addbuttontosidebar, around line: 137] bananokendobutton(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,sidebarbutton_click, around line: 145] bananokendobutton(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,sidebarbutton_click, around line: 146] bananokendobutton(METHODVAR) is not supported in BANano!
ERROR 22: [BANanoKendoUIDemo,ddltheme_change, around line: 152] bananokendodropdownlist(GLOBALMYCLASSVAR) is not supported in BANano!
Copying file from Files to WebApp assets: wallpaper.jpg
Copying file from Files to WebApp assets: countries.json
Building C:\Users\836D~1\YANDEX~1\B4X\!9B6C~1\BANano2.34\DEMO2~1\Objects\BANanoKendoUI\index.html
 
Top