1

現在、私はRichFacesを学んでおり、サイトのデモを読んでいます http://livedemo.exadel.com/richfaces-demo/richfaces/commandButton.jsf?c=commandButton&tab=usage

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:a4j="http://richfaces.org/a4j"
  xmlns:rich="http://richfaces.org/rich">

<style>
    .gridhello {
        border-collapse : collapse;
    }
    .gridhellocolumn {
        padding-left : 0;
    }
    .outhello {
        font-weight: bold;
    }
</style>

<a4j:form>
    <h:panelGrid columns="3" styleClass="gridhello" columnClasses="gridhellocolumn">
        <h:outputText value="Name:" />
        <h:inputText value="#{userBean.name}" />
        **<a4j:commandButton value="Say Hello" reRender="out" />**
    </h:panelGrid>
</a4j:form>
<rich:spacer height="7"/>
<br />
<h:panelGroup id="out">
    <h:outputText value="Hello " rendered="#{not empty userBean.name}" styleClass="outhello" />
    <h:outputText value="#{userBean.name}" styleClass="outhello" />
    <h:outputText value="!" rendered="#{not empty userBean.name}" styleClass="outhello" />
</h:panelGroup>

<br />

コード行には「アクション」属性がありません。それがまだどのように機能するのか疑問に思っています。この場合、userBean.name が更新されるように呼び出されたバック Bean のデフォルト メソッドは何ですか?

前もって感謝します!

4

1 に答える 1