Java Reference
In-Depth Information
package org.javaee7.entity;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
* @author Juneau
public class WidgetA extends Product implements Serializable {
private String color;
public WidgetA(){
* @return the color
public String getColor() {
return color;
* @param color the color to set
public void setColor(String color) {
this.color = color;
The following JSF view excerpt demonstrates how to display the results of the downcast. The dataTable
references productBean.productType() for the value, which initiates the invocation of the obtainProduct method
within the ProductSession EJB.
<h:dataTable var="product" border="1" value="#{productBean.productType()}">
<f:facet name="header">
Product Name
<h:outputText value="#{}"/>
Search WWH ::

Custom Search