Author: jleroux
Date: Thu Jul 19 04:46:06 2007 New Revision: 557583 URL: http://svn.apache.org/viewvc?view=rev&rev=557583 Log: Applied fix from trunk for revision: 557582 Modified: ofbiz/branches/release4.0/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Modified: ofbiz/branches/release4.0/framework/widget/src/org/ofbiz/widget/form/ModelForm.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?view=diff&rev=557583&r1=557582&r2=557583 ============================================================================== --- ofbiz/branches/release4.0/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original) +++ ofbiz/branches/release4.0/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Thu Jul 19 04:46:06 2007 @@ -88,12 +88,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; @@ -153,15 +152,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; @@ -370,20 +364,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")); @@ -1894,14 +1885,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)) { @@ -1918,32 +1901,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) { @@ -2012,8 +1975,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 |