Author: alexsmirnov
Date: 2010-12-16 20:27:58 -0500 (Thu, 16 Dec 2010)
New Revision: 20632
Modified:
branches/RF-7654/ui/validator/ui/src/main/java/org/richfaces/renderkit/MessageRendererBase.java
branches/RF-7654/ui/validator/ui/src/test/resources/org/richfaces/component/test.xhtml
Log:
CODING IN PROGRESS - issue RF-7654: rich:message/rich:messages
https://issues.jboss.org/browse/RF-7654
Modified:
branches/RF-7654/ui/validator/ui/src/main/java/org/richfaces/renderkit/MessageRendererBase.java
===================================================================
---
branches/RF-7654/ui/validator/ui/src/main/java/org/richfaces/renderkit/MessageRendererBase.java 2010-12-17
01:21:37 UTC (rev 20631)
+++
branches/RF-7654/ui/validator/ui/src/main/java/org/richfaces/renderkit/MessageRendererBase.java 2010-12-17
01:27:58 UTC (rev 20632)
@@ -23,12 +23,14 @@
package org.richfaces.renderkit;
+import java.io.IOException;
import java.util.Iterator;
import javax.faces.application.FacesMessage;
import javax.faces.application.FacesMessage.Severity;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
import javax.faces.render.Renderer;
import org.richfaces.renderkit.util.RendererUtils;
@@ -118,9 +120,11 @@
return (String) component.getAttributes().get("for");
}
- protected void encodeMessage(FacesContext facesContext, UIComponent component, Object
msg) {
+ protected void encodeMessage(FacesContext facesContext, UIComponent component, Object
msg) throws IOException {
// TODO fix generator to properly detect iteration variable type
FacesMessage message = (FacesMessage) msg;
+ ResponseWriter responseWriter = facesContext.getResponseWriter();
+ responseWriter.writeText(message.getSummary(),"value");
}
static SeverityAttributes attrs(String styleAttribute, String classAttribute, String
markerStyleAttribute,
Modified:
branches/RF-7654/ui/validator/ui/src/test/resources/org/richfaces/component/test.xhtml
===================================================================
---
branches/RF-7654/ui/validator/ui/src/test/resources/org/richfaces/component/test.xhtml 2010-12-17
01:21:37 UTC (rev 20631)
+++
branches/RF-7654/ui/validator/ui/src/test/resources/org/richfaces/component/test.xhtml 2010-12-17
01:27:58 UTC (rev 20632)
@@ -10,7 +10,7 @@
<csv:validator event="keyup" />
</h:inputText>
<h:outputText id="out"
value="#{test.value}"></h:outputText>
- <h:message id="message" for="text" />
+ <csv:message id="message" for="text" />
</h:form>
</h:body>
</html>