Author: alexsmirnov
Date: 2008-04-28 17:02:55 -0400 (Mon, 28 Apr 2008)
New Revision: 8269
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java
Log:
fix
http://jira.jboss.com/jira/browse/RF-2076.
Decrease logging level for an resources lifecycle.
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java
===================================================================
---
trunk/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java 2008-04-28
19:24:33 UTC (rev 8268)
+++
trunk/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java 2008-04-28
21:02:55 UTC (rev 8269)
@@ -993,20 +993,24 @@
* @return
*/
private boolean keepSaved(FacesContext context) {
+ // For an any validation errors, children components state should be preserved
+ FacesMessage.Severity sev = context.getMaximumSeverity();
+ return (sev != null && (FacesMessage.SEVERITY_ERROR.compareTo(sev) >= 0));
- Iterator<String> clientIds = this.getChildState(context).keySet().iterator();
- while (clientIds.hasNext()) {
- String clientId = clientIds.next();
- Iterator<FacesMessage> messages = context.getMessages(clientId);
- while (messages.hasNext()) {
- FacesMessage message = messages.next();
- if (message.getSeverity()
- .compareTo(FacesMessage.SEVERITY_ERROR) >= 0) {
- return (true);
- }
- }
- }
- return false;
+
+// Iterator<String> clientIds = this.getChildState(context).keySet().iterator();
+// while (clientIds.hasNext()) {
+// String clientId = clientIds.next();
+// Iterator<FacesMessage> messages = context.getMessages(clientId);
+// while (messages.hasNext()) {
+// FacesMessage message = messages.next();
+// if (message.getSeverity()
+// .compareTo(FacesMessage.SEVERITY_ERROR) >= 0) {
+// return (true);
+// }
+// }
+// }
+// return false;
}
/**
@@ -1182,7 +1186,7 @@
public void encodeBegin(FacesContext context) throws IOException {
resetDataModel();
- if (!keepSaved(context)) {
+ if (null != childState && !keepSaved(context)) {
childState.remove(getBaseClientId(context));
}
// Mark component as used, if parent UIData change own range states not
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java
===================================================================
---
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java 2008-04-28
19:24:33 UTC (rev 8268)
+++
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java 2008-04-28
21:02:55 UTC (rev 8269)
@@ -202,7 +202,7 @@
}
} catch (Exception e) {
_log
- .error("Exception in PhaseListener, phase :"
+ .debug("Exception in PhaseListener, phase :"
+ phaseEvent.getPhaseId().toString()
+ (beforePhase ? " : beforePhase"
: " : afterPhase"), e);