Skip to Content
0

ValueHelpDialog update method doesn't select rows

Apr 03 at 06:16 AM

19

avatar image

Hello,

I'm using a value help dialog with 2 columns Id and Description.

Below, the code :

onValueHelpRequest: function(oEvent){
	var oTokenInput = this.getView().byId(oEvent.getSource().getId());
	var oVHD = new ValueHelpDialog({
		title: sTitle,
		modal: true,
		supportMultiselect: true,
		supportRanges: false,
		supportRangesOnly: false,
		key: "Id",
		descriptionKey: "Description",
		ok: function(oOkEvent){
			oTokenInput.setTokens(oOkEvent.getParameter("tokens"));
			oVHD.close();
		},
		cancel: function(){
			oVHD.close();
		},
		afterClose: function(){
			oVHD.destroy();
		}
	});

	var precTokens = oTokenInput.getTokens();
	oVHD.setTokens(precTokens);
	

	var aCols = [
		{label: "Id", template: "Id"},
		{label: "Description", template: "Description"}
	];
	var oColModel = new sap.ui.model.json.JSONModel();
	oColModel.setData({cols: aCols});
	oVHD.getTable().setModel(oColModel, "columns"); 


	oVHD.getTable().setModel(this.getView().getModel("sh"));	
	oVHD.getTable().bindRows("/POSet");
	oVHD.open();
	oVHD.update();	
}

It opens the ValueHelpDialog, table has data, I can select rows, and when I press Ok, tokens are added in MultiInput field.

BUT when I open, secondly, the ValueHelpDialog, token from MultiInput field are set in Input at the bottom of the pop-up BUT rows are not selected.

Do I make something wrong ? Do you know how to select these rows ?

Thanks in advance for your answer.

Léa.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers