Skip to Main Content

Chinese

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Hi friends the given code is correct but i dont get all records plz help me and my code is

1033266Feb 26 2016

it is work for first row after that it is automatically go to else part so please help me

      BindingContext BContext=BindingContext.getCurrent();

        System.out.println(1);

     //  BindingContainer bindings= (BindingContainer)bctx.getCurrent().getCurrentBindingsEntry();

     BindingContainer bindings = (BindingContainer)BContext.getCurrent().getCurrentBindingsEntry();

        DCBindingContainer dc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();

    DCIteratorBinding iterBind= dc.findIteratorBinding("UsersView1Iterator");

              ViewObject vo=iterBind.getViewObject(); 

        vo.executeQuery();

        RowSetIterator rsIterator = vo.createRowSetIterator(null);

            rsIterator.reset();

            while (rsIterator.hasNext()) {

            Row row = rsIterator.next();

        String s=(String)row.getAttribute("Username");

                String s1=(String)row.getAttribute("Password");

                    System.out.println(row.getAttribute("Username"));

                    System.out.println(row.getAttribute("Password"));

                if(s.equals(user) && s1.equals(Pass)){

                    System.out.println(row.getAttribute("Username"));

                FacesMessage fm=new FacesMessage(message.toString());

                fm.setSeverity(FacesMessage.SEVERITY_INFO);

                FacesContext context=FacesContext.getCurrentInstance();

                context.addMessage(null, fm);

                    System.out.println("valid");

                return "Success";

                }else{

                    FacesMessage fm=new FacesMessage(message1.toString());

                    fm.setSeverity(FacesMessage.SEVERITY_INFO);

                    FacesContext context=FacesContext.getCurrentInstance();

                    System.out.println("invalid");

                    context.addMessage(null, fm);System.out.println(20);   return "fail";

                }       } 

            rsIterator.closeRowSetIterator(); 

        return null;

thanks in advance

raghunath

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 25 2016
Added on Feb 26 2016
0 comments
550 views