com.jk.faces.components.UIHello Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jk-faces Show documentation
Show all versions of jk-faces Show documentation
No suffering from JSF new projects any more , create new JSF project with zero-configurations..
The newest version!
/*
* Copyright 2002-2016 Jalal Kiswani.
*
* Licensed 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 com.jk.faces.components;
import java.io.IOException;
import java.util.logging.Logger;
import javax.faces.component.FacesComponent;
import javax.faces.component.UIPanel;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import com.jk.annotations.Author;
import com.jk.logging.JKLogger;
import com.jk.logging.JKLoggerFactory;
/**
* JKHello is a UI component that display Hello statement from JK
*
* .
*
* @author Jalal H. Kiswani
* @version 1.0
* @see
* UIPanel
*/
@Author(name = "Jalal Kiswani", date = "26/8/2014", version = "1.0")
@FacesComponent(value = UIHello.COMPONENT_TYPE)
public class UIHello extends UIPanel {
/** The Constant COMPONENT_TYPE. */
public static final String COMPONENT_TYPE = "jk.hello";
/** The logger. */
JKLogger logger = JKLoggerFactory.getLogger(getClass());
/**
* the default constructure.
*/
public UIHello() {
}
/**
* this method is responsible for rendering {@link UIHello} component.
*
* @param context
* an instance from {@link FacesContext}
* @throws IOException
* if an input/output error occurs during response writing.
*/
@Override
public void encodeAll(final FacesContext context) throws IOException {
this.logger.debug("encodingAll");
final ResponseWriter writer = context.getResponseWriter();
writer.startElement("div", null);
writer.writeText("Hello From JK", null);
writer.endElement("div");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy