Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5993085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:37:29+00:00 2026-05-22T23:37:29+00:00

Hello Sir I m making an app in which i got stuck in a

  • 0

Hello Sir I m making an app in which i got stuck in a problem please help me out …

in one page i m getting the data from server and displaying that data on the page now i m use Focusable for highlighting them …now my requirement is that when focus come on any data the it should change the field taking that name on which focus is present ..

following is the code which is showing the data on the page now it is working on field change where i need to click the label field ….

static LabelField[] CrDrLabels;

    public LowerCreditors() throws Exception {

        super(VerticalFieldManager.VERTICAL_SCROLL);

        CrDrLabels = new LabelField[CrDrList.VendorNameArr.length];

        for (int i = 0; i < CrDrLabels.length; i++) {
            final int t = i;

            VerticalFieldManager hfm = new VerticalFieldManager(USE_ALL_WIDTH) {

                protected void sublayout(int Width, int Height) {

                    // TODO Auto-generated method stub

                    super.sublayout(Width, Height);

                    setPositionChild(getField(0), 15, 0);

                    setPositionChild(getField(1), Display.getWidth()
                            - getFont().getAdvance(CrDrList.VendorValArr[t])
                            - 10, 0);
                }
            };

            CrDrLabels[i] = new LabelField(CrDrList.VendorNameArr[i],
                    LabelField.FOCUSABLE | Field.USE_ALL_WIDTH) {
                protected boolean navigationClick(int status, int time) {
                    fieldChanged(this, 0);
                    return true;
                };
            };

            LabelField Value = new LabelField(CrDrList.VendorValArr[i]);
            CrDrLabels[i].setPadding(0, 170, 0, 0);

            hfm.add(CrDrLabels[i]);
            hfm.add(Value);

            add(hfm);


        }
    }

    public void fieldChanged(Field field, int context) {

        // TODO Auto-generated method stub
        for (int i = 0; i < CrDrList.VendorNameArr.length; i++) {
        getFieldWithFocus();
            if (field == CrDrLabels[i]) {

                String LN = CrDrLabels[i].getText();
                CrDrList.cname1 = LN;

                LabelField cname1 = CrDrLabels[i];
                CrDrList.selLad = CrDrLabels[i];

            }

        }
    }

and the the other code is

menu.add(new MenuItem("View last 5 days transaction", 20, 10) {
            public void run() {
                if(property.Status.equals("online"))
                {
                Viewlast5daystransaction();
                }

                else
                {
                    Dialog.alert("Please login Online to access the data..");
                }
            }

            String LedgerName = CrDrList.cname1;

            private void Viewlast5daystransaction() {
                //Dialog.alert("Last 5 Days Transaction");

                int resCode = 0;

                HttpConnection connection = null;
                try {
                    connection = getConn(property.LedgerDetailsURL);
                } catch (Exception e1) {
                    // TODO Auto-generated catch block
                    System.out.println(e1.getMessage());
                    e1.printStackTrace();
                }

                try {
                    resCode = connection.getResponseCode();
                } catch (Exception e1) {
                    // TODO Auto-generated catch block
                    e1.printStackTrace();
                }

                if(resCode==0)
                {
                    Dialog.alert("Internet Connectivity not available.. Please try again later..");

                    TallyA TA;

                    try {
                        TA = new TallyA();

                        UiApplication.getUiApplication().popScreen();
                        UiApplication.getUiApplication().pushScreen(TA);
                    } catch (Exception e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }

                }

                sPostdata = "{\"tok\":\""
                        + CompanyList.tok;

                System.out.println("Postedddddd Dataaaaaaaaa" + sPostdata);
                try {
                    String response = LedgerSearchReport();

                    System.out.println("response" + response);

                    ParseBankdetails.parsebankdetails(response);

                    System.out.println("response : " + response);

                    if(response != null)
                    {
                    LastFiveDaysCr LF;
                    try {
                        LF = new LastFiveDaysCr();

                        UiApplication.getUiApplication().pushScreen(LF);
                    } catch (Exception e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                    }

                    else
                    {
                        Dialog.alert("No Data..");
                        Creditiors LF;
                        try {
                            LF = new Creditiors();

                            UiApplication.getUiApplication().pushScreen(LF);
                        } catch (Exception e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        }
                    }

                }
                catch (Exception e) {

                    e.printStackTrace();
                }

            }
        });

in this field only i want that instead of field change there should be focus change …
please help me on that …

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:37:29+00:00Added an answer on May 22, 2026 at 11:37 pm

    I think you should implement the logic in “onFoucus()” method ,instead of using “onfieldChanged()” for CrDrLabels[i];

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

$(.menu-container).animate({top:25px}); $(.menu-container).animate({top:-900px}); $(.windows-container).animate({top:-730px}); hello sir.. i got a problem on queue in jquery.. what
Hello good morning everyone, i have an iphone app which is still in development
Hello I'm stuck on a simple Java exercise, I hope someone can help. Sorry
Hello I have the following error by git-fsck, which cannot be cleaned by git-gc
Hello can anybody solve this please I'm creating the object in the action class
Hello Guys I am trying to figure out why i am gettings this error
Hello ever one I want to ask a question about file opening.I want to
Hello I have this problem with PyQt4-dev-tools that include: * a user interface compiler
Hello I need some help with a bug in Internet Explorer 9. I am
hello im am getting JS error : Uncaught SyntaxError: Unexpected identifier here <script type=text/javascript>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.