Hi ich habe das problem, dass mein template scheinbar gar nicht beachtet wird! Die seite wird normal in html-code umgewandelt, und alles aus der template datei nicht!?
hier meine dateien + web.xml
ordner Struktur:
-WEBContent
--WebInf
---web.xml
--faces
---suchen.xhtml
--templates
---template.xhtml
Das Seltsame ist, dass das JBoss Tool für richfaces alles richtig anzeigt im Preview mode...
Weiß jemand Rat?
suchen.xhtml
template.xhtml
web.xml
hier meine dateien + web.xml
ordner Struktur:
-WEBContent
--WebInf
---web.xml
--faces
---suchen.xhtml
--templates
---template.xhtml
Das Seltsame ist, dass das JBoss Tool für richfaces alles richtig anzeigt im Preview mode...
Weiß jemand Rat?
suchen.xhtml
Java:
<?xml version="1.0" encoding="UTF-8" ?>
<ui:composition template="/templates/template.xhtml"
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:rich="http://richfaces.org/rich"
pageTitle="Suche"
markupType="xhtml">
<ui:define name="content">
<h:panelGrid columns="4">
<h:outputLabel for="nachname" value="Nachname:"/>
<h:inputText id="nachname" value="#{SuchenEingabenBean.nachname}" />
<h:outputLabel for="vorname" value="Vorname"/>
<h:inputText id="vorname" value="" />
<h:commandButton value="suchen" action="success"/>
</h:panelGrid>
</ui:define>
</ui:composition>
template.xhtml
Java:
<!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:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<f:facet name="pageHeader">
<link href="/JSFTest/css/style.css" rel="stylesheet" type="text/css" />
</f:facet>
<f:facet name="header">
<h:graphicImage value="/images/*****.png" style="border: thin solid black"/>
</f:facet>
<f:facet name="meldung">
<h:panelGrid columns="2">
<h:outputLabel for="meldung" value="Meldung"/>
<h:inputText id="meldung" value="" />
</h:panelGrid>
</f:facet>
<ui:insert name="content"/>
<f:facet name="footer">
<h:outputText styleClass="test" value="Autor: ***** "/>
</f:facet>
</html>
web.xml
Java:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name>AzubiWebJsf</display-name>
<welcome-file-list>
<welcome-file>/faces/suchen.xhtml</welcome-file>
<welcome-file>/templates/template.xhtml</welcome-file>
</welcome-file-list>
<context-param>
<param-name>org.richfaces.skin</param-name>
<param-value>#{skinBean.skin}</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.enableControlSkinning</param-name>
<param-value>#{skinBean.enableElementsSkinning}</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.enableControlSkinningClasses</param-name>
<param-value>#{skinBean.enableClassesSkinning}</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
</web-app>