Java 文本字段描述面
我正在使用richfaces,我需要在像照片一样单击字段时显示“X”消息。这是我在xhtml中的代码:Java 文本字段描述面,java,javascript,jsf,richfaces,Java,Javascript,Jsf,Richfaces,我正在使用richfaces,我需要在像照片一样单击字段时显示“X”消息。这是我在xhtml中的代码: <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ui:composition xmlns="http://www.w3.org/1999/xhtml"
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
<rich:panel>
<h:form>
<h:panelGrid columns="3">
<h:outputText value="Name:" />
<h:inputText label="Name" id="name" required="true"
value="#{loginAction.username}">
<f:validateLength minimum="3" />
</h:inputText>
<rich:message for="name" style="color:red;">
<f:facet name="errorMarker">
<h:graphicImage value="/img/error.gif" />
</f:facet>
</rich:message>
<f:facet name="footer">
<a4j:commandButton value="Validate" />
</f:facet>
</h:panelGrid>
</h:form>
</rich:panel>
</ui:composition>
我想要这样的东西,在提交之前,只有在单击字段时:
谢谢。使用richfaces'在文本框旁边显示可自定义和可蒙皮的工具提示。从演示示例的下面部分:
<h:inputText label="Name" id="name" required="true" value="#{loginAction.username}">
<f:validateLength minimum="3" />
<rich:tooltip followMouse="false" showEvent="onclick" showDelay="1500" styleClass="tooltip-custom-body" layout="block">
<span style="white-space: nowrap"> This tool-tip content is also <strong>pre-rendered</strong> to the
page.<br /> </span>
</rich:tooltip>
</h:inputText>
此工具提示内容也将预先呈现到
第页。
使用richfaces'在文本框旁边显示可自定义和可蒙皮的工具提示。从演示示例的下面部分:
<h:inputText label="Name" id="name" required="true" value="#{loginAction.username}">
<f:validateLength minimum="3" />
<rich:tooltip followMouse="false" showEvent="onclick" showDelay="1500" styleClass="tooltip-custom-body" layout="block">
<span style="white-space: nowrap"> This tool-tip content is also <strong>pre-rendered</strong> to the
page.<br /> </span>
</rich:tooltip>
</h:inputText>
此工具提示内容也将预先呈现到
第页。