Author: nbelaevski
Date: 2007-06-21 10:19:33 -0400 (Thu, 21 Jun 2007)
New Revision: 1254
Removed:
trunk/sandbox/panelmenu/src/main/java/org/richfaces/conveter/
Modified:
trunk/sandbox/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
Log:
Some PanelMenu fixes
Modified:
trunk/sandbox/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java
===================================================================
---
trunk/sandbox/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java 2007-06-21
14:03:01 UTC (rev 1253)
+++
trunk/sandbox/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java 2007-06-21
14:19:33 UTC (rev 1254)
@@ -22,9 +22,9 @@
package org.richfaces.component;
import javax.faces.component.ActionSource;
-import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
+import javax.faces.convert.BooleanConverter;
import javax.faces.el.MethodBinding;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ActionEvent;
@@ -32,8 +32,6 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
-import org.richfaces.conveter.UIPanelMenuGroupValueConverter;
-
public abstract class UIPanelMenuGroup extends UIInput implements ActionSource{
public static final String COMPONENT_TYPE = "org.richfaces.panelMenuGroup";
@@ -83,7 +81,7 @@
public UIPanelMenuGroup(){
- setConverter(new UIPanelMenuGroupValueConverter());
+ setConverter(new BooleanConverter());
}
public void addActionListener(ActionListener listener) {
@@ -134,7 +132,7 @@
}
public void queueEvent(FacesEvent event) {
- if(event instanceof ActionEvent){
+ if(event instanceof ActionEvent && this == event.getSource()){
if (isImmediate()) {
event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
} else {
Modified:
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
===================================================================
---
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2007-06-21
14:03:01 UTC (rev 1253)
+++
trunk/sandbox/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2007-06-21
14:19:33 UTC (rev 1254)
@@ -22,14 +22,15 @@
package org.richfaces.renderkit.html;
import java.io.IOException;
+
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.event.ActionEvent;
+
import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.richfaces.component.UIPanelMenu;
import org.richfaces.component.UIPanelMenuItem;
-import org.richfaces.component.UISwitchablePanel;
import org.richfaces.renderkit.PanelMenuRendererBase;
public class PanelMenuItemRenderer extends PanelMenuRendererBase {
@@ -43,7 +44,7 @@
protected void doDecode(FacesContext context, UIComponent component) {
if(isSubmitted(context, component)) {
new ActionEvent(component).queue();
- if (UISwitchablePanel.AJAX_METHOD.equals(getItemMode(component))) {
+ if ("ajax".equals(getItemMode(component))) {
new AjaxEvent(component).queue();
} else {
Show replies by date