Package org.eurekastreams.server.action.request

Examples of org.eurekastreams.server.action.request.PersonLookupRequest


            public void onClick(final ClickEvent inArg0)
            {
                String searchText = view.getLastName().getText();
                if (!searchText.isEmpty())
                {
                    model.fetch(new PersonLookupRequest(searchText, MAX_RESULTS + 1), true);
                }
            }
        });

        // user pressed a key
        view.getLastName().addKeyUpHandler(new KeyUpHandler()
        {
            public void onKeyUp(final KeyUpEvent ev)
            {
                String searchText = view.getLastName().getText();
                boolean anyText = !searchText.isEmpty();
                if (anyText && ev.getNativeKeyCode() == KeyCodes.KEY_ENTER && !ev.isAnyModifierKeyDown())
                {
                    model.fetch(new PersonLookupRequest(searchText, MAX_RESULTS + 1), true);
                }
            }
        });

        // user selected a person in the list
View Full Code Here


                }
            }, inUseClientCacheIfAvailable);
        }
        else
        {
            super.callReadAction("personLookupOrg", new PersonLookupRequest(criterion, MAX_RESULTS),
                    new OnSuccessCommand<ArrayList<PersonModelView>>()
                    {
                        public void onSuccess(final ArrayList<PersonModelView> people)
                        {
                            sendSuccessEvent(inRequest.getMembershipCriteria(), !people.isEmpty());
View Full Code Here

    @Override
    public Serializable execute(final ActionContext inActionContext) throws ExecutionException
    {
        // get the people
        PersonLookupRequest params = (PersonLookupRequest) inActionContext.getParams();

        // convert to DTOs
        ArrayList<PersonModelView> people = new ArrayList<PersonModelView>();
        for (Person person : lookupStrategy.getPeople(params.getQueryString(), params.getMaxResults()))
        {
            people.add(person.toPersonModelView());
        }
        return people;
    }
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.action.request.PersonLookupRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.