Frage

<h:outputLabel value="#{bundle.CreateCustomerLabel_email}" for="email" /> 
<h:inputText id="email" value="#{customerController.selected.email}" title="#{bundle.CreateCustomerTitle_email}" /> 

<h:outputLabel value="Address:" for="addressId.address" /> 
<h:inputText size="30" id="address" value="#{customerController.selected.addressId.address}" title="Address" >
</h:inputText>

In Cutomer Entity Bean habe ich:

@JoinColumn(name = "address_id", referencedColumnName = "address_id")
@ManyToOne(optional = true, cascade={CascadeType.ALL})
private Address addressId;

Im Address Entity Bean habe ich:

Basic(optional = true)
@NotNull
@Size(min = 1, max = 50)
@Column(name = "address")
private String address;

FRAGE:Wie kann ich verschachtelte Eigenschaften in JSF 2.0-Formularen verwenden?Soll ich verschachtelte Formulare implementieren oder wie?

Dank im Voraus!Sami

War es hilfreich?

Lösung

Haben Sie Get-Methoden für Adress-ID und Adresse?Der for Attribut im zweiten Label sein muss for="address".

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top