7 Replies Latest reply on Sep 10, 2009 6:15 AM by Nick Belaevski

    Custom component, scripts do not load, seam

    blabno Master

      Hello, I've created custom component with CDK. In my template I've put <h:scripts> and all the scripts do get imported automatically when used in a simple JSF project, but when I include my component in Seam project then component gets rendered, but scripts are not loaded. What can be the reason ?

        • 1. Re: Custom component, scripts do not load, seam
          Nick Belaevski Master

          Hi,

          Are SCRIPT/LINK HTML tags for resources output to the page or not?

          • 3. Re: Custom component, scripts do not load, seam
            Nick Belaevski Master

            Have you properly configured Seam filter? What loading strategy for scripts is used?

            • 4. Re: Custom component, scripts do not load, seam
              blabno Master

               

              <context-param>
               <param-name>org.richfaces.SKIN</param-name>
               <param-value>classic</param-value>
               </context-param>
               <context-param>
               <param-name>org.richfaces.CONTROL_SKINNING</param-name>
               <param-value>disable</param-value>
               </context-param>
               <context-param>
               <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
               <param-value>disable</param-value>
               </context-param>
               <context-param>
               <param-name>org.richfaces.LoadStyleStrategy</param-name>
               <param-value>ALL</param-value>
               </context-param>
               <context-param>
               <param-name>org.richfaces.LoadScriptStrategy</param-name>
               <param-value>ALL</param-value>
               </context-param>
               <listener>
               <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
               </listener>
               <filter>
               <filter-name>Seam Filter</filter-name>
               <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
               </filter>
               <filter-mapping>
               <filter-name>Seam Filter</filter-name>
               <url-pattern>/*</url-pattern>
               </filter-mapping>
               <servlet>
               <servlet-name>Seam Resource Servlet</servlet-name>
               <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
               </servlet>
               <servlet-mapping>
               <servlet-name>Seam Resource Servlet</servlet-name>
               <url-pattern>/seam/resource/*</url-pattern>
               </servlet-mapping>
               <context-param>
               <param-name>facelets.DEVELOPMENT</param-name>
               <param-value>true</param-value>
               </context-param>
               <context-param>
               <param-name>facelets.SKIP_COMMENTS</param-name>
               <param-value>true</param-value>
               </context-param>
               <context-param>
               <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
               <param-value>.xhtml</param-value>
               </context-param>
               <servlet>
               <servlet-name>Faces Servlet</servlet-name>
               <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
               <load-on-startup>1</load-on-startup>
               </servlet>
               <servlet-mapping>
               <servlet-name>Faces Servlet</servlet-name>
               <url-pattern>*.seam</url-pattern>
               </servlet-mapping>
               <security-constraint>
               <display-name>Restrict raw XHTML Documents</display-name>
               <web-resource-collection>
               <web-resource-name>XHTML</web-resource-name>
               <url-pattern>*.xhtml</url-pattern>
               </web-resource-collection>
               <auth-constraint/>
               </security-constraint>
              </web-app>
              


              • 5. Re: Custom component, scripts do not load, seam
                Nick Belaevski Master

                Hi,

                Please try with DEFAULT loading strategies.

                • 6. Re: Custom component, scripts do not load, seam
                  blabno Master

                  That helped. What can i do to make script import work with ALL setting ?
                  Thank you my grandmaster !

                  • 7. Re: Custom component, scripts do not load, seam
                    Nick Belaevski Master

                    Unfortunately, not much. Scripts/styles for ALL loading strategy are generated when RF is build and then do not includes ones for any custom components.

                    Here is the issue for this: https://jira.jboss.org/jira/browse/RF-7675