Using the simplest form of cross-component rendering, one component, referred to as the target component, is rerendered when any event occurs on another component, referred to as the trigger component.
Trigger components must inform the framework that a PPR request has occurred. On command components, this is achieved by setting the partialSubmit attribute to true. Doing this causes the command component to fire a partial page request each time it is clicked.
For example, say a page includes an inputText component, a commandButton component, and an outputText component. When the user enters a value for the inputText component, and then clicks the commandButton component, the input value is reflected in the outputText component. You would set the partialSubmit attribute to true on the commandButton component.
However, components other than command components can trigger PPR. ADF Faces input and select components have the ability to trigger partial page requests automatically whenever their values change. To make use of this functionality, use the autoSubmit attribute of the input or select component so that as soon as a value is entered, a submit occurs, which in turn causes a valueChangeEvent event to occur. It is this event that notifies the framework to execute a PPR, as long as a target component is set. In the previous example, you could delete the commandButton component and instead set the inputText component's autoSubmit attribute to true. Each time the value changes, a PPR request will be fired.
如果在POPUP里的BUTTON不用partialSubmit的话,POPUP里的inputtext的validator无法显示出error message,且inputext 的初始值不会去更新
partialTrigger是触发器,比如把buttion的id设为panalbox的partialTrigger值,点button会触发panalbox的值改变
本文探讨了组件之间的简单交叉渲染技术,介绍如何通过触发组件(如按钮)触发目标组件重新渲染。讨论了partialSubmit属性的作用及如何利用autoSubmit实现输入框值变化时自动提交并触发页面部分刷新。
7万+

被折叠的 条评论
为什么被折叠?



