如何通过执行功能修改contentItem标签. [英] How to modify a contentItem Label from execute function.
问题描述
你好.我试图找出如何通过自定义execute方法在HTML客户端屏幕中修改contentItem的标签.
Hello. I am trying to figure out how to modify the label of a contentItem in my HTML Client screen from a custom execute method.
我只能访问屏幕对象,并且正在这里查看文档:http://msdn.microsoft.com/zh-cn/library/jj733572.aspx#requiredfield
I only have access to the screen object, and I was looking through the documentation here: http://msdn.microsoft.com/en-us/library/jj733572.aspx#requiredfield
,它具有以下代码:
and it has this code:
$(element).parent().find("label")[0].innerHTML += " *"
问题是,我只能从执行功能访问屏幕对象,而无法弄清楚如何访问该元素以修改html.有人知道该怎么做吗?
The problem is, that from the execute function I only have access to the screen object, and I can't figure out how to get access to the element to modify the html. Does anyone know how to do this?
这是我正在使用的功能:
Here is the function that I am working with:
myapp.AddEditJobData.ShowSetup_execute = function (screen) {
$.ajax({
url: "/ApplicationData.svc/PressSettingsSet?$filter=Id eq "+ PressSettingID,
dataType: 'json',
success: function (json) {
screen.details.rootContentItem.findItem("Temperature1")
//Need to set Temperature1's Label to value from json.. How to access element?
} }); }
} }); }
推荐答案
您可以使用screen.findContentItem.以下是使用dataBind进行操作的一些代码: HTH,
这篇关于如何通过执行功能修改contentItem标签.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!