GetUserName() "null" after Allowing Runtime Customization of Menu

Hi,
We use JHeadstart 10.1.3 .3.75. Within the JHeadstart Application Definitions we configured the folowing security options:
Authentication Type = JAAS with Custom LoginModule
Use Role-based Authorization? = true
Authorization Type = JAAS
Authorize Using Group Permission = true
I've managed to get the row-level security working as described in [this |http://blogs.oracle.com/jheadstart/2007/11/row_level_security_using_vpd_a.html#adfbc] article written by Sandra Muller.
I retrieve the UserPrincipleName by calling the folowing statement in my ApplicationModuleImpl baseclass.
String vUserPrincipalName = ADFContext.getCurrent().getSecurityContext().getUserName();This worked fine until we want to implement the "Runtime Customization" of menu's.
By switching this option in the JHeadstart Application Definition, my vUserPrincipalName returns null.
Do you have any suggestions?
I am able to retrieve the username in my prepareModel step in the lifecycle. Should I set my context in this step or does that result in too much overhead?
Regards,
Romano

Romano,
Hmm, that's strange. I could not reproduce your issue.
Your work around seems OK: setting the context in prepareModel.
Steven Davelaar,
Jheadstart team.

Similar Messages

  • Anybody knows that how to Allowing user Customization at runtime for portle

    Anybody knows that how to Allowing user Customization at runtime for portlet.
    What i want is to let user Customization persist to the repository. (not session). bu tmy testing accodring the Jdev 11g guide shows not working for portlet..
    Any body knows how to do this for portlet ? Web center 11g
    thanks a lot.
    Wayne

    Hi Wayne,
    You can only save runtime customizations to the repository for the users present in jazn-data.xml file (If you are using file based security).
    You will have to do the following before you can start saving user customizations:
    1. Create Webcenter Template project.
    2. Apply ADF Security
    3. Use page-definition files for jspx pages.
    After this, whatever customizations you do, will be saved to persistence storage.
    Better would be to try this on server. Since, before deploying, you run the pre-deployment tool, which will take the MDS Repository path as an input and store all persistence storage there.
    If there is nothing in that location, you can be sure something is wrong and debug it.
    Hope that was helpful.
    Regards,
    Kunal Chheda.

  • Allowing user Customization at runtime for portlet

    Anybody knows that how to Allowing user Customization at runtime for portlet.
    What i want is to let user Customization persist to the repository. (not session). bu tmy testing accodring the Jdev 11g guide shows not working for portlet..
    Any body knows how to do this for portlet ? Web center 11g
    thanks a lot.
    Wayne

    Hi Wayne,
    You can only save runtime customizations to the repository for the users present in jazn-data.xml file (If you are using file based security).
    You will have to do the following before you can start saving user customizations:
    1. Create Webcenter Template project.
    2. Apply ADF Security
    3. Use page-definition files for jspx pages.
    After this, whatever customizations you do, will be saved to persistence storage.
    Better would be to try this on server. Since, before deploying, you run the pre-deployment tool, which will take the MDS Repository path as an input and store all persistence storage there.
    If there is nothing in that location, you can be sure something is wrong and debug it.
    Hope that was helpful.
    Regards,
    Kunal Chheda.

  • Why CreateNewFrame() returns as NULL after successful created 136 child frame window and trying to create 137th child frame window in MDI application

    I am working on MDI application which was developed in VC++ in VS 2012. When my application is launched, it will display a Tree. Under a tree there are 254 nodes. Basically
    these nodes data are read from Configuration xml file and loaded into the Tree. By double clicking on each node, first it will create object for document class ( By calling CreateNewDocument() method) after that member variables for that
    document class will be initialized and then it will create the new frame window (by calling
    CreateNewFrame(pDoc,NULL). New child frame window will show under Main window to the user.
    User able to see the data from child frame window.
    Similarly by double clicking on each node it will create another object for the same document class and new child frame window will be opened for that node. Each child frame window runs
    in different data and showed under the Main window.
    Existing requirement by double clicking on each node, node data shall show in separate child window and there is no requirement for all 254 child windows opened simultaneously.
    But current requirement is , all 254 child windows shall open simultaneously by double clicking on each node one by one.
    In debug mode I have tried double clicking on each node. I able to open up to 50 nodes. After 50th child windows are opened, I unable to access to the application
    (Unable to open further node data window since application is getting hanged).
    Each child window is having tree, multiple splitter window and some additional controls (static text, ...).
    Same I have tried in release mode, I able to open up to 136 child windows. After that the application fail to create the new frame window in VS 2012. i.e CreateNewFrame() return
    NULL after successful created 136 child frame window. Debug purpose I have added the code to retrieve last error code by calling GetLastError() method. I got the value as "0". By closing any existing child window then I able to open remaining nodes.
    At any point of time I can reach maximum of 136 child frame window that can be opened under Main window. Failing to open all 254 child frame window
    simultaneously,  currently I fail to meet the current requirement.
    current Requirement is all 254 child frame window are opened simultaneously. Please let me know what may be the reason fail to create new frame window after 136 frame window that are
    opened already. In Microsoft site, mentioned that there is no limitation for creating frame  window in MDI application. I have tried another sample MDI application having limited number of controls, in which I able to create "n"
    number of child frame windows. why not able to create more than 136 child frame window in my actual application?
    Is there any possibility by changing project settings allow me to create 254 child frame window??
    Code Snippet as below:
    CDiagBaseDoc * CDiagBaseMDocTemplate::OpenDiagView( ...)
         CDiagBaseDoc* pDoc = NULL;
        if (pDoc == NULL)
            pDoc = (CDiagBaseDoc*)CreateNewDocument();
        if ( pDoc )
           CFrameWnd* pFrame = NULL;
           if (bAlreadyOpen)
                  // If Child frame window already opened, then handling the code here.
         else
               pFrame = CreateNewFrame(pDoc, NULL);
               if (pFrame == NULL)
                  ASSERT(FALSE);
                  delete pDoc;       // explicit delete on error
                 pDoc = NULL;
              ASSERT_VALID(pFrame);
              if( pDoc != NULL ) //VS2012
                 if ( !pDoc->OnNewDocument() )
                    TRACE0("CDocument::OnNewDocument returned FALSE\n");
                    delete pDoc;       // explicit delete on error
                    pDoc = NULL;
                    pFrame->DestroyWindow();
                     pFrame = NULL;
           if (pFrame)
               InitialUpdateFrame(pFrame, pDoc);
               ShowWindow( pFrame->GetSafeHwnd(), SW_MAXIMIZE ); //when opening node for the 1st time, maximize it
    }<o:p></o:p>

    Hi MuruganK,
    Have you checked how much memory your application used? You could check it by Task Manager. Maybe your application reach Memory Limits for Windows.
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa366778%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
    Is it possible that there are some memory leaks in your application? It would better if you have made a simple sample to reproduce and narrow down this issue.
    Best regards,
    Shu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I have 9.0.1 on 2 pc's, both xp sp3. On 1 the 'open new tab' button is visible, on the other, the 'open new tab' button is not even available in the 'customize toolbar' menu for dragging and dropping. Why?

    I used the same installation file, but on 1 pc, the 'open new tab' button is available in the 'customize toolbar' menu and can be dragged and dropped onto the navigation bar. On the other pc, the 'open new tab' button/icon is not even available for dragging and dropping. I uninstalled firefox completely, including settings and preferences, then reinstalled, but that did not correct the missing button.

    Hi,
    Please try '''Restore Default Set''' in the '''Customize...''' window. If it's still not visible, one reason could be that the button is already placed on the toolbar but may be hidden behind another icon or toolbar.
    Useful links:
    [https://support.mozilla.com/en-US/kb/Options%20window All about Tools > Options]
    [http://kb.mozillazine.org/About:config Going beyond Tools > Options - about:config]
    [http://kb.mozillazine.org/About:config_entries about:config Entries]
    [https://support.mozilla.com/en-US/kb/Page%20Info%20window Page Info] Tools (Alt + T) > Page Info, Right-click > View Page Info
    [https://support.mozilla.com/en-US/kb/Keyboard%20shortcuts Keyboard Shortcuts]
    [https://support.mozilla.com/en-US/kb/Viewing%20video%20in%20Firefox%20without%20a%20plugin Viewing Video without Plugins]
    [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder & Files]
    [https://developer.mozilla.org/en/Command_Line_Options#Browser Firefox Commands]
    [https://support.mozilla.com/en-US/kb/Basic%20Troubleshooting Basic Troubleshooting]
    [https://support.mozilla.com/en-US/kb/common-questions-after-upgrading-firefox-36 After Upgrading]
    [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode]
    [http://kb.mozillazine.org/Problematic_extensions Problematic Extensions]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes Troubleshooting Extensions and Themes]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20plugins Troubleshooting Plugins]
    [http://kb.mozillazine.org/Testing_plugins Testing Plugins]

  • Calling runtime.exec in menu(swing)

    Hi all,
    I want to pop up a command (NT) window from a menu in java swing.
    1. However I am able to call from the menu, but was Not able to get the batch file (either .bat or .exe) to run in another window
    2. and all the output from the batch file did not printout to screen.
    any help?
    JMenuItem menuItem = null;
    startAction = new AbstractAction("Start") {
    public void actionPerformed(ActionEvent e) {
    displayResult("Starting Application...", e);
    Process JobProcess = null;
    try {
    // JobProcess = Runtime.getRuntime().exec("cmd.exe /c test.bat");
    //JobProcess = Runtime.getRuntime().exec("cmd /K start cmd /K test.bat");
    //JobProcess = Runtime.getRuntime().exec("cmd.exe /c test.bat"); //works
    JobProcess = Runtime.getRuntime().exec("test.bat"); // works
    JobProcess.waitFor();
    int i = JobProcess.exitValue();
    catch (Exception ex) {
    textArea.append(ex.getMessage());
    in the test.bat :
    echo "this is test" > test.txt
    thanks
    andrew

    I don't believe you can ues redirection (>) when executing a command. Your program must handle the output itself. Add code something like:
    String line;
    BufferedReader output = new BufferedReader( new InputStreamReader( JobProcess.getInputStream() ) );
    while ( (line = output.readLine()) != null )
              System.out.println( line );
    output.close();Note: the variable JobProcess should be renamed to jobProcess. The Java convention is to use uppercase for class names.

  • JavaFX's null not allowed is a thorn in my side....

    Hi All,
    Rule: JavaFX's data types (i.e. Number, Double, String, Integer) can't be null.
    My JavaFX Application listen's for real time data updates. Since this is a listener, it won't have a value til it get's the first update. Sounds fair enough... but they can't be null! So, I must use java.lang.Double instead. But all binding's convert the java.lang.Double null value to a javafx Double value of 0.0. So now I have broken logic in my program as 0.0 is a legitimate value and certainly does not signify 'null'. So, then it looks like I am stuck entirely with java.lang.Double everywhere! But then I'd need to do my own java.lang.Double -> fx.Double casting class/function to handle the cast conversion of each binding in order to interact sensibly with the JavaFX API (as it like's the FX Double everywhere and won't throw a nullpointer exception when casting).
    Rule: JavaFX's sequences can't contain null entries.
    Further more, I could say "Nope, I don't have a value/update yet so I will just use an object placeholder/wrapper with null assignment". In my case, JavaFX object's are multiple and ordered. Perfect for a sequence! Except, you can't store null in a sequence! Thus, if you are looking for a team's sport's top batsman.. the 3rd batsman and they don't exist yet.. then 'team[2] = null' wont insert! So how can I find and bind to the 3rd batsman? We'll either I avoid sequences, which means native array's or java collections... but then I can't really bind to them! Or, everytime the sequence changes I need to search/iterate over the entire sequence to determine if there is a 3rd batsman in the sequence (and that won't necessarily be the 3rd entry).
    Both these 'null not allowed' rules cause significant problems and have huge flow on effects onto the code that uses them. I believe this is totally wrong and a bad feature of the language and completely contradicts autoboxing! The identification of a data type reference being null is extremely significant. It is the responsibility of the receiver of a null reference/argument to decided how they want to handle the null reference (see autoboxing nullpointer exceptions if you don't believe me and reasons not to use java primitives). Removing the ability for this to occur is a step backwards for functional programming. I know you will say that I could just use the java.lang.*, a fair claim... but don't forget this means more work! The very reason you might be considering JavaFX in the first place.
    Anyway my rant is over, I really love JavaFX.... just not these x2 rules.

    The technique PhiLho refers to is often called the "null object pattern". If done properly it needn't be hackish at all, and indeed it can simplify a lot of processing code. Even if the "primitive" values (Number, String, etc.) could be null, and even if you could put nulls into a sequence, you're probably better off putting in an actual object that represents the absence of a value. The reason is that when you go to process that data, instead of just processing it, you have to put in checks for nulls here and there, and do special-case processing for it.
    Consider displaying a list of, say, the top five batsmen. You'll want to have a sequence of five batsmen, and you'll want to put five CustomNodes or something into a VBox to display the names, statistics, etc., something like the following:
    VBox {
        content: [
            for (b in [0..<5]) {
                BatsmanNode {
                    name: bind batsmen.name
    innings: bind batsmen[i].innings
    notOuts: bind batsmen[i].notOuts
    visible: bind batsmen[i].valid
    You can't do this if there were a null in the sequence, even if it were allowed. Instead, you should put a "fake" batsman object into the sequence, and make its "valid" variable be false. This way the corresponding BatsmanNode will be invisible. Or, you could have it display "(no entry)" in grey text, or something like that.
    The point is that if you always have a real object there, even if it represents a "null" or the absence of a value, it removes special-case processing code and enables you to do things like bind to it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Two proposed solutions for iOS TOS not allowing runtime code

    I understand that loading runtime code is prohibited by Apple iOS TOS.  Fine.  I am willing to compile all my resources into one big SWF to get the job done to meet the legal requirements.
    However, in our setup (and I imagine for many projects) it's not possible to do this easily.  Different SWFs are owned by different teams - it's actually part of what makes the Flash ecosystem so great and the workflows so powerful.
    The easiest solution is embedding all my assets, which I assumed would work but it didn't, becasue the [Embed] tag uses Loader, which under iOS nixes embedded actionscript.
    Porposed solution #1:
    It seems to me to be in the spirit of the TOS to allow actionscript code in SWFs that are embedded into the iOS actionscript code, because all of this code was available at compile-time and at packaging-time.
        [Embed(source="myAnim.swf")]
          private var anim:Class;
    Code in the embedded myAnim.swf should be allowed.  Technically the only reason it isn't is because embed's result in a Loader - merely an implementation detail.  If this isn't acceptable...
    Propsed solution #2:
    What about a new feature to meet this need: [LinkedEmbed] that results in a statically linked class compiled at compile-time and not Loaded at runtime?
        [LinkedEmbed(source="myAnim.swf")]
          private var anim:Class;
    Thanks for your time and consideration,
    -Jeff

    Ok, truth in advertising, these aren't "solutions" in the sense that they don't allow runtime code, but they are workarounds to ease the transition of Flash-platform workflows to iOS, which is what AIR is supposed to be all about.

  • How to make a Struts message null after used in JSP?

    Hi,
    In the context of Struts/JSP,
    An action class might write error messages by
    ActionError msg = new ActionError("msg.request.something");
    ActionErrors msgs = new ActionErrors();
    msgs.add(ActionErrors.GLOBAL_ERROR,msg);
    saveErrors(request,msgs);
    This message will produce a popup modal window by the following JSP code:
    <logic:messagesPresent>
    <html:messages id="error">
    <!--<li class="infomsg"><bean:write name="error"/></li> -->
    <script>javascript:alert('<%=error%>')</script>
    </html:messages>
    </logic:messagesPresent>
    The problem is that this JSP page is shared by serveral actions: when another action invoke this page again, the previous error message will take effect again.
    So my question is how to make message null after used once by its author.
    Thx.
    PY

    msgs = null;

  • TOC disappears after allow blocked content

    I have a Robohelp 9 project (single sourced through FrameMaker)
    I can compile the help and run. When I view it, I see the full help along with the "Allow blocked content" message.
    When I click Allow Blocked Content, my help appears but now the TOC is missing. (see images below)
    I have been generating the help for the same way for a long time and this is the first time I have seen this problem.
    I did install/uninstall Robohelp 10, but I have built help (albeit a different project) successfully after that
    I do not really know what scripts are running here and blocked. Has anyone seen this and can anyone help?
    Thank you!

    Sadly, I'm not having much luck. The Chrome switch seems to work, but on IE, the file replacement causes the contents to flicker now rather than just hide the TOC. It never loads successfully after allowing blocked content.
    I therefore copied the output to a web server and tried running it there. I'm seeing the same problems, which indicates to me that something is corrupt in my WebHelp build out of Robohelp.
    I'm trying reinstalling RH9 now, but should that fail, do you know if RH10 would work successfully with the rest of my TCS 3.5 installation?

  • Pass current sequence as argument in Customize Tool Menu

    Is it possible to pass the full path and filename as an argument under the Customize Tool Menu?
    Basically, I have an external tool that works on a sequence file and I'd like to call it from the Tools menu.  It's a Command type but I don't know what to put in the arguments.  I found a post where someone said use "%FILE%", but that did not work. 
    Also, if there are other keywords available, where is that list?
    Thanks. 
    Solved!
    Go to Solution.

    Hi Richard,
    It seems there isn't a way to do this using the Command type.  The problem is that you can't use an expression to specify the arguments for the executable and you need to use an expression to get the current sequence file's path.
    However,  you can wrap your executable in a sequence file that has only one step; calling your executable.  If you place a Call Executable Step in your sequence, you can specify the argument as the current file path by using the expression RunState.InitialSelection.SelectedFile.Path.
    Then add a new item to the Tools menu and select your wrapper sequence.
    Cheers, 

  • The graph dose not shown after running the Customize JSP Page.

    Hi All,
    While creating customize JSP I am facing one problem - The graph dose not shown after running the Customize JSP Page.
    What are the possibilities ? any body has any Idea Please help me

    Hi all,
    I have the same issue! Any solution??
    Thanks
    BI Beans Diagnostics(v1.0.2.0) 11/10/06
    =========================================================
    JDEV_ORACLE_HOME .......................... = D:\jdev1012b1913
    JAVA_HOME ................................. = D:\ORDB10gR2Home\jdk
    JDeveloper version ........................ = 10.1.2.1.0.1913
    BI Beans release description .............. = BI Beans 10.1.2 Production Release
    BI Beans component number ................. = 10.1.2.67.0
    BI Beans internal version ................. = 3.2.2.0.24.2
    Connect to database ....................... = Successful
    JDBC driver version ....................... = 10.1.0.4.2
    JDBC JAR file location .................... = D:\jdev1012b1913\jdbc\lib
    Database version .......................... = 10.2.0.2.0
    OLAP Catalog version ...................... = 10.2.0.2.0
    OLAP AW Engine version .................... = 10.2.0.2.0
    OLAP API Server version ................... = 10.2.0.2.0
    BI Beans Catalog version .................. = 3.2.2.0.24
    OLAP API JAR file version ................. = "10.1.0.5.0"
    OLAP API JAR file location ................ = D:\jdev1012b1913\jdev\lib\ext
    Load OLAP API metadata .................... = Successful
    Number of metadata folders ................ = 1
    Number of metadata measures ............... = 23
    Number of metadata dimensions ............. = 8

  • The Outlook links do not connect to Firefox even after setting the customize option in Default Programs. Please help.

    The''' Outlook links do not connect to Firefox '''even after setting the customize option in Default Programs. Please help.

    Message to Toad-Hall
    Thank you, for that. To be sure, I tried your suggestion, and selected "System Proxy" as the choice, for Thunderbird and Firefox. Rebooted, and looked at the outcome.. NO Joy.. :-(
    I believe that I shall send the output of the Error Log in my next post. Perhaps someone can point me in the right direction after looking at the Error.log.
    Thank you...Toad Hall. If you think of something else to try, I am ALL ears.. I shall keep trying..

  • After allowing windows media player as the main player Itunes doesn't open anymore.Instead I get a message that itunes can't start because msvcr80 is not installed on my computer.??

    After allowing windows media player as the main player Itunes doesn't open anymore.Instead I get a message that itunes can't start because msvcr80 is not installed on my computer.??

    Hello Ezettera
    Check out the article below on troubleshooting iTunes start up issues. You may need to start up in Safe Mode or even remove iTunes and its associated software and reinstall iTunes.
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    http://support.apple.com/kb/ts1717
    Regards,
    -Norm G.

  • How to customize floater menu?

    Hi,
    I want to  customize floater menu, does anybody have solution for it?
    Thanks
    Simon

    Hi
    The extending dreamweaver documentation - http://help.adobe.com/en_US/Dreamweaver/10.0_Extending/WS5b3ccc516d4fbf351e63e3d117f53d5f9 f-7ffe.html, (also available as pdf) shold contain an example of what you wish to do. The section is under floating panels - creating menu item, http://help.adobe.com/en_US/Dreamweaver/10.0_Extending/WS5b3ccc516d4fbf351e63e3d117f53d7b3 e-7fc8.html.
    PZ

Maybe you are looking for