Package javax.faces.component

Examples of javax.faces.component.UIViewRoot.addPhaseListener()


                List<PhaseListener> listeners = root.getPhaseListeners();
                if (!listeners.contains(pl)) {
                    root.addPhaseListener(pl);
                }
            } else {
                root.addPhaseListener(pl);
            }
        }
    }

    private void checkType(String type) {
View Full Code Here


            // special handling for UIViewRoot since ComponentHandler.isNew()
            // will always return true
            if (parent instanceof UIViewRoot) {
                List<PhaseListener> listeners = root.getPhaseListeners();
                if (!listeners.contains(pl)) {
                    root.addPhaseListener(pl);
                }
            } else {
                root.addPhaseListener(pl);
            }
        }
View Full Code Here

                List<PhaseListener> listeners = root.getPhaseListeners();
                if (!listeners.contains(pl)) {
                    root.addPhaseListener(pl);
                }
            } else {
                root.addPhaseListener(pl);
            }
        }
    }

}
View Full Code Here

            PhaseListenerBean pl1 = new PhaseListenerBean(id);
            PhaseListenerBean pl2 = new PhaseListenerBean(id);
            facesContext.getExternalContext().getRequestMap().put("bean", bean);
            root.setBeforePhaseListener(beforeExpression);
            root.setAfterPhaseListener(afterExpression);
            root.addPhaseListener(pl1);
            root.addPhaseListener(pl2);

            // validate behavior
            callRightLifecycleMethodGivenPhaseId(root, id);
            assertTrue(bean.isBeforePhaseCalled());
View Full Code Here

            PhaseListenerBean pl2 = new PhaseListenerBean(id);
            facesContext.getExternalContext().getRequestMap().put("bean", bean);
            root.setBeforePhaseListener(beforeExpression);
            root.setAfterPhaseListener(afterExpression);
            root.addPhaseListener(pl1);
            root.addPhaseListener(pl2);

            // validate behavior
            callRightLifecycleMethodGivenPhaseId(root, id);
            assertTrue(bean.isBeforePhaseCalled());
            assertTrue(!bean.isAfterPhaseCalled());
View Full Code Here

            pl1 = new PhaseListenerBean(id, true, false);
            pl2 = new PhaseListenerBean(id);
            facesContext.getExternalContext().getRequestMap().put("bean", bean);
            root.setBeforePhaseListener(beforeExpression);
            root.setAfterPhaseListener(afterExpression);
            root.addPhaseListener(pl1);
            root.addPhaseListener(pl2);

            // validate behavior
            callRightLifecycleMethodGivenPhaseId(root, id);
            assertTrue(bean.isBeforePhaseCalled());
View Full Code Here

            pl2 = new PhaseListenerBean(id);
            facesContext.getExternalContext().getRequestMap().put("bean", bean);
            root.setBeforePhaseListener(beforeExpression);
            root.setAfterPhaseListener(afterExpression);
            root.addPhaseListener(pl1);
            root.addPhaseListener(pl2);

            // validate behavior
            callRightLifecycleMethodGivenPhaseId(root, id);
            assertTrue(bean.isBeforePhaseCalled());
            assertTrue(bean.isAfterPhaseCalled());
View Full Code Here

            listener = new BindingPhaseListener(binding, type);
        } catch(Exception ex) {
            throw new JspException(ex.getMessage(),ex);
        }

        root.addPhaseListener(listener);

        return SKIP_BODY;

    }
View Full Code Here

                b = this.binding.getValueExpression(ctx, PhaseListener.class);
            }

            PhaseListener pl = new LazyPhaseListener(this.listenerType, b);

            root.addPhaseListener(pl);
        }
    }
}
View Full Code Here

        catch (Exception ex)
        {
            throw new JspException(ex.getMessage(), ex);
        }

        root.addPhaseListener(listener);

        return SKIP_BODY;

    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.