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 responses to “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..

  2. parentpage.jsp
    ——————–

    includetest.jsp
    ——————

  3. I don’t see the code you posted. My recommendation is to ask this on RichFaces forum: http://community.jboss.org/en/richfaces?view=discussions

  4. i tried to put the jsp part,but i think the jsp tags are causing problem,as it is like an xml,so they are not coming in the blog

  5. @raghab: post your question on RichFaces forum, they will be able to help you.

Leave a comment