Monday, July 9, 2007

Increasing ViewSize in EntityEngine

10 records at a time when viewing an entity-view? Why and how can I change this?

Of course, you can change it in the address bar. Just change the settings for VIEW_SIZE and VIEW_INDEX to navigate around your entity:


or, to change the default behavior, I did a search on VIEW_SIZE in *.xml in the ofbiz workspace and I found nothing. A search for VIEW_SIZE in *.* led me to findGeneric.bsh, where I found the code:

String viewSizeString = (String)request.getParameter("VIEW_SIZE");
if (viewSizeString == null || viewSizeString.length() == 0) {
viewSizeString = "10";

and changed the "10" to "50" and now my view entities give me a nice fat 50 rows per page. Of course, this will be blown away next time I update ofbiz, so it may be easier to just edit the address bar.