VbzCart/docs/v1/class/vcPageContent ckout/DoPage/2019-04-27

From Woozle Writes Code
Jump to navigation Jump to search

2019-04-27 notes

I think what needs to happen is that things need to happen in the following order:

  • detect submitted page - $this->GetPageKey_forData();
  • detect requested page - $this->DetectPageRequest();
  • determine page to show - $this->HandlePageRequest();
    • calculate if requested page should be displayed
  • load all form controls needed to receive submitted & show display page
    • 2019-04-28 probably what needs to happen here is that we need to duplicate the logic of whatever calls Template:L/version/method() et al. (currently includes capturing, rendering, and other stuff) and just create the requisite objects, don't try to use them yet.
    • 2019-05-04 The first problem is to figure out how to make sure that this logic gets invoked during the setup events (KI_NODE_EVENT_DO_BUILDING or KI_NODE_EVENT_DO_FIGURING, not sure which is preferable)
      • Seems like it should be happening in Template:L/version/method, which does get called.
      • ...but we're trying to receive the form first, here in Template:L/version/method(), before the controls have been created...
      • ...which happens in Template:L/version/method, which is called before the input is processed in Template:L/version/method() so we know which controls to create.
      • So CapturePage() needs to be split into two parts:
        1. receive raw form data (do not load into controls; just detect request)
        2. load form data into control objects (which must be created first)
      • ...except no, it doesn't; I moved the CapturePage() call so it comes last, and still get the error -- so apparently the controls are not being created wherever I thought they were (where was that again?)
  • receive submitted page - $this->CapturePage($oRes);
  • process submitted page

To examine -- how do the following functions intersect with the above steps?:

  • $this->CapturePage($oRes);
  • $this->HandlePageRequest();