Visibility of the components not working

Hi,
I have a simple requirement in which i have to display some menu items depending on the "*Role*" of the user who has logged in.
I tried all the following methods,
1. In backing bean of the .jspx file, checking the Role and setting "component.setvisibility(true)"..... Output: the whole application page getting invisible, including the links under Status, Copyright, About, Global, Images everything. Following is the backing bean code.
for (String role : ADFContext.getCurrent().getSecurityContext().getUserRoles()) {
if (!role.equalsIgnoreCase("authenticated-role") && !role.equalsIgnoreCase("anonymous-role")) {
if (role.equalsIgnoreCase("Admin")) {
gl1.setVisible(true);
2. JSF Expression for Rendered: #{securityContext.userInRole =='Admin'}.... Output: Nothing Happens.
3. JSF Expression for Visibility: #{securityContext.userInRole =='Admin'}.... Output: Nothing Happens.
I had a similiar requirement in my previous project and using above step 1, i was able to complete the task. But for this, its taken 2 days now :(
Also, this is happening for any UI componenet I use.
Can anyone, please help me with this.
Thanks.
Tina
Edited by: 878924 on Aug 17, 2011 1:30 PM
Edited by: 878924 on Aug 17, 2011 1:31 PM

if yuo are using it in expression you have to use it like
rendered="#{securityContext.userInRole['Admin']}"and if you are having a managed bean to check it then use it like
<af:outputText id="ot4" value="#{managedBean.userInRole=='false'}"/>you are checking it as
securityContext.userInRole == 'false'which is wrong you have to chk it as
managedBean.userInRole == 'false'

Similar Messages

  • Hi. I habe one old ID and now i have one new ID. The old one is bad , because the Email not working. But i hav a lot of Apps and i want to copy this apps in my new ID. How can i do this?

    Hi. I habe one old ID and now i have one new ID. The old one is bad , because the Email not working. But i hav a lot of Apps and i want to copy this apps in my new ID. How can i do this?

    You don't. Apps are permanently tied to the ID used to purchase them. Instead of creating a new ID, change the primary email address on your existing ID.

  • I can't find isight under the software, also, i tryed to restart  and still  the camra not working. do you have alink to download isight?

    i can't find isight under the software, also, i tryed to restart  and still  the camra not working. do you have alink to download isight?

    Click on the Apple symbol in the top left of the screen and select About this Mac. Click on More Info and scroll down to the USB entry under hardware. Does it list the 'Built in iSight' in the top right hand pane?
    If it does, what happens when you run the Photo Booth application?

  • HT1349 how can i open the ipad , the slide key on the screen not working.?

    how can i open the ipad , the slide key on the sreen not working ?

    Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430

  • Iphone not work i can only see the APPLE NOT WORK, iphone not work i can only see the APPLE NOT WORK

    iphone not work i can only see the APPLE NOT WORK, iphone not work i can only see the APPLE NOT WORK

    First, try to reset by holding the sleep and home button for about 10sec, until the Apple logo comes back again.
    If this does not help, connect in recovery mode and restore, explained in this article: iOS: Unable to update or restore

  • I had to restore my computer. After reinstalling itunes and sincronizing with my ipod, the music files were not organized in itunes as in the ipod: some songs were missing, some albums has no cover? Why is the sincronization not working properly?

    I had to restore my computer. After reinstalling itunes and sincronizing with my ipod, the music files were not organized in itunes as in the ipod: some songs were missing, some albums has no cover? Why is the sincronization not working properly?

    See Recover your iTunes library from your iPod or iOS device.
    tt2

  • HT1338 why is the video not working with skype on this os

    why is the video not working with skype on this os

    Try this:
    Quit Skype.
    Click on the desktop so Finder is active. Hold the option key down and click on Go in the menu bar.
    In the drop down, select Library.
    Open the Library folder and scroll down to Preferences.
    In that folder, there is a file called com.skype.skype.plist. Trash that file.
    Now try Skype.

  • Why does the alarm not work when the iphone 4 is turned off

    why does the alarm not work when the iphone 4 for is  turned  off works fine when on most other phones work when off

    The only phone I've ever had that would turn on and sound the alarm is a Blackberry. So, I'd hardly say "most phones" have this function.

  • Why does the mail not work when i updated my 5s to iOs 8?

    why does the mail not work when i updated my 5s to iOs 8?

    Thank you for the reply. But can you tell me what this configuration is about and how I should do this?

  • Why does the swiping not work to scroll down the screen

    why does the swiping not work to scroll down the screen or swipe from side to side

    Thank you for the reply. But can you tell me what this configuration is about and how I should do this?

  • The volume not working on my iphone 4s

    The volume not working on my iphone 4s

    I had the same problem as well for nearly 3 months.
    I had tried bring the Iphone into my phone carrier and they sent me to the AppleStore. When I brought it to them they hooked it up to the diagnostic machine and they told me just to restart the Iphone from the factory settings.
    This didn't work either. To complicate things more, other "solutions" seem to only yield temporary success. These temporary solutions included: blowing compressed air into every port, various restart combinations, various factory restore methods.
    I had nearly given up until I stumbled upon a support post on Apple's website that finally yielded success.
    http://support.apple.com/kb/TS1630
    The solution for me is listed as line 7, which reads:
         "Check the receiver mesh (which is on the top front of the device, above the display). If it appears blocked, use a clean, small, dry, soft-bristled brush to carefully and gently brush away any debris."
    Apparently, this cylinder shaped, mesh area is in some way tied to what triggers the headphones/speaker selection. I am not sure how, but I can say that after gently brushing it out my sounds are working again; specifically my music is now able to play directly off the speakers and my Iphone apps all play their sounds agian.
    Hope this helps you as well!

  • How do u fix the keyboard not working issue on the new ios7

    how do u fix the issue of the keyboard not working on the ios 7 OS? i experieced it on my MacBook Pro recently.

    Briss wrote:
    how do u fix the issue of the keyboard not working on the ios 7 OS?
    iOS 7 is not a MBP OS.
    i experieced it on my MacBook Pro recently.
    Exactly what did you experience?
    Ciao.

  • After update.. i can not start the ipad, when i press agree in the terms ...it will freeze and the screen not working///help please

    after update.. i can not start the ipad, when i press agree in the terms ...it will freeze and the screen not working///help please

    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
    iOS: Resolving update and restore alert messages
    http://support.apple.com/kb/TS1275
    iPad: Unable to update or restore
    http://support.apple.com/kb/ht4097
     Cheers, Tom

  • Plz after synch with laptop the apps not working well

    plz after synch with laptop the apps not working well

    Try a reset. Hold the Sleep and Home button down for about 10 seconds until you see the Apple logo. Ignore the red slider.

  • Flex components not working after upgrade to Flash Builder 4

    I just purchased Flash Builder 4 and imported my project from Flex Builder 3. Everything worked except my Flex components that were created in Flash Professional using the Flex Compoent Kit are not showing up at all in my Flex app. The components were created in Flash CS3 and published to an SWC. I even tried upgrading to Flash Professional CS5 and re-publishing but that didn't help. These components work fine in Flex Builder 3 with Flex SDK 3.2. Does anyone know why they aren't showing up in Flash Builder 4 using Flex SDK 4.1 and AIR 2.5 SDK? I need this to work with AIR SDK 2.5 so I can compile for Android. Thanks, Ryan.

    P.S. when I say they aren't showing up I mean they aren't visible in the running application. Flash Builder is finding them in the SWC though because I instantiate the components in my mxml file and it compiles without errors. - Ryan

Maybe you are looking for

  • Tecra M4 - tablet function not working

    Hey guys, please excuse my bad english first. I got a Tecra M4 and after installing xp tablet and drivers the tablte still doesn't work. Did I forget a driver? Which one is responsable for the tabletscreen? thx, marti

  • Problems with the items (control) in forms 9i (Re)

    Hello, I write this problem in a other post and but don't have any feedback about it(So I will give another try:-) ) The problem that I will describe don't happen all the time and is very rare but I want to know if it's a normal bug of forms or somet

  • Editable JCombobox - bug in 10.1.3

    Hi I have a JComboBox bound to a ADF view object JComboBox cbo = new JComboBox(); cbo.setEditable(true); cbo.setModel((ComboBoxModel)panelBinding.bindUIControl("PortfolioView1", cbo)); When I type in additional data in the combobox (its editable) and

  • Cannot install extension on Safari 6.0.5

    Please help! I cannot install any extension on Safari. I get the message "Safari could not install the extension. An error occured during the installation of the extension". I have abled the extension function in the preferences and can install exten

  • DVD quality is really poor.

    I am new in FCPX. I finished my project and export it as DVD. I also export it as H.264 and even Uncompress then Burn it as DVD. In all cases the quality of DVD is really poor. what should I do for better quality?