我嘗試通過菜單項設置普通屬性,但它不起作用。jsf menuitem沒有設置屬性
JSF:
<p:menuitem value="Names"
url="/master.xhtml"
action="#{navigation.name}">
<f:setPropertyActionListener target="navigation.name"
value="Billy" />
</p:menuitem>
ManagedBean:
@ManagedBean(name="navigation")
@SessionScoped //
public class LinksNavigation {
public LinksNavigation() {
super();
this.milchFleisch = "./menuFleisch.xhtml";
}
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name= name;
}
}
但它不工作。我不設置「f:setPropertyActionListener」 value =「Bully」。我怎樣才能通過menuItem設置屬性值?
感謝