I have two domain classes.
class BillingServiceGroup
{
Integer billingServiceGroupCode
String billingServiceGrpDesc
String status // ACTIVE or INACTIVE
}
class ServiceGroup
{
String serviceGroupName
String description
BillingServiceGroup billingServiceGroup
}
when i view the serviceGroup page. it shows list of all billingServiceGroup, but my requirement is that only the rows having status == ACTIVE can be displayed in the list.
so i have to filter the list based on the value of status. can anyone provide some code to implement this logic?
Try using
withCriteria: