I would like to create a p:datatable in another p:datatable with primefaces. As long is i only display values (using outputText), everything is ok. But if i want to change the values using inputText, i got the following exception once i send my form.
Caused by: javax.el.PropertyNotFoundException: Target Unreachable, 'lineItem' returned null at org.apache.el.parser.AstValue.getTarget(AstValue.java:127) [jbossweb-7.0.17.Final.jar:] at org.apache.el.parser.AstValue.getType(AstValue.java:82) [jbossweb-7.0.17.Final.jar:] at org.apache.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:176) [jbossweb-7.0.17.Final.jar:] at org.jboss.weld.el.WeldValueExpression.getType(WeldValueExpression.java:93) [weld-core-1.1.9.Final.jar:2012-08-06 19:12] at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:98) [jsf-impl-2.2.0-m10.jar:2.2.0-m10-SNAPSHOT] ... 46 more
Here is my bean:
@ManagedBean
@ViewScoped
public class OmsOrderActionBean implements Serializable {
private Order order;
public String init(){
    number = facesContext.getExternalContext().getRequestParameterMap().get("number");
    dtype = CharUtils.toChar(facesContext.getExternalContext().getRequestParameterMap().get("dtype"), ' ');
    if (!StringUtils.isEmpty(number)) {
        Order order = orderDao.findOrderByNo(number);
        if (order == null) {
            JSFUtil.flashScope().put("oid", number);
            return UiConstants.NAV_ERROR_NOT_FOUND;
        }
        setOrder(order);
public Order getOrder() {
    return order;
}
}
Here is my order:
@Entity    
@Table(name = "orders")
@Inheritance(strategy = InheritanceType.JOINED)
public class Order extends DefaultEntityTemplate implements Serializable, Cloneable {
// bi-directional many-to-one association to OrderGroup
@OneToMany(mappedBy = "order", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER)
@Fetch(FetchMode.SUBSELECT)
private List<OrderGroup> orderGroups;
public List<OrderGroup> getOrderGroups() {
    if (orderGroups == null) {
        orderGroups = new ArrayList<>();
    }
    return orderGroups;
}
public void setOrderGroups(List<OrderGroup> orderGroups) {
    if (!CollectionUtils.isEmpty(orderGroups)) {
        for (OrderGroup orderGroup : orderGroups) {
            orderGroup.setOrder(this);
        }
    }
    getOrderGroups().clear();
    getOrderGroups().addAll(orderGroups);
}
}
And here is my xhtml page:
<f:metadata>
    <f:viewAction action="#{omsOrderActionBean.init()}" />
</f:metadata>
<p:outputPanel id="outpOrderGroups">
<p:dataTable id="orderGroupTbl" var="group" value="# omsOrderActionBean.order.orderGroups}" emptyMessage="" >
<p:column>
<p:dataTable var="oglineItem" value="#{group.orderGroupLineItems}" emptyMessage="">
 <p:column>
  <h:inputText id="quantityInput" value="#{oglineItem.lineItem.quantity}"/>
 </p:column>
</p:dataTable>
</p:outputPanel>
Has anybody already tried somtheing like that? OrderGroupLineItem and LineItem are other entities. I could also add them if needed.
