XPage 富文本组件
是否有机会在没有任何数据源的情况下从富文本组件获取 html 内容(mime)。我想从这样的字段中获取内容。
getComponent("FieldName").value
但这不起作用。
谢谢。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
是否有机会在没有任何数据源的情况下从富文本组件获取 html 内容(mime)。我想从这样的字段中获取内容。
getComponent("FieldName").value
但这不起作用。
谢谢。
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
您可以将控件绑定到作用域变量;例如,#{viewScope.comments}。然后,您可以从范围而不是从组件本身检索提交的值;例如,viewScope.get(“评论”)。
或者,您可以将 dataContext 变量设置为 JS 表达式,例如。然后,您可以将控件绑定到 #{richText.value} 并通过相同的表达式检索它。
当然,您可以定义一个托管 bean 并将控件绑定到它的属性之一。此选项提供了最大的灵活性,但并不像上面其他两个选项那么简单。
You can bind the control to a scoped variable; for example, #{viewScope.comments}. You can then retrieve the submitted value from the scope instead of from the component itself; for example, viewScope.get("comments").
Alternatively, you can set a dataContext variable to a JS expression, e.g. <dataContext var="richText" value="#{javascript:return {value:""};}" />. Then you can bind the control to #{richText.value} and retrieve it via the same expression.
And, of course, you could define a managed bean and bind the control to one of its properties. This option provides the most flexibility, but isn't quite as simple as the other two options above.
我的问题的解决方案是
感谢您的帮助。
The solution for my problem is
thanks for your help.