Sharing context across views

Hi.
Each of the individual views (10+) in my WebDynpro application needs to know and display the same employee
information about the logged-in user. Further, the user can enter the application from any one of the views. And once the application is entered, the user will likely visit several of the views.  My project structure is simple in that all of the views are contained within a single component.  To move from view to view, my code is invoking navigateAbsolute to another portal pcd location (iView) that invokes the target WebDynpro view.  By doing this, the portal navigation and the Webdynpro application orientation stay in sync.
My goal is to store this shared information such that the application <u>only needs to retrieves the employee information ONCE per user session</u>.  In a J2EE application this type of information is generally stored in "session".
Here are my questions:
1. Do I need to store this employee information in a context "node", not a "value"?  Basically, how and where do I store this information to make it available across all views within the application?
2. How do I programmatically check if a previous view has already invoked the RFC and populated the data in the shared session area?
Thank you!
Kevin

Hi Kevin,
   <i>1. Do I need to store this employee information in a context "node", not a "value"? Basically, how and where do I store this information to make it available across all views within the application?</i>
  You can store this information as a value node in the component controller's context. By doing so all your views can access this value.
   <i>2. How do I programmatically check if a previous view has already invoked the RFC and populated the data in the shared session area?</i>
    You can check if the node size is zero or if it contains any elements. So once you have invoked the RFC, you will have to add a new element to this value node.
Regards,
Satyajit.

