my first abmcustomcomponent
It runs well in pages, but can't be added to a modalsheet, how to update it? thanks!!
mutilte upload:
' Class module
Sub Class_Globals
Dim ABM As ABMaterial ' ignore
Dim ABMComp As ABMCustomComponent
Private Page As ABMPage
Public compid As String
Private mMultiple As String
Private autosumit 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,auto As String,Multiple As String)
Page = InternalPage
ABMComp.Initialize("ABMComp", Me, InternalPage, ID,"")
'InternalPage.InjectCSS(style.BuildStyleClasses)
compid = ID.tolowercase
autosumit=auto.ToLowerCase
mMultiple = Multiple.ToLowerCase
End Sub
'
'build the component
Sub ABMComp_Build(InternalPage As ABMPage, internalID As String) As String
Return $"<div id="${internalID}"></div>"$
End Sub
Sub ABMComp_FirstRun(InternalPage As ABMPage, internalID As String)
Log(internalID)
Page = InternalPage
Dim js As String = $"$("#${internalID}").uploadFile({
url:"abmuploadhandler",
fileName:"upl",
multiple:${mMultiple},
dragDrop:true,
autoSubmit:${autosumit},
onLoad:function(obj){
},
onSuccess:function(files,data,xhr,pd){
},
afterUploadAll:function(obj){
console.log("========================:");
b4j_raiseEvent('${internalID}_allcompleted', {'value':'completed!'});
},
});
"$
Page.ws.Eval(js,Array As String(ABMComp.id))
Page.ws.flush
End Sub
Sub ABMComp_Refresh(InternalPage As ABMPage, internalID As String)
End Sub
Sub ABMComp_CleanUp(InternalPage As ABMPage, internalID As String)
End Sub
Sub Upload
Dim script As String = $"$(#${compid}.startUpload"$
Page.ws.Eval(script, Array As String(compid))
Page.ws.flush
End Sub
It runs well in pages, but can't be added to a modalsheet, how to update it? thanks!!