You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Grant Smith <wo...@gmail.com> on 2006/09/18 19:19:04 UTC
Extended DataTable + Facelets = occasional missed form submit ?
I'm hoping someone with extensive knowledge of the Tomahawk DataTable
component can weigh in on this one. It appears that if I use the component
in a facelets environment with preserveDataModel = "false", and binding
directly to a Datamodel, the very first form submission fails. Subsequent
submissions MOSTLY work, but it's very hard to pinpoint when they do or
don't. I've included a snippet of my code. If I remove the dataTable
component, or set preserveDataModel to "true", the form submits perfectly
every time. Has anyone else seen similar symptoms ?
<t:document xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:t="http://myfaces.apache.org/tomahawk">
<ui:composition template="decorators/tplate.xhtml">
<ui:define name="title">
<h:outputText value="Construction Schedule ::::: Inspection Date #{
schedulePaged.inspectionDate} ::::: Page #{schedulePaged.pageNo}"/>
</ui:define>
<ui:define name="jsfunctions">
<script src="inc/functions.js" type="text/javascript"></script>
</ui:define>
<ui:define name="body">
<t:dataTable id="schedulePagedTable"
styleClass="scheduleTable"
headerClass="schedHead"
footerClass="schedHead"
columnClasses="scheduleColumn"
rowClasses="scheduleRow"
var="sc"
value="#{schedulePaged.scheduleDataModel}"
preserveDataModel="false"
preserveSort="false"
rendered="#{globalOptions.currentDraw.open}"
onmouseover='setColColor(event,this,"#e5e5f1")'
onmouseout="setColColor(event,this,'')"
rowOnMouseOver='setRowColor(this,"#e5e5f1")'
rowOnMouseOut="setRowColor(this,'')"
rowOnKeyDown="setRowColor(this,'')"
rowOnKeyUp='setRowColor(this,"#e5e5f1")'
cellpadding="0"
cellspacing="0">
etc..
--
Grant Smith
Re: Extended DataTable + Facelets = occasional missed form submit ?
Posted by Grant Smith <wo...@gmail.com>.
False alarm!
It turns out the problem was me including the <h:form> in the facelet
template. Moving it out into the document solved the spurious submit problem
:)
Sorry...
On 9/18/06, Grant Smith <wo...@gmail.com> wrote:
>
> I'm hoping someone with extensive knowledge of the Tomahawk DataTable
> component can weigh in on this one. It appears that if I use the component
> in a facelets environment with preserveDataModel = "false", and binding
> directly to a Datamodel, the very first form submission fails. Subsequent
> submissions MOSTLY work, but it's very hard to pinpoint when they do or
> don't. I've included a snippet of my code. If I remove the dataTable
> component, or set preserveDataModel to "true", the form submits perfectly
> every time. Has anyone else seen similar symptoms ?
>
>
> <t:document xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ui=" http://java.sun.com/jsf/facelets"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core "
> xmlns:t="http://myfaces.apache.org/tomahawk">
> <ui:composition template="decorators/tplate.xhtml">
>
> <ui:define name="title">
> <h:outputText value="Construction Schedule ::::: Inspection Date
> #{schedulePaged.inspectionDate} ::::: Page #{schedulePaged.pageNo}"/>
> </ui:define>
> <ui:define name="jsfunctions">
> <script src="inc/functions.js" type="text/javascript"></script>
> </ui:define>
>
> <ui:define name="body">
> <t:dataTable id="schedulePagedTable"
> styleClass="scheduleTable"
> headerClass="schedHead"
> footerClass="schedHead"
> columnClasses="scheduleColumn"
> rowClasses="scheduleRow"
> var="sc"
> value="#{schedulePaged.scheduleDataModel}"
> preserveDataModel="false"
> preserveSort="false"
> rendered="#{globalOptions.currentDraw.open}"
> onmouseover='setColColor(event,this,"#e5e5f1")'
> onmouseout="setColColor(event,this,'')"
> rowOnMouseOver='setRowColor(this,"#e5e5f1")'
> rowOnMouseOut="setRowColor(this,'')"
> rowOnKeyDown="setRowColor(this,'')"
> rowOnKeyUp='setRowColor(this,"#e5e5f1")'
> cellpadding="0"
> cellspacing="0">
> etc..
>
>
>
> --
> Grant Smith
>
--
Grant Smith