Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-2107

Trinidad 2.x using facelets doesn't work on Glassfish 3.1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0.0-core
    • 2.0.1-core
    • Facelets
    • None
    • Glassfish 3.1, Mojarra 2.1.0 (FCS 2.1.0-b11), Trinidad 2.0.0

    Description

      Some PPR functionality doesn't work. For example:

      tr:commandNavigationItem - dialog not opening when partialSubmit="true" & useWindow="true"

      tr:showDetail - if you try to expand, it will be removed from the page. Further analysis using developer tools from chrome shown following scenario:

      example:

      <tr:showDetail disclosedText="Test" >
      <tr:outputText value="test2" />
      </tr:showDetail>

      1. rendered component
      <!-Start: org.apache.myfaces.trinidad.ShowDetail["j_idt92"]->
      <span id="j_idt8:j_idt92">
      <div class="af_showDetail_prompt-undisclosed">
      <script type="text/javascript">function _submitHideShow(a,v,b,c,l,d) {var o =

      {event:b,source:c}

      ;if (d!=(void 0)) o.value=d;_setRequestedFocusNode(document,l,false,window);_submitPartialChange(a,v,o);return false;}</script>
      <a onclick="return submitHideShow('j_idt8',1,'show','j_idt8:j_idt92','j_idt8:j_idt92xc')" href="#" id="j_idt8:j_idt92_xc" class="OraLink af_showDetail_disclosure-icon-link">
      <img src="/HR/css/bm4/img/icon_plus.gif" height="11" border="0" style="vertical-align:middle;margin-right:5px" title="Select to show information" alt="Select to show information" align="middle">
      </a>
      <a onclick="return submitHideShow('j_idt8',1,'show','j_idt8:j_idt92','j_idt8:j_idt92xc')" href="#" class="OraLink af_showDetail_prompt-link">Test</a>
      </div>
      </span>

      2. XHR Request Header
      --------------------------------------
      org.apache.myfaces.trinidad.faces.FORM:j_idt8
      _noJavaScript:false
      javax.faces.ViewState:!13z8tz1pvu
      source:j_idt8:j_idt94
      event:show
      state:
      value:
      partial:true
      javax.faces.source:j_idt8:j_idt94
      javax.faces.partial.execute:j_idt8:j_idt94 j_idt8:j_idt94
      Tr-PPR-Message:true
      javax.faces.partial.ajax:true
      --------------------------------
      3. XHR response
      --------------------------------------------------
      <?xml version="1.0" ?>
      <partial-response><changes><update id="j_idt8:j_idt74"><![CDATA[<!-Start: org.apache.myfaces.trinidad.Messages["j_idt74"]-><table id="j_idt8:j_idt74" class="af_messages" style="display:none;" cellpadding="0" cellspacing="0" border="0" summary=""><tbody><tr>
      <td class="af_messages_top-start"></td>

      <td class="af_messages_top"></td>

      <td class="af_messages_top-end"></td>
      </tr><tr>
      <td class="af_messages_start"></td>

      <td><!-Start: org.apache.myfaces.trinidad.Messages["j_idt74"]-><div class="af_messages_body"><div>
      <h1 class="af_messages_header"><span class="af_messages_error">Error</span></h1>
      </div>
      <ol id="j_idt8:j_idt74_LIST_" class="af_messages_list af_messages_list-single"></ol>
      </div></td>

      <td class="af_messages_end"></td>
      </tr><tr>
      <td class="af_messages_bottom-start"></td>

      <td class="af_messages_bottom"></td>

      <td class="af_messages_bottom-end"></td>
      </tr></tbody></table>]]></update><update id="j_idt8:j_idt94"><![CDATA[<!-Start: org.apache.myfaces.trinidad.ShowDetail["j_idt94"]><span id="j_idt8:j_idt94"><div class="af_showDetail_prompt-disclosed"><a onclick="return submitHideShow('j_idt8',1,'hide','j_idt8:j_idt94','j_idt8:j_idt94xc')" href="#" id="j_idt8:j_idt94_xc" class="OraLink af_showDetail_disclosure-icon-link"><img src="/HR/css/bm4/img/icon_minus.gif" height="11" border="0" style="vertical-align:middle;margin-right:5px" title="Select to hide information" alt="Select to hide information" align="middle"></a><a onclick="return submitHideShow('j_idt8',1,'hide','j_idt8:j_idt94','j_idt8:j_idt94xc')" href="#" class="OraLink af_showDetail_prompt-link">Test 2</a></div><div><!Start: org.apache.myfaces.trinidad.Output["j_idt95"]>test2</div></span>]]></update><update id="tr_j_idt8_Postscript"><![CDATA[<!Start: org.apache.myfaces.trinidad.Form["j_id4"]-><span id="tr_j_idt8_Postscript"><input type="hidden" name="source"><input type="hidden" name="event"><input type="hidden" name="partial"><script type="text/javascript">TrPage.getInstance()._addResetFields('j_idt8',["source","event","partial"]);</script><script type="text/javascript">var j_idt8_SF=

      {"j_idt8:j_idt45":2,"j_idt8:appMenu":1}

      ;</script></span>]]></update><update id="javax.faces.ViewState"><![CDATA[!13z8tz1pvu]]></update><eval><![CDATA[TrPage.getInstance().__handlePprResponseAction('/HR/application/hr/index.xhtml');]]></eval></changes></partial-response>
      --------------------------------------------------------------
      4. DOM structure after AJAX

      <!-Start: org.apache.myfaces.trinidad.ShowDetail["j_idt94"]->
      <!-Start: org.apache.myfaces.trinidad.ShowDetail["j_idt94"]->

      .... and that's it.

      My wild gues is that for some reason component with id "j_idt94" is replaced only with first comment in CDATA section of XHR response.

      trinidad-components-showcase also doesn't work.

      Steps to reproduce:
      1. download latest glassfish 3.1
      2. install
      3. deploy trinidad-components-showcase

      main menu on left side doesn't work.

      Attachments

        1. trinidad-2107.patch
          1 kB
          Max Starets

        Activity

          People

            mstarets Max Starets
            doctorlux Luka Surija
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: