-
1. Re: Seam Page without RichFaces?
kragoth Dec 8, 2009 12:35 AM (in response to gzoller.greg.zoller.aviall.com)This question would probably be better on the Richfaces forum, but....
Are you sure that you don't have a <ui:include /> that could be importing the Richfaces javascript?
-
2. Re: Seam Page without RichFaces?
gzoller.greg.zoller.aviall.com Dec 8, 2009 9:18 PM (in response to gzoller.greg.zoller.aviall.com)Should be good. See code below. I'm asking the question on the Seam forum because I suspect part of my answer may be in how RF is configured within Seam. Does Seam default to passing every request through some kind of RF processor?
My Page:
<!DOCTYPE composition 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:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" template="layout/template_lite.xhtml"> <ui:define name="body"> <h1>Welcome to Seam!</h1> </ui:define> </ui:composition>
My Template:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" contentType="text/html"> <html> <head> <link rel="shortcut icon" href="#{request.contextPath}/favicon.ico"/> <ui:insert name="head"/> </head> <body> <div class="body"> <ui:insert name="body"/> </div> </body> </html> </f:view>
The two RF files that seem to always be downloaded to the browser (that I don't want) are:
http://localhost:8080/kranz/a4j/g/3_3_1.GA/org/ajax4jsf/framework.pack.js
http://localhost:8080/kranz/a4j/g/3_3_1.GA/org/richfaces/ui.pack.js -
3. Re: Seam Page without RichFaces?
gzoller.greg.zoller.aviall.com Dec 8, 2009 9:27 PM (in response to gzoller.greg.zoller.aviall.com)Got it!
This behavior is due to how Seam configures RF by default. In web.xml there are two newer parameters (at least they weren't in an older Seam version I'd been using): org.richfaces.LoadStyleStrategy and org.richfaces.LoadScriptStrategy. In the default seamgen'ed web.xml these are set to
ALL
, which seems to download the world, whether its needed/wanted or not. Change these both toDEFAULT
and I get the desired behavior. If not needed the large JS/CSS are not downloaded.FYI for anyone else desiring this behavior.
Greg