4 Replies Latest reply on Apr 15, 2010 9:52 AM by Ilya Shaikovsky

    dynamically include xhtml pages by selecting radiobutton

    matteo cremolini Newbie

      Hi all,

      we have to dynamically include(with a4j:include) different xhtml pages by selecting a radiobutton as demanded by our customer .

      The approach we chose is to have the 'view-id' property of a4j:include tag updated with the correct path when a radiobutton is clicked.

      Here is a snippet of the page:


      <h:selectOneRadio id="insertMode"
          <f:selectItem itemLabel="#{'Da Disco'}" itemValue="" />
          <f:selectItem itemLabel="#{'Da scanner dipartimentale'}"
           itemValue="/includes/fromGroupScanners.xhtml" />    
          <f:selectItem itemLabel="#{'Riferimento a cartaceo'}"
           itemValue="/includes/sheetReference.xhtml" />
          <a4j:support event="onclick" eventsQueue="insertModeQueue"
           ajaxSingle="true" limitToList="true"
         </h:selectOneRadio> <a4j:outputPanel id="insertModeContainer" layout="none"
           layout="inline" />


      This seems to be fine when running in Firefox but running in Explorer (7 and 8) there is a javascript error that blocks the request.


      The error is:


      Webpage error details

      User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)
      Timestamp: Tue, 13 Apr 2010 13:43:20 UTC

      Message: Unknown runtime error
      Line: 2373
      Char: 3
      Code: 0


      We need this problem to be fixed because Explorer is the main browser for our customer.

      Thanx in advance.