سؤال

I have written a template page for using in every page.In this template includes a left div a haed div and a footer.So central is for my forms.But forms are viewing below of footer.How to solve this layout problem.Here is my using of template

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://xmlns.jcp.org/jsf/html"
  xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<h:head>
    <title>Hakkında</title>
</h:head>
<body>
    <ui:composition template="/templates/mainTemplate.xhtml">
        <h:form>
            Some components
        </h:form>
    </ui:composition>
</body>

هل كانت مفيدة؟

المحلول

Add in template space for body

<ui:insert name="body">Default Body</ui:insert>

and redefine it in your view (page)

<ui:define name="body">
    <h:form id="homeForm">
        <!-- your components -->
    </h:form>
</ui:define>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top