Hi,
My SmartGWT version is: SmartClient Version: v11.0p_2017-02-11/PowerEdition Deployment (built 2017-02-11).
I am using SmartGWT + Spring +Hibernate in my project.
Below is my Entity which my Grid datasource is pointing to:
@Entity
@Table(name = "material_attr")
public class MaterialAttr {
/** The material attr id. */
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "material_attr_id")
@Access(AccessType.PROPERTY)
private int materialAttrId;
/** The material prep. */
@OneToMany(mappedBy ="materialAttr" , fetch = FetchType.EAGER,cascade = CascadeType.ALL)
private List<MaterialPrep> materialPrep;
}
Below is the MaterialPrep Entity:
@Entity
@Table(name="material_prep")
public class MaterialPrep {
/** The material prep id. */
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name="material_prep_id")
private int materialPrepId;
/** The material attr. */
/*@ManyToOne
@JoinColumn(name="material_attr_id" , referencedColumnName = "material_attr_id")
private MaterialAttr materialAttr;*/
/** The prep id. */
@ManyToOne
@JoinColumn(name="prep_id" , referencedColumnName="code_id")
private Code prepId;
}
Below is ds.xml:
<DataSource ID="MaterialAttr"
schemaBean="com.assaabloy.pricebook.server.persistence.model.MaterialAttr">
<field name="materialAttrId" hidden="true" primaryKey="true" />
<field name="prepCode" valueXPath="materialPreps/prepId/code"
title="Material Prep" width="150" multiple="true"/>
</DataSource>
I want the prepCode field to show comma separated values.
How can I do that in List Grid?
My SmartGWT version is: SmartClient Version: v11.0p_2017-02-11/PowerEdition Deployment (built 2017-02-11).
I am using SmartGWT + Spring +Hibernate in my project.
Below is my Entity which my Grid datasource is pointing to:
@Entity
@Table(name = "material_attr")
public class MaterialAttr {
/** The material attr id. */
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "material_attr_id")
@Access(AccessType.PROPERTY)
private int materialAttrId;
/** The material prep. */
@OneToMany(mappedBy ="materialAttr" , fetch = FetchType.EAGER,cascade = CascadeType.ALL)
private List<MaterialPrep> materialPrep;
}
Below is the MaterialPrep Entity:
@Entity
@Table(name="material_prep")
public class MaterialPrep {
/** The material prep id. */
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name="material_prep_id")
private int materialPrepId;
/** The material attr. */
/*@ManyToOne
@JoinColumn(name="material_attr_id" , referencedColumnName = "material_attr_id")
private MaterialAttr materialAttr;*/
/** The prep id. */
@ManyToOne
@JoinColumn(name="prep_id" , referencedColumnName="code_id")
private Code prepId;
}
Below is ds.xml:
<DataSource ID="MaterialAttr"
schemaBean="com.assaabloy.pricebook.server.persistence.model.MaterialAttr">
<field name="materialAttrId" hidden="true" primaryKey="true" />
<field name="prepCode" valueXPath="materialPreps/prepId/code"
title="Material Prep" width="150" multiple="true"/>
</DataSource>
I want the prepCode field to show comma separated values.
How can I do that in List Grid?
Comment