1 /* 2 * Copyright 2000-2001,2004 The Apache Software Foundation. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package org.apache.jetspeed.modules.layouts; 18 19 // Turbine Modules 20 import org.apache.turbine.modules.Layout; 21 import org.apache.turbine.modules.ScreenLoader; 22 import org.apache.turbine.util.RunData; 23 import org.apache.ecs.ConcreteElement; 24 import org.apache.ecs.HtmlColor; 25 26 /*** 27 */ 28 public class EmptyLayout extends Layout 29 { 30 /*** 31 */ 32 public void doBuild( RunData data ) throws Exception 33 { 34 35 // Now execute the Screen portion of the page 36 ConcreteElement screen = ScreenLoader.getInstance().eval ( data, data.getScreen() ); 37 if (screen != null) 38 data.getPage().getBody().addElement( screen ); 39 40 // The screen should have attempted to set a Title 41 // for itself, otherwise, a default title is set 42 data.getPage().getTitle() 43 .addElement( data.getTitle() ); 44 // The screen should have attempted to set a Body bgcolor 45 // for itself, otherwise, a default body bgcolor is set 46 data.getPage().getBody() 47 .setBgColor(HtmlColor.white); 48 49 } 50 51 }