Stylesheet tag not always appearing in rendered HTML
----------------------------------------------------

         Key: MYFACES-751
         URL: http://issues.apache.org/jira/browse/MYFACES-751
     Project: MyFaces
        Type: Bug
  Components: Tomahawk  
    Versions: 1.1.0    
 Environment: Windows XP
Tomcat 5.0.28
Java 1.4.2_09
    Reporter: James Cooper


The following JSP displays search results in an iframe.  In the JSP, the 
<t:stylesheet> tag is used twice to load two separate stylesheets.  The first 
time this JSP is called two <link> tags are rendered in the HTML, one for each 
stylesheet.  The second time the JSP is called, the <link> tag for the first 
<t:stylesheet> is missing from the HTML.  And, on the third call, neither 
<link> tag appears in the rendered HTML.


<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/extensions"; prefix="t"%>

<f:view>

<script language="javascript">

    function processRowClick(row)
    {
        // pass the list of column values for the row to a function on the 
parent window
        window.parent.postRowSelect(row);
        return false;
    }

    function processDblRowClick(row)
    {
        // pass the list of column values for the row to a function on the 
parent window
        processRowClick(row);
        window.parent.returnChoice();
    }

    function finishedLoading()
    {
        // pass the list of column values for the row to a function on the 
parent window
        window.parent.onTableLoad(document.getElementById("data"));
    }


</script>

<t:stylesheet path="/styles/dialog.jsp"/>
<t:stylesheet path="/styles/dts_styles.jsp" />


<body style="background-color:transparent;margin:0;padding:0;" 
onload="finishedLoading();">


<t:div rendered="#{!jsp$wizard$searchResults.dataAvailable}" 
styleClass="resultEntry">
   <t:outputText value="No data available.">
   </t:outputText>
</t:div>

<t:dataTable id="data"
         rendered="#{jsp$wizard$searchResults.dataAvailable}"
         forceId="true"
         headerClass="resultHeader"
         rowClasses="resultRegularRow"
         var="row"
         value="#{jsp$wizard$searchResults.data}"
         preserveDataModel="false"
         sortColumn="#{jsp$wizard$searchResults.sort}"
         sortAscending="#{jsp$wizard$searchResults.ascending}"
         preserveSort="true"
         rowOnMouseOver="this.className='resultHoverRow'"
         rowOnMouseOut="this.className='resultRegularRow'"
         rowOnDblClick="processDblRowClick(this);"
         rowOnClick="processRowClick(this);"
         rowId="#{row.id}"
         width="100%"
         >
    <h:column rendered="#{jsp$wizard$searchResults.multiSelect}">
        <h:selectBooleanCheckbox onclick = "this.checked = !this.checked;" 
style="width:12;height:12"/>
    </h:column>
    <t:columns id="columns" value="#{jsp$wizard$searchResults.columnHeaders}" 
var="columnHeader" style="width:#{columnHeader.width}">
        <f:facet name="header">
            <t:commandSortHeader columnName="#{columnHeader}" arrow="false">
                <f:facet name="ascending">
                    <t:graphicImage value="/images/ascending-arrow.gif"
                       rendered="true" border="0"/>
                </f:facet>
                <f:facet name="descending">
                    <t:graphicImage value="/images/descending-arrow.gif"
                        rendered="true" border="0"/>
                </f:facet>
                <h:outputText  styleClass="resultHeader" 
value="#{columnHeader}" />
            </t:commandSortHeader>
        </f:facet>
        <h:outputText styleClass="resultRegularRow" 
title="#{jsp$wizard$searchResults.tooltip}"
            value="#{jsp$wizard$searchResults.columnValue}" />
    </t:columns>
</t:dataTable>

</body>

</f:view>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to