为什么从 panelCollection 内部调用的提交不提交页面其余部分的数据更改
Why submit called from inside of panelCollection doesn't submit data changes from the rest of page
我的应用程序是使用 Oracle ADF 11gR1 (JDeveloper 11.1.1.7.0) 构建的,我对放置在 panelCollection 中的 commandLink 提交的数据有疑问。
我有以下页面片段结构:
<af:panelAccordion id="pa1">
<af:showDetailItem id="sdi1">
<af:panelFormLayout id="panelFormLayout1">
<af:inputText value="#{bindings.C11.inputValue}" id="it34" />
<af:inputText value="#{bindings.N04.inputValue}" id="it32" />
<af:selectOneChoice value="#{bindings.N13.inputValue}" id="soc4" autoSubmit="true" >
<f:selectItems value="#{bindings.N13.items}" id="si4"/>
</af:selectOneChoice>
...
</af:panelFormLayout>
<af:showDetailItem>
...
<af:showDetailItem id="sdi4">
<af:panelCollection id="pc2">
<af:table value="#{bindings.Table.collectionModel}"
var="row" rows="#{bindings.Table.rangeSize}"
filterModel="#{bindings.Table.queryDescriptor}"
queryListener="#{bindings.Table.processQuery}"
varStatus="vs"
selectedRowKeys="#{bindings.Table.collectionModel.selectedRow}"
selectionListener="#{bindings.Table.collectionModel.makeCurrent}"
rowSelection="single" id="t2">
<af:column id="c19">
<af:commandLink id="cl1" textAndAccessKey="#{row.bindings.C0.attributeValue}" actionListener="#{pageFlowScope.Bean.handle}"/>
</af:column>
<af:column id="c17">
<af:inputText value="#{row.bindings.C1.inputValue}" id="it17" />
</af:column>
<af:column id="c16">
<af:inputText value="#{row.bindings.C2.inputValue}" id="it42" />
</af:column>
...
</af:table>
</af:panelCollection>
</af:showDetailItem>
</af:panelAccordion>
CommandLink (id="cl1") 位于 table 列 c19 已定义 actionListener。此方法基于 table 中所选行和上面 panelFormLayout 的控件中给出的数据执行操作。
按下 commandLink 并触发 actionListener 方法时,我看到(在结果和调试中)未提交来自 panelFormLayout 的数据更改,除了具有 autosubmit 的数据设置为真。但是,如果我将相同的 commandLink 放在 panelCollection 之外,所有数据都会被提交。
我的问题是,当从内部的 panelCollection 触发 actionListener 时,如何强制提交整个 pageFragment 的数据?
在 panelCollection 之外的所有控件上自动提交似乎不是一个好的解决方案,因为有许多不必要的 POST 请求。
或许尝试将面板集合放入子表单中?
此行为的原因是优化了用于某些组件(包括 table 和 panelAccordion)的生命周期。他的意思是值只在组件的边界内提交。在您的情况下,这意味着仅提交了 showDetailItem。
如果 link 作为表单的部分触发器,您必须设置 id 才能提交表单。
可以在第 17 课 http://de.slideshare.net/mobile/stevendavelaar/18-invaluable-lessons-about-adfjsf-interaction 的演示文稿中找到详细说明
我的应用程序是使用 Oracle ADF 11gR1 (JDeveloper 11.1.1.7.0) 构建的,我对放置在 panelCollection 中的 commandLink 提交的数据有疑问。 我有以下页面片段结构:
<af:panelAccordion id="pa1">
<af:showDetailItem id="sdi1">
<af:panelFormLayout id="panelFormLayout1">
<af:inputText value="#{bindings.C11.inputValue}" id="it34" />
<af:inputText value="#{bindings.N04.inputValue}" id="it32" />
<af:selectOneChoice value="#{bindings.N13.inputValue}" id="soc4" autoSubmit="true" >
<f:selectItems value="#{bindings.N13.items}" id="si4"/>
</af:selectOneChoice>
...
</af:panelFormLayout>
<af:showDetailItem>
...
<af:showDetailItem id="sdi4">
<af:panelCollection id="pc2">
<af:table value="#{bindings.Table.collectionModel}"
var="row" rows="#{bindings.Table.rangeSize}"
filterModel="#{bindings.Table.queryDescriptor}"
queryListener="#{bindings.Table.processQuery}"
varStatus="vs"
selectedRowKeys="#{bindings.Table.collectionModel.selectedRow}"
selectionListener="#{bindings.Table.collectionModel.makeCurrent}"
rowSelection="single" id="t2">
<af:column id="c19">
<af:commandLink id="cl1" textAndAccessKey="#{row.bindings.C0.attributeValue}" actionListener="#{pageFlowScope.Bean.handle}"/>
</af:column>
<af:column id="c17">
<af:inputText value="#{row.bindings.C1.inputValue}" id="it17" />
</af:column>
<af:column id="c16">
<af:inputText value="#{row.bindings.C2.inputValue}" id="it42" />
</af:column>
...
</af:table>
</af:panelCollection>
</af:showDetailItem>
</af:panelAccordion>
CommandLink (id="cl1") 位于 table 列 c19 已定义 actionListener。此方法基于 table 中所选行和上面 panelFormLayout 的控件中给出的数据执行操作。
按下 commandLink 并触发 actionListener 方法时,我看到(在结果和调试中)未提交来自 panelFormLayout 的数据更改,除了具有 autosubmit 的数据设置为真。但是,如果我将相同的 commandLink 放在 panelCollection 之外,所有数据都会被提交。
我的问题是,当从内部的 panelCollection 触发 actionListener 时,如何强制提交整个 pageFragment 的数据?
在 panelCollection 之外的所有控件上自动提交似乎不是一个好的解决方案,因为有许多不必要的 POST 请求。
或许尝试将面板集合放入子表单中?
此行为的原因是优化了用于某些组件(包括 table 和 panelAccordion)的生命周期。他的意思是值只在组件的边界内提交。在您的情况下,这意味着仅提交了 showDetailItem。
如果 link 作为表单的部分触发器,您必须设置 id 才能提交表单。
可以在第 17 课 http://de.slideshare.net/mobile/stevendavelaar/18-invaluable-lessons-about-adfjsf-interaction 的演示文稿中找到详细说明