SWF-1115 - Id handling of Spring AjaxViewRoot causes problems to RichFaces AjaxViewRoot

This commit is contained in:
Jeremy Grelle
2009-08-03 22:05:12 +00:00
parent 7a98c14576
commit 688d3f7f4e

View File

@@ -49,6 +49,7 @@ import org.springframework.webflow.execution.View;
* </p>
*
* @author Jeremy Grelle
* @author Nazaret Kazarian
*/
public class AjaxViewRoot extends DelegatingViewRoot {
@@ -73,13 +74,18 @@ public class AjaxViewRoot extends DelegatingViewRoot {
public AjaxViewRoot(UIViewRoot original) {
super(original);
renderIdsExpr = FacesContext.getCurrentInstance().getApplication().createValueBinding(RENDER_IDS_EXPRESSION);
original.setId(createUniqueId());
if (!StringUtils.hasText(original.getId())) {
original.setId(createUniqueId());
}
swapChildren(original, this);
setId(original.getId() + "_ajax");
}
// implementing view root
public String getId() {
return getOriginalViewRoot().getId() + "_ajax";
}
public void queueEvent(FacesEvent event) {
Assert.notNull(event, "Cannot queue a null event.");
events.add(event);