Making RichFaces panel non-modal

Ilya Shaikovsky (Exadel) blogged about how to make a rich:modalPane to be non-modal.

If you are on Linux like me, you have to add this right after the rich:modalPanel:


...


  removeTabHandlingFromPanel(#{rich:component('mp')});
  function removeTabHandlingFromPanel(modalPanelComponent){
       modalPanelComponent.lastOnfocus = function(event){};
       modalPanelComponent.firstOnfocus = function(event){};
       modalPanelComponent.processAllFocusElements = function(event){};
       modalPanelComponent.processTabindexes = function(event){};
       modalPanelComponent.restoreTabindexes = function(event){};
       modalPanelComponent.preventFocus = function(event){};
       modalPanelComponent.restoreFocus = function(event){};
  }

5 thoughts on “Making RichFaces panel non-modal

  1. I have some problem with modal panel
    i want to render a outputText field in parentwindow on button click in modalpanel
    this works when i directly put the button in modalpanel,but does not work if i include the button in a page which is included in modalpanel

    follwing is the code sample

    parentpage.jsp
    ——————–

    includetest.jsp
    ——————

    parentpage.java
    ———————

    package com.test;

    import javax.faces.event.ActionEvent;

    public class parentpage {
    private String outputval;
    private int count;

    public parentpage() {
    // TODO Auto-generated constructor stub
    outputval = “Before Change”;
    count=0;
    }

    public String getOutputval() {
    return outputval;
    }

    public void setOutputval(String outputval) {
    this.outputval = outputval;
    }

    public void changeoutputval(ActionEvent event) {
    outputval = “Got that”;
    }
    }

    Click on “modal direct click” outputval is updated
    Click On “modal included click” outputval is not updated

    Please guide me in this regard..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s