Simplica

ProductsLearnPurchaseSupportDemoDownload
  [Search] Search   [Recent Topics] Recent Topics  
XML Parsing Error
Forum Index -> DataTable
Author Message
mambah


Joined: 12/14/2007 13:49:05
Messages: 2
Offline

I have the following code...

<e:datatable dataModel="#{hotelSearch.hotels}">
<e:dataTr>
<e:dataTd id="name">
<f:facet name="header">Name</f:facet>
#{ROW.name}
</e:dataTd>
<e:dataTd id="address">
<f:facet name="header">Address</f:facet>
#{ROW.address}
</e:dataTd>
<e:dataTd id="city">
<f:facet name="header">City, State</f:facet>
#{ROW.city}, #{ROW.state}, #{ROW.country}
</e:dataTd>
<e:dataTd id="zip">
<f:facet name="header">Zip</f:facet>
#{ROW.zip}
</e:dataTd>
</e:dataTr>
</e:datatable>

...and I'm getting "XML Parsing Error: mismatched tag. Expected: </input>" when I try to render the page. The problem is with this line, which is generated:

</script></td></tr><tr id="j_id26:bottomRow" class="dataTableBottom"><td width="100%" align="center"></td></tr></table><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="_id4" /><input type="hidden" name="ec_fid_ecs1" value="true"><input type="hidden" name="ec_focus_context" value="null"></form>

Any help would be appreciated.
adina_mihai
Simplica Team

Joined: 04/01/2007 00:00:00
Messages: 189
Offline

Please tell me what application server and JSF implementation are you using, since I couldn't reproduce this issue with Tomcat 5.5 and JSF 1.1_02.
mambah


Joined: 12/14/2007 13:49:05
Messages: 2
Offline

I'm using Seam 2.0, JSF 1.2, and Tomcat 6. Thanks.
adina_mihai
Simplica Team

Joined: 04/01/2007 00:00:00
Messages: 189
Offline

Try to use something like this:
<e:datatable dataModel="#{hotelSearch.hotels}">

<e:dataTr>
<e:dataTd id="name" labelText="Name" >
<f:facet name="header">
<e:td>
<h:outputText value="Name"/>
</e:td>
</f:facet>
//following line is not mandatory
//<h:outputText value="#{ROW.name}"/>
</e:dataTd>
</e:dataTr>
</e:datatable>

Datatable knows how to render rows according dataModel and according id of the dataTd. In this case, the user doesn't have to specify explicit their values. For further details, please consult http://www.simplica.com/learn.htm "DataTable Guide".
 
Forum Index -> DataTable
Go to:   
Powered by JForum 2.1.7 © JForum Team
Home   |  News   |  Contact   |  About   |  License   |  Privacy   |  Documentation
Copyright © 2012 Simplica Corporation. All rights reserved.