1

I have a working JSF page, but if I add xmlns:leaf="http://java.sun.com/jsf/composite/jsf2leaf" to it, and try to use any ot its tags, like <leaf:map center="42.120000,-72.540000" />, I get the following warning:

One or more resources have the target of 'head', but no 'head' component has been defined within the view.

Everything works fine, the map is there, I can add markers, but I can't get rid of the warning message.

My JSF page looks like this:

<?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:f="http://xmlns.jcp.org/jsf/core"
    xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:p="http://primefaces.org/ui" xml:lang="hu" lang="hu"
    xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
    xmlns:leaf="http://java.sun.com/jsf/composite/jsf2leaf"
>
<f:view contentType="text/html">
    <f:metadata>
        <f:viewAction action="#{dashboardController.readURLParam()}"/>
    </f:metadata>
<h:head/>
<h:body>
    ...
    <h:form>
        ...
        <p:panel>
            ...
            <c:forEach>
                ...
                <p:panel>
                    <leaf:map center="42.120000,-72.540000" />
                </p:panel>
            </c:forEach>
        </p:panel>
    </h:form>
</h:body>
</f:view>
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Relan
  • 11
  • 2

1 Answers1

0

found the problem, it, in the jsf2leaf.jar the map.xhtml and advancedmap.xhtml uses <head></head> instead of <h:head></h:head>, changed it, repackaged the jar file, and it works fine

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
Relan
  • 11
  • 2