else part does not working


hi everyone,

I am new in grails and I am trying to send response to client. I am using extjs 4 with it. But my else of is not working in the Service class.If my else part will be called I will be able to make the job done. Can anyone please help me ?



here is my code below :

def get(id) {
        def count = 0
        def flag = true
        def members = []
        
        def c = Account.findByMemberno(id)
        //System.out.print("lllllllllllllllllllllllllllllllllllllllllllllllllllllllllll"+c.heading_bn);
        def d = c.branch
        def e = c.salutation
        //System.out.print("lllllllllllllllllllllllllllllllllllllllllllllllllllllllllll ====== "+d);
        def branchname = Branch.findById(d)
        def salutation = Salutation.findById(e)
        def nm = branchname.branchname
        def nn = salutation.salutation
        
        System.out.print("lllllllllllllllllllllllllllllllllllllllllllllllllllllllllll  ====  "+nm+"  lllllllllllllllllllllllllllllllllllllllllllllll ====  "+nn);
        if(c){
            //System.out.print("==============================================================================================================================================")
            def member = [sal: salutation.salutation, brn: branchname.branchname, id: c.id, exaccno:c.exaccno, heading_en:c.heading_en, heading_bn:c.heading_bn, memberno:c.memberno, exmemberno:c.exmemberno, branch:c.branch, salutation:c.salutation, fullname:c.fullname, nickname:c.nickname, acctype:c.acctype, currency:c.currency, operation:c.operation]

            members << member
            flag = flag && true
            count++
        }else{
            System.out.print("kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk")
//            def member = [sal: "", brn: "", id: "", exaccno:"", heading_en:"", heading_bn:"", memberno:"", exmemberno:"", branch:"", salutation:"", fullname:"", nickname:"", acctype:"", currency:"", operation:""]

//            members << member
//            flag = flag && true
//            count++
            flag = flag && false
        }
        return [flag:flag, count:count, members:members]

    

Please note that this is a forum for the Vaadin framework, not a general programming forum. That said, maybe some kind soul here will still help you.