2014-02-17 1 views
0

Infinite 진행률을 사용하는 경우 다음 화면 렌더링에 문제가 있으며이 코드의 주석 처리가 취소 된 경우 목록이 표시된 다음 화면을 표시 할 수 있습니다.CodeNameOne InfiniteProgress 문제

final Form poList = (Form) super.createContainer(getResourceFilePath(), "POList"); 
    ConnectionRequest request = new ConnectionRequest() 
{ 
    Hashtable response = null; 

     protected void readResponse(InputStream input) 
     { 
       //Read and parse the response 
     } 

     protected void postResponse() 
     { 
      if (response != null) 
      { 
       try 
       { 
       //Get a sorted List from the response and use it to fill the list 
         poList.show(); 
       } 
       catch(Exception e) 
       { 
        e.printStackTrace(); 
       } 
      }    
     } 
    }; 

    request.setUrl(poListUrl); 
    request.setPost(false); 
    request.addRequestHeader("Authorization","Bearer "+accessToken); 
    request.setContentType("text/xml"); 

      /* 
      If these three lines are commented then the next form is shown properly 
      */ 
    InfiniteProgress ip = new InfiniteProgress(); 
    Dialog dlg = ip.showInifiniteBlocking(); 
    request.setDisposeOnCompletion(dlg); 

    NetworkManager.getInstance().addToQueue(request); 

답변

0

무한 진행 상태와 다음 양식 표시간에 경쟁 조건이 있습니다. 그런 다음

ConnectionRequest request = new ConnectionRequest() 

  dlg.dispose(); 
      //Get a sorted List from the response and use it to fill the list 
      poList.show(); 
전에 대화 보여주는 코드를 이동