0 Replies Latest reply on Oct 1, 2010 10:15 AM by Mathias Dolag

    Problem with Composite Component on JBoss AS 6 M4/5

    Mathias Dolag Newbie

      Hello @all

       

      I've build a component component but it doesn't work. There is no error message, it just seems as my component isn't present at all.  Here is the (simple) code I've written (it's just a test-component which should write a text-message on the screen):

       

      Composite Component (testComponent.xhtml --> saved in "resources/components/util")

       

      <?xml version="1.0" encoding="ISO-8859-1" ?>
      <!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:h="http://java.sun.com/jsf/html"
            xmlns:composite="http://java.sun.com/jsf/composite">
          <h:head>
          </h:head>
          <h:body>     
              <composite:interface>
                  <composite:attribute name="text" />
              </composite:interface>
         
              <composite:implementation>
                  <p>Dies ist der Text: #{cc.attrs.text}</p>
              </composite:implementation>
          </h:body>
      </html>

       

       

      Test-Page (test.xhtml)

       

      <?xml version="1.0" encoding="ISO-8859-1" ?>
      <!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:h="http://java.sun.com/jsf/html"
            xmlns:util="http://java.sun.com/jsf/composite/components/util">
          <head> </head>
          <body>
              <p>Text before component</p>
              <util:testComponent text="Hello World"></util:testComponent>
              <p>Text after component</p>     
          </body>
      </html>

       

       

      The "Text before|after component" part is present when I've deployed (I've tried JBoss AS6 Milestone 4 and 5) the test.xhtml-page. Other JSF 2-Features (implicit navigation, resource-handler, view-scope, etc) are working without any problems.

       

      Could you help my or have any idea why the composite component isn't working?

       

      Thanks in advance!