How to refer to an IB controller instance from code???

Hi all. I know this must be simple but I have just never run into this before.
When you drag an array controller from IB's palette into your top-level window, it instantiates it, right? All well and good - it's controlling my array and updating the tableView that is bound to its arrangedObjects just fine.
Now I want to refer to it (the instance of the controller) from code. I have its class files, VoteeController.h and .m, but since I didn't make the instance, I don't know how to reference the instance. What I want to do is get the selection of the controller. That's all!
I cannot code mySelection = [VoteeController selectedObjects], because that is a class object.
How do I refer to the instance of this controller that IB instantiated when I dragged it onto the main window??
I have the model object, playersArray, which has the data but doesn't have the selection since it is not a controller. I need to get the selected objects of the array controller that I made in IB.
Thanks for any help!!

Yes, I found a way to do it. So I am glad I can help. I will paste in the notes I took for myself.
Ask any questions if the notes are not clear or do not work for you.
NOTES:
Settings for IB:
TextModel NSObject:
Class: TextModel (same as @interface)
TextViewController Object Controller:
Connections: content to TextModel
Class: NSObjectController
Bindings: none
Content: control-dragged to TextModel.
Keys: testString
NOTE: Also works with no connection but setting in Bindings of Bind To Controller: TextModel, "blank" Controller Key and Key Path of self. ("TextModel.self") as Controller Content Content Object.
NSTextView:
Controller: TextViewController
Connections: none
Bindings:
Controller: TextViewController
Controller Key:selection
Key Path: testString
SUMMARY:
1) Model Object - no connection needed. No keys needed. Just enter the Class name in the ID field (the Class name is the name of the Class whose instance contains the getters and setters for the object you want this Model Object to represent).
2) Controller Object -
A. Leave Class alone unless it makes new objects.
B. No connections.
C. Use Attributes panel to enter keys for the objects in the Model that you want.
D. Bindings: bind to the Object Model. Leave the Controller Key blank and enter "self" in the Model Key Path.
3) View Object -
A. Leave Class alone (NSTextView)
B. Turn off all RTF options if plain text.
C. No connections.
D. Bindings: bind to the View Controller. Set the Controller Key to Selection and the Model Key Path to the model key (e.g., testString).
Now I've screwed up my Array->Two Array Controllers -> Two Table Views so they don't work any more. I had them working but with what I considered kludges (my goal in this project is to learn the BEST way to use Cocoa Bindings so as to have the absolute minimum glue code - I am aiming for the learning process, not a result necessarily - I already have a completely functional app in AppleScript Studio so I am under no "deadline."
I had it working using your solution and setting some connections (control-drag) also, but I wanted to redesign it and not have to use connections (notice the TextView rules I posted above use no connections at all - only bindings).
So if anyone reading this knows how to connect a single array as the Model to two NSArrayControllers as the Controllers, and the Controllers to two TableViews as the Views, chime in. I thought I had it down but it just doesn't load the array into the tableView. As usual, the array has its 7 elements in the debugger and in the NSLogs that I do.
The part that keeps confusing me is that you have to set a class name for each IB element, and I don't want to have a bajillion Class files. I want one or two general Classes that can contain both an array and some strings and booleans and so forth - and I still cannot find the way to access an IB instance from code except the IBOutlet solution you provided. If that's the only way, fine; but I wanted to see if there is another way using Bindings. SURELY people who declare arrays need to obtain the selection for the arrays, and that exists ONLY in the Controller. So are we supposed to interact with the Controllers or not? How to get a controller's selection and use it on your Model array so you can manipulate with it? The controller instance doesn't even have a name.
Anybody know anything about FIle's Owner? Several of the examples say to connect something to File's Owner but never say why. If File's Owner has access to all properties of the whole project, that would explain why it is used so often. But I do not think that is the case.

Similar Messages

  • How to call Custom or Component Controller methods from View Controller

    Hy Guys,
    how do I call Custom Controller or Component controller methods from a View or Context Controlller?
    thanks in advance
    Jürgen

    Hi Juergen
    Yes it is possible, pls follow the below approach to access the component controller in context node class
    1) since the standard component controller class is protect variable , declare a variable of type component controller in your controller class.
    say for example the public variable you declared is  g_comp_controller
    2)  now redefine the controller class method WD_CREATE_CONTEXT  and add the below lines of code
       g_comp_controller ?= me->comp_controller.
    3) go to context node class  (CNXX)  there declare the varaible which of type controller class (IMPL)  as public variable, for example g_owner
    4) redefine the method  IF_BSP_MODEL~INIT  and write the below code
         CALL METHOD super->if_bsp_model~init
        EXPORTING
          id    = id
          owner = owner.
      g_owner ?= owner.
    5) now the variable   g_owner  that is declared in  (CNXX)   contains reference to your controller class
    6) in  on_new_focus  method access your component controller in the below manner and access the entities also.
    DATA: lv_owner                    TYPE REF TO xxxxx_impl,  " Implementation class
                 lr_comp_cont                TYPE REF TO xxxx_bspwdcomponen_impl, " component controller class
                 lv_entity type ref to cl_crm_bol_entity.
    lv_owner ?= g_owner.
    lr_comp_cont    ?= lv_owner->g_comp_controller.
    IF lr_comp_cont IS BOUND.
       lv_entity ?= lr_comp_cont->typed_context->mdfcampaign->collection_wrapper->get_current( ).
    now lv_entity contains the value of component controller context node.
    Thanks & Regards
    Raj
    Edited by: bmsraj on Sep 27, 2011 3:28 PM

  • How to suspend BPEL process against any instance in Code ?

    Hi ,
    How can we suspend the BPEL process using Java code ? or any other way inside BPEL process??

    Using wait activity in BPEL process you can suspend the BPEL process for definite amount of time.
    Regards,
    Pushp

  • How to remove an Element that was added from code?

    Hello,
    I have a custom BorderContainer component with 2 labels and 1 image.
    I added an instance of it to my application from code with addElement() and now I cannot make it disappear
    I try:
        for (var i:int=0;i<numElements;i++){
         if (getElementAt(i) is Card){
          if ((getElementAt(i) as Card).name.substr(0,6)=="cMover"){
           removeElementAt(i);
    It finds it because it gets to removeElementAt(i); but the component remains visible.
    I also tried  removeElement(getElementAt(i)); no luck.
    What am I doing wrong?
    thanks
    Gabor

    You may have to call
    invalidateDisplayList();
    After you remove it.

  • How to Refer a class of Model Layer From a Class of View Layer IN Struts?

    HI There !
    I am building an application on struts using JDeveloper 10.1.3.1. On Selecting New application and writing few classes this is my Application Hierarchy is like folowing:
    Application Name
    |___ Model (Project given by Jdeveloper)
    | |_____ Application Resources
    | |________ model (Package)
    | |__________ CheckUser.java
    | |__________ DataAccess.java
    |
    |___ ViewController(Project given by Jdeveloper)
    |________ Application Resources
    |__________ View (Package)
    |__________ logon.java
    I tried to use CkeckUser.java in logon.java by importing the package model.
    But Jdeveloper is showing an error which means that this Package is not available here.
    So then how I can refer this class at View layer classes.

    Hi Ankur,
    I'm facing the same problem, i need to access a method in the AppModuleImpl but when i try to call it from an action in my viewController this error pops out:
    Error: cannot access class oracle.jbo.server.ApplicationModuleImpl; file oracle\jbo\server\ApplicationModuleImpl.class not found
    Did you have some advances with this?
    Please let me know
    Thanks

  • How to refer to J2EE library server component from a web service?

    Hi,
    I need help!  I created a web service and it worked fine.  However, I started having problems when I tried to use java classes from my deployable J2EE library server component.  I got the NoClassDefFound error.
    I tried to include the library DC in the Used DC list and put the reference of it in the web service deployment descriptor xml (application.xml and application-j2ee-engine.xml), but it did not work.
    How do I refer and use java classes from my deployable J2EE library at run time from my web service application?  What should I do?
    Thanks,
    Giavinh Pham

    I would like to clarify more about the web service project.  I created a Java DC project and converted it into a web service as the SAP manual instructions.  It worked fine by itself, but I now want to use some of my classes that I deployed as a J2EE library server component. 
    It was compiled and built when I refer to my J2EE library server component DC in the UsedDC.  It was deployed fine as well.  However, it broke when I tested the web service calls.  The class declarations and usage from the J2EE server component could not be found (NoClassDefFound error.) 
    I thought it was because I did not have an application-j2ee-engine.xml in my META-INF folder so I created one and referred to the library in xml as type library and reference 'strong'.  I built and deployed again.  It still did not work. 
    I examined the EAR and noticed that there were two parts of the EAR.  One is the WSAR archive file that contains the META-INF folder from my project and other web service assemblies.  The other part is the META-INF folder generated by the SAP NetWeaver IDE. 
    The strange thing was that SAP NetWeaver IDE generated an application-j2ee-engine.xml without any reference to my J2EE library server component.  However, the nested application-j2ee-engine.xml in the WSAR archive file did contain the info. 
    Since I cannot control the application-j2ee-engine.xml generated by SAP NetWeaver IDE, what should I do?  Is it the cause for my problem?
    Please advice, anyone?
    Giavinh

  • How can I connect to multiple WLS instances from a single Apache virtual host

    Configuration : WebLogic 5.1 SP8 & Apache
    I need to be able to have a configuration that looks something like this.
    www.company.com/x -> WL cluster01
    www.company.com/y -> WL cluster02
    In all the examples that I have been able to find they alway defines the the WL
    connection for the entire virtual host, but I need to be able to do it on a location
    basis is that possible?
    Thanks
    Jens Schutt

    httpd.conf:
    <VirtualHost 172.17.9.24:443>
    DocumentRoot "/www/X"
    ServerName qawebivesta.qa.livecapital.com
    ErrorLog /usr/local/apache/logs/qaweb1.error_log
    TransferLog /usr/local/apache/logs/qaweb1.access_log
    SSLEngine on
    SSLCipherSuite
    ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
    SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
    <Files ~ "\.(cgi|shtml|phtml|php3?)$">
    SSLOptions +StdEnvVars
    </Files>
    <Directory "/usr/local/apache/cgi-bin">
    SSLOptions +StdEnvVars
    </Directory>
    SetEnvIf User-Agent ".*MSIE.*" \
    nokeepalive ssl-unclean-shutdown \
    downgrade-1.0 force-response-1.0
    Debug ON
    DebugConfigInfo ON
    <Location /ivesta/>
    SetHandler weblogic-handler
    WebLogicHost qawlgc1
    WebLogicPort 7001
    </Location>
    <Location /TMPPhase2>
    SetHandler weblogic-handler
    WebLogicHost qawlgc1
    WebLogicPort 11001
    </Location>
    </VirtualHost>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /TMPPhase2 works fine, but when I try to access /ivesta I get a 404 from WebLogic
    "https://qawebtmp.qa.livecapital.com/ivesta/index.jsp?__WebLogicBridgeConfig
    Weblogic Apache Bridge Configuration parameters:
         WebLogic Cluster List:
              General Server List:
                   Host: 'qawlgc1' Port: 11001
              DefaultFileName: ''
              PathTrim: ''
              PathPrepend: ''
              ConnectTimeoutSecs: '10'
              ConnectRetrySecs: '2'
              HungServerRecoverSecs: '300'
              MaxPostSize: '-1'
              DynamicServerList: ON
              StatPath: false
              CookieName: WebLogicSession
              Idempotent: ON
              FileCaching: ON
              DisableCookie2Server: OFF
              QueryFromRequest: OFF
              Build date/time: Jun 25 2001 15:09:34
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    This should have been connecting to my 7001 instance not the 11001.
    Thanks
    Jens
    "Eric Gross" <[email protected]> wrote:
    What do you mean the wrong port? Post the complete output from
    WebLogicBridgeConfig as well as the URL you used.
    Also, paste the weblogic relative portions from your httpd.conf
    Thanks,
    Eric
    "jens" <[email protected]> wrote in message
    news:[email protected]...
    I also used ?__WebLogicBridgeConfig to verify that it did pick up thewrong port.
    Here is my build date for mod_wl.so in SP10
    Build date/time: Jun 25 2001 15:09:34
    Thanks
    Jens
    "Eric Gross" <[email protected]> wrote:
    Make sure you are using the latest plugin. As well, add parameter:
    DebugConfigInfo=ON and make a request with a query paramater of
    ?__WebLogicBridgeConfig and you should then see the build date/time.
    We can
    then see if you are indeed using the latest plugin.
    It is not a possibility to get the source.
    Regards,
    Eric
    "jens" <[email protected]> wrote in message
    news:[email protected]...
    And the solution where you put the WebLogic parm under location
    the
    last
    location
    over rule the previous.
    I have also tried to upgrade my plug-in from SP8 to SP10 but that
    didn't
    make
    any difference either.
    Is it possible to get the source code for the plug-in, I'm afraid
    that
    it
    don't
    follow put's all it's parm's a the vhost level no matter where in
    the
    conf
    file
    they are placed.
    HELP
    Jens
    "Eric Gross" <[email protected]> wrote:
    Yu is correct.
    Here is another way to do it as well:
    MatchExpression /x
    WebLogicCluster=server1:port,server2:port|PathTrim=/x
    MatchExpression /yWebLogicCluster=server3:port,server4:port|PathTrim=/y
    The general syntax for this would be:
    MatchExpression exp name=value|name=value
    Where exp=Mime type(*.jsp) or exp=/x(path)
    The next argument in the list is a pipe(|) delimited list ofname=value
    pairs (ie: WebLogicHost, WebLogicPort, WebLogicCluster, PathTrim,
    PathPrepend, etc..).
    Hope this helps.
    Regards,
    Eric
    "Yu Tian" <[email protected]> wrote in message
    news:[email protected]...
    Hi Jens,
    I think you can proxy by ppath.
    <Location /x>
    SetHandler weblogic-handler
    WebLogicCluster cluster1
    </Location>
    <Location /y>
    SetHandler weblogic-handler
    WebLogicCluster cluster2
    </Location>
    thanks
    Yu
    "Jens" <[email protected]> wrote in message
    news:[email protected]...
    Configuration : WebLogic 5.1 SP8 & Apache
    I need to be able to have a configuration that looks something
    like
    this.
    www.company.com/x -> WL cluster01
    www.company.com/y -> WL cluster02
    In all the examples that I have been able to find they alway
    defines
    the
    the WL
    connection for the entire virtual host, but I need to be able
    to
    do it
    on
    a location
    basis is that possible?
    Thanks
    Jens Schutt

  • How to refer the work order status value from a different transaction in the step handler?

    Hi All,
    I have a requirement to check the status of the work order from a different transaction before doing some logic in the current transaction. The following transactions are done to replicate the issue
    1)changing the status to ONSITE to edit the work order (transaction 1)
    2)Adding some information which will do some logic (transaction 2)
    3)Completing the work order (transaction 3)
    The transaction 2 will have some logic and will be executed only if the status is COMP but even though the status is COMP now (transaction 3) my condition check in the logic is showing as ONSITE status(transaction.status=ONSITE) and it fails. How can i get the latest status of the work order in the device? Please advice

    Hi Jason,
    The CompleteWorkOrderFinish sub action does have Apply action (screenshot 1) and the transaction definition (screenshot 2)of CompleteWorkOrderFix transaction with the only property Status which has the following settings (screenshot 3)
    Also I am trying to add a status property in EditMeterFitDetaisl transaction and update this value with the current status of the work order using object collections filtering with key value. Please let me know if that approach can be followed. Thanks

  • How can I create a java bean instance from servlet, at runtime?

    Will anybody help me?
    I want to send bean (class) name to a servlet through parameter and I need servlet to create specified bean instance and run its method that I will send through another parameter, at runtime.

    Thanks. I found answer

  • How To Force Open Document In Edit Mode From Code-Behind (Chrome and Firefox)?

    Hello,
    Currently I am developing an IHttpHandler which at the should redirect the user to an Edit mode of a document located in a Document Library.
    The Problem is that in Firefox and Chrome it downloads the document in the temp folder. In IE it works as expected.
    The following code is used for the redirection:
    SPUtility.Redirect(urlOfTheNewDocument, SPRedirectFlags.Trusted, context);

    Hi,
    Please try to use IE Tab.
    Chrome IE Tab:
    https://chrome.google.com/webstore/detail/ie-tab/hehijbfgiekmjfkfjpbkbammjbdenadd?hl=en 
    Firefox IE Tab:
    https://addons.mozilla.org/en-us/firefox/addon/ie-tab/
    Here is a similar thread for your reference:
    http://stackoverflow.com/questions/14455212/how-to-open-sharepoint-files-in-chrome-firefox
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • How to link to a Topic's Bookmark from code

    Our developers program in Visual Objects, and when creating the F1 link between our applications and my CHM files, use the topic's htm file number (e.g. 1234.htm) to call the CHM file and open the appropriate topic.
    Is it possible for them to call the CHM file, open the appropriate topic and then scroll to a given bookmark within that topic?
    If this is possible, any ideas as to what the syntax might be?

    Try using 1234.htm#bookmark.
      The RoboColum(n)
      @robocolumn
      Colum McAndrew

  • How to refer a .jar file in the code.

    How to refer a .jar file in the code.
    I want to use a library dnsjava.jar, which I download from the internet. I want to know how to refer it
         If I am compiling the code on Solaris
         If I compiling the code on windows using eclipse.
    I added the following line in my code to refer to this library. But it always complains of not found the class
    import org.xbill.DNS.*;
    I tried the following to add this library but did not work
    On eclipse/windows: Went to window-> preferences -> BuildPath _> class path Variable.
    On Solaris: Could not add this library /opt/java_reference/v1.6.0_04/jre/lib. Although I am logged in as root, but not able to add the library there. Complains of Permission denied.

    Set the classpath option when compiling.
    javac -classpath /path/to/lib/dnsjava.jar YourProgram.java
    I don't use Eclipse, but it probably has a library list on your project preferences. Add it there.
    Regards,
    Henrique Abreu

  • How to refer to pacman's installation root in pre_install, etc

    I have been unable to find any documentation of exactly how to refer to pacman's installation root from inside the .install script functions. Curious, I started looking through /var/abs/core for some real-world examples that might clue me in. What I found surprised me - from the looks of it, many of the functions there simply assume that their working directory IS the pacman installation root. For example:
    /var/abs/core/ca-certificates/ca-certificates.install:
    post_install() {
    usr/sbin/update-ca-certificates --fresh
    post_upgrade() {
    usr/sbin/update-ca-certificates --fresh
    pre_remove() {
    # clean up certificates
    local _backup=$(mktemp)
    mv etc/ca-certificates.conf ${_backup}
    echo > etc/ca-certificates.conf
    usr/sbin/update-ca-certificates --fresh
    mv ${_backup} etc/ca-certificates.conf
    post_remove() {
    # remove the cert file if it is empty
    [[ -s etc/ssl/certs/ca-certificates.crt ]] || rm -f etc/ssl/certs/ca-certificates.crt
    And yet, some others seem to assume that the install root is "/", like here:
    /var/abs/core/crda/crda.install:
    ## arg 1: the new package version
    post_install() {
    echo "Uncomment the right regulatory domain in /etc/conf.d/wireless-regdom."
    echo "It will automatically be set when necessary."
    ## arg 1: the new package version
    ## arg 2: the old package version
    post_upgrade() {
    # In an upgrade from 1.0.1-1 or older, the wireless-regdom file moves from the crda package
    # to the new wireless-regdb package. If the user changed the file, it is save to overwrite the one
    # from wireless-regdb by the user-defined one
    if [ $(vercmp $2 1.0.1-2) -lt 0 ]; then
    if [ -f /etc/conf.d/wireless-regdom.pacorig -a -n "$(grep -v ^# /etc/conf.d/wireless-regdom.pacorig 2>/dev/null | grep -v ^$)" ]; then
    mv /etc/conf.d/wireless-regdom.pacorig /etc/conf.d/wireless-regdom
    fi
    fi
    or here:
    /var/abs/core/cryptsetup/encrypt_install:
    # vim: set ft=sh:
    install ()
    if [ -z "${CRYPTO_MODULES}" ]; then
    MODULES=" dm-crypt $(all_modules "/crypto/") "
    else
    MODULES=" dm-crypt ${CRYPTO_MODULES} "
    fi
    FILES=""
    SCRIPT="encrypt"
    add_dir "/dev/mapper"
    [ -f "/sbin/cryptsetup" ] && add_binary "/sbin/cryptsetup" "/sbin/cryptsetup"
    [ -f "/usr/sbin/cryptsetup" ] && add_binary "/usr/sbin/cryptsetup" "/sbin/cryptsetup"
    add_binary "/sbin/dmsetup"
    add_file "/lib/udev/rules.d/10-dm.rules"
    add_file "/lib/udev/rules.d/13-dm-disk.rules"
    add_file "/lib/udev/rules.d/95-dm-notify.rules"
    help ()
    cat<<HELPEOF
    This hook allows for an encrypted root device.
    HELPEOF
    Since I'd normally take the PKGBUILDs in /core/ as fairly good examples of what the Arch devs consider best practice, it's leaving me with either two conclusions: this is a bug, or I'm missing something. Any input is appreciated. :)

    We chroot() and then chdir() to the root directory in every install script executed- so it is no assumption at all.
    http://projects.archlinux.org/pacman.gi … aa3e7#n421
    Preference would be to omit the leading /, but due to the chroot/chdir combo, both should work.

  • Start BPM instance from soapUI

    Hi all,
    I want to start an instance of a BPM process by using soapUI. I enabled WS-RM and WS-A but I get the following error:
    <SOAP-ENV:Envelope xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <SOAP-ENV:Header>
          <To xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</To>
          <Action xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/fault</Action>
          <RelatesTo xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">uuid:18bf251f-6f8e-46b2-a107-54ee9e8a6432</RelatesTo>
       </SOAP-ENV:Header>
       <SOAP-ENV:Body>
          <SOAP-ENV:Fault>
             <faultcode xmlns:dPrf="http://www.sap.com/NW05/soap/features/wsrm/">dPrf:N/A</faultcode>
             <faultstring xml:lang="en">Error during obtaining data for Sequence ID: dPrf:ProcessException. No relevant data available in DB.</faultstring>
             <faultactor>Server</faultactor>
             <detail>
                <yq1:com.sap.engine.services.wsrm.exceptions.ReliableMessagingException xmlns:yq1="http://sap-j2ee-engine/error">Error during obtaining data for Sequence ID: dPrf:ProcessException. No relevant data available in DB.</yq1:com.sap.engine.services.wsrm.exceptions.ReliableMessagingException>
             </detail>
          </SOAP-ENV:Fault>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Somebody got an idea how to solve this? Starting in instance from the WSNavigator or VC is possible, but for automated testing, I would like to use soapUI.
    Thanks!

    Hi,
    Change your WSDL file you will have a tag
    <wsp:Policy ... />
    add to that tag the following lines
    <wsp:Policy ... >
    <sapcomhnd:enableCommit xmlns:sapcomhnd="http://www.sap.com/NW05/soap/features/commit/">false</sapcomhnd:enableCommit>
    <sapblock:enableBlocking xmlns:sapblock="http://www.sap.com/NW05/soap/features/blocking/">true</sapblock:enableBlocking>
    <saptrhnw05:required xmlns:saptrhnw05="http://www.sap.com/NW05/soap/features/transaction/">no</saptrhnw05:required>
    <saprmnw05:enableWSRM xmlns:saprmnw05="http://www.sap.com/NW05/soap/features/wsrm/">false</saprmnw05:enableWSRM>
    </wsp:Policy>

  • How to get new controller instance instead of a cached one?

    Hi,
    I have the following problem. I am working on a stateful mvc application. You can search for items and then click on a button which allows you to see the details of an item in a new window and it is possible to modify it.
    I use standard javascript code to open the details windows:
    window.open("item.do?itemnumber=1", "MyFirstWindow");
    This works fine. It opens the first window. The item controller is called for the first time  and the do_init method will be executed.
    Now, I open a second window with this code:
    window.open("item.do?itemnumber=2", "MySecondWindow");
    Unfortunately the framework will not create a second controller instance for the second window. It will use the already existing item controller (the do_init method will not be called).
    Now, I have two windows open which both use the same controller instance.
    So my question is: Is there the possibility to tell the framework that I need a new item controller instance for every new window?
    I already checked various official url sap-parameters but did not find anything useful.
    regards
    Thomas

    Hi,
    sorry for not answering earlier. To be honest I thought there might a standard way to get a new controller instance. But it seems that is not the case. For everybody who is interested I think I will use the following solution.
    I create a wrapper controller called itemwrapper.do. The view of this controller has the following layout:
    <htmlb:content design="design2003" >
      <htmlb:document>
        <htmlb:documentHead>
        </htmlb:documentHead>
        <htmlb:documentBody>
                  <bsp:call url     = "item.do"
                            comp_id = "<%= item_id %>">
                    <bsp:parameter name="itemid" value="<%= item_id %>"/> 
                  </bsp:call>
        </htmlb:documentBody>
      </htmlb:document>
    </htmlb:content>
    The wrapper controller is called like this: item.do?itemid=1234.
    How does is works? The wrappercontroller gets a request -> it gets the itemid from the url -> it opens the view and fills the page attribute item_id. In the view the bsp:call extension will create a new item controller instance everytime a unique item_id is used.
    regards
    Thomas

Maybe you are looking for

  • Supplementary Excise Invoice for India

    Dear all, I want to enter excise-able supplementary invoice for rate change and the inventory should not be affected (incoming excise invoice + A/P Invoice). In earlier versions we were able to enter the same in dropship warehouse. But after upgrade

  • SSRS countrow Aggregate error(Aggregate and lookup functions cannot be used in query parameter expressions.)

    Below expression works fine with text box but gives error in dataset expression. ="SET FMTONLY OFF select  "+ join(Parameters!Column.Value,",") +" FROM pamcustom.dbo.vw_HFL_HFD_HotfileData INNER JOIN pamcustom.dbo.HFL_HFB_HotFileBatch  on BatchID = H

  • Posting here or AskTom about report using xmldb

    Hello, There was a posting here or on the asktom site about using xmldb to build the html for a report in a pl/sql region, I've looked and searched and even asked my buddy google about it and I cannot find the relevant posting if anyone rembers havin

  • Considering Mac Mini for Pro use

    Hi. I'm considering to buy a Mini for replacing my 400Mhz G4. I mainly use Photoshop and Illustrator for drawing/coloring (large files, hi resolution and so). I wanted to know if anyone uses a Mini for similar purposes and how well does the machine d

  • Infotype 0008 - User Exit Validation

    Hi Gurus, I have to validate infotype 0008 amount fields  in PAI user exit ZXPADU02 . For a scenario, if the amounts are not equal  ( BET01 <> BET02) then  I have to geneate error message. Then the user is supposed to correct / re-enter  the amounts