Jsf Primefaces粘性标记未定义

Jsf Primefaces粘性标记未定义,jsf,primefaces,definition,Jsf,Primefaces,Definition,我正在使用Primefaces 3.5,我需要使用。 我从橱窗里得到了密码。 这是我的代码: <p:toolbar id="myToolbar"> <p:toolbarGroup align="left"> <p:commandButton type="button" value="Some Button" /> </p:toolbarGroup> </p:toolbar> <p:sti

我正在使用Primefaces 3.5,我需要使用。 我从橱窗里得到了密码。 这是我的代码:

<p:toolbar id="myToolbar">  
    <p:toolbarGroup align="left">  
        <p:commandButton type="button" value="Some Button" />  
    </p:toolbarGroup>
</p:toolbar>
<p:sticky target="myToolbar" />

我得到一个错误:

/index.xhtml@26,36标记库支持命名空间: ,但没有为名称定义标记:sticky


如果我把粘性部分去掉,一切都会好的。这个错误可能是什么?

恐怕3.5不支持它。尝试使用Primefaces 4.0-。 使用css

和一些jQuery来模拟类似的行为。下面是我不久前编写的一些JS代码片段

$(document).on("scroll", function(){
   if($(document).scrollTop() >= 180){
       $('.header').css({'position': 'fixed'});
       $('#mainBody').css('margin-top', '182px');
   } else {
       $('.header').css({'position': 'relative'});
       $('#mainBody').css('margin-top', '110px');
   }
}    

是 啊正如@Kuba在回答中提到的,它不是
3.5
组件套件的一部分
$(document).on("scroll", function(){
   if($(document).scrollTop() >= 180){
       $('.header').css({'position': 'fixed'});
       $('#mainBody').css('margin-top', '182px');
   } else {
       $('.header').css({'position': 'relative'});
       $('#mainBody').css('margin-top', '110px');
   }
}