我正在使用值帮助对话框,但它不适用于触摸屏。我无法选择任何价值。这是我的controller.js:
onValueHelpStorageBinDest : function(oEvent) {
var that = this;
that.theTokenInput = this.getView().byId("DestinationStorageBinInput");
this.theTokenInput.setEnableMultiLineMode(sap.ui.Device.system.phone);`
var oValueHelpDialog = new sap.ui.comp.valuehelpdialog.ValueHelpDialog({
// basicSearchText: this.theTokenInput.getValue(),
title : "{i18n>SelectStorageBin}",
supportMultiselect : true,
supportRanges : false,
supportRangesOnly : false,
// key: this.aKeys[1],
// descriptionKey: this.aKeys[1],
stretch : sap.ui.Device.system.phone,
ok : function(oControlEvent) {
// that.aTokens = oControlEvent.getParameter("tokens");
// that.theTokenInput.setTokens(that.aTokens);
that.getView().byId("DestinationStorageBinInput").setValue();
var oCore = sap.ui.getCore();
var oDestinationStorageBin = oCore
.byId("DestinationStorageBinInput");
var oHelpTable = oValueHelpDialog.getTable();
var oContext = oHelpTable.getContextByIndex(oHelpTable.getSelectedIndex());
if (oContext) {
var oSel = oContext.getModel().getProperty(
oContext.getPath());
var token2 = new sap.m.Token({
key : oSel.Lgpla,
text : oSel.Lgpla
});
var oDestinationStorageBin = oSel.Lgpla;
that.aTokens[1] = [ token2 ];
that.theTokenInput.setTokens(that.aTokens[1]);
当我使用普通鼠标选择一条线时,它可以工作,我可以选择一条线。可能是什么原因? 我检查了这个plunker并且行前面有复选框,但是我没有得到它们。 任何帮助表示赞赏。 添