0
我正在嘗試在輸入文本中顯示來自數據庫的值以更新它。所以當我點擊列時,程序顯示一個包含所有值的窗口,但是作爲輸入文本,所以用戶無法更新值。如何在輸入文本中顯示來自數據庫的值?
我使用PrimeFace 4,JSF和MySQL作爲數據庫
<i>
<h:panelGrid id="display" columns="2" cellpadding="4">
<h:outputText value="ID:" />
<h:outputText value="#{usersBean.selectUser.idUtilisateur}"
style="font-weight:bold" />
<h:outputText value="Nom:" />
<h:inputText value="#{usersBean.selectUser.nomUtilisateur}"
style="font-weight:bold" />
<h:outputText value="Prenom" />
<h:inputText value="#{usersBean.selectUser.prenomUtilisateur}"
style="font-weight:bold" />
<h:outputText value="Indentifiant" />
<h:inputText value="#{usersBean.selectUser.identifiUtilisateur}"
style="font-weight:bold" />
</h:panelGrid>
<i/>
提交哪裏? –
請明確您要點擊的列。並且請寫下其代碼以瞭解您的問題 – Jitesh
如果您在頁面加載之前用您想要的值初始化變量,它將在inputText中顯示該值。 –