Similar Messages

  • Unable to Load Metadata (Error in shared.context.ContextLoader in startup)

    Hi,
    I am currently installing fixes on an environment, and every time a patch was installed the application server starts up. The application starts up successfully until I installed 8424662. I still don't know if this is the patch that causes the error, but here's the part of the log that states the error:
    - 2010-03-29 07:31:12,030 [Thread-1] ERROR (shared.context.ContextLoader) Unable to load metadata for package com.splwg.base.domain.common.masterConfiguration
    java.lang.NullPointerException
         at java.io.Reader.<init>(Reader.java:61)
         at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
         at com.splwg.shared.context.PackageMetaInfoLoader.getManagedObjectDataAndExtractHashInfo(PackageMetaInfoLoader.java:53)
         at com.splwg.shared.context.PackageMetaInfoLoader.getContextEntities(PackageMetaInfoLoader.java:48)
         at com.splwg.shared.context.PackageMetaInfoLoader.read(PackageMetaInfoLoader.java:44)
         at com.splwg.shared.context.ContextLoader.loadFromStream(ContextLoader.java:90)
         at com.splwg.shared.environ.ContextManagedObjectSet.loadFromStream(ContextManagedObjectSet.java:120)
         at com.splwg.shared.environ.ContextManagedObjectSet.loadFromStream(ContextManagedObjectSet.java:107)
         at com.splwg.shared.environ.ContextManagedObjectSet.loadAllContextManagedObjects(ContextManagedObjectSet.java:72)
         at com.splwg.base.support.context.ContextFactory.loadManagedObjectForApplication(ContextFactory.java:194)
         at com.splwg.base.support.context.ContextFactory.buildContext(ContextFactory.java:106)
         at com.splwg.base.support.context.ContextFactory.buildContext(ContextFactory.java:90)
         at com.splwg.base.support.context.ContextFactory.createDefaultContext(ContextFactory.java:498)
         at com.splwg.base.web.startup.DeferredXAIStartup.run(DeferredXAIStartup.java:73)
         at java.lang.Thread.run(Thread.java:595)
    - 2010-03-29 07:31:14,873 [main] INFO (web.startup.SPLWebStartup) Application Context shutdown successfully
    Any help on this problem is greatly appreciated. Thank you so much!

    Patch 8424662 incorporates an entry in contextManagedObjects.xml that points to a class com.splwg.base.domain.common.masterConfiguration but this class is not yet present in spl-base.jar file. Patch 8711158 should be installed, since it contains this class.

  • HT2518 I am trying to move across & view my home movie clips from my PC to Mac, but I can't view them.  What do I need to have installed on the MAC to view such files? (Originally put onto the MAC from a Canon video camera)

    I am trying to move across & view my home movie clips from my old PC to my new Mac but I am unsure what software I need to view them.  They are from a Canon video camera originally.  Please advise how this is done!

    Do they have a file extension?
    How about anything on the camera which might indicate what it is, like AVCHD?

  • Sharing accounts across 2 plan types  - Planning 9.3.1

    This is my first attempt to share accounts across 2 plan types and I am not getting expected results. In the setup, account 1234 was assigned to both Plan A and plan B with the "source plan type" as Plan B. When I create a form for Plan B, everything looks good and I can input data into account 1234. Then I created a similar form for Plan A using the same account. With all other dimensions being the same, I expect that I would see the data input for Plan B, account 1234 in the Plan A form as a read only field.
    Are my expectations incorrect? If so, then I don't understand the benefit of sharing accounts across multiple plan types.
    Any insight is greatly appreciated.

    One benefit would be how you use the same data in one plan type against the other. A simple example:
    Let's say in your example Plan B represents Revenue and Plan A represents Expense - one way some people design Planning applications. Let's also say that your company calculates expense as a percent of revenue.
    The revenue group enters revenue figures into acct 1234 into the Plan B form.
    When the expense group pulls up the Plan A form, which also shows acct 1234 (but as read-only), they can now calculate against it. So an expense user can enter % values into some other acct in Plan A, "Exp % Rev", and have it calculate against the read-only acct 1234 being x-ref'ed from Plan B.
    Plan B Form:
    ___________Jan__Feb
    "acct 1234"_100__100 (input)
    Plan A Form:
    ____________Jan___Feb
    "acct 1234"___100__100 (read-only)
    "Exp % Rev"__5%___5% (input)
    "Rev Exp"_____5____5 (calculated)
    The benefit here is that no data movement or copy is necessary between plan types for this to work, assuming the x-ref is dynamically calculated. Users can see data in both places.
    This is just a simple example, however, and may not make sense in all situations.
    Hope that helps!
    -O

  • Using home sharing, can I view (stream) TS folders?

    Using home sharing, can I view (stream) TS folders as I would with DVD Player? Must they be be converted to smaller H264 first (don't want to...too many, takes too long)?  Does it place more demand to stream TS folders on the WiFi that iTV is hooked up to, as opposed to the smaller file size h264?  Can it be done at all?
    It is the deciding point for me in purchasing iTV.
    Thanks!

    No, all content needs to be in Mpeg4 format and in your iTunes library.

  • What can I use to get shared media across OSes on my local network?

    Hey guys,
    My family is getting a new home entertainment center and I've thrown together a PC from spare parts around the house to put behind it and I'd like to know if there's a program out there that would allow me to gather shared media across the local network (everyone else in my family uses Windows...mainly Vista   :-/ ).  If not, is there any other way I can access the shared media (short of putting Windows on the PC of course)?  I tried searching, but I couldn't seem to come up with anything.
    Thanks in advance!

    Alright, so I've been working with Samba today, and I believe I have it working properly.  However, I can't seem to access any shared files/folders on machines that have Vista on them.
    When I run smbtree, I get this output:
    \\HOMEMEDIA
    \\WINXPCOMP
    \\VISTACOMP1
    timeout connecting to 192.168.1.107:445
    timeout connecting to 192.168.1.107:139
    cli_start_connection: failed to connect to VISTACOMP1<20> (0.0.0.0). Error NT_STATUS_ACCESS_DENIED
    \\VISTACOMP2
    timeout connecting to 192.168.1.105:445
    timeout connecting to 192.168.1.105:139
    cli_start_connection: failed to connect to VISTACOMP2<20> (0.0.0.0). Error NT_STATUS_ACCESS_DENIED
    \\WIN7PC
    I'm not really sure what to do here.  I've tried changing around settings in the smb.conf file, but I'm not really sure what exactly it is that I'm doing for every option.  Also, smbtree sometimes won't output a tree at all and it will just hang.  I'm quite confused, any suggestions on what I should try?
    Also, one of my Windows 7 PCs won't show up on smbtree.  I can ping it though...maybe it's not on the right workgroup?
    EDIT:  I was able to fix the problem with my second Windows 7 computer, apparently I had to change from 128-bit encryption to 40/56 bit encryption, then smbtree was able to pick up on it.
    Last edited by celestialorb (2009-09-02 04:54:27)

  • 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

  • Mapping from component controller context and view context

    Hi to all experts.
    im trying to create my first webdynpro . Im stuck up here please help me .... How to map the node from component controller context and view context i have searched the forum....got the answers as Drag and Drop...But it is not working ....

    Hi
    Check out this links and check saptechnical site
    WDA in SAP Help
    http://help.sap.com/saphelp_nw2004s/helpdata/en/7c/3545415ea6f523e10000000a155106/frameset.htm
    Web Dynpro for ABAP in SDN
    https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/webcontent/uuid/512040e1-0901-0010-769c-c238c6ca35d9 [original link is broken]
    Developing ABAP Applications Using Web Dynpro
    http://help.sap.com/saphelp_nw2004s/helpdata/en/42/d41b25d2216babe10000000a1553f6/frameset.htm
    Web Dynpro ABAP: Development in Detail
    http://help.sap.com/saphelp_nw2004s/helpdata/en/03/0048413e466e24e10000000a155106/frameset.htm
    WDA Sample programs & tutorials
    https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d
    Web Dynpro ABAP Demonstration Videos
    /people/thomas.jung/blog/2006/06/20/web-dynpro-abap-demonstration-videos
    Web Dynpro ABAP Wiki's
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdabap/main&
    New to Webdynpro
    Thanks,
    Tulasi Palnati

  • How to invalidate the Context of View B From View A?

    Hello,
    I have to Views, A And B.
    Is it possible to invalidate the Context of View B From View A? If yes, than how?

    Hi,
    YOu cant...
    I think krishna was trying to say "can't".. spelling mistake i guess !
    Thats the reason why u have a component controller common to all the views within a component

  • Accesss the Controller Context from View

    Hi,
    could you please let me know the code to access the Component Controllers Context from View Controller

    Hi Raghava,
    Suppose the following structure is there is Component Controller.
    Vn_DummyNode
      - Va_DummyContext
    To access it from the View Controller, you have to add the Component Controller in the required list of controllers.
    You can access it using the below piece of code
    wdThis.wdGetViewControllerName().wdGetAPI().getContext().getRootNode().getChildNode("Vn_DummyNode", 0).getCurrentElement().getAttributeValue("Va_DummyContext");

  • Sharing Libraries across accounts on one computer

    I'd like to know an easy method to share iPhoto libraries across accounts on one computer. It looks like iPhoto is more or less ignoring this topic. I have searched the web for tips, found some, yet the instructions are complicated and what seemed to be the best one didn't work. Anyone in this forum that can help me?

    haha, brian has a hidden message in there.
    Anyway, here all the links I have for sharing. The last link for using ACLs is the one I think you are thinking of.
    SHARING IPHOTO LIBRARIES
    Sharing libraries between users on the same local network
    You can also share a library on the same machine between users the same way.
    Sharing libraries between users on the same machine...
    -both users must have sharing enabled in their iPhoto Preferences
    -both users must be logged in and have iPhoto running
    -Remember that you can only view the other library. You can't edit the photos or play the saved slideshows or view the made books or burn them to CD or DVD. The books and slideshows will show up as an album. You can play that album as an "on the fly" slideshow. You can drag images from the sharing library to your library in the source column to import them to your library. You can then edit, add to albums, books, slideshow, etc.
    Sharing links from Apple....
    Sharing your photos between computers
    About shared photos
    Turning off photo sharing
    Looking for shared photos
    SHARING ONE IPHOTO LIBRARY BETWEEN USERS ON SAME MACHINE
    You can try one of these three methods:
    1- Use iPhoto Library Manager-the paid version
    The documentation page will give instructions on how it is done.
    2- Sharing one iPhoto library between several users on one machine
    3- Share an iPhoto Library in tiger Using ACL's

  • Sharing variable across Threads created by ThreadFactory

    Hi,
    I am initializing an ExecutorService as:
    static ExecutorService service =
    Executors.newFixedThreadPool(16, new ThreadFactory() {
    @Override
    public Thread newThread(Runnable r) {
    Thread t = new Thread(r);
    t.setContextClassLoader("<<My_Class_Loader");
    return t;
    Now, I have to initialize a service that should be initialized only once that all the Callables submitted to this ExecutorService can use. The variable needed to be shared across the Threads must have "My_Class_Loader" as its ContextClassLoader. How can I do that? Thanks in advance.

    Something like this:
    Thread t = new MyThread(r, ccl); // ccl = your context class loader
    public class MyThread extends Thread
      private MyVariable myVariable;
      public MyThread(Runnable r, ClassLoader ccl)
        super(r);
        this.setContextClassLoader(ccl);
        myVariable = ...; // your class loader stuff
      public MyVariable getMyVariable()
        return myVariable;
    // ... then runnables can go:
    ((MyThread)Thread.currentThread()).getMyVariable();

  • OSB 10.3.1 Sharing projects across OSB Configutrations

    Hello,
    I am trying to maximise code resuse by creating projects that are shared across different OSB configurations. Examples of such projects include those that have resources such as WSDLs and Schemas or XQuerys. I tried to do this using the following steps:
    1. I created a workspace
    2. I created an OSB configuration (Ocfg1) in that workspace
    3. I created a project (Common) that I wanted to share in that OSB Configuration
    The first challenge is right here. A project seems to be tied to a configuration. However, if you inspect the project contents there is no reference to the OSB configuration that it is contained within. The association is defined in a file in the OSB configuration project.
    4. I created a second OSB Configuration project (Ocfg2) and edited the file in this configuration project (as mentioned above) to add a reference to the shared project (Common).
    This second OSB configuration did not show that the shared project was part of it even after refreshes of the view. After restarting Workshop, I found that the shared project was now in the second OSB Configuration project (Ocfg2), but was deleted from the first (Ocfg1).
    Thus within a workspace in Workshop, an OSB project can only be added to a single OSB Configuration project it seems. I could therefore create two workspaces, but then I would need to copy the shared project which is exactly what I wanted to avoid.
    This appears to be a severe restriction of Workshop for OSB 10R3.1. Any ideas?
    Thanks in advance,
    Adil.

    I know this thread is a little old, but the same issue still applies in OEPE 11.1.1.7 and OSB 11.1.1.5.  The workaround I implemented was:
    1) Put all of my OSB projects in a folder (for easy version-controlling)
    CommonArtifacts
    MyProject1
    MyProject2
    2) Create an OSB Configuration Project for each Project.  So now that folder looks like:
    CommonArtifacts
    MyProject1
    MyProject2
    OSB Configuration - MyProject1
    OSB Configuration - MyProject2
    3) Create 2 workspaces in OEPE
    workspace_MyProject1
    workspace_MyProject2
    4)  Switch to workspace_MyProject1
    Import Eclipse Projects:
    - CommonArtifacts
    - MyProject1
    - OSB Configuration - MyProject1
    5) Drag CommonArtifacts and MyProject1 into the OSBConfguration - MyProject1 (while in OSB Perspective)
    6) Switch to workspace_MyProject2
    Repeat the import & drag steps
    The caveat to this is that you can only work on 1 "MyProject#" at a time and you need to switch between Eclipse/OEPE workspaces to go back and forth.  But the underlying assets within those projects are still in a single location on the file system.
    Cheers,
    Michael

  • Sharing object across 2 different web application

    Hello,
         I do not know if this is a right place to ask this kind of question...
         I have two different web applications running on 2 different tomcat servers.
         One of them creates one object ( say myComplexClassObject) which is serializable..
         and I want to share this object in another web applications.
         Both the apps are developed using JSP and servlets.
         Is there any way, I can make this object available in another application ?
         As the request object can not be used across 2 different contexts, I can not set it as attribute on request.
         I tried serializing myComplexClassObject in some test.dat. Problem going by this way is that
         how do I send this file to another application ?
         What I did is as follows....
         In the first app , I created the object and serialized it in one file test.dat. In the same app I read
         test.dat and send the content as query parameter to a JSP in another app. That JSP collects all the query parameters
         and constructs a big string out of it and then writes it to a file, test2.dat and tries to deserialize this.
         File sizes come out to be same. But it gives me StreamCorruptedException.
         Any idea, where I am doing wrong ? or any other way to share this object or to send the file to another app?
         I can not use FTP for some reasons. Size of the test.dat file is more than 10 KB.

    Some possible solutions:
    Use a webservice calls to pass the object,
    Use JAXB to convert the object to XML, pass the XMLover HTTP or a socket and use JAXB to convert the XML back into an object.
    Store the object as a blob in a database.
    Store the object in a Java aware database that can handle Java objects.
    Store the data in the object in a database.
    I am curious as to what information ot functionality is contained in this object that you feel the need to pass it between two servers.

  • Family Sharing enabled, cannot view my own purchases on iPhone anymore

    I have Family Sharing set up for my family.
    I am the organizer.
    I have my wife and my daughter added to Family Sharing.
    My daughter's account was added using "Create an Apple ID for a child".
    I am logged into my own iCloud account on my iPhone, as you'd expect.
    I am logged into my own iTunes and App store account (matches my iCloud account login) on my iPhone, as you'd expect.
    My problem is that in the App Store on iOS, looking at Purchased Items shows me the following:
    My iPhone knows that I'm logged into my own iTunes and iCloud accounts in all other respects. Why does it think that I'm logged into my daughter's iCloud account for viewing All Purchases? Am I the only one in the universe seeing this?
    Thanks.

    cprentice100 wrote:
    I have selected the folder where all my Photo's are kept on my iTunes account that is currently stored on the C Drive of my P.C - which is in excess of 3000 pictures, but still I can only see around 20 photo's that are just on the iPhone.
    Sounds as though you may have set the folder up in iTunes.
    Please note that Photostream does not store all the photos on your drive - it only stores recent photos taken on your iOS devices.
    AC

Maybe you are looking for