ERXDisplayGroup ---> ERXBatchingDisplayGroup
ERXDisplayGroup ---> ERXBatchingDisplayGroup
- Subject: ERXDisplayGroup ---> ERXBatchingDisplayGroup
- From: Ron X <email@hidden>
- Date: Tue, 13 Mar 2012 15:37:53 +0300
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