How to program navigation in a MVC application? (help please!!)

Hi,
I´m exploring how to develop a BSP application with MVC.
SO far I have a ´page´ composed by a controller, 2 or more sub-controllers and their respective views.
But I want an application consisting of many pages.. So here I am, in my DO_HANDLE_EVENT method wandering what to do when I want to redirect the user to a new page. I guess there´s two options here:
1) change the subcontrollers/views for the new one. (using controller_set_active or controller_delete..?)
2) redirecting to the new page with navigation->goto_page( 'page2.do' ).
I like the second option, but there´s a problem: all my model instances die!! How can I keep them alive? How can I keep data (objects) alive from the moment a user opens the first page till he logs off the aplication??
(I tried using the application class, but I just can´t access it using MVC, guess it´s only available from pages with flow logic)
I truly need a hint on this! Any suggestions are most welcomed!

Hi Mariana,
I think the most important advice is to never jump
directly via goto_page(). As you have noted, this way
you lose your context. Myself I use the following
approach:
1) There is a strict controller hierarchy. The topmost
   controller holds your application data.
2) In the view of the topmost controller its
   subcontrollers are called via
      <bsp:call url="sub.do" comp_id="yourchoicehere" >
               <bsp:parameter name = "mode"
                              value = "<%=mode%>" />
      </bsp:call>
   where "mode" is an attribute of the view which holds
   the information in which state of processing your
   application is.
3) In the controllers in the DO_REQUEST methods
   you call its views by
   dispatch_input( ).
   l_main_view = create_view( view_name = 'main_view.htm' ).
  l_main_view->set_attribute( name = 'mode' value = mode ).
  call_view( l_main_view ).
  The dispatch_input method is only needed in the
  topmost controllers.
4) Navigation is done by events which are passed
   automatically to the DO_HANDLE_EVENT method of
   the controller.
   IF htmlb_event IS BOUND.
      CASE htmlb_event->server_event.
        WHEN 'YOUREVENTHERE'.
5) To understand how things work you should set
   breakpoints in all DO_HANDLE_EVENT and DO_REQUEST
   methods. You will see how events got passed upwards
   the controller hierarchy and how controllers call
   their subcontrollers.
6) Further hint: Pass all parameters by controller
   and view attributes.
Hope that helps.
Joachim

Similar Messages

  • I Connected My IPad 1st Generation To The Computed To Have It updated And I Lost All of My Pictures, How Do I Get Them Back?? Help, Please!

    I Connected My IPad 1st Generation To The Computed To Have It updated And I Lost All of My Pictures, How Do I Get Them Back?? Help, Please!

    Did you backup the iPad first? If you did - restore from the backup in order to restore the photos in the Saved Album on your iPad. If the photos were synced to the iPad, then sync them back again via iTunes.
    How to backup and restore from a backup
    http://support.apple.com/kb/HT1766
    If you did backup first, you will be restoring your most recent backup and you should be OK. But know that when you restore from a backup, you restore everything that is in that backup onto the iPad .... All documents, device settings, all data and so on. You cannot just select photos to restore to the iPad. It's all or nothing.

  • Hi - I'm trying to sync iBooks on my Macbook Pro with iBooks running on my iPad. I have some pdf's download from the net I want to share between devices and I can't work out how to sync the two devices. Any help please?

    Hi - I'm trying to sync iBooks on my Macbook Pro with iBooks running on my iPad. I have some pdf's download from the net I want to share between devices and I can't work out how to sync the two devices. Any help please? I'm running Mavericks

    Thanks for your help Brij011 - much appreciated. Apologies as I'm a newbie but I've looked at the info for synching and I appear to have all the switches flicked on my iPad. Does the iPad and iBooks only sync in iCloud for purchases as I appear to be doing something wrong. I could sync ok when books was in iTunes but since migrating to Mavericks I think I'm doing something wrong!!

  • I want to make all my caller id pics full screen how do i do that? When i download a picture from my phone it makes it full screen then it goes back to the small photo in the upper right hand corner how do i make them stay full screen help please:-)

    I want to make all my caller id pics full screen how do i do that? When i download a picture from my phone it makes it full screen then it goes back to the small photo in the upper right hand corner how do i make them stay full screen help please:-)

    @Naiks, having suffered through unsuccessful synching attempts for Calendar and Contacts myself, l would suggest you try the following:
    UNINSTALL iCloud control panel from your PC. Seems silly, but do it.
    Go into Outlook, and look at the very top menu. Click FILE, then ACCOUNT SETTINGS, then click the popup box.
    You will see a list of all your email accounts. Make sure that ONE of them has a checkmark against it. If not, select the account your want as your default, and click "set as default.
    Exit out of Outlook and reboot your machine.
    Now reinstall iCloud, check CALENDAR and CONTACTS, and do as instructed when prompted.
    Reboot for good luck and now launch OUTLOOK. All that remains is to locate your iCloud Contacts and Calendar files, and make them your default.
    IMPORTANT: Don't panic if you can't find your contacts -- they're there. Click CONTACTS and you'll see you have several available contact files. Locate the one label "iCloud" in grey type. Right-click on it, select PROPERTIES, then click the Outlook Address Book tab. Check the box that says something like "Make this my default Outlook Address Book." Keep clicking "apply" and "okay" until you've exited out of the dialog box maze.
    You may have to do something similar with your Calendar files. I dd not, but if you need to, do it.
    Everything should now sync pretty seamlessly.
    I didn't have the exact same problem as you, but my dilemma was close enough. Good luck!
    Arthur P. Johnson

  • HT2486 I am sending an email to a group which I have created in my contacts.  I would like to hide the list of people's emails but cannot see how I can do that.  Can anyone help please?

    I am trying to send an email to a group which I have created in my contacts.  I would like to hide the list of email addresses but cannot see how to do this.  Can anyone help please?

    Thank you for your message.  
    I can see how you do that when using the 'normal' emailing system from my mailing box, but not when working from the contact application (the 'book' on the bottom icon bar with the @ on it)....

  • How to get reports cumulated balances? need help please

    Dear all,
    I need your help please in this issue.
    I am creting a report using reports designer in oracle, well the fact is i don't know how to do the following:
    if i have for example in the report the following to be diplayed :
    Date Amount Balance
    25/5/2011 2000
    27/5/2011 5000 should be calculated and equal to 2000+5000=*7000*
    28/5/2011 4000 calculated and equal to 7000 + 4000=*11000*
    29/5/2011 1000 calculated equal to 11000 + 1000 = 12000
    what is the method so i can get the balance values calculated 7000, 11000 and 12000? what do i do? any hints please
    thanks for your help

    Using analytic function can be done through query as below...
    SQL> SELECT EMPNO, ENAME, SAL, SUM(SAL) OVER (ORDER BY SAL ROWS UNBOUNDED PRECEDING) RUNNING_BALANCE
      2  FROM SCOTT.EMP
      3  /
         EMPNO ENAME             SAL RUNNING_BALANCE
          7369 SMITH             800             800
          7900 JAMES             950            1750
          7876 ADAMS            1100            2850
          7521 WARD             1250            4100
          7654 MARTIN           1250            5350
          7934 MILLER           1300            6650
          7844 TURNER           1500            8150
          7499 ALLEN            1600            9750
          7782 CLARK            2450           12200
          7698 BLAKE            2850           15050
          7566 JONES            2975           18025
          7788 SCOTT            3000           21025
          7902 FORD             3000           24025
          7839 KING             5000           29025
    14 rows selected.
    SQL> -Ammad

  • Hi, I just put a new internal hard disk to my MacBook after formattimg it and I don't know how to install the OS X? Any help please

    Hi, I just put a new internal hard disk to my MacBook after formattimg it and I don't know how to install the OS X? Any help please

    Be sure you have prepared the new drive correctly:
    Drive Preparation
    1.  Boot from your OS X Installer Disc. After the installer loads select your language and click on the Continue button.  When the menu bar appears select Disk Utility from the Utilities menu.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area.  If it does not say "Verified" then the drive is failing or has failed and will need replacing.  SMART info will not be reported  on external drives. Otherwise, click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID (for Intel Macs) or APM (for PPC Macs) then click on the OK button. Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    Steps 4-6 are optional but should be used on a drive that has never been formatted before, if the format type is not Mac OS Extended, if the partition scheme has been changed, or if a different operating system (not OS X) has been installed on the drive.
    When formatting has completed quit DU and return to the installer.  Complete the OS X installation.

  • I can't Install the Mac OS X Lion because of Disk Locked. How to Unlock the Disk? Anyone can Help Please

    I can't Install the Mac OS X Lion because of Disk Locked. How to Unlock the Disk? Anyone can Help Please

    Right click the hard drive icon and select Get Info. In the new pane, on the bottom, do this:
    1. click the padlock, and authenticate with your password.
    2. change Privilege to Read & Write - just click what is there and options will appear.
    3. close the pane.

  • How to program a pure 64-bit application with cvi 2009?

    Hello,
    I am confused by the menu options, from the menu of Build>>Configuration, it can specify the X64 option that seems it can generate a 64-bit program, but from the menu of Options>>Build options..., the default call convention not has the option of __fastcall. I am not sure if just specify the Build>>Configuration to X64, that the generating code is a pure 64-bit?
    David

    David,
    The calling convention setting in the Build Options dialog only applies to 32-bit builds. That's why it has "(32-bit)" in the name. The reason __fastcall isn't shown in the Build Options dialog is because there is nothing to choose -- that is the only calling convention that can be used with 64-bit builds.
    As for size_t (and ssize_t), I think you might be misunderstanding that portion of the help topic. You do not have to (nor should you) change all your integers to size_t. As Wolfgang mentioned earlier, you should only change the types of integers which might hold 64-bit values in the 64-bit version of your application. The return value of a callback is not an example of something that would ever hold a 64-bit value, so it was not changed to size_t.
    Luis

  • How to adjust ALV size in ITS application? Please Help!

    Hi Experts,
          I have a ABAP program that shows a ALV report using function module - REUSE_ALV_GRID_DISPLAY.
    This ABAP program I have web enabled using ITS (SICF transaction).
    When I see the ALV on the browser, It has only 10 rows but still vertical and horizontal scrollbars are dislayed for the ALV itself. Moreover the horizontal scrollbar is shown near the browser status bar. So Unnecessarily blank space is shown in the ALV after 10 rows.
    I have even tried ~ALVGRIDPAGESIZE = 10. But it has no affect. I am using SAP 6.20.
    So how to control the scrolling and ALV dispaly size?
    Please help!
    Thanks
    Gopal

    hi
    good
    go through these links, i hope these ll help you to solve your problem,
    http://www7.sap.com/sweden/pdf/coursecatalog.pdf#search=%22ADJUST%20THE%20ALV%20SIZE%20IN%20INTERNET%20TRANSACTION%20SERVER%20APPLICATION%20%2C%20SAP%22
    thanks
    mrutyun^

  • HowCalling  or Navigating to specific view ?--Help please

    Hi friends
    I am developing a webdynpro application.It has two components say FirstApp and SecondApp. They use FirstComp and SecondComp respectively.
    FirstComp has views View1, View2,View3,View4 and it has navigations defined in the flow View1 to View2, View2 to View3, View3 to View4.
    SecondComp has views View16, View7,View8,View9 and it has navigations defined in the flow View6 to View7, View7 to View8, View8 to View9.
    I am trying to call View3 of FirstAPP from View 7 of SendApp.
    I have followed the guidelines specified in tutorial Inter-Application-Navigation in Web Dynpro.pdf  .
    I could not navigate to View3 but View1 is displaying. Could any one have solutions.help and huggestions appreciated.I will award points completely for right solution.
    Thank you in advance
    Maruti

    Hallo,
    I developed a sample application and wrote a corresponding article which exactly deals with this issue: <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/751d003a-0b01-0010-8996-afbaa3fd5339">cross-component Navigation, Explained - How to Navigate Inside Web Dynpro Component Interface Views</a>
    Regards, Bertram

  • Photoshop CS2 (program error msg)... Help please!!

    I have installed the full creative suite 2 on my new iMac. everything works fine except photoshop?!!?
    Illustrator works great, In-Design works great, But when i try to open a file or create a new page in PS it tells me "Could not create document because of a program error"???? ***?
    I had a previous version of CS and it worked fine for one day, then that started happening. I installed the CS2 trial version, and it would still give me the same error msg. I erased everything and installed the new CS2 (photoshop, illustrator , in-design and acrobat). It still gives me the same darn msg.???
    Any help would be greatly appreciated!
    thanks

    See the Adobe Knowledge Base document"Error 'Could not complete your request...' or 'Could not create a new document...' (Photoshop CS2 on Mac OS X v10.4)"
    I suggest whenever you have problems with third-party applications, the first place to start troubleshooting is with the application's documentation, then vendor's web site. Usually their sites have FAQs, lists of known bugs, or application-specific forums similar to these Discussions. Sometimes, unlike the Apple Discussions, the questions are even answered by employees of the vendor.
    The document cited above was found in 10 seconds by searching the Adobe support site.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X

  • How to terminate a method??? Help Please!

    Hi, I have the next class which I use to get all the html links from a page passed as url. The problem is that the process terminate with System.exit(). When the class was stand alone this was no problem, but now I need the class being a part of a more complez program and I don�t know how to stop the execution when it gives me all links.
    Here is the class:
    import java.io.*;
    import java.net.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import java.lang.*;
    class getLinks {
    final int lim = 100;
    int i,cont = 0;
    static String links[][] = new String [100][2];
    Reader getReader(String uri) throws IOException {
    if (uri.startsWith("http:")) {
    // Retrieve from Internet.
    URLConnection conn = new URL(uri).openConnection();
    return new InputStreamReader(conn.getInputStream());
    else
    // Retrieve from file.
    return new FileReader(uri);
    public String [][] getHrefs(String url){
    EditorKit kit = new HTMLEditorKit();
    Document doc = kit.createDefaultDocument();
    // The Document class does not yet handle charset's properly.
    doc.putProperty("IgnoreCharsetDirective",Boolean.TRUE);
    try {
    Reader rd = getReader(url);
    kit.read(rd, doc, 0);
    rd.reset();
    ElementIterator it = new ElementIterator(doc);
    javax.swing.text.Element elem;
    while ((elem = it.next()) != null) {
    SimpleAttributeSet s = (SimpleAttributeSet)elem.getAttributes().getAttribute(HTML.Tag.A);
    if (s != null) {
    links[0] = (s.getAttribute(HTML.Attribute.HREF)).toString(); // Urls
    links[i][1] = (elem.getDocument().getText(elem.getStartOffset(), // Desc
    elem.getEndOffset() - elem.getStartOffset())).toString();
    i++;}
    } catch (Exception e) {
    e.printStackTrace();
    System.exit(0);
    return links;
    Any ideas? Thanks, Hidra.

    Yes, is the logical, but when I remove that line the process never terminate. I don�t know why.

  • Premiere Pro CC Source and Program Playback Controls not working.. help please.

    Hi,
    Need your help to find out why none of the Premiere Pro CC Source and Program Playback Controls are working.. I can do playback using spacebar, but not clicking on the controls... same goes the rest.
    Thank you,
    Mauro

    Dear Mark,
    Thank you for the hint/link, reseting the toolbar did the trick.
    Regards,
    Mauro

  • I have some videos on my macbook and i don't know how to transfer to my iphone 5s, any help please...... i'm new to apple :D

    i have a macbook pro version 10.9.4 OS X, and i've try to transfer some videos from my mac to my iphone 5s but i don't know how to do it since i just move from my country and i'm new to apple product. please help

    Import them into the iTunes library, using MPEG Streamclip to convert them to MPEG-4 first if needed, and then sync the iPhone with that library.
    (112754)

Maybe you are looking for

  • Extract data from PDF to SAP

    Hi all,    I have created an Offline form in sfp Transaction and emailed successfully .      And now that Receiver has sent me the form with the filled pdf form to my outlook id ( bcas my mail id is being configured in SMTP) .    Now I want to Update

  • Regarding multi sources to single target

    Hi all, In which case( business need) we will go for multi messages to a single one(n:1) mapping. so far I have encountered 1:n but not vice versa. Please explain business need and give some blogs to practice. Thanks

  • Curve pdf reader

    i  found this  link by gooling: http://www.pdfreaderreviews.com/67,repligo-reader-​pdf-reader-for-blackberry.html but being a stupid cripple and on my own can't see what i do to get the reader onto my  bb is it any good and what should  happen and wh

  • How does webserver provide html components as httprequest

    How does a component and it's value in a html page is passed as a HTTPRequest to a JSP page? eg: <input type=text name=textbox value="hi> how is this component sent to my calling JSP page in the form of HTTPRequest,such that the value of the componen

  • GX630 freeze/black screen

    I have had this laptop since January 2009, and we've had a  rather rough journey together. I have RMA'ed my laptop 3 times now. The first time was for my DVD drive not working and an incredibly noisy fan. I think this replacement is probably irreleva