B4J Question [BANano] [SOLVED] My AutoID are not unique, please help

Mashiane

Expert
Licensed User
Longtime User
Hi

I am loading the same layout with auto-id turned on for all components in the layout.

B4X:
BANano.LoadLayout(swiper1.Slide(1).Here, "swiperslide1")
    BANano.LoadLayout(swiper1.Slide(2).Here, "swiperslide1")
    BANano.LoadLayout(swiper1.Slide(3).Here, "swiperslide1")

I have noted from the generated HTML on the browser development, the assigned ids are the same for "qjzasbce"

1692530410640.png


My layout...

1692530693826.png



What can I be missing?
 
Solution
The layouts which you load multiple times should be loaded with LoadLayoutArray.

B4X:
banano.LoadLayout("#body", "baselayout")
banano.LoadLayoutArray(SHIonBaseElement1.Here, "childlayout", False)
banano.LoadLayoutArray(SHIonBaseElement2.Here, "childlayout", False)
banano.LoadLayoutArray(SHIonBaseElement3.Here, "childlayout", False)
banano.LoadLayoutArray(SHIonBaseElement4.Here, "childlayout", False)

1692856629659.png


Alwaysbusy

alwaysbusy

Expert
Licensed User
Longtime User
The layouts which you load multiple times should be loaded with LoadLayoutArray.

B4X:
banano.LoadLayout("#body", "baselayout")
banano.LoadLayoutArray(SHIonBaseElement1.Here, "childlayout", False)
banano.LoadLayoutArray(SHIonBaseElement2.Here, "childlayout", False)
banano.LoadLayoutArray(SHIonBaseElement3.Here, "childlayout", False)
banano.LoadLayoutArray(SHIonBaseElement4.Here, "childlayout", False)

1692856629659.png


Alwaysbusy
 
Upvote 1
Solution
Top