but the default pagination looks really bad, in the screenlet it looks
much better. Is it perhaps possible to make the default pagination
better designed and move it to to right so it will be next to the
heading and just under the screenlet border?

On Thu, 2008-12-25 at 20:29 +0100, Bruno Busco wrote:
> Now we have another good reason:
> pagination does not work well if used in the title.
> 
> 2008/12/25 Bruno Busco <bruno.bu...@gmail.com>:
> > Thank you Adrian for having reminded us of the UI Discussion we had.
> > It seems there were no objecton at that time to remove everything but
> > title,collapse and help link from the title bar.
> > Shall we proceed?
> > -Bruno
> >
> > 2008/12/25 Adrian Crum <adrian.c...@yahoo.com>:
> >> I was the author of that feature, and I have expressed previously that I 
> >> regret adding it 
> >> (http://www.nabble.com/Discussion%3A-More-UI-Layout-Best-Practices-td18327599.html).
> >>  It would be fine with me if it was removed.
> >>
> >> -Adrian
> >>
> >>
> >> --- On Thu, 12/25/08, Bruno Busco <bruno.bu...@gmail.com> wrote:
> >>
> >>> From: Bruno Busco <bruno.bu...@gmail.com>
> >>> Subject: Re: svn commit: r729402 - in 
> >>> /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: ModelWidget.java 
> >>> html/HtmlScreenRenderer.java
> >>> To: dev@ofbiz.apache.org
> >>> Date: Thursday, December 25, 2008, 12:44 AM
> >>> Jacques,
> >>> I was wondering too if we should keep the screenlet
> >>> navigation-form-name attribute.
> >>> Pagination should be available to the user always in the
> >>> same way in
> >>> order to have a consistent UI.
> >>> -Bruno
> >>>
> >>> 2008/12/25  <jler...@apache.org>:
> >>> > Author: jleroux
> >>> > Date: Thu Dec 25 00:30:30 2008
> >>> > New Revision: 729402
> >>> >
> >>> > URL:
> >>> http://svn.apache.org/viewvc?rev=729402&view=rev
> >>> > Log:
> >>> > Fix an issue introduced in  r725053. This commit
> >>> managed  "multi-pagination in a page" see
> >>> https://issues.apache.org/jira/browse/OFBIZ-1935
> >>> > This is a quick fix. I wonder if we should keep the
> >>> screenlet navigation-form-name attribute (at least as is).
> >>> This for 2 reasons:
> >>> > . Less informations/features than with default (pages
> >>> numbers, ability to jump to any page)
> >>> > . The last button does not always work (try with
> >>> widget.form.defaultViewSize=2 when listing invoices)
> >>> >
> >>> > On the other hand it's cool to have all
> >>> informations in the screenlet. But then we should extend it
> >>> to work for the 2 points above
> >>> >
> >>> > Modified:
> >>> >
> >>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidget.java
> >>> >
> >>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java
> >>> >
> >>> > Modified:
> >>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidget.java
> >>> > URL:
> >>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidget.java?rev=729402&r1=729401&r2=729402&view=diff
> >>> >
> >>> ==============================================================================
> >>> > ---
> >>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidget.java
> >>> (original)
> >>> > +++
> >>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidget.java
> >>> Thu Dec 25 00:30:30 2008
> >>> > @@ -23,6 +23,7 @@
> >>> >  import org.w3c.dom.Element;
> >>> >  import org.ofbiz.base.util.UtilGenerics;
> >>> >  import org.ofbiz.base.util.UtilProperties;
> >>> > +import org.ofbiz.base.util.UtilValidate;
> >>> >
> >>> >  /**
> >>> >  * Widget Library - Widget model class. ModelWidget is
> >>> a base class that is
> >>> > @@ -130,8 +131,13 @@
> >>> >     public void
> >>> incrementPaginatorNumber(Map<String, Object> context)
> >>> {
> >>> >         Map<String, Object> globalCtx =
> >>> UtilGenerics.checkMap(context.get("globalContext"));
> >>> >         if (globalCtx != null) {
> >>> > -            Integer paginateNumberInt =
> >>> Integer.valueOf(getPaginatorNumber(context) + 1);
> >>> > -
> >>> globalCtx.put("PAGINATOR_NUMBER",
> >>> paginateNumberInt);
> >>> > +            Boolean NO_PAGINATOR = (Boolean)
> >>> globalCtx.get("NO_PAGINATOR");
> >>> > +            if
> >>> (UtilValidate.isNotEmpty(NO_PAGINATOR)) {
> >>> > +
> >>> globalCtx.remove("NO_PAGINATOR");
> >>> > +            } else {
> >>> > +                Integer paginateNumberInt =
> >>> Integer.valueOf(getPaginatorNumber(context) + 1);
> >>> > +
> >>> globalCtx.put("PAGINATOR_NUMBER",
> >>> paginateNumberInt);
> >>> > +            }
> >>> >         }
> >>> >     }
> >>> >
> >>> >
> >>> > Modified:
> >>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java
> >>> > URL:
> >>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java?rev=729402&r1=729401&r2=729402&view=diff
> >>> >
> >>> ==============================================================================
> >>> > ---
> >>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java
> >>> (original)
> >>> > +++
> >>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java
> >>> Thu Dec 25 00:30:30 2008
> >>> > @@ -246,7 +246,7 @@
> >>> >         }
> >>> >
> >>> >         // get the parametrized pagination index and
> >>> size fields
> >>> > -        int paginatoNumber =
> >>> modelForm.getPaginatorNumber(context);
> >>> > +        int paginatorNumber =
> >>> modelForm.getPaginatorNumber(context);
> >>> >         String viewIndexParam =
> >>> modelForm.getPaginateIndexField(context);
> >>> >         String viewSizeParam =
> >>> modelForm.getPaginateSizeField(context);
> >>> >
> >>> > @@ -272,8 +272,8 @@
> >>> >         }
> >>> >
> >>> >         // for legacy support, the viewSizeParam is
> >>> VIEW_SIZE and viewIndexParam is VIEW_INDEX when the fields
> >>> are "viewSize" and "viewIndex"
> >>> > -        if
> >>> (viewIndexParam.equals("viewIndex" + "_"
> >>> + paginatoNumber)) viewIndexParam = "VIEW_INDEX" +
> >>> "_" + paginatoNumber;
> >>> > -        if (viewSizeParam.equals("viewSize"
> >>> + "_" + paginatoNumber)) viewSizeParam =
> >>> "VIEW_SIZE" + "_" + paginatoNumber;
> >>> > +        if
> >>> (viewIndexParam.equals("viewIndex" + "_"
> >>> + paginatorNumber)) viewIndexParam = "VIEW_INDEX"
> >>> + "_" + paginatorNumber;
> >>> > +        if (viewSizeParam.equals("viewSize"
> >>> + "_" + paginatorNumber)) viewSizeParam =
> >>> "VIEW_SIZE" + "_" + paginatorNumber;
> >>> >
> >>> >         ServletContext ctx = (ServletContext)
> >>> request.getAttribute("servletContext");
> >>> >         RequestHandler rh = (RequestHandler)
> >>> ctx.getAttribute("_REQUEST_HANDLER_");
> >>> > @@ -285,7 +285,7 @@
> >>> >         }
> >>> >         String queryString =
> >>> UtilHttp.urlEncodeArgs(inputFields);
> >>> >         // strip legacy viewIndex/viewSize params from
> >>> the query string
> >>> > -        queryString =
> >>> UtilHttp.stripViewParamsFromQueryString(queryString,
> >>> "" + paginatoNumber);
> >>> > +        queryString =
> >>> UtilHttp.stripViewParamsFromQueryString(queryString,
> >>> "" + paginatorNumber);
> >>> >         // strip parametrized index/size params from
> >>> the query string
> >>> >         HashSet<String> paramNames = new
> >>> HashSet<String>();
> >>> >         paramNames.add(viewIndexParam);
> >>> > @@ -382,6 +382,8 @@
> >>> >             HttpServletRequest request =
> >>> (HttpServletRequest) context.get("request");
> >>> >             HttpServletResponse response =
> >>> (HttpServletResponse) context.get("response");
> >>> >             if (request != null && response !=
> >>> null) {
> >>> > +                Map<String, Object> globalCtx =
> >>> UtilGenerics.checkMap(context.get("globalContext"));
> >>> > +
> >>> globalCtx.put("NO_PAGINATOR", true);
> >>> >                 FormStringRenderer savedRenderer =
> >>> (FormStringRenderer)
> >>> context.get("formStringRenderer");
> >>> >                 HtmlFormRenderer renderer = new
> >>> HtmlFormRenderer(request, response);
> >>> >                 renderer.setRenderPagination(false);
> >>> >
> >>> >
> >>> >
> >>
> >>
> >>
> >>
> >
-- 
Antwebsystems.com: Quality OFBiz services for competitive prices

Reply via email to