How to set the portlet preference per user instead of global setting

Hello All
I am using IBM JSR168/ JSF, In my portlet Edit mode I am trying to set a value per user preference , but it always set for all other users even this is just a normal user, I think when an administrator set any preference value then those preferences value will be set for all the users. but in my case it is a normal user has right for the edit mode and hence the preference set by the user in edit mode will be set for his portlet instance only. So why it sets for all the users preference???...... Thanks a lot for your help!!!
here is my code:
///////////portlet.xml//////////
<preference>
                    <name>RowsPerPage</name>
                    <value>25</value>
                    <read-only>false</read-only>
               </preference>/////////////////////////pageCode in edit mode do the save action/////////////////////////
public String doSaveAction(){     
           FacesContext ctx = FacesContext.getCurrentInstance();
              HttpSession session = (HttpSession)ctx.getExternalContext().getSession(false);
              if(session != null) {
                   session.setAttribute("save", "save");
                   session.setAttribute("Number",Integer.toString(getNumber()));
           return "";
}/////////////////////store the preference value///////
public class MyPortlet extends FacesGenericPortlet {
public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException {
          try{               
            //String save1 = actionRequest.getParameter("save");
            String save = (String) actionRequest.getPortletSession().getAttribute("save");
            if (save != null){
               PortletPreferences prefs = actionRequest.getPreferences();
               String number= (String) actionRequest.getPortletSession().getAttribute("Number");
               prefs.setValue("Number", number);
               prefs.store();
          }

Hope someone really can help me for this issue... I just wondering is this related to the user group config in portlet, since the interesting is that this issue is not apply to wpsadmin , but not sure where and how to set other user group that can set the preference no problem??
Thanks for your time !

Similar Messages

  • Sharing portlet preferences among users

    Hello,
    Is it possible to share portlet preferences among users? So that the
    portlet preferences would be stored per portlet instance, and would be
    the same for every user?
    If this is not possible with Java portlets (JSR-168), can it be done
    with other portlet types (JSP portlet, page flow portlet), using the
    PortletPreferences API?
    The JSR-168 specification says:
    "Portlet Specification assumes preference attributes are user specific,
    it does not make any provision at API level or at semantic level for
    sharing preference attributes among users. If a portal/portlet-container
    implementation provides an extension mechanism for sharing preference
    attributes, it should be well documented how the sharing of preference
    attributes works."

    Betsy,
    Does WLP provide a way to allow a user to store only a subset of all
    his portlet preferences (using only JSR 168 api) ?
    My aim is to try to create a JSR 168 compliant portlet where few of
    the preferences are allowed to modified by the user (in the edit
    mode), while all other preferences may be modified only by a portal
    admin (thru admin view). However, the PortletPreferences.store()
    method seems to store values of all current preferences for the
    particular user, with the result that future changes by the admin are
    not reflected for any user who has already customized his
    preferences.You can let the admin propagate changes to the user via admin tools.
    There is an option in admin tools to do that.
    Setting the preference <read-only> attribute to 'true' does not help
    either, as the store method still attempts to store the value and
    then throws a ReadOnlyException.In this case, the setValue/setValues/reset and not the store will throw
    the ReadOnlyException.
    Why does WLP attempt to store all preference values; as opposed to
    setting only those which have been explicitly set using
    PortletPreferences.setValue(key, value)?The implementation does not keep track of changes explicitly in memory.
    Even if it keeps track of changes, I'm not sure if this would solve your
    use case.
    Will BEA be changing this in future releases, and is there a
    work-around for now?The suggested approach is to let admins propagate changes to users.
    Subbu
    >
    Thanks, Betsy
    Although WLP does not support the notion of sharing preferences,
    WLP lets you manage preferences in a hierarchy via the admin tools.
    When an admin sets preferences on a portlet, as long as users don't
    customize their portlets, all users get the same portlet instances,
    and hence share preferences.
    Subbu
    Bob said the following on 02/12/2004 04:08 AM:
    Hello,
    Is it possible to share portlet preferences amongusers? So that the
    portlet preferences would be stored per portletinstance, and would be
    the same for every user?
    If this is not possible with Java portlets(JSR-168), can it be done
    with other portlet types (JSP portlet, page flowportlet), using the
    PortletPreferences API?
    The JSR-168 specification says:
    "Portlet Specification assumes preferenceattributes are user specific,
    it does not make any provision at API level or atsemantic level for
    sharing preference attributes among users. If aportal/portlet-container
    implementation provides an extension mechanism forsharing preference
    attributes, it should be well documented how thesharing of preference
    attributes works."

  • How to find the list of all user exits modified by the users

    How to find the list of all user exits using by in R3

    Hi Mohamed
    You use Solution Manager to do the comparison for you.  There are some nice features that will highlight all your customised coding.  Have a look at the SolMan resources on the Support Portal e.g. using SolMan for upgrade comparisons.
    Rgards
    Carl.

  • How to restrict the department to not user other departments' equipment?

    Dear SAPIENTS,
    How to restrict the department to not user other departments' equipment? If suppose any one creating order for equipment having different authorization group then system should not allow me to do this.
    Regards,
    Kaushal Rai

    Kaushal Rai,
    Use Authorization group for technical objects, create authorization gruops in IMG and assign the same to the Equipment master and block the other department with the same authorization group. For ristricting the authorization group to other departments after creating and assigning it to the equipment seek help from your BASIS team.
    goto the below path for cerating the Authorization group:
    IMG - PMCS - Master data in PMCS - Technical Objects - Define Authorization groups:
    Here you define the authorization groups, after completion of this step go to the Equipment master in General Data tab page there is a feild Authourization Group, mention the respective authorization group and provide this Authorization gruop value to the respective user in the user role with the help of BASIS Team.
    Regards,
    Praveen.

  • How to change the text of a user defined field in dynamic selections?

    Logical Database PSJ is used by t code CJI3 - we added a couple of user fields into the dynamic selections of CJI3.
    Now - how to change the text of this user filed (USR01 of structure PRSP_R in logical database PSJ)?
    Found an OSS note - 86980 - that tells that this is not possible.
    But when we read the documentation on the user field (CJI3 - dynamic selections  - double click on user field - F1), it shows the following text:
    User-defined field in which you can enter general information with a length of up to 20 characters.
    Dependencies
    The names (key words) for  user-defined fields depend on the field key.
    Now the question is where to change the field key..
    Thanks,
    Ven

    Madhu - you did not get the question I think.
    Anyways - I found an OSS note 1266643 - this code change should take care of the issue - it will then reflect the details maintained in custoizng at transaction code OPS1..
    Thanks,

  • How to find the maximum no of users logged in Database

    Hi All,
    How to find the maximum number of users logged in database at particular time? I can find currently logged users or umber of sessions running on Database but I wanted to find at what time maximum number of users or sessions connected to the DB? is that possible? if yes please help me. thanks.

    Vijay wrote:
    Hi All,
    How to find the maximum number of users logged in database at particular time? I can find currently logged users or umber of sessions running on Database but I wanted to find at what time maximum number of users or sessions connected to the DB? is that possible? if yes please help me. thanks.
    select * from v$resource_limit;Lists about 20 different resources with current, maximum and limit on usage. Session count is one of them. I don't think there's any (simple, efficient) way to determine the maximum number of different users of sessions, though.
    Regards
    Jonathan Lewis

  • How to solve the issue "CUV check user equivalence failed" ?

    Folks,
    Hello. I am installing Oracle 11gR2 RAC using 2 VMs (rac1 and rac2) whose OS are Oracle Linux 5.6 in VMPlayer according to the website http://appsdbaworkshop.blogspot.com/2011/10/11gr2-rac-on-linux-56-using-vmware.html
    In order to install Grid Infrastructure, we need to run Cluster Utility Verification (CUV) at first by running the cammand below:
    [ora11g@rac1 grid]$ ./runcluvfy.sh stage -pre crsinst -n rac1,rac2 -verbose
    Its output:
    Performing pre-checks for cluster services setup
    Check: User equivalence for user “ora11g”
    Node Comment
    rac1 failed
    rac2 failed
    Result: PRVF-4007 : User equivalence check failed for user “ora11g”
    ERROR:
    User equivalence unavailable on all the specified nodes
    Verification cannot proceed
    Pre-check for cluster services setup was unsuccessful on all the nodes.
    As you see above, check user equivalence failed. I have run the 4 commands to fix this error as below:
    [ora11g@rac1 /]$ ssh-keygen
    Its output:
    Generating public/private rsa key pair.
    Enter file in which to save the key (/home/grid/.ssh/id_rsa):
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in /home/grid/.ssh/id_rsa.
    Your public key has been saved in /home/grid/.ssh/id_rsa.pub.
    The key fingerprint is:
    0c:10:6c:3b:ae:21:63:64:f8:0d:0e:d8:f0:41:32:ff [email protected]
    [ora11g@rac1 .ssh]$ cat *pub >>authorized_keys
    [ora11g@rac1 .ssh]$ ssh rac1
    Its output:
    The authenticity of host ‘rac1 (127.0.0.1)’ can’t be established.
    RSA key fingerprint is 9d:ae:51:7c:72:81:07:37:31:92:f1:c8:90:bc:52:55.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added ‘rac1′ (RSA) to the list of known hosts.
    Write failed: Broken pipe.
    [ora11g@rac1 .ssh]$ ssh rac1-priv
    Its output:
    The authenticity of host ‘rac1-priv (192.168.137.35)’ can’t be established.
    RSA key fingerprint is 9d:ae:51:7c:72:81:07:37:31:92:f1:c8:90:bc:52:55.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added ‘rac1-priv,192.168.137.35′ (RSA) to the list of known hosts.
    Write failed: Broken pipe.
    After run the 4 commands above, I run the command below again:
    [ora11g@rac1 grid]$ ./runcluvfy.sh stage -pre crsinst -n rac1,rac2 -verbose
    Its output is the same:
    PRVF-4007 : User equivalence check failed for user “ora11g”
    ERROR:
    User equivalence unavailable on all the specified nodes
    Verification cannot proceed
    I think the problem is "Broken pipe" and ssh cannot write authorized_keys to the machines.
    My question is:
    Do any folk understand how to solve the issue CUV "check user equivalence failed" for 2 VMs ?
    Thanks.

    Folks,
    Hello. Thanks a lot for replying.
    I have installed Grid Infrastructure a few times. Each time, on step 7 of 9, the installer fixes and checks 2 machines correctly. The entire installation has 3 parts as below:
    1) Install Grid Infrastructure for a Cluster
    2) Execute Root Scripts for Install Grid Infrastructure for a Cluster (script is root.sh)
    3) Configure Oracle Grid Infrastructure for a Cluster that includes NCA, ASMCA, PICA and CVU.
    Each time, on step 8 of 9, the Installer installs Grid Infrastructure for a Cluster successfully that includes "Prepare, Copy files, Link binaries, Setup files and Perform remote operations".
    But when the Installer get to part 3 CVU, it fails and then the Database cannot be installed.
    Deinstall Grid is a very complicated process to do. Because of this reason, we need to run CVU at first to make sure everything is correct for 2 machines before install Grid.
    Even we ignore "user equivalence (ssh)", we don't know whether other items can be passed or not because CVU cannot proceed to check the machines.
    My question is:
    How to have the script "runcluvfy.sh" continue to check the machines while confronting "user equivalence failed" ?

  • How to find the total no of users in a client

    Hi Techie's,
    How to find the total no. of users in the client ? is it possible ?
    i have tried out with the steps by viewing the table USR01,but i can't get the actual solution ?
    solutions rewarded!
    regards,
    S.Rajeshkumar

    Hi rajesh,
    You can use SU10, then click on "Authorization data" -> put * on user -> execute.. you should get a list of all users in the client with details included...
    Also you can list them using USMM and check all licensed users....
    Also SUIM -> users by complex selection criteria -> By user id -> put * on user -> execute.
    Regards
    Juan

  • How to trace the ip address of user session?

    how to trace the ip address of user client session?

    Hi.
    This should help:
    http://www.oracle-base.com/articles/misc/IdentifyingHostNamesAndAddresses.php
    Cheers
    Tim...

  • How to find the List of expired user Ids

    How to find the List of expired user Ids

    Can you please tell me the question in detail.What do u mean by expired users?
    IN a Client or in a System.

  • How to make the shortcut (accelerator) a ContextMenu to be global?

    how to make the shortcut (accelerator) a ContextMenu to be global to the Stage?

    OK, I'm going the applescript route. When I run the script within automator, it works fine. However, when I run the script from a menu as a service, it has no effect at all on iTunes. I must be missing something.
    Here's my script:
    tell application "iTunes"
              if player state is stopped then return
              try
                        set player position to (get player position) + (-5)
              end try
    end tell

  • HT5096 how about copying the backup to a server instead of a hard drive?

    how about copying the backup to a server instead of a hard drive? Doesn't seem to work.

    ISP's cap your upload speed to a fraction of your download so you don't run a server off your computer.
    You can certainly spend more money to upload faster, but it's a waste of money and the data online can vanish or be held or spied upon.
    Then there is a prolem that you want to restore your system and there is slow Internet.
    Apple now requires fresh OS X installs to come from them online, it's better to have local drive to boot from anytime, so a bootable clone is ideal, better than TimeMachine which is only a backup system
    Most commonly used backup methods

  • How to call the portlets in the unstructure User Interface template

    Hi,
    I am creating unstructure user interface template in which i want to add the portlet so how can i do that.The portlet which i want to add is page portlet, dhtml menu portlet and webclipping. pls tell me how can i do that

    i got the clue from the link How do I call database sequence in ODI thanks suthrith.

  • How to change the name of local user

    Apologies for this newbie question.
    I have Mac OS X Server 10.5 running on an iMac. I have set up a local user account on the iMac for a user called "Anna". Anna has since left our organisation, so I would like to change the ownership and login of this local user account to another user, "David". Can anyone advise me how to do this?
    Many thanks,
    Greg

    Sorry, I'm a complete newbie.
    If I go to System Preferences > Accounts and create a new User Name and Password ("David") for the old user account ("Anna"), I can't log in to the account because the Server Account still says "This account is paired with account "Anna" on server "/LDAPv3/127.0.0.1". There is an option to "Unpair" but I'm scared to do this because I don't know the ramifications and I'm worried that I might be locked out of the user account and lose access to the data.
    I really appreciate your help.
    Thanks,
    Greg

  • How to read the "Portlet Title"?

    Hi;
    this is the function taken from the portlets.collobaration.common.c11n.personalSecurityListener.java
    public boolean isEditAvailable()
         /*JOptionPane.showMessageDialog(null, "1",
    "isAvailable-2", JOptionPane.PLAIN_MESSAGE);*/
    return true;
    I want to edit this function in order to decide wether the user in the "entitlet users group" to edit the calendar entry.
    My Assumption : The title of calendar is equal to the group name, and the users (who will edit the calendar entry) added into that group.
    So,
    step-1: I am getting the username. *(THIS IS OK)*
    step-2: Reading the (caller) calendar portlet's title (this is the group name) *(This is the QUESTION)*
    step-3: checking the user is in the group or not?* (THIS IS OK)*
    I can not able to read the current calendar portlet's title. How can I read the calendar portlet's title at step 2?
    Thanks in advance.
    Here is my code...*
    public boolean isEditAvailable()
         /*Step-1: Obtain the username*/
         String userName = Myrequest.getUserPrincipal().getName();
         boolean recurse=true;
         boolean memberUser=false;
         AtnProviderDescription defaultAtnDesc = AtnSecurityMgmtHelper.getDefaultProvider();
         AtnManagerProxy proxy = new AtnManagerProxy(defaultAtnDesc);
    /*Step-2: Find the groupname*/
    string groupName="it should be the current calendar portlet's title which shown on the page"; //????????????????
    /*Step-3: test the user is in this group or not*/
         try {
              memberUser = proxy.isMemberUser(*groupName*, userName, recurse);
         } catch (OperationNotSupportedException e) {
              // TODO Auto-generated catch block
              //e.printStackTrace();
    return memberUser;
    Edited by: user8916149 on 07.Mar.2010 13:49

    This will work by getting the url query string and getting value from one of query parameters. But this is not recommended. Best approach is as mentioned earlier using APIs and Backing Contexts Files. Because in future just incase if WLP Framework implementation changes and if the url has some other different parameters, you may need to modify your code. So best is to use Backing contexts APIs.
    HTH
    Ravi Jegga

Maybe you are looking for

  • Problems displaying an image on Adobe Reader 8.1.2

    Hi guys, We are trying to display a JPG image in an InteractiveForm. So, we set an Image (StaticImage) to be loaded using the following Formcalc script on Page Initialize event: StaticImage1.value.image.href = $record.ImageURL On our last project, we

  • Is there any way to get Session

    Hi All, Is there any way of getting the HttpSession object reference using sessionid? thanks in advance Raghu

  • Planned and actual cost

    hi after doing cat5 the cost must transfer to the ps, in my case the plan/actual% is showing 100% at the activity level, deliberately I enter different time in the time sheet to see the difference in %, but when i enter time difference in wbs level i

  • CIF Queue gettign stuck in 'ready' state

    Hi, I am facing a problem in using CIF functionality while transferrting Master data and transaction data from R/3 to APO. I have selected inbound queue processing for APO system and have also registered the queue in APO. But when I actually CIF any

  • Mac OS X Update 10.4.11 ruined Safari

    I applied the 10.4.11 update and now my Safari doesn't work. It will open and RSS feeds still count new entries, but it will not load anything. The Bookmarks page won't open, the bookmarks bar is still there, but none of the bookmarks will load. No t