6 Replies Latest reply on Aug 1, 2007 10:05 AM by Alexander Belov

    Modal dialog has unwanted underscore (mp1LastHref)

    Damian Harvey Master

      Hi all,

      Since upgrading Richfaces to 3.0.2 (richfaces-3.0.2-20070718.000117-31.jar) I am seeing an unwanted underscore (_) on my modal dialogs. The HTML for it is :

      <a id="mp1LastHref" href="#" style="position: absolute;">_</a>

      Is anyone else seeing this?

      Not a big deal (unless you *hate* underscores??) but nice to be rid of. I could put in a CSS rule or nuke it with some javascript but hardly seems to warrant it if it was fixed.

      Cheers,

      Damian.

        • 1. Re: Modal dialog has unwanted underscore (mp1LastHref)
          paata lominadze Master

          yes, i think this is bug. but u can remove this link by javascript.
          after modal panel loaded run this script :
          [CODE]

          var link = document.getElementById('admbodyForm:mpLastHref');
          link.parentNode.removeChild(link);

          [/CODE]

          • 2. Re: Modal dialog has unwanted underscore (mp1LastHref)
            paata lominadze Master

            "
            var link = document.getElementById('admbodyForm:mpLastHref');
            link.parentNode.removeChild(link);
            "

            • 3. Re: Modal dialog has unwanted underscore (mp1LastHref)
              paata lominadze Master

              sorry for empty posts, :(, form remove javascript :)
              admbodyForm is form id
              [CODE]
              var link = document.getElementById('admbodyForm:mpLastHref');
              link.parentNode.removeChild(link);
              [/CODE]

              • 4. Re: Modal dialog has unwanted underscore (mp1LastHref)
                Igor Shabalov Apprentice

                Can you post a page source?

                • 5. Re: Modal dialog has unwanted underscore (mp1LastHref)
                  Damian Harvey Master

                  Sure. Here is the xhtml:

                  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                  <html xmlns="http://www.w3.org/1999/xhtml"
                   xmlns:ui="http://java.sun.com/jsf/facelets"
                   xmlns:h="http://java.sun.com/jsf/html"
                   xmlns:f="http://java.sun.com/jsf/core"
                   xmlns:a="https://ajax4jsf.dev.java.net/ajax"
                   xmlns:rich="http://richfaces.ajax4jsf.org/rich"
                   xmlns:s="http://jboss.com/products/seam/taglib">
                  <head>
                   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                   <title>Modal Test</title>
                   <link href="#{facesContext.externalContext.requestContextPath}/stylesheet/theme.css" rel="stylesheet" type="text/css" />
                  </head>
                  <body>
                   <s:div>
                   <a href="javascript:Richfaces.showModalPanel('mp1',{width:300, top:200})">Open Modal</a>
                   </s:div>
                   <rich:modalPanel id="mp1" minHeight="200" minWidth="300" height="200" width="300" zindex="2000">
                   <f:facet name="header">
                   Test
                   </f:facet>
                   <f:facet name="controls">
                   <h:graphicImage value="/img/close.png" style="cursor:pointer" onclick="Richfaces.hideModalPanel('mp1')" />
                   </f:facet>
                   Hello!
                   </rich:modalPanel>
                  </body>
                  </html>
                  


                  And here is the HTML that is sent to the page:
                  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
                  <html xmlns="http://www.w3.org/1999/xhtml">
                  <head>
                   <link rel='stylesheet' type='text/css' href='/Odyssey/a4j.res/org/richfaces/renderkit/html/css/modalPanel.xcss/DATA/eAHzCVPfDQADPwGF.seam' />
                   <script type='text/javascript' src='/Odyssey/a4j.res/org.ajax4jsf.framework.ajax.AjaxScript.seam'></script>
                   <script type='text/javascript' src='/Odyssey/a4j.res/org.ajax4jsf.framework.resource.PrototypeScript.seam'></script>
                   <script type='text/javascript' src='/Odyssey/a4j.res/org/richfaces/renderkit/html/scripts/utils.js.seam'></script>
                   <script type='text/javascript' src='/Odyssey/a4j.res/org/richfaces/renderkit/html/scripts/modalPanel.js.seam'></script>
                   <script type='text/javascript' src='/Odyssey/a4j.res/org/richfaces/renderkit/html/scripts/modalPanelBorders.js.seam'></script>
                   <script type='text/javascript' src='/Odyssey/a4j.res/org/richfaces/renderkit/html/scripts/browser_info.js.seam'></script>
                   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                   <title>Modal Test</title>
                   <link href="/Odyssey/stylesheet/theme.css" rel="stylesheet" type="text/css" />
                  </head>
                  <body>
                  <div id="j_id2">
                   <a href="javascript:Richfaces.showModalPanel('mp1',{width:300, top:200})">Open Modal</a>
                  </div>
                  <div id="mp1" style="display: none;">
                   <input id="mp1OpenedState" name="mp1OpenedState" type="hidden" />
                   <div class="rich-modalpanel" id="mp1Container" style="position: absolute; display: none; z-index: 2000; background-color: inherit;">
                   <div class="dr-mpnl-mask-div rich-mpnl-mask-div" id="mp1Div" style="z-index: 1;"></div>
                   <div class="dr-mpnl-mask-div rich-mpnl-mask-div" id="mp1CursorDiv" style="filter: alpha(opacity=1); opacity: 0.01; z-index: -200"></div>
                   <div class="dr-mpnl-panel rich-mpnl_panel" id="mp1CDiv" style="width: 1px; height: 1px; z-index: 2;">
                   <div class="dr-mpnl-resizer rich-mpnl-resizer" id="mp1ResizerNWU" style="width: 40px; height: 4px;z-index: 13;"></div>
                   <div class="dr-mpnl-resizer rich-mpnl-resizer" id="mp1ResizerN" style="width: 40px; height: 4px;z-index: 03;"></div>
                   <div class="dr-mpnl-resizer rich-mpnl-resizer" id="mp1ResizerNEU" style="width: 40px; height: 4px;z-index: 13;"></div>
                   <div class="dr-mpnl-resizer rich-mpnl-resizer" id="mp1ResizerNEL" style="height: 40px; width: 4px;z-index: 13;"></div>
                   <div class="dr-mpnl-resizer rich-mpnl-resizer" id="mp1ResizerE" style="height: 40px; width: 4px;z-index: 03;"></div>
                   <div class="dr-mpnl-resizer rich-mpnl-resizer" id="mp1ResizerSEU" style="height: 40px; width: 4px;z-index: 13;"></div>
                   <div class="dr-mpnl-resizer rich-mpnl-resizer" id="mp1ResizerSEL" style="width: 40px; height: 4px;z-index: 13;"></div>
                   <div class="dr-mpnl-resizer rich-mpnl-resizer" id="mp1ResizerS" style="width: 40px; height: 4px;z-index: 03;"></div>
                   <div class="dr-mpnl-resizer rich-mpnl-resizer" id="mp1ResizerSWL" style="width: 40px; height: 4px;z-index: 13;"></div>
                   <div class="dr-mpnl-resizer rich-mpnl-resizer" id="mp1ResizerSWU" style="height: 40px; width: 4px;z-index: 13;"></div>
                   <div class="dr-mpnl-resizer rich-mpnl-resizer" id="mp1ResizerW" style="height: 40px; width: 4px;z-index: 03;"></div>
                   <div class="dr-mpnl-resizer rich-mpnl-resizer" id="mp1ResizerNWL" style="height: 40px; width: 4px;z-index: 13;"></div>
                   <div class="dr-mpnl-shadow rich-mpnl-shadow" id="mp1ShadowDiv" style="top: 4; left: 4; opacity:0.1; filter:alpha(opacity=10);"></div>
                   <div class="dr-mpnl-pnl" id="mp1ContentDiv" style="position: absolute; overflow: hidden; z-index: 2;">
                   <a href="#" id="mp1FirstHref" style="position: absolute; left: -32000">_</a>
                   <table border="0" cellpadding="0" cellspacing="0" style="height: 100%; width: 100%;">
                   <tr style="height: 1%;"><td class="dr-mpnl-header rich-mpnl-header-cell" style="position: relative; vertical-align: middle; z-index: 5;" width="100%">
                   <div class="dr-mpnl-pnl-text dr-mpnl-pnl-h rich-mpnl-text rich-mpnl-header " id="mp1Header" style="position: relative; white-space: nowrap;">
                   Test
                   </div>
                   <div class="dr-mpnl-pnl-text rich-mpnl-text rich-mpnl-controls " style="position: absolute; top: 3px; right: 3px;">
                   <img src="/Odyssey/img/close.png" alt="" onclick="Richfaces.hideModalPanel('mp1')" style="cursor:pointer" /></div>
                   </td>
                   </tr>
                   <tr>
                   <td class="dr-mpnl-pnl-b rich-mpnl-body" valign="top">
                   Hello!<a href="#" id="mp1LastHref" style="position: absolute; left: -32001">_</a></td></tr></table></div></div><script type="text/javascript">
                  //<![CDATA[
                  new ModalPanel('mp1',
                   {
                   width: 300,
                   height: 200,
                  
                   minWidth: 300,
                   minHeight: 200,
                  
                   resizeable: true,
                   moveable: true,
                  
                   left: "auto",
                   top: "auto",
                  
                   zindex: 2000,
                  
                   onshow: '',
                   onhide: '',
                  
                   keepVisualState: false,
                   showWhenRendered: false
                   });
                  //]]>
                  </script></div></div><script type="text/javascript">
                  //<![CDATA[
                  
                  //]]>
                  </script>
                  </body>
                  </html>
                  


                  Cheers,

                  Damian.

                  • 6. Re: Modal dialog has unwanted underscore (mp1LastHref)
                    Alexander Belov Novice

                    I have the same problem. I have added comments to your JIRA. There are two links: one in the beginning of the panel, one in the end. And user can see them sometimes.