sventon subversion web client - http://www.sventon.org
[show recent changes]
 
  Help
HEAD
Rev: 26424 - http://anonsvn.icesoft.org/repo / icefaces2 / trunk / icefaces / compat / components / src / main / java / com / icesoft / faces / component / menupopup / MenuPopup.java
Unified Diff View - MenuPopup.java
/icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/menupopup/MenuPopup.java @ revision 26423
/icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/menupopup/MenuPopup.java @ revision 26424
@@ -57,7 +57,8 @@  * @author Mark Collette  */ public class MenuPopup extends MenuBar { - + private Boolean blockMenuOnInput; +     private MethodBinding displayListener;     final static String DISPLAY_LISTENER_ID = "_dynamic";     /** @@ -163,10 +164,11 @@     public Object saveState(FacesContext context) { -        Object values[] = new Object[3]; +        Object values[] = new Object[4];         values[0] = super.saveState(context);         values[1] = hideOn; -        values[2] = saveAttachedState(context, displayListener); +        values[2] = saveAttachedState(context, displayListener); +        values[3] = blockMenuOnInput;         return values;     } @@ -176,6 +178,7 @@         super.restoreState(context, values[0]);         hideOn = (String) values[1];         displayListener = (MethodBinding)restoreAttachedState(context, values[2]); +        blockMenuOnInput = (Boolean) values[3];;     } @@ -193,7 +196,21 @@         this.displayListener = displayListener;    } -    public void broadcast(FacesEvent event) +    public boolean isBlockMenuOnInput() { +        if (blockMenuOnInput != null) { +            return blockMenuOnInput.booleanValue(); +        } +        ValueBinding vb = getValueBinding("blockMenuOnInput"); +        Boolean boolVal = vb != null ? +                (Boolean) vb.getValue(getFacesContext()) : null; +        return boolVal != null ? boolVal.booleanValue() : false; + } + + public void setBlockMenuOnInput(boolean blockMenuOnInput) { +  this.blockMenuOnInput = new Boolean(blockMenuOnInput); + } + + public void broadcast(FacesEvent event)     throws AbortProcessingException {         super.broadcast(event);         if (displayListener != null) {


feed icon

sventon 2.5.1