WebContainers Management

  1. last week

    Roger S

    Jul 8 Gaspé, Québec, Canada
    Edited last week

    Hi, I am building a web app prototype that requires embedding webcontainers chosen from a pool of webcontainers created with the layout editor. I add them to an array and then embed them all in the same container. In the prototype, I have 4 models that I can choose from.

    I actually add them using the following method :

    Dim NewControl As WebControl
    
    Select Case item_id
    Case "certification_1" //Model 1
      NewControl = New Certification_1
    Case "qcr_1" //Model 2
      NewControl = New qcr_1
    Case "general_records_1" //Model 3
      NewControl = New general_records_1
    Case "gelcoat_traceability_1"//Model4
      NewControl = New gelcoar_traceability_1
      
    End Select
    
    Items_List.Append( NewControl )

    I considered using "Introspection" but since I would have to loop all the webcontrols within the app to find the right one (by name for example). By experience, iterating through app companents is very slow.

    Is there any way to group the container controls I create and then choose the only the one I need without the need of hard coding each model?

    Thanks!

or Sign Up to reply!