我在winforms应用程序中使用ObjectListView,我遇到了一个问题,在我的列表中我不会,如果我点击我的行的任何列,它应该被选中(所有行).
这是我的代码:
olvSongs.AllColumns.Add(this.titleColumn);
olvSongs.AllColumns.Add(this.typeColumn);
olvSongs.AllColumns.Add(this.addedColumn);
olvSongs.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
olvSongs.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.titleColumn,
this.typeColumn,
this.addedColumn});
olvSongs.Location = new System.Drawing.Point(6, 40);
olvSongs.Name = "olvSongs";
olvSongs.ShowGroups = false;
olvSongs.Size = new System.Drawing.Size(638, 190);
olvSongs.SmallImageList = this.imageList1;
olvSongs.TabIndex = 7;
olvSongs.UseAlternatingBackColors = true;
olvSongs.UseCompatibleStateImageBehavior = false;
olvSongs.UseFiltering = true;
olvSongs.View = System.Windows.Forms.View.Details;
Run Code Online (Sandbox Code Playgroud)
在这里,我可以选择行,只有我选择titleColumn.
这是展示我得到的图片(仅在第一列上选择):

我是PrimeFaces的初学者,我不会保存包含输入密码的表单,但是当我尝试保存长度为2或3个字符的密码时,没有任何反应.按钮可能不起作用.这是我的榜样
<h:form id="mainForm">
<p:messages autoUpdate="true"/>
<p:panel header="Paramétrage des adresses">
<h:panelGrid id="createGrid"
columns="2"
cellspacing="100"
cellpadding="25">
<h:outputLabel for="pwd1" value="Mot de passe : *"/>
<p:password id="pwd1" value="#{adress.currentAdress.motDePasse}"
match="pwd2"
label="Mot de passe"
required="true"
maxlength="100">
<p:message for="pwd1"/>
</p:password>
<h:outputLabel for="pwd2" value="Confirmation Mot de passe : *"/>
<p:password id="pwd2"
value="#{adress.currentAdress.motDePasse}"
label="confirmation" required="true"/>
</h:panelGrid>
<p:commandButton id="saveAdress"
type="button" value="valider"
action="#{adress.save}"
update="createGrid dataTable"/>
</p:panel>
</h:form>
Run Code Online (Sandbox Code Playgroud)