cancel
Showing results for 
Search instead for 
Did you mean: 

User Selection under Permissions

Former Member
0 Kudos

I'm uploading a set of documents programatically to a folder (an instance of ICollection). I need to set the permissions to the folder. But before I could set the permissions, I want the user to select a bunch of users using the "User Selection Search" User interface. Can it be done? If so, what is the iView that I could call from my JSP? And how can I retrieve the selected users?

Any help is appreciated,

Thanx,

Mahesh

Accepted Solutions (0)

Answers (1)

Answers (1)

detlev_beutner
Active Contributor
0 Kudos

Hi Mahesh,

just use <i>com.sap.ip.collaboration.coreui.api.people.composite.PeoplePicker</i> as a HTMLB component. You can define the selection mode (single/multiple), for instance:

peoplePicker.setPeopleSelectionMode(PeopleSelectionMode.SINGLE_SELECTION_INPUT_FIELD);

the kind of principals to search for on an include/exclude basis:

peoplePicker.setSearchFor(UMEPrincipalType.USER, true);

After the user has chosen some users, they are listed in the input field and to be read from your component as usual, for instance (the parameter is the ID as usual):

PeoplePicker peoplePickerINPUT = (PeoplePicker)dynPage.getComponentByName("_peoplePickerSingleSelection" + CLASSNAME);

Hope it helps

Detlev

PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance!

Former Member
0 Kudos

I don't think I can call a HTMLB component from a JSP. Can I? Also I'm using Portal Component to read the data. Do I have access to the "Selected List" of users?

detlev_beutner
Active Contributor
0 Kudos

Hi Mahesh,

> I can call a HTMLB component from a JSP. Can I?

Of course you can add a component programatically into a JSP without using HTMLB tags, simple example:

<%@ taglib uri="tagLib" prefix="hbj" %>
<hbj:content id = "content">
  <hbj:page>
    <hbj:form id = "abc">
      <% abc.addComponent(new com.sapportals.htmlb.InputField("def")); %>
    </hbj:form>
  </hbj:page>
</hbj:content>

> I'm using Portal Component to read the data.

> Do I have access to the "Selected List" of users?

If you're using a JSP, you're using a JSPDynPage (created via PageProcessorComponent) to read the data, aren't you?!

In this case you can call <i>getComponentByName</i> directly within your event handler method.

Hope it helps

Detlev

detlev_beutner
Active Contributor
0 Kudos

Hi Mahesh,

have the answers been of any value for you?! If yes - I would appreciate it if you would appreciate my time which I've invested to help you - and consider rewarding some points?!

Thanks in advance

Detlev