Author: jleroux
Date: Thu Jul 19 04:43:34 2007 New Revision: 557582 URL: http://svn.apache.org/viewvc?view=rev&rev=557582 Log: Reverted from 557554 to 553237 and reapplied the patch from https://issues.apache.org/jira/browse/OFBIZ-1152 Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?view=diff&rev=557582&r1=557581&r2=557582 ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Thu Jul 19 04:43:34 2007 @@ -92,12 +92,11 @@ protected FlexibleStringExpander paginateIndexField; protected FlexibleStringExpander paginateSizeField; protected FlexibleStringExpander overrideListSize; - protected FlexibleStringExpander paginateFirstLabel; protected FlexibleStringExpander paginatePreviousLabel; protected FlexibleStringExpander paginateNextLabel; - protected FlexibleStringExpander paginateLastLabel; protected String paginateTargetAnchor; - protected String paginateStyle; + protected String paginatePreviousStyle; + protected String paginateNextStyle; protected boolean separateColumns = false; protected boolean paginate = true; protected boolean useRowSubmit = false; @@ -157,15 +156,10 @@ protected int defaultViewSize = DEFAULT_PAGE_SIZE; public static String DEFAULT_PAG_INDEX_FIELD = "viewIndex"; public static String DEFAULT_PAG_SIZE_FIELD = "viewSize"; - public static String DEFAULT_PAG_FIRST_LABEL = "First"; public static String DEFAULT_PAG_PREV_LABEL = "Previous"; public static String DEFAULT_PAG_NEXT_LABEL = "Next"; - public static String DEFAULT_PAG_LAST_LABEL = "Last"; - public static String DEFAULT_PAG_STYLE = "nav-pager"; - public static String DEFAULT_PAG_FIRST_STYLE = "nav-first"; - public static String DEFAULT_PAG_PREV_STYLE = "nav-previous"; - public static String DEFAULT_PAG_NEXT_STYLE = "nav-next"; - public static String DEFAULT_PAG_LAST_STYLE = "nav-last"; + public static String DEFAULT_PAG_PREV_STYLE = "buttontext"; + public static String DEFAULT_PAG_NEXT_STYLE = "buttontext"; protected List actions; protected List rowActions; @@ -379,20 +373,17 @@ if (this.overrideListSize == null || formElement.hasAttribute("override-list-size")) { this.overrideListSize = new FlexibleStringExpander(formElement.getAttribute("override-list-size")); } - if (this.paginateFirstLabel == null || formElement.hasAttribute("paginate-first-label")) { - this.paginateFirstLabel = new FlexibleStringExpander(formElement.getAttribute("paginate-first-label")); - } if (this.paginatePreviousLabel == null || formElement.hasAttribute("paginate-previous-label")) { this.paginatePreviousLabel = new FlexibleStringExpander(formElement.getAttribute("paginate-previous-label")); } if (this.paginateNextLabel == null || formElement.hasAttribute("paginate-next-label")) { this.paginateNextLabel = new FlexibleStringExpander(formElement.getAttribute("paginate-next-label")); } - if (this.paginateLastLabel == null || formElement.hasAttribute("paginate-last-label")) { - this.paginateLastLabel = new FlexibleStringExpander(formElement.getAttribute("paginate-last-label")); + if (this.paginatePreviousStyle == null || formElement.hasAttribute("paginate-previous-style")) { + setPaginatePreviousStyle(formElement.getAttribute("paginate-previous-style")); } - if (this.paginateStyle == null || formElement.hasAttribute("paginate-style")) { - setPaginateStyle(formElement.getAttribute("paginate-style")); + if (this.paginateNextStyle == null || formElement.hasAttribute("paginate-next-style")) { + setPaginateNextStyle(formElement.getAttribute("paginate-next-style")); } this.paginate = "true".equals(formElement.getAttribute("paginate")); @@ -2110,14 +2101,6 @@ return viewSize; } - public String getPaginateFirstLabel(Map context) { - String field = this.paginateFirstLabel.expandString(context); - if (UtilValidate.isEmpty(field)) { - field = DEFAULT_PAG_FIRST_LABEL; - } - return field; - } - public String getPaginatePreviousLabel(Map context) { String field = this.paginatePreviousLabel.expandString(context); if (UtilValidate.isEmpty(field)) { @@ -2134,32 +2117,12 @@ return field; } - public String getPaginateLastLabel(Map context) { - String field = this.paginateLastLabel.expandString(context); - if (UtilValidate.isEmpty(field)) { - field = DEFAULT_PAG_LAST_LABEL; - } - return field; - } - - public String getPaginateStyle() { - return this.paginateStyle; - } - - public String getPaginateFirstStyle() { - return DEFAULT_PAG_FIRST_STYLE; - } - public String getPaginatePreviousStyle() { - return DEFAULT_PAG_PREV_STYLE; + return this.paginatePreviousStyle; } public String getPaginateNextStyle() { - return DEFAULT_PAG_NEXT_STYLE; - } - - public String getPaginateLastStyle() { - return DEFAULT_PAG_LAST_STYLE; + return this.paginateNextStyle; } public String getTargetWindow(Map context) { @@ -2228,8 +2191,12 @@ this.paginateSizeField = new FlexibleStringExpander(string); } - public void setPaginateStyle(String string) { - this.paginateStyle = (UtilValidate.isEmpty(string) ? DEFAULT_PAG_STYLE : string); + public void setPaginatePreviousStyle(String string) { + this.paginatePreviousStyle = (UtilValidate.isEmpty(string) ? DEFAULT_PAG_PREV_STYLE : string); + } + + public void setPaginateNextStyle(String string) { + this.paginateNextStyle = (UtilValidate.isEmpty(string) ? DEFAULT_PAG_NEXT_STYLE : string); } public void setDefaultViewSize(int val) { |
Free forum by Nabble | Edit this page |