Ticket #1031 (closed issue: fixed)

Opened 15 months ago

Last modified 14 months ago

Select in lazyloading mode should not use getItemIds()

Reported by: Artur Signell Owned by: Jani Laakso
Priority: blocker Milestone: 4.0.4-rc4
Component: Server-side framework Version: 4.0.3
Keywords: Cc:
Known Issue description:
Hours estimate: 1 Deadline (dd.mm.yyyy):
Known Issue version (since): Known Issue title:
Hours done: Depends to:
Affects documentation: no
Known Issue workaround:
Affects release notes: yes Contract:

Description

Current paint method for lazyloading select uses getItemIds()

                target.addAttribute("total",
                        (getItemIds() != null) ? getItemIds().size() : 0);

It should use container.size() instead of getItemIds().size(). A server-side lazy container does not want to return ALL itemids in the container but should be aware of how many items it contains:

	    	target.addAttribute("total",
                        (items != null) ? items.size() : 0);

It is currently impossible to implement a server-side lazy loading select by extending select (paint method cannot be overriden since optionsStream and lazyLoadingPageLength are private).

Change History

Changed 15 months ago by Artur Signell

Please fix ASAP so extra classes can be removed from -removed-

Changed 15 months ago by Jani Laakso

  • status changed from new to assigned
  • hours_left changed from 0 to 1
  • version set to 4.0.3
  • milestone set to 4.0.4

So you got two separate issues here, one is of "total" attribute and another of method visibility. Artur, show me your use case asap so we can see if API should be opened more on Select.

Changed 15 months ago by Jani Laakso

  • type changed from defect to issue

Changed 14 months ago by Jani Laakso

Fixed in [2774].

Changed 14 months ago by Jani Laakso

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.