Replacement of detail view controller using segues

Im trying to get a button in the master view controller of a UISplitView controller to change the image being shown in the detail view controller of the same UISplitView controller. Im trying to find out if it is possible to do this with segues alone without defining IBActions. If so, Im having trouble figure out what kind of segue would do this. I tried to control-drag from the button in the master view controller to the instance of the detail view controller that I want replacing the first instance(root instance) of the detail view controller and choosing the replace segue but that isn't working out. Any help would be greatly appreciated. I found this was easier to do in the UINavigationController using storyboard and segues because you just "draw" the different instances with different images on the IB canvas and they get pushed according to what button you pressed in the previously on screen view controller however Im having trouble doing this in a split view controller's detail side which in my case is not inside a UINavigationController.

Hi Lakshmi,
Doing with MVC would be simpler one compared to page with flow logic.
Lakshmi you have specified that u have created HEADER IN ONE VIEW and the buttons needed foe the same page in another view.
You can replace that by including the coding as follows.
Write the codings needed for header in page fragment and include that in the needed page using the syntax
<%@ include file="relative URL"%> relative url is the name of the fragment under which you have to write the coding for header.
Once you have done this you can include the header in any view just by calling the above syntax alone.
After the completion of this task,you can design the buttons in the same view in which you have included the header.Time consumption will be advantage here.
You have specified that, by clicking a button your page should be navigated to second and so on.This can be easily achieved by pressing the following keys under DOHANDLEEVENT.
case evevt.
when 'id of button 1'
navigation ->next_page('*goto'*)
Follow thew same  for all the buttons in their respective DOHANDLEEVENT
In the main page(ie by clickin the name of the application you will bw getting a window) in you should specify as
firstpage.htm   goto secondpage.htm
Link:[helplink|http://help.sap.com/saphelp_nw04/helpdata/en/28/4bae407e69bc4ee10000000a1550b0/framese
t.htm]
Hope this will help you.
With Regards,
SHARMILA BRINDHA.M

