Source Code Cross Referenced for Field.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » core » web » ui » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » Kuali Financial System » org.kuali.core.web.ui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         * Copyright 2007 The Kuali Foundation.
0003:         * 
0004:         * Licensed under the Educational Community License, Version 1.0 (the "License");
0005:         * you may not use this file except in compliance with the License.
0006:         * You may obtain a copy of the License at
0007:         * 
0008:         * http://www.opensource.org/licenses/ecl1.php
0009:         * 
0010:         * Unless required by applicable law or agreed to in writing, software
0011:         * distributed under the License is distributed on an "AS IS" BASIS,
0012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013:         * See the License for the specific language governing permissions and
0014:         * limitations under the License.
0015:         */
0016:        package org.kuali.core.web.ui;
0017:
0018:        import java.sql.Date;
0019:        import java.util.Iterator;
0020:        import java.util.List;
0021:        import java.util.Map;
0022:
0023:        import org.apache.commons.lang.StringUtils;
0024:        import org.kuali.RiceConstants;
0025:        import org.kuali.core.datadictionary.mask.Mask;
0026:        import org.kuali.core.web.format.BooleanFormatter;
0027:        import org.kuali.core.web.format.DateFormatter;
0028:        import org.kuali.core.web.format.Formatter;
0029:
0030:        /**
0031:         * This class represents a field render on the ui.
0032:         */
0033:        public class Field implements  java.io.Serializable {
0034:            private static final long serialVersionUID = 6549897986355019202L;
0035:            public static final int DEFAULT_MAXLENGTH = 30;
0036:            public static final int DEFAULT_SIZE = 30;
0037:
0038:            public static final String CHECKBOX = "checkbox";
0039:            public static final String DROPDOWN = "dropdown";
0040:            public static final String DROPDOWN_REFRESH = "dropdown_refresh";
0041:            public static final String DROPDOWN_SCRIPT = "dropdown_script";
0042:            public static final String DROPDOWN_APC = "dropdown_apc";
0043:            public static final String HIDDEN = "hidden";
0044:            public static final String LOOKUP_RESULT_ONLY = "lookupresultonly";
0045:            public static final String QUICKFINDER = "quickFinder";
0046:            public static final String RADIO = "radio";
0047:            public static final String TEXT = "text";
0048:            public static final String CURRENCY = "currency";
0049:            public static final String TEXT_AREA = "textarea";
0050:            public static final String IMAGE_SUBMIT = "imagesubmit";
0051:            public static final String CONTAINER = "container";
0052:            public static final String KUALIUSER = "kualiuser";
0053:            public static final String READONLY = "readOnly";
0054:            public static final String EDITABLE = "editable";
0055:            public static final String LOOKUP_HIDDEN = "lookuphidden";
0056:            public static final String LOOKUP_READONLY = "lookupreadonly";
0057:            public static final String WORKFLOW_WORKGROUP = "workflowworkgroup";
0058:
0059:            public static final String SUB_SECTION_SEPARATOR = "subSectionSeparator";
0060:            public static final String BLANK_SPACE = "blankSpace";
0061:
0062:            /**
0063:             * Helper method to determine if this is an INPUT type field
0064:             * 
0065:             * @param fieldType
0066:             */
0067:            public static boolean isInputField(String fieldType) {
0068:                if (StringUtils.isBlank(fieldType)) {
0069:                    return false;
0070:                }
0071:                if (fieldType.equals(Field.DROPDOWN)
0072:                        || fieldType.equals(Field.DROPDOWN_REFRESH)
0073:                        || fieldType.equals(Field.TEXT)
0074:                        || fieldType.equals(Field.RADIO)
0075:                        || fieldType.equals(Field.CURRENCY)
0076:                        || fieldType.equals(Field.KUALIUSER)
0077:                        || fieldType.equals(Field.DROPDOWN_SCRIPT)
0078:                        || fieldType.equals(Field.DROPDOWN_APC)) {
0079:                    return true;
0080:                } else {
0081:                    return false;
0082:                }
0083:
0084:            }
0085:
0086:            private boolean clear;
0087:            private boolean dateField;
0088:            private String fieldConversions;
0089:            private String fieldHelpUrl;
0090:            private String fieldLabel;
0091:            private boolean fieldRequired;
0092:            private String fieldType;
0093:            private List fieldValidValues;
0094:            private Formatter formatter;
0095:            private boolean highlightField;
0096:            private boolean isReadOnly;
0097:            private String lookupParameters;
0098:            private int maxLength;
0099:            private String propertyName;
0100:            private String propertyValue;
0101:            private String inquiryURL;
0102:            private String propertyPrefix;
0103:            private String quickFinderClassNameImpl;
0104:            private int size;
0105:            private boolean upperCase;
0106:            private int rows;
0107:            private int cols;
0108:            private List<Row> containerRows;
0109:            private String fieldHelpSummary;
0110:            private String businessObjectClassName;
0111:            private String fieldHelpName;
0112:            private String script;
0113:            private String universalIdAttributeName;
0114:            private String userIdAttributeName;
0115:            private String personNameAttributeName;
0116:            private String defaultValue = RiceConstants.EMPTY_STRING;
0117:            private boolean keyField;
0118:            private String displayEditMode;
0119:            private Mask displayMask;
0120:            private String displayMaskValue;
0121:            private String encryptedValue;
0122:            private boolean secure;
0123:            private String webOnBlurHandler;
0124:            private String webOnBlurHandlerCallback;
0125:            private String styleClass;
0126:            private int formattedMaxLength;
0127:            private String containerName;
0128:            private String containerElementName;
0129:            private List<Field> containerDisplayFields;
0130:            private boolean isDatePicker;
0131:            private String referencesToRefresh;
0132:            private int numberOfColumnsForCollection;
0133:            public String cellAlign;
0134:
0135:            public boolean fieldLevelHelpEnabled;
0136:
0137:            public boolean fieldLevelHelpDisabled;
0138:
0139:            /**
0140:             * For container fields (i.e. fieldType.equals(CONTAINER)) with MV lookups enabled, the DD defined objectLabel of the class on which a multiple value lookup is performed.
0141:             * The user friendly name
0142:             */
0143:            private String multipleValueLookupClassLabel;
0144:            /**
0145:             * For container fields (i.e. fieldType.equals(CONTAINER)) with MV lookups enabled, this is the class to perform a lookup upon
0146:             */
0147:            private String multipleValueLookupClassName;
0148:            /**
0149:             * For container fields (i.e. fieldType.equals(CONTAINER)) with MV lookups enabled, this is the name of the collection on the doc on which the
0150:             * MV lookup is performed
0151:             */
0152:            private String multipleValueLookedUpCollectionName;
0153:
0154:            public String getInquiryURL() {
0155:                return inquiryURL;
0156:            }
0157:
0158:            public void setInquiryURL(String propertyURL) {
0159:                this .inquiryURL = propertyURL;
0160:            }
0161:
0162:            public int getNumberOfColumnsForCollection() {
0163:                return numberOfColumnsForCollection;
0164:            }
0165:
0166:            public void setNumberOfColumnsForCollection(
0167:                    int numberOfColumnsForCollection) {
0168:                this .numberOfColumnsForCollection = numberOfColumnsForCollection;
0169:            }
0170:
0171:            public boolean isDatePicker() {
0172:                return isDatePicker;
0173:            }
0174:
0175:            public void setDatePicker(boolean isDatePicker) {
0176:                this .isDatePicker = isDatePicker;
0177:            }
0178:
0179:            /**
0180:             * @return Returns the defaultValue.
0181:             */
0182:            public String getDefaultValue() {
0183:                return defaultValue;
0184:            }
0185:
0186:            /**
0187:             * @param defaultValue The defaultValue to set.
0188:             */
0189:            public void setDefaultValue(String defaultValue) {
0190:                this .defaultValue = defaultValue;
0191:            }
0192:
0193:            /**
0194:             * No-args constructor
0195:             */
0196:            public Field() {
0197:                this .fieldLevelHelpEnabled = false;
0198:            }
0199:
0200:            /**
0201:             * Constructor that creates an instance of this class to support inquirable
0202:             * 
0203:             * @param propertyName property attribute of the bean
0204:             * @param fieldLabel label of the display field
0205:             */
0206:            public Field(String propertyName, String fieldLabel) {
0207:                this .propertyName = propertyName;
0208:                this .fieldLabel = fieldLabel;
0209:                this .isReadOnly = false;
0210:                this .upperCase = false;
0211:                this .keyField = false;
0212:                this .secure = false;
0213:                this .fieldLevelHelpEnabled = false;
0214:            }
0215:
0216:            /**
0217:             * Constructor that creates an instance of this class.
0218:             * 
0219:             * @param fieldLabel label of the search criteria field
0220:             * @param fieldHelpUrl url of a help link to help instructions
0221:             * @param fieldType type of input field for this search criteria
0222:             * @param clear clear action flag
0223:             * @param propertyName name of the bean attribute for this search criteria
0224:             * @param propertyValue value of the bean attribute
0225:             * @param fieldRequired flag to denote if field is required
0226:             * @param dateField falg to denot if field should be validated as a date object
0227:             * @param fieldValidValues used for drop down list
0228:             * @param quickFinderClassNameImpl class name to transfer control to quick finder
0229:             */
0230:            public Field(String fieldLabel, String fieldHelpUrl,
0231:                    String fieldType, boolean clear, String propertyName,
0232:                    String propertyValue, boolean fieldRequired,
0233:                    boolean dateField, List fieldValidValues,
0234:                    String quickFinderClassNameImpl) {
0235:                this .dateField = dateField;
0236:                this .fieldLabel = fieldLabel;
0237:                this .fieldHelpUrl = fieldHelpUrl;
0238:                this .fieldType = fieldType;
0239:                this .fieldRequired = fieldRequired;
0240:                this .clear = clear;
0241:                this .propertyName = propertyName;
0242:                this .propertyValue = propertyValue;
0243:                this .fieldValidValues = fieldValidValues;
0244:                this .quickFinderClassNameImpl = quickFinderClassNameImpl;
0245:                this .size = DEFAULT_SIZE;
0246:                this .maxLength = DEFAULT_MAXLENGTH;
0247:                this .isReadOnly = false;
0248:                this .upperCase = false;
0249:                this .keyField = false;
0250:                this .fieldLevelHelpEnabled = false;
0251:            }
0252:
0253:            /**
0254:             * Constructor that creates an instance of this class.
0255:             * 
0256:             * @param fieldLabel label of the search criteria field
0257:             * @param fieldHelpUrl url of a help link to help instructions
0258:             * @param fieldType type of input field for this search criteria
0259:             * @param clear clear action flag
0260:             * @param propertyName name of the bean attribute for this search criteria
0261:             * @param propertyValue value of the bean attribute
0262:             * @param fieldRequired flag to denote if field is required
0263:             * @param dateField falg to denot if field should be validated as a date object
0264:             * @param fieldValidValues used for drop down list
0265:             * @param quickFinderClassNameImpl class name to transfer control to quick finder
0266:             * @param size size of the input field
0267:             * @param maxLength maxLength of the input field
0268:             */
0269:            public Field(String fieldLabel, String fieldHelpUrl,
0270:                    String fieldType, boolean clear, String propertyName,
0271:                    String propertyValue, boolean fieldRequired,
0272:                    boolean dateField, List fieldValidValues,
0273:                    String quickFinderClassNameImpl, int size, int maxLength) {
0274:                this .dateField = dateField;
0275:                this .fieldLabel = fieldLabel;
0276:                this .fieldHelpUrl = fieldHelpUrl;
0277:                this .fieldType = fieldType;
0278:                this .fieldRequired = fieldRequired;
0279:                this .clear = clear;
0280:                this .propertyName = propertyName;
0281:                this .propertyValue = propertyValue;
0282:                this .fieldValidValues = fieldValidValues;
0283:                this .upperCase = false;
0284:                this .quickFinderClassNameImpl = quickFinderClassNameImpl;
0285:                if (size <= 0) {
0286:                    this .size = DEFAULT_SIZE;
0287:                } else {
0288:                    this .size = size;
0289:                }
0290:                if (size <= 0) {
0291:                    this .size = DEFAULT_MAXLENGTH;
0292:                } else {
0293:                    this .maxLength = maxLength;
0294:                }
0295:                this .isReadOnly = false;
0296:                this .keyField = false;
0297:                this .fieldLevelHelpEnabled = false;
0298:            }
0299:
0300:            public boolean containsBOData() {
0301:                if (StringUtils.isNotBlank(this .propertyName)) {
0302:                    return true;
0303:                } else {
0304:                    return false;
0305:                }
0306:            }
0307:
0308:            /**
0309:             * @return Returns the CHECKBOX.
0310:             */
0311:            public String getCHECKBOX() {
0312:                return CHECKBOX;
0313:            }
0314:
0315:            /**
0316:             * @return Returns the CONTAINER.
0317:             */
0318:            public String getCONTAINER() {
0319:                return CONTAINER;
0320:            }
0321:
0322:            /**
0323:             * @return Returns the dROPDOWN.
0324:             */
0325:            public String getDROPDOWN() {
0326:                return DROPDOWN;
0327:            }
0328:
0329:            /**
0330:             * @return Returns the TEXT_AREA.
0331:             */
0332:            public String getTEXT_AREA() {
0333:                return TEXT_AREA;
0334:            }
0335:
0336:            /**
0337:             * @return Returns the DROPDOWN_REFRESH
0338:             */
0339:            public String getDROPDOWN_REFRESH() {
0340:                return DROPDOWN_REFRESH;
0341:            }
0342:
0343:            /**
0344:             * @return Returns DROPDOWN_SCRIPT
0345:             */
0346:            public String getDROPDOWN_SCRIPT() {
0347:                return DROPDOWN_SCRIPT;
0348:            }
0349:
0350:            /**
0351:             * @return Returns DROPDOWN_APC
0352:             */
0353:            public String getDROPDOWN_APC() {
0354:                return DROPDOWN_APC;
0355:            }
0356:
0357:            /**
0358:             * 
0359:             * @return Returns KUALIUSER
0360:             */
0361:            public String getKUALIUSER() {
0362:                return KUALIUSER;
0363:            }
0364:
0365:            /**
0366:             * 
0367:             * @return Returns SUB_SECTION_SEPARATOR
0368:             */
0369:            public String getSUB_SECTION_SEPARATOR() {
0370:                return SUB_SECTION_SEPARATOR;
0371:            }
0372:
0373:            /**
0374:             * 
0375:             * @return Returns BLANK_SPACE
0376:             */
0377:            public String getBLANK_SPACE() {
0378:                return BLANK_SPACE;
0379:            }
0380:
0381:            /**
0382:             * @return Returns the fieldConversions.
0383:             */
0384:            public String getFieldConversions() {
0385:                return fieldConversions;
0386:            }
0387:
0388:            /**
0389:             * @return Returns the fieldHelpUrl.
0390:             */
0391:            public String getFieldHelpUrl() {
0392:                return fieldHelpUrl;
0393:            }
0394:
0395:            /**
0396:             * @return Returns the fieldLabel.
0397:             */
0398:            public String getFieldLabel() {
0399:                return fieldLabel;
0400:            }
0401:
0402:            /**
0403:             * @return Returns the fieldType.
0404:             */
0405:            public String getFieldType() {
0406:                return fieldType;
0407:            }
0408:
0409:            /**
0410:             * @return Returns the fieldValidValues.
0411:             */
0412:            public List getFieldValidValues() {
0413:                return fieldValidValues;
0414:            }
0415:
0416:            /**
0417:             * @return Returns the formatter.
0418:             */
0419:            public Formatter getFormatter() {
0420:                return formatter;
0421:            }
0422:
0423:            /**
0424:             * @return Returns the hIDDEN.
0425:             */
0426:            public String getHIDDEN() {
0427:                return HIDDEN;
0428:            }
0429:
0430:            /**
0431:             * @return Returns the lookupParameters.
0432:             */
0433:            public String getLookupParameters() {
0434:                return lookupParameters;
0435:            }
0436:
0437:            /**
0438:             * @return Returns the maxLength.
0439:             */
0440:            public int getMaxLength() {
0441:                return maxLength;
0442:            }
0443:
0444:            /**
0445:             * @return Returns the propertyName.
0446:             */
0447:            public String getPropertyName() {
0448:                return propertyName;
0449:            }
0450:
0451:            /**
0452:             * @return Returns the propertyValue.
0453:             */
0454:            public String getPropertyValue() {
0455:                if (propertyValue == null) {
0456:                    propertyValue = RiceConstants.EMPTY_STRING;
0457:                }
0458:
0459:                return propertyValue;
0460:            }
0461:
0462:            /**
0463:             * Gets the propertyPrefix attribute.
0464:             * 
0465:             * @return Returns the propertyPrefix.
0466:             */
0467:            public String getPropertyPrefix() {
0468:                return propertyPrefix;
0469:            }
0470:
0471:            /**
0472:             * Sets the propertyPrefix attribute value.
0473:             * 
0474:             * @param propertyPrefix The propertyPrefix to set.
0475:             */
0476:            public void setPropertyPrefix(String propertyPrefix) {
0477:                this .propertyPrefix = propertyPrefix;
0478:            }
0479:
0480:            /**
0481:             * @return Returns the qUICKFINDER.
0482:             */
0483:            public String getQUICKFINDER() {
0484:                return QUICKFINDER;
0485:            }
0486:
0487:            /**
0488:             * @return Returns the quickFinderClassNameImpl.
0489:             */
0490:            public String getQuickFinderClassNameImpl() {
0491:                return quickFinderClassNameImpl;
0492:            }
0493:
0494:            /**
0495:             * @return Returns the rADIO.
0496:             */
0497:            public String getRADIO() {
0498:                return RADIO;
0499:            }
0500:
0501:            /**
0502:             * @return Returns the size.
0503:             */
0504:            public int getSize() {
0505:                return size;
0506:            }
0507:
0508:            /**
0509:             * @return Returns the TEXT.
0510:             */
0511:            public String getTEXT() {
0512:                return TEXT;
0513:            }
0514:
0515:            public String getCURRENCY() {
0516:                return CURRENCY;
0517:            }
0518:
0519:            /**
0520:             * @return Returns the iMAGE_SUBMIT.
0521:             */
0522:            public String getIMAGE_SUBMIT() {
0523:                return IMAGE_SUBMIT;
0524:            }
0525:
0526:            /**
0527:             * @return Returns the LOOKUP_HIDDEN.
0528:             */
0529:            public String getLOOKUP_HIDDEN() {
0530:                return LOOKUP_HIDDEN;
0531:            }
0532:
0533:            /**
0534:             * @return Returns the LOOKUP_READONLY.
0535:             */
0536:            public String getLOOKUP_READONLY() {
0537:                return LOOKUP_READONLY;
0538:            }
0539:
0540:            /**
0541:             * @return Returns the WORKFLOW_WORKGROUP.
0542:             */
0543:            public String getWORKFLOW_WORKGROUP() {
0544:                return WORKFLOW_WORKGROUP;
0545:            }
0546:
0547:            /**
0548:             * @return Returns the clear.
0549:             */
0550:            public boolean isClear() {
0551:                return clear;
0552:            }
0553:
0554:            /**
0555:             * @return Returns the dateField.
0556:             */
0557:            public boolean isDateField() {
0558:                return dateField;
0559:            }
0560:
0561:            /**
0562:             * @return Returns the fieldRequired.
0563:             */
0564:            public boolean isFieldRequired() {
0565:                return fieldRequired;
0566:            }
0567:
0568:            /**
0569:             * @return Returns the highlightField.
0570:             */
0571:            public boolean isHighlightField() {
0572:                return highlightField;
0573:            }
0574:
0575:            /**
0576:             * @return Returns the isReadOnly.
0577:             */
0578:            public boolean isReadOnly() {
0579:                return isReadOnly;
0580:            }
0581:
0582:            /**
0583:             * @return Returns the upperCase.
0584:             */
0585:            public boolean isUpperCase() {
0586:                return upperCase;
0587:            }
0588:
0589:            /**
0590:             * @param clear The clear to set.
0591:             */
0592:            public void setClear(boolean clear) {
0593:                this .clear = clear;
0594:            }
0595:
0596:            /**
0597:             * @param dateField The dateField to set.
0598:             */
0599:            public void setDateField(boolean dateField) {
0600:                this .dateField = dateField;
0601:            }
0602:
0603:            /**
0604:             * @param fieldConversions The fieldConversions to set.
0605:             */
0606:            public void setFieldConversions(Map fieldConversionsMap) {
0607:                // TODO: should use a StringBuilder
0608:                String fieldConversionString = "";
0609:                for (Iterator iter = fieldConversionsMap.keySet().iterator(); iter
0610:                        .hasNext();) {
0611:                    String field = (String) iter.next();
0612:                    String mappedField = (String) fieldConversionsMap
0613:                            .get(field);
0614:                    fieldConversionString += field + ":" + mappedField;
0615:                    if (iter.hasNext()) {
0616:                        fieldConversionString += ",";
0617:                    }
0618:                }
0619:                setFieldConversions(fieldConversionString);
0620:            }
0621:
0622:            /**
0623:             * @param fieldConversions The fieldConversions to set.
0624:             */
0625:            public void setFieldConversions(String fieldConversions) {
0626:                this .fieldConversions = fieldConversions;
0627:            }
0628:
0629:            public void appendFieldConversions(String fieldConversions) {
0630:                if (StringUtils.isNotBlank(fieldConversions)) {
0631:                    this .fieldConversions = this .fieldConversions + ","
0632:                            + fieldConversions;
0633:                }
0634:            }
0635:
0636:            /**
0637:             * @param fieldHelpUrl The fieldHelpUrl to set.
0638:             */
0639:            public void setFieldHelpUrl(String fieldHelpUrl) {
0640:                this .fieldHelpUrl = fieldHelpUrl;
0641:            }
0642:
0643:            /**
0644:             * @param fieldLabel The fieldLabel to set.
0645:             */
0646:            public void setFieldLabel(String fieldLabel) {
0647:                this .fieldLabel = fieldLabel;
0648:            }
0649:
0650:            /**
0651:             * @param fieldRequired The fieldRequired to set.
0652:             */
0653:            public void setFieldRequired(boolean fieldRequired) {
0654:                this .fieldRequired = fieldRequired;
0655:            }
0656:
0657:            /**
0658:             * @param fieldType The fieldType to set.
0659:             */
0660:            public void setFieldType(String fieldType) {
0661:                this .fieldType = fieldType;
0662:            }
0663:
0664:            /**
0665:             * @param fieldValidValues The fieldValidValues to set.
0666:             */
0667:            public void setFieldValidValues(List fieldValidValues) {
0668:                this .fieldValidValues = fieldValidValues;
0669:            }
0670:
0671:            public boolean getHasBlankValidValue() {
0672:                for (KeyLabelPair keyLabel : (List<KeyLabelPair>) fieldValidValues) {
0673:                    if (keyLabel.getKey().equals("")) {
0674:                        return true;
0675:                    }
0676:                }
0677:                return false;
0678:            }
0679:
0680:            /**
0681:             * @param formatter The formatter to set.
0682:             */
0683:            public void setFormatter(Formatter formatter) {
0684:                this .formatter = formatter;
0685:            }
0686:
0687:            /**
0688:             * @param highlightField The highlightField to set.
0689:             */
0690:            public void setHighlightField(boolean highlightField) {
0691:                this .highlightField = highlightField;
0692:            }
0693:
0694:            /**
0695:             * @param lookupParameters The lookupParameters to set.
0696:             */
0697:            public void setLookupParameters(Map lookupParametersMap) {
0698:                String lookupParameterString = "";
0699:                for (Iterator iter = lookupParametersMap.keySet().iterator(); iter
0700:                        .hasNext();) {
0701:                    String field = (String) iter.next();
0702:                    String mappedField = (String) lookupParametersMap
0703:                            .get(field);
0704:                    lookupParameterString += field + ":" + mappedField;
0705:                    if (iter.hasNext()) {
0706:                        lookupParameterString += ",";
0707:                    }
0708:                }
0709:                setLookupParameters(lookupParameterString);
0710:            }
0711:
0712:            /**
0713:             * @param lookupParameters The lookupParameters to set.
0714:             */
0715:            public void setLookupParameters(String lookupParameters) {
0716:                this .lookupParameters = lookupParameters;
0717:            }
0718:
0719:            /**
0720:             * 
0721:             * This method appends the passed-in lookupParameters to the existing
0722:             * 
0723:             * @param lookupParameters
0724:             */
0725:            public void appendLookupParameters(String lookupParameters) {
0726:                if (StringUtils.isNotBlank(lookupParameters)) {
0727:                    if (StringUtils.isBlank(this .lookupParameters)) {
0728:                        this .lookupParameters = lookupParameters;
0729:                    } else {
0730:                        this .lookupParameters = this .lookupParameters + ","
0731:                                + lookupParameters;
0732:                    }
0733:                }
0734:            }
0735:
0736:            /**
0737:             * @param maxLength The maxLength to set.
0738:             */
0739:            public void setMaxLength(int maxLength) {
0740:                this .maxLength = maxLength;
0741:            }
0742:
0743:            /**
0744:             * @param propertyName The propertyName to set.
0745:             */
0746:            public void setPropertyName(String propertyName) {
0747:                String newPropertyName = RiceConstants.EMPTY_STRING;
0748:                if (propertyName != null) {
0749:                    newPropertyName = propertyName;
0750:                }
0751:                this .propertyName = newPropertyName;
0752:            }
0753:
0754:            /**
0755:             * @param propertyValue The propertyValue to set.
0756:             */
0757:            public void setPropertyValue(Object propertyValue) {
0758:                String newPropertyValue = RiceConstants.EMPTY_STRING;
0759:
0760:                if (propertyValue != null) {
0761:                    // for Booleans always use BooleanFormatter
0762:                    if (propertyValue instanceof  Boolean) {
0763:                        setFormatter(new BooleanFormatter());
0764:                    }
0765:
0766:                    // for Dates, always use DateFormatter
0767:                    if (propertyValue instanceof  Date) {
0768:                        formatter = new DateFormatter();
0769:                    }
0770:
0771:                    if (formatter != null && !(propertyValue instanceof  String)) {
0772:                        newPropertyValue = (String) formatter
0773:                                .format(propertyValue);
0774:                    } else {
0775:                        newPropertyValue = propertyValue.toString();
0776:                    }
0777:
0778:                    // uppercase
0779:                    if (isUpperCase()) {
0780:                        newPropertyValue = newPropertyValue.toUpperCase();
0781:                    }
0782:                }
0783:
0784:                this .propertyValue = newPropertyValue;
0785:            }
0786:
0787:            /**
0788:             * @param quickFinderClassNameImpl The quickFinderClassNameImpl to set.
0789:             */
0790:            public void setQuickFinderClassNameImpl(
0791:                    String quickFinderClassNameImpl) {
0792:                this .quickFinderClassNameImpl = quickFinderClassNameImpl;
0793:            }
0794:
0795:            /**
0796:             * @param isReadOnly The isReadOnly to set.
0797:             */
0798:            public void setReadOnly(boolean isReadOnly) {
0799:                this .isReadOnly = isReadOnly;
0800:            }
0801:
0802:            /**
0803:             * @param size The size to set.
0804:             */
0805:            public void setSize(int size) {
0806:                this .size = size;
0807:            }
0808:
0809:            /**
0810:             * @param upperCase The upperCase to set.
0811:             */
0812:            public void setUpperCase(boolean upperCase) {
0813:                this .upperCase = upperCase;
0814:            }
0815:
0816:            /**
0817:             * @return Returns the cols.
0818:             */
0819:            public int getCols() {
0820:                return cols;
0821:            }
0822:
0823:            /**
0824:             * @param cols The cols to set.
0825:             */
0826:            public void setCols(int cols) {
0827:                this .cols = cols;
0828:            }
0829:
0830:            /**
0831:             * @return Returns the rows.
0832:             */
0833:            public int getRows() {
0834:                return rows;
0835:            }
0836:
0837:            /**
0838:             * @param rows The rows to set.
0839:             */
0840:            public void setRows(int rows) {
0841:                this .rows = rows;
0842:            }
0843:
0844:            /**
0845:             * @return Returns the containerRows.
0846:             */
0847:            public List<Row> getContainerRows() {
0848:                return containerRows;
0849:            }
0850:
0851:            /**
0852:             * @param containerRows The containerRows to set.
0853:             */
0854:            public void setContainerRows(List<Row> containerRows) {
0855:                this .containerRows = containerRows;
0856:            }
0857:
0858:            /**
0859:             * @return Returns the businessObjectClassName.
0860:             */
0861:            public String getBusinessObjectClassName() {
0862:                return businessObjectClassName;
0863:            }
0864:
0865:            /**
0866:             * @param businessObjectClassName The businessObjectClassName to set.
0867:             */
0868:            public void setBusinessObjectClassName(
0869:                    String businessObjectClassName) {
0870:                this .businessObjectClassName = businessObjectClassName;
0871:            }
0872:
0873:            /**
0874:             * @return Returns the fieldHelpSummary.
0875:             */
0876:            public String getFieldHelpSummary() {
0877:                return fieldHelpSummary;
0878:            }
0879:
0880:            /**
0881:             * @param fieldHelpSummary The fieldHelpSummary to set.
0882:             */
0883:            public void setFieldHelpSummary(String fieldHelpSummary) {
0884:                this .fieldHelpSummary = fieldHelpSummary;
0885:            }
0886:
0887:            /**
0888:             * @return Returns the fieldHelpName.
0889:             */
0890:            public String getFieldHelpName() {
0891:                return fieldHelpName;
0892:            }
0893:
0894:            /**
0895:             * @param fieldHelpName The fieldHelpName to set.
0896:             */
0897:            public void setFieldHelpName(String fieldHelpName) {
0898:                this .fieldHelpName = fieldHelpName;
0899:            }
0900:
0901:            /**
0902:             * Gets the script attribute.
0903:             * 
0904:             * @return Returns the script.
0905:             */
0906:            public String getScript() {
0907:                return script;
0908:            }
0909:
0910:            /**
0911:             * Sets the script attribute value.
0912:             * 
0913:             * @param script The script to set.
0914:             */
0915:            public void setScript(String script) {
0916:                this .script = script;
0917:            }
0918:
0919:            /**
0920:             * Gets the personNameAttributeName attribute.
0921:             * 
0922:             * @return Returns the personNameAttributeName.
0923:             */
0924:            public String getPersonNameAttributeName() {
0925:                return personNameAttributeName;
0926:            }
0927:
0928:            /**
0929:             * Sets the personNameAttributeName attribute value.
0930:             * 
0931:             * @param personNameAttributeName The personNameAttributeName to set.
0932:             */
0933:            public void setPersonNameAttributeName(
0934:                    String personNameAttributeName) {
0935:                this .personNameAttributeName = personNameAttributeName;
0936:            }
0937:
0938:            /**
0939:             * Gets the universalIdAttributeName attribute.
0940:             * 
0941:             * @return Returns the universalIdAttributeName.
0942:             */
0943:            public String getUniversalIdAttributeName() {
0944:                return universalIdAttributeName;
0945:            }
0946:
0947:            /**
0948:             * Sets the universalIdAttributeName attribute value.
0949:             * 
0950:             * @param universalIdAttributeName The universalIdAttributeName to set.
0951:             */
0952:            public void setUniversalIdAttributeName(
0953:                    String universalIdAttributeName) {
0954:                this .universalIdAttributeName = universalIdAttributeName;
0955:            }
0956:
0957:            /**
0958:             * Gets the userIdAttributeName attribute.
0959:             * 
0960:             * @return Returns the userIdAttributeName.
0961:             */
0962:            public String getUserIdAttributeName() {
0963:                return userIdAttributeName;
0964:            }
0965:
0966:            /**
0967:             * Sets the userIdAttributeName attribute value.
0968:             * 
0969:             * @param userIdAttributeName The userIdAttributeName to set.
0970:             */
0971:            public void setUserIdAttributeName(String userIdAttributeName) {
0972:                this .userIdAttributeName = userIdAttributeName;
0973:            }
0974:
0975:            /**
0976:             * Gets the keyField attribute.
0977:             * 
0978:             * @return Returns the keyField.
0979:             */
0980:            public boolean isKeyField() {
0981:                return keyField;
0982:            }
0983:
0984:            /**
0985:             * Sets the keyField attribute value.
0986:             * 
0987:             * @param keyField The keyField to set.
0988:             */
0989:            public void setKeyField(boolean keyField) {
0990:                this .keyField = keyField;
0991:            }
0992:
0993:            /**
0994:             * Gets the displayEditMode attribute.
0995:             * 
0996:             * @return Returns the displayEditMode.
0997:             */
0998:            public String getDisplayEditMode() {
0999:                return displayEditMode;
1000:            }
1001:
1002:            /**
1003:             * Sets the displayEditMode attribute value.
1004:             * 
1005:             * @param displayEditMode The displayEditMode to set.
1006:             */
1007:            public void setDisplayEditMode(String displayEditMode) {
1008:                this .displayEditMode = displayEditMode;
1009:            }
1010:
1011:            /**
1012:             * Gets the displayMask attribute.
1013:             * 
1014:             * @return Returns the displayMask.
1015:             */
1016:            public Mask getDisplayMask() {
1017:                return displayMask;
1018:            }
1019:
1020:            /**
1021:             * Sets the displayMask attribute value.
1022:             * 
1023:             * @param displayMask The displayMask to set.
1024:             */
1025:            public void setDisplayMask(Mask displayMask) {
1026:                this .displayMask = displayMask;
1027:            }
1028:
1029:            /**
1030:             * Gets the displayMaskValue attribute.
1031:             * 
1032:             * @return Returns the displayMaskValue.
1033:             */
1034:            public String getDisplayMaskValue() {
1035:                return displayMaskValue;
1036:            }
1037:
1038:            /**
1039:             * Sets the displayMaskValue attribute value.
1040:             * 
1041:             * @param displayMaskValue The displayMaskValue to set.
1042:             */
1043:            public void setDisplayMaskValue(String displayMaskValue) {
1044:                this .displayMaskValue = displayMaskValue;
1045:            }
1046:
1047:            /**
1048:             * Gets the encryptedValue attribute.
1049:             * 
1050:             * @return Returns the encryptedValue.
1051:             */
1052:            public String getEncryptedValue() {
1053:                return encryptedValue;
1054:            }
1055:
1056:            /**
1057:             * Sets the encryptedValue attribute value.
1058:             * 
1059:             * @param encryptedValue The encryptedValue to set.
1060:             */
1061:            public void setEncryptedValue(String encryptedValue) {
1062:                this .encryptedValue = encryptedValue;
1063:            }
1064:
1065:            /**
1066:             * Gets the secure attribute.
1067:             * 
1068:             * @return Returns the secure.
1069:             */
1070:            public boolean isSecure() {
1071:                return secure;
1072:            }
1073:
1074:            /**
1075:             * Sets the secure attribute value.
1076:             * 
1077:             * @param secure The secure to set.
1078:             */
1079:            public void setSecure(boolean secure) {
1080:                this .secure = secure;
1081:            }
1082:
1083:            /**
1084:             * Returns the method name of a function present in the page which should be called
1085:             * when the user tabs away from the field.
1086:             * 
1087:             * @return
1088:             */
1089:            public String getWebOnBlurHandler() {
1090:                return webOnBlurHandler;
1091:            }
1092:
1093:            public void setWebOnBlurHandler(String webOnBlurHandler) {
1094:                this .webOnBlurHandler = webOnBlurHandler;
1095:            }
1096:
1097:            /**
1098:             * Returns the method name of a function present in the page which should be called
1099:             * after an AJAX call from the onblur handler.
1100:             * 
1101:             * @return
1102:             */
1103:            public String getWebOnBlurHandlerCallback() {
1104:                return webOnBlurHandlerCallback;
1105:            }
1106:
1107:            public void setWebOnBlurHandlerCallback(
1108:                    String webOnBlurHandlerCallback) {
1109:                this .webOnBlurHandlerCallback = webOnBlurHandlerCallback;
1110:            }
1111:
1112:            /**
1113:             * Sets the propertyValue attribute value.
1114:             * 
1115:             * @param propertyValue The propertyValue to set.
1116:             */
1117:            public void setPropertyValue(String propertyValue) {
1118:                this .propertyValue = propertyValue;
1119:            }
1120:
1121:            public String toString() {
1122:                return "[" + getFieldType() + "] " + getPropertyName() + " = '"
1123:                        + getPropertyValue() + "'";
1124:            }
1125:
1126:            public String getStyleClass() {
1127:                return styleClass;
1128:            }
1129:
1130:            public void setStyleClass(String styleClass) {
1131:                this .styleClass = styleClass;
1132:            }
1133:
1134:            public int getFormattedMaxLength() {
1135:                return formattedMaxLength;
1136:            }
1137:
1138:            public void setFormattedMaxLength(int formattedMaxLength) {
1139:                this .formattedMaxLength = formattedMaxLength;
1140:            }
1141:
1142:            public String getContainerName() {
1143:                return containerName;
1144:            }
1145:
1146:            public void setContainerName(String containerName) {
1147:                this .containerName = containerName;
1148:            }
1149:
1150:            /**
1151:             * Gets the containerElementName attribute. 
1152:             * @return Returns the containerElementName.
1153:             */
1154:            public String getContainerElementName() {
1155:                return containerElementName;
1156:            }
1157:
1158:            /**
1159:             * Sets the containerElementName attribute value.
1160:             * @param containerElementName The containerElementName to set.
1161:             */
1162:            public void setContainerElementName(String containerElementName) {
1163:                this .containerElementName = containerElementName;
1164:            }
1165:
1166:            /**
1167:             * Gets the containerDisplayFields attribute. 
1168:             * @return Returns the containerDisplayFields.
1169:             */
1170:            public List<Field> getContainerDisplayFields() {
1171:                return containerDisplayFields;
1172:            }
1173:
1174:            /**
1175:             * Sets the containerDisplayFields attribute value.
1176:             * @param containerDisplayFields The containerDisplayFields to set.
1177:             */
1178:            public void setContainerDisplayFields(
1179:                    List<Field> containerDisplayFields) {
1180:                this .containerDisplayFields = containerDisplayFields;
1181:            }
1182:
1183:            public String getReferencesToRefresh() {
1184:                return referencesToRefresh;
1185:            }
1186:
1187:            public void setReferencesToRefresh(String referencesToRefresh) {
1188:                this .referencesToRefresh = referencesToRefresh;
1189:            }
1190:
1191:            /**
1192:             * The DD defined objectLabel of the class on which a multiple value lookup is performed
1193:             * @return The DD defined objectLabel of the class on which a multiple value lookup is performed
1194:             */
1195:            public String getMultipleValueLookupClassLabel() {
1196:                return multipleValueLookupClassLabel;
1197:            }
1198:
1199:            /**
1200:             * The DD defined objectLabel of the class on which a multiple value lookup is performed
1201:             * @param multipleValueLookupClassLabel The DD defined objectLabel of the class on which a multiple value lookup is performed
1202:             */
1203:            public void setMultipleValueLookupClassLabel(
1204:                    String multipleValueLookupClassLabel) {
1205:                this .multipleValueLookupClassLabel = multipleValueLookupClassLabel;
1206:            }
1207:
1208:            /**
1209:             * For container fields (i.e. fieldType.equals(CONTAINER)) with MV lookups enabled, this is the name of the collection on the doc on which the
1210:             * MV lookup is performed 
1211:             * @return 
1212:             */
1213:            public String getMultipleValueLookedUpCollectionName() {
1214:                return multipleValueLookedUpCollectionName;
1215:            }
1216:
1217:            /**
1218:             * For container fields (i.e. fieldType.equals(CONTAINER)) with MV lookups enabled, this is the name of the collection on the doc on which the
1219:             * MV lookup is performed
1220:             * @param multipleValueLookedUpCollectionName
1221:             */
1222:            public void setMultipleValueLookedUpCollectionName(
1223:                    String multipleValueLookedUpCollectionName) {
1224:                this .multipleValueLookedUpCollectionName = multipleValueLookedUpCollectionName;
1225:            }
1226:
1227:            /**
1228:             * For container fields (i.e. fieldType.equals(CONTAINER)) with MV lookups enabled, this is the class to perform a lookup upon 
1229:             * @return
1230:             */
1231:            public String getMultipleValueLookupClassName() {
1232:                return multipleValueLookupClassName;
1233:            }
1234:
1235:            /**
1236:             * For container fields (i.e. fieldType.equals(CONTAINER)) with MV lookups enabled, this is the class to perform a lookup upon
1237:             * @param multipleValueLookupClassName
1238:             */
1239:            public void setMultipleValueLookupClassName(
1240:                    String multipleValueLookupClassName) {
1241:                this .multipleValueLookupClassName = multipleValueLookupClassName;
1242:            }
1243:
1244:            /**
1245:             * The td alignment to use for the Field.
1246:             * @return the cellAlign
1247:             */
1248:            public String getCellAlign() {
1249:                return cellAlign;
1250:            }
1251:
1252:            /**
1253:             * Sets the td alignment for the Field.
1254:             * @param cellAlign the cellAlign to set
1255:             */
1256:            public void setCellAlign(String cellAlign) {
1257:                this .cellAlign = cellAlign;
1258:            }
1259:
1260:            /**
1261:             * Returns whether field level help is enabled for this field.  If this value is true, then the field level help will be enabled.
1262:             * If false, then whether a field is enabled is determined by the value returned by {@link #isFieldLevelHelpDisabled()} and the system-wide
1263:             * parameter setting.  Note that if a field is read-only, that may cause field-level help to not be rendered.
1264:             * 
1265:             * @return true if field level help is enabled, false if the value of this method should NOT be used to determine whether this method's return value
1266:             * affects the enablement of field level help
1267:             */
1268:            public boolean isFieldLevelHelpEnabled() {
1269:                return this .fieldLevelHelpEnabled;
1270:            }
1271:
1272:            public void setFieldLevelHelpEnabled(boolean fieldLevelHelpEnabled) {
1273:                this .fieldLevelHelpEnabled = fieldLevelHelpEnabled;
1274:            }
1275:
1276:            /**
1277:             * Returns whether field level help is disabled for this field.  If this value is true and {@link #isFieldLevelHelpEnabled()} returns false,
1278:             * then the field level help will not be rendered.  If both this and {@link #isFieldLevelHelpEnabled()} return false, then the system-wide
1279:             * setting will determine whether field level help is enabled.  Note that if a field is read-only, that may cause field-level help to not be rendered.
1280:             * 
1281:             * @return true if field level help is disabled, false if the value of this method should NOT be used to determine whether this method's return value
1282:             * affects the enablement of field level help
1283:             */
1284:            public boolean isFieldLevelHelpDisabled() {
1285:                return this .fieldLevelHelpDisabled;
1286:            }
1287:
1288:            public void setFieldLevelHelpDisabled(boolean fieldLevelHelpDisabled) {
1289:                this.fieldLevelHelpDisabled = fieldLevelHelpDisabled;
1290:            }
1291:
1292:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.