You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/09/12 21:25:50 UTC
svn commit: r1169885 [2/2] - in /myfaces/core/branches/2.0.x:
api/src/main/java/javax/faces/component/ api/src/main/java/javax/faces/event/
api/src/main/java/javax/faces/validator/
impl/src/main/java/org/apache/myfaces/application/ impl/src/main/java/o...
Added: myfaces/core/branches/2.0.x/impl/src/test/java/org/apache/myfaces/view/facelets/ExceptionTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/test/java/org/apache/myfaces/view/facelets/ExceptionTestCase.java?rev=1169885&view=auto
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/test/java/org/apache/myfaces/view/facelets/ExceptionTestCase.java (added)
+++ myfaces/core/branches/2.0.x/impl/src/test/java/org/apache/myfaces/view/facelets/ExceptionTestCase.java Mon Sep 12 19:25:49 2011
@@ -0,0 +1,509 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.view.facelets;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.faces.FacesException;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.ContextCallback;
+import javax.faces.component.UICommand;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ExceptionQueuedEvent;
+import javax.faces.event.ExceptionQueuedEventContext;
+import javax.faces.event.PhaseId;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+
+import org.apache.myfaces.config.RuntimeConfig;
+import org.apache.myfaces.shared.context.ExceptionHandlerImpl;
+import org.apache.myfaces.test.mock.MockExternalContext;
+import org.easymock.classextension.EasyMock;
+import org.junit.Test;
+import org.testng.Assert;
+
+public class ExceptionTestCase extends FaceletTestCase
+{
+ @Override
+ protected void setUpExternalContext() throws Exception
+ {
+ externalContext =
+ new MockExternalContext(servletContext, request, response);
+
+ RuntimeConfig.getCurrentInstance(externalContext).setExpressionFactory(
+ new org.apache.el.ExpressionFactoryImpl());
+ }
+
+ @Override
+ protected void setUpFacesContext() throws Exception
+ {
+ super.setUpFacesContext();
+ facesContext.setExceptionHandler(new ExceptionHandlerImpl());
+ }
+
+ @Test
+ public void testActionException1() throws Exception
+ {
+ UIViewRoot root = facesContext.getViewRoot();
+ vdl.buildView(facesContext, root,"testActionException1.xhtml");
+
+ request.addParameter("mainForm:button1", "Submit");
+
+ UICommand button = (UICommand) root.findComponent("mainForm:button1");
+ Assert.assertNotNull(button);
+
+ ExceptionBean bean = EasyMock.createMock(ExceptionBean.class);
+ EasyMock.expect(bean.doSomeAction()).andThrow(new AbortProcessingException());
+ // Setup is finished need to activate the mock
+ EasyMock.replay(bean);
+
+ request.setAttribute("bean", bean);
+
+ button.processDecodes(facesContext);
+
+ try
+ {
+ root.processApplication(facesContext);
+ }
+ catch(FacesException e)
+ {
+ Assert.fail("No exception should be thrown at this point.",e);
+ }
+
+ int i = 0;
+ for (Iterator<ExceptionQueuedEvent> it = facesContext.getExceptionHandler().getUnhandledExceptionQueuedEvents().iterator(); it.hasNext();)
+ {
+ ExceptionQueuedEvent eqe = it.next();
+ Throwable e = eqe.getContext().getException();
+ if (e instanceof AbortProcessingException && e.getCause() == null)
+ {
+ //Expected
+ i++;
+ }
+ else
+ {
+ Assert.fail("Unexpected exception queued", e);
+ }
+ }
+ Assert.assertEquals(1, i);
+ }
+
+ /**
+ * A runtime exception thrown must be
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testActionException1_1() throws Exception
+ {
+ UIViewRoot root = facesContext.getViewRoot();
+ vdl.buildView(facesContext, root,"testActionException1.xhtml");
+
+ request.addParameter("mainForm:button1", "Submit");
+
+ UICommand button = (UICommand) root.findComponent("mainForm:button1");
+ Assert.assertNotNull(button);
+
+ ExceptionBean bean = EasyMock.createMock(ExceptionBean.class);
+ EasyMock.expect(bean.doSomeAction()).andThrow(new RuntimeException());
+ // Setup is finished need to activate the mock
+ EasyMock.replay(bean);
+
+ request.setAttribute("bean", bean);
+
+ button.processDecodes(facesContext);
+
+ try
+ {
+ root.processApplication(facesContext);
+ }
+ catch(FacesException e)
+ {
+ return;
+ }
+ Assert.fail("Exception should be thrown at this point.");
+ }
+
+ /**
+ * A runtime exception thrown must be
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testActionException1_2() throws Exception
+ {
+ UIViewRoot root = facesContext.getViewRoot();
+ vdl.buildView(facesContext, root,"testActionException1.xhtml");
+
+ request.addParameter("mainForm:button1", "Submit");
+
+ UICommand button = (UICommand) root.findComponent("mainForm:button1");
+ Assert.assertNotNull(button);
+
+ ExceptionBean bean = EasyMock.createMock(ExceptionBean.class);
+ EasyMock.expect(bean.doSomeAction()).andThrow(new IOException());
+ // Setup is finished need to activate the mock
+ EasyMock.replay(bean);
+
+ request.setAttribute("bean", bean);
+
+ button.processDecodes(facesContext);
+
+ try
+ {
+ root.processApplication(facesContext);
+ }
+ catch(FacesException e)
+ {
+ return;
+ }
+ Assert.fail("Exception should be thrown at this point.");
+ }
+
+ @Test
+ public void testActionListenerException1() throws Exception
+ {
+ UIViewRoot root = facesContext.getViewRoot();
+ vdl.buildView(facesContext, root,"testActionListenerException1.xhtml");
+
+ request.addParameter("mainForm:button1", "Submit");
+
+ UICommand button = (UICommand) root.findComponent("mainForm:button1");
+ Assert.assertNotNull(button);
+
+ //ActionEvent event = new ActionEvent(button);
+ ExceptionBean bean = EasyMock.createMock(ExceptionBean.class);
+ bean.doSomeActionListener((ActionEvent)EasyMock.anyObject());
+ EasyMock.expectLastCall().andThrow(new AbortProcessingException());
+ // Setup is finished need to activate the mock
+ EasyMock.replay(bean);
+
+ request.setAttribute("bean", bean);
+
+ button.processDecodes(facesContext);
+
+ try
+ {
+ root.processApplication(facesContext);
+ }
+ catch(FacesException e)
+ {
+ Assert.fail("No exception should be thrown at this point.");
+ }
+
+ int i = 0;
+ for (Iterator<ExceptionQueuedEvent> it = facesContext.getExceptionHandler().getUnhandledExceptionQueuedEvents().iterator(); it.hasNext();)
+ {
+ ExceptionQueuedEvent eqe = it.next();
+ Throwable e = eqe.getContext().getException();
+ if (e instanceof AbortProcessingException && e.getCause() == null)
+ {
+ //Expected
+ i++;
+ }
+ else
+ {
+ Assert.fail("Unexpected exception queued", e);
+ }
+ }
+ Assert.assertEquals(1, i);
+
+ }
+
+ /**
+ * If a RuntimeException or other is thrown, AbortProcessingException is queued
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testActionListenerException1_1() throws Exception
+ {
+ UIViewRoot root = facesContext.getViewRoot();
+ vdl.buildView(facesContext, root,"testActionListenerException1.xhtml");
+
+ request.addParameter("mainForm:button1", "Submit");
+
+ UICommand button = (UICommand) root.findComponent("mainForm:button1");
+ Assert.assertNotNull(button);
+
+ //ActionEvent event = new ActionEvent(button);
+ ExceptionBean bean = EasyMock.createMock(ExceptionBean.class);
+ bean.doSomeActionListener((ActionEvent)EasyMock.anyObject());
+ EasyMock.expectLastCall().andThrow(new RuntimeException());
+ // Setup is finished need to activate the mock
+ EasyMock.replay(bean);
+
+ request.setAttribute("bean", bean);
+
+ button.processDecodes(facesContext);
+
+ try
+ {
+ root.processApplication(facesContext);
+ }
+ catch (Throwable e)
+ {
+ // JSF 2.0: publish the executor's exception (if any).
+
+ publishException (e, PhaseId.INVOKE_APPLICATION, facesContext);
+ }
+ //catch(FacesException e)
+ //{
+ // Assert.fail("No exception should be thrown at this point.");
+ //}
+
+ int i = 0;
+ for (Iterator<ExceptionQueuedEvent> it = facesContext.getExceptionHandler().getUnhandledExceptionQueuedEvents().iterator(); it.hasNext();)
+ {
+ ExceptionQueuedEvent eqe = it.next();
+ Throwable e = eqe.getContext().getException();
+ if (e instanceof AbortProcessingException)
+ {
+ Assert.fail("Unexpected exception queued", e);
+ }
+ else
+ {
+ //Expected
+ i++;
+ }
+ }
+ Assert.assertEquals(1, i);
+
+ }
+
+ private void publishException (Throwable e, PhaseId phaseId, FacesContext facesContext)
+ {
+ ExceptionQueuedEventContext context = new ExceptionQueuedEventContext (facesContext, e, null, phaseId);
+
+ facesContext.getApplication().publishEvent (facesContext, ExceptionQueuedEvent.class, context);
+ }
+
+ @Test
+ public void testValidatorException1() throws Exception
+ {
+ UIViewRoot root = facesContext.getViewRoot();
+ vdl.buildView(facesContext, root,"testValidatorException1.xhtml");
+
+ root.invokeOnComponent(facesContext, "mainForm:input1", new ContextCallback()
+ {
+ public void invokeContextCallback(FacesContext context, UIComponent target)
+ {
+ Object submittedValue = "Hello!";
+ ExceptionBean bean = EasyMock.createStrictMock(ExceptionBean.class);
+ bean.validateMe(facesContext,(UIComponent)target, submittedValue);
+ EasyMock.expectLastCall().andThrow(new ValidatorException(new FacesMessage(target.getClientId(facesContext),"not valid!")));
+ // Setup is finished need to activate the mock
+ EasyMock.replay(bean);
+
+ request.setAttribute("bean", bean);
+
+ UIInput input = (UIInput) target;
+ input.setSubmittedValue(submittedValue);
+ try
+ {
+ input.processValidators(facesContext);
+ Assert.assertTrue(facesContext.isValidationFailed());
+ }
+ catch(FacesException e)
+ {
+ Assert.fail("No exception expected", e);
+ }
+ }
+ });
+ }
+
+ @Test
+ public void testValidatorException2() throws Exception
+ {
+ application.addValidator("customValidatorId", CustomValidator.class.getName());
+ UIViewRoot root = facesContext.getViewRoot();
+ vdl.buildView(facesContext, root,"testValidatorException2.xhtml");
+
+ root.invokeOnComponent(facesContext, "mainForm:input1", new ContextCallback()
+ {
+ public void invokeContextCallback(FacesContext context, UIComponent target)
+ {
+ Object submittedValue = "Hello!";
+
+ UIInput input = (UIInput) target;
+ input.setSubmittedValue(submittedValue);
+ try
+ {
+ input.processValidators(facesContext);
+ Assert.assertTrue(facesContext.isValidationFailed());
+ }
+ catch(FacesException e)
+ {
+ Assert.fail("No exception expected", e);
+ }
+ }
+ });
+
+ Assert.assertEquals("not valid!", facesContext.getMessageList().get(0).getSummary());
+ }
+
+ @Test
+ public void testValueChangeListenerException1() throws Exception
+ {
+ UIViewRoot root = facesContext.getViewRoot();
+ vdl.buildView(facesContext, root,"testValueChangeListenerException1.xhtml");
+
+ root.invokeOnComponent(facesContext, "mainForm:input1", new ContextCallback()
+ {
+ public void invokeContextCallback(FacesContext context, UIComponent target)
+ {
+ Object submittedValue = "Hello!";
+ ExceptionBean bean = EasyMock.createStrictMock(ExceptionBean.class);
+ bean.valueChangeListenerMe((ValueChangeEvent)EasyMock.anyObject());
+ EasyMock.expectLastCall().andThrow(new AbortProcessingException());
+ // Setup is finished need to activate the mock
+ EasyMock.replay(bean);
+
+ request.setAttribute("bean", bean);
+
+ UIInput input = (UIInput) target;
+ input.setSubmittedValue(submittedValue);
+ try
+ {
+ input.processValidators(facesContext);
+ }
+ catch(FacesException e)
+ {
+ Assert.fail("No exception expected", e);
+ }
+ }
+ });
+
+ try
+ {
+ root.processUpdates(facesContext);
+ }
+ catch (Throwable e)
+ {
+ // JSF 2.0: publish the executor's exception (if any).
+ publishException (e, PhaseId.UPDATE_MODEL_VALUES, facesContext);
+ }
+
+ int i = 0;
+ for (Iterator<ExceptionQueuedEvent> it = facesContext.getExceptionHandler().getUnhandledExceptionQueuedEvents().iterator(); it.hasNext();)
+ {
+ ExceptionQueuedEvent eqe = it.next();
+ Throwable e = eqe.getContext().getException();
+ if (e instanceof AbortProcessingException && e.getCause() == null)
+ {
+ //Expected
+ i++;
+ }
+ else
+ {
+ Assert.fail("Unexpected exception queued", e);
+ }
+ }
+ Assert.assertEquals(1, i);
+ }
+
+ @Test
+ public void testValueChangeListenerException1_1() throws Exception
+ {
+ UIViewRoot root = facesContext.getViewRoot();
+ vdl.buildView(facesContext, root,"testValueChangeListenerException1.xhtml");
+
+ root.invokeOnComponent(facesContext, "mainForm:input1", new ContextCallback()
+ {
+ public void invokeContextCallback(FacesContext context, UIComponent target)
+ {
+ Object submittedValue = "Hello!";
+ ExceptionBean bean = EasyMock.createStrictMock(ExceptionBean.class);
+ bean.valueChangeListenerMe((ValueChangeEvent)EasyMock.anyObject());
+ EasyMock.expectLastCall().andThrow(new RuntimeException());
+ // Setup is finished need to activate the mock
+ EasyMock.replay(bean);
+
+ UIInput input = (UIInput) target;
+ input.setSubmittedValue(submittedValue);
+ try
+ {
+ input.processValidators(facesContext);
+ }
+ catch(FacesException e)
+ {
+ Assert.fail("No exception expected", e);
+ }
+
+ request.setAttribute("bean", bean);
+ }
+ });
+
+ try
+ {
+ root.processUpdates(facesContext);
+ }
+ catch (Throwable e)
+ {
+ // JSF 2.0: publish the executor's exception (if any).
+ publishException (e, PhaseId.UPDATE_MODEL_VALUES, facesContext);
+ }
+
+ int i = 0;
+ for (Iterator<ExceptionQueuedEvent> it = facesContext.getExceptionHandler().getUnhandledExceptionQueuedEvents().iterator(); it.hasNext();)
+ {
+ ExceptionQueuedEvent eqe = it.next();
+ Throwable e = eqe.getContext().getException();
+ if (e instanceof AbortProcessingException)
+ {
+ Assert.fail("Unexpected exception queued", e);
+ }
+ else
+ {
+ //Expected
+ i++;
+ }
+ }
+ Assert.assertEquals(1, i);
+ }
+
+ public static class CustomValidator implements Validator
+ {
+
+ public void validate(FacesContext context, UIComponent component,
+ Object value) throws ValidatorException
+ {
+ throw new ValidatorException(new FacesMessage("not valid!"));
+ }
+ }
+
+ public static interface ExceptionBean
+ {
+ public void validateMe(FacesContext context, UIComponent target, Object value);
+
+ public void doSomeActionListener(ActionEvent evt);
+
+ public void valueChangeListenerMe(ValueChangeEvent evt);
+
+ public Object doSomeAction() throws IOException;
+ }
+
+}
Added: myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testActionException1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testActionException1.xhtml?rev=1169885&view=auto
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testActionException1.xhtml (added)
+++ myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testActionException1.xhtml Mon Sep 12 19:25:49 2011
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: include.xhtml,v 1.2 2008/07/13 19:01:37 rlubke Exp $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html">
+<h:head>
+</h:head>
+<h:body>
+ <h:form id="mainForm">
+ <h:commandButton id="button1" value="Submit" action="#{bean.doSomeAction}"/>
+ </h:form>
+</h:body>
+</html>
Added: myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testActionListenerException1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testActionListenerException1.xhtml?rev=1169885&view=auto
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testActionListenerException1.xhtml (added)
+++ myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testActionListenerException1.xhtml Mon Sep 12 19:25:49 2011
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: include.xhtml,v 1.2 2008/07/13 19:01:37 rlubke Exp $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html">
+<h:head>
+</h:head>
+<h:body>
+ <h:form id="mainForm">
+ <h:commandButton id="button1" value="Submit" actionListener="#{bean.doSomeActionListener}"/>
+ </h:form>
+</h:body>
+</html>
Added: myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testValidatorException1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testValidatorException1.xhtml?rev=1169885&view=auto
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testValidatorException1.xhtml (added)
+++ myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testValidatorException1.xhtml Mon Sep 12 19:25:49 2011
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: include.xhtml,v 1.2 2008/07/13 19:01:37 rlubke Exp $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html">
+<h:head>
+</h:head>
+<h:body>
+ <h:form id="mainForm">
+ <h:inputText id="input1" validator="#{bean.validateMe}"/>
+ </h:form>
+</h:body>
+</html>
Added: myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testValidatorException2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testValidatorException2.xhtml?rev=1169885&view=auto
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testValidatorException2.xhtml (added)
+++ myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testValidatorException2.xhtml Mon Sep 12 19:25:49 2011
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: include.xhtml,v 1.2 2008/07/13 19:01:37 rlubke Exp $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html">
+<h:head>
+</h:head>
+<h:body>
+ <h:form id="mainForm">
+ <h:inputText id="input1">
+ <f:validator validatorId="customValidatorId"/>
+ </h:inputText>
+ </h:form>
+</h:body>
+</html>
Added: myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testValueChangeListenerException1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testValueChangeListenerException1.xhtml?rev=1169885&view=auto
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testValueChangeListenerException1.xhtml (added)
+++ myfaces/core/branches/2.0.x/impl/src/test/resources/org/apache/myfaces/view/facelets/testValueChangeListenerException1.xhtml Mon Sep 12 19:25:49 2011
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: include.xhtml,v 1.2 2008/07/13 19:01:37 rlubke Exp $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html">
+<h:head>
+</h:head>
+<h:body>
+ <h:form id="mainForm">
+ <h:inputText id="input1" valueChangeListener="#{bean.valueChangeListenerMe}"/>
+ </h:form>
+</h:body>
+</html>