Seam Search
malini Oct 14, 2011 12:52 AMHi All,
I'm using seam 2.0.1 and Jboss-4.2.0
I have following issue in my search page.
When I'm going to search from Customer or Product , it gives me following error on JBOSS
09:33:27,471 WARN [lifecycle] /M150spaceAllocationList.xhtml @31,90 value="#{m150spaceAllocationList.m150spaceAllocation.m168custsup.id.customerCode}": Target Unreachable, 'm168custsup' returned null on 'org.dms.oilbank.entity.M150spaceAllocation'
javax.el.PropertyNotFoundException: /M150spaceAllocationList.xhtml @31,90 value="#{m150spaceAllocationList.m150spaceAllocation.m168custsup.id.customerCode}": Target Unreachable, 'm168custsup' returned null on 'org.dms.oilbank.entity.M150spaceAllocation'
....This is my xhtml page
<rich:simpleTogglePanel label="Space Allocation Search"
switchType="ajax">
<s:decorate template="layout/display.xhtml">
<ui:define name="label">Space Allocation ID</ui:define>
<h:selectOneMenu id="spaceAllocationId"
value="#{m150spaceAllocationList.m150spaceAllocation.id.spaceAllocationId}">
<f:selectItem itemLabel="Select Space Allocation ID" itemValue="" />
<f:selectItems value="#{populateAction.spaceAllowList}" />
</h:selectOneMenu>
</s:decorate>
<s:decorate template="layout/display.xhtml">
<ui:define name="label">Customer</ui:define>
<h:selectOneMenu id="cust"
value="#{m150spaceAllocationList.m150spaceAllocation.m168custsup.id.customerCode}">
<f:selectItem itemLabel="Select Customer" itemValue="" />
<f:selectItems value="#{populateAction.custNameList}" />
</h:selectOneMenu>
</s:decorate>
<s:decorate template="layout/display.xhtml">
<ui:define name="label">Product</ui:define>
<h:selectOneMenu id="productLname"
value="#{m150spaceAllocationList.m150spaceAllocation.m150products.id.productId}">
<f:selectItem itemLabel="Select Product" itemValue="" />
<f:selectItems value="#{populateAction.productNameList}" />
</h:selectOneMenu>
</s:decorate>
<s:decorate template="layout/display.xhtml">
<ui:define name="label">BL No</ui:define>
<h:inputText id="blNo"
value="#{m150spaceAllocationList.m150spaceAllocation.blNo}" />
</s:decorate>
<s:decorate template="layout/display.xhtml">
<ui:define name="label">Vessel Name</ui:define>
<h:inputText id="vessal"
value="#{m150spaceAllocationList.m150spaceAllocation.vessal}" />
</s:decorate>
</rich:simpleTogglePanel>And this is my m150spaceAllocation Entity class
@Entity
@Table(name = "M150SPACE_ALLOCATION")
public class M150spaceAllocation implements java.io.Serializable {
private M150spaceAllocationId id;
private M168custsup m168custsup;
private M150units m150units;
private M150products m150products;
private Date transacDate;
private double transacSeqNumber;
private String blNo;
private String vessal;
private double quantityRequested;
...
@EmbeddedId
@AttributeOverrides({
@AttributeOverride(name = "unit", column = @Column(name = "UNIT", nullable = false, precision = 2, scale = 0)),
@AttributeOverride(name = "spaceAllocationId", column = @Column(name = "SPACE_ALLOCATION_ID", nullable = false, length = 25))})
@NotNull
public M150spaceAllocationId getId() {
return this.id;
}
public void setId(M150spaceAllocationId id) {
this.id = id;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumns({
@JoinColumn(name = "UNIT", referencedColumnName = "UNIT", nullable = false, insertable = false, updatable = false),
@JoinColumn(name = "CUST_SUP_FLAG", referencedColumnName = "CUST_SUP_FLAG", nullable = false, insertable = false, updatable = false),
@JoinColumn(name = "CUSTOMER_CODE", referencedColumnName = "CUSTOMER_CODE", nullable = false, insertable = false, updatable = false)})
@NotNull
public M168custsup getM168custsup() {
return this.m168custsup;
}
public void setM168custsup(M168custsup m168custsup) {
this.m168custsup = m168custsup;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumns({
@JoinColumn(name = "UNIT", referencedColumnName = "UNIT", nullable = false, insertable = false, updatable = false),
@JoinColumn(name = "UOM_ID", referencedColumnName = "UOM_ID", nullable = false, insertable = false, updatable = false),
@JoinColumn(name = "QUANTITY_UOM", referencedColumnName = "QTY_UOM", nullable = false, insertable = false, updatable = false)})
@NotNull
public M150units getM150units() {
return this.m150units;
}
public void setM150units(M150units m150units) {
this.m150units = m150units;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumns({
@JoinColumn(name = "UNIT", referencedColumnName = "UNIT", nullable = false, insertable = false, updatable = false),
@JoinColumn(name = "PRODUCT_ID", referencedColumnName = "PRODUCT_ID", nullable = false, insertable = false, updatable = false)})
@NotNull
public M150products getM150products() {
return this.m150products;
}
public void setM150products(M150products m150products) {
this.m150products = m150products;
}
....And here are the parameters which on list page XML
<param name="vessal" value="#{m150spaceAllocationList.m150spaceAllocation.vessal}"/>
<param name="productId" value="#{m150spaceAllocationList.m150spaceAllocation.m150products.id.productId}"/>
<param name="customerCode" value="#{m150spaceAllocationList.m150spaceAllocation.m168custsup.id.customerCode}"/>
<param name="spaceAllocationId" value="#{m150spaceAllocationList.m150spaceAllocation.id.spaceAllocationId}"/>
<param name="blNo" value="#{m150spaceAllocationList.m150spaceAllocation.blNo}"/> pls give me a solution for this.