【发布时间】:2014-03-04 15:22:47
【问题描述】:
我正在尝试在输入文本中显示数据库中的值以对其进行更新。因此,当我单击该列时,程序会显示一个包含所有值的窗口,但作为输入文本,因此用户无法更新值。
我使用 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/>
【问题讨论】:
-
请明确您点击的是哪一列。并请写下其代码以了解您的问题
-
如果您在页面加载之前使用所需的值初始化变量,它将在 inputText 中显示该值。
标签: java mysql jsf jakarta-ee primefaces