RichFaces

RichFaces component

The RichFaces component generates JavaScript that opens a debug window, logging application information such as requests, responses, and DOM changes.

It doesn’t require any additional attributes for basic functionality.

The following table contains the style classes and corresponding skin parameters for the <a4j:log>.

ClassFunctionSkin ParametersMapped CSS properties
.rf-logIt is used to define styles for the log.generalTextColorcolor
.rf-log-popupIt is used to define styles for the log when it appears as a pop-up.No skin parameters.
.rf-log-popup-cntIt is used to define styles for the content of the log pop-up.No skin parameters.
.rf-log-inlineIt is used to define styles for the log when it appears in-line.No skin parameters.
.rf-log-contentsIt is used to define styles for the log contents.No skin parameters.
.rf-log-entry-lblIt is used to define styles for a label in the log.No skin parameters.
.rf-log-entry-lbl-debugIt is used to define styles for the debug label in the log.No skin parameters.
.rf-log-entry-lbl-infoIt is used to define styles for the information label in the log.No skin parameters.
.rf-log-entry-lbl-warnIt is used to define styles for the warning label in the log.No skin parameters.
.rf-log-entry-lbl-errorIt is used to define styles for the error label in the log.No skin parameters.
.rf-log-entry-msgIt is used to define styles for a message in the log.No skin parameters.
.rf-log-entry-msg-debugIt is used to define styles for the debug message in the log.No skin parameters.
.rf-log-entry-msg-warnIt is used to define styles for the warning message in the log.No skin parameters.
.rf-log-entry-msg-errorIt is used to define styles for the error message in the log.No skin parameters.
.rf-log-entry-msg-xmlIt is used to define styles for an XML message in the log.No skin parameters.

Example

Here, in the following example, we are implementing <a4j:log> component. This example contains the following files.

JSF File

// ajax-log.xhtml

<html xmlns="http://www.w3.org/1999/xhtml"  
xmlns:h="http://xmlns.jcp.org/jsf/html"  
xmlns:a4j="http://richfaces.org/a4j">  
<h:head>  
<title>Ajax Log</title>  
</h:head>  
<h:body>  
<h:form>  
<h:outputText value="Enter Text "></h:outputText>  
<h:inputText value="#{user.name}">  
<a4j:ajax event="keyup" render="user-name"></a4j:ajax>  
</h:inputText>  
<h:outputText id="user-name" value=" #{user.name}"></h:outputText>  
<a4j:log></a4j:log>  
</h:form>  
</h:body>  
</html>  

Managed Bean

// User.java

import javax.faces.bean.ManagedBean;  
import javax.faces.bean.RequestScoped;  
@ManagedBean  
@RequestScoped  
public class User {  
String name;  
public String getName() {  
return name;  
}  
public void setName(String name) {  
this.name = name;  
}  
}  

Output:

It displays log info, when we enter text into the text box.

RichFaces component

In this guide, we will learn about the RichFaces component. To know more Click Here

This Post Has 2 Comments

Leave a Reply