' Class module
Sub Class_Globals
Dim ABM As ABMaterial 'ignore
Dim ABMComp As ABMCustomComponent
Dim mSrc As String
Dim mWidth As String
Dim mHeight As String
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize(InternalPage As ABMPage, ID As String, Src As String, Width As String, height As String)
mSrc = Src
mWidth = Width
mHeight = height
Dim CSS As String = $""$
ABMComp.Initialize("ABMComp", Me, InternalPage, ID, CSS)
End Sub
' runs when an object is created for the first time. Expects a valid html string
' will get surrounded by a div automatically
Sub ABMComp_Build(InternalPage As ABMPage, internalID As String) As String
Dim varID As String = internalID.Replace("-", "_")
Return $"<iframe id="${varID}" src="${mSrc}" width="${mWidth}" height="${mHeight}" frameborder="0"></iframe>"$
End Sub
' Is useful to run some initalisation script.
Sub ABMComp_FirstRun(InternalPage As ABMPage, internalID As String)
Dim varID As String = internalID.Replace("-", "_")
'Dim script As String = $""$
'InternalPage.ws.Eval(script, Array As Object(ABMComp.ID))
'flush not needed, it's done in the refresh method in the lib
End Sub
' runs when a refresh is called
Sub ABMComp_Refresh(InternalPage As ABMPage, internalID As String)
Dim varID As String = internalID.Replace("-", "_")
End Sub
' do the stuff needed when the object is removed
Sub ABMComp_CleanUp(InternalPage As ABMPage, internalID As String)
Dim varID As String = internalID.Replace("-", "_")
End Sub