I would like pass to my formatter function a string params that i write in xml code:
Something like this:
visible="{path: 'this_is_my_custo_param_01_02_03', formatter: 'ui5bp.Formatter.myFunction'}"
This is the dual Question of Use custom global function in Expression Binding
In myFunction(sVal) -> sVal will be holding your string which you have passed in your XML view for path
Custom Formatter
That is not supported. Formatter functions are only called, when a actual binding to a Model is updated.
Also you cannot pass additional literal values to the formatter function.
Typically this dynamic configuration is performed in
Controller.onInit()
. Either by accessing specific controls by id or by creating a separate viewmodel that you bind the properties to in the XMLView.You can create a custom formatter function for each parameter value and let them call your function with the parameter.
Perhaps that is applicable in your case? If not please tell us more about your intentions.