1. [CHANGE] ABM.MakeRESTApiCall now returns a RESTAPIResult instead of just the Body as String. It contains a statusCode, the Body and and 'extra' field not currently in use but may get some functionality in the future.
2. [NEW] ABM.randomId22 generates a random string with length 22. Some method we needed specificaly for a client API
3. [CHANGE] the 'fa fa-database'icon is now loaded by default and does not be needed to be loaded manually with page.NeedsIcons.Add().
4. [NEW] some methods to encode/decode urls:
ABM.EncodeURL(String input): uses the Java URLEncoder method
ABM.DecodeURL(String input): uses the URLDecoder method
ABM.escape(String input): escapes some common characters, like \n, \t, ... -> \\n, \\t, ...
ABM.unescape(String input): unescapes some common characters, like \\n, \\t, ... -> \n, \t, ...
5 [CHANGE]: the components now expose the EventHandler
This can be used so e.g. a container that is in a class can handle events within the class instead of where the class is defined. Needs his own ParseEvent method then in this class.
' container in some B4J class
...
cont.EventHandler = Me
...
' his own ParseEvent method to redirect the events to the correct methods within this class
public Sub ParseEvent(params As Map)
Dim eventName As String = params.Get("eventname")
Dim eventParams() As String = Regex.Split(",",params.Get("eventparams"))
If eventName.ToLowerCase.StartsWith(Name.ToLowerCase) Then
eventName = eventName.SubString(Name.Length)
End If
If SubExists(Me, eventName) Then
params.Remove("eventname")
params.Remove("eventparams")
Select Case params.Size
Case 0
CallSub(Me, eventName)
Case 1
CallSub2(Me, eventName, params.Get(eventParams(0)))
Case 2
If params.get(eventParams(0)) = "abmistable" Then
Dim PassedTables As List = ABM.ProcessTablesFromTargetName(params.get(eventParams(1)))
CallSub2(Me, eventName, PassedTables)
Else
CallSub3(Me, eventName, params.Get(eventParams(0)), params.Get(eventParams(1)))
End If
Case Else
' cannot be called directly, to many param
CallSub2(Me, eventName, params)
End Select
End If
End Sub
6. [NEW] page.ClearAllEventHandlers
Used together with point 5. If the page expires for some reason, the EventHandlers are all cleared so you can reinitialize them.
e.g.
Sub Page_Expired()
Log(ABMPageId & " was expired! Reloading")
page.ClearAllEventHandlers
If page.ws.Open Then
ABMShared.NavigateToPage(ws, ABMPageId, "../", False)
page.ws.Close
End If
End Sub
7. [NEW] ABMReportBlock.SetColumnRaw2(int index): marks a column as RAW HTML without setting the actual RAW HTML (this is what ABMReportBlock.SetColumnRaw does). Was needed for a very specific case in a report we made for a client.
8. [FIX] ABMSvgSurface: when removed, the internal JavaScript was not cleaned up.