On 1/14/2010 10:28 AM, Blake Sullivan wrote:
By default, any server event triggered by a component will ppr the
components for which it is a partial trigger, so as long as the
ShowDetailItem is already broadcasting a disclosure event, I don't know
why we would need an AutoSubmitEvent as well in order for PPR to work.
We might need these events for some other reason and I think that's what
Pavitra's trying to find out.

I agree.

I also noticed the following comment in the inner class, FormElementRenderer$AutoSubmitEvent,

  /**
   * Dummy class purely to get subforms to recognize that
   * an event has occurred
   */
  static private final class AutoSubmitEvent extends FacesEvent
  {
    ...
  }

Don't really know much about subforms, but would not queue-ing the event cause subforms to not PPR-ed? I doubt it, and I can test this usecase but thought I'd check.

Thanks
Pavitra



-- Blake Sullivan

Pavitra Subramaniam said the following On 1/14/2010 10:24 AM PT:
On 1/14/2010 9:02 AM, Gabrielle Crawford wrote:
Hi Pavitra,

Pavitra Subramaniam wrote:


2. On the server side code in FormElementRenderer (and some of its
sub-classed renderers) we call detectAutoSubmit() method that
explicitly looks for the 'autoSub' event and queues an
AutoSubmitEvent. Since there are typically no listeners registered for
this event, the only reason this is queued is to update partial
targets -
(RequestContext.getCurrentInstance().partialUpdateNotify(component)).
If so, this seems redundant as any value entered in the client-side UI
will get submitted on the server component and a valueChange event
queued anyway


Let's forget about other editable fields on the page, let's say I want
to ppr the value of an outputText or toggle a showDetail based on the
autosubmit, will that work without the server event?

Yes. I have tested ppr-ing an outputText (for e.g., in response to
both a value change and a command) and it works without having to
explicitly queue an AutoSubmitEvent on the server. In the case of a
valueChange, the ValueChangeEvent queued on the server would
automatically add any listeners of a partialTrigger to be redrawn.

I have not tested the showDetail (or other usecases) where an
AutoSubmitEvent is currently queued. A cursory look at the code didn't
look like we needed this event but thought I'll ask experts who might
know more about this.

- Pavitra

Thanks,

Gab

Reply via email to