users@javaserverfaces.java.net

List|Detal in panelTabbedPane

From: ChrisC <ChrisC_at_Dive100.Freeserve.co.uk>
Date: Mon, 19 Mar 2007 08:29:44 -0700 (PDT)

Hi

I have a listtable-detail view coded in MyFaces which works until I enbed
the page in a <t:panelTab>.
Thus I have a JSP with two <jsp:include>s pointing to a page with a
dataTable and a dataScroller on it and in the other include a
panelTabbedPane which is rendered according to logic controlled by an input
button.

This all works fine - the hidden jsp appears when the button is clicked and
the scroller progreesses through the db records.

However when I place the page in another panelTabbedPanel using
<f:subview><jsp:include page=""></f:subview> clicking the button or scroller
gived a javascript error.

I have googled and haven't found anything apart from trying to remove
<h:form> tags due to the tabbed view possibly having autoforms. With this
the page won't display at all.

Any help would be most appreciated

Reagrds

Chris

Main JSP:

<%@ 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>
<head>
<title></title>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</head>
<body>
<h:form>
<t:div style="width:70%">

<t:panelGrid columns="1" cellpadding="2" cellspacing="2" >
<t:column>
<f:subview id="eh">
<jsp:include page="Header.jsp" flush="false"/>
</f:subview>
</t:column>
<t:column></t:column>
<t:column>
<f:subview id="ed" rendered="#{myTable.showDetailView}">
<jsp:include page="DetailTab.jsp" flush="false"/>
</f:subview>
</t:column>
<t:column>
<t:commandButton action="#{myBean.save}" value="Save" />
<t:commandButton action="#{myBean.cancel}" value="Cancel" />
</t:column>
</t:panelGrid>

</t:div>
</h:form>

</body>
</html>




First include - with dataTable and dataScroller:

<%@ 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" %>

 
 <t:dataTable value="#{myTable.table}" var="data"
            id="Data" cellpadding="0" cellspacing="0" width="100%"
border="0"
            preserveDataModel="false"
            forceId="true"
            rows="6"
            rowClasses ="odd,odd,odd,even,even,even"
            rowIndexVar ="rowIndex"
   <t:column>
     <t:graphicImage value="images/checkmark.gif" alt="Current Selection">
     </t:graphicImage>
   </t:column>
   <t:column>
     <f:facet name="header" >
       <h:outputText value="Select One" id="h1"/>
     </f:facet>
      <t:commandLink action="#{myTable.view}" >
      <t:graphicImage value="images/edit_icon.gif" border="0" alt="Click
here to edit the record" />
       <f:param name="selectedRowIndex" value="#{data.id}"/>
      </t:commandLink>
     </t:column>
     <t:column id="c1">
       <f:facet name="header" >
         <t:commandSortHeader columnName="name" arrow="true" id="s1">
          <h:outputText value="Name" id="h2"/>
         </t:commandSortHeader>
       </f:facet>
       <t:inputText value="#{data.name}" id="p1"/>
       <f:verbatim> </f:verbatim>
       <t:inputText value="#{data.price}" id="p2"/>
     </t:column>
      <t:column id="c3">
        <f:facet name="header">
          <h:outputText value="Address" id="h3"/>
        </f:facet>
        <t:inputText value="#{data.colour}" id="a1" size="35"
maxlength="100" />
        <f:verbatim> </f:verbatim>
        <t:inputText value="#{data.description}" size="10" maxlength="20"
id="a2"/>
        <f:verbatim> </f:verbatim>
        <t:inputText value="#{data.owner}" size="2" maxlength="2"
id="a3"/>
        <f:verbatim> </f:verbatim>
        <t:inputText value="#{data.size}" size="5" maxlength="10"
id="a4"/>
      </t:column>
</t:dataTable>

<h:panelGrid columns="22" cellpadding="0" cellspacing="0" border="0"
width="80" >
<t:dataScroller id="DataScroller"
        for="Data"
        fastStep="10"
        pageCountVar="pageCount"
        pageIndexVar="pageIndex"
        paginator="true"
        paginatorMaxPages="9"
        paginatorTableClass="paginator"
        paginatorActiveColumnStyle="font-weight:bold;"
>
<f:facet name="first" >
<h:graphicImage url="images/FirstPage.gif" style="margin-top:4pt;"/>
</f:facet>
<f:facet name="last">
<h:graphicImage url="images/LastPage.gif" style="margin-top:4pt;"/>
</f:facet>
<f:facet name="previous">
<h:graphicImage url="images/PreviousItem.gif" style="margin-top:4pt;"/>
</f:facet>
<f:facet name="next">
<h:graphicImage url="images/NextItem.gif" style="margin-top:4pt;"/>
</f:facet>
</t:dataScroller>
</h:panelGrid>





-- 
View this message in context: http://www.nabble.com/List%7CDetal-in-panelTabbedPane-tf3427800.html#a9554374
Sent from the javaserverfaces users mailing list archive at Nabble.com.