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>.
Class | Function | Skin Parameters | Mapped CSS properties |
---|---|---|---|
.rf-log | It is used to define styles for the log. | generalTextColor | color |
.rf-log-popup | It is used to define styles for the log when it appears as a pop-up. | No skin parameters. | |
.rf-log-popup-cnt | It is used to define styles for the content of the log pop-up. | No skin parameters. | |
.rf-log-inline | It is used to define styles for the log when it appears in-line. | No skin parameters. | |
.rf-log-contents | It is used to define styles for the log contents. | No skin parameters. | |
.rf-log-entry-lbl | It is used to define styles for a label in the log. | No skin parameters. | |
.rf-log-entry-lbl-debug | It is used to define styles for the debug label in the log. | No skin parameters. | |
.rf-log-entry-lbl-info | It is used to define styles for the information label in the log. | No skin parameters. | |
.rf-log-entry-lbl-warn | It is used to define styles for the warning label in the log. | No skin parameters. | |
.rf-log-entry-lbl-error | It is used to define styles for the error label in the log. | No skin parameters. | |
.rf-log-entry-msg | It is used to define styles for a message in the log. | No skin parameters. | |
.rf-log-entry-msg-debug | It is used to define styles for the debug message in the log. | No skin parameters. | |
.rf-log-entry-msg-warn | It is used to define styles for the warning message in the log. | No skin parameters. | |
.rf-log-entry-msg-error | It is used to define styles for the error message in the log. | No skin parameters. | |
.rf-log-entry-msg-xml | It 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.
In this guide, we will learn about the RichFaces component. To know more Click Here
Pingback: บาคาร่าออนไลน์
Pingback: 다시보기