Yahya-Imam Munir
Yahya-Imam Munir

Reputation: 531

Form not displaying controls on device

when I run the app on simulator I have picture A and picture B respectively. But when I tried the same thing on device, the search results were not showing on the search page. Please check picture C and D for more clarification. This is my code:

    from=findTextField(c).getText();   
        to=findTextField1(c).getText();

protected void beforeSelectionPage(Form f) {        
   ArrayList arr = (ArrayList) response.get("root");                
                for (Object m:arr){                  
                Map ma = (Map)m;
                operatorName =(String) ma.get("OperatorName");                               
                time=(String)ma.get("Time");                
                size=(String)ma.get("Size");
                price=(Double)ma.get("Price");
                route=(String)ma.get("Route");               
                date=(String)ma.get("Date");  

                Button b = new Button(""+ operatorName);
                findContainer2(f).addComponent(b); 
                b.addActionListener((ActionEvent evt) -> {                 
                showForm("BookingPage",null);                          
                });
                findContainer2(f).addComponent(new Label(""+ from ));
                findContainer2(f).addComponent(new Label(""+ to ));
                findContainer2(f).addComponent(new Label(""+ price ));                
                f.getComponentForm().revalidate();                 
        }                               
    } 

Please how can I display the search results on the search page like that of the simulator (picture B)?

Thank you.

Yahya-Imam Munir Kolapo

Pic A and BPic C and DThis issue applies to: IDE: NetBeans, Desktop OS: Windows 7, Device: Samsung Galaxy S4

Upvotes: 0

Views: 43

Answers (1)

Shai Almog
Shai Almog

Reputation: 52770

If the server isn't visible to the device then you won't get results that you can list...

Upvotes: 1

Related Questions