I slightly modified Boris' code in order to try it inside the myfaces-example-simple project, and it works properly. Boris, perhaps you are not working with the latest version of the nightly build. Please, let me know your configuration. I also see some other Boris' post about a problem with Facelets and command-links, so the problem could be command-links and not detailStamp.
Here's the complete JSP code.

<%@ page session="false" contentType="text/html;charset=utf-8"%>
<%@ 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/tomahawk"; prefix="t"%>
<html>



<[EMAIL PROTECTED] file="inc/head.inc" %>

<body>

<f:view>

<f:loadBundle basename="org.apache.myfaces.examples.resource.example_messages" var="example_messages"/>

   <h:form>
<div style="width: 100%; height: 400px; overflow: auto;">
               <t:dataTable
                   var="row"
                   varDetailToggler="detailToggler"
                   renderedIfEmpty="false"
                   preserveDataModel="true"
                   value="#{countryList.countries}"
                   width="100%"
                   cellspacing="0" cellpadding="0"
                   styleClass="blue"
                   headerClass="blue"
                   columnClasses="blue"
                   rowClasses="blueodd,blueeven">
                   <t:column>
<f:facet name="header"><h:outputText value="Names"/></f:facet>
                       <h:outputText value="#{row.name}"/>
                   </t:column>
                   <t:column>
<f:facet name="header"><h:outputText value="Codes"/></f:facet>
                       <h:outputText value="#{row.isoCode}"/>
                   </t:column>
                   <t:column>
<f:facet name="header"><h:outputText value="Details"/></f:facet> <h:commandLink rendered="#{detailToggler.currentDetailExpanded}" action="#{detailToggler.toggleDetail}">
                           <h:outputText value="Hide"/>
                       </h:commandLink>
<h:commandLink rendered="#{!detailToggler.currentDetailExpanded}" action="#{detailToggler.toggleDetail}">
                           <h:outputText value="Show"/>
                       </h:commandLink>
                   </t:column>
                   <f:facet name="detailStamp">
                       <h:outputText value="test"/>
                   </f:facet>
               </t:dataTable>
           </div>

</h:form>
</f:view>

<[EMAIL PROTECTED] file="inc/page_footer.jsp" %>

</body>

</html>



Martin Marinschek ha scritto:

Any idea, Claudio?

regards,

Martin

On 2/12/06, Boris Kovalenko <[EMAIL PROTECTED]> wrote:
Hello!

       This code isn't working. Am I doing something wrong? The datatable is
populated, but when I clicking on "detail" - nothing happened. Of course
datatable is inside <h:form>

P.S. ALLOW_JAVASCRIPT is off (as problems with Facelets)

            <div style="width: 100%; height: 400px; overflow: auto;">
                <t:dataTable
                    var="row"
                    varDetailToggler="detailToggler"
                    renderedIfEmpty="false"
                    preserveDataModel="true"
                    value="#{usf.users}"
                    width="100%"
                    cellspacing="0" cellpadding="0"
                    styleClass="blue"
                    headerClass="blue"
                    columnClasses="blue"
                    rowClasses="blueodd,blueeven">
                    <t:column>
                        <f:facet name="header"><h:outputText
value="#{bundle['references.users.name']}"/></f:facet>
                        <h:outputText value="#{row.name}"/>
                    </t:column>
                    <t:column>
                        <f:facet name="header"><h:outputText
value="#{bundle['references.users.subscriber']}"/></f:facet>
                        <h:outputText value="#{row.subscriber}"/>
                    </t:column>
                    <t:column>
                        <f:facet name="header"><h:outputText
value="#{bundle['misc.details']}"/></f:facet>
                        <h:commandLink
rendered="#{detailToggler.currentDetailExpanded}"
action="#{detailToggler.toggleDetail}">
                            <h:outputText value="#{bundle['misc.hide']}"/>
                        </h:commandLink>
                        <h:commandLink
rendered="#{!detailToggler.currentDetailExpanded}"
action="#{detailToggler.toggleDetail}">
                            <h:outputText value="#{bundle['misc.show']}"/>
                        </h:commandLink>
                    </t:column>
                    <f:facet name="detailStamp">
                        <h:outputText value="test"/>
                    </f:facet>
                </t:dataTable>
            </div>

With respect,
       Boris



--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Reply via email to