Skip to Content
author's profile photo Former Member
Former Member

UME search for users code problem

Hello All ,

i am trying to develop an iview that contains a textbox that get a part of a userName or User display name and search using UME api`s i wrote the following code:

public void onSubmit (Event event)throws UMException


IPortalComponentResponse response = (IPortalComponentResponse)this.getResponse();

IPortalComponentRequest request = (IPortalComponentRequest)this.getRequest();

IUserFactory userFactory = UMFactory.getUserFactory();

IUserSearchFilter sf =userFactory.getUserSearchFilter();


ISearchResult sr = userFactory.searchUsers(sf);

if (sr != null) {

String uniqueId = (String);

IUser user = userFactory.getMutableUser(uniqueId);

int i = sr.size();

Vector users = new Vector();

IUserFactory userFact = UMFactory.getUserFactory();

while (i>=0) {

IUser usr = null;

usr = userFact.getUser("diana");






but i get stuck when i am trying to iterate thro the result set can any one enlighten my eyes of what i am doing wrong or about the right way to approach the Problem



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Dec 15, 2004 at 02:04 PM

    Hi Ronen,

    first, to make code more readable, please use [ code ] and [/ code ] (without the spaces) to format pure code.

    ISearchResult is to be used like every other Iterator, so:

    ISearchResult sr = userFactory.searchUsers(sf);
    ArrayList users = new ArrayList(); /* instead of Vector! */
    while (sr.hasNext()) {
      String uniqueId = (String); /* if this is the case, I don't know */
      IUser user = userFactory.getMutableUser(uniqueId);

    Hope it helps


    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Ronen,

      (a) what kind of error do you get?

      (b) at which line?

      (c) are you sure that returns a String? (I just copied this from yours.) If not, test this: System.out.println("ClassTest: " +;

      (d) If it returns a String, is this really the uniqueID?

      One of these should help you...

      Best regards


Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.