B4J Tutorial [ABMaterial] Showcase (one to many table relation)

TripInspect_inspects.png
This example shows a Master (Vehicle ID) - detail (Group ID) - detail (Item id)
The fixed footer controls the Master grid (VEHICLE). Each detail is based on the Master - when the BuildPage is called (Inited - sets each to the first item in each table).

After that, select any item in any grid and the on_click event for that grid will detect the row, get the id(s) and populate each following grid with associated data.

Currently, I have an issue with the "ADD" button in Group and Item grids when adding object to the grid footer - "id not found".

Where as all other side menu items use the same page - I created a new page to handle this unique requirement. Hey - 8 sub menus and only 2 pages... bonus!!!

The intent is to be able to add (or modify) a group, then add (or modify) detail items for this new (or existing) group. Each fleet of trucks (or trailers) is different - let the user define their specifics.


More detail later as I (and consulting alwaysbusy) nail this down...
 
Last edited:

Harris

Expert
Licensed User
Longtime User
@alwaysbusy has updated version 1.05 (b) to correct situation defined above.

You can now add buttons (objects) to grid footers as well as page footers without issue.

B4X:
    Dim dtladdbtn  As ABMButton
    dtladdbtn.InitializeFlat( page,"footer1","mdi-content-add-circle","LEFT","Detail","amber")
    tbldetl.SetFooter(  dtladdbtn ,  12,"bg")

We, as recipients of these great framework, are tasked with discovering what the issues are - and reporting them in ABMFeedback.
Look how far we have progressed in the past two weeks. It just advances, gets simpler and more robust.

Thanks
 

alienhunter

Active Member
Licensed User
Longtime User
Very nice
just wondering how you added the truck icon or car icon , since we can only use only the icons available
thanks AH
 

Harris

Expert
Licensed User
Longtime User
B4X:
    Dim btntruck As ABMButton
    btntruck.InitializeFlat( page , "btntruck", "mdi-maps-local-shipping", "LEFT", "Trucks","amber")
    page.Cell(1,1).AddComponent(btntruck)
   
    Dim btntrailer As ABMButton
    btntrailer.InitializeFlat( page , "btntrailer", "mdi-editor-format-strikethrough", "LEFT", "Trailers","amber")
    page.Cell(1,2).AddComponent(btntrailer)

    Dim btnother As ABMButton
    btnother.InitializeFlat( page , "btnother", "mdi-maps-directions-car", "LEFT", "Other","amber")
    page.Cell(1,3).AddComponent(btnother)

mdi-maps-local-shipping is the truck icon
mdi-maps-directions-car is the car icon.

Both are in the Mdi Icon suite.
 

alienhunter

Active Member
Licensed User
Longtime User
B4X:
    Dim btntruck As ABMButton
    btntruck.InitializeFlat( page , "btntruck", "mdi-maps-local-shipping", "LEFT", "Trucks","amber")
    page.Cell(1,1).AddComponent(btntruck)
  
    Dim btntrailer As ABMButton
    btntrailer.InitializeFlat( page , "btntrailer", "mdi-editor-format-strikethrough", "LEFT", "Trailers","amber")
    page.Cell(1,2).AddComponent(btntrailer)

    Dim btnother As ABMButton
    btnother.InitializeFlat( page , "btnother", "mdi-maps-directions-car", "LEFT", "Other","amber")
    page.Cell(1,3).AddComponent(btnother)

mdi-maps-local-shipping is the truck icon
mdi-maps-directions-car is the car icon.

Both are in the Mdi Icon suite.


thank you
I might missed them scrolling thru the demo icons
 
Top