myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graeme Steyn" <g.st...@cqu.edu.au>
Subject RE: [Trinidad] tr:column header facets are not being rendered
Date Tue, 14 Aug 2007 03:23:29 GMT
Hi,
 
This is a quick update.  The problem was a REALLY simple mistake on my
part (at least I learnt a bit more about Facelets :-) ).  I had a typing
error for the xmlns for JSF core:
 
Was:
 
xmlns:f="http//java.sun.com/jsf/core"
 
Should have been (missing colon):
 
xmlns:f="http://java.sun.com/jsf/core"
 
This meant that the Namespace was not bound to the TagLibrary correctly,
as seen in the following log entries (Enable these log entries in
Glassfish via Application Server > Logging > Log Levels > Add Property >
facelets.compiler = FINE).
 
Starting Unit: TextUnit[0] and adding it to parent:
com.sun.facelets.compiler.CompilationUnit@117f2b1
Namespace Pushed : http://www.w3.org/1999/xhtml
Starting Unit: com.sun.facelets.compiler.NamespaceUnit@13e64e0 and
adding it to parent: TextUnit[0]
Namespace Pushed ui: http://java.sun.com/jsf/facelets
Namespace Pushed c: http://java.sun.com/jstl/core
Namespace Pushed tr: http://myfaces.apache.org/trinidad
Namespace Pushed f: http//java.sun.com/jsf/core
Namespace Pushed cqu: http://onlineapp.web.cis.cqu.edu.au/
Namespace Pushed ft: http://sourceforge.net/projects/facestrace/facelets
Tag Pushed: /views/applicationReview.xhtml @13,19 <html>
/views/applicationReview.xhtml @13,19
xmlns:ui="http://java.sun.com/jsf/facelets" Namespace Bound to
TagLibrary
/views/applicationReview.xhtml @13,19
xmlns:c="http://java.sun.com/jstl/core" Namespace Bound to TagLibrary
/views/applicationReview.xhtml @13,19
xmlns:tr="http://myfaces.apache.org/trinidad" Namespace Bound to
TagLibrary
/views/applicationReview.xhtml @13,19
xmlns:cqu="http://onlineapp.web.cis.cqu.edu.au/" Namespace Bound to
TagLibrary
/views/applicationReview.xhtml @13,19
xmlns:ft="http://sourceforge.net/projects/facestrace/facelets" Namespace
Bound to TagLibrary
Starting Unit: TextUnit[0] and adding it to parent:
com.sun.facelets.compiler.NamespaceUnit@13e64e0
Tag Pushed: /views/applicationReview.xhtml @14,11 <head>
 
This explains why tables included as part of other compositions worked
well, but the tables configured directly in the affected page did not.
Facelets was not recognizing any of the f: tags due to my typo.
 
Regards,
 
Graeme.



________________________________

From: Graeme Steyn 
Sent: Friday, 10 August 2007 5:07 PM
To: MyFaces Discussion
Subject: [Trinidad] tr:column header facets are not being rendered


Hi,
 
I was hoping that someone may be able to point me in the right direct
with a problem that I am experiencing.  Basically, I have a number of
tables within a form.  I have applied some basic css to the column
header text.  When the form is rendered, the first table in the form
does not render the column header facets if there is no content.  When
there are data rows, then the facets are rendered, but not styled.
However, the other tables in the form do render the column header facets
and apply the styling correctly.  I cannot see any obvious difference
between the table definitions that would produce this difference in
behavior.
 
The two tables also produce different html and facelets debug
information.  I have provided the details below.  Any pointers would be
greatly appreciated.
 
Regards,
 
Graeme.
 
Environment: JSF 1.2, Trinidad 1.2.1, Facelets 1.1.12, Glassfish 1 ur 1
p03.
 
Problem Table:
 
  <tr:table
      id="applSubmitted"
      emptyText="#{bundle.appRvSubmittedTableEmpty}"
      value="#{visit.candidate.admissionApplCollection}"
      var="completedAppls"
      rowBandingInterval="1"
      horizontalGridVisible="true"
      verticalGridVisible="true"
      shortDesc="#{bundle.appRvSubmittedRefNbrs}"
      summary="#{bundle.appRvSubmittedRefNbrs}"
      width="750px" >
      
      <tr:column headerNoWrap="true">
          <f:facet name="header">
              <tr:outputText
                  value="#{bundle.appRvReference}"
                  shortDesc="#{bundle.appRvReference}" />
          </f:facet>
          <tr:panelGroupLayout
              layout="vertical" >
              <tr:outputText value="#{completedAppls.admissionApplId}" >
                  <f:convertNumber pattern="000000000000"/>
              </tr:outputText>
              <tr:outputText value="#{completedAppls.timeStamp}" >
                  <tr:convertDateTime type="date" />
              </tr:outputText>
              <tr:outputText value="#{completedAppls.timeStamp}" >
                  <tr:convertDateTime type="time" />
              </tr:outputText>
          </tr:panelGroupLayout>
      </tr:column>
:
:
   </tr:table>
 
