Dashboard > JAVA EE > ... > JSF入門 > 輸入類標籤
JAVA EE Log In   View a printable version of the current page.
輸入類標籤
Added by cheetah, last edited by cheetah on May 27, 2005  (view change)
Labels: 
(None)

資料來源: From PmWiki@caterpillar
作者: caterpillar

  輸入類標籤包括了inputText、inputTextarea、inputSecret、 inputHidden,分別舉例說明如下:

inputText

  顯示單行輸入欄位,即輸出<input> HTML標籤,其type屬性設定為text,例如:

<h:inputText value="#{user.name}"/>

inputTextarea

  顯示多行輸入文字區域,即輸出<textarea> HTML標籤,例如:

<h:inputTextarea value="#{user.command}"/>

inputSecret

  顯示密碼輸入欄位,即輸出<input> HTML標籤,其type屬性設定為password,例如:

<h:inputSecret value="#{user.password}"/>

  您可以設定redisplay屬性以決定是否要顯示密碼欄位的值,預設是false。

inputHidden

  隱藏欄位,即輸出<input> HTML標籤,其type屬性設定為hidden,隱藏欄位的值用於保留一些訊息於客戶端,以在下一次發送表單時一併送出,例如:

<h:inputHidden value="#{user.hiddenInfo}"/>

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.1.5a Build:#411 Mar 16, 2006) - Bug/feature request - Contact Administrators