B4J Question [BANanoVuetifyAD3] VExpansionPanels additem

sdleidel

Active Member
Licensed User
Longtime User
Hi,
i use the newest Kitchensink.
you say, that this ist posible in "Sub mounted":



Error:
    VExpansionPanels1.AddItem("Panel 1")
    VExpansionPanels1.AddItem("Panel 2")
    VExpansionPanels1.AddItem("Panel 3")
    '
    'load panel contents
    banano.LoadLayout(VExpansionPanels1.Content("1"), "mypanel1")
    
    'add the component as a router
    vuetify.AddRoute(about)
End Sub

Sub beforeEnter(boTo As Map, boFrom As Map, boNext As BANanoObject)   'ignoreDeadCode
    vuetify.Loading(True)
    'the page we are going to
    'vuetify.SaveRoute(boTo, False)
    'check authentication
    'If vuetify.Authenticated = False Then
    'user is not authenticated, go to login page
    '    vuetify.NavigateToNext(boNext, "login")
    '    Return
    'End If
    'continue navigation
    vuetify.NavigateToNext(boNext, "")
    vuetify.SetBrowserTitle(boTo)
End Sub

Sub mounted
    'hide the loader
    vuetify.Loading(False)
    Log ("Pannel4")
    VExpansionPanels1.AddItem("Panel 4")
End Sub
The Error is:


html:
■[VueComponent: 3740] TypeError: Cannot read properties of null (reading 'constructor')
    at _B.bindstateall (bananovuetifyad3.js:234995:12)
    at _B.addroute (bananovuetifyad3.js:285741:7)
    at _B.initialize (app1657098347642.js:6950:13)
    at banano_bvad3kitchensink_pgindex.addpages (app1657098347642.js:22997:5)
    at banano_bvad3kitchensink_pgindex.init (app1657098347642.js:22296:4)
    at banano_bvad3kitchensink.banano_ready (app1657098347642.js:29161:3
 

Mashiane

Expert
Licensed User
Longtime User
This should be possible with the next maintenance release, but the approach might be different.

What has been done so long:

1. Add possibility to hide / show panels at run-time.
2. Add possibility to change titles of panels at run-time.

Still running tests, and will provide guidance soon.

Its not a quick win, unfortunately, please be patient.
 
Upvote 0

sdleidel

Active Member
Licensed User
Longtime User
This should be possible with the next maintenance release, but the approach might be different.

What has been done so long:

1. Add possibility to hide / show panels at run-time.
2. Add possibility to change titles of panels at run-time.

Still running tests, and will provide guidance soon.

Its not a quick win, unfortunately, please be patient.
Have you any Updates for this ?
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
What I would suggest is that if you have an idea of how many panels you might need.

1. Add these during Initialize with AddItem and in each load the content you need.
2. Hide /Show the ones you dont want to see with UpdateItemVisible
3. If you need to change the titles use, UpdateItemTitle

If the contents of the panels will be the same, what you can do is then design the panels with the abstract designer and then use the "v-for" loop.
 
Upvote 0
Top