Rich:布局未标记

时间:2012-04-28 18:42:59

标签: jsf-2 richfaces jboss6.x

我正在使用JBoss AS 6,Richfaces 4和JSF 2.0。

我开发了一个简单的xhtml页面来定义我的布局

这里是:

 <?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">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">

   <rich:layout>
  <rich:layoutPanel position="top">
    Top
  </rich:layoutPanel>
  <rich:layoutPanel position="right">
    Right
  </rich:layoutPanel>
  <rich:layoutPanel position="center">
       Center
  </rich:layoutPanel>
  <rich:layoutPanel position="left">
       Left
  </rich:layoutPanel>
  <rich:layoutPanel position="bottom">
    Bottom
  </rich:layoutPanel>
</rich:layout>
</ui:composition>

我在构建路径上添加了这些jar:

jsf-api.jar
jsf-impl.jar
richfaces-components-api-4.1.0.Final.jar
richfaces-components-ui-4.1.0.Final.jar
richfaces-core-api-4.1.0.Final.jar
richfaces-core-impl-4.1.0.Final.jar
guava-r09.jar
cssparser-0.9.5.jar
sac-1.3.jar

但不幸的是,当我发布时,我收到了这个错误:

19:37:11,557 ERROR [STDERR] javax.faces.view.facelets.TagException: /menu.xhtml @11,17 <rich:layout> Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name: layout
19:37:11,558 ERROR [STDERR]     at com.sun.faces.facelets.compiler.CompilationManager.pushTag(CompilationManager.java:289)
19:37:11,558 ERROR [STDERR]     at com.sun.faces.facelets.compiler.SAXCompiler$CompilationHandler.startElement(SAXCompiler.java:228)
19:37:11,558 ERROR [STDERR]     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
19:37:11,558 ERROR [STDERR]     at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
19:37:11,558 ERROR [STDERR]     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
19:37:11,558 ERROR [STDERR]     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
19:37:11,558 ERROR [STDERR]     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
19:37:11,558 ERROR [STDERR]     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
19:37:11,559 ERROR [STDERR]     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
19:37:11,559 ERROR [STDERR]     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
19:37:11,559 ERROR [STDERR]     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
19:37:11,559 ERROR [STDERR]     at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
19:37:11,559 ERROR [STDERR]     at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
19:37:11,559 ERROR [STDERR]     at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
19:37:11,559 ERROR [STDERR]     at com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:388)
19:37:11,559 ERROR [STDERR]     at com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:364)
19:37:11,559 ERROR [STDERR]     at com.sun.faces.facelets.compiler.Compiler.compile(Compiler.java:122)
19:37:11,560 ERROR [STDERR]     at com.sun.faces.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:294)
19:37:11,560 ERROR [STDERR]     at com.sun.faces.facelets.impl.DefaultFaceletFactory.access$100(DefaultFaceletFactory.java:89)
19:37:11,560 ERROR [STDERR]     at com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:159)
19:37:11,560 ERROR [STDERR]     at com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:157)
19:37:11,560 ERROR [STDERR]     at com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:79)
19:37:11,560 ERROR [STDERR]     at com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:74)
19:37:11,560 ERROR [STDERR]     at com.sun.faces.util.ExpiringConcurrentCache$1.call(ExpiringConcurrentCache.java:95)
19:37:11,560 ERROR [STDERR]     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
19:37:11,561 ERROR [STDERR]     at java.util.concurrent.FutureTask.run(FutureTask.java:166)
19:37:11,561 ERROR [STDERR]     at com.sun.faces.util.ExpiringConcurrentCache.get(ExpiringConcurrentCache.java:110)
19:37:11,561 ERROR [STDERR]     at com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(DefaultFaceletCache.java:115)
19:37:11,561 ERROR [STDERR]     at com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(DefaultFaceletCache.java:58)
19:37:11,561 ERROR [STDERR]     at com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:245)
19:37:11,561 ERROR [STDERR]     at com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:190)
19:37:11,562 ERROR [STDERR]     at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:731)
19:37:11,562 ERROR [STDERR]     at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:96)
19:37:11,562 ERROR [STDERR]     at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
19:37:11,562 ERROR [STDERR]     at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)
19:37:11,562 ERROR [STDERR]     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:309)
19:37:11,562 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
19:37:11,562 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
19:37:11,563 ERROR [STDERR]     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
19:37:11,563 ERROR [STDERR]     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
19:37:11,563 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
19:37:11,563 ERROR [STDERR]     at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)
19:37:11,563 ERROR [STDERR]     at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)
19:37:11,563 ERROR [STDERR]     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
19:37:11,563 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
19:37:11,563 ERROR [STDERR]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)
19:37:11,563 ERROR [STDERR]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
19:37:11,564 ERROR [STDERR]     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
19:37:11,564 ERROR [STDERR]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
19:37:11,564 ERROR [STDERR]     at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
19:37:11,564 ERROR [STDERR]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
19:37:11,564 ERROR [STDERR]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
19:37:11,564 ERROR [STDERR]     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)
19:37:11,564 ERROR [STDERR]     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
19:37:11,564 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:636)

请帮助。

1 个答案:

答案 0 :(得分:0)

RichFaces 4已删除对rich:layout

的支持
  

拥有3.3.x用户意见的大量经验只能说这些组件的优先级较低,因为我们以前的布局使用不多。用户仍然喜欢使用普通的Y!或者jQuery(获得更多控制权)。所以这就是为什么推迟并希望修改以使更方便/更富有的原因。

请参阅this