0

jsf2、jaas、richfaces アプリケーションを開発しており、このログイン ページがあります。

<!DOCTYPE html 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:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich" template = "/WEB-INF/template/login.xhtml" >

        <p>Login to access secure pages:</p>
        <form method='post' action='j_security_check'>
            <h:messages layout='table' errorStyle='background: #AFEEEE;'
                infoStyle='background: #AFEEEE;' globalOnly='true' />
            <h:panelGrid columns='2' styleClass="myTable3">
                <h:outputLabel value='Username: ' />
                <input type='text' id='j_username' name='j_username' />
                <h:outputLabel value='Password: ' />
                <input type='password' id='j_password' name='j_password' />
                <h:outputText value='' />
                <h:panelGrid columns='1'>
                    <input type='submit' name='submit' value='Login' onclick="selectActiveClient();"/>
                </h:panelGrid>
            </h:panelGrid>
        </form>


            <a4j:jsFunction name="selectActiveClient"
                action="#{selectBean.someAction()}"
                render="pannelloClientiAttivi"/>

</ui:composition>

しかし、selectActiveClient は呼び出されません。何が問題なのですか?

4

2 に答える 2

0

a4j:jsFunctionフォームが必要な場合は、 でラップしh:formます。

于 2013-03-07T04:58:07.400 に答える
0

<h:commandButton>の代わりにa を使用します<input type='submit' name='submit' value='Login' onclick="selectActiveClient();"/>

于 2013-03-07T13:10:48.497 に答える