dev@javaserverfaces.java.net

Re: [UIViewRoot] repeating code

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Wed, 26 Mar 2008 09:21:05 -0700

That'd be fine.

Please ensure you have filed a JCA [1] so that we can commit the patch.

[1]
http://wiki.glassfish.java.net/Wiki.jsp?page=JavaServerFacesRI#section-JavaServerFacesRI-HowCanIContribute

Matthias Wessendorf wrote:
> Hi,
>
> in these four methods:
> -processDecodes()
> -processValidatiors()
> -processUpdates()
> -processApplication()
>
>
> we see always these lines of code:
> ...
> if (context.getRenderResponse() || context.getResponseComplete()) {
> if (events != null) {
> for (List<FacesEvent> eventList : events) {
> if (eventList != null) {
> eventList.clear();
> }
> }
> events = null;
> }
> }
> ...
>
> Would you mind to refactor that to some thing like "private void
> clearFacesEvents(FacesContext context);" ?
>
> If you "agree" on the name, I could come up with a patch. I think this
> can be targeted for JSF 1.2 AND 2.0
>
> Thanks,
> Matthias
>
>