خرید بک لینک

Vote count: 0

I want to display error message as a tooltip like in this example: http://www.primefaces.org/showcase/ui/message/messages.xhtml

Here is my JSF code snippet:

<h:form id="loginForm">
    <p:messages id="messages" showDetail="true" closable="true" for="login"/>
    <h:panelGrid columns="3" cellpadding="3" width="100%">
        <p:outputLabel for="useame" value="Login: "/>
        <p:inputText style="width: 100%;" value="#{loginBean.useame}" required="true" id="useame"/>
        <p:message for="useame" display="tooltip"/>

        <p:outputLabel for="password" value="Password:"/>
        <p:password style="width: 100%;" value="#{loginBean.password}" required="true" id="password"/>
        <p:message for="password" display="tooltip"/>
    </h:panelGrid>
    <p:commandButton value="OK" action="#{loginBean.login()}" update="loginForm" style="float: right; margin-top: 5px;"/>
</h:form>

Here is HTML output snippet for Login row:

<tr>
<td><label id="loginForm:j_idt9" class="ui-outputlabel ui-widget ui-state-error" for="loginForm:useame">Login: <span class="ui-outputlabel-rfi">*</span></label></td>
<td><input id="loginForm:useame" name="loginForm:useame" type="text" value="" style="width: 100%;" aria-required="true" class="ui-inputfield ui-inputtext ui-widget ui-state-default ui-coer-all ui-state-error" role="textbox" aria-disabled="false" aria-readonly="false"></td>
<td><div id="loginForm:j_idt10" aria-live="polite" class="ui-message ui-helper-hidden ui-message-error ui-widget ui-coer-all"><span class="ui-message-error-icon"></span><span class="ui-message-error-detail">Login: Validation Error: Value is required.</span></div></td>
</tr>

There is clearly HTML code for the tooltip & inputs have the red outline, but tooltip message just won't show when I hover over the input box. My form is placed inside dialog window.

Primefaces 6.0.RC2

asked 53 secs ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 11 ارديبهشت 1395 ساعت: 4:45

صفحه بندی