Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.wicketstuff.minis.behavior.apanel;
Panel that generates markup for added components, so that it doesn't need to have a markup file.

Components of type org.apache.wicket.markup.html.WebMarkupContainer added to a panel will have their own layout.

public class APanel extends Panel implements IMarkupResourceStreamProvider
	private static final class APanelRenderer extends
	{
		private static final long serialVersionUID = 1L;
		public APanelRenderer(final ILayout layout)
		{
			super(layout);
		}
		{
			return APanel.class;
		}
		public CharSequence getMarkup(final APanel component)
		{
			return String.format("<wicket:panel>%s</wicket:panel>"getBodyMarkup(component));
		}
	}
	private static final long serialVersionUID = 1L;
Constructor.

Parameters:
id id
	public APanel(final String id)
	{
		this(idnew FlowLayout());
	}

Constructor.

Parameters:
id id
layout layout to be used for components arrangement in this panel
	public APanel(final String idfinal ILayout layout)
	{
		super(id);
	}

		final Class<?> containerClass)
	{
		if (container != this)
			throw new IllegalArgumentException("Container " + container + " must be instance " +
				this);
		final StringBufferResourceStream resourceStream = new StringBufferResourceStream();
		resourceStream.append(.getMarkup((APanel)container));
		return resourceStream;
	}
New to GrepCode? Check out our FAQ X