Author: nbelaevski
Date: 2007-05-02 18:16:54 -0400 (Wed, 02 May 2007)
New Revision: 616
Modified:
trunk/richfaces/dropdown-menu/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-144 fixed
Modified:
trunk/richfaces/dropdown-menu/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java
===================================================================
---
trunk/richfaces/dropdown-menu/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java 2007-05-02
21:20:54 UTC (rev 615)
+++
trunk/richfaces/dropdown-menu/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java 2007-05-02
22:16:54 UTC (rev 616)
@@ -28,20 +28,21 @@
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
+import java.util.Set;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.framework.ajax.AjaxContext;
import org.ajax4jsf.framework.renderer.HeaderResourcesRendererBase;
+import org.ajax4jsf.framework.util.javascript.JSFunction;
import org.richfaces.component.UIDropDownMenu;
import org.richfaces.component.UIMenuGroup;
import org.richfaces.component.UIMenuItem;
import org.richfaces.component.UIMenuSeparator;
import org.richfaces.component.util.HtmlUtil;
import org.richfaces.renderkit.ScriptOptions;
-import org.ajax4jsf.framework.util.javascript.JSFunction;
public class DropDownMenuRendererBase extends HeaderResourcesRendererBase {
@@ -108,8 +109,11 @@
writer.writeAttribute("type", "text/javascript", null);
encodeScript(context, layer);
writer.endElement("script");
- AjaxRendererUtils.addRegionByName(context, layer, clientId +
"_menu_iframe");
- AjaxRendererUtils.addRegionByName(context, layer, clientId +
"_menu_script");
+
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance();
+ Set renderedAreas = ajaxContext.getAjaxRenderedAreas();
+ renderedAreas.add(clientId + "_menu_iframe");
+ renderedAreas.add(clientId + "_menu_script");
}
public void encodeItems(FacesContext context, UIComponent component) throws IOException
{