Facelets Debug Info:
 
    <CoreTable allDetailsEnabled="false" autoSubmit="false"
columnBandingInterval="0" emptyText="No applications for admission have
been submitted. " first="0" horizontalGridVisible="true"
id="applSubmitted" immediate="false" rendered="true"
rowBandingInterval="1" rowIndex="-1" rowSelection="none" rows="25"
shortDesc="You have successfully submitted the following applications
during this session. " showAll="false" summary="You have successfully
submitted the following applications during this session. "
transient="false" var="completedAppls" verticalGridVisible="true"
width="750px">
    <CoreColumn align="start" defaultSortOrder="ascending"
headerNoWrap="true" id="j_id27" noWrap="false" rendered="true"
rowHeader="false" separateRows="false" sortable="false"
transient="false">
        <f:facet name="header">
            <CoreOutputText escape="true" id="j_id29" rendered="true"
shortDesc="Reference Details." transient="false" truncateAt="0"
value="Reference Details."/>
        </f:facet>
        <CorePanelGroupLayout id="j_id31" layout="vertical"
rendered="true" transient="false">
            <CoreOutputText escape="true" id="j_id32" rendered="true"
transient="false" truncateAt="0">
                <f:convertNumber pattern="000000000000"/>
            </CoreOutputText>
            <CoreOutputText
converter="org.apache.myfaces.trinidadinternal.convert.DateTimeConverter
@b9f16ec1" escape="true" id="j_id34" rendered="true" transient="false"
truncateAt="0"/>
            <CoreOutputText
converter="org.apache.myfaces.trinidadinternal.convert.DateTimeConverter
@fb2426f0" escape="true" id="j_id35" rendered="true" transient="false"
truncateAt="0"/>
        </CorePanelGroupLayout>
    </CoreColumn>
    <CoreColumn align="start" defaultSortOrder="ascending"
headerNoWrap="true" id="j_id36" noWrap="false" rendered="true"
rowHeader="false" separateRows="false" sortable="false"
transient="false">
        <f:facet name="header">
            <CoreOutputText escape="true" id="j_id38" rendered="true"
shortDesc="Career" transient="false" truncateAt="0" value="Career"/>
        </f:facet>
        <CoreOutputText escape="true" id="j_id40" rendered="true"
transient="false" truncateAt="0"/>
    </CoreColumn>
 
Html:
 
    <!--Start: org.apache.myfaces.trinidad.Table["applSubmitted"]--><div
id="applSubmitted" title="You have successfully submitted the following
applications during this session. "><table cellpadding="0"
cellspacing="0" border="0" width="750px" summary=""><tr>
    <td><table class="af_table_content" cellpadding="1" cellspacing="0"
border="0" width="100%" summary="You have successfully submitted the
following applications during this session. "><tr>
            <td class="af_column_cell-text OraTableBorder1111">No
applications for admission have been submitted. </td>
            
            <td class="af_column_cell-text OraTableBorder1111"></td>
            
            <td class="af_column_cell-text OraTableBorder1111"></td>
            
            <td class="af_column_cell-text OraTableBorder1111"></td>
            
            <td class="af_column_cell-text OraTableBorder1111"></td>
            
            <td class="af_column_cell-text OraTableBorder1111"></td>
            
            <td class="af_column_cell-text OraTableBorder1111"></td>
            
            <td class="af_column_cell-text OraTableBorder1111"></td>
    </tr></table>
                        
Working Table:
 
   <tr:table
       id="empTbl"
       shortDesc="#{bundle.empTableTitle}"
       binding="#{employmentBean.employmentTableComponent}"
       rowSelection="multiple"
       value="#{visit.candidate.employmentCollection}"
       var="employmentEntry"
       varStatus="statusVar">
       
       <f:facet name="actions">
           <tr:panelButtonBar
               id="addRemove">
               
               <tr:commandButton 
                   id="add"
                   text="Add"
                   disabled="#{formReadOnly}"
                   immediate="true"
                   actionListener="#{employmentBean.performAdd}"/>
               <tr:commandButton  
                   id="delete"
                   text="Delete"
                   disabled="#{formReadOnly}"
                   immediate="true"
                   actionListener="#{employmentBean.performDelete}"/>
               
           </tr:panelButtonBar>
       </f:facet>
       
       <tr:column>
           <f:facet name="header">
               <tr:outputText value="#{bundle.empFromDateHeader}" />
           </f:facet>
           <tr:inputDate
               id="from"
               label="#{bundle.empFromDateHeader}"
               value="#{employmentEntry.fromDate}"
               disabled="#{formReadOnly}"
               shortDesc="#{bundle.empFromDateHeader}">
           </tr:inputDate>
       </tr:column>
:
:
    </tr:table>
 
Facelets Debug Info:
 
    <CoreTable actions="CorePanelButtonBar[UIXFacesBeanImpl,
