将自定义字段合并到OSLC组件中 [英] Incorporating Custom Fields into OSLC Components

查看:183
本文介绍了将自定义字段合并到OSLC组件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Maximo Anywhere的OSLC组件的文档中遇到了一个程序性问题.我有一个与已有的Maximo MBO相关的自定义字段,我们如何通过OSLC访问它?每次添加自定义字段时,我都需要重新发布连接器吗?

I've got a procedural question I'm having issue finding in the documentation for the OSLC components of Maximo Anywhere. I have a custom field tied to a preexsisting Maximo MBO, how do we go about accessing it through the OSLC? Do I need to republish the connector every time I add a custom field?

推荐答案

我希望获得更多正确的信息,让我尝试回答,您在maximo中创建了一个自定义字段,并且您想在任何地方使用maximo的该字段,

I would appreciate more correct info, let me try to answer, you created a custom field in maximo and you like to use that field part of maximo anywhere , ?

关注此
将字段添加到移动应用程序
您添加到移动应用程序中的字段由OSLC资源RDF定义.在将字段添加到移动应用程序时,需要在应用程序定义文件中为该字段指定OSLC资源作为资源属性.

follow this
Adding fields to mobile apps
The fields that you add to mobile apps are defined by OSLC resource RDFs. When you add fields to mobile apps, you specify the OSLC resource for the field as a resource attribute in the application definition file.

关于此任务
要添加到移动应用程序中的字段的Maximo®Asset Management中必须存在OSLC资源.您可以将现有的OSLC资源用于要添加的字段.您还可以通过在Maximo Asset Management中为该字段创建资源并将资源RDF导入Maximo Anywhere中来创建字段.

About this task
The OSLC resource must exist in Maximo® Asset Management for the field that you are adding to the mobile app. You can use an existing OSLC resource for the field that you are adding. You can also create a field by creating the resource for the field in Maximo Asset Management and importing the resource RDF into Maximo Anywhere.

将字段添加到应用程序视图时,必须首先在应用程序定义文件的数据"部分中为该字段定义资源.然后,您将资源添加到UI部分的视图中,以便该字段显示在应用程序上.

When you add a field to an app view, you must first define the resource for the field in the Data section of the application definition file. You then add the resource to the view in the UI section so that the field is shown on the app.

如果您翻译移动应用程序,请为每种支持的语言更新artifact.js文件,以包括字段名称.每种语言的artifact.js文件位于MaximoAnywhere \ apps \ app_name \ common \ js \ application \ translation目录中.

If you translate the mobile app, update the artifact.js file for each supported language to include the name of the field. The artifact.js files for each language are in the MaximoAnywhere\apps\app_name\common\js\application\translation directory.

程序
在MobileFirst Studio中,转到MaximoAnywhere \ apps \ app_name \ artifact目录,然后使用XML编辑器打开app.xml文件. 在数据"部分中,将属性添加到要将字段添加到的资源.
在设计"选项卡上,找到要将字段添加到的<resource>元素.
在源"选项卡上,将包含形状文档详细信息的属性添加到<resource>元素.
例如,要将名为Risk的字段添加到Work Execution应用程序的Work Order Details视图中,请将Risk属性的详细信息添加到名为workOrder的资源中:

Procedure
In MobileFirst Studio, go to the MaximoAnywhere\apps\app_name\artifact directory and open the app.xml file with the XML editor. In the Data section, add the attribute to the resource that you want to add the field to.
On the Design tab, find the <resource> element that you want to add the field to.
On the Source tab, add the attribute that includes the shape document details to the <resource> element.
For example, to add a field named Risk to the Work Order Details view in the Work Execution app, add the details of the risk attribute to the resource named workOrder:

<resource providedBy="/oslc/sp/WorkManagement"
        describedBy="http://jazz.net/ns/ism/work/smarter_physical_infrastructure#WorkOrder"
        name="workOrder" pageSize="200" class="application.business.WorkOrderObject>
<attributes>
    <.....>
    <attribute name="risk" describedByProperty="spi_wm:risk" index="false" />

在"UI"部分中,将资源属​​性添加到要向其添加字段的视图.
在设计"选项卡上,找到要更新的<view>元素. 在源"选项卡上,将资源属​​性添加到要更新的视图内的元素.
例如,将风险"字段的资源属性添加到工作订单明细"视图:

In the UI section, add the resource attribute to the view that you want to add the field to.
On the Design tab, find the <view> element that you want to update. On the Source tab, add the resource attribute to the element within the view you are updating.
For example, add the resource attribute for the Risk field to the view for Work Order Details:

<view id="WorkExecution.WorkDetailView" label="Work Order Details">
...
<groupitem transitionTo="WorkExecution.DescriptionView">
    <text resourceAttribute="description" label="Description" 
        editable="true" placeHolder="Tap to enter" />
</groupitem>
<groupitem>
    <text resourceAttribute="risk" label="Risk" 
        editable="true" placeHolder="Tap to enter" />
</groupitem>

可选:通过将true的值添加到editable属性并添加tap的值以输入到占位符属性,使字段可编辑.占位符属性指示该字段是可编辑的,并且您可以在该字段中输入任何值.要将字段更改为只读,请将editable属性的值更改为false并删除占位符属性.
保存您的更改.该应用程序是自动构建的.
可选:要在移动模拟器中预览更改,请右键单击应用程序文件夹,然后选择运行方式">预览".
下一步做什么

Optional: Make the field editable by adding the value of true to the editable attribute and adding the value of tap to enter to the placeholder attribute. The placeholder attribute indicates that the field is editable and that you can enter any value in the field. To change the field to read only, change the value of the editable attribute to false and delete the placeholder attribute.
Save your changes. The application is built automatically.
Optional: To preview your changes in a mobile simulator, right-click on the application folder and select Run As > Preview.
What to do next

这篇关于将自定义字段合并到OSLC组件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