cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Broadcasting in the Banner

pjg
1-Visitor
1-Visitor

Broadcasting in the Banner

Hi - does anyone know how to Broadcast in the Banner/Header in Windchill so you should be able to show your ovn text/picture? I have head that this should be possible......

Thanks 🙂

Peter

ACCEPTED SOLUTION

Accepted Solutions
JørnAHansen
12-Amethyst
(To:pjg)

Windchill 9.1 Cusomizers Guide says:

Turning on the alert banner feature

  1. Put the following line of code into windchill\codebase\netmarkets\jsp\util\begin_custom.jspf:
    <%@ include file="/netmarkets/jsp/util/banner_custom.jspf"%>
  2. Restart Tomcat.

Displaying the alert message on the top of Windchill UI pages

Write the alert message with html format into the following file:
windchill_home\codebase\netmarkets\jsp\util\banner.txt

View solution in original post

6 REPLIES 6
MatthewKnight
12-Amethyst
(To:pjg)

The easiest method is just to replace the images PTC uses on the banner:

In Windchill 9.1

Edit <wc.home>/codebase/netmarkets/images/header.gif but fade into whatever color PTC uses in the header.

Edit <wc.home>/codebase/netmarkets/images/logoWC.gif to be empty and transparent.

JørnAHansen
12-Amethyst
(To:pjg)

Windchill 9.1 Cusomizers Guide says:

Turning on the alert banner feature

  1. Put the following line of code into windchill\codebase\netmarkets\jsp\util\begin_custom.jspf:
    <%@ include file="/netmarkets/jsp/util/banner_custom.jspf"%>
  2. Restart Tomcat.

Displaying the alert message on the top of Windchill UI pages

Write the alert message with html format into the following file:
windchill_home\codebase\netmarkets\jsp\util\banner.txt

Thanks, that's awesome

I knew about begin_custom.jspf and have used that to display messages, but I didn't know about banner_custom.jspf.

Does this really replace the banner though? It looks like it just moves the OOTB banner down (same as inserting text directly into begin_custom.jspf)

No it doesn't replace the "header" section of the page - it just adds a banner above it as you have observed.

I would never use PTC's recommendation on this as documented. It performs with issues sometimes. Here is the output from my codebase/netmarkets/util/begin_custom.jspf

YOU DO NOT NEED TO RESTART. Clearing browser cache and it shows immediately on a hot live system.

Seen no performance problems due to this...

<%@ page import="java.io.BufferedReader,java.io.File,java.io.FileReader,java.io.IOException,wt.util.WTProperties" %>

<%

// THIS CODE HANDLES DISPLAYING MESSAGE TO END USERS

// WHILE THE SYSTEM IS RUNNING - I.E. TO PROVIDE WARNING OF UNEXPECTED SHUTDOWN

// OR TO DISPLAY A BASELINE OF CONFIGURATIONS UNDER GOING DEVELOPMENT AND TESTING

// DO NOT MAKE CHANGES TO THIS CODE AS THIS AFFECTS SYSTEM CONFIGURATION MANAGEMENT

// PLEASE CHANGE THE TEXT CONTENT OF THE BANNER.TXT FILE TO CHANGE THE MESSAGE.

//

// THE PTC CUSTOMIZERS GUIDE USES DIFFERENT CODE THAT REQUIRES TOMCAT TO BE RESTARTED

// WHICH IS A POOR DESIGN.

//

// TO HAVE NO BANNER MESSAGE APPEAR, ELIMINATE OR COMMENT OUT

// THE TEXT BETWEEN THE <DIV>THIS TEXT</DIV>

// ELEMENT IN BANNER.TXT

//

// Contact: david.demay@trw.com 04/08/2010

//

BufferedReader input = null;

try

{

WTProperties trw_wt_properties_obj_instance = WTProperties.getLocalProperties();

String codebasePath = trw_wt_properties_obj_instance.getProperty("wt.codebase.location");

input = new BufferedReader(new FileReader(new File(codebasePath + "/netmarkets/jsp/util/banner.txt")));

String line = null;

while (( line = input.readLine()) != null)

{

out.println(line); // print file being read in at runtime to client output on browser, etc.

}

out.flush();

}

catch (IOException error) {

// do nothing to print error message in client window - you'll just not see banner

error.printStackTrace(System.err); // to tomcat log

}

finally {

input.close();

}

%>

<%-- PLACE ADDITIONAL JSP, JAVA, HTML, OR JAVASCRIPT CODE DOWN HERE AS NEEDED --%>

Announcements


Top Tags