id=ausAddRemove]" allDetailsEnabled="false" autoSubmit="false"
columnBandingInterval="0" first="0" horizontalGridVisible="true"
id="ausTertiaryHistory" immediate="false"
partialTriggers="[Ljava.lang.String;@16993e6" rendered="false"
rowBandingInterval="0" rowIndex="-1" rowSelection="multiple" rows="25"
shortDesc="Australian Tertiary Education History" showAll="false"
transient="false" var="entry" verticalGridVisible="true" width="750px"
binding="#{education.ausTertiaryEducationTable}">
    actions
    <CorePanelButtonBar id="ausAddRemove" rendered="true"
transient="false">
        <CoreCommandButton accessKey=""
actionListener="#{education.performAddAus}" blocking="false"
disabled="true" id="ausAdd" immediate="true" partialSubmit="false"
rendered="true" text="Add" transient="false" useWindow="false"
windowHeight="0" windowWidth="0"/>
        <CoreCommandButton accessKey=""
actionListener="#{education.performAusDelete}" blocking="false"
disabled="true" id="ausDelete" immediate="true" partialSubmit="false"
rendered="true" text="Delete" transient="false" useWindow="false"
windowHeight="0" windowWidth="0"/>
    </CorePanelButtonBar>
    <CoreColumn align="start" defaultSortOrder="ascending"
header="CoreOutputText[UIXFacesBeanImpl, id=j_id199]"
headerNoWrap="false" id="j_id198" noWrap="false" rendered="true"
rowHeader="false" separateRows="false" sortable="false"
transient="false">
        header
        <CoreOutputText escape="true" id="j_id199" rendered="true"
transient="false" truncateAt="0" value="Name of Institution/School"/>
        <CoreSelectOneChoice accessKey="" autoSubmit="false"
disabled="true" id="ausHep" immediate="false" label="Name of
Institution/School" localValueSet="false" readOnly="false"
rendered="true" required="false" shortDesc="Name of Institution/School"
showRequired="false" simple="false" transient="false" valid="true"
valuePassThru="false">
            <UISelectItems id="j_id200" rendered="true"
transient="false"/>
        </CoreSelectOneChoice>
    </CoreColumn>
    
Html:
 
    <!--Start: org.apache.myfaces.trinidad.Table["empTbl"]--><div
id="empTbl" title="Employment History"><table cellpadding="0"
cellspacing="0" border="0" summary=""><tr>
        <td><table cellpadding="0" cellspacing="0" border="0"
width="100%" summary="" class="af_table_control-bar-top"><tr>
                    <td><!--Start:
org.apache.myfaces.trinidad.Panel["addRemove"]--><table cellpadding="0"
cellspacing="0" border="0" summary="" id="empTbl:addRemove"
class="af_panelButtonBar"><tr>
                                <td><!--Start:
org.apache.myfaces.trinidad.Command["add"]-->
                                    <button id="empTbl:add"
name="empTbl:add" type="button" disabled class="af_commandButton
p_AFDisabled">Add</button>
                                </td>
                                
                                <td><script>var
_tURL="/ProgEnrol/adf/images/t.gif";var _axm=1;t(10,1)</script></td>
                                
                                <td><!--Start:
org.apache.myfaces.trinidad.Command["delete"]-->
                                    <button id="empTbl:delete"
name="empTbl:delete" type="button" disabled class="af_commandButton
p_AFDisabled">Delete</button>
                                </td>
                    </tr></table></td>
                    
                    <td width="100%"></td>
        </tr></table></td>
    </tr><tr>
    <td><table class="af_table_content" cellpadding="1" cellspacing="0"
border="0" width="100%"><tr><!--Start:
org.apache.myfaces.trinidad.Column-->
            <th scope="col" width="1%" nowrap
class="af_column_header-icon-format"
style="word-break:keep-all">Select</th>
            <!--Start: org.apache.myfaces.trinidad.Column["j_id235"]-->
            <th scope="col" class="af_column_header-text
OraTableBorder0001"><!--Start:
org.apache.myfaces.trinidad.Output["j_id236"]-->Date From
(DD/MM/YYYY)</th>
            <!--Start: org.apache.myfaces.trinidad.Column["j_id237"]-->
            <th scope="col" class="af_column_header-text
OraTableBorder0001"><!--Start:
org.apache.myfaces.trinidad.Output["j_id238"]-->Date To
(DD/MM/YYYY)</th>
            <!--Start: org.apache.myfaces.trinidad.Column["j_id239"]-->
            <th scope="col" class="af_column_header-text
OraTableBorder0001"><!--Start:
org.apache.myfaces.trinidad.Output["j_id240"]-->Employer</th>
            <!--Start: org.apache.myfaces.trinidad.Column["j_id242"]-->
            <th scope="col" class="af_column_header-text
OraTableBorder0001"><!--Start:
org.apache.myfaces.trinidad.Output["j_id243"]-->Position</th>
        </tr><tr>
            <td class="af_column_cell-text OraTableBorder1111"></td>
            
            <td class="af_column_cell-text OraTableBorder1111"></td>
            
            <td class="af_column_cell-text OraTableBorder1111"></td>
            
            <td class="af_column_cell-text OraTableBorder1111"></td>
            
            <td class="af_column_cell-text OraTableBorder1111"></td>
</tr></table>

Mime
View raw message