Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6777319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:08:00+00:00 2026-05-26T16:08:00+00:00

Is it possible to use generics in Request methods? Or if not how to

  • 0

Is it possible to use generics in Request methods? Or if not how to workaround this problem?

Lets say that I would like to implement pagination. So in my request interface I’ve got such method:

public List<UserProxy> getUserList(int offset, int limit);

but the list returns only limited data. For pagination implementation I need also total elements. In RPC style I would use Result object:

public MyResultObject<User> getUserList(int offset, int limit)

where in MyResultObject I would store List and totalCount as property. Unfortunately in RF I’m not able to that. Also in GWT-RPC I could use command pattern and retrive list from one method and totalcount from another one in a single request.

How to get totalcount with element list in the same time?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:08:01+00:00Added an answer on May 26, 2026 at 4:08 pm

    You can have a MyResultObjectProxy (admittedly specialized for the UserProxy), or you can make your two requests (list and total count) in the same HTTP batch request:

    MyContext ctx = factory.context();
    ctx.getUserList(offset, limit).to(new Receiver<List<UserProxy>>() { … });
    ctx.getUserTotalCount().to(new Receiver<Integer>() { … });
    ctx.fire();
    

    Since GWT 2.4, RF supports polymorphism, so maybe you could use a MyResultObjectProxy that’s not specialized to a specific EntityProxy (or Value Proxy), though I’m really not sure it’d actually work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible use mod_rewrite to resolve addresses hosted on another server? Say I
Is it possible to use Generics when passing a class to a java function?
Possible Duplicate: What is cool about generics, why use them? DUPLICATE: What is cool
Possible Duplicate: What are the reasons why Map.get(Object key) is not (fully) generic This
Not sure if this is possible or if I'm expressing correctly what I'm looking
I can create classes that use generics , however I was wondering if it
I have a base class, with a method, where I would like to use
Possible Duplicate: Why don't Generics support primitive types? Why we cannot use double as
Possible Duplicate: Use of .apply() with 'new' operator. Is this possible? I have 5
I am trying to determine if it is possible to use Generics in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.