6 Replies Latest reply on May 2, 2011 8:50 AM by jobmathew

    conditional compilation is turned off ON IE when using EL expression

    jobmathew

      Hi

       

      Am getting the lots and lots of waring error messages on the IE status bar.

       

      the major issue is

      conditional compilation is turned off

       

      when using the EL expression

      [code]

      styleClass="#{record.flag=='red? 'bgRed': record.flag=='greed'? 'bgGreen': record.flag=='yellow'? 'bgYellow':'bgOrange' }"

       

       

      <style>

          .bgRed{background-color: red; }

          .bgGreen{background-color: green; }

          .bgYellow{background-color: yellow; }

          .bgOrange{background-color: orange; }

      </style>

      [/code]

      can any one suggest me how can i fix this issue.

       

      thanks in advance

        • 1. conditional compilation is turned off ON IE when using EL expression
          lfryc

          Hi Mathew,

           

          could you please the details of error messages?

           

          I can't see any connection between error messages (in IE status bar) and your code snippet.

           

           

          How did you turned conditional compilation off?

          • 2. Re: conditional compilation is turned off ON IE when using EL expression
            jobmathew

            Webpage error details

             

            User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; IE0006_ver1;EN_GB)

            Timestamp: Mon, 2 May 2011 10:57:14 UTC

             

            i tooked the page source from th IE and looked into line 200.

            and the line 200 was the HTML transilation of the above described Richface code.

             

            Message: Conditional compilation is turned off

            Line: 200

            Char: 10

            Code: 0

            URI: http://xxxx/xxxx/Login.jsf;jsessionid=8CBADC6D0B5BB4BC689B6348308354E9

             

             

            Message: Conditional compilation is turned off

            Line: 1

            Char: 10

            Code: 0

            URI: ttp://xxxx/xxxx/Login.jsf;jsessionid=8CBADC6D0B5BB4BC689B6348308354E9

             

             

            Message: Conditional compilation is turned off

            Line: 1

            Char: 10

            Code: 0

            URI:ttp://xxxx/xxxx/Login.jsf;jsessionid=8CBADC6D0B5BB4BC689B6348308354E9

            • 3. Re: conditional compilation is turned off ON IE when using EL expression
              jobmathew

              i tooked the page source from th IE and looked into line 200.

              and the line 200 was the HTML transilation of the above described Richface code.

               

              By defalut it was like this.

               

              I havnt tuned off any thing.....

              • 4. conditional compilation is turned off ON IE when using EL expression
                lfryc

                I'm sorry, I misunderstand your first post. :-)

                 

                Could you please provide minimalistic sample where it will be possible to reproduce this issue?

                 

                 

                Thank you,

                 

                - Lukas

                • 5. conditional compilation is turned off ON IE when using EL expression
                  jobmathew

                  <ui:composition 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:a4j="http://richfaces.org/a4j"

                        xmlns:rich="http://richfaces.org/rich">           

                      <style>

                       .head2 {

                          background-image : url("");       

                          height:10px;

                          text-align:center;

                          vertical-align:top;

                          padding:4px 0;      

                      }

                      .col{

                          vertical-align: middle;       

                      }

                      .bgWhite{text-align: center; }

                      .bgRed{background-color: red;text-align: center; }

                      .bgGreen{background-color: #85DF28;text-align: center; }

                      .bgYellow{background-color: yellow;text-align: center; }

                      .bgOrange{background-color: orange; text-align: center;}

                  </style>

                      <a4j:keepAlive beanName="test"/>

                       <a4j:form id="testa">

                             <rich:dataTable 

                               onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"

                               cellpadding="0" cellspacing="0" id="table"  rowKeyVar="row" onclick="row=@this"

                               width="100%" border="0" var="record" value="#{test.li}" rows="20" >            

                               <f:facet name="header">

                              Test

                               </f:facet>           

                                      

                                       <rich:column style="text-align: center;" width="50px">

                                          <f:facet name="header">Index</f:facet>

                                          #{row+1}

                                      </rich:column> 

                                     

                                       <rich:column width="150" styleClass="#{record=='f'? 'bgWhite':record=='a'? 'bgGreen': record =='s'? 'bgYellow': record=='d'? 'bgRed':'bgOrange'}" >

                                               <f:facet name="header">

                                               <h:outputText value="Result" />

                                           </f:facet>

                                               <h:outputText value="#{record}"/>

                                       </rich:column>       

                               <f:facet name="footer">

                                     <rich:datascroller renderIfSinglePage="false" />

                              </f:facet>                    

                           </rich:dataTable>

                       </a4j:form>   

                  </ui:composition>

                   

                   

                  package src;

                   

                  import java.util.ArrayList;

                  import java.util.List;

                   

                  public class Test {

                   

                      private List<String> li = new ArrayList<String>();

                   

                      public Test() {

                          li.add("a");

                          li.add("s");

                          li.add("d");

                          li.add("f");

                      }

                   

                      /**

                       * @return the li

                       */

                      public List<String> getLi() {

                          return li;

                      }

                   

                      /**

                       * @param li

                       *            the li to set

                       */

                      public void setLi(List<String> li) {

                          this.li = li;

                      }

                   

                  }

                  • 6. conditional compilation is turned off ON IE when using EL expression
                    jobmathew

                    Webpage error details

                     

                    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; IE0006_ver1;EN_GB)

                    Timestamp: Mon, 2 May 2011 12:47:56 UTC

                     

                     

                    Message: Conditional compilation is turned off

                    Line: 18

                    Char: 10

                    Code: 0

                    URI: http://localhost:8080/xxI/test.jsf

                     

                     

                    view Source

                     

                     

                     

                        <html  xmlns="http://www.w3.org/1999/xhtml"><head><link class="component" href="/xx/a4j/s/3_3_3.Finalorg/richfaces/renderkit/html/css/basic_both.xcss/DATB/eAFrvajdHLp8hjQAEgwDtA__.jsf;jsessionid=F03EE42E68C2D51BB134D5086BE74C46" rel="stylesheet" type="text/css" /><link class="component" href="/xx/a4j/s/3_3_3.Finalorg/richfaces/renderkit/html/css/extended_both.xcss/DATB/eAFrvajdHLp8hjQAEgwDtA__.jsf;jsessionid=F03EE42E68C2D51BB134D5086BE74C46" media="rich-extended-skinning" rel="stylesheet" type="text/css" /><script src="/xx/a4j/g/3_3_3.Finalorg.ajax4jsf.javascript.AjaxScript.jsf" type="text/javascript"></script><script src="/xx/a4j/g/3_3_3.Finalorg/ajax4jsf/javascript/scripts/form.js.jsf" type="text/javascript"></script><link class="component" href="/xx/a4j/s/3_3_3.Finalcss/table.xcss/DATB/eAFrvajdHLp8hjQAEgwDtA__.jsf;jsessionid=F03EE42E68C2D51BB134D5086BE74C46" rel="stylesheet" type="text/css" /><script src="/xx/a4j/g/3_3_3.Finalorg.ajax4jsf.javascript.PrototypeScript.jsf" type="text/javascript"></script><script src="/xx/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/datascroller.js.jsf" type="text/javascript"></script><link class="component" href="/xx/a4j/s/3_3_3.Finalcss/datascroller.xcss/DATB/eAFrvajdHLp8hjQAEgwDtA__.jsf;jsessionid=F03EE42E68C2D51BB134D5086BE74C46" rel="stylesheet" type="text/css" /><script type="text/javascript">window.RICH_FACES_EXTENDED_SKINNING_ON=true;</script><script src="/xx/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/skinning.js.jsf" type="text/javascript"></script></head><style>

                         .head2 {

                            background-image : url("");       

                            height:10px;

                            text-align:center;

                            vertical-align:top;

                            padding:4px 0;      

                        }

                        .col{

                            vertical-align: middle;       

                        }

                        .bgWhite{text-align: center; }

                        .bgRed{background-color: red;text-align: center; }

                        .bgGreen{background-color: #85DF28;text-align: center; }

                        .bgYellow{background-color: yellow;text-align: center; }

                        .bgOrange{background-color: orange; text-align: center;}

                    </style><form id="testa" name="testa" method="post" action="/xx/test.jsf;jsessionid=F03EE42E68C2D51BB134D5086BE74C46"><table class="rich-table " id="testa:table" border="0" cellpadding="0" cellspacing="0" onclick="row=@this" width="100%"><colgroup span="2"></colgroup><thead class="rich-table-thead"><tr class="rich-table-header  "><th class="rich-table-headercell  " colspan="2" scope="colgroup">

                                Test</th></tr><tr class="rich-table-subheader "><th class="rich-table-subheadercell  " scope="col" id="testa:table:j_id2header"><div id="testa:table:j_id2header:sortDiv">Index</div></th><th class="rich-table-subheadercell  " scope="col" id="testa:table:j_id5header"><div id="testa:table:j_id5header:sortDiv">Result</div></th></tr></thead><tfoot><tr class="rich-table-footer  "><td class="rich-table-footercell  " colspan="2" scope="colgroup"><div class="rich-datascr " id="testa:table:j_id8" style=" ; display: none" align="center"><script type="text/javascript">new Richfaces.Datascroller('testa:table:j_id8', function(event){A4J.AJAX.Submit('testa',event,{'ignoreDupResponses':true,'implicitEventsQueue':'testa:table:j_id8','similarityGroupingId':'testa:table:j_id8','parameters':{'ajaxSingle':'testa:table:j_id8','testa:table:j_id8':event.memo.page} ,'actionUrl':'/xx/test.jsf;jsessionid=F03EE42E68C2D51BB134D5086BE74C46'} ); return false;});</script></div></td></tr></tfoot><tbody id="testa:table:tb"><tr class="rich-table-row rich-table-firstrow " onmouseout="this.style.backgroundColor='#FFFFFF'"><td class="rich-table-cell " id="testa:table:0:j_id2" style="text-align: center;" width="50px">

                                            1</td><td class="rich-table-cell bgGreen" id="testa:table:0:j_id5" width="150">a</td></tr><tr class="rich-table-row " onmouseout="this.style.backgroundColor='#FFFFFF'"><td class="rich-table-cell " id="testa:table:1:j_id2" style="text-align: center;" width="50px">

                                            2</td><td class="rich-table-cell bgYellow" id="testa:table:1:j_id5" width="150">s</td></tr><tr class="rich-table-row " onmouseout="this.style.backgroundColor='#FFFFFF'"><td class="rich-table-cell " id="testa:table:2:j_id2" style="text-align: center;" width="50px">

                                            3</td><td class="rich-table-cell bgRed" id="testa:table:2:j_id5" width="150">d</td></tr><tr class="rich-table-row " onmouseout="this.style.backgroundColor='#FFFFFF'"><td class="rich-table-cell " id="testa:table:3:j_id2" style="text-align: center;" width="50px">

                                            4</td><td class="rich-table-cell bgWhite" id="testa:table:3:j_id5" width="150">f</td></tr></tbody></table><input type="hidden" autocomplete="off" name="testa" value="testa" /><input type="hidden" autocomplete="off" name="autoScroll" value="" /><input type="hidden" autocomplete="off" name="testa:_link_hidden_" value="" /><input type="hidden" autocomplete="off" name="testa:j_idcl" value="" /><script type="text/javascript">function clear_testa() {

                    _clearJSFFormParameters('testa','',['testa:_link_hidden_','testa:j_idcl']);

                    }

                    function clearFormHiddenParams_testa(){clear_testa();}

                    function clearFormHiddenParams_testa(){clear_testa();}

                    clear_testa();</script><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id1" /></form></html>