Skip to Content
author's profile photo Former Member
Former Member

MVC - Return to calling page

Hi,

I am trying to code an MVC that returns form fields to the calling page, but can't seem to get this working.

My main.do is defined as the default BSP for the BSP application, and is being called from an independant website.

In my DO_HANDLE_EVENT I would like to return to the calling website populating form fields, but can't seem to get this to work.

I have tried the below...

1) NAVIGATION->RESPONSE_COMPLETE( )

2) NAVIGATION->RESPONSE_COMPLETE( )

navigation->exit( ).

In both cases the MVC leaves a blank screen, but doesn't close itself.

The code in my DO_REQUEST reads...

if is_navigation_requested( ) is not initial.

return.

endif.

Once the navigation is working I would assume the form fields would need to be passed through to RESPONSE in DO_HANDLE_DATA, but I can't even get to that stage.

Assistance appreciated.

Robin

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Feb 07, 2005 at 09:48 PM

    Robin,

    The first problem is that your reference world is slightly upside down. So let us put some bits and pieces on the table. With your next questions, we try to bring it more back to normal.

    There is a HTTP request, that comes from somewhere (usually a browser) and a HTTP response (that what the server sends back). Nothing else. Only these two concepts.

    The concept of "form fields" are only interesting/valid within the context of a HTTP request. Which means only when somebody (the guy talking to us) send us a HTTP request, can we peek inside and look at the form fields.

    For the HTTP response (what we are returning), there is only one concept (at our minimal abstraction level): HTML! You can only return a complete page that is full of HTML to the caller (which is usually the browser and it wishes to display this page).

    Does this help you? No, probably not. So let me ask some questions in return:

    (*) Describe your a simple version of the complete scenario. I suspect you have some external web page, that calls your WhatIsDate.HTM page. And this page must return a string to the sender.

    (*) Can we use XML? What type of client is the caller? If a browser, we can consider a JavaScript solution.

    brian

    Add a comment
    10|10000 characters needed characters exceeded

    • Hallo Robin,

      After reading your message a number of times, I am at lost to answer. It is not even worth to shoot in the dark here, as we are going to be way of mark. The problem is that you are using terminology that is not only non-standard, but in many cases theorectically impossible. We can try to help, but it going to take some time to really understand what you want to achieve. Do you have the time (and the patience)? Or could you describe this to another developer in your group, who can then write it down.

      The first thing to learn in the world of HTTP is that there is exactly one HTTP request, and one HTTP response. We can only answer something, if someone is asking. This is in all cases the browser.

      So let us start with building a picture of where you are. You posted the source of a view. No, it does not have to be MVC, a simple would be the same. In this view there is some code to display a table, with an event handler. The only way that this piece of the puzzle is going to work, is if the browser is calling us. So we have this very simple picture (we try to remove some complexity):

        human with browser    ---- sends HTTP request to server --------> server/BSP
                              <--- BSP sends back table ----
      
        human click in table  ---- browser sends HTTP request to server ---> BSP sees click, does something
                              <---- BSP sends back the data you want (either HTML or XML)
      

      Important things in this picture:

      (*) There are always matching HTTP request and response cycles.

      (*) After the click we have to send a HTTP response, this is going to land in the browser

      So far, so good. We can even just send a small ByeBye into the browser.

      But now I fail with the rest of the picture. If you want to send data somewhere, of course you can make an outgoing call from BSP to some other server using either RFC or HTTP. Is this what you want?

      Or, you write "and the developer that side intends on including my page call as some type of iView." Now, if this iView is a SAP Enterprise Portal, then of course you can consider to use a portal event to fire the information from your returned page to any other iView listening (in the browser) to events.

      All in all, I am really at lost to say anything more intelligent. Hope at least that this did help.

      brian

  • author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2005 at 02:22 PM

    Brian,

    Hi. I have spoken to my learnered collegues, and the answer lies in Java script. I have implemented their suggestions, and my BSP works now as expected.

    So all is solved. I guess shows that as long ask you know what to ask for then you will get the answer.

    Thanks for your input.

    Regards,

    Robin.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.