Similar Messages

  • Problem occured when create a tree table for master-detail view objects using SQL queries?

    I am programming a tree table for master-detail view objects using SQL queries and these 2 view objects are not simple singel tables queries, and 2 complex SQL are prepared for master and view objects. see below:
    1. Master View object (key attribute is SourceBlock and some varaible bindings are used for this view object.)
    SELECT  cntr_list.SOURCE_BLOCK,                   
            sum(                   
             case when cntr_list.cntr_size_q = '20'                   
                  then cntr_list.cntr_qty                   
                  else 0 end ) as cntr20 ,                   
            sum(                   
             case when cntr_list.cntr_size_q = '40'                   
                  then cntr_list.cntr_qty                   
                  else 0 end ) as cntr40 ,                   
             sum(                   
             case when cntr_list.cntr_size_q = '45'                   
                  then cntr_list.cntr_qty                   
                  else 0 end ) as cntr45                    
    FROM (       
        SELECT yb1.BLOCK_M as SOURCE_BLOCK,       
               scn.CNTR_SIZE_Q,        
               count(scn.CNTR_SIZE_Q) AS cntr_qty        
        FROM  SHIFT_CMR scm, SHIFT_CNTR scn, YARD_BLOCK yb1, YARD_BLOCK yb2       
        WHERE       
        scm.cmr_n = scn.cmr_n             
        AND (scm.plan_start_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS')                 
        OR scm.plan_end_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS'))                 
        AND scm.shift_mode_c = :ShiftModeCode                           
        AND scm.end_terminal_c = :TerminalCode      
        AND scm.start_terminal_c = yb1.terminal_c                  
        AND scm.start_block_n = yb1.block_n                  
        AND substr(scn.start_location_c,(instr(scn.start_location_c,',',1,5)+1),instr(scn.start_location_c,',',1,6)-(instr(scn.start_location_c,',',1,5)+1)) BETWEEN yb1.slot_from_n AND yb1.slot_to_n                  
        AND scm.end_terminal_c = yb2.terminal_c                  
        AND scm.end_block_n = yb2.block_n                  
        AND substr(scn.end_location_c,(instr(scn.end_location_c,',',1,5)+1),instr(scn.end_location_c,',',1,6)-(instr(scn.end_location_c,',',1,5)+1)) BETWEEN yb2.slot_from_n AND yb2.slot_to_n           
        AND scn.status_c not in (1, 11)             
        AND scn.shift_type_c = 'V'             
        AND scn.source_c = 'S'       
        GROUP BY yb1.BLOCK_M, scn.CNTR_SIZE_Q       
    ) cntr_list       
    GROUP BY cntr_list.SOURCE_BLOCK
    2. Detail View object (key attributes are SourceBlock and EndBlock and same varaible bindings are used for this view object.)
    SELECT  cntr_list.SOURCE_BLOCK, cntr_list.END_BLOCK,                
            sum(                     
             case when cntr_list.cntr_size_q = '20'                     
                  then cntr_list.cntr_qty                     
                  else 0 end ) as cntr20 ,                     
            sum(                     
             case when cntr_list.cntr_size_q = '40'                     
                  then cntr_list.cntr_qty                     
                  else 0 end ) as cntr40 ,                     
             sum(                     
             case when cntr_list.cntr_size_q = '45'                     
                  then cntr_list.cntr_qty                     
                  else 0 end ) as cntr45                      
    FROM (         
        SELECT yb1.BLOCK_M as SOURCE_BLOCK,     
               yb2.BLOCK_M as END_BLOCK,  
               scn.CNTR_SIZE_Q,          
               count(scn.CNTR_SIZE_Q) AS cntr_qty          
        FROM  SHIFT_CMR scm, SHIFT_CNTR scn, YARD_BLOCK yb1, YARD_BLOCK yb2         
        WHERE         
        scm.cmr_n = scn.cmr_n               
        AND (scm.plan_start_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS')                   
        OR scm.plan_end_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS'))                   
        AND scm.shift_mode_c = :ShiftModeCode                             
        AND scm.end_terminal_c = :TerminalCode        
        AND scm.start_terminal_c = yb1.terminal_c                    
        AND scm.start_block_n = yb1.block_n                    
        AND substr(scn.start_location_c,(instr(scn.start_location_c,',',1,5)+1),instr(scn.start_location_c,',',1,6)-(instr(scn.start_location_c,',',1,5)+1)) BETWEEN yb1.slot_from_n AND yb1.slot_to_n                    
        AND scm.end_terminal_c = yb2.terminal_c                    
        AND scm.end_block_n = yb2.block_n                    
        AND substr(scn.end_location_c,(instr(scn.end_location_c,',',1,5)+1),instr(scn.end_location_c,',',1,6)-(instr(scn.end_location_c,',',1,5)+1)) BETWEEN yb2.slot_from_n AND yb2.slot_to_n             
        AND scn.status_c not in (1, 11)               
        AND scn.shift_type_c = 'V'               
        AND scn.source_c = 'S'         
        GROUP BY yb1.BLOCK_M, yb2.BLOCK_M, scn.CNTR_SIZE_Q         
    ) cntr_list         
    GROUP BY cntr_list.SOURCE_BLOCK, cntr_list.END_BLOCK
    3. I create a view link to create master-detail relationship for these 2 view objects.
    masterview.SourceBlock (1)->detailview.SourceBlock (*).
    4. I create a tree table using these 2 view objects with master-detail relationship.
    When I set default value for variable bindings of these 2 view objects and the matching records exist, tree table can work well. I can expand the master row to display detail row in UI.
    But I need to pass in dymamic parameter value for variable bindings of these 2 view objects, tree table cannnot work again. when I expand the master row and no detail row are displayed in UI.
    I am sure that I pass in correct parameter value for master/detail view objects and matching records exist.
    Managed Bean:
            DCIteratorBinding dc = (DCIteratorBinding)evaluteEL("#{bindings.MasterView1Iterator}");
            ViewObject vo = dc.getViewObject();
            System.out.println("Before MasterView1Iterator vo.getEstimatedRowCount()="+ vo.getEstimatedRowCount());
            System.out.println("Before MasterView1Iterator ShiftModeCode="+ vo.ensureVariableManager().getVariableValue("ShiftModeCode"));
            vo.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
            vo.ensureVariableManager().setVariableValue("DateTo", dateTo);
            vo.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
            vo.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
            vo.executeQuery();
            System.out.println("MasterView1Iterator vo.getEstimatedRowCount()="+ vo.getEstimatedRowCount());
            DCIteratorBinding dc1 = (DCIteratorBinding)evaluteEL("#{bindings.DetailView1Iterator}");
            ViewObject vo1 = dc1.getViewObject();
            System.out.println("Before DetailView1Iterator vo1.getEstimatedRowCount()="+ vo1.getEstimatedRowCount());
            System.out.println("Before DetailView1Iterator ShiftModeCode="+ vo1.ensureVariableManager().getVariableValue("ShiftModeCode"));
            vo1.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
            vo1.ensureVariableManager().setVariableValue("DateTo", dateTo);
            vo1.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
            vo1.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
            vo1.executeQuery();
            System.out.println("after DetailView1Iterator vo1.getEstimatedRowCount()="+ vo1.getEstimatedRowCount());
    5.  What's wrong in my implementation?  I don't have no problem to implement such a tree table if using simple master-detail tables view object, but now I have to use such 2 view objects using complex SQL for my requirement and variable bindings are necessary for detail view object although I also think a bit strange by myself.

    Hi Frank,
    Thank you and it can work.
    public void setLowHighSalaryRangeForDetailEmployeesAccessorViewObject(Number lowSalary,
                                                                              Number highSalary) {
            Row r = getCurrentRow();
            if (r != null) {
                RowSet rs = (RowSet)r.getAttribute("EmpView");
                if (rs != null) {
                    ViewObject accessorVO = rs.getViewObject();
                    accessorVO.setNamedWhereClauseParam("LowSalary", lowSalary);
                    accessorVO.setNamedWhereClauseParam("HighSalary", highSalary);
                executeQuery();
    but I have a quesiton in this way. in code snippet, it is first getting current row of current master VO to determine if update variables value of detail VO. in my case, current row is possibly null after executeQuery() of master VO and  I have to change current row manually like below.
    any idea?
                DCIteratorBinding dc = (DCIteratorBinding)ADFUtil.evaluateEL("#{bindings.SSForecastSourceBlockView1Iterator}");
                ViewObject vo = dc.getViewObject();           
                vo.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
                vo.ensureVariableManager().setVariableValue("DateTo", dateTo);
                vo.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
                vo.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
                vo.executeQuery();
                vo.setCurrentRowAtRangeIndex(0);
                ((SSForecastSourceBlockViewImpl)vo).synchornizeAccessorVOVariableValues();

  • No TITLEs displayed in Detail view in Windows Explorer

    The following pertains to Windows 7 Professional 64-bit vs. Windows XP Professional 32-bit.
    In Windows Explorer, when viewing the file list in 'detail' view, you can also add the 'title' attribute for display by right-clicking the attribute bar above the file list.  However, in Windows 7, no titles are displayed for PDF files that have this
    information which were displayed under WinXP.  Also, if the file properties are displayed, the PDF tab is gone.
    I cannot find any info on how to re-enable this feature.  If XP-style PDF title attributes have been removed or disabled in Windows 7 Explorer, it is a MAJOR omission for our corporation.  We have a massive collection of corporate
    and 3rd party PDF documents where interdocument links will not work if the filename is changed.  The TITLE attribute in detail view is used to display the document title, not the filename.  If any other view is used, e.g. icon view, the bubble
    popup displays the title in WinXP, but this again doesn't work in Win7.  Without the title attribute working as it does in XP, we may have to forego moving from XP to Windows 7 on our desktops (we're skipping Vista, of course), and find an alternate
    desktop OS (Linux?) that still supports this feature.
    For example, every IBM software/hardware PDF manual has a cryptic filename which does not reflect anything about the title of the manual.  These filenames support inter-manual links, so renaming the PDF manuals to reflect the title is absolutely
    not an option.  However, the PDF attributes of the file do contain the title, and these were visible under both Properties (the PDF tab), and the TITLE column in Detail view under WinXP.  However, both of these features are gone in Windows 7,
    and to say it's a PITA is a gross understatement.
    We want (need) this feature back in Windows 7.  I'd call it a show-stopper in moving to Windows 7 if this isn't fixed, and soon!
    Btw, Microsoft, we have over 45,000 desktops currently running WinXP, plus 100's of Win2003/Win2008 servers in our corp.  Are you listening?

    Here's what seems to be going on.
    As part of the Adobe Reader download, Adobe provides a shell extension called pdfshell.dll.  On 32-bit Windows XP, you'll find it in the C:\Program Files\Common Files\Adobe\Acrobat\ActiveX folder.  On 64-bit Windows 7, you'll find it in the C:\Program
    Files (x86)\Common Files\Adobe\Acrobat\ActiveX folder.  But, on either system, it's a 32-bit shell extension.  On 64-bit Windows 7, Windows Explorer will only run as a 64-bit program.  According to numerous web forum posters, this was a change
    between the last "beta" and the "RC" version of 64-bit Windows 7.  There is a 32-bit version of Windows Explorer in the C:\Windows\SysWOW64 folder, but if you try to run it you get another instance of 64-bit Explorer.  The (first)
    problem is that 64-bit Windows Explorer won't load a 32-bit shell extension.
    You can see the 32-bit pdfshell.dll "working" on 64-bit Windows 7 in the File Open dialog of any 32-bit application (such as Adobe Reader).  To see this, first open an Explorer window and navigate to a folder that has some PDF files like your
    IBM manual.  Right click on the file and choose Properties.  Look at the tabs in the dialog and note that there is no PDF tab.  Now, OK out of the Properties dialog and double-click on the same file to open it in Adobe Reader.  Now press
    Ctrl-O or choose File Open to get the File Open dialog.  Navigate to the same folder, right click on the same file and choose Properties.  Look at the tabs and see that you now have the PDF tab that was missing in Explorer.  In that tab, you
    can see the Title that pdfshell.dll has pulled from the file.  This works because 32-bit Adobe Reader has loaded a 32-bit common file dialog which *will* load a 32-bit shell extension.
    But you're not out of the woods yet.  The common file dialog has many of the features of Explorer, and you can select Details view and right-click on the column headers to choose to show a Title column.  This will show Titles for several document
    types, but not for PDF files.  This isn't a 64-bit versus 32-bit issues, it's a Windows XP versus Vista and later issue.  What Adobe implemented in pdfshell.dll is an ActiveX interface called IColumnProvider, and Microsoft dropped support for this
    interface in Windows Vista (replacing it with something called the Property System).  You can glance at http://msdn.microsoft.com/en-us/library/bb776831%28VS.85%29.aspx and just read the first line after the page header:  "[This feature is supported
    only under Windows XP or earlier. ]".  So, the PDF Title column feature didn't go away with 64-bit Windows 7, it went away with 32-bit Windows Vista.
    The best solution to this problem would be for Adobe to update pdfshell.dll to provide the Property System interface that Vista and Windows 7 require.  See http://msdn.microsoft.com/en-us/library/bb776859%28v=VS.85%29.aspx if you care for the details. 
    Then Adobe should release 32-bit and 64-bit versions of pdfshell.dll implementing the new interface, and we'd get both the PDF tab and Explorer columns like Title for PDF files in 32-bit and 64-bit versions of Windows 7 (and Vista).
    Alternatively, some enterprising developer could presumably write a shim that would present the Property System interface on its upper side (callable by Explorer) and the IColumnProvider interface on its lower side (capable of calling existing versions of
    pdfshell.dll).  It would need to deal with interfacing between 64-bit Explorer and a 32-bit pdfshell.dll ... I assume that this is possible somehow, but I don't know.
    A kludge that might be (barely?) usable would be to use Windows XP Mode to run a 32-bit Windows XP Explorer and use that to navigate using the PDF Titles and possibly launch them.  Perhaps you could come up with a way to make Windows XP Mode's Explorer
    launch Adobe Reader in the host 64-bit Windows 7 OS.
    A third-party solution might be xplorer^2 (http://www.zabkat.com/index.htm) which claims to support the interface that Microsoft dropped in Vista (http://www.zabkat.com/blog/07Feb10-column-handlers-revived.htm).  I know nothing about this program, I
    just found it while Googling for "column handler".  It says that it has a 21 day trial, is available in 32-bit and 64-bit versions and costs $29.95 (presumably US dollars).  There is a "lite" version that is free for non-commercial
    use ... all of this info is just repeated from their web pages, I have no connection to the company and only know what I read ... I haven't tried it.
    It's worth noting that life isn't perfect with pdfshell.dll and 32-bit Windows XP either, depending on your PDF files.  Some documents don't have Titles (depending, partly, on what software produced them).  Some have Titles long enough that they
    won't display in an Explorer column (though they show up truncated on the status line and un-truncated in a tooltip).  I have a file called "GEARaspi Security Information.pdf" (http://www.gearsoftware.com/support/GEARAspi%20Security%20Information.pdf)
    that has no Title, created by OpenOffice.org 2.4 according to its PDF tab.  I have another called "319124.pdf" (http://www.intel.com/assets/pdf/whitepaper/319124.pdf) which has the rather wordy title "Intel®  Extreme Memory Profile
    (Intel® XMP) supporting Intel® X48 Express Chipset with DDR3 White Paper".  Despite having a Title, no Title is displayed in a Title column in Windows Explorer in 32-bit Windows XP, though a truncated version appears in the status bar and
    the tooltip gets the whole thing, wrapping to two lines to do it.  Intel's file was produced with Acrobat PDFMaker 7.0 for Word according to its PDF tab.
    This post is based on what I could figure out, I hope it's helpful (if discouraging ... you won't fix this with a registry hack).

  • Camera view controller segues

    Hi,
    I have a question about adding a camera and photo editing component into an app, and think I have a general idea on how to achieve this but need some insight on whether I am thinking the right way. I want to capture a photo with an AVCaptureSession and present that photo in a UIImageView throughout a series of viewcontrollers for editing purposes (crop, to add caption, to submit to live feed etc...). I am thinking the way this would be acheived is to present each view controller for the capture and editing process modally, but what I am having trouble with is passing the captured image to the next view controller...what are the methods for taking the captured image and then moving it to the next view controller which presents the captured image...from what I have researched I would be using presentingViewControllers and presentedViewController methods...correct? Would I use a prepareForSegue method that once camera captures an image the following view controller is presented...?
    Essentially the segue process would be very similar to instagrams camera viewcontrollers replacing the filters with cropping the photo. But for now all I want to confirm / figure out is how to pass the image from view controller to view controller.
    Thank you very much for any feed back.

    Hi Ian,
    Create a component controller method check_mandatory_fields
    The following should the parameter interface of the method.
    I_VIEW_CONTROLLER     Importing     Type ref to IF_WD_VIEW_CONTROLLER
    In this method, call cl_wd_dynamic_tool=>check_mandatory_attr_on_view to do the validation.
    In main view, when you want to validate the records, do the following.
      DATA: lo_view_controller TYPE REF TO if_wd_view_controller.
      lo_view_controller ?= wd_this->wd_get_api( ).
      wd_comp_controller->check_mandatory_fields(
        EXPORTING
          i_view_controller = lo_view_controller ).
    These validation can be done at view level. So in detaild view, when you want to validate do the same as mentioned above.
    Regards,
    Sravan varagani

  • Call method with an argument from another view controller

    I have a UIViewController MainViewController that brings up a modal view that is of the class AddPlayerViewController. When the user clicks 'Save' in the modal view I need to pass the Player data (which is a Player class) from the modal view to the MainViewController in addition to triggering a method in the MainViewController. What's the best way to accomplish this? I'm new to cocoa and have only tried using delegates and some ugly hacks to no avail.
    Thanks for the help.

    If I understand correctly, you have:
    1. A model object, Player.
    2. A top view controller, MainViewController.
    3. Another view controller, AddPlayerViewController, which MainViewController displays modally.
    I'm guessing that AddPlayerViewController creates a new Player object and lets the user set its values, and you need a way to get that new Player into MainViewController once they're done.
    So, here's what I'd do:
    1. Create an AddPlayerViewControllerDelegate protocol. It should declare two methods, "- (void)addPlayerViewController:(AddPlayerViewContrller*)controller didAddPlayer:(Player*)newPlayer" and "- (void)addPlayerViewControllerNotAddingPlayer:(AddPlayerViewController*)controll er".
    2. Add an attribute of type "id <AddPlayerViewControllerDelegate>" called delegate to AddPlayerViewController. Also add a property with "@property (assign)" and "@synthesize".
    3. Modify AddPlayerViewController so that if you click the "Save" button, addPlayerViewController:didAddPlayer: gets called, passing "self" and the new Player object as the two arguments. Also arrange for clicking the "Cancel" button to call addPlayerViewControllerNotAddingPlayer:.
    4. Modify MainViewController to declare that it conforms to AddPlayerViewControllerDelegate. Implement those two methods (addPlayerViewControllerNotAddingPlayer: might be an empty method if you don't want to do anything).
    5. When you create your AddPlayerViewController, set its delegate to your MainViewController.
    If you need more detail, let me know what parts you need me to elaborate on.

  • How to go from a View Controller to a View Controller

    Hey everyone, I have asked this question over on Stack Overflow, and really had no luck with it.
         I am wondering how to go from one (1) View Controller that has buttons and another View Controller that has a UIWebViewer in? I know how to do the simple part to get the two to link up. But, the buttons are going to have different URL's hooked up to them, and I want to be able to reuse the Web Viewer. I am using the Swift Programming language to be able to do this.
    below is my current code that is has my buttons sitting on top of my web viewer,
    import UIKit
    import WebKit
    class ViewController: UIViewController {   
        @IBOutlet var wbView: UIWebView!
        var strUrl = ""
            @IBAction func buttonAction(sender: UIButton) {
                switch (sender.tag){
                case 1:
                    strUrl = "https://www.google.co.in/"
                case 2:
                    strUrl = "https://in.yahoo.com/"
                case 3:
                    strUrl = "https://www.facebook.com/"
                case 4:
                    strUrl = "https://bing.com/"
                default:
                    break;
                reloadWebViewWithUrl(strUrl);
            func reloadWebViewWithUrl(strUrl: NSString){
                var url = NSURL(string: strUrl);
                var request = NSURLRequest(URL: url!);
                wbView.loadRequest(request);
            override func viewDidLoad() {
                super.viewDidLoad()
                // Do any additional setup after loading the view, typically from a nib.
            override func didReceiveMemoryWarning() {
                super.didReceiveMemoryWarning()
                // Dispose of any resources that can be recreated.
    How should I go about changing this two allow my buttons to be in their own ViewController and still be able to to the secondary View Controller with the WebViewer?
    Thank You all in advanced with the help on this!

    This is the FirstViewController Code
    import UIKit
    class FirstViewController: UIViewController {
        @IBAction func webAction(sender: UIButton) {
            let index = sender.tag
            chosenURLString = addresses[index]
            performSegueWithIdentifier("WebViewSegue", sender: self)
        override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
            if let controller = segue.destinationViewController as?
                SecondViewController {
                controller.urlString = chosenURLString
                chosenURLString = nil
        private let addresses = ["", "https://www.google.com", "https://www.facebook.com", "https://spca.org", "https://www.facebook.com/wagzpack?fref=photo"]
        private var chosenURLString: String?
    This is the SecondViewController Code
    import UIKit
    class SecondViewController: UIViewController {
        @IBOutlet var webSite: UIWebView!
        var urlString: String?
        override func viewDidLoad() {
            super.viewDidLoad()
            if let urlString = urlString {
                if let url = NSURL(string: urlString) {
                    let request = NSURLRequest(URL: url)
                    webSite.loadRequest(request)
                    println("loading \(urlString)")
                else {
                    println("badly formed URL string.")
            else {
                println("missing URL string.")

  • Diff between Component controller,Custome controller and  View controller

    hi,
        Can any body tell me the following details,
    1.difference between the Component controller,Custome controller and  View controller in WD-ABAP.?
    2.what is Lead Selection?   
    Regards,
    Ravi

    Hi Ravi.
    The component controller is visbile to all views in a component. So all context nodes and methods you create here can be accessed from all views in the component. This way you can share data between the views by mapping context nodes or thru method calls. You can also mark methods and nodes as interface so that they are acessable from other components that define component usages to this cmponent.
    Custom controller is quiet similar to the component controller. You can define it if you want to group some views with a custom controller for a certain functionality.
    If you want to access a custom controller in a view you have to define the usage first on the properties tab of the view.
    A view controller is only visible in the view itself. So all methods or context nodes you define here are only accesable by the current view.
    The lead selection is in most cases the current selected element in a context node. The lead selection is used by many UI elements to determine which element has to be shown (e.g drop down).
    If you have a table with single selection the current selected table row is the lead selection element of the bound context node.
    SO you can get the lead selection element easily in any mthod by calling context_node->get_element( ).
    Hope this clears your questions.
    Cheers,
    Sascha

  • Next/previous button into detail view???

    Hi all,
    I have a tableview and it feeds the plist data into a detail view.... I would like to have two buttons in the detail view, one to move forward through the array from the last tableview and one to move backwards through the array. The data would be displayed in the detail view.
    here is the kind of plist I have....
    <array>
    <dict>
    <key>name</key>
    <string>Category A</string>
    <key>ItemChild</key>
    <array>
    <string>aaaa</string>
    <string>bbbb</string>
    <string>cccc</string>
    <string>dddd</string>
    </array>
    </dict>
    <dict>
    <key>name</key>
    <string>Category B</string>
    <key>ItemChild</key>
    <array>
    <string>aaaa</string>
    <string>bbbb</string>
    <string>cccc</string>
    <string>dddd</string>
    </array>
    </dict>
    <dict>
    <key>name</key>
    <string>Category C</string>
    <key>ItemChild</key>
    <array>
    <string>aaaa</string>
    <string>bbbb</string>
    <string>cccc</string>
    <string>dddd</string>
    </array>
    </dict>
    </array>
    </plist>
    To try to pass the array and position in array through to the detail view I have put this code into my second view controller....
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    NSString *myLabel = [self.dataList1 objectAtIndex:indexPath.row];
    FinalViewController *dvController = [[FinalViewController alloc] initWithNibName:@"FinalViewController" bundle:nil];
    dvController.myLabel = myLabel;
    dvController.title = [self.dataList1 objectAtIndex:indexPath.row];
    dvController.currentRow = indexPath.row;
    dvController.dataList1 = self.dataList1;
    [self.navigationController pushViewController:dvController animated:YES];
    [dvController release];
    dvController = nil;
    in my detail view.h I have added
    NSArray *dataList1;
    int currentRow;
    @property (nonatomic, retain) NSArray *dataList1;
    @property (nonatomic, assign) int currentRow;
    -(IBAction) getNext;
    and in my detail view.m I have put...
    - (IBAction) getNext{
    if (self.currentRow>=0) {
    currentRow = currentRow-1;
    NSString *data1 = [dataList1 objectAtIndex:currentRow];
    theLabel.text = data1;
    however the second view controller doesn't seem to be passing the array or the position in the array through??? However I am kind of new to this and not to sure how to pass that information through.???
    any help would be great,
    thanks

    Hi,
    According to your post, my understanding is that you wanted to use the next and previous control in announcements list webpart.
    You can refer to the following thread, Ashish Patel had written a details explanation about it.
    http://sharepoint.stackexchange.com/questions/25680/announcements-webpart-customization
    what’s more, we can use the JQuery to query the announcement list, then built a html structure to work with some plugins such as the following.
    http://jquery.malsup.com/cycle/int2.html
    http://www.gmarwaha.com/jquery/jcarousellite/#demo
    Thanks & Regards,
    Jason 
    Jason Guo
    TechNet Community Support

  • Real Model View Controller with JTextField

    Hi!
    I am new to Java (so please bear with me). I am building a swing application. I already have added a JTable with a corresponding table model that extends AbstractTableModel. Rather than store the data in the table model, I have modified setValueAt and getValueAt to write and read cell data to another location. So far, everything is fine. When doing setValueAt, I have a fireTableCellUpdated statement that I use to update the edited cell. So far, things are all still fine.
    I would like to do the same thing with a JTextField. I found an example in Core Java Volume 1 for create a class that extends PlainDocument. It uses insertString to update the document in a way that ensures that only numbers are entered. I implemented this. Everything is still fine. I changed insertString to update my remote repository (a field in another class). Everything is still fine. Next, I tried to change (override) both getText methods to read from the repository. This works, but is not reflected on the screen.
    I realize that I need the equivalent of a fireTableCellUpdated statement for the class that extends PlainDocument, but do not know how to do this.
    I have looked a lot over the internet for the model view controller implementation. I know that it can be done using event and event listeners, but this seems to defeat the purpose of the model view controller - it seems like you ought to be able to directly modify the model object to access external data.
    My code is below.
    Thanks/Phil Troy
    * PlainDocument class to make it possible to:
    * - Make sure input in unsigned integer
    * - Automatically save data to appropriate locate
    * This will hopefully eventually work by overriding the insertString and getText methods
    * and creating methods that can be overridden to get and save the numerical value
    class UnsignedIntegerDocument extends PlainDocument
         TutorSchedulerPlusSettings settings;
         JTextField textField;
         public UnsignedIntegerDocument(TutorSchedulerPlusSettings settings)
         {     super();
              this.settings = settings;
         public void setTextField(JTextField textField)
         {     this.textField = textField;
         // Overridden method
         public void insertString(int offs, String str, AttributeSet a) throws BadLocationException
         {     if (str == null) return;
              String oldString = getText(0, getLength());
              String newString = oldString.substring(0, offs) + str +oldString.substring(offs);
              try
              {     setValue(Integer.parseInt(newString));
                   super.insertString(offs, str, a);
                   fireInsertUpdate(new DefaultDocumentEvent(offs, 10, DocumentEvent.EventType.INSERT));
              catch(NumberFormatException e)
         public String getText()
         {     return String.valueOf(getValue());
         public String getText(int offset, int length) throws BadLocationException
         {     String s = String.valueOf(getValue());
              if (length > 0)
                   s = s.substring(offset, length);
              return s;
         public void getText(int offset, int length, Segment txt) throws BadLocationException
         {     //super.getText(offset, length, txt);
              char[] c = new char[10];
              String s = String.valueOf(getValue());
              s.getChars(offset, length, c, 0);
              txt = new Segment(c, 0, length);
         public String getValue()
         {     int i = settings.maxStudents;
              String s = String.valueOf(i);
              return s;          
         void setValue(int i)
         {     settings.maxStudents = i;
    }

    Hi!
    Thanks for your response. Unfortunately, based on your response, I guess that I must not have clearly communicated what I am trying to do.
    I am using both JTables and JTextFields, and would like to use them both in the same way.
    When using JTable, I extend an AbstractTableModel so that it refers to another data source (in a separate class), rather than one inside of the AbstractTableModel. Thus the getValueAt method, getColumnCount method, setValueAt method, . .. all call methods in another class. The details of that other class are irrelevant, but they could be accessing data from a database (via JDBC) or from other machines via some other communication mechanism.
    I would like to do exactly the same thing with a JTextField. I wish for the data to come from a class other than an object of type PlainDocument, or of any class that implements the Document interface. Instead, I would like to use a class that implements the Document interface to call my external class using methods similar to those found in AbstractTableModel.
    You may ask why I would like to to this. I have specific reasons here, but more generally this would be helpful when saving or retrieving parameters set and displayed in a JTextField to a database, or when sharing JTextField to multiple users located on different machines.
    As to whether this is real MVC or not, I think it is but it really doesn't matter.
    I know that I can accomplish what I want for the JTextField using listeners. However, I would like my code for the JTables to be similarly structured to that of the JTextField.
    Thanks/Phil Troy

  • Update methode in model-view-controller-pattern doesn't work!

    I'm writing a program in Java which contains several classes. It must be possible to produce an array random which contains Human-objects and the Humans all have a date. In the program it must be possible to set the length of the array (the number of humans to be produced) and the age of the humans. In Dutch you can see this where is written: Aantal mensen (amount of humans) and 'Maximum leeftijd' (Maximum age). Here you can find an image of the graphical user interface: http://1.bp.blogspot.com/_-b63cYMGvdM/SUb2Y62xRWI/AAAAAAAAB1A/05RLjfzUMXI/s1600-h/straightselectiondemo.JPG
    The problem I get is that use the model-view-controller-pattern. So I have a model which contains several methodes and this is written in a class which inherits form Observable. One methode is observed and this method is called 'produceerRandomArray()' (This means: produce random array). This method contains the following code:
    public void produceerMensArray() throws NegativeValueException{
         this.modelmens = Mens.getRandomMensen(this.getAantalMensen(), this.getOuderdom());
    for (int i = 0; i < this.modelmens.length; i++) {
              System.out.println(this.modelmens.toString());
    this.setChanged();
    this.notifyObservers();
    Notice the methods setChanged() and notifyObservers. In the MVC-patterns, these methods are used because they keep an eye on what's happening in this class. If this method is called, the Observers will notice it.
    So I have a button with the text 'Genereer' as you can see on the image. If you click on the button it should generate at random an array. I wrote a controller with the following code:
    package kristofvanhooymissen.sorteren;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    /**Klasse GenereerListener.
    * @author Kristof Van Hooymissen
    public class GenereerController implements ActionListener {
         protected StraightSelectionModel model;
         /**Constructor.
         *@param model Een instantie van het model wordt aan de constructor meegegeven.
         public GenereerController(StraightSelectionModel model) {
              this.model = model;
         /**Methode uit de interface ActionListener.
         * Bevat code om de toepassing te sluiten.
         public void actionPerformed(ActionEvent arg0) {
         this.model=new StraightSelectionModel();
         try{
         this.model.produceerMensArray();
         } catch (NegativeValueException e){
              System.out.println("U gaf een negatieve waarde in!");
         this.model.setAantalMensen((Integer)NumberSpinnerPanel.mensen.getValue());
         this.model.setOuderdom((Integer)NumberSpinnerPanel.leeftijd.getValue());
    StraighSelectionModel is of course my model class. Nevermind the methods setAantalMensen and setOuderdom. They are used to set the length of the array of human-objects and their age.
    Okay. If I click the button my observers will notice it because of the setChanged and notifyObservers-methods. An update-methode in a class which implements Observer.
    This method contains the follow code:
    public void update(Observable arg0,Object arg1){
              System.out.println("Update-methode");
              Mens[] temp=this.model.getMensArray();
              for (int i = 0; i < temp.length; i++) {
                   OnbehandeldeLijst.setTextArea(temp[i].toString()+"\n");
    This method should get the method out of the model-class, because the produceerRandomArray()-methode which has been called by clicking on the button will save the produce array in the model-class. The method getMensArray will put it back here in the object named temp which is an array of Mens-objects (Human-objects). Then aftwards the array should be put in the textarea of the unsorted list as you could see left on the screen on the image.
    Notice that in the beginning of this method there is a System.out.println-command to print to the screen as a test that the update-method has been called.
    The problem is that this update method won't work. My Observable class should notice that something happened with the setChanged() and notifyObservers()-methods, and after this the update class in the classes which implement Observer should me executed. But nothing happenens. My controllers works, the method in the model (produceerRandomArray() -- produce random array) has been executed, but my update-method won't work.
    Does anyone has an explanation for this? I have to get this done for my exam an the 5th of january, so everything that could help me would be nice.
    Thanks a lot,
    Kristo

    This was driving me nuts, I put in a larger SSD today going from a 120GB to a 240GB and blew away my Windows Partition to make the process easier to expand OS X, etc.  After installing windows again the only thing in device manager that wouldn't load was the Bluetooh USB Host Controller.  Tried every package in Bootcamp for version 4.0.4033 and 5.0.5033 and no luck.
    Finally came across this site:
    http://ron.dotsch.org/2011/11/how-to-get-bluetooth-to-work-in-parallels-windows- 7-64-bit-and-os-x-10-7-lion/
    1) Basically Right click the Device in Device manager, Go to Properties, Select Details tab, Choose Hardware ids from Property Drop down.   Copy the shortest Value, his was USB\VID_05AC&PID_8218 
    2) Find your bootcamp drivers and under bootcamp/drivers/apple/x64 copy AppleBluetoothInstaller64 to a folder on your desktop and unzip it.  I use winrar to Extract to the same folder.
    3) Find the files that got extracted/unzipped and open the file with notepad called AppleBT64.inf
    4) Look for the following lines:
    ; for Windows 7 only
    [Apple.NTamd64.6.1]
    ; No action
    ; OS will load in-box driver.
    Get rid of the last two lines the following:
    ; No action
    ; OS will load in-box driver.
    And add this line, paste your numbers in you got earlier for USB\VID_05ac&PID_8218:
    Apple Built-in Bluetooth=AppleBt, USB\VID_05ac&PID_8218
    So in the end it should look like the following:
    ; for Windows 7 only
    [Apple.NTamd64.6.1]
    Apple Built-in Bluetooth=AppleBt, USB\VID_05ac&PID_8218
    5) Save the changes
    6) Select Update the driver for the Bluetooth device in device manager and point it to the folder with the extracted/unzipped files and it should install the Bluetooth drivers then.
    Updated:
    Just found this link as well that does the same thing:
    http://kb.parallels.com/en/113274

  • Link to remove Product from Cart in Product list/detail views

    I'm wondering if it would be possible to construct a link/button to remove a product from the cart (assuming it's in the cart) from within the product list or detail views.
    Much like the 'remove' link on the shopping cart page.
    Anyone done this or have any ideas as to how it might be done?

    I was messing around with it and figured it out.
    I changed the onclick value ...false to ...true.
    Apparently this allows the href value to be used after the onclick function has run. Here's the jquery i used to make the change.
    $(linkA).attr('onclick',$(linkA).attr('onclick').replace('false','true'));
    I hope this helps someone else.

  • MVC - Generate PDF From Details View

    Hello, I have a simple application with a list of items in a grid, so when you click on item's name, a popup div shows you item's details.
    It works fine, however, I would like to have a button inside this details view to generate PDF on the fly.
    I have got ExpertPdf.HtmlToPdf library to do that.
    Here is my method's code:
    public HomeController()
    public ActionResult Index()
    var article = from a in db.Article.Include(a => a.Kind) orderby a.CreatedDate descending select a;
    return View(article.ToList());
    public ActionResult Details(int id = 0)
    Article article = db.Article.Find(id);
    if (article == null)
    return HttpNotFound();
    return View(article);
    public FileStreamResult ContentToPDF()
    byte[] pdfBytes = new PdfConverter().GetPdfFromUrlBytes(Request.Url.AbsoluteUri);
    Stream stream = new MemoryStream(pdfBytes);
    return new FileStreamResult(stream, "application/pdf");
    @Html.ActionLink("To PDF", "ContentToPDF")
    Actually, PDF is generated from the given URL. But my problem is, when you click on ToPDF button, it calls the controller and my details view's URL changes to become: home/contenttopdf/1
    instead of home/details/1, as the newly generated URL returns page not found, PDF converter returns TimeOut exception.
    Can someone please tell me how to properly handle this ToPDF action method, how to call it properly?
    Thanks at advance.

    Please use the ASP.NET MVC forum for MVC specific issues:
    http://forums.asp.net/1146.aspx/1?MVC

  • Keyboard not resigning the second time i pop a view controller

    i am developing an app that involves 2 tableViewcontroller. when a cell is selected in a tableViewController the detail table view is shown. the detail table view has a cell with a textfield in it.The value entered in the textfield is send to a webservice and the response is alerted using alertView. When the ok button is pressed in the alert view the viewcontroller is poped from navigationcontroller. the keyboard is hidden using the code
    - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex {
    [self.currentResponder resignFirstResponder];
    this is working fine the first time i push the viewcontroller and pop it. The keyboard is hiding. but the second time i push the same view controller and then pop the viewcontroller the keyboard is not hiding... can anyone tell me where i have went wrong..?

    I checked the code, we do not have any other manipulation on the view object, the only thing different in our case that I can think of is that this code is being called the 1st time from one page in the afterPhase method of a class that implements PagePhaseListener (on page load). I'm passing the page name to the View Object, and this invokation executes okay an returns the matching one record.
    Then I navigate to another page (again in its page definition, its controller is using the same pagePhaseListener class), so when the code is executed the next time, I'm passing the new page name, but this invokation does not return any data, even though I'm sure the SQL and the page name parameter does return 1 row in SQLPlus.
    Any thing special with executing the view object parameter binding when I navigate out and back to the page?
    Appreciate the help
    Mohamed

  • How to access View Context thr' View Controller; and not thr' View....

    Hi
    As we know that we can access Component Context Attribute by Component Controller in view as:
    wdThis.wdGet<Component_Name>Controller().wdGetContext().currentContextElement().
    get<Component_Context_Attribute>
    whereas wdThis.wdGet<Component_Name>Controller() is the Component Controller.
    So, in the same way, I was just wondering do we have any way to access the View Context through View Controller.
    Generally for view context, we use wdContext which is (= wdThis.wdGetContext() ) means accessing view context thr' view.
    i want to access View context thr' View Controller which is wdThis.wdGetAPI().
    Thanks....

    Hi
    Get the detailed description and understanding of these webdynpro jorgens from [here|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0ba2c45-0518-2a10-73be-9b785e10aef1]
    Best Regards
    Satish Kumar

  • UiTabBar inside details view of uiSplitViewController

    Hi  I am currently developing an app for the iPad and am having soem difficulties getting a tab bar inside the details view of the split view controller.  I have followed the following post https://discussions.apple.com/message/9913278?messageID=9913278&#9913278?message ID=9913278& and found it useful however I have the following issues.
    When a tabItem is clicked my event fires just fine.  I am attempting to add a new View via the following code.
        if (tab1ViewController == nil) {
            self.tab1ViewController = [[ImageController alloc] initWithNibName:@"ImageController" bundle:nil];
        [self.view insertSubview:tab1ViewController.view belowSubview:detailsTabBar];
        if (currentViewController != nil)
            [currentViewController.view removeFromSuperview];
        currentViewController = tab1ViewController;
    This shows the view above my detailsTabBar but over the top of my toolbar (at the top of the screen).  Is it possible to have it sit below the toolbar or even squish down below it?
    Am I better off adding a UIView in between the tabBar and the toolbar and loading the views into that?
    Message was edited by: mattgolding added the wrong link, fixed now

    Okay so I was able to achieve this by modifying the insertSubview code to be the following
    [self.view insertSubview:tab1ViewController.view belowSubview:_toolbar];
    The problem with that is I am unable to get the rotation correct now.  It loads fine in Portrait mode (it is designed in Interface Bulider in Portrait mode) but in Landscape mode the view is not autorezing.
    Anyone have any suggestions?
    Message was edited by: mattgolding Put code inside a code block

Maybe you are looking for

  • Sy-ucomm for a button

    Hi Experts, Can anyone please tell me about the sy-ucomm for message button in ME22N transaction and then one more button Repeat Output. My requirement is i have to re send an IDOC when someone changes the PO and press the repeat output. For this i a

  • Few Standby doubts

    Hello all, I have few queries regarding standby database. 1)Correct me if I am wrong. On primary Database Standby Redo log is required for switchover and on standby database Standby Redo log is required for --Real time Apply --Maximum protection or M

  • How to uninstall then reinstall an App

    Hello! So I had downloaded the trial versions of adobe suit, then had them deleted after the trial had ended. Afterwards I decided to sign up for the student version of CC. However, once I had the Adobe Application Manager open when I went to dl InDe

  • True randomization in java

    Hi, I need to split a file of 20290 lines into two files randomly ; each random split has to produce two subfiles, one representing 80%, the other 20% of the original 20290. I need to produce 1000 different 80-20 splits. I woudl like to write a class

  • When will aperture 3.4.5 be updated?

    Does anyone have an inking as to when will Aperture 3.4.5 be updated?