2024 Nov 29 2:05 PM - edited 2024 Nov 29 2:06 PM
Hi all,
i want to bind a bound function to an control as described here: https://sapui5.hana.ondemand.com/sdk/#/topic/b54f7895b7594c61a83fa7257fa9d13f
we have great examples for unbound functions:
<VBox id="getAvailableItems" binding="{path : '/GetAvailableItems(...)', parameters : {$select : ['ProductName', 'ProductId']}}">
<List id="xyz" items="{value}">
<items>
<ObjectListItem title="{ProductName}" />
</items>
</List>
</VBox>
but for bound functions only the js part is referenced:
var ...
oSalesOrderContext = oTable.getSelectedItem().getBindingContext(),
oAction = oModel.bindContext("name.space.InvoiceCreated(...)", oSalesOrderContext);
oAction.invoke()...
I've been trying to do this directly with a binding in the xml view for some time now, but it doesn't work. Has anyone got it working?
Request clarification before answering.
did you check this?
https://sapui5.hana.ondemand.com/sdk/#/topic/b54f7895b7594c61a83fa7257fa9d13f
the binding path in your xml should be something like this(I haven't tried.),
var oContext = oModel.createBindingContext("/EMPLOYEES('1')/##com.sap.gateway.default.iwbep.tea_busi.v0001.AcSetIsOccupied");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @junwu
eg:
<VBox id="getAvailableItems" binding="{path : '/getHierarchy(...)', parameters : {$select : ['ID', 'Name']}}">
<List id="xyz" items="{value}">
<items>
<ObjectListItem title="{Name}" />
</items>
</List>
</VBox>
add a namespace to the path, remove all parameters, bind only the path, ...
I really only want to do this for a bound function without js code
Hi @junwu
Yes, it works, but the # is wrong. But that's not my question. I already have a context and want to access the bound function from it.
I come from the list report to the object page, where I have my own fragment in which I define my table. Here it should derive the context independently without js coding from me.
User | Count |
---|---|
50 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.