• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ERXDisplayGroup ---> ERXBatchingDisplayGroup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERXDisplayGroup ---> ERXBatchingDisplayGroup


  • Subject: Re: ERXDisplayGroup ---> ERXBatchingDisplayGroup
  • From: Ron X <email@hidden>
  • Date: Fri, 16 Mar 2012 15:08:06 +0300

but how can i connect this component with datasource?

2012/3/13 Pascal Robert <email@hidden>
Use ERXDirectActionBatchNavigationBar

<wo:ERXDirectActionBatchNavigationBar
       actionName = "organizations"
       containerCssClass = "paginator"
       batchSize = "$dgOrganizations.batchCount"
       currentBatchIndex = "$dgOrganizations.currentBatchIndex"
       showPageNumbers = true
       numberOfObjects = "$dgOrganizations.allObjects.@count"
/>

Please note that it will use Direct Actions, so it won't work with REST routes. I'm planning to do a similar component for REST because I need it for wocommunity.org, but I won't work on this before end of this month.

> sorry, maybe i explain bad.
>
> "so the workflow is so" - that is how it works NOW.
> but i want to fetching objects at every click of the page and do not changing the url (or have control of changing).
>
> 2012/3/13 Pascal Robert <email@hidden>
>    EODatabaseDataSource dataSource = new EODatabaseDataSource(editingContext(), Category.ENTITY_NAME);
>    er.extensions.batching.ERXBatchingDisplayGroup dg = new ERXBatchingDisplayGroup<Category>();
>    dg.setNumberOfObjectsPerBatch(20);
>    dg.setDataSource(dataSource);
>    dg.setObjectArray(Category.fetchAllCategories(editingContext()));
>
> > hi everybody.
> > i have some legasy code.
> > in this code used ERXDisplayGroup:
> >
> > //code:
> > import com.webobjects.appserver.WOContext;
> > import com.webobjects.appserver.WODisplayGroup;
> > import com.webobjects.directtoweb.ERD2WUtilities;
> >
> > import er.directtoweb.pages.ERD2WListPage;
> > import er.extensions.batching.ERXBatchingDisplayGroup;
> > import er.extensions.batching.ERXFlickrBatchNavigation;
> >
> > public class BatchNavigationBar extends ERXFlickrBatchNavigation {
> >     public BatchNavigationBar(WOContext context) {
> >         super(context);
> >     }
> >
> >     private ERD2WListPage listPage() {
> >         return (ERD2WListPage) ERD2WUtilities.enclosingPageOfClass(this, ERD2WListPage.class);
> >     }
> >
> >     @Override
> >     public WODisplayGroup displayGroup() {
> >         return listPage().displayGroup();
> >     }
> >
> >     public void setCurrentBatchIndex(Integer batchIndex) {
> >         displayGroup().setCurrentBatchIndex(batchIndex);
> >     }
> > }
> > //end code
> >
> > so the workflow is so:
> >
> > 1. fetching ALL object of query in array.
> > 2. and than give me a portion (size if batch) when i am clicking next/prev pages in this component.
> > 3. but NO work with database per batch - it works with array
> > 4. when i click next/prev - it adds to the urls of pagination some like this - 1.2.3.1.5.6.7 etc :-) and this brakes my statistics with SEO links.
> >
> > so i want to avoid this. and i want to use ERXBatchingDisplayGroup instead of WODisplayGroup (ERXDisplayGroup).
> > Simple casting not works - falls with cast exception.
> > the problem in that listPage().displayGroup() - has type WODisplayGroup.
> >
> > how can i use in this code ERXBatchingDisplayGroup?
> >
> > _______________________________________________
> > Do not post admin requests to the list. They will be ignored.
> > Webobjects-dev mailing list      (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
> > This email sent to email@hidden
>
>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: ERXDisplayGroup ---> ERXBatchingDisplayGroup
      • From: Pascal Robert <email@hidden>
References: 
 >ERXDisplayGroup ---> ERXBatchingDisplayGroup (From: Ron X <email@hidden>)
 >Re: ERXDisplayGroup ---> ERXBatchingDisplayGroup (From: Pascal Robert <email@hidden>)
 >Re: ERXDisplayGroup ---> ERXBatchingDisplayGroup (From: Ron X <email@hidden>)
 >Re: ERXDisplayGroup ---> ERXBatchingDisplayGroup (From: Pascal Robert <email@hidden>)

  • Prev by Date: Re: Ajax Framework vs. Ajax Maven
  • Next by Date: Re: ERXDisplayGroup ---> ERXBatchingDisplayGroup
  • Previous by thread: Re: ERXDisplayGroup ---> ERXBatchingDisplayGroup
  • Next by thread: Re: ERXDisplayGroup ---> ERXBatchingDisplayGroup
  • Index(es):
    • Date
    • Thread