Package org.richfaces.component

Examples of org.richfaces.component.UIModalPanel


 
  @SuppressWarnings("unchecked")
  protected void doDecode(FacesContext context, UIComponent component) {
    super.doDecode(context, component);
   
    UIModalPanel panel = (UIModalPanel)component;
    ExternalContext exCtx = context.getExternalContext();
    Map<String, String> rqMap = exCtx.getRequestParameterMap();
    Object panelOpenState = rqMap.get(panel.getClientId(context) + "OpenedState");
   
    if (panel.isKeepVisualState()) {
          if (null != panelOpenState) {
                // Bug https://jira.jboss.org/jira/browse/RF-2466
            // Incorrect old:
                //  panel.setShowWhenRendered(Boolean.parseBoolean((String) clnId));
                // ShowWhenRendered can be settled separately with modal panel "showWhenRendered" attribute
                // so we should combine ShowWhenRendered || KeepVisualState && (OpenedState==TRUE) against rewriting
            boolean showWhenRendered = panel.isShowWhenRendered() || Boolean.parseBoolean((String) panelOpenState);
            panel.setShowWhenRendered(showWhenRendered);
           
            Map<String, Object> visualOptions = (Map<String, Object>) panel.getVisualOptions();
            Iterator<Entry<String, String>> it = rqMap.entrySet().iterator();
            while ( it.hasNext()) {
              Map.Entry<String, String> entry = it.next();
              int suffixPos = entry.getKey().toString().indexOf(STATE_OPTION_SUFFIX);
              if (-1 != suffixPos) {
View Full Code Here


  };
 
  protected void doDecode(FacesContext context, UIComponent component) {
    super.doDecode(context, component);
   
    UIModalPanel panel = (UIModalPanel)component;
    ExternalContext exCtx = context.getExternalContext();
    Map rqMap = exCtx.getRequestParameterMap();
    Object clnId = rqMap.get(panel.getClientId(context) + "OpenedState");
   
    if (panel.isKeepVisualState()) {
          if (null != clnId) {
            panel.setShowWhenRendered(new Boolean((String) clnId).booleanValue());
           
            Iterator it = rqMap.entrySet().iterator();
            while ( it.hasNext()) {
              Map.Entry entry = (Map.Entry)it.next();
              int suffixPos = entry.getKey().toString().indexOf(STATE_OPTION_SUFFIX);
              if (-1 != suffixPos) {
                String key = entry.getKey().toString().substring(suffixPos + STATE_OPTION_SUFFIX.length());
                panel.getVisualOptions().put(key, entry.getValue());
              }
            }
          }
    }
  }
View Full Code Here

 
  @SuppressWarnings("unchecked")
  protected void doDecode(FacesContext context, UIComponent component) {
    super.doDecode(context, component);
   
    UIModalPanel panel = (UIModalPanel)component;
    ExternalContext exCtx = context.getExternalContext();
    Map<String, String> rqMap = exCtx.getRequestParameterMap();
    Object panelOpenState = rqMap.get(panel.getClientId(context) + "OpenedState");
   
    if (panel.isKeepVisualState()) {
          if (null != panelOpenState) {
                // Bug https://jira.jboss.org/jira/browse/RF-2466
            // Incorrect old:
                //  panel.setShowWhenRendered(Boolean.parseBoolean((String) clnId));
                // ShowWhenRendered can be settled separately with modal panel "showWhenRendered" attribute
                // so we should combine ShowWhenRendered || KeepVisualState && (OpenedState==TRUE) against rewriting
            boolean showWhenRendered = panel.isShowWhenRendered() || Boolean.parseBoolean((String) panelOpenState);
            panel.setShowWhenRendered(showWhenRendered);
           
            Map<String, Object> visualOptions = (Map<String, Object>) panel.getVisualOptions();
            Iterator<Entry<String, String>> it = rqMap.entrySet().iterator();
            while ( it.hasNext()) {
              Map.Entry<String, String> entry = it.next();
              int suffixPos = entry.getKey().toString().indexOf(STATE_OPTION_SUFFIX);
              if (-1 != suffixPos) {
View Full Code Here

  };
 
  protected void doDecode(FacesContext context, UIComponent component) {
    super.doDecode(context, component);
   
    UIModalPanel panel = (UIModalPanel)component;
    ExternalContext exCtx = context.getExternalContext();
    Map rqMap = exCtx.getRequestParameterMap();
    Object clnId = rqMap.get(panel.getClientId(context) + "OpenedState");
   
    if (panel.isKeepVisualState()) {
          if (null != clnId) {
            panel.setShowWhenRendered(new Boolean((String) clnId).booleanValue());
           
            Iterator it = rqMap.entrySet().iterator();
            while ( it.hasNext()) {
              Map.Entry entry = (Map.Entry)it.next();
              int suffixPos = entry.getKey().toString().indexOf(STATE_OPTION_SUFFIX);
              if (-1 != suffixPos) {
                String key = entry.getKey().toString().substring(suffixPos + STATE_OPTION_SUFFIX.length());
                panel.getVisualOptions().put(key, entry.getValue());
              }
            }
          }
    }
  }
View Full Code Here

  };
 
  protected void doDecode(FacesContext context, UIComponent component) {
    super.doDecode(context, component);
   
    UIModalPanel panel = (UIModalPanel)component;
    ExternalContext exCtx = context.getExternalContext();
    Map rqMap = exCtx.getRequestParameterMap();
    Object clnId = rqMap.get(panel.getClientId(context) + "OpenedState");
   
    if (panel.isKeepVisualState()) {
          if (null != clnId) {
            panel.setShowWhenRendered(new Boolean((String) clnId).booleanValue());
           
            Iterator it = rqMap.entrySet().iterator();
            while ( it.hasNext()) {
              Map.Entry entry = (Map.Entry)it.next();
              int suffixPos = entry.getKey().toString().indexOf(STATE_OPTION_SUFFIX);
              if (-1 != suffixPos) {
                String key = entry.getKey().toString().substring(suffixPos + STATE_OPTION_SUFFIX.length());
                panel.getVisualOptions().put(key, entry.getValue());
              }
            }
          }
    }
  }
View Full Code Here

TOP

Related Classes of org.richfaces.component.UIModalPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.