1

我在 extlib 对话框的面板中定义了一个文档数据源(称为 document1)。在此面板中,它包含对话框内容和对话框按钮栏。在对话框内容中,包含一个自定义控件,该控件具有所有组件,例如 dojo 编辑框、列表框、单选按钮等。在对话框按钮栏中,它包含一个保存按钮。保存时,我无法通过以下 getComponent document.getDocument.getxxx 从任何组件获取值:

 print (getComponent.getValue("control"));
 print (document1.getDocument(true).getValueInString("control"));
 print (document1.getValue("control"));

有趣的是知道 document1.sertValue("control", newvalue) 和 document1.getDocument(true).isNewNote() 都在工作。

对话框从重复中的视图列打开。所有数据都正确显示在对话框中。我可以保存修改后的数据,检索它们并毫无问题地显示它们。唯一让我无法获得他们处理价值的东西。

Save 事件处理程序已完全更新,并为面板设置了部分执行模式

面板忽略其参数并将范围设置为请求但没有运气。

非常感谢您的帮助。提前致谢。

4

1 回答 1

1

您需要考虑和/或检查许多事项:

  • 确保您确实掌握了该控件。由于它位于自定义控件中,因此您可以轻松拥有多个控件。在这种情况下,您要么需要自己的功能getComponentChild(parentName,controlName) or (IMHO better) you read it from the compositeData of the customControl (which is a MAP)
  • when you bind a control, it is esier to go after its binding than to use getValue(). So when you bind to document.subject, look for that value (or viewScope.someValue if you bound it to the viewScope)
  • if validation fails in the submission or you query at an earlier phase, you can't use getValue() but need to use getSubmittedValue()因为它包含验证发生之前的原始值

让我们知道怎么回事

于 2013-01-03T15:56:53.790 回答