001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.wicket.devutils.inspector; 018 019import org.apache.wicket.Application; 020import org.apache.wicket.devutils.DevUtilsPanel; 021import org.apache.wicket.markup.html.basic.Label; 022 023/** 024 * A Wicket panel that shows interesting information about a given Wicket session. 025 * 026 * @author Jonathan Locke 027 */ 028public final class ApplicationView extends DevUtilsPanel 029{ 030 private static final long serialVersionUID = 1L; 031 032 /** 033 * Constructor. 034 * 035 * @param id 036 * Component id 037 * @param application 038 * The application to view 039 */ 040 public ApplicationView(final String id, final Application application) 041 { 042 super(id); 043 044 // Basic attributes 045 add(new Label("name", application.getName())); 046 add(new Label("componentUseCheck", "" + 047 application.getDebugSettings().getComponentUseCheck())); 048 add(new Label("compressWhitespace", "" + 049 application.getMarkupSettings().getCompressWhitespace())); 050 add(new Label("stripComments", "" + application.getMarkupSettings().getStripComments())); 051 add(new Label("stripWicketTags", "" + application.getMarkupSettings().getStripWicketTags())); 052 add(new Label("bufferResponse", "" + 053 application.getRequestCycleSettings().getBufferResponse())); 054 add(new Label("resourcePollFrequency", "" + 055 application.getResourceSettings().getResourcePollFrequency())); 056 add(new Label("versionPages", "" + application.getPageSettings().getVersionPagesByDefault())); 057 } 058}