[jboss-user] [JBoss Seam] - Printing problem

siven555 do-not-reply at jboss.com
Mon Oct 1 07:16:51 EDT 2007


I am working on a Seam project using jsf 1.1 facelets deployed on jboss

I am trying to use a Stylesheet to hide certain features from being printed. But I'm having problems with linking the external stylesheet. The link tag only works when it is inside the first <ui:define> tag and it hides the guidelinesMenuTree, but does not work elsewhere. For instance, the italicText does not change the text to italics, nor do the other classes work.

I tried to put the classes directly inside this file within style tags but this does not work either.

<html xmlns="http://www.w3.org/1999/xhtml"
  | 	xmlns:s="http://jboss.com/products/seam/taglib"
  | 	xmlns:ui="http://java.sun.com/jsf/facelets"
  | 	xmlns:f="http://java.sun.com/jsf/core"
  |         xmlns:c="http://java.sun.com/jstl/core"
  | 	xmlns:h="http://java.sun.com/jsf/html"
  |         xmlns:t="http://myfaces.apache.org/tomahawk"
  |         xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"	                   
  |         xmlns:sand="http://myfaces.apache.org/sandbox"
  |         xmlns:fck="http://www.fck-faces.org/fck-faces">
  | 
  | 
  | <body>
  | 	
  | <ui:composition template="searchTemplate.xhtml">
  | 
  | 	<ui:define name="sidebar">
  | 
  | 	<link rel="stylesheet" href="style/default/guidelinePrint.css" type="text/css" media="print"/">
  | 
  | 	<t:div styleClass="hide">
  | 		<ui:include src="/guidelinesMenuTree.xhtml"/>
  | 	</t:div>
  | 	
  | 	
  | 	</ui:define>
  | 
  | 	<ui:define name="container">		
  | 	
  | 
  |        <f:loadBundle basename="messages" var="constantsBundle" />
  | 	<script type="text/javascript" src="javascript/ajaxtabs.js"/>     
  | 
  |        <f:loadBundle basename="messages" var="msg" />
  |      
  | 	 
  | 		
  |        <f:view>
  | 
  |        <link rel="stylesheet" href="style/default/guidelinePrint.css" type="text/css" media="print"/>
  |   	<h:form>
  | 
  | 
  |         <t:div rendered="#{!guidelineEditorBean.editMode}">
  | 
  | 	<h:outputText styleClass="italicText"  value="#{guidelineEditorBean.selectedPageView.page.pageName}"/><br/>
  | 				
  |         <t:outputHtml  value="#{guidelineEditorBean.selectedPageView.page.content}"/>	
  | 
  | 									
  | 	<h:commandLink value="Print" onclick="window.print(); return false"/>
  | 
  | 
  | 	</t:div>
  | 
  |         </h:form>
  |   			
  |   	</f:view>
  |   		
  | 	</ui:define>
  |        </ui:composition>
  | </body>
  | </html>
  | -----------------------------------------------------------------
  | 
  | guidelinePrint.css
  | 
  | 
  | 
  | .boldText
  | {
  | 	font-weight : bold;
  | }
  | .hide
  | {
  | 	display : none;
  | }
  | 
  | .show
  | {
  | 	display : block;
  | }
  | .italicText
  | {
  | 	font-weight : italic;
  | }
  | 
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090164#4090164

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090164



More information about the jboss-user mailing list