I got problems making a project. Some h tags won't show in the view.
This is the view code:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
>
<h:head>
<title>Facelet Title</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</h:head>
<h:body>
<div id="main">
<div id="header">
</div>
<div id="menu">
<ul>
<li><a href="#">Admin</a></li>
<li><a href="#">Home</a></li>
</ul>
</div>
<div id="content">
<h1>Lijst van opleidingen</h1>
<h:dataTable var="o" value="#{opleidingController.findAll()}" border="0" >
<h:column>
<f:facet name="header">Code</f:facet>
<h:outputText value="#{o.opl_code}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">Titel</f:facet>
<h:outputText value="#{o.opl_titel}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">Thema</f:facet>
<h:outputText value="#{o.opl_thema}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">Delete</f:facet>
<h:graphicImage id="delete" url="images/delete.gif" />
</h:column>
<h:column>
<f:facet name="header">Edit</f:facet>
<h:graphicImage id="edit" url="images/edit.gif" />
</h:column>
</h:dataTable>
<br /><br />
<h:button value="Nieuwe Opleiding" outcome="add"></h:button>
<a href ="add.xhtml">Nieuwe opleiding</a>
</div>
</div>
</h:body>
</html>
I can see the a tag but not the h:button. This is a picture of the view in my browser (The database is still empty, that is why there are no items in the list).
Probably this is a known simple answer, so I'll be extremely happy to learn new things!
EDIT:
I did the steps BalusC gave me. This fixed it for another page I also had problems with. But the page I talked about earlier is still not parsing the xhtml. I got the tip to include the source code, which I'll do:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
>
<h:head>
<title>Facelet Title</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</h:head>
<h:body>
<h:form>
<div id="main">
<div id="header">
</div>
<div id="menu">
<ul>
<li><a href="#">Admin</a></li>
<li><a href="#">Home</a></li>
</ul>
</div>
<div id="content">
<h1>Lijst van opleidingen</h1>
<h:dataTable var="o" value="#{opleidingController.findAll()}" border="0" >
<h:column>
<f:facet name="header">Code</f:facet>
<h:outputText value="#{o.opl_code}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">Titel</f:facet>
<h:outputText value="#{o.opl_titel}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">Thema</f:facet>
<h:outputText value="#{o.opl_thema}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">Delete</f:facet>
<h:graphicImage id="delete" url="images/delete.gif" />
</h:column>
<h:column>
<f:facet name="header">Edit</f:facet>
<h:graphicImage id="edit" url="images/edit.gif" />
</h:column>
</h:dataTable>
<br /><br />
<h:button value="Nieuwe Opleiding" outcome="add"></h:button>
<a href ="add.xhtml">Nieuwe opleiding</a>
</div>
</div>
</h:form>
</h:body>
</html>