【问题标题】:Name of the current, active screen in lightswitch html clientlightswitch html客户端中当前活动屏幕的名称
【发布时间】:2016-05-31 09:21:56
【问题描述】:

是否可以在 VS lightswitch html 客户端中确定当前活动屏幕的名称?查看 msls.screen 可以看到 .getName,但无法正常工作?

【问题讨论】:

  • 你试过this.Details.Name吗?
  • @user3603308 我提出的答案是否有助于提供解决方案?

标签: visual-studio-lightswitch lightswitch-2013


【解决方案1】:

在 HTML 客户端中,您可以选择直接在屏幕实例之外使用以下两个属性:

screen.details._modelId
screen.details.displayName

例如,在屏幕的创建事件中,您可以执行以下操作:

myapp.BrowseScreen.created = function (screen) {
    alert("_modelId [" + screen.details._modelId + "] displayName [" + screen.details.displayName + "]");
};

另外,如果需要查询jQuery mobile page id,可以使用如下:

$.mobile.activePage[0].id

【讨论】:

    猜你喜欢
    • 2015-04-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多