HttpUtils2 Handling Responses with Multiple Panel(s)

socalsupersport

New Member
Licensed User
Longtime User
I am at a loss right now for 4 days and maybe I can't see the forest through the trees.... :sign0163:,

I have an application that performs the following:

(Get the versions out of the way)
B4A Version - 2.0.2
HttpUtils2
HttpJob

**** PROBLEM STATEMENT (NARRATIVE) *****

  1. -Main Panel opens - Posts information taken from phone and receives the response and displays to user and users moves to next screen (GOOD)
  2. -2nd Panel pnlPage2 "Page2", User fills out details hits next, information is posted (See on the webserver, database records and returns either 200 OK or data) (The response is never received by the application) (FAIL)
  3. -3nd Panel pnlPage4 "Page3", User fills out details hits next, information is posted (See on the webserver, database records and returns either 200 OK or data) (The response is never received by the application) (FAIL)
  4. -4nd Panel pnlPage4 "Page4", User fills out details hits next, information is posted (See on the webserver, database records and returns either 200 OK or data) (The response is never received by the application) (FAIL)
  5. -5nd Panel pnlPage5 "Page5", (SAME RESULTS AS PAGES 2 through 4) (FAIL)

***** VALIDATION TEST (NARRATIVE) *****************


  1. -Main Panel opens - Posts information taken from phone and receives the response and displays to user and users moves to next screen (GOOD)
  2. -User stays on the MAIN Panel, but the labels, buttons and other previous screen items are visible=false, User fills out details hits next, information is posted (See on the webserver, database records and returns either 200 OK or data) (GOOD)
  3. -User stays on the MAIN Panel, but the labels, buttons and other previous screen items are visible=false, User fills out details hits next, information is posted (See on the webserver, database records and returns either 200 OK or data) (GOOD)
  4. -User stays on the MAIN Panel, but the labels, buttons and other previous screen items are visible=false, User fills out details hits next, information is posted (See on the webserver, database records and returns either 200 OK or data) (GOOD)
  5. -User continues to stay on the MAIN Panel, but the labels, buttons and other previous screen items are visible=false, User fills out details hits next, information is posted (See on the webserver, database records and returns either 200 OK or data) (GOOD)

The above example is what perplexes me and so I have tried, maybe the service needs to be initialized on the main panel, subsequent panels... etc.

I humbly submit and raise my hand... I Need Help! :sign0085:
 

socalsupersport

New Member
Licensed User
Longtime User
How are the responses related to the visible panel?

Main Panel opens - Posts information taken from phone and receives the response and displays to user in field named lblMain.text

After the text is displayed a button is enabled that once clicked takes the user to pnlPage2 - User fills out additional fields edtPg2_01 and edtPg2_02and clicks a button; btnPg2 which posts data to the webserver just fine; (Trace Files show the post was accepted and the webserver response is 200 OK) then the user is shown pnlPage3

**** No response back to pnlPage 2 **************

If the HttpUtils2Service or HttpJob gave a "JobComplete" response, it would be parsed and then shown in lblPg3_01.Text

User fills out additional fields edtPg3_01 and edtPg3_02and clicks a button; btnPg3 which posts data to the webserver just fine; (Trace Files show the post was accepted and the webserver response is 200 OK) then the user is shown pnlPage3

**** No response back to pnlPage 3 **************

If the HttpUtils2Service or HttpJob gave a "JobComplete" response, it would be parsed and then shown in lblPg4_01.Text

The traces from the webserver all show that the posts occur and the webserver responds with a 200 OK and the MS SQL database shows the updated records have been committed to the DB

***** My Comments **************

Each of the pnlPages are Main.bal, Page1.bal, Page2.bal and Page3.bal if that helps

Just to give a little background; during the first time run... I perform the following:

Sub Activity_Create(FirstTime As Boolean)

Activity.LoadLayout("Main")
main.Initialize("")
main.LoadLayout("Main")
Activity.AddView(main,0dip,0dip,100%x,100%y)

pnlPage1.Initialize("")
pnlPage1.LoadLayout("Page1")
Activity.AddView(pnlPage1,0dip,0dip,100%x,100%y)
pnlPage1.Visible=False

pnlPage2.Initialize("")
pnlPage2.LoadLayout("Page2")
Activity.AddView(pnlPage2,0dip,0dip,100%x,100%y)
pnlPage2.Visible=False

pnlPage3.Initialize("")
pnlPage3.LoadLayout("Page3")
Activity.AddView(pnlPage3,0dip,0dip,100%x,100%y)
pnlPage3.Visible=False

End Sub

****** Hope this helps, I have tried everything and I hope it is a simple fix that I just can't see *******
 
Upvote 0
Top