如何将文档数据源发送到XPages中的自定义控件? [英] How to send a document data souce to a custom control in XPages?

查看:72
本文介绍了如何将文档数据源发送到XPages中的自定义控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用EL将此计算的文本绑定到主体字段

I have this computed text bound to a the body field using EL

 <xp:text escape="true" id="computedField1" value="#{doc.Body}"></xp:text>

现在我需要将此计算字段存储在自定义控件中并发送文档吗?我应该使用什么属性定义,以及如何在cc

Now I need to store this computedField in a Custom Control and send in the doc? What property definition should I use, and how do I reference the compositeData to the Body field in the cc

谢谢

Thomas

推荐答案

在自定义控件上创建一个名为 dataSource 并将类型设置为 com.ibm.xsp.model.DataSource

Create a custom property on your Custom Control called dataSource and set the type to com.ibm.xsp.model.DataSource

创建另一个名为 computedFieldName 并将其类型设置为 string

Create a second custom property called computedFieldName and set it's type to string

自定义控件中的字段设置值,例如

In the computed field in the custom control set the value like

value =#{compositeData.dataSource [compositeData.computedFieldName]}

使用自定义控件时,只需设置以下自定义属性即可:

When using the custom control just set the custom properties like:

computeFieldName = Body
dataSource =#{doc}

这篇关于如何将文档数据源发送到XPages中的自定义控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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