JSF-Faceletsの作成 †JSFの画面表示の部分をFaceletsで作成する。 #ref(): File not found: "jsf1.gif" at page "JSF-Faceletsの作成"
#ref(): File not found: "jsf2.gif" at page "JSF-Faceletsの作成"
#ref(): File not found: "jsf3.gif" at page "JSF-Faceletsの作成"
xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:f="http://xmlns.jcp.org/jsf/core" タグはc:forEachのようにプレシックス:タグ名の形で、入力する。 <c:forEach var="m" items="#{messageBoard.messages}"> <h:outputText value="#{m.id}"/>: <h:outputText value="#{m.writetime}"> <f:convertDateTime pattern="yyyy/MM/dd(E) HH:mm:ss" timeZone="JST"/> </h:outputText><br/> #{' '}<h:outputText value="#{m.message}"/><br/><br/> </c:forEach> 入力項目と送信ボタンを同じフォームに作成する。 <h:form> <h:inputTextarea value="#{messageBoard.message}"/><br/> <h:commandButton value="書き込む" action="#{messageBoard.writeMessage}"/> </h:form> コメント † |