B4J Library [BANanoVueMaterial]: The first complete opensource VueJS UX based framework for BANano

Mashiane

Expert
Licensed User
Longtime User
we are been performing CRUD operation on Single Table,
The purpose of the Mock.Compile.Publish thread is to provide different templates for different scenarios. So your master detail case is coming, when? I'm not really sure. You will appreciate that the important issue here is stability and also ease of use and also maturity of this framework. That is rather important because if I cant use this to create useful apps, it might as well go to a long-drop toilet.

I have also provided the complete source code of this project. You will note that the designer itself is being created with the same framework with its complications and functionalities. What you can do is to post a question and attach your attempt B4J BVM project and component file(s) in trying to do what you want to achieve. We can take it from there.

If you have more questions, PLEASE DO NOT ASK ON THIS THREAD, post a question prefixed by [BANanoVueMaterial], thanks.
 

Mashiane

Expert
Licensed User
Longtime User
Upcoming Updates: Drag n Drop Sparklines



The code is simple as...

B4X:
Dim sparksparkline1 As VMSparkLine
    sparksparkline1.Initialize(vue, "sparksparkline1", Me)
    sparksparkline1.SetValue(Array(0, 2, 5 ,9 ,5 ,10 ,3, 5, 0, 0, 1, 8, 2, 9, 0))
    sparksparkline1.SetGradient(Array("#f72047", "#ffd200", "#1feaea"))
    sparksparkline1.SetSmooth(10)
    sparksparkline1.SetPadding("8")
    sparksparkline1.SetLinewidth("2")
    sparksparkline1.SetStrokeLineCap("round")
    sparksparkline1.SetGradientdirection("top")
    sparksparkline1.SetFill(False)
    sparksparkline1.SetType("trend")
    sparksparkline1.SetAutoLineWidth(False)
    sparksparkline1.SetVisible(True)
    sparksparkline1.SetAutoDraw(True)
    cont.AddControl(sparksparkline1.SparkLine, sparksparkline1.tostring, 1, 1, 0, 0, 0, 0, 12, 12, 12, 12)
 

Mashiane

Expert
Licensed User
Longtime User
Upcoming Updates: Translate a MySQL database table to DataTable & Data Entry Dialog.

This demo shows how one can translate a MySQL database table to a datatable and a dialog for data entry. One can then update the properties of the data table and input controls to meet their requirements and then copy & paste to a B4J project.

 

Mashiane

Expert
Licensed User
Longtime User
Upcoming Updates: Translate a SQLite database table to DataTable & Data Entry Dialog.

This demo shows how one can translate a SQLite database table to a datatable and a dialog for data entry. For this we have used the SQLiteR class with sql.js for read-only access to the table. For crud functionality one will have to use the SQLite class in the BANanoConnect library. If a SQLite file was added via the Files tab, it needs to be copied to the root of the webapp for production.

 

Mashiane

Expert
Licensed User
Longtime User
Upcoming Updates to Core 4.13

5. Template 1

We have added 2 methods here in pgIndex

B4X:
'build the bottom nav bar
Sub BuildBottomNav
    '*copy code after this line
   
End Sub

This is for code to build the bottom navigation bar, and

B4X:
'fire when a button in the bottom nav is clicked
Private Sub bottomnav_change(value As Object)
   
End Sub

To trap changes to the bottom nav button click event. This returns the value from the button you clicked.

To hide the bottom nav bar

B4X:
vm.BottomNav.Hide

And to show it

B4X:
vm.BottomNav.Show



Example code for this example

B4X:
vm.BottomNav.Hide
    vm.BottomNav.SetAbsolute(True)
    vm.BottomNav.SetGrow(True)
    vm.BottomNav.SetHeight("56")
    vm.BottomNav.SetShift(True)
    'add items
    vm.BottomNav.AddButton("btnaz", "Banner", "dashboard", "red", "btnaz", "A business banner", "")
    vm.BottomNav.AddButton("btnbz", "Squirrel", "account_box", "indigo", "btnbz", "Another squirrel", "")
    vm.BottomNav.AddButton("btncz", "Sky", "gavel", "green", "btncz", "Heavens", "")
    vm.BottomNav.AddButton("btndz", "Planet", "question_answer", "purple", "btndz", "Planets of the world", "")
    vm.BottomNav.AddButton("btnez", "Bird", "mdi-account", "yellow", "btnez", "This is a beautiful bird", "")

Ta!
 

Mashiane

Expert
Licensed User
Longtime User
Upcoming Updates - Avatar Menus

For the VMMenu component, one can now add a menu. This can be useful for profile management e.g. upload profile image etc.



B4X:
Dim menu2 As VMMenu = vm.CreateMenu("menu3", Me).SetAvatar("./assets/sponge.png")
    menu2.AddItem("inbox1", "", "mdi-view-dashboard", "Inbox", "","")
    menu2.AddItem("drafs1", "", "mdi-image", "Drafts", "","")
    menu2.AddItem("sent1", "", "mdi-help-box", "Sent", "","")
    menu2.AddToContainer(cont, 2, 1)

Trapping click events

B4X:
Sub menu3items_click(e As BANanoEvent)
    'get the id from the event
    Dim elID As String = vm.GetIDFromEvent(e)
    vm.ShowSnackBar(elID)
End Sub
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…