myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Feris Thia" <feris.apa...@gmail.com>
Subject Re: DataTable don't show up
Date Thu, 07 Sep 2006 17:07:32 GMT
Hi David,

On 9/7/06, David Friedman <humble@ix.netcom.com> wrote:
>
>  Neither way should work at all.  You need to have proper HTML 4.0structure. JSF is no
different.  In the first one you have f:view in the
> body but it should be AFTER the <Center> opening tag for proper HTML
> structure.  The second one is a really awful layout because you have f:view
> at the top before the opening HTML tag but you end it completely out of
> order in the BODY before a closing CENTER (followed by closing HTML tag).
> That is really not good HTML structure and like I wrote I am surprised your
> first one worked at all.
>

I see... now I have the page display correctly. Thank you very much for that
David, really appreciate it.



Regards,
> David
>


I'm now having a problem with the scroller navigation after having the page
structured like below :
==========================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<f:view>
<f:loadBundle basename="properties.phi" var="prop"/>
<HTML>
<HEAD>
<TITLE><h:outputText value="#{prop.appTitle}"/></TITLE>
<link rel="stylesheet" type="text/css" href="./css/basic.css" />
</HEAD>
<BODY>
<CENTER>
<h:form>
<TABLE BORDER=5>
  <TR><TH CLASS="TITLE">
  <h:outputText value="#{prop.appTitle}"/></TH></TR>
</TABLE>
<P>

    <h:panelGrid id="controlPanel" columns="2" border="1" cellspacing="0">
        <h:outputText id="helloInputLabel"  value="#{prop.userIDLabel}"/>

        <h:inputText id="helloInput" value="" required="true" />
    </h:panelGrid>

    <BR /><BR />

    <h:panelGroup id="mybody">
        <t:dataTable id="data"
                styleClass="scrollerTable"
                headerClass="standardTable_Header"
                footerClass="standardTable_Header"
                rowClasses="standardTable_Row1,standardTable_Row2"

columnClasses="standardTable_Column,standardTable_ColumnCentered,standardTable_Column"
                var="car"
                value="#{sample.states}"
                preserveDataModel="false"
                rows="10"
           >
           <h:column>
               <f:facet name="header">
                  <h:outputText value="Test1" />
               </f:facet>
               <h:outputText value="#{car[0]}" />
           </h:column>

           <h:column>
               <f:facet name="header">
                  <h:outputText value="Test2" />
               </f:facet>
               <h:outputText value="#{car[1]}" />
           </h:column>
        </t:dataTable>

        <h:panelGrid columns="1" styleClass="scrollerTable2"
columnClasses="standardTable_ColumnCentered">
          <t:dataScroller   id="scroll_1"
                            for="data"
                            fastStep="10"
                            pageCountVar="pageCount"
                            pageIndexVar="pageIndex"
                            styleClass="scroller"
                            paginator="true"
                            paginatorMaxPages="9"
                            paginatorTableClass="paginator"
                            paginatorActiveColumnStyle="font-weight:bold;">
            <f:facet name="first" >
                <t:graphicImage url="images/arrow-first.gif" border="1"/>
            </f:facet>
            <f:facet name="last">
                <t:graphicImage url="images/arrow-last.gif" border="1"/>
            </f:facet>
            <f:facet name="previous">
                <t:graphicImage url="images/arrow-previous.gif" border="1"/>
            </f:facet>
            <f:facet name="next">
                <t:graphicImage url="images/arrow-next.gif" border="1"/>
            </f:facet>
            <f:facet name="fastforward">
                <t:graphicImage url="images/arrow-ff.gif" border="1"/>
            </f:facet>
            <f:facet name="fastrewind">
                <t:graphicImage url="images/arrow-fr.gif" border="1"/>
            </f:facet>
          </t:dataScroller>
          <t:dataScroller   id="scroll_2"
                for="data"
                rowsCountVar="rowsCount"
                displayedRowsCountVar="displayedRowsCountVar"
                firstRowIndexVar="firstRowIndex"
                lastRowIndexVar="lastRowIndex"
                pageCountVar="pageCount"
                pageIndexVar="pageIndex">
              <h:outputFormat value="#{prop['outputformat_pages']}"
styleClass="standard" >
                  <f:param value="#{rowsCount}"/>
                  <f:param value="#{displayedRowsCountVar}"/>
                  <f:param value="#{firstRowIndex}"/>
                  <f:param value="#{lastRowIndex}"/>
                  <f:param value="#{pageIndex}"/>
                  <f:param value="#{pageCount}"/>
               </h:outputFormat>
          </t:dataScroller>
      </h:panelGrid>
    </h:panelGroup>
</h:form>
</CENTER>
</BODY>
</HTML>
</f:view>
==========================================================

With the code, I cannot navigate through pages. What's the problem ?

Regards,

Feris

Mime
View raw message