Hi L Frohman,

It solved my problem... I don't realize that outputLabel must have 'for' attribute. Thank you very much.

Regards,

Feris


On 9/15/06, L Frohman <[EMAIL PROTECTED]> wrote:
Why do you have
 
<h:outputLabel value=" " styleClass="rightDescription"/>
without a for="">
Can't this just be <h:outputText ...> ?


From: Feris Thia [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 14, 2006 8:20 AM
To: MyFaces Discussion
Subject: Attribute 'for' is not defined

Dear All,

I have warning in Tomcat console like this :

============================================================
WARNING: Attribute 'for' of label component with id myform:_idJsp96 is not defined
============================================================

in my jsp file which is below. What's wrong with my jsp code ?

============================================================
<!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="" />
</HEAD>
<BODY>
<jsp:include page="/include/header.jsp"/>
<h:form id="myform">

<h:panelGrid columns="1" width="100%" border="0">
    <f:loadBundle basename="org.apache.myfaces.examples.resource.example_messages" var="example_messages"/>

    <h:panelGrid columns="3"  border="0">
        <h:outputText value="Kata Kunci : " styleClass="labelSearch"/>
        <h:inputText binding="#{searchBean.searchInputText}" styleClass="textSearch"/>
       
        <h:commandButton id="validateButton" type="submit" value="Cari" actionListener="#{ searchBean.doSearch}" styleClass="searchButton"/>
        <h:panelGroup />
        <h:panelGroup />
        <h:panelGroup />
    </h:panelGrid>

    <h:panelGrid columns="2" columnClasses="set_to_top1,set_to_top2" width="100%" border="0">
    <h:panelGroup id="body">
        <t:dataTable id="data"
                styleClass="searchTable"
                headerClass="standardTable_Header"
                footerClass="standardTable_Header"
                rowClasses="standardTable_Row1,standardTable_Row2"
                columnClasses="standardTable_ColumnCentered,standardTable_ColumnCentered,standardTable_ColumnCentered,standardTable_ColumnCentered"
                var="docs"
                value="#{mydocs.data}"
                preserveDataModel="true"
                rows="10"
                binding="#{ mydocs.objHTMLDataTable}"
           >
           <h:column>
                <f:facet name="header">
                    <h:outputText value="ID" />
               </f:facet>
               <h:outputText value="#{docs.documentID}" />
           </h:column>
   
           <h:column>
               <f:facet name="header">
                  <h:outputText value="#{ prop.documentNameLabel}" />
               </f:facet>
               <h:outputText value="#{docs.documentName}" />
           </h:column>

           <h:column>
               <f:facet name="header">
                  <h:outputText value="#{prop.fileNameLabel}" />
               </f:facet>
               <h:outputText value="#{ docs.fileName}" />
           </h:column>

            <h:column>
               <f:facet name="header">
                 <h:outputText value="Detail"/>
               </f:facet>
               <h:commandLink action="">                   <h:outputText value="Detail" styleClass="HSButton"/>
                  <f:param name="rowID" value="#{docs.documentID}"/>
                  <f:param name="indexID" value="#{docs.indexID}"/>
                  <f:param name="keyword" value="#{ searchBean.searchInputText}"/>
               </h:commandLink>
             </h:column>
        </t:dataTable>

        <h:panelGrid columns="1" styleClass="contentTable" columnClasses="standardTable_ColumnCentered" width="100%" >
            <t:dataScroller id="scroll_1"
                    for="">                    fastStep="10"
                    pageCountVar="pageCount"
                    pageIndexVar="pageIndex"
                    styleClass="scroller"
                    paginator="true"
                    paginatorMaxPages="9"
                    paginatorTableClass="paginator"
                    paginatorActiveColumnStyle="font-weight:bold;"
                    immediate="true"
                    >
                <f:facet name="first" >
                    <t:graphicImage url="" border="1" />
                </f:facet>
                <f:facet name="last">
                    <t:graphicImage url="" last.gif" border="1" />
                </f:facet>
                <f:facet name="previous">
                    <t:graphicImage url="" border="1" />
                </f:facet>
                <f:facet name="next">
                    <t:graphicImage url="" border="1" />
                </f:facet>
                <f:facet name="fastforward">
                    <t:graphicImage url="" border="1" />
                </f:facet>
                <f:facet name="fastrewind">
                    <t:graphicImage url="" border="1" />
                </f:facet>
            </t:dataScroller>
            <h:panelGroup />
            <t:dataScroller id="scroll_2"
                    for="">                    rowsCountVar="rowsCount"
                    displayedRowsCountVar="displayedRowsCountVar"
                    firstRowIndexVar="firstRowIndex"
                    lastRowIndexVar="lastRowIndex"
                    pageCountVar="pageCount"
                    immediate="true"
                    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:panelGroup id="body2">
        <h:panelGrid columns="4" styleClass="scrollerTable2" >
        <h:outputLabel for="" value=" " styleClass="rightDescription"/>
        <h:outputLabel for="" value="ID Dokumen" styleClass="rightDescription"/>
        <h:outputLabel for="" value=":" styleClass="rightDescription"/>
        <h:outputText id="doc_id" value="#{DownloadBean.documentID}" styleClass="theDescription"/>

        <h:outputLabel for="" value=" " styleClass="rightDescription"/>
        <h:outputLabel for="" value="Nama File" styleClass="rightDescription"/>
        <h:outputLabel for="" value=":" styleClass="rightDescription"/>
        <h:outputText id="doc_filename" value="#{DownloadBean.fileName}" styleClass="theDescription"/>

        <h:outputLabel for="" value=" " styleClass="rightDescription"/>
        <h:outputLabel for="" value="Nama Dokumen" styleClass="rightDescription"/>
        <h:outputLabel for="" value=":" styleClass="rightDescription"/>
        <h:outputText id="doc_name" value="#{DownloadBean.documentName}" styleClass="theDescription"/>

        <h:outputLabel for="" value=" " styleClass="rightDescription"/>
        <h:outputLabel for="" value="Deskripsi" styleClass="rightDescription"/>
        <h:outputLabel for="" value=":" styleClass="rightDescription"/>
        <h:outputText id="doc_description" value="#{DownloadBean.documentDescription}" styleClass="theDescription"/>
       

        <h:outputLabel for="" value=" " styleClass="rightDescription"/>
        <h:outputLabel for="" value=" " styleClass="rightDescription"/>
        <h:outputLabel for="" value=" " styleClass="rightDescription"/>
        <h:outputLabel for="" value=" " styleClass="rightDescription"/>
       
        <h:outputLabel for="" value=" " styleClass="rightDescription"/>
        <h:outputLabel for="" value=" " styleClass="rightDescription"/>
        <h:outputLabel for="" value=" " styleClass="rightDescription"/>
        <h:commandButton disabled="#{DownloadBean.disableButton}" action="" value="Download" styleClass="downloadButton" />

        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>

        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:commandButton disabled="#{DownloadBean.disableButtonDelete}" action="" value="Hapus" styleClass="deleteButton" window.confirm ('Anda yakin ?')"/>

        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>

        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>

        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>

        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>

        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>
        <h:outputLabel value=" " styleClass="rightDescription"/>
        </h:panelGrid>
    </h:panelGroup>

    </h:panelGrid>
</h:panelGrid>
</h:form>
<jsp:include page="/include/footer.jsp"/>
</BODY>
</HTML>
</f:view>
============================================================

Regards,

Feris

Reply via email to