Source Code Cross Referenced for Matrix.java in  » Ajax » dwr » jsx3 » gui » 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 » Ajax » dwr » jsx3.gui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         * Copyright 2005 Joe Walker
0003:         *
0004:         * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
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 jsx3.gui;
0017:
0018:        import org.directwebremoting.ScriptBuffer;
0019:        import org.directwebremoting.proxy.ScriptProxy;
0020:        import org.directwebremoting.proxy.io.Context;
0021:
0022:        /**
0023:         * The Matrix control is the standard visual interface for the Common Data Format (CDF), providing grid and tree-grid functionality that mirrors the
0024:         the record and attribute structures used by the CDF. Instances of this class can be used to create editable grids, selectable lists, trees, tables, etc.
0025:         In addtion to providing layout, selection, and editing schemes, the Matrix also provides various paging models to help optimize
0026:         how (and how much) data is rendered on-screen. The Matrix class is always used in conjunction with jsx3.gui.Matrix.Column, which describes
0027:         how data for a given series should be rendered on-screen. While the Matrix manages data and user interactions, Column
0028:         manages the on-screen format for how the data is presented.
0029:         * @author Joe Walker [joe at getahead dot org]
0030:         * @author DRAPGEN - Dwr Reverse Ajax Proxy GENerator
0031:         */
0032:        public class Matrix extends jsx3.gui.Block {
0033:            /**
0034:             * All reverse ajax proxies need context to work from
0035:             * @param scriptProxy The place we are writing scripts to
0036:             * @param context The script that got us to where we are now
0037:             */
0038:            public Matrix(Context context, String extension,
0039:                    ScriptProxy scriptProxy) {
0040:                super (context, extension, scriptProxy);
0041:            }
0042:
0043:            /**
0044:             * instance initializer
0045:             * @param strName unique name distinguishing this object from all other JSX GUI objects in the JSX application
0046:             */
0047:            public Matrix(String strName) {
0048:                super ((Context) null, (String) null, (ScriptProxy) null);
0049:                ScriptBuffer script = new ScriptBuffer();
0050:                script.appendCall("new Matrix", strName);
0051:                setInitScript(script);
0052:            }
0053:
0054:            /**
0055:             * 50
0056:             */
0057:            public static final int AUTO_SCROLL_INTERVAL = 50;
0058:
0059:            /**
0060:             * jsx:///images/matrix/select.gif
0061:             */
0062:            public static final String SELECTION_BG = "jsx:///images/matrix/select.gif";
0063:
0064:            /**
0065:             * jsx:///images/matrix/insert_before.gif
0066:             */
0067:            public static final String INSERT_BEFORE_IMG = null;
0068:
0069:            /**
0070:             * jsx:///images/matrix/append.gif
0071:             */
0072:            public static final String APPEND_IMG = null;
0073:
0074:            /**
0075:             * font-weight:bold
0076:             */
0077:            public static final String FOCUS_STYLE = "font-weight:bold";
0078:
0079:            /**
0080:             * jsx:///images/matrix/minus.gif (default)
0081:             */
0082:            public static final String ICON_MINUS = "jsx:///images/matrix/minus.gif";
0083:
0084:            /**
0085:             * jsx:///images/matrix/plus.gif (default)
0086:             */
0087:            public static final String ICON_PLUS = "jsx:///images/matrix/plus.gif";
0088:
0089:            /**
0090:             * jsx:///images/matrix/file.gif (default)
0091:             */
0092:            public static final String ICON = "jsx:///images/matrix/file.gif";
0093:
0094:            /**
0095:             * ascending
0096:             */
0097:            public static final String SORT_ASCENDING = "ascending";
0098:
0099:            /**
0100:             * descending
0101:             */
0102:            public static final String SORT_DESCENDING = "descending";
0103:
0104:            /**
0105:             * jsx:///images/matrix/sort_desc.gif (default)
0106:             */
0107:            public static final String SORT_DESCENDING_IMG = null;
0108:
0109:            /**
0110:             * jsx:///images/matrix/sort_asc.gif (default)
0111:             */
0112:            public static final String SORT_ASCENDING_IMG = null;
0113:
0114:            /**
0115:             * 4. minimum width of a column when minimized (set Display to 'none' to completely hide a column)
0116:             */
0117:            public static final int MINIMUM_COLUMN_WIDTH = 8;
0118:
0119:            /**
0120:             * 20
0121:             */
0122:            public static final int DEFAULT_HEADER_HEIGHT = 20;
0123:
0124:            /**
0125:             * 0
0126:             */
0127:            public static final int AUTOROW_NONE = 0;
0128:
0129:            /**
0130:             * 1
0131:             */
0132:            public static final int AUTOROW_LAST_ROW = 1;
0133:
0134:            /**
0135:             * 2
0136:             */
0137:            public static final int AUTOROW_FIRST_ROW = 2;
0138:
0139:            /**
0140:             * jsxpaintpage. Event to subscribe to each time a page of content is about to be painted on-screen
0141:             */
0142:            public static final String ON_PAINT_PAGE = "jsxpaintpage";
0143:
0144:            /**
0145:             * Default. All data is painted at once with the outer container.
0146:             */
0147:            public static final int PAGING_OFF = 0;
0148:
0149:            /**
0150:             * The outer container is first painted and then the entirety of the data is painted during a second pass
0151:             */
0152:            public static final int PAGING_2PASS = 1;
0153:
0154:            /**
0155:             * The outer container is first painted. Chunked sets of data are painted on-screen during repeated passes until
0156:              all data is painted
0157:             */
0158:            public static final int PAGING_CHUNKED = 2;
0159:
0160:            /**
0161:             * The outer container is first painted. The first and last panels are painted during a second pass. As the user
0162:              scrolls, relevant panels are added and unused panels are collected. (NOTE: Requires that row height be fixed.)
0163:             */
0164:            public static final int PAGING_PAGED = 3;
0165:
0166:            /**
0167:             * The outer container is painted along with any rows which are immediate children of the rendering context and those
0168:              descendant rows that have an open path to the context node. All other rows will be fetched when the state for
0169:              their on-screen parent row is toggled to open.
0170:             */
0171:            public static final int PAGING_STEPPED = 4;
0172:
0173:            /**
0174:             * 0
0175:             */
0176:            public static final int SELECTION_UNSELECTABLE = 0;
0177:
0178:            /**
0179:             * 1 (default)
0180:             */
0181:            public static final int SELECTION_ROW = 1;
0182:
0183:            /**
0184:             * 2
0185:             */
0186:            public static final int SELECTION_MULTI_ROW = 2;
0187:
0188:            /**
0189:             * 20
0190:             */
0191:            public static final int DEFAULT_ROW_HEIGHT = 20;
0192:
0193:            /**
0194:             * 18. number of panels allowed on-screen before destroying the panel most distant from the current panel index
0195:             */
0196:            public static final int DEFAULT_PANEL_POOL_COUNT = 5;
0197:
0198:            /**
0199:             * 50. number of rows in a given panel
0200:             */
0201:            public static final int DEFAULT_ROWS_PER_PANEL = 50;
0202:
0203:            /**
0204:             * 250. number of milliseconds between the time a new panel is added and the reaper checks for content exceeding Matrix.DEFAULT_PANEL_POOL_COUNT
0205:             */
0206:            public static final int DEFAULT_REAPER_INTERVAL = 250;
0207:
0208:            /**
0209:             * 3. number of panels in the paint queue. As new panels are added to the queue to be painted, older, less-relevant panels in the queue are removed
0210:             */
0211:            public static final int DEFAULT_PANEL_QUEUE_SIZE = 3;
0212:
0213:            /**
0214:             * 
0215:             */
0216:            public static final String DEFAULTXSLURL = null;
0217:
0218:            /**
0219:             * Ends any existing edit session and hides the active mask. This is a carryover method from grid.
0220:             */
0221:            public void resetMask() {
0222:                ScriptBuffer script = new ScriptBuffer();
0223:                script.appendCall(getContextPath() + "resetMask");
0224:                getScriptProxy().addScript(script);
0225:            }
0226:
0227:            /**
0228:             * Paints only the data rows.  Call for quick repainting of the data rows when only the source data
0229:            has changed. Does not recalculate and reprofile the box profile and resulting XSLT. Retains scroll position when possible.
0230:             */
0231:            public void repaintData() {
0232:                ScriptBuffer script = new ScriptBuffer();
0233:                script.appendCall(getContextPath() + "repaintData");
0234:                getScriptProxy().addScript(script);
0235:            }
0236:
0237:            /**
0238:             * Repaints the header row for improved runtime efficiency. For example, a minor text change to a label in a header row shouldn't repaint the entirety of the instance
0239:             */
0240:            public void repaintHead() {
0241:                ScriptBuffer script = new ScriptBuffer();
0242:                script.appendCall(getContextPath() + "repaintHead");
0243:                getScriptProxy().addScript(script);
0244:            }
0245:
0246:            /**
0247:             * Sorts according to the current sort path. If no sort direction is specified, the value will be toggled.
0248:             * @param intSortDir <code>jsx3.gui.Matrix.SORT_ASCENDING</code> or <code>jsx3.gui.Matrix.SORT_DESCENDING</code>.
0249:             */
0250:            public void doSort(String intSortDir) {
0251:                ScriptBuffer script = new ScriptBuffer();
0252:                script.appendCall(getContextPath() + "doSort", intSortDir);
0253:                getScriptProxy().addScript(script);
0254:            }
0255:
0256:            /**
0257:             * Returns the name of the CDF attribute to sort on. If no value is set an empty string is returned by default.
0258:             */
0259:            @SuppressWarnings("unchecked")
0260:            public void getSortPath(
0261:                    org.directwebremoting.proxy.Callback<String> callback) {
0262:                ScriptBuffer script = new ScriptBuffer();
0263:                String callbackPrefix = "";
0264:
0265:                if (callback != null) {
0266:                    callbackPrefix = "var reply = ";
0267:                }
0268:
0269:                script.appendCall(callbackPrefix + getContextPath()
0270:                        + "getSortPath");
0271:
0272:                if (callback != null) {
0273:                    String key = org.directwebremoting.extend.CallbackHelper
0274:                            .saveCallback(callback, String.class);
0275:                    script
0276:                            .appendCall("__System.activateCallback", key,
0277:                                    "reply");
0278:                }
0279:
0280:                getScriptProxy().addScript(script);
0281:            }
0282:
0283:            /**
0284:             * Sets the name of the CDF attribute to sort on. The records in the data source of this matrix are sorted
0285:            on this attribute before being painted to screen.
0286:             * @param strAttr 
0287:             */
0288:            public void setSortPath(String strAttr) {
0289:                ScriptBuffer script = new ScriptBuffer();
0290:                script.appendCall(getContextPath() + "setSortPath", strAttr);
0291:                getScriptProxy().addScript(script);
0292:            }
0293:
0294:            /**
0295:             * Returns the data type to be used for sorting this list. This value is either the one explicitly set with
0296:            setSortType() or the data type of the current sort.
0297:             * @param callback <code>jsx3.gui.Matrix.Column.TYPE_TEXT</code> or <code>jsx3.gui.Matrix.Column.TYPE_NUMBER</code>
0298:             */
0299:            @SuppressWarnings("unchecked")
0300:            public void getSortType(
0301:                    org.directwebremoting.proxy.Callback<String> callback) {
0302:                ScriptBuffer script = new ScriptBuffer();
0303:                String callbackPrefix = "";
0304:
0305:                if (callback != null) {
0306:                    callbackPrefix = "var reply = ";
0307:                }
0308:
0309:                script.appendCall(callbackPrefix + getContextPath()
0310:                        + "getSortType");
0311:
0312:                if (callback != null) {
0313:                    String key = org.directwebremoting.extend.CallbackHelper
0314:                            .saveCallback(callback, String.class);
0315:                    script
0316:                            .appendCall("__System.activateCallback", key,
0317:                                    "reply");
0318:                }
0319:
0320:                getScriptProxy().addScript(script);
0321:            }
0322:
0323:            /**
0324:             * Sets the data type for the list. This explicit value will override any column data type if set. If it is not set
0325:            the data type specific to the sort column is used for sorting.
0326:             * @param DATATYPE data type for this column's data; ; valid types include: jsx3.gui.Matrix.Column.TYPE_TEXT and jsx3.gui.Matrix.Column.TYPE_NUMBER
0327:             */
0328:            public void setSortType(String DATATYPE) {
0329:                ScriptBuffer script = new ScriptBuffer();
0330:                script.appendCall(getContextPath() + "setSortType", DATATYPE);
0331:                getScriptProxy().addScript(script);
0332:            }
0333:
0334:            /**
0335:             * Returns the direction (jsx3.gui.Matrix.SORT_ASCENDING or jsx3.gui.Matrix.SORT_DESCENDING) for the sorted column; if no direction specified, ascending is returned
0336:             * @param callback one of: jsx3.gui.Matrix.SORT_ASCENDING or jsx3.gui.Matrix.SORT_DESCENDING
0337:             */
0338:            @SuppressWarnings("unchecked")
0339:            public void getSortDirection(
0340:                    org.directwebremoting.proxy.Callback<String> callback) {
0341:                ScriptBuffer script = new ScriptBuffer();
0342:                String callbackPrefix = "";
0343:
0344:                if (callback != null) {
0345:                    callbackPrefix = "var reply = ";
0346:                }
0347:
0348:                script.appendCall(callbackPrefix + getContextPath()
0349:                        + "getSortDirection");
0350:
0351:                if (callback != null) {
0352:                    String key = org.directwebremoting.extend.CallbackHelper
0353:                            .saveCallback(callback, String.class);
0354:                    script
0355:                            .appendCall("__System.activateCallback", key,
0356:                                    "reply");
0357:                }
0358:
0359:                getScriptProxy().addScript(script);
0360:            }
0361:
0362:            /**
0363:             * Sets the direction (ascending or descending) for the sorted column.
0364:             * @param intSortDir one of: jsx3.gui.Matrix.SORT_ASCENDING or jsx3.gui.Matrix.SORT_DESCENDING
0365:             */
0366:            public void setSortDirection(String intSortDir) {
0367:                ScriptBuffer script = new ScriptBuffer();
0368:                script.appendCall(getContextPath() + "setSortDirection",
0369:                        intSortDir);
0370:                getScriptProxy().addScript(script);
0371:            }
0372:
0373:            /**
0374:             * Returns whether the list will render with sortable columns. If null or jsx3.Boolean.TRUE, the instance is sortable.
0375:             */
0376:            @SuppressWarnings("unchecked")
0377:            public void getCanSort(
0378:                    org.directwebremoting.proxy.Callback<Integer> callback) {
0379:                ScriptBuffer script = new ScriptBuffer();
0380:                String callbackPrefix = "";
0381:
0382:                if (callback != null) {
0383:                    callbackPrefix = "var reply = ";
0384:                }
0385:
0386:                script.appendCall(callbackPrefix + getContextPath()
0387:                        + "getCanSort");
0388:
0389:                if (callback != null) {
0390:                    String key = org.directwebremoting.extend.CallbackHelper
0391:                            .saveCallback(callback, Integer.class);
0392:                    script
0393:                            .appendCall("__System.activateCallback", key,
0394:                                    "reply");
0395:                }
0396:
0397:                getScriptProxy().addScript(script);
0398:            }
0399:
0400:            /**
0401:             * Sets whether the list will render with sortable columns.
0402:             * @param SORT one of <code>jsx3.Boolean.TRUE</code> or <code>jsx3.Boolean.FALSE</code>
0403:             */
0404:            public void setCanSort(int SORT) {
0405:                ScriptBuffer script = new ScriptBuffer();
0406:                script.appendCall(getContextPath() + "setCanSort", SORT);
0407:                getScriptProxy().addScript(script);
0408:            }
0409:
0410:            /**
0411:             * Returns whether the column children can be reordered via user interaction. If no value is supplied
0412:            the isntance will allow child columns to be reordered.
0413:             * @param callback one of: jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
0414:             */
0415:            @SuppressWarnings("unchecked")
0416:            public void getCanReorder(
0417:                    org.directwebremoting.proxy.Callback<Integer> callback) {
0418:                ScriptBuffer script = new ScriptBuffer();
0419:                String callbackPrefix = "";
0420:
0421:                if (callback != null) {
0422:                    callbackPrefix = "var reply = ";
0423:                }
0424:
0425:                script.appendCall(callbackPrefix + getContextPath()
0426:                        + "getCanReorder");
0427:
0428:                if (callback != null) {
0429:                    String key = org.directwebremoting.extend.CallbackHelper
0430:                            .saveCallback(callback, Integer.class);
0431:                    script
0432:                            .appendCall("__System.activateCallback", key,
0433:                                    "reply");
0434:                }
0435:
0436:                getScriptProxy().addScript(script);
0437:            }
0438:
0439:            /**
0440:             * Sets whether the columns in the list can be re-ordered via user interaction with the VIEW
0441:             * @param REORDER one of: jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
0442:             */
0443:            public void setCanReorder(int REORDER) {
0444:                ScriptBuffer script = new ScriptBuffer();
0445:                script.appendCall(getContextPath() + "setCanReorder", REORDER);
0446:                getScriptProxy().addScript(script);
0447:            }
0448:
0449:            /**
0450:             * Applies focus to the on-screen row that corresponds to the element in the CDF source document identified by
0451:            strCdfId. Note that since only cells can receive focus, this method will apply focus to the
0452:            first cell child in the row.
0453:             * @param strCdfId jsxid property for CDF record
0454:             */
0455:            public void focusRowById(String strCdfId) {
0456:                ScriptBuffer script = new ScriptBuffer();
0457:                script.appendCall(getContextPath() + "focusRowById", strCdfId);
0458:                getScriptProxy().addScript(script);
0459:            }
0460:
0461:            /**
0462:             * Applies focus to the on-screen cell that corresponds to the intersection of the element in the CDF source
0463:            document identified by strCdfId, and the first column mapped to strAttName.
0464:             * @param strCdfId jsxid property for CDF record
0465:             * @param strAttName attribute name on the CDF record. For example, <code>jsxtext</code>
0466:             */
0467:            public void focusCellById(String strCdfId, String strAttName) {
0468:                ScriptBuffer script = new ScriptBuffer();
0469:                script.appendCall(getContextPath() + "focusCellById", strCdfId,
0470:                        strAttName);
0471:                getScriptProxy().addScript(script);
0472:            }
0473:
0474:            /**
0475:             * Applies focus to the on-screen cell that corresponds to the intersection of
0476:            the element in the CDF source document identified by strCdfId, and the cell at the given index.
0477:             * @param strCdfId jsxid property for CDF record
0478:             * @param intCellIndex zero-based index of cell (on-screen).
0479:             */
0480:            public void focusCellByIndex(String strCdfId, int intCellIndex) {
0481:                ScriptBuffer script = new ScriptBuffer();
0482:                script.appendCall(getContextPath() + "focusCellByIndex",
0483:                        strCdfId, intCellIndex);
0484:                getScriptProxy().addScript(script);
0485:            }
0486:
0487:            /**
0488:             * Returns the CSS string to apply to a Row/Cell when it has focus
0489:             * @param strDefault The default value to use if null (Matrix.FOCUS_STYLE)
0490:             */
0491:            @SuppressWarnings("unchecked")
0492:            public void getFocusStyle(String strDefault,
0493:                    org.directwebremoting.proxy.Callback<String> callback) {
0494:                ScriptBuffer script = new ScriptBuffer();
0495:                String callbackPrefix = "";
0496:
0497:                if (callback != null) {
0498:                    callbackPrefix = "var reply = ";
0499:                }
0500:
0501:                script.appendCall(callbackPrefix + getContextPath()
0502:                        + "getFocusStyle", strDefault);
0503:
0504:                if (callback != null) {
0505:                    String key = org.directwebremoting.extend.CallbackHelper
0506:                            .saveCallback(callback, String.class);
0507:                    script
0508:                            .appendCall("__System.activateCallback", key,
0509:                                    "reply");
0510:                }
0511:
0512:                getScriptProxy().addScript(script);
0513:            }
0514:
0515:            /**
0516:             * Sets the CSS string to apply to a Row/Cell when it has focus. NOTE: Passing
0517:            styles that affect position, left, top, width, height, border, background-image, padding, and margin
0518:            (those reserved by the class) can have undesired effects.
0519:             * @param strCSS Valid CSS. For example: font-weight:bold;color:orange;
0520:             */
0521:            public void setFocusStyle(String strCSS) {
0522:                ScriptBuffer script = new ScriptBuffer();
0523:                script.appendCall(getContextPath() + "setFocusStyle", strCSS);
0524:                getScriptProxy().addScript(script);
0525:            }
0526:
0527:            /**
0528:             * Removes the focus style from whichever cell is designated to have focus context. Once focus context
0529:            is applied to the active cell in a matrix, the focus style will continue to be applied to
0530:            the active cell until another cell is set as the active cell or the Matrix is repainted via
0531:            a call to repaint or repaintData.
0532:             * @param strId 
0533:             */
0534:            public void resetFocusContext(String strId) {
0535:                ScriptBuffer script = new ScriptBuffer();
0536:                script
0537:                        .appendCall(getContextPath() + "resetFocusContext",
0538:                                strId);
0539:                getScriptProxy().addScript(script);
0540:            }
0541:
0542:            /**
0543:             * Evaluates the JavaScript code in the jsxexecute attribute of one CDF record of this list.
0544:             * @param strRecordId the jsxid of the CDF record to execute.
0545:             */
0546:            public void executeRecord(String strRecordId) {
0547:                ScriptBuffer script = new ScriptBuffer();
0548:                script.appendCall(getContextPath() + "executeRecord",
0549:                        strRecordId);
0550:                getScriptProxy().addScript(script);
0551:            }
0552:
0553:            /**
0554:             * Returns the CSS string to apply to a Row/Cell when it has focus
0555:             * @param strDefault The default value to use if null (Matrix.SELECTION_BG)
0556:             */
0557:            @SuppressWarnings("unchecked")
0558:            public void getSelectionBG(String strDefault,
0559:                    org.directwebremoting.proxy.Callback<String> callback) {
0560:                ScriptBuffer script = new ScriptBuffer();
0561:                String callbackPrefix = "";
0562:
0563:                if (callback != null) {
0564:                    callbackPrefix = "var reply = ";
0565:                }
0566:
0567:                script.appendCall(callbackPrefix + getContextPath()
0568:                        + "getSelectionBG", strDefault);
0569:
0570:                if (callback != null) {
0571:                    String key = org.directwebremoting.extend.CallbackHelper
0572:                            .saveCallback(callback, String.class);
0573:                    script
0574:                            .appendCall("__System.activateCallback", key,
0575:                                    "reply");
0576:                }
0577:
0578:                getScriptProxy().addScript(script);
0579:            }
0580:
0581:            /**
0582:             * Sets the URL for the image to use (as the repeating background image) to denote selection.
0583:             * @param strURL 
0584:             */
0585:            public void setSelectionBG(String strURL) {
0586:                ScriptBuffer script = new ScriptBuffer();
0587:                script.appendCall(getContextPath() + "setSelectionBG", strURL);
0588:                getScriptProxy().addScript(script);
0589:            }
0590:
0591:            /**
0592:             * Returns the collection of selected records.
0593:             */
0594:            @SuppressWarnings("unchecked")
0595:            public void getSelectedNodes(
0596:                    org.directwebremoting.proxy.Callback<java.util.List> callback) {
0597:                ScriptBuffer script = new ScriptBuffer();
0598:                String callbackPrefix = "";
0599:
0600:                if (callback != null) {
0601:                    callbackPrefix = "var reply = ";
0602:                }
0603:
0604:                script.appendCall(callbackPrefix + getContextPath()
0605:                        + "getSelectedNodes");
0606:
0607:                if (callback != null) {
0608:                    String key = org.directwebremoting.extend.CallbackHelper
0609:                            .saveCallback(callback, java.util.List.class);
0610:                    script
0611:                            .appendCall("__System.activateCallback", key,
0612:                                    "reply");
0613:                }
0614:
0615:                getScriptProxy().addScript(script);
0616:            }
0617:
0618:            /**
0619:             * Returns the jsxid(s) for the selected record(s). Equivalent to this.getValue() except that the return value is always an Array.
0620:             * @param callback JavaScript array of stings
0621:             */
0622:            @SuppressWarnings("unchecked")
0623:            public void getSelectedIds(
0624:                    org.directwebremoting.proxy.Callback<Object[]> callback) {
0625:                ScriptBuffer script = new ScriptBuffer();
0626:                String callbackPrefix = "";
0627:
0628:                if (callback != null) {
0629:                    callbackPrefix = "var reply = ";
0630:                }
0631:
0632:                script.appendCall(callbackPrefix + getContextPath()
0633:                        + "getSelectedIds");
0634:
0635:                if (callback != null) {
0636:                    String key = org.directwebremoting.extend.CallbackHelper
0637:                            .saveCallback(callback, Object[].class);
0638:                    script
0639:                            .appendCall("__System.activateCallback", key,
0640:                                    "reply");
0641:                }
0642:
0643:                getScriptProxy().addScript(script);
0644:            }
0645:
0646:            /**
0647:             * Selects a CDF record of this list. The item will be highlighted in the view and the CDF data will be updated
0648:            accordingly. If this list is a multi-select list then this selection will be added to any previous selection.
0649:             * @param strRecordId the jsxid of the record to select.
0650:             */
0651:            public void selectRecord(String strRecordId) {
0652:                ScriptBuffer script = new ScriptBuffer();
0653:                script.appendCall(getContextPath() + "selectRecord",
0654:                        strRecordId);
0655:                getScriptProxy().addScript(script);
0656:            }
0657:
0658:            /**
0659:             * Deselects a CDF record within the Matrix. Both the view and the data model (CDF) will be updated
0660:             * @param strRecordId the jsxid of the record to deselect.
0661:             */
0662:            public void deselectRecord(String strRecordId) {
0663:                ScriptBuffer script = new ScriptBuffer();
0664:                script.appendCall(getContextPath() + "deselectRecord",
0665:                        strRecordId);
0666:                getScriptProxy().addScript(script);
0667:            }
0668:
0669:            /**
0670:             * Deselects all selected CDF records.
0671:             */
0672:            public void deselectAllRecords() {
0673:                ScriptBuffer script = new ScriptBuffer();
0674:                script.appendCall(getContextPath() + "deselectAllRecords");
0675:                getScriptProxy().addScript(script);
0676:            }
0677:
0678:            /**
0679:             * Returns an object array of name/value pairs representing the current auto row session. When the session is committed, this
0680:            object will be converted into a CDF Record for the instance.
0681:             */
0682:            @SuppressWarnings("unchecked")
0683:            public jsx3.lang.Object getAutoRowSession() {
0684:                String extension = "getAutoRowSession().";
0685:                try {
0686:                    java.lang.reflect.Constructor<jsx3.lang.Object> ctor = jsx3.lang.Object.class
0687:                            .getConstructor(Context.class, String.class,
0688:                                    ScriptProxy.class);
0689:                    return ctor.newInstance(this , extension, getScriptProxy());
0690:                } catch (Exception ex) {
0691:                    throw new IllegalArgumentException("Unsupported type: "
0692:                            + jsx3.lang.Object.class.getName());
0693:                }
0694:            }
0695:
0696:            /**
0697:             * Returns an object array of name/value pairs representing the current auto row session. When the session is committed, this
0698:            object will be converted into a CDF Record for the instance.
0699:             * @param returnType The expected return type
0700:             */
0701:            @SuppressWarnings("unchecked")
0702:            public <T> T getAutoRowSession(Class<T> returnType) {
0703:                String extension = "getAutoRowSession().";
0704:                try {
0705:                    java.lang.reflect.Constructor<T> ctor = returnType
0706:                            .getConstructor(Context.class, String.class,
0707:                                    ScriptProxy.class);
0708:                    return ctor.newInstance(this , extension, getScriptProxy());
0709:                } catch (Exception ex) {
0710:                    throw new IllegalArgumentException(
0711:                            "Unsupported return type: " + returnType.getName());
0712:                }
0713:            }
0714:
0715:            /**
0716:             * Commits any active autorow session.
0717:             * @param objEvent If passed, Allows Model Event to fire.
0718:             * @param intCellIndex Focus will be applied to the autorow cell at this index (zero-based)
0719:             */
0720:            public void commitAutoRowSession(jsx3.gui.Event objEvent,
0721:                    int intCellIndex) {
0722:                ScriptBuffer script = new ScriptBuffer();
0723:                script.appendCall(getContextPath() + "commitAutoRowSession",
0724:                        objEvent, intCellIndex);
0725:                getScriptProxy().addScript(script);
0726:            }
0727:
0728:            /**
0729:             * Toggles the open/closed state for a node in the Matrix
0730:             * @param strRecordId the 'jsxid' attribute on the given CDF record to toggle
0731:             * @param bOpen if null, the open state will be toggled
0732:             */
0733:            public void toggleItem(String strRecordId, boolean bOpen) {
0734:                ScriptBuffer script = new ScriptBuffer();
0735:                script.appendCall(getContextPath() + "toggleItem", strRecordId,
0736:                        bOpen);
0737:                getScriptProxy().addScript(script);
0738:            }
0739:
0740:            /**
0741:             * Reveals a record by toggling parent nodes open (if rendering hierarcally) and scrolling the record into view.
0742:             * @param strRecordId the id of the record to reveal
0743:             */
0744:            public void revealRecord(String strRecordId) {
0745:                ScriptBuffer script = new ScriptBuffer();
0746:                script.appendCall(getContextPath() + "revealRecord",
0747:                        strRecordId);
0748:                getScriptProxy().addScript(script);
0749:            }
0750:
0751:            /**
0752:             * Returns whether or not this column can be resized by the user. If not set, the column will be assumed resizable
0753:             */
0754:            @SuppressWarnings("unchecked")
0755:            public void getResizable(
0756:                    org.directwebremoting.proxy.Callback<Integer> callback) {
0757:                ScriptBuffer script = new ScriptBuffer();
0758:                String callbackPrefix = "";
0759:
0760:                if (callback != null) {
0761:                    callbackPrefix = "var reply = ";
0762:                }
0763:
0764:                script.appendCall(callbackPrefix + getContextPath()
0765:                        + "getResizable");
0766:
0767:                if (callback != null) {
0768:                    String key = org.directwebremoting.extend.CallbackHelper
0769:                            .saveCallback(callback, Integer.class);
0770:                    script
0771:                            .appendCall("__System.activateCallback", key,
0772:                                    "reply");
0773:                }
0774:
0775:                getScriptProxy().addScript(script);
0776:            }
0777:
0778:            /**
0779:             * Sets whether or not this column can be resized by the user. If not set, the column will be assumed resizable. Note that if the parent Matrix
0780:            is set as NOT resizable, this setting is ignored and no child columns can be resized
0781:             * @param RESIZE 
0782:             */
0783:            public void setResizable(int RESIZE) {
0784:                ScriptBuffer script = new ScriptBuffer();
0785:                script.appendCall(getContextPath() + "setResizable", RESIZE);
0786:                getScriptProxy().addScript(script);
0787:            }
0788:
0789:            /**
0790:             * Returns whether or not an 'auto append' row will be rendered, allowing the user to automatically add new rows to the instance.
0791:             * @param callback <code>jsx3.Boolean.TRUE</code> or <code>jsx3.Boolean.FALSE</code>
0792:             */
0793:            @SuppressWarnings("unchecked")
0794:            public void getAutoRow(
0795:                    org.directwebremoting.proxy.Callback<Integer> callback) {
0796:                ScriptBuffer script = new ScriptBuffer();
0797:                String callbackPrefix = "";
0798:
0799:                if (callback != null) {
0800:                    callbackPrefix = "var reply = ";
0801:                }
0802:
0803:                script.appendCall(callbackPrefix + getContextPath()
0804:                        + "getAutoRow");
0805:
0806:                if (callback != null) {
0807:                    String key = org.directwebremoting.extend.CallbackHelper
0808:                            .saveCallback(callback, Integer.class);
0809:                    script
0810:                            .appendCall("__System.activateCallback", key,
0811:                                    "reply");
0812:                }
0813:
0814:                getScriptProxy().addScript(script);
0815:            }
0816:
0817:            /**
0818:             * Sets whether or not an 'auto append' row will be rendered, allowing the user to automatically add new rows to the instance. Note
0819:            that if the rendering model is hierarchical or the paging model is jsx3.gui.Matrix.PAGING_PAGED, the auto row
0820:            feature is disabled.  The CSS style for the auto row (a TR element) can be modified via the XSL Parameters palette, via the XSL
0821:            parameter, jsx_autorow_style
0822:             * @param intBoolean jsx3.Boolean.TRUE if the column widths should be adjusted to fully fit within the viewport
0823:             */
0824:            public void setAutoRow(int intBoolean) {
0825:                ScriptBuffer script = new ScriptBuffer();
0826:                script.appendCall(getContextPath() + "setAutoRow", intBoolean);
0827:                getScriptProxy().addScript(script);
0828:            }
0829:
0830:            /**
0831:             * Returns the HTML element that represents the intersection of the row identified
0832:            by strCdfId and the first column mapped to the named CDF attribute, strAttName.
0833:             * @param strCdfId jsxid property for CDF record
0834:             * @param strAttName attribute name on the CDF record. For example, <code>jsxtext</code>
0835:             */
0836:            @SuppressWarnings("unchecked")
0837:            public void getContentElement(String strCdfId, String strAttName,
0838:                    org.directwebremoting.proxy.Callback<String> callback) {
0839:                ScriptBuffer script = new ScriptBuffer();
0840:                String callbackPrefix = "";
0841:
0842:                if (callback != null) {
0843:                    callbackPrefix = "var reply = ";
0844:                }
0845:
0846:                script.appendCall(callbackPrefix + getContextPath()
0847:                        + "getContentElement", strCdfId, strAttName);
0848:
0849:                if (callback != null) {
0850:                    String key = org.directwebremoting.extend.CallbackHelper
0851:                            .saveCallback(callback, String.class);
0852:                    script
0853:                            .appendCall("__System.activateCallback", key,
0854:                                    "reply");
0855:                }
0856:
0857:                getScriptProxy().addScript(script);
0858:            }
0859:
0860:            /**
0861:             * Removes the XML source document stored under the XML ID of this object from the server cache.
0862:             * @param objServer the server owning the cache to modify. This is a required argument only if
0863:            <code>this.getServer()</code> does not returns a server instance.
0864:             */
0865:            public void resetXmlCacheData(jsx3.app.Server objServer) {
0866:                ScriptBuffer script = new ScriptBuffer();
0867:                script.appendCall(getContextPath() + "resetXmlCacheData",
0868:                        objServer);
0869:                getScriptProxy().addScript(script);
0870:            }
0871:
0872:            /**
0873:             * Sets the XML ID of this object. This value is the key under which the XML source document of this object is
0874:            saved in the cache of the server owning this object. The developer may specify either a unique or shared value.
0875:            If no value is specified, a unique id is generated.
0876:             * @param strXMLId 
0877:             * @return this object.
0878:             */
0879:            @SuppressWarnings("unchecked")
0880:            public jsx3.xml.Cacheable setXMLId(String strXMLId) {
0881:                String extension = "setXMLId(\"" + strXMLId + "\").";
0882:                try {
0883:                    java.lang.reflect.Constructor<jsx3.xml.Cacheable> ctor = jsx3.xml.Cacheable.class
0884:                            .getConstructor(Context.class, String.class,
0885:                                    ScriptProxy.class);
0886:                    return ctor.newInstance(this , extension, getScriptProxy());
0887:                } catch (Exception ex) {
0888:                    throw new IllegalArgumentException("Unsupported type: "
0889:                            + jsx3.xml.Cacheable.class.getName());
0890:                }
0891:            }
0892:
0893:            /**
0894:             * Sets the XML ID of this object. This value is the key under which the XML source document of this object is
0895:            saved in the cache of the server owning this object. The developer may specify either a unique or shared value.
0896:            If no value is specified, a unique id is generated.
0897:             * @param strXMLId 
0898:             * @param returnType The expected return type
0899:             * @return this object.
0900:             */
0901:            @SuppressWarnings("unchecked")
0902:            public <T> T setXMLId(String strXMLId, Class<T> returnType) {
0903:                String extension = "setXMLId(\"" + strXMLId + "\").";
0904:                try {
0905:                    java.lang.reflect.Constructor<T> ctor = returnType
0906:                            .getConstructor(Context.class, String.class,
0907:                                    ScriptProxy.class);
0908:                    return ctor.newInstance(this , extension, getScriptProxy());
0909:                } catch (Exception ex) {
0910:                    throw new IllegalArgumentException(
0911:                            "Unsupported return type: " + returnType.getName());
0912:                }
0913:            }
0914:
0915:            /**
0916:             * Sets the XML string of this object. Setting this value to the string serialization of an XML document is one
0917:            way of specifying the source XML document of this object.
0918:             * @param strXML <code>null</code> or a well-formed serialized XML element.
0919:             * @return this object.
0920:             */
0921:            @SuppressWarnings("unchecked")
0922:            public jsx3.xml.Cacheable setXMLString(String strXML) {
0923:                String extension = "setXMLString(\"" + strXML + "\").";
0924:                try {
0925:                    java.lang.reflect.Constructor<jsx3.xml.Cacheable> ctor = jsx3.xml.Cacheable.class
0926:                            .getConstructor(Context.class, String.class,
0927:                                    ScriptProxy.class);
0928:                    return ctor.newInstance(this , extension, getScriptProxy());
0929:                } catch (Exception ex) {
0930:                    throw new IllegalArgumentException("Unsupported type: "
0931:                            + jsx3.xml.Cacheable.class.getName());
0932:                }
0933:            }
0934:
0935:            /**
0936:             * Sets the XML string of this object. Setting this value to the string serialization of an XML document is one
0937:            way of specifying the source XML document of this object.
0938:             * @param strXML <code>null</code> or a well-formed serialized XML element.
0939:             * @param returnType The expected return type
0940:             * @return this object.
0941:             */
0942:            @SuppressWarnings("unchecked")
0943:            public <T> T setXMLString(String strXML, Class<T> returnType) {
0944:                String extension = "setXMLString(\"" + strXML + "\").";
0945:                try {
0946:                    java.lang.reflect.Constructor<T> ctor = returnType
0947:                            .getConstructor(Context.class, String.class,
0948:                                    ScriptProxy.class);
0949:                    return ctor.newInstance(this , extension, getScriptProxy());
0950:                } catch (Exception ex) {
0951:                    throw new IllegalArgumentException(
0952:                            "Unsupported return type: " + returnType.getName());
0953:                }
0954:            }
0955:
0956:            /**
0957:             * Sets the XML URL of this object. Settings this value to the URI of an XML document is one way of specifying the
0958:            source XML document of this object.
0959:             * @param strXMLURL <code>null</code> or a URI that when resolved against the server owning this object
0960:            specifies a valid XML document.
0961:             * @return this object.
0962:             */
0963:            @SuppressWarnings("unchecked")
0964:            public jsx3.xml.Cacheable setXMLURL(String strXMLURL) {
0965:                String extension = "setXMLURL(\"" + strXMLURL + "\").";
0966:                try {
0967:                    java.lang.reflect.Constructor<jsx3.xml.Cacheable> ctor = jsx3.xml.Cacheable.class
0968:                            .getConstructor(Context.class, String.class,
0969:                                    ScriptProxy.class);
0970:                    return ctor.newInstance(this , extension, getScriptProxy());
0971:                } catch (Exception ex) {
0972:                    throw new IllegalArgumentException("Unsupported type: "
0973:                            + jsx3.xml.Cacheable.class.getName());
0974:                }
0975:            }
0976:
0977:            /**
0978:             * Sets the XML URL of this object. Settings this value to the URI of an XML document is one way of specifying the
0979:            source XML document of this object.
0980:             * @param strXMLURL <code>null</code> or a URI that when resolved against the server owning this object
0981:            specifies a valid XML document.
0982:             * @param returnType The expected return type
0983:             * @return this object.
0984:             */
0985:            @SuppressWarnings("unchecked")
0986:            public <T> T setXMLURL(String strXMLURL, Class<T> returnType) {
0987:                String extension = "setXMLURL(\"" + strXMLURL + "\").";
0988:                try {
0989:                    java.lang.reflect.Constructor<T> ctor = returnType
0990:                            .getConstructor(Context.class, String.class,
0991:                                    ScriptProxy.class);
0992:                    return ctor.newInstance(this , extension, getScriptProxy());
0993:                } catch (Exception ex) {
0994:                    throw new IllegalArgumentException(
0995:                            "Unsupported return type: " + returnType.getName());
0996:                }
0997:            }
0998:
0999:            /**
1000:             * Returns an array of all jsxid attributes in the source CDF in the order they would appear if painted on-screen
1001:             */
1002:            @SuppressWarnings("unchecked")
1003:            public void getSortedIds(
1004:                    org.directwebremoting.proxy.Callback<Object[]> callback) {
1005:                ScriptBuffer script = new ScriptBuffer();
1006:                String callbackPrefix = "";
1007:
1008:                if (callback != null) {
1009:                    callbackPrefix = "var reply = ";
1010:                }
1011:
1012:                script.appendCall(callbackPrefix + getContextPath()
1013:                        + "getSortedIds");
1014:
1015:                if (callback != null) {
1016:                    String key = org.directwebremoting.extend.CallbackHelper
1017:                            .saveCallback(callback, Object[].class);
1018:                    script
1019:                            .appendCall("__System.activateCallback", key,
1020:                                    "reply");
1021:                }
1022:
1023:                getScriptProxy().addScript(script);
1024:            }
1025:
1026:            /**
1027:             * Returns the selection model. If no selection type is specified, the instance will employ single row selection (SELECTION_ROW)
1028:             * @param strDefault The default value to use if null
1029:             */
1030:            @SuppressWarnings("unchecked")
1031:            public void getSelectionModel(String strDefault,
1032:                    org.directwebremoting.proxy.Callback<Integer> callback) {
1033:                ScriptBuffer script = new ScriptBuffer();
1034:                String callbackPrefix = "";
1035:
1036:                if (callback != null) {
1037:                    callbackPrefix = "var reply = ";
1038:                }
1039:
1040:                script.appendCall(callbackPrefix + getContextPath()
1041:                        + "getSelectionModel", strDefault);
1042:
1043:                if (callback != null) {
1044:                    String key = org.directwebremoting.extend.CallbackHelper
1045:                            .saveCallback(callback, Integer.class);
1046:                    script
1047:                            .appendCall("__System.activateCallback", key,
1048:                                    "reply");
1049:                }
1050:
1051:                getScriptProxy().addScript(script);
1052:            }
1053:
1054:            /**
1055:             * Sets the selection model
1056:             * @param intType one of Matrix: .SELECTION_UNSELECTABLE, .SELECTION_ROW, .SELECTION_MULTI_ROW
1057:             */
1058:            public void setSelectionModel(int intType) {
1059:                ScriptBuffer script = new ScriptBuffer();
1060:                script.appendCall(getContextPath() + "setSelectionModel",
1061:                        intType);
1062:                getScriptProxy().addScript(script);
1063:            }
1064:
1065:            /**
1066:             * Returns the row height
1067:             * @param strDefault The default value to use if null
1068:             */
1069:            @SuppressWarnings("unchecked")
1070:            public void getRowHeight(String strDefault,
1071:                    org.directwebremoting.proxy.Callback<Integer> callback) {
1072:                ScriptBuffer script = new ScriptBuffer();
1073:                String callbackPrefix = "";
1074:
1075:                if (callback != null) {
1076:                    callbackPrefix = "var reply = ";
1077:                }
1078:
1079:                script.appendCall(callbackPrefix + getContextPath()
1080:                        + "getRowHeight", strDefault);
1081:
1082:                if (callback != null) {
1083:                    String key = org.directwebremoting.extend.CallbackHelper
1084:                            .saveCallback(callback, Integer.class);
1085:                    script
1086:                            .appendCall("__System.activateCallback", key,
1087:                                    "reply");
1088:                }
1089:
1090:                getScriptProxy().addScript(script);
1091:            }
1092:
1093:            /**
1094:             * Sets the on-screen row height. If row height is null, the default row height will be used (Matrix.DEFAULT_ROW_HEIGHT).
1095:            If row height is 0, the row height is flexible and the row's height will expand to fit the content.
1096:             * @param intHeight height in pixels
1097:             * @param bSuppressRepaint Pass <code>true</code> to stop the default repaint from occurring.
1098:            Typically property updates that affect the browser-specific box model (such as padding) are repainted
1099:            immediately to keep the box model abstraction in synch with the native view. However, the repaint can be
1100:            suppressed to avoid unnecessary reparsing of the XSLT during repeated property updates.
1101:             */
1102:            public void setRowHeight(int intHeight, boolean bSuppressRepaint) {
1103:                ScriptBuffer script = new ScriptBuffer();
1104:                script.appendCall(getContextPath() + "setRowHeight", intHeight,
1105:                        bSuppressRepaint);
1106:                getScriptProxy().addScript(script);
1107:            }
1108:
1109:            /**
1110:             * Returns the number of rows each panel should contain.  If null, the default value will be used: jsx3.gui.Matrix.DEFAULT_ROWS_PER_PANEL
1111:             * @param strDefault The default value to use if null
1112:             */
1113:            @SuppressWarnings("unchecked")
1114:            public void getRowsPerPanel(String strDefault,
1115:                    org.directwebremoting.proxy.Callback<Integer> callback) {
1116:                ScriptBuffer script = new ScriptBuffer();
1117:                String callbackPrefix = "";
1118:
1119:                if (callback != null) {
1120:                    callbackPrefix = "var reply = ";
1121:                }
1122:
1123:                script.appendCall(callbackPrefix + getContextPath()
1124:                        + "getRowsPerPanel", strDefault);
1125:
1126:                if (callback != null) {
1127:                    String key = org.directwebremoting.extend.CallbackHelper
1128:                            .saveCallback(callback, Integer.class);
1129:                    script
1130:                            .appendCall("__System.activateCallback", key,
1131:                                    "reply");
1132:                }
1133:
1134:                getScriptProxy().addScript(script);
1135:            }
1136:
1137:            /**
1138:             * Sets the number of rows each panel should contain.
1139:             * @param intCount 
1140:             * @param bSuppressRepaint Pass <code>true</code> to stop the default repaint from occurring.
1141:             */
1142:            public void setRowsPerPanel(int intCount, boolean bSuppressRepaint) {
1143:                ScriptBuffer script = new ScriptBuffer();
1144:                script.appendCall(getContextPath() + "setRowsPerPanel",
1145:                        intCount, bSuppressRepaint);
1146:                getScriptProxy().addScript(script);
1147:            }
1148:
1149:            /**
1150:             * Sets the number of panels that are allowed in the queue waiting to be painted. If null, the default value will be used: jsx3.gui.Matrix.DEFAULT_PANEL_QUEUE_SIZE
1151:            Note that this is different from the number of painted panels allowed on screen (e.g., getPanelPoolSize()).
1152:             * @param strDefault The default value to use if null
1153:             */
1154:            @SuppressWarnings("unchecked")
1155:            public void getPanelQueueSize(String strDefault,
1156:                    org.directwebremoting.proxy.Callback<Integer> callback) {
1157:                ScriptBuffer script = new ScriptBuffer();
1158:                String callbackPrefix = "";
1159:
1160:                if (callback != null) {
1161:                    callbackPrefix = "var reply = ";
1162:                }
1163:
1164:                script.appendCall(callbackPrefix + getContextPath()
1165:                        + "getPanelQueueSize", strDefault);
1166:
1167:                if (callback != null) {
1168:                    String key = org.directwebremoting.extend.CallbackHelper
1169:                            .saveCallback(callback, Integer.class);
1170:                    script
1171:                            .appendCall("__System.activateCallback", key,
1172:                                    "reply");
1173:                }
1174:
1175:                getScriptProxy().addScript(script);
1176:            }
1177:
1178:            /**
1179:             * Sets the number of panels that are allowed in the queue waiting to be painted. Can be tuned up or down to optimize performance given the amount of data, connection speed, etc
1180:             * @param intCount 
1181:             */
1182:            public void setPanelQueueSize(int intCount) {
1183:                ScriptBuffer script = new ScriptBuffer();
1184:                script.appendCall(getContextPath() + "setPanelQueueSize",
1185:                        intCount);
1186:                getScriptProxy().addScript(script);
1187:            }
1188:
1189:            /**
1190:             * Returns the the number of milliseconds to wait before checking for inactive panels to garbage collect.  If null, the default value will be used: jsx3.gui.Matrix.DEFAULT_REAPER_INTERVAL
1191:             * @param strDefault The default value to use if null
1192:             */
1193:            @SuppressWarnings("unchecked")
1194:            public void getReaperInterval(String strDefault,
1195:                    org.directwebremoting.proxy.Callback<Integer> callback) {
1196:                ScriptBuffer script = new ScriptBuffer();
1197:                String callbackPrefix = "";
1198:
1199:                if (callback != null) {
1200:                    callbackPrefix = "var reply = ";
1201:                }
1202:
1203:                script.appendCall(callbackPrefix + getContextPath()
1204:                        + "getReaperInterval", strDefault);
1205:
1206:                if (callback != null) {
1207:                    String key = org.directwebremoting.extend.CallbackHelper
1208:                            .saveCallback(callback, Integer.class);
1209:                    script
1210:                            .appendCall("__System.activateCallback", key,
1211:                                    "reply");
1212:                }
1213:
1214:                getScriptProxy().addScript(script);
1215:            }
1216:
1217:            /**
1218:             * Sets the the number of milliseconds to wait before checking for inactive panels to garbage collect.
1219:             * @param intInterval number of milliseconds
1220:             */
1221:            public void setReaperInterval(int intInterval) {
1222:                ScriptBuffer script = new ScriptBuffer();
1223:                script.appendCall(getContextPath() + "setReaperInterval",
1224:                        intInterval);
1225:                getScriptProxy().addScript(script);
1226:            }
1227:
1228:            /**
1229:             * Returns the number panels (a panel contains a collection of rows--getRowsPerPanel()) that should be part of the pool.  If a panel count greater
1230:            than this value exists, the panels furthest away (as calculated by the scroll position) from the active panel will be destroyed. If this value is null,
1231:            the value defined by the constant, Matrix.DEFAULT_PANEL_POOL_COUNT, will be used.
1232:             * @param strDefault The default value to use if null
1233:             */
1234:            @SuppressWarnings("unchecked")
1235:            public void getPanelPoolSize(String strDefault,
1236:                    org.directwebremoting.proxy.Callback<Integer> callback) {
1237:                ScriptBuffer script = new ScriptBuffer();
1238:                String callbackPrefix = "";
1239:
1240:                if (callback != null) {
1241:                    callbackPrefix = "var reply = ";
1242:                }
1243:
1244:                script.appendCall(callbackPrefix + getContextPath()
1245:                        + "getPanelPoolSize", strDefault);
1246:
1247:                if (callback != null) {
1248:                    String key = org.directwebremoting.extend.CallbackHelper
1249:                            .saveCallback(callback, Integer.class);
1250:                    script
1251:                            .appendCall("__System.activateCallback", key,
1252:                                    "reply");
1253:                }
1254:
1255:                getScriptProxy().addScript(script);
1256:            }
1257:
1258:            /**
1259:             * Sets the number panels (a panel contains a collection of rows--getRowsPerPanel()) that should be part of the pool.
1260:             * @param intCount 
1261:             */
1262:            public void setPanelPoolSize(int intCount) {
1263:                ScriptBuffer script = new ScriptBuffer();
1264:                script.appendCall(getContextPath() + "setPanelPoolSize",
1265:                        intCount);
1266:                getScriptProxy().addScript(script);
1267:            }
1268:
1269:            /**
1270:             * Returns how data should be painted on-screen.  If no value is specified, Matrix.PAGING_OFF will be applied. Note that the rendering model limits the available paging models:
1271:
1272:                Matrix.PAGING_OFF: Paint everthing to screen at once (container and data) (rendering model: all)
1273:                
1274:            Matrix.PAGING_2PASS: Paint outer container and then perform a second pass to paint the data.  (rendering model: deep, shallow)
1275:                
1276:            Matrix.PAGING_CHUNKED: Paint outer container and then perform repeated paints until all data has been painted, regardless of scroll position.  (rendering model: deep, shallow)
1277:                
1278:            Matrix.PAGING_PAGED: Paint outer container. Paint First and last panels during second pass.  Paint relevant panels when user scrolls to a given position. Discard excess panels. (rendering model: deep, shallow)
1279:                
1280:            Matrix.PAGING_STEPPED: Paint root nodes and any open descendants. Paint others as they are toggled open. (rendering model: hierarchical)
1281:             * @param strDefault The default value to use if null
1282:             */
1283:            @SuppressWarnings("unchecked")
1284:            public void getPagingModel(String strDefault,
1285:                    org.directwebremoting.proxy.Callback<Integer> callback) {
1286:                ScriptBuffer script = new ScriptBuffer();
1287:                String callbackPrefix = "";
1288:
1289:                if (callback != null) {
1290:                    callbackPrefix = "var reply = ";
1291:                }
1292:
1293:                script.appendCall(callbackPrefix + getContextPath()
1294:                        + "getPagingModel", strDefault);
1295:
1296:                if (callback != null) {
1297:                    String key = org.directwebremoting.extend.CallbackHelper
1298:                            .saveCallback(callback, Integer.class);
1299:                    script
1300:                            .appendCall("__System.activateCallback", key,
1301:                                    "reply");
1302:                }
1303:
1304:                getScriptProxy().addScript(script);
1305:            }
1306:
1307:            /**
1308:             * Sets how data should be painted on-screen.  If no value is specified, Matrix.PAGING_OFF will be applied.
1309:             * @param intModel one of: Matrix. PAGING_OFF, PAGING_2PASS, PAGING_CHUNKED, PAGING_PAGED, PAGING_STEPPED
1310:             */
1311:            public void setPagingModel(int intModel) {
1312:                ScriptBuffer script = new ScriptBuffer();
1313:                script
1314:                        .appendCall(getContextPath() + "setPagingModel",
1315:                                intModel);
1316:                getScriptProxy().addScript(script);
1317:            }
1318:
1319:            /**
1320:             * Returns the height of the header row in pixels. If this value is not set (null), the list will render with
1321:            the default value of jsx3.gui.Matrix.DEFAULT_HEADER_HEIGHT.
1322:             * @param strDefault The default value to use if null
1323:             */
1324:            @SuppressWarnings("unchecked")
1325:            public void getHeaderHeight(String strDefault,
1326:                    org.directwebremoting.proxy.Callback<Integer> callback) {
1327:                ScriptBuffer script = new ScriptBuffer();
1328:                String callbackPrefix = "";
1329:
1330:                if (callback != null) {
1331:                    callbackPrefix = "var reply = ";
1332:                }
1333:
1334:                script.appendCall(callbackPrefix + getContextPath()
1335:                        + "getHeaderHeight", strDefault);
1336:
1337:                if (callback != null) {
1338:                    String key = org.directwebremoting.extend.CallbackHelper
1339:                            .saveCallback(callback, Integer.class);
1340:                    script
1341:                            .appendCall("__System.activateCallback", key,
1342:                                    "reply");
1343:                }
1344:
1345:                getScriptProxy().addScript(script);
1346:            }
1347:
1348:            /**
1349:             * Sets the height of the header row in pixels. Set to zero (0) to hide the header row and only render the body rows.
1350:             * @param intHeight 
1351:             * @param bSuppressRepaint Pass <code>true</code> to stop the default repaint from occurring.
1352:            Typically property updates that affect the browser-specific box model (such as height) are repainted
1353:            immediately to keep the box model abstraction in sync with the native view. However, the repaint can be
1354:            suppressed to avoid unnecessary reparsing of the XSLT during repeated property updates.
1355:             */
1356:            public void setHeaderHeight(int intHeight, boolean bSuppressRepaint) {
1357:                ScriptBuffer script = new ScriptBuffer();
1358:                script.appendCall(getContextPath() + "setHeaderHeight",
1359:                        intHeight, bSuppressRepaint);
1360:                getScriptProxy().addScript(script);
1361:            }
1362:
1363:            /**
1364:             * Returns the info label to display when scrolling a paged instance, in order to show the scroll position.
1365:             * @param strDefault The default value to use if null
1366:             */
1367:            @SuppressWarnings("unchecked")
1368:            public void getScrollInfoLabel(String strDefault,
1369:                    org.directwebremoting.proxy.Callback<Integer> callback) {
1370:                ScriptBuffer script = new ScriptBuffer();
1371:                String callbackPrefix = "";
1372:
1373:                if (callback != null) {
1374:                    callbackPrefix = "var reply = ";
1375:                }
1376:
1377:                script.appendCall(callbackPrefix + getContextPath()
1378:                        + "getScrollInfoLabel", strDefault);
1379:
1380:                if (callback != null) {
1381:                    String key = org.directwebremoting.extend.CallbackHelper
1382:                            .saveCallback(callback, Integer.class);
1383:                    script
1384:                            .appendCall("__System.activateCallback", key,
1385:                                    "reply");
1386:                }
1387:
1388:                getScriptProxy().addScript(script);
1389:            }
1390:
1391:            /**
1392:             * Sets the standard info label to display when scrolling to show the scroll position.  If no label is supplied
1393:            an appropriate localized value will be used. Set to an empty string to suppress any label from displaying.
1394:             * @param strLabel valid HTML/Text.  Set to an empty string to suppress any label from displaying.
1395:            <br/>Wildcards are as follows:
1396:            <ul><li><b>{0}</b> The index position of the first visible on-screen row</li>
1397:            <li><b>{1}</b> The index position of the last visible on-screen row</li>
1398:            <li><b>{2}</b> Total count of all records in the list</li></ul>
1399:             */
1400:            public void setScrollInfoLabel(String strLabel) {
1401:                ScriptBuffer script = new ScriptBuffer();
1402:                script.appendCall(getContextPath() + "setScrollInfoLabel",
1403:                        strLabel);
1404:                getScriptProxy().addScript(script);
1405:            }
1406:
1407:            /**
1408:             * Returns the horizontal scroll position of the list.
1409:             * @param callback a non-negative number
1410:             */
1411:            @SuppressWarnings("unchecked")
1412:            public void getScrollLeft(
1413:                    org.directwebremoting.proxy.Callback<Integer> callback) {
1414:                ScriptBuffer script = new ScriptBuffer();
1415:                String callbackPrefix = "";
1416:
1417:                if (callback != null) {
1418:                    callbackPrefix = "var reply = ";
1419:                }
1420:
1421:                script.appendCall(callbackPrefix + getContextPath()
1422:                        + "getScrollLeft");
1423:
1424:                if (callback != null) {
1425:                    String key = org.directwebremoting.extend.CallbackHelper
1426:                            .saveCallback(callback, Integer.class);
1427:                    script
1428:                            .appendCall("__System.activateCallback", key,
1429:                                    "reply");
1430:                }
1431:
1432:                getScriptProxy().addScript(script);
1433:            }
1434:
1435:            /**
1436:             * Sets the horizontal scroll position.
1437:             * @param intScrollLeft a non-negative number
1438:             */
1439:            public void setScrollLeft(int intScrollLeft) {
1440:                ScriptBuffer script = new ScriptBuffer();
1441:                script.appendCall(getContextPath() + "setScrollLeft",
1442:                        intScrollLeft);
1443:                getScriptProxy().addScript(script);
1444:            }
1445:
1446:            /**
1447:             * Returns the vertical scroll position.
1448:             * @param callback a non-negative number
1449:             */
1450:            @SuppressWarnings("unchecked")
1451:            public void getScrollTop(
1452:                    org.directwebremoting.proxy.Callback<Integer> callback) {
1453:                ScriptBuffer script = new ScriptBuffer();
1454:                String callbackPrefix = "";
1455:
1456:                if (callback != null) {
1457:                    callbackPrefix = "var reply = ";
1458:                }
1459:
1460:                script.appendCall(callbackPrefix + getContextPath()
1461:                        + "getScrollTop");
1462:
1463:                if (callback != null) {
1464:                    String key = org.directwebremoting.extend.CallbackHelper
1465:                            .saveCallback(callback, Integer.class);
1466:                    script
1467:                            .appendCall("__System.activateCallback", key,
1468:                                    "reply");
1469:                }
1470:
1471:                getScriptProxy().addScript(script);
1472:            }
1473:
1474:            /**
1475:             * Sets the vertical scroll position.
1476:             * @param intScrollTop a non-negative number
1477:             * @param objGUI 
1478:             */
1479:            public void setScrollTop(int intScrollTop, String objGUI) {
1480:                ScriptBuffer script = new ScriptBuffer();
1481:                script.appendCall(getContextPath() + "setScrollTop",
1482:                        intScrollTop, objGUI);
1483:                getScriptProxy().addScript(script);
1484:            }
1485:
1486:            /**
1487:             * Updates the scroll height and scroll position of the vertical scrollbar. When a Matrix instance has
1488:            a display property of none (or is contained by an ancestor with a display of none) and the Matrix is repainted (repaint/repaintData),
1489:            the browser will misreport how large the content actually is.  When the Matrix is then restored the scrollbars will be disabled.
1490:            By calling this method after the view has been restored (i.e., when display is set to block), the scrollbars will reflect the accurate height.
1491:             */
1492:            public void synchronizeVScroller() {
1493:                ScriptBuffer script = new ScriptBuffer();
1494:                script.appendCall(getContextPath() + "synchronizeVScroller");
1495:                getScriptProxy().addScript(script);
1496:            }
1497:
1498:            /**
1499:             * Returns whether or not the column widths should be adjusted (decremented) such that all columns fit within the viewport.
1500:            If null or jsx3.Boolean.FALSE, scale width will not be used and the column widths will render
1501:            fully, displaying a horizontal scrollbar when necessary. In such a case, all wildcard columns (e.g., *) will be resolved to the value,
1502:            jsx3.gui.Matrix.Column.DEFAULT_WIDTH.
1503:             */
1504:            @SuppressWarnings("unchecked")
1505:            public void getScaleWidth(
1506:                    org.directwebremoting.proxy.Callback<Integer> callback) {
1507:                ScriptBuffer script = new ScriptBuffer();
1508:                String callbackPrefix = "";
1509:
1510:                if (callback != null) {
1511:                    callbackPrefix = "var reply = ";
1512:                }
1513:
1514:                script.appendCall(callbackPrefix + getContextPath()
1515:                        + "getScaleWidth");
1516:
1517:                if (callback != null) {
1518:                    String key = org.directwebremoting.extend.CallbackHelper
1519:                            .saveCallback(callback, Integer.class);
1520:                    script
1521:                            .appendCall("__System.activateCallback", key,
1522:                                    "reply");
1523:                }
1524:
1525:                getScriptProxy().addScript(script);
1526:            }
1527:
1528:            /**
1529:             * Sets whether or not the column widths should be adjusted such that all columns visually display within the viewport.
1530:            Defaults to jsx3.Boolean.FALSE if not set, meaning a horizontal scrollbar will appear if the aggregate column widths
1531:            exceed the available width of the viewport.
1532:             * @param intBoolean One of: <code>jsx3.Boolean.TRUE</code> or <code>jsx3.Boolean.FALSE</code>
1533:             */
1534:            public void setScaleWidth(int intBoolean) {
1535:                ScriptBuffer script = new ScriptBuffer();
1536:                script.appendCall(getContextPath() + "setScaleWidth",
1537:                        intBoolean);
1538:                getScriptProxy().addScript(script);
1539:            }
1540:
1541:            /**
1542:             * Returns CSS property value(s) for a border (border: solid 1px #000000)
1543:             */
1544:            @SuppressWarnings("unchecked")
1545:            public void getHeaderBorder(
1546:                    org.directwebremoting.proxy.Callback<String> callback) {
1547:                ScriptBuffer script = new ScriptBuffer();
1548:                String callbackPrefix = "";
1549:
1550:                if (callback != null) {
1551:                    callbackPrefix = "var reply = ";
1552:                }
1553:
1554:                script.appendCall(callbackPrefix + getContextPath()
1555:                        + "getHeaderBorder");
1556:
1557:                if (callback != null) {
1558:                    String key = org.directwebremoting.extend.CallbackHelper
1559:                            .saveCallback(callback, String.class);
1560:                    script
1561:                            .appendCall("__System.activateCallback", key,
1562:                                    "reply");
1563:                }
1564:
1565:                getScriptProxy().addScript(script);
1566:            }
1567:
1568:            /**
1569:             * Sets CSS property value(s) for a border on the header row (border: solid 1px #000000). Updates both model and view.
1570:             * @param strCSS valid CSS property value for a border (border: solid 1px #000000)
1571:             */
1572:            public void setHeaderBorder(String strCSS) {
1573:                ScriptBuffer script = new ScriptBuffer();
1574:                script.appendCall(getContextPath() + "setHeaderBorder", strCSS);
1575:                getScriptProxy().addScript(script);
1576:            }
1577:
1578:            /**
1579:             * Returns CSS property value(s) for a border (border: solid 1px #000000)
1580:             */
1581:            @SuppressWarnings("unchecked")
1582:            public void getBodyBorder(
1583:                    org.directwebremoting.proxy.Callback<String> callback) {
1584:                ScriptBuffer script = new ScriptBuffer();
1585:                String callbackPrefix = "";
1586:
1587:                if (callback != null) {
1588:                    callbackPrefix = "var reply = ";
1589:                }
1590:
1591:                script.appendCall(callbackPrefix + getContextPath()
1592:                        + "getBodyBorder");
1593:
1594:                if (callback != null) {
1595:                    String key = org.directwebremoting.extend.CallbackHelper
1596:                            .saveCallback(callback, String.class);
1597:                    script
1598:                            .appendCall("__System.activateCallback", key,
1599:                                    "reply");
1600:                }
1601:
1602:                getScriptProxy().addScript(script);
1603:            }
1604:
1605:            /**
1606:             * Sets CSS property value(s) for a border (border: solid 1px #000000). Updates MODEL and VIEW (unless repaint is suppressed).
1607:             * @param strCSS valid CSS property value for a border (border: solid 1px #000000)
1608:             * @param bSuppressRepaint Pass <code>true</code> to stop the default repaint from occurring.
1609:            Typically property updates that affect the browser-specific box model (such as borders) are repainted
1610:            immediately to keep the box model abstraction in synch with the native view. However, the repaint can be
1611:            suppressed to avoid unnecessary reparsing of the XSLT during repeated property updates.
1612:             * @return this object
1613:             */
1614:            @SuppressWarnings("unchecked")
1615:            public jsx3.gui.Block setBodyBorder(String strCSS,
1616:                    boolean bSuppressRepaint) {
1617:                String extension = "setBodyBorder(\"" + strCSS + "\", \""
1618:                        + bSuppressRepaint + "\").";
1619:                try {
1620:                    java.lang.reflect.Constructor<jsx3.gui.Block> ctor = jsx3.gui.Block.class
1621:                            .getConstructor(Context.class, String.class,
1622:                                    ScriptProxy.class);
1623:                    return ctor.newInstance(this , extension, getScriptProxy());
1624:                } catch (Exception ex) {
1625:                    throw new IllegalArgumentException("Unsupported type: "
1626:                            + jsx3.gui.Block.class.getName());
1627:                }
1628:            }
1629:
1630:            /**
1631:             * Sets CSS property value(s) for a border (border: solid 1px #000000). Updates MODEL and VIEW (unless repaint is suppressed).
1632:             * @param strCSS valid CSS property value for a border (border: solid 1px #000000)
1633:             * @param bSuppressRepaint Pass <code>true</code> to stop the default repaint from occurring.
1634:            Typically property updates that affect the browser-specific box model (such as borders) are repainted
1635:            immediately to keep the box model abstraction in synch with the native view. However, the repaint can be
1636:            suppressed to avoid unnecessary reparsing of the XSLT during repeated property updates.
1637:             * @param returnType The expected return type
1638:             * @return this object
1639:             */
1640:            @SuppressWarnings("unchecked")
1641:            public <T> T setBodyBorder(String strCSS, boolean bSuppressRepaint,
1642:                    Class<T> returnType) {
1643:                String extension = "setBodyBorder(\"" + strCSS + "\", \""
1644:                        + bSuppressRepaint + "\").";
1645:                try {
1646:                    java.lang.reflect.Constructor<T> ctor = returnType
1647:                            .getConstructor(Context.class, String.class,
1648:                                    ScriptProxy.class);
1649:                    return ctor.newInstance(this , extension, getScriptProxy());
1650:                } catch (Exception ex) {
1651:                    throw new IllegalArgumentException(
1652:                            "Unsupported return type: " + returnType.getName());
1653:                }
1654:            }
1655:
1656:            /**
1657:             * Returns an array of selected values (or empty array) if the selection model is Matrix.SELECTION_MULTI_ROW. Returns a string (or null)
1658:            for the other selection models
1659:             */
1660:            @SuppressWarnings("unchecked")
1661:            public void getValue(
1662:                    org.directwebremoting.proxy.Callback<String> callback) {
1663:                ScriptBuffer script = new ScriptBuffer();
1664:                String callbackPrefix = "";
1665:
1666:                if (callback != null) {
1667:                    callbackPrefix = "var reply = ";
1668:                }
1669:
1670:                script.appendCall(callbackPrefix + getContextPath()
1671:                        + "getValue");
1672:
1673:                if (callback != null) {
1674:                    String key = org.directwebremoting.extend.CallbackHelper
1675:                            .saveCallback(callback, String.class);
1676:                    script
1677:                            .appendCall("__System.activateCallback", key,
1678:                                    "reply");
1679:                }
1680:
1681:                getScriptProxy().addScript(script);
1682:            }
1683:
1684:            /**
1685:             * 
1686:             * @param callback <code>jsx3.gui.Form.STATEINVALID</code> or <code>jsx3.gui.Form.STATEVALID</code>.
1687:             */
1688:            @SuppressWarnings("unchecked")
1689:            public void doValidate(
1690:                    org.directwebremoting.proxy.Callback<Integer> callback) {
1691:                ScriptBuffer script = new ScriptBuffer();
1692:                String callbackPrefix = "";
1693:
1694:                if (callback != null) {
1695:                    callbackPrefix = "var reply = ";
1696:                }
1697:
1698:                script.appendCall(callbackPrefix + getContextPath()
1699:                        + "doValidate");
1700:
1701:                if (callback != null) {
1702:                    String key = org.directwebremoting.extend.CallbackHelper
1703:                            .saveCallback(callback, Integer.class);
1704:                    script
1705:                            .appendCall("__System.activateCallback", key,
1706:                                    "reply");
1707:                }
1708:
1709:                getScriptProxy().addScript(script);
1710:            }
1711:
1712:            /**
1713:             * Returns the rendering model (how rows will be painted on-screen). If not set, the instance will render deep, meaning all descendants
1714:            of the rendering context will be painted on-screen.
1715:             * @param strDefault The default value to use if null
1716:             */
1717:            @SuppressWarnings("unchecked")
1718:            public void getRenderingModel(String strDefault,
1719:                    org.directwebremoting.proxy.Callback<String> callback) {
1720:                ScriptBuffer script = new ScriptBuffer();
1721:                String callbackPrefix = "";
1722:
1723:                if (callback != null) {
1724:                    callbackPrefix = "var reply = ";
1725:                }
1726:
1727:                script.appendCall(callbackPrefix + getContextPath()
1728:                        + "getRenderingModel", strDefault);
1729:
1730:                if (callback != null) {
1731:                    String key = org.directwebremoting.extend.CallbackHelper
1732:                            .saveCallback(callback, String.class);
1733:                    script
1734:                            .appendCall("__System.activateCallback", key,
1735:                                    "reply");
1736:                }
1737:
1738:                getScriptProxy().addScript(script);
1739:            }
1740:
1741:            /**
1742:             * Sets the rendering model (how rows will be painted on-screen).
1743:             * @param MODEL one of: shallow, deep, or hierarchical
1744:             * @param bSuppressRepaint Pass <code>true</code> to stop the default repaint from occurring.
1745:             */
1746:            public void setRenderingModel(String MODEL, boolean bSuppressRepaint) {
1747:                ScriptBuffer script = new ScriptBuffer();
1748:                script.appendCall(getContextPath() + "setRenderingModel",
1749:                        MODEL, bSuppressRepaint);
1750:                getScriptProxy().addScript(script);
1751:            }
1752:
1753:            /**
1754:             * Returns the jsxid of the CDF record that will serve as the origin when rendering the data on-screen. If not set, the
1755:            id, jsxroot, (which is the id for the root node, <data>) will be used.
1756:             * @param strDefault The default value to use if null
1757:             */
1758:            @SuppressWarnings("unchecked")
1759:            public void getRenderingContext(String strDefault,
1760:                    org.directwebremoting.proxy.Callback<String> callback) {
1761:                ScriptBuffer script = new ScriptBuffer();
1762:                String callbackPrefix = "";
1763:
1764:                if (callback != null) {
1765:                    callbackPrefix = "var reply = ";
1766:                }
1767:
1768:                script.appendCall(callbackPrefix + getContextPath()
1769:                        + "getRenderingContext", strDefault);
1770:
1771:                if (callback != null) {
1772:                    String key = org.directwebremoting.extend.CallbackHelper
1773:                            .saveCallback(callback, String.class);
1774:                    script
1775:                            .appendCall("__System.activateCallback", key,
1776:                                    "reply");
1777:                }
1778:
1779:                getScriptProxy().addScript(script);
1780:            }
1781:
1782:            /**
1783:             * Sets the jsxid of the CDF record that will serve as the origin when rendering the data on-screen.
1784:             * @param strJsxId jsxid property for the CDF record to use as the contextual root when rendering data on-screen.
1785:             * @param bSuppressRepaint Pass <code>true</code> to stop the default repaint from occurring.
1786:             */
1787:            public void setRenderingContext(String strJsxId,
1788:                    boolean bSuppressRepaint) {
1789:                ScriptBuffer script = new ScriptBuffer();
1790:                script.appendCall(getContextPath() + "setRenderingContext",
1791:                        strJsxId, bSuppressRepaint);
1792:                getScriptProxy().addScript(script);
1793:            }
1794:
1795:            /**
1796:             * Returns whether or not to supress display of the horizontal scrollbar. When not set, the scrollbar will display as needed.
1797:             * @param strDefault The default value to use if null
1798:             * @param callback <code>jsx3.Boolean.TRUE</code> or <code>jsx3.Boolean.FALSE</code>
1799:             */
1800:            @SuppressWarnings("unchecked")
1801:            public void getSuppressHScroller(String strDefault,
1802:                    org.directwebremoting.proxy.Callback<Integer> callback) {
1803:                ScriptBuffer script = new ScriptBuffer();
1804:                String callbackPrefix = "";
1805:
1806:                if (callback != null) {
1807:                    callbackPrefix = "var reply = ";
1808:                }
1809:
1810:                script.appendCall(callbackPrefix + getContextPath()
1811:                        + "getSuppressHScroller", strDefault);
1812:
1813:                if (callback != null) {
1814:                    String key = org.directwebremoting.extend.CallbackHelper
1815:                            .saveCallback(callback, Integer.class);
1816:                    script
1817:                            .appendCall("__System.activateCallback", key,
1818:                                    "reply");
1819:                }
1820:
1821:                getScriptProxy().addScript(script);
1822:            }
1823:
1824:            /**
1825:             * Sets whether or not to supress display of the horizontal scrollbar. Updates both model and view
1826:             * @param intTrueFalse <code>jsx3.Boolean.TRUE</code> or <code>jsx3.Boolean.FALSE</code>
1827:             */
1828:            public void setSuppressHScroller(int intTrueFalse) {
1829:                ScriptBuffer script = new ScriptBuffer();
1830:                script.appendCall(getContextPath() + "setSuppressHScroller",
1831:                        intTrueFalse);
1832:                getScriptProxy().addScript(script);
1833:            }
1834:
1835:            /**
1836:             * Returns whether or not to supress display of the vertical scrollbar. When not set, the scrollbar will display as needed.
1837:             * @param strDefault The default value to use if null
1838:             * @param callback <code>jsx3.Boolean.TRUE</code> or <code>jsx3.Boolean.FALSE</code>
1839:             */
1840:            @SuppressWarnings("unchecked")
1841:            public void getSuppressVScroller(String strDefault,
1842:                    org.directwebremoting.proxy.Callback<Integer> callback) {
1843:                ScriptBuffer script = new ScriptBuffer();
1844:                String callbackPrefix = "";
1845:
1846:                if (callback != null) {
1847:                    callbackPrefix = "var reply = ";
1848:                }
1849:
1850:                script.appendCall(callbackPrefix + getContextPath()
1851:                        + "getSuppressVScroller", strDefault);
1852:
1853:                if (callback != null) {
1854:                    String key = org.directwebremoting.extend.CallbackHelper
1855:                            .saveCallback(callback, Integer.class);
1856:                    script
1857:                            .appendCall("__System.activateCallback", key,
1858:                                    "reply");
1859:                }
1860:
1861:                getScriptProxy().addScript(script);
1862:            }
1863:
1864:            /**
1865:             * Sets whether or not to supress display of the vertical scrollbar. Updates both model and view.
1866:             * @param intTrueFalse <code>jsx3.Boolean.TRUE</code> or <code>jsx3.Boolean.FALSE</code>
1867:             * @param bSuppressRepaint Pass <code>true</code> to stop the default repaint from occurring.
1868:            Typically property updates that affect the browser-specific box model (such as rendering the vertical scrollbar) are repainted
1869:            immediately to keep the box model abstraction in synch with the native view. However, the repaint can be
1870:            suppressed to avoid unnecessary reparsing of the XSLT during repeated property updates.
1871:             */
1872:            public void setSuppressVScroller(int intTrueFalse,
1873:                    boolean bSuppressRepaint) {
1874:                ScriptBuffer script = new ScriptBuffer();
1875:                script.appendCall(getContextPath() + "setSuppressVScroller",
1876:                        intTrueFalse, bSuppressRepaint);
1877:                getScriptProxy().addScript(script);
1878:            }
1879:
1880:            /**
1881:             * Returns the zero-based index of the on-screen column(s), to the left of which will be fixed and cannot be reordered.  For example, if this value
1882:            is set to 1, the first column can never be reordered and will always remain the first column.  If this value is set to 2,
1883:            the first two columns will be fixed.  Setting this value to 0 is effectively the same as setting it to null
1884:             * @param strDefault The default value to use if null
1885:             * @param callback positive integer
1886:             */
1887:            @SuppressWarnings("unchecked")
1888:            public void getFixedColumnIndex(String strDefault,
1889:                    org.directwebremoting.proxy.Callback<Integer> callback) {
1890:                ScriptBuffer script = new ScriptBuffer();
1891:                String callbackPrefix = "";
1892:
1893:                if (callback != null) {
1894:                    callbackPrefix = "var reply = ";
1895:                }
1896:
1897:                script.appendCall(callbackPrefix + getContextPath()
1898:                        + "getFixedColumnIndex", strDefault);
1899:
1900:                if (callback != null) {
1901:                    String key = org.directwebremoting.extend.CallbackHelper
1902:                            .saveCallback(callback, Integer.class);
1903:                    script
1904:                            .appendCall("__System.activateCallback", key,
1905:                                    "reply");
1906:                }
1907:
1908:                getScriptProxy().addScript(script);
1909:            }
1910:
1911:            /**
1912:             * Sets the zero-based index of the on-screen column(s), to the left of which will be fixed and cannot be reordered.
1913:             * @param intIndex positive integer
1914:             */
1915:            public void setFixedColumnIndex(int intIndex) {
1916:                ScriptBuffer script = new ScriptBuffer();
1917:                script.appendCall(getContextPath() + "setFixedColumnIndex",
1918:                        intIndex);
1919:                getScriptProxy().addScript(script);
1920:            }
1921:
1922:            /**
1923:             * Returns whether or not to render the navigation controls that are applied to the first column when rendering model is hierarchical.  When not set the navigators are rendered.
1924:             * @param strDefault The default value to use if null
1925:             * @param callback <code>jsx3.Boolean.TRUE</code> or <code>jsx3.Boolean.FALSE</code>
1926:             */
1927:            @SuppressWarnings("unchecked")
1928:            public void getRenderNavigators(String strDefault,
1929:                    org.directwebremoting.proxy.Callback<Integer> callback) {
1930:                ScriptBuffer script = new ScriptBuffer();
1931:                String callbackPrefix = "";
1932:
1933:                if (callback != null) {
1934:                    callbackPrefix = "var reply = ";
1935:                }
1936:
1937:                script.appendCall(callbackPrefix + getContextPath()
1938:                        + "getRenderNavigators", strDefault);
1939:
1940:                if (callback != null) {
1941:                    String key = org.directwebremoting.extend.CallbackHelper
1942:                            .saveCallback(callback, Integer.class);
1943:                    script
1944:                            .appendCall("__System.activateCallback", key,
1945:                                    "reply");
1946:                }
1947:
1948:                getScriptProxy().addScript(script);
1949:            }
1950:
1951:            /**
1952:             * Sets whether or not to render the navigation controls on the first column when being rendered in hierarchical mode.
1953:             * @param intTrueFalse <code>jsx3.Boolean.TRUE</code> or <code>jsx3.Boolean.FALSE</code>
1954:             * @param bSuppressRepaint Pass <code>true</code> to stop the default repaint from occurring.
1955:            Typically property updates that affect the browser-specific box model (such as rendering the navigational controls) are repainted
1956:            immediately to keep the box model abstraction in synch with the native view. However, the repaint can be
1957:            suppressed to avoid unnecessary reparsing of the XSLT during repeated property updates.
1958:             */
1959:            public void setRenderNavigators(int intTrueFalse,
1960:                    boolean bSuppressRepaint) {
1961:                ScriptBuffer script = new ScriptBuffer();
1962:                script.appendCall(getContextPath() + "setRenderNavigators",
1963:                        intTrueFalse, bSuppressRepaint);
1964:                getScriptProxy().addScript(script);
1965:            }
1966:
1967:            /**
1968:             * Returns the icon to use for those CDF records that do not explicitly specify an icon via the jsximg attribute
1969:             * @param strDefault The default value to use if null
1970:             * @param callback URL for icon to use. If null, <code>jsx3.gui.Matrix.ICON</code> will be applied when rendered.
1971:             */
1972:            @SuppressWarnings("unchecked")
1973:            public void getIcon(String strDefault,
1974:                    org.directwebremoting.proxy.Callback<String> callback) {
1975:                ScriptBuffer script = new ScriptBuffer();
1976:                String callbackPrefix = "";
1977:
1978:                if (callback != null) {
1979:                    callbackPrefix = "var reply = ";
1980:                }
1981:
1982:                script.appendCall(
1983:                        callbackPrefix + getContextPath() + "getIcon",
1984:                        strDefault);
1985:
1986:                if (callback != null) {
1987:                    String key = org.directwebremoting.extend.CallbackHelper
1988:                            .saveCallback(callback, String.class);
1989:                    script
1990:                            .appendCall("__System.activateCallback", key,
1991:                                    "reply");
1992:                }
1993:
1994:                getScriptProxy().addScript(script);
1995:            }
1996:
1997:            /**
1998:             * Sets the icon to use for those CDF records that do not explicitly specify an icon via the jsximg attribute
1999:             * @param strURL URL for icon to use
2000:             */
2001:            public void setIcon(String strURL) {
2002:                ScriptBuffer script = new ScriptBuffer();
2003:                script.appendCall(getContextPath() + "setIcon", strURL);
2004:                getScriptProxy().addScript(script);
2005:            }
2006:
2007:            /**
2008:             * Returns the icon to use when the given tree node is in an open state.
2009:             * @param strDefault The default value to use if null
2010:             * @param callback URL for icon. If null, <code>jsx3.gui.Matrix.ICON_MINUS</code> will be applied when rendered.
2011:             */
2012:            @SuppressWarnings("unchecked")
2013:            public void getIconMinus(String strDefault,
2014:                    org.directwebremoting.proxy.Callback<String> callback) {
2015:                ScriptBuffer script = new ScriptBuffer();
2016:                String callbackPrefix = "";
2017:
2018:                if (callback != null) {
2019:                    callbackPrefix = "var reply = ";
2020:                }
2021:
2022:                script.appendCall(callbackPrefix + getContextPath()
2023:                        + "getIconMinus", strDefault);
2024:
2025:                if (callback != null) {
2026:                    String key = org.directwebremoting.extend.CallbackHelper
2027:                            .saveCallback(callback, String.class);
2028:                    script
2029:                            .appendCall("__System.activateCallback", key,
2030:                                    "reply");
2031:                }
2032:
2033:                getScriptProxy().addScript(script);
2034:            }
2035:
2036:            /**
2037:             * Sets the icon to use when the given tree node is in an open state.
2038:             * @param strURL URL (preferably relative)
2039:             */
2040:            public void setIconMinus(String strURL) {
2041:                ScriptBuffer script = new ScriptBuffer();
2042:                script.appendCall(getContextPath() + "setIconMinus", strURL);
2043:                getScriptProxy().addScript(script);
2044:            }
2045:
2046:            /**
2047:             * Returns the icon to use when the given tree node is in a closed state.
2048:             * @param strDefault The default value to use if null
2049:             * @param callback URL for icon to use. If null, <code>jsx3.gui.Matrix.ICON_PLUS</code> will be applied when rendered.
2050:             */
2051:            @SuppressWarnings("unchecked")
2052:            public void getIconPlus(String strDefault,
2053:                    org.directwebremoting.proxy.Callback<String> callback) {
2054:                ScriptBuffer script = new ScriptBuffer();
2055:                String callbackPrefix = "";
2056:
2057:                if (callback != null) {
2058:                    callbackPrefix = "var reply = ";
2059:                }
2060:
2061:                script.appendCall(callbackPrefix + getContextPath()
2062:                        + "getIconPlus", strDefault);
2063:
2064:                if (callback != null) {
2065:                    String key = org.directwebremoting.extend.CallbackHelper
2066:                            .saveCallback(callback, String.class);
2067:                    script
2068:                            .appendCall("__System.activateCallback", key,
2069:                                    "reply");
2070:                }
2071:
2072:                getScriptProxy().addScript(script);
2073:            }
2074:
2075:            /**
2076:             * Sets the icon to use when the given tree node is in a closed state.
2077:             * @param strURL URL (preferably relative)
2078:             */
2079:            public void setIconPlus(String strURL) {
2080:                ScriptBuffer script = new ScriptBuffer();
2081:                script.appendCall(getContextPath() + "setIconPlus", strURL);
2082:                getScriptProxy().addScript(script);
2083:            }
2084:
2085:            /**
2086:             * Removes a record from the XML data source of this object.
2087:             * @param strRecordId the <code>jsxid</code> attribute of the data record to remove.
2088:             * @param bRedraw if <code>true</code> or <code>null</code>, the on-screen view of this object is
2089:            immediately updated to reflect the deleted record.
2090:             * @return the record removed from the data source or <code>null</code> if no such record found.
2091:             */
2092:            @SuppressWarnings("unchecked")
2093:            public jsx3.xml.Node deleteRecord(String strRecordId,
2094:                    boolean bRedraw) {
2095:                String extension = "deleteRecord(\"" + strRecordId + "\", \""
2096:                        + bRedraw + "\").";
2097:                try {
2098:                    java.lang.reflect.Constructor<jsx3.xml.Node> ctor = jsx3.xml.Node.class
2099:                            .getConstructor(Context.class, String.class,
2100:                                    ScriptProxy.class);
2101:                    return ctor.newInstance(this , extension, getScriptProxy());
2102:                } catch (Exception ex) {
2103:                    throw new IllegalArgumentException("Unsupported type: "
2104:                            + jsx3.xml.Node.class.getName());
2105:                }
2106:            }
2107:
2108:            /**
2109:             * Inserts a new property into an existing record with jsxid equal to strRecordId.
2110:            If the property already exists, the existing property value will be updated. If no such record exists
2111:            in the XML document, this method fails quietly.
2112:             * @param strRecordId the <code>jsxid</code> attribute of the data record to modify.
2113:             * @param strPropName the name of the property to insert into the record.
2114:             * @param strPropValue the value of the property to insert.
2115:             * @param bRedraw if <code>true</code> or <code>null</code>, the on-screen view of this object is
2116:            immediately updated to reflect the inserted property.
2117:             * @return this object.
2118:             */
2119:            @SuppressWarnings("unchecked")
2120:            public jsx3.xml.CdfDocument insertRecordProperty(
2121:                    String strRecordId, String strPropName,
2122:                    String strPropValue, boolean bRedraw) {
2123:                String extension = "insertRecordProperty(\"" + strRecordId
2124:                        + "\", \"" + strPropName + "\", \"" + strPropValue
2125:                        + "\", \"" + bRedraw + "\").";
2126:                try {
2127:                    java.lang.reflect.Constructor<jsx3.xml.CdfDocument> ctor = jsx3.xml.CdfDocument.class
2128:                            .getConstructor(Context.class, String.class,
2129:                                    ScriptProxy.class);
2130:                    return ctor.newInstance(this , extension, getScriptProxy());
2131:                } catch (Exception ex) {
2132:                    throw new IllegalArgumentException("Unsupported type: "
2133:                            + jsx3.xml.CdfDocument.class.getName());
2134:                }
2135:            }
2136:
2137:            /**
2138:             * Inserts a new property into an existing record with jsxid equal to strRecordId.
2139:            If the property already exists, the existing property value will be updated. If no such record exists
2140:            in the XML document, this method fails quietly.
2141:             * @param strRecordId the <code>jsxid</code> attribute of the data record to modify.
2142:             * @param strPropName the name of the property to insert into the record.
2143:             * @param strPropValue the value of the property to insert.
2144:             * @param bRedraw if <code>true</code> or <code>null</code>, the on-screen view of this object is
2145:            immediately updated to reflect the inserted property.
2146:             * @param returnType The expected return type
2147:             * @return this object.
2148:             */
2149:            @SuppressWarnings("unchecked")
2150:            public <T> T insertRecordProperty(String strRecordId,
2151:                    String strPropName, String strPropValue, boolean bRedraw,
2152:                    Class<T> returnType) {
2153:                String extension = "insertRecordProperty(\"" + strRecordId
2154:                        + "\", \"" + strPropName + "\", \"" + strPropValue
2155:                        + "\", \"" + bRedraw + "\").";
2156:                try {
2157:                    java.lang.reflect.Constructor<T> ctor = returnType
2158:                            .getConstructor(Context.class, String.class,
2159:                                    ScriptProxy.class);
2160:                    return ctor.newInstance(this , extension, getScriptProxy());
2161:                } catch (Exception ex) {
2162:                    throw new IllegalArgumentException(
2163:                            "Unsupported return type: " + returnType.getName());
2164:                }
2165:            }
2166:
2167:            /**
2168:             * Updates the on-screen cell to reflect the value in the CDF document to which the cell is mapped.
2169:             * @param strRecordId <code>jsxid</code> value for the record node (according to the CDF) corresponding to the on-screen row to update
2170:             * @param objColumn Column instance to update. Any sibling Columns that map to the same named attribute as <b>objColumn</b>
2171:            (e.g., <code>[objColumn].getPath()</code>) as well as all sibling Columns that are triggered by the named attribute
2172:            (e.g., <code>[objColumn].getTriggers()</code>) will also be redrawn.
2173:             * @param bSuppressTriggers if true, no other sibling Columns will be updated, even if they share a common path or designate the path as one of their triggers.
2174:             */
2175:            public void redrawCell(String strRecordId,
2176:                    jsx3.gui.matrix.Column objColumn, boolean bSuppressTriggers) {
2177:                ScriptBuffer script = new ScriptBuffer();
2178:                script.appendCall(getContextPath() + "redrawCell", strRecordId,
2179:                        objColumn, bSuppressTriggers);
2180:                getScriptProxy().addScript(script);
2181:            }
2182:
2183:            /**
2184:             * Updates the on-screen cell to reflect the value in the CDF document to which the cell is mapped.
2185:             * @param strRecordId The <code>jsxid</code> value for the record node (according to the CDF) corresponding to the on-screen row to update
2186:             * @param strAttName Named attribute on the CDF record. All Column children that map to this named attribute
2187:            (e.g., <code>[objColumn].getPath()</code>) as well as all Column children that are triggered by the named attribute
2188:            (e.g., <code>[objColumn].getTriggers()</code>) will be redrawn.
2189:             */
2190:            public void redrawMappedCells(String strRecordId, String strAttName) {
2191:                ScriptBuffer script = new ScriptBuffer();
2192:                script.appendCall(getContextPath() + "redrawMappedCells",
2193:                        strRecordId, strAttName);
2194:                getScriptProxy().addScript(script);
2195:            }
2196:
2197:            /**
2198:             * Matrix implementation.
2199:             * @param strRecordId <code>jsxid</code> value for the record node (according to the CDF) to redraw
2200:             * @param intAction <code>jsx3.xml.CDF.INSERT</code>, <code>jsx3.xml.CDF.INSERTBEFORE</code>, <code>jsx3.xml.CDF.DELETE</code>, or <code>jsx3.xml.CDF.UPDATE</code>.
2201:             * @param bRecurse if != false, any necessary recursion for flattened inserts will be automatically handled
2202:             */
2203:            public void redrawRecord(String strRecordId, int intAction,
2204:                    boolean bRecurse) {
2205:                ScriptBuffer script = new ScriptBuffer();
2206:                script.appendCall(getContextPath() + "redrawRecord",
2207:                        strRecordId, intAction, bRecurse);
2208:                getScriptProxy().addScript(script);
2209:            }
2210:
2211:            /**
2212:             * Sets the value of this matrix. Deselects all existing selections. Scrolls the first record into view.
2213:             * @param strId jsxid attribute for the CDF record(s) to select
2214:             * @return this object.
2215:             */
2216:            public jsx3.gui.Matrix setValue(Object[] strId) {
2217:                ScriptBuffer script = new ScriptBuffer();
2218:                script.appendCall(getContextPath() + "setValue", strId);
2219:                getScriptProxy().addScript(script);
2220:                return this ;
2221:            }
2222:
2223:            /**
2224:             * Sets the value of this matrix. Deselects all existing selections. Scrolls the first record into view.
2225:             * @param strId jsxid attribute for the CDF record(s) to select
2226:             * @return this object.
2227:             */
2228:            public jsx3.gui.Matrix setValue(String strId) {
2229:                ScriptBuffer script = new ScriptBuffer();
2230:                script.appendCall(getContextPath() + "setValue", strId);
2231:                getScriptProxy().addScript(script);
2232:                return this ;
2233:            }
2234:
2235:            /**
2236:             * Binds the given key sequence to a callback function. Any object that has a key binding (specified with
2237:            setKeyBinding()) will call this method when painted to register the key sequence with an appropriate
2238:            ancestor of this form control. Any key down event that bubbles up to the ancestor without being intercepted
2239:            and matches the given key sequence will invoke the given callback function.
2240:
2241:            As of 3.2: The hot key will be registered with the first ancestor found that is either a
2242:            jsx3.gui.Window, a jsx3.gui.Dialog, or the root block of a jsx3.app.Server.
2243:             * @param fctCallback JavaScript function to execute when the given sequence is keyed by the user.
2244:             * @param strKeys a plus-delimited ('+') key sequence such as <code>ctrl+s</code> or
2245:            <code>ctrl+shift+alt+h</code> or <code>shift+a</code>, etc. Any combination of shift, ctrl, and alt are
2246:            supported, including none. Also supported as the final token are <code>enter</code>, <code>esc</code>,
2247:            <code>tab</code>, <code>del</code>, and <code>space</code>. To specify the final token as a key code, the
2248:            last token can be the key code contained in brackets, <code>[13]</code>.
2249:             * @return the registered hot key.
2250:             */
2251:            @SuppressWarnings("unchecked")
2252:            public jsx3.gui.HotKey doKeyBinding(
2253:                    org.directwebremoting.proxy.CodeBlock fctCallback,
2254:                    String strKeys) {
2255:                String extension = "doKeyBinding(\"" + fctCallback + "\", \""
2256:                        + strKeys + "\").";
2257:                try {
2258:                    java.lang.reflect.Constructor<jsx3.gui.HotKey> ctor = jsx3.gui.HotKey.class
2259:                            .getConstructor(Context.class, String.class,
2260:                                    ScriptProxy.class);
2261:                    return ctor.newInstance(this , extension, getScriptProxy());
2262:                } catch (Exception ex) {
2263:                    throw new IllegalArgumentException("Unsupported type: "
2264:                            + jsx3.gui.HotKey.class.getName());
2265:                }
2266:            }
2267:
2268:            /**
2269:             * Resets the validation state of this control.
2270:             * @return this object.
2271:             */
2272:            @SuppressWarnings("unchecked")
2273:            public jsx3.gui.Form doReset() {
2274:                String extension = "doReset().";
2275:                try {
2276:                    java.lang.reflect.Constructor<jsx3.gui.Form> ctor = jsx3.gui.Form.class
2277:                            .getConstructor(Context.class, String.class,
2278:                                    ScriptProxy.class);
2279:                    return ctor.newInstance(this , extension, getScriptProxy());
2280:                } catch (Exception ex) {
2281:                    throw new IllegalArgumentException("Unsupported type: "
2282:                            + jsx3.gui.Form.class.getName());
2283:                }
2284:            }
2285:
2286:            /**
2287:             * Resets the validation state of this control.
2288:             * @param returnType The expected return type
2289:             * @return this object.
2290:             */
2291:            @SuppressWarnings("unchecked")
2292:            public <T> T doReset(Class<T> returnType) {
2293:                String extension = "doReset().";
2294:                try {
2295:                    java.lang.reflect.Constructor<T> ctor = returnType
2296:                            .getConstructor(Context.class, String.class,
2297:                                    ScriptProxy.class);
2298:                    return ctor.newInstance(this , extension, getScriptProxy());
2299:                } catch (Exception ex) {
2300:                    throw new IllegalArgumentException(
2301:                            "Unsupported return type: " + returnType.getName());
2302:                }
2303:            }
2304:
2305:            /**
2306:             * Returns the background color of this control when it is disabled.
2307:             * @param callback valid CSS property value, (i.e., red, #ff0000)
2308:             */
2309:            @SuppressWarnings("unchecked")
2310:            public void getDisabledBackgroundColor(
2311:                    org.directwebremoting.proxy.Callback<String> callback) {
2312:                ScriptBuffer script = new ScriptBuffer();
2313:                String callbackPrefix = "";
2314:
2315:                if (callback != null) {
2316:                    callbackPrefix = "var reply = ";
2317:                }
2318:
2319:                script.appendCall(callbackPrefix + getContextPath()
2320:                        + "getDisabledBackgroundColor");
2321:
2322:                if (callback != null) {
2323:                    String key = org.directwebremoting.extend.CallbackHelper
2324:                            .saveCallback(callback, String.class);
2325:                    script
2326:                            .appendCall("__System.activateCallback", key,
2327:                                    "reply");
2328:                }
2329:
2330:                getScriptProxy().addScript(script);
2331:            }
2332:
2333:            /**
2334:             * Returns the font color to use when this control is disabled.
2335:             * @param callback valid CSS property value, (i.e., red, #ff0000)
2336:             */
2337:            @SuppressWarnings("unchecked")
2338:            public void getDisabledColor(
2339:                    org.directwebremoting.proxy.Callback<String> callback) {
2340:                ScriptBuffer script = new ScriptBuffer();
2341:                String callbackPrefix = "";
2342:
2343:                if (callback != null) {
2344:                    callbackPrefix = "var reply = ";
2345:                }
2346:
2347:                script.appendCall(callbackPrefix + getContextPath()
2348:                        + "getDisabledColor");
2349:
2350:                if (callback != null) {
2351:                    String key = org.directwebremoting.extend.CallbackHelper
2352:                            .saveCallback(callback, String.class);
2353:                    script
2354:                            .appendCall("__System.activateCallback", key,
2355:                                    "reply");
2356:                }
2357:
2358:                getScriptProxy().addScript(script);
2359:            }
2360:
2361:            /**
2362:             * Returns the state for the form field control. If no enabled state is set, this method returns
2363:            STATEENABLED.
2364:             * @param callback <code>STATEDISABLED</code> or <code>STATEENABLED</code>.
2365:             */
2366:            @SuppressWarnings("unchecked")
2367:            public void getEnabled(
2368:                    org.directwebremoting.proxy.Callback<Integer> callback) {
2369:                ScriptBuffer script = new ScriptBuffer();
2370:                String callbackPrefix = "";
2371:
2372:                if (callback != null) {
2373:                    callbackPrefix = "var reply = ";
2374:                }
2375:
2376:                script.appendCall(callbackPrefix + getContextPath()
2377:                        + "getEnabled");
2378:
2379:                if (callback != null) {
2380:                    String key = org.directwebremoting.extend.CallbackHelper
2381:                            .saveCallback(callback, Integer.class);
2382:                    script
2383:                            .appendCall("__System.activateCallback", key,
2384:                                    "reply");
2385:                }
2386:
2387:                getScriptProxy().addScript(script);
2388:            }
2389:
2390:            /**
2391:             * Returns the key binding that when keyed will fire the execute event for this control.
2392:             * @param callback plus-delimited (e.g.,'+') key sequence such as ctrl+s or ctrl+shift+alt+h or shift+a, etc
2393:             */
2394:            @SuppressWarnings("unchecked")
2395:            public void getKeyBinding(
2396:                    org.directwebremoting.proxy.Callback<String> callback) {
2397:                ScriptBuffer script = new ScriptBuffer();
2398:                String callbackPrefix = "";
2399:
2400:                if (callback != null) {
2401:                    callbackPrefix = "var reply = ";
2402:                }
2403:
2404:                script.appendCall(callbackPrefix + getContextPath()
2405:                        + "getKeyBinding");
2406:
2407:                if (callback != null) {
2408:                    String key = org.directwebremoting.extend.CallbackHelper
2409:                            .saveCallback(callback, String.class);
2410:                    script
2411:                            .appendCall("__System.activateCallback", key,
2412:                                    "reply");
2413:                }
2414:
2415:                getScriptProxy().addScript(script);
2416:            }
2417:
2418:            /**
2419:             * Returns whether or not this control is required. If the required property has never been set, this method returns
2420:            OPTIONAL.
2421:             * @param callback <code>REQUIRED</code> or <code>OPTIONAL</code>.
2422:             */
2423:            @SuppressWarnings("unchecked")
2424:            public void getRequired(
2425:                    org.directwebremoting.proxy.Callback<Integer> callback) {
2426:                ScriptBuffer script = new ScriptBuffer();
2427:                String callbackPrefix = "";
2428:
2429:                if (callback != null) {
2430:                    callbackPrefix = "var reply = ";
2431:                }
2432:
2433:                script.appendCall(callbackPrefix + getContextPath()
2434:                        + "getRequired");
2435:
2436:                if (callback != null) {
2437:                    String key = org.directwebremoting.extend.CallbackHelper
2438:                            .saveCallback(callback, Integer.class);
2439:                    script
2440:                            .appendCall("__System.activateCallback", key,
2441:                                    "reply");
2442:                }
2443:
2444:                getScriptProxy().addScript(script);
2445:            }
2446:
2447:            /**
2448:             * Returns the validation state of this control. If the validationState property has never been set, this method returns
2449:            STATEVALID.
2450:             * @param callback <code>STATEINVALID</code> or <code>STATEVALID</code>.
2451:             */
2452:            @SuppressWarnings("unchecked")
2453:            public void getValidationState(
2454:                    org.directwebremoting.proxy.Callback<Integer> callback) {
2455:                ScriptBuffer script = new ScriptBuffer();
2456:                String callbackPrefix = "";
2457:
2458:                if (callback != null) {
2459:                    callbackPrefix = "var reply = ";
2460:                }
2461:
2462:                script.appendCall(callbackPrefix + getContextPath()
2463:                        + "getValidationState");
2464:
2465:                if (callback != null) {
2466:                    String key = org.directwebremoting.extend.CallbackHelper
2467:                            .saveCallback(callback, Integer.class);
2468:                    script
2469:                            .appendCall("__System.activateCallback", key,
2470:                                    "reply");
2471:                }
2472:
2473:                getScriptProxy().addScript(script);
2474:            }
2475:
2476:            /**
2477:             * Sets the background color of this form control when it is disabled.
2478:             * @param strColor valid CSS property value, (i.e., red, #ff0000)
2479:             * @return this object.
2480:             */
2481:            @SuppressWarnings("unchecked")
2482:            public jsx3.gui.Form setDisabledBackgroundColor(String strColor) {
2483:                String extension = "setDisabledBackgroundColor(\"" + strColor
2484:                        + "\").";
2485:                try {
2486:                    java.lang.reflect.Constructor<jsx3.gui.Form> ctor = jsx3.gui.Form.class
2487:                            .getConstructor(Context.class, String.class,
2488:                                    ScriptProxy.class);
2489:                    return ctor.newInstance(this , extension, getScriptProxy());
2490:                } catch (Exception ex) {
2491:                    throw new IllegalArgumentException("Unsupported type: "
2492:                            + jsx3.gui.Form.class.getName());
2493:                }
2494:            }
2495:
2496:            /**
2497:             * Sets the background color of this form control when it is disabled.
2498:             * @param strColor valid CSS property value, (i.e., red, #ff0000)
2499:             * @param returnType The expected return type
2500:             * @return this object.
2501:             */
2502:            @SuppressWarnings("unchecked")
2503:            public <T> T setDisabledBackgroundColor(String strColor,
2504:                    Class<T> returnType) {
2505:                String extension = "setDisabledBackgroundColor(\"" + strColor
2506:                        + "\").";
2507:                try {
2508:                    java.lang.reflect.Constructor<T> ctor = returnType
2509:                            .getConstructor(Context.class, String.class,
2510:                                    ScriptProxy.class);
2511:                    return ctor.newInstance(this , extension, getScriptProxy());
2512:                } catch (Exception ex) {
2513:                    throw new IllegalArgumentException(
2514:                            "Unsupported return type: " + returnType.getName());
2515:                }
2516:            }
2517:
2518:            /**
2519:             * Sets the font color to use when this control is disabled.
2520:             * @param strColor valid CSS property value, (i.e., red, #ff0000)
2521:             * @return this object.
2522:             */
2523:            @SuppressWarnings("unchecked")
2524:            public jsx3.gui.Form setDisabledColor(String strColor) {
2525:                String extension = "setDisabledColor(\"" + strColor + "\").";
2526:                try {
2527:                    java.lang.reflect.Constructor<jsx3.gui.Form> ctor = jsx3.gui.Form.class
2528:                            .getConstructor(Context.class, String.class,
2529:                                    ScriptProxy.class);
2530:                    return ctor.newInstance(this , extension, getScriptProxy());
2531:                } catch (Exception ex) {
2532:                    throw new IllegalArgumentException("Unsupported type: "
2533:                            + jsx3.gui.Form.class.getName());
2534:                }
2535:            }
2536:
2537:            /**
2538:             * Sets the font color to use when this control is disabled.
2539:             * @param strColor valid CSS property value, (i.e., red, #ff0000)
2540:             * @param returnType The expected return type
2541:             * @return this object.
2542:             */
2543:            @SuppressWarnings("unchecked")
2544:            public <T> T setDisabledColor(String strColor, Class<T> returnType) {
2545:                String extension = "setDisabledColor(\"" + strColor + "\").";
2546:                try {
2547:                    java.lang.reflect.Constructor<T> ctor = returnType
2548:                            .getConstructor(Context.class, String.class,
2549:                                    ScriptProxy.class);
2550:                    return ctor.newInstance(this , extension, getScriptProxy());
2551:                } catch (Exception ex) {
2552:                    throw new IllegalArgumentException(
2553:                            "Unsupported return type: " + returnType.getName());
2554:                }
2555:            }
2556:
2557:            /**
2558:             * Sets whether this control is enabled. Disabled controls do not respond to user interaction.
2559:             * @param intEnabled <code>STATEDISABLED</code> or <code>STATEENABLED</code>. <code>null</code> is
2560:            equivalent to <code>STATEENABLED</code>.
2561:             * @param bRepaint if <code>true</code> this control is immediately repainted to reflect the new setting.
2562:             */
2563:            public void setEnabled(int intEnabled, boolean bRepaint) {
2564:                ScriptBuffer script = new ScriptBuffer();
2565:                script.appendCall(getContextPath() + "setEnabled", intEnabled,
2566:                        bRepaint);
2567:                getScriptProxy().addScript(script);
2568:            }
2569:
2570:            /**
2571:             * Sets the key binding that when keyed will fire the bound execute (jsx3.gui.Interactive.EXECUTE)
2572:            event for this control.
2573:             * @param strSequence plus-delimited (e.g.,'+') key sequence such as ctrl+s or ctrl+shift+alt+h or shift+a, etc
2574:             * @return this object.
2575:             */
2576:            @SuppressWarnings("unchecked")
2577:            public jsx3.gui.Form setKeyBinding(String strSequence) {
2578:                String extension = "setKeyBinding(\"" + strSequence + "\").";
2579:                try {
2580:                    java.lang.reflect.Constructor<jsx3.gui.Form> ctor = jsx3.gui.Form.class
2581:                            .getConstructor(Context.class, String.class,
2582:                                    ScriptProxy.class);
2583:                    return ctor.newInstance(this , extension, getScriptProxy());
2584:                } catch (Exception ex) {
2585:                    throw new IllegalArgumentException("Unsupported type: "
2586:                            + jsx3.gui.Form.class.getName());
2587:                }
2588:            }
2589:
2590:            /**
2591:             * Sets the key binding that when keyed will fire the bound execute (jsx3.gui.Interactive.EXECUTE)
2592:            event for this control.
2593:             * @param strSequence plus-delimited (e.g.,'+') key sequence such as ctrl+s or ctrl+shift+alt+h or shift+a, etc
2594:             * @param returnType The expected return type
2595:             * @return this object.
2596:             */
2597:            @SuppressWarnings("unchecked")
2598:            public <T> T setKeyBinding(String strSequence, Class<T> returnType) {
2599:                String extension = "setKeyBinding(\"" + strSequence + "\").";
2600:                try {
2601:                    java.lang.reflect.Constructor<T> ctor = returnType
2602:                            .getConstructor(Context.class, String.class,
2603:                                    ScriptProxy.class);
2604:                    return ctor.newInstance(this , extension, getScriptProxy());
2605:                } catch (Exception ex) {
2606:                    throw new IllegalArgumentException(
2607:                            "Unsupported return type: " + returnType.getName());
2608:                }
2609:            }
2610:
2611:            /**
2612:             * Sets whether or not this control is required.
2613:             * @param required {int} <code>REQUIRED</code> or <code>OPTIONAL</code>.
2614:             * @return this object.
2615:             */
2616:            @SuppressWarnings("unchecked")
2617:            public jsx3.gui.Form setRequired(int required) {
2618:                String extension = "setRequired(\"" + required + "\").";
2619:                try {
2620:                    java.lang.reflect.Constructor<jsx3.gui.Form> ctor = jsx3.gui.Form.class
2621:                            .getConstructor(Context.class, String.class,
2622:                                    ScriptProxy.class);
2623:                    return ctor.newInstance(this , extension, getScriptProxy());
2624:                } catch (Exception ex) {
2625:                    throw new IllegalArgumentException("Unsupported type: "
2626:                            + jsx3.gui.Form.class.getName());
2627:                }
2628:            }
2629:
2630:            /**
2631:             * Sets whether or not this control is required.
2632:             * @param required {int} <code>REQUIRED</code> or <code>OPTIONAL</code>.
2633:             * @param returnType The expected return type
2634:             * @return this object.
2635:             */
2636:            @SuppressWarnings("unchecked")
2637:            public <T> T setRequired(int required, Class<T> returnType) {
2638:                String extension = "setRequired(\"" + required + "\").";
2639:                try {
2640:                    java.lang.reflect.Constructor<T> ctor = returnType
2641:                            .getConstructor(Context.class, String.class,
2642:                                    ScriptProxy.class);
2643:                    return ctor.newInstance(this , extension, getScriptProxy());
2644:                } catch (Exception ex) {
2645:                    throw new IllegalArgumentException(
2646:                            "Unsupported return type: " + returnType.getName());
2647:                }
2648:            }
2649:
2650:            /**
2651:             * Sets the validation state of this control. The validation state of a control is not serialized.
2652:             * @param intState <code>STATEINVALID</code> or <code>STATEVALID</code>.
2653:             * @return this object.
2654:             */
2655:            @SuppressWarnings("unchecked")
2656:            public jsx3.gui.Form setValidationState(int intState) {
2657:                String extension = "setValidationState(\"" + intState + "\").";
2658:                try {
2659:                    java.lang.reflect.Constructor<jsx3.gui.Form> ctor = jsx3.gui.Form.class
2660:                            .getConstructor(Context.class, String.class,
2661:                                    ScriptProxy.class);
2662:                    return ctor.newInstance(this , extension, getScriptProxy());
2663:                } catch (Exception ex) {
2664:                    throw new IllegalArgumentException("Unsupported type: "
2665:                            + jsx3.gui.Form.class.getName());
2666:                }
2667:            }
2668:
2669:            /**
2670:             * Sets the validation state of this control. The validation state of a control is not serialized.
2671:             * @param intState <code>STATEINVALID</code> or <code>STATEVALID</code>.
2672:             * @param returnType The expected return type
2673:             * @return this object.
2674:             */
2675:            @SuppressWarnings("unchecked")
2676:            public <T> T setValidationState(int intState, Class<T> returnType) {
2677:                String extension = "setValidationState(\"" + intState + "\").";
2678:                try {
2679:                    java.lang.reflect.Constructor<T> ctor = returnType
2680:                            .getConstructor(Context.class, String.class,
2681:                                    ScriptProxy.class);
2682:                    return ctor.newInstance(this , extension, getScriptProxy());
2683:                } catch (Exception ex) {
2684:                    throw new IllegalArgumentException(
2685:                            "Unsupported return type: " + returnType.getName());
2686:                }
2687:            }
2688:
2689:            /**
2690:             * Resets the XML source document stored in the server cache under the XML ID of this object to an empty CDF
2691:            document.
2692:             */
2693:            public void clearXmlData() {
2694:                ScriptBuffer script = new ScriptBuffer();
2695:                script.appendCall(getContextPath() + "clearXmlData");
2696:                getScriptProxy().addScript(script);
2697:            }
2698:
2699:            /**
2700:             * Returns whether this object removes its XML and XSL source documents from the cache of its server when it
2701:            is destroyed.
2702:             * @param callback <code>CLEANUPRESOURCES</code> or <code>SHARERESOURCES</code>.
2703:             */
2704:            @SuppressWarnings("unchecked")
2705:            public void getShareResources(
2706:                    org.directwebremoting.proxy.Callback<Integer> callback) {
2707:                ScriptBuffer script = new ScriptBuffer();
2708:                String callbackPrefix = "";
2709:
2710:                if (callback != null) {
2711:                    callbackPrefix = "var reply = ";
2712:                }
2713:
2714:                script.appendCall(callbackPrefix + getContextPath()
2715:                        + "getShareResources");
2716:
2717:                if (callback != null) {
2718:                    String key = org.directwebremoting.extend.CallbackHelper
2719:                            .saveCallback(callback, Integer.class);
2720:                    script
2721:                            .appendCall("__System.activateCallback", key,
2722:                                    "reply");
2723:                }
2724:
2725:                getScriptProxy().addScript(script);
2726:            }
2727:
2728:            /**
2729:             * Returns the XML source document of this object. The XML document is determined by the following steps:
2730:
2731:            If an XML document exists in the server cache under an ID equal to the XML ID of this object, that
2732:            document is returned.
2733:            If the XML string of this object is not empty, a new document is created by parsing this string.
2734:            If the XML URL of this object is not empty, a new document is created by parsing the file at the location
2735:            specified by the URL resolved against the server owning this object.
2736:            Otherwise, an empty CDF document is returned.
2737:
2738:            If a new document is created for this object (any of the steps listed above except for the first one), the
2739:            following actions are also taken:
2740:
2741:            If creating the document resulted in an error (XML parsing error, file not found error, etc) the offending
2742:            document is returned immediately.
2743:            Otherwise, setSourceXML is called on this object, passing in the created document.
2744:             */
2745:            @SuppressWarnings("unchecked")
2746:            public jsx3.xml.CdfDocument getXML() {
2747:                String extension = "getXML().";
2748:                try {
2749:                    java.lang.reflect.Constructor<jsx3.xml.CdfDocument> ctor = jsx3.xml.CdfDocument.class
2750:                            .getConstructor(Context.class, String.class,
2751:                                    ScriptProxy.class);
2752:                    return ctor.newInstance(this , extension, getScriptProxy());
2753:                } catch (Exception ex) {
2754:                    throw new IllegalArgumentException("Unsupported type: "
2755:                            + jsx3.xml.CdfDocument.class.getName());
2756:                }
2757:            }
2758:
2759:            /**
2760:             * Returns the XML source document of this object. The XML document is determined by the following steps:
2761:
2762:            If an XML document exists in the server cache under an ID equal to the XML ID of this object, that
2763:            document is returned.
2764:            If the XML string of this object is not empty, a new document is created by parsing this string.
2765:            If the XML URL of this object is not empty, a new document is created by parsing the file at the location
2766:            specified by the URL resolved against the server owning this object.
2767:            Otherwise, an empty CDF document is returned.
2768:
2769:            If a new document is created for this object (any of the steps listed above except for the first one), the
2770:            following actions are also taken:
2771:
2772:            If creating the document resulted in an error (XML parsing error, file not found error, etc) the offending
2773:            document is returned immediately.
2774:            Otherwise, setSourceXML is called on this object, passing in the created document.
2775:             * @param returnType The expected return type
2776:             */
2777:            @SuppressWarnings("unchecked")
2778:            public <T> T getXML(Class<T> returnType) {
2779:                String extension = "getXML().";
2780:                try {
2781:                    java.lang.reflect.Constructor<T> ctor = returnType
2782:                            .getConstructor(Context.class, String.class,
2783:                                    ScriptProxy.class);
2784:                    return ctor.newInstance(this , extension, getScriptProxy());
2785:                } catch (Exception ex) {
2786:                    throw new IllegalArgumentException(
2787:                            "Unsupported return type: " + returnType.getName());
2788:                }
2789:            }
2790:
2791:            /**
2792:             * Returns the XML ID of this object.
2793:             * @param callback the XML ID.
2794:             */
2795:            @SuppressWarnings("unchecked")
2796:            public void getXMLId(
2797:                    org.directwebremoting.proxy.Callback<String> callback) {
2798:                ScriptBuffer script = new ScriptBuffer();
2799:                String callbackPrefix = "";
2800:
2801:                if (callback != null) {
2802:                    callbackPrefix = "var reply = ";
2803:                }
2804:
2805:                script.appendCall(callbackPrefix + getContextPath()
2806:                        + "getXMLId");
2807:
2808:                if (callback != null) {
2809:                    String key = org.directwebremoting.extend.CallbackHelper
2810:                            .saveCallback(callback, String.class);
2811:                    script
2812:                            .appendCall("__System.activateCallback", key,
2813:                                    "reply");
2814:                }
2815:
2816:                getScriptProxy().addScript(script);
2817:            }
2818:
2819:            /**
2820:             * Returns the XML string of this object.
2821:             */
2822:            @SuppressWarnings("unchecked")
2823:            public void getXMLString(
2824:                    org.directwebremoting.proxy.Callback<String> callback) {
2825:                ScriptBuffer script = new ScriptBuffer();
2826:                String callbackPrefix = "";
2827:
2828:                if (callback != null) {
2829:                    callbackPrefix = "var reply = ";
2830:                }
2831:
2832:                script.appendCall(callbackPrefix + getContextPath()
2833:                        + "getXMLString");
2834:
2835:                if (callback != null) {
2836:                    String key = org.directwebremoting.extend.CallbackHelper
2837:                            .saveCallback(callback, String.class);
2838:                    script
2839:                            .appendCall("__System.activateCallback", key,
2840:                                    "reply");
2841:                }
2842:
2843:                getScriptProxy().addScript(script);
2844:            }
2845:
2846:            /**
2847:             * Returns the list of XML transformers of this object.
2848:             */
2849:            @SuppressWarnings("unchecked")
2850:            public void getXMLTransformers(
2851:                    org.directwebremoting.proxy.Callback<Object[]> callback) {
2852:                ScriptBuffer script = new ScriptBuffer();
2853:                String callbackPrefix = "";
2854:
2855:                if (callback != null) {
2856:                    callbackPrefix = "var reply = ";
2857:                }
2858:
2859:                script.appendCall(callbackPrefix + getContextPath()
2860:                        + "getXMLTransformers");
2861:
2862:                if (callback != null) {
2863:                    String key = org.directwebremoting.extend.CallbackHelper
2864:                            .saveCallback(callback, Object[].class);
2865:                    script
2866:                            .appendCall("__System.activateCallback", key,
2867:                                    "reply");
2868:                }
2869:
2870:                getScriptProxy().addScript(script);
2871:            }
2872:
2873:            /**
2874:             * Returns the XML URL of this object.
2875:             */
2876:            @SuppressWarnings("unchecked")
2877:            public void getXMLURL(
2878:                    org.directwebremoting.proxy.Callback<String> callback) {
2879:                ScriptBuffer script = new ScriptBuffer();
2880:                String callbackPrefix = "";
2881:
2882:                if (callback != null) {
2883:                    callbackPrefix = "var reply = ";
2884:                }
2885:
2886:                script.appendCall(callbackPrefix + getContextPath()
2887:                        + "getXMLURL");
2888:
2889:                if (callback != null) {
2890:                    String key = org.directwebremoting.extend.CallbackHelper
2891:                            .saveCallback(callback, String.class);
2892:                    script
2893:                            .appendCall("__System.activateCallback", key,
2894:                                    "reply");
2895:                }
2896:
2897:                getScriptProxy().addScript(script);
2898:            }
2899:
2900:            /**
2901:             * Returns the XSL ID of this object.
2902:             */
2903:            @SuppressWarnings("unchecked")
2904:            public void getXSLId(
2905:                    org.directwebremoting.proxy.Callback<String> callback) {
2906:                ScriptBuffer script = new ScriptBuffer();
2907:                String callbackPrefix = "";
2908:
2909:                if (callback != null) {
2910:                    callbackPrefix = "var reply = ";
2911:                }
2912:
2913:                script.appendCall(callbackPrefix + getContextPath()
2914:                        + "getXSLId");
2915:
2916:                if (callback != null) {
2917:                    String key = org.directwebremoting.extend.CallbackHelper
2918:                            .saveCallback(callback, String.class);
2919:                    script
2920:                            .appendCall("__System.activateCallback", key,
2921:                                    "reply");
2922:                }
2923:
2924:                getScriptProxy().addScript(script);
2925:            }
2926:
2927:            /**
2928:             * Returns a map containing all the parameters to pass to the XSL stylesheet during transformation.
2929:             */
2930:            @SuppressWarnings("unchecked")
2931:            public jsx3.lang.Object getXSLParams() {
2932:                String extension = "getXSLParams().";
2933:                try {
2934:                    java.lang.reflect.Constructor<jsx3.lang.Object> ctor = jsx3.lang.Object.class
2935:                            .getConstructor(Context.class, String.class,
2936:                                    ScriptProxy.class);
2937:                    return ctor.newInstance(this , extension, getScriptProxy());
2938:                } catch (Exception ex) {
2939:                    throw new IllegalArgumentException("Unsupported type: "
2940:                            + jsx3.lang.Object.class.getName());
2941:                }
2942:            }
2943:
2944:            /**
2945:             * Returns a map containing all the parameters to pass to the XSL stylesheet during transformation.
2946:             * @param returnType The expected return type
2947:             */
2948:            @SuppressWarnings("unchecked")
2949:            public <T> T getXSLParams(Class<T> returnType) {
2950:                String extension = "getXSLParams().";
2951:                try {
2952:                    java.lang.reflect.Constructor<T> ctor = returnType
2953:                            .getConstructor(Context.class, String.class,
2954:                                    ScriptProxy.class);
2955:                    return ctor.newInstance(this , extension, getScriptProxy());
2956:                } catch (Exception ex) {
2957:                    throw new IllegalArgumentException(
2958:                            "Unsupported return type: " + returnType.getName());
2959:                }
2960:            }
2961:
2962:            /**
2963:             * Returns whether the XML data source of this object is loaded asynchronously.
2964:             * @param callback <code>0</code> or <code>1</code>.
2965:             */
2966:            @SuppressWarnings("unchecked")
2967:            public void getXmlAsync(
2968:                    org.directwebremoting.proxy.Callback<Integer> callback) {
2969:                ScriptBuffer script = new ScriptBuffer();
2970:                String callbackPrefix = "";
2971:
2972:                if (callback != null) {
2973:                    callbackPrefix = "var reply = ";
2974:                }
2975:
2976:                script.appendCall(callbackPrefix + getContextPath()
2977:                        + "getXmlAsync");
2978:
2979:                if (callback != null) {
2980:                    String key = org.directwebremoting.extend.CallbackHelper
2981:                            .saveCallback(callback, Integer.class);
2982:                    script
2983:                            .appendCall("__System.activateCallback", key,
2984:                                    "reply");
2985:                }
2986:
2987:                getScriptProxy().addScript(script);
2988:            }
2989:
2990:            /**
2991:             * Returns whether this object is bound to the XML document stored in the data cache.
2992:             * @param callback <code>0</code> or <code>1</code>.
2993:             */
2994:            @SuppressWarnings("unchecked")
2995:            public void getXmlBind(
2996:                    org.directwebremoting.proxy.Callback<Integer> callback) {
2997:                ScriptBuffer script = new ScriptBuffer();
2998:                String callbackPrefix = "";
2999:
3000:                if (callback != null) {
3001:                    callbackPrefix = "var reply = ";
3002:                }
3003:
3004:                script.appendCall(callbackPrefix + getContextPath()
3005:                        + "getXmlBind");
3006:
3007:                if (callback != null) {
3008:                    String key = org.directwebremoting.extend.CallbackHelper
3009:                            .saveCallback(callback, Integer.class);
3010:                    script
3011:                            .appendCall("__System.activateCallback", key,
3012:                                    "reply");
3013:                }
3014:
3015:                getScriptProxy().addScript(script);
3016:            }
3017:
3018:            /**
3019:             * This method is called in two situations:
3020:
3021:            When the datasource of this object finishes loading (success, error, or timeout), if the
3022:              xmlAsync property of this object is true, its datasource is specified as an
3023:               XML URL, and the first time doTransform() was called the datasource was still loading.
3024:            Any time the value stored in the server XML cache under the key equal to the XML Id of this object
3025:              changes, if the xmlBind property of this object is true.
3026:
3027:            Any methods overriding this method should begin with a call to jsxsupermix().
3028:             * @param objEvent the event published by the cache.
3029:             */
3030:            public void onXmlBinding(jsx3.lang.Object objEvent) {
3031:                ScriptBuffer script = new ScriptBuffer();
3032:                script.appendCall(getContextPath() + "onXmlBinding", objEvent);
3033:                getScriptProxy().addScript(script);
3034:            }
3035:
3036:            /**
3037:             * Removes a parameter from the list of parameters to pass to the XSL stylesheet during transformation.
3038:             * @param strName the name of the XSL parameter to remove.
3039:             * @return this object.
3040:             */
3041:            @SuppressWarnings("unchecked")
3042:            public jsx3.xml.Cacheable removeXSLParam(String strName) {
3043:                String extension = "removeXSLParam(\"" + strName + "\").";
3044:                try {
3045:                    java.lang.reflect.Constructor<jsx3.xml.Cacheable> ctor = jsx3.xml.Cacheable.class
3046:                            .getConstructor(Context.class, String.class,
3047:                                    ScriptProxy.class);
3048:                    return ctor.newInstance(this , extension, getScriptProxy());
3049:                } catch (Exception ex) {
3050:                    throw new IllegalArgumentException("Unsupported type: "
3051:                            + jsx3.xml.Cacheable.class.getName());
3052:                }
3053:            }
3054:
3055:            /**
3056:             * Removes a parameter from the list of parameters to pass to the XSL stylesheet during transformation.
3057:             * @param strName the name of the XSL parameter to remove.
3058:             * @param returnType The expected return type
3059:             * @return this object.
3060:             */
3061:            @SuppressWarnings("unchecked")
3062:            public <T> T removeXSLParam(String strName, Class<T> returnType) {
3063:                String extension = "removeXSLParam(\"" + strName + "\").";
3064:                try {
3065:                    java.lang.reflect.Constructor<T> ctor = returnType
3066:                            .getConstructor(Context.class, String.class,
3067:                                    ScriptProxy.class);
3068:                    return ctor.newInstance(this , extension, getScriptProxy());
3069:                } catch (Exception ex) {
3070:                    throw new IllegalArgumentException(
3071:                            "Unsupported return type: " + returnType.getName());
3072:                }
3073:            }
3074:
3075:            /**
3076:             * Removes all parameters from the list of parameters to pass to the XSL stylesheet during transformation.
3077:             * @return this object.
3078:             */
3079:            @SuppressWarnings("unchecked")
3080:            public jsx3.xml.Cacheable removeXSLParams() {
3081:                String extension = "removeXSLParams().";
3082:                try {
3083:                    java.lang.reflect.Constructor<jsx3.xml.Cacheable> ctor = jsx3.xml.Cacheable.class
3084:                            .getConstructor(Context.class, String.class,
3085:                                    ScriptProxy.class);
3086:                    return ctor.newInstance(this , extension, getScriptProxy());
3087:                } catch (Exception ex) {
3088:                    throw new IllegalArgumentException("Unsupported type: "
3089:                            + jsx3.xml.Cacheable.class.getName());
3090:                }
3091:            }
3092:
3093:            /**
3094:             * Removes all parameters from the list of parameters to pass to the XSL stylesheet during transformation.
3095:             * @param returnType The expected return type
3096:             * @return this object.
3097:             */
3098:            @SuppressWarnings("unchecked")
3099:            public <T> T removeXSLParams(Class<T> returnType) {
3100:                String extension = "removeXSLParams().";
3101:                try {
3102:                    java.lang.reflect.Constructor<T> ctor = returnType
3103:                            .getConstructor(Context.class, String.class,
3104:                                    ScriptProxy.class);
3105:                    return ctor.newInstance(this , extension, getScriptProxy());
3106:                } catch (Exception ex) {
3107:                    throw new IllegalArgumentException(
3108:                            "Unsupported return type: " + returnType.getName());
3109:                }
3110:            }
3111:
3112:            /**
3113:             * Removes the XML and XSL source documents from the server cache.
3114:             * @param objServer the server owning the cache to modify. This is a required argument only if
3115:            <code>this.getServer()</code> does not returns a server instance.
3116:             */
3117:            public void resetCacheData(jsx3.app.Server objServer) {
3118:                ScriptBuffer script = new ScriptBuffer();
3119:                script.appendCall(getContextPath() + "resetCacheData",
3120:                        objServer);
3121:                getScriptProxy().addScript(script);
3122:            }
3123:
3124:            /**
3125:             * Sets whether this object removes its XML and XSL source documents from the cache of its server when it
3126:            is destroyed.
3127:             * @param intShare <code>CLEANUPRESOURCES</code> or <code>SHARERESOURCES</code>. <code>CLEANUPRESOURCES</code>
3128:            is the default value if the property is <code>null</code>.
3129:             * @return this object.
3130:             */
3131:            @SuppressWarnings("unchecked")
3132:            public jsx3.xml.Cacheable setShareResources(int intShare) {
3133:                String extension = "setShareResources(\"" + intShare + "\").";
3134:                try {
3135:                    java.lang.reflect.Constructor<jsx3.xml.Cacheable> ctor = jsx3.xml.Cacheable.class
3136:                            .getConstructor(Context.class, String.class,
3137:                                    ScriptProxy.class);
3138:                    return ctor.newInstance(this , extension, getScriptProxy());
3139:                } catch (Exception ex) {
3140:                    throw new IllegalArgumentException("Unsupported type: "
3141:                            + jsx3.xml.Cacheable.class.getName());
3142:                }
3143:            }
3144:
3145:            /**
3146:             * Sets whether this object removes its XML and XSL source documents from the cache of its server when it
3147:            is destroyed.
3148:             * @param intShare <code>CLEANUPRESOURCES</code> or <code>SHARERESOURCES</code>. <code>CLEANUPRESOURCES</code>
3149:            is the default value if the property is <code>null</code>.
3150:             * @param returnType The expected return type
3151:             * @return this object.
3152:             */
3153:            @SuppressWarnings("unchecked")
3154:            public <T> T setShareResources(int intShare, Class<T> returnType) {
3155:                String extension = "setShareResources(\"" + intShare + "\").";
3156:                try {
3157:                    java.lang.reflect.Constructor<T> ctor = returnType
3158:                            .getConstructor(Context.class, String.class,
3159:                                    ScriptProxy.class);
3160:                    return ctor.newInstance(this , extension, getScriptProxy());
3161:                } catch (Exception ex) {
3162:                    throw new IllegalArgumentException(
3163:                            "Unsupported return type: " + returnType.getName());
3164:                }
3165:            }
3166:
3167:            /**
3168:             * Sets the source document of this object as though objDoc were retrieved from the XML URL or XML
3169:            string of this object. This method executes the following steps:
3170:
3171:            The document is transformed serially by each XML transformers of this object.
3172:            The XML document is saved in the server cache under the XML ID of this object.
3173:            If this object is an instance of jsx3.xml.CDF and the root node is a <data> element
3174:            and its jsxassignids attribute is equal to 1, all <record> elements without a
3175:            jsxid attribute are assigned a unique jsxid.
3176:            If this object is an instance of jsx3.xml.CDF, convertProperties() is called
3177:            on this object.
3178:             * @param objDoc 
3179:             * @param objCache 
3180:             * @return the document stored in the server cache as the data source of this object. If
3181:            transformers were run, this value will not be equal to the <code>objDoc</code> parameter.
3182:             */
3183:            @SuppressWarnings("unchecked")
3184:            public jsx3.xml.CdfDocument setSourceXML(
3185:                    jsx3.xml.CdfDocument objDoc, jsx3.app.Cache objCache) {
3186:                String extension = "setSourceXML(\"" + objDoc + "\", \""
3187:                        + objCache + "\").";
3188:                try {
3189:                    java.lang.reflect.Constructor<jsx3.xml.CdfDocument> ctor = jsx3.xml.CdfDocument.class
3190:                            .getConstructor(Context.class, String.class,
3191:                                    ScriptProxy.class);
3192:                    return ctor.newInstance(this , extension, getScriptProxy());
3193:                } catch (Exception ex) {
3194:                    throw new IllegalArgumentException("Unsupported type: "
3195:                            + jsx3.xml.CdfDocument.class.getName());
3196:                }
3197:            }
3198:
3199:            /**
3200:             * Sets the source document of this object as though objDoc were retrieved from the XML URL or XML
3201:            string of this object. This method executes the following steps:
3202:
3203:            The document is transformed serially by each XML transformers of this object.
3204:            The XML document is saved in the server cache under the XML ID of this object.
3205:            If this object is an instance of jsx3.xml.CDF and the root node is a <data> element
3206:            and its jsxassignids attribute is equal to 1, all <record> elements without a
3207:            jsxid attribute are assigned a unique jsxid.
3208:            If this object is an instance of jsx3.xml.CDF, convertProperties() is called
3209:            on this object.
3210:             * @param objDoc 
3211:             * @param objCache 
3212:             * @param returnType The expected return type
3213:             * @return the document stored in the server cache as the data source of this object. If
3214:            transformers were run, this value will not be equal to the <code>objDoc</code> parameter.
3215:             */
3216:            @SuppressWarnings("unchecked")
3217:            public <T> T setSourceXML(jsx3.xml.CdfDocument objDoc,
3218:                    jsx3.app.Cache objCache, Class<T> returnType) {
3219:                String extension = "setSourceXML(\"" + objDoc + "\", \""
3220:                        + objCache + "\").";
3221:                try {
3222:                    java.lang.reflect.Constructor<T> ctor = returnType
3223:                            .getConstructor(Context.class, String.class,
3224:                                    ScriptProxy.class);
3225:                    return ctor.newInstance(this , extension, getScriptProxy());
3226:                } catch (Exception ex) {
3227:                    throw new IllegalArgumentException(
3228:                            "Unsupported return type: " + returnType.getName());
3229:                }
3230:            }
3231:
3232:            /**
3233:             * Sets the list of XML transformers of this object. The XML source document of this object is transformed
3234:            serially by each of these transformers before it is placed in the XML cache.
3235:
3236:            Each transformer is either the URI of an XSLT document (which will be resolved against the
3237:            the server of this object) or the cache id of a XSLT document in the XML cache of the server
3238:            of this object. When any transformer is loaded from a URI it is placed in the server cache under the id
3239:            equal to its resolved URI. Any transformer that does not correspond to a valid XSLT document will be skipped
3240:            without throwing an error.
3241:             * @param arrTrans 
3242:             */
3243:            public void setXMLTransformers(Object[] arrTrans) {
3244:                ScriptBuffer script = new ScriptBuffer();
3245:                script.appendCall(getContextPath() + "setXMLTransformers",
3246:                        arrTrans);
3247:                getScriptProxy().addScript(script);
3248:            }
3249:
3250:            /**
3251:             * Adds a name/value pair to the list of parameters to pass to the XSL stylesheet during transformation. If
3252:            strValue is null the parameter is removed.
3253:             * @param strName the name of the XSL parameter to add.
3254:             * @param strValue the value of the XSL parameter to add.
3255:             * @return this object.
3256:             */
3257:            @SuppressWarnings("unchecked")
3258:            public jsx3.xml.Cacheable setXSLParam(String strName,
3259:                    String strValue) {
3260:                String extension = "setXSLParam(\"" + strName + "\", \""
3261:                        + strValue + "\").";
3262:                try {
3263:                    java.lang.reflect.Constructor<jsx3.xml.Cacheable> ctor = jsx3.xml.Cacheable.class
3264:                            .getConstructor(Context.class, String.class,
3265:                                    ScriptProxy.class);
3266:                    return ctor.newInstance(this , extension, getScriptProxy());
3267:                } catch (Exception ex) {
3268:                    throw new IllegalArgumentException("Unsupported type: "
3269:                            + jsx3.xml.Cacheable.class.getName());
3270:                }
3271:            }
3272:
3273:            /**
3274:             * Adds a name/value pair to the list of parameters to pass to the XSL stylesheet during transformation. If
3275:            strValue is null the parameter is removed.
3276:             * @param strName the name of the XSL parameter to add.
3277:             * @param strValue the value of the XSL parameter to add.
3278:             * @param returnType The expected return type
3279:             * @return this object.
3280:             */
3281:            @SuppressWarnings("unchecked")
3282:            public <T> T setXSLParam(String strName, String strValue,
3283:                    Class<T> returnType) {
3284:                String extension = "setXSLParam(\"" + strName + "\", \""
3285:                        + strValue + "\").";
3286:                try {
3287:                    java.lang.reflect.Constructor<T> ctor = returnType
3288:                            .getConstructor(Context.class, String.class,
3289:                                    ScriptProxy.class);
3290:                    return ctor.newInstance(this , extension, getScriptProxy());
3291:                } catch (Exception ex) {
3292:                    throw new IllegalArgumentException(
3293:                            "Unsupported return type: " + returnType.getName());
3294:                }
3295:            }
3296:
3297:            /**
3298:             * Sets whether the XML data source of this object is loaded asynchronously. This setting only applies to
3299:            data sources loaded from an XML URL.
3300:             * @param bAsync 
3301:             * @return this object.
3302:             */
3303:            @SuppressWarnings("unchecked")
3304:            public jsx3.xml.Cacheable setXmlAsync(boolean bAsync) {
3305:                String extension = "setXmlAsync(\"" + bAsync + "\").";
3306:                try {
3307:                    java.lang.reflect.Constructor<jsx3.xml.Cacheable> ctor = jsx3.xml.Cacheable.class
3308:                            .getConstructor(Context.class, String.class,
3309:                                    ScriptProxy.class);
3310:                    return ctor.newInstance(this , extension, getScriptProxy());
3311:                } catch (Exception ex) {
3312:                    throw new IllegalArgumentException("Unsupported type: "
3313:                            + jsx3.xml.Cacheable.class.getName());
3314:                }
3315:            }
3316:
3317:            /**
3318:             * Sets whether the XML data source of this object is loaded asynchronously. This setting only applies to
3319:            data sources loaded from an XML URL.
3320:             * @param bAsync 
3321:             * @param returnType The expected return type
3322:             * @return this object.
3323:             */
3324:            @SuppressWarnings("unchecked")
3325:            public <T> T setXmlAsync(boolean bAsync, Class<T> returnType) {
3326:                String extension = "setXmlAsync(\"" + bAsync + "\").";
3327:                try {
3328:                    java.lang.reflect.Constructor<T> ctor = returnType
3329:                            .getConstructor(Context.class, String.class,
3330:                                    ScriptProxy.class);
3331:                    return ctor.newInstance(this , extension, getScriptProxy());
3332:                } catch (Exception ex) {
3333:                    throw new IllegalArgumentException(
3334:                            "Unsupported return type: " + returnType.getName());
3335:                }
3336:            }
3337:
3338:            /**
3339:             * Sets whether this object is bound to the XML document stored in the data cache. If this object is bound to the
3340:            cache, then the onXmlBinding() method of this object is called any time the document stored in
3341:            the cache under the XML Id of this object changes.
3342:             * @param bBind 
3343:             * @param callback <code>0</code> or <code>1</code>.
3344:             */
3345:            @SuppressWarnings("unchecked")
3346:            public void setXmlBind(boolean bBind,
3347:                    org.directwebremoting.proxy.Callback<Integer> callback) {
3348:                ScriptBuffer script = new ScriptBuffer();
3349:                String callbackPrefix = "";
3350:
3351:                if (callback != null) {
3352:                    callbackPrefix = "var reply = ";
3353:                }
3354:
3355:                script.appendCall(callbackPrefix + getContextPath()
3356:                        + "setXmlBind", bBind);
3357:
3358:                if (callback != null) {
3359:                    String key = org.directwebremoting.extend.CallbackHelper
3360:                            .saveCallback(callback, Integer.class);
3361:                    script
3362:                            .appendCall("__System.activateCallback", key,
3363:                                    "reply");
3364:                }
3365:
3366:                getScriptProxy().addScript(script);
3367:            }
3368:
3369:            /**
3370:             * Transfers a CDF record from another object to this object. If no XML data source exists
3371:            yet for this object, an empty one is created before adding the new record. This method always updates the
3372:            on-screen view of both the source and destination objects.
3373:
3374:            This method fails quietly if any of the following conditions apply:
3375:
3376:            there is no object with id equal to strSourceId
3377:                
3378:            there is no record in the source object with jsxid equal to strRecordId
3379:                
3380:
3381:                  strParentRecordId is specified and there is no record in this object with
3382:            jsxid equal to strParentRecordId
3383:                
3384:            the this object already has a record with jsxid equal to the record to adopt
3385:             * @param strSourceId <span style="text-decoration: line-through;">either the id of the source object or the</span> source object itself.
3386:             * @param strRecordId the <code>jsxid</code> attribute of the data record in the source object to transfer.
3387:             * @param strParentRecordId the unique <code>jsxid</code> of an existing record. If this optional parameter
3388:            is provided, the adopted record will be added as a child of this record. Otherwise, the adopted record will
3389:            be added to the root <code>data</code> element.
3390:             * @param bRedraw forces suppression of the insert event
3391:             * @return the adopted record.
3392:             */
3393:            @SuppressWarnings("unchecked")
3394:            public jsx3.xml.Node adoptRecord(jsx3.xml.CdfDocument strSourceId,
3395:                    String strRecordId, String strParentRecordId,
3396:                    boolean bRedraw) {
3397:                String extension = "adoptRecord(\"" + strSourceId + "\", \""
3398:                        + strRecordId + "\", \"" + strParentRecordId + "\", \""
3399:                        + bRedraw + "\").";
3400:                try {
3401:                    java.lang.reflect.Constructor<jsx3.xml.Node> ctor = jsx3.xml.Node.class
3402:                            .getConstructor(Context.class, String.class,
3403:                                    ScriptProxy.class);
3404:                    return ctor.newInstance(this , extension, getScriptProxy());
3405:                } catch (Exception ex) {
3406:                    throw new IllegalArgumentException("Unsupported type: "
3407:                            + jsx3.xml.Node.class.getName());
3408:                }
3409:            }
3410:
3411:            /**
3412:             * Transfers a CDF record from another object to this object. If no XML data source exists
3413:            yet for this object, an empty one is created before adding the new record. This method always updates the
3414:            on-screen view of both the source and destination objects.
3415:
3416:            This method fails quietly if any of the following conditions apply:
3417:
3418:            there is no object with id equal to strSourceId
3419:                
3420:            there is no record in the source object with jsxid equal to strRecordId
3421:                
3422:
3423:                  strParentRecordId is specified and there is no record in this object with
3424:            jsxid equal to strParentRecordId
3425:                
3426:            the this object already has a record with jsxid equal to the record to adopt
3427:             * @param strSourceId <span style="text-decoration: line-through;">either the id of the source object or the</span> source object itself.
3428:             * @param strRecordId the <code>jsxid</code> attribute of the data record in the source object to transfer.
3429:             * @param strParentRecordId the unique <code>jsxid</code> of an existing record. If this optional parameter
3430:            is provided, the adopted record will be added as a child of this record. Otherwise, the adopted record will
3431:            be added to the root <code>data</code> element.
3432:             * @param bRedraw forces suppression of the insert event
3433:             * @return the adopted record.
3434:             */
3435:            @SuppressWarnings("unchecked")
3436:            public jsx3.xml.Node adoptRecord(String strSourceId,
3437:                    String strRecordId, String strParentRecordId,
3438:                    boolean bRedraw) {
3439:                String extension = "adoptRecord(\"" + strSourceId + "\", \""
3440:                        + strRecordId + "\", \"" + strParentRecordId + "\", \""
3441:                        + bRedraw + "\").";
3442:                try {
3443:                    java.lang.reflect.Constructor<jsx3.xml.Node> ctor = jsx3.xml.Node.class
3444:                            .getConstructor(Context.class, String.class,
3445:                                    ScriptProxy.class);
3446:                    return ctor.newInstance(this , extension, getScriptProxy());
3447:                } catch (Exception ex) {
3448:                    throw new IllegalArgumentException("Unsupported type: "
3449:                            + jsx3.xml.Node.class.getName());
3450:                }
3451:            }
3452:
3453:            /**
3454:             * Equivalent to adoptRecord, except that the to-be relationship is as a previousSibling to the CDF record identified by the parameter, strSiblingRecordId
3455:
3456:            This method fails quietly if any of the following conditions apply:
3457:
3458:            there is no record with a jsxid equal to strSourceId
3459:                
3460:            there is no record in the source object with a jsxid equal to strRecordId
3461:                
3462:
3463:                  strSiblingRecordId is specified and there is no record in this object with a
3464:            jsxid equal to strParentRecordId
3465:                
3466:            this object already has a record with jsxid equal to the record to adopt
3467:             * @param strSourceId <span style="text-decoration: line-through;">either the id of the source object or the</span> source object itself.
3468:             * @param strRecordId the <code>jsxid</code> attribute of the data record in the source object to transfer.
3469:             * @param strSiblingRecordId the unique <code>jsxid</code> of an existing record in front of
3470:            which the record identified by strSourceId will be placed
3471:             * @param bRedraw if <code>true</code> or <code>null</code>, the on-screen view of this object is
3472:            immediately updated to reflect the deleted record.
3473:             * @return the adopted record.
3474:             */
3475:            @SuppressWarnings("unchecked")
3476:            public jsx3.xml.Node adoptRecordBefore(
3477:                    jsx3.xml.CdfDocument strSourceId, String strRecordId,
3478:                    String strSiblingRecordId, boolean bRedraw) {
3479:                String extension = "adoptRecordBefore(\"" + strSourceId
3480:                        + "\", \"" + strRecordId + "\", \""
3481:                        + strSiblingRecordId + "\", \"" + bRedraw + "\").";
3482:                try {
3483:                    java.lang.reflect.Constructor<jsx3.xml.Node> ctor = jsx3.xml.Node.class
3484:                            .getConstructor(Context.class, String.class,
3485:                                    ScriptProxy.class);
3486:                    return ctor.newInstance(this , extension, getScriptProxy());
3487:                } catch (Exception ex) {
3488:                    throw new IllegalArgumentException("Unsupported type: "
3489:                            + jsx3.xml.Node.class.getName());
3490:                }
3491:            }
3492:
3493:            /**
3494:             * Equivalent to adoptRecord, except that the to-be relationship is as a previousSibling to the CDF record identified by the parameter, strSiblingRecordId
3495:
3496:            This method fails quietly if any of the following conditions apply:
3497:
3498:            there is no record with a jsxid equal to strSourceId
3499:                
3500:            there is no record in the source object with a jsxid equal to strRecordId
3501:                
3502:
3503:                  strSiblingRecordId is specified and there is no record in this object with a
3504:            jsxid equal to strParentRecordId
3505:                
3506:            this object already has a record with jsxid equal to the record to adopt
3507:             * @param strSourceId <span style="text-decoration: line-through;">either the id of the source object or the</span> source object itself.
3508:             * @param strRecordId the <code>jsxid</code> attribute of the data record in the source object to transfer.
3509:             * @param strSiblingRecordId the unique <code>jsxid</code> of an existing record in front of
3510:            which the record identified by strSourceId will be placed
3511:             * @param bRedraw if <code>true</code> or <code>null</code>, the on-screen view of this object is
3512:            immediately updated to reflect the deleted record.
3513:             * @return the adopted record.
3514:             */
3515:            @SuppressWarnings("unchecked")
3516:            public jsx3.xml.Node adoptRecordBefore(String strSourceId,
3517:                    String strRecordId, String strSiblingRecordId,
3518:                    boolean bRedraw) {
3519:                String extension = "adoptRecordBefore(\"" + strSourceId
3520:                        + "\", \"" + strRecordId + "\", \""
3521:                        + strSiblingRecordId + "\", \"" + bRedraw + "\").";
3522:                try {
3523:                    java.lang.reflect.Constructor<jsx3.xml.Node> ctor = jsx3.xml.Node.class
3524:                            .getConstructor(Context.class, String.class,
3525:                                    ScriptProxy.class);
3526:                    return ctor.newInstance(this , extension, getScriptProxy());
3527:                } catch (Exception ex) {
3528:                    throw new IllegalArgumentException("Unsupported type: "
3529:                            + jsx3.xml.Node.class.getName());
3530:                }
3531:            }
3532:
3533:            /**
3534:             * Converts all attributes in this CDF document that are property keys of the form {key} to
3535:            the value of the property.
3536:             * @param objProps the properties repository to query.
3537:             * @param arrProps if provided, these attributes are converted rather than the default set of
3538:            attributes.
3539:             * @param bUnion if <code>true</code>, <code>arrProps</code> is combined with the default set of
3540:            attributes and those attributes are converted.
3541:             */
3542:            public void convertProperties(java.util.Properties objProps,
3543:                    Object[] arrProps, boolean bUnion) {
3544:                ScriptBuffer script = new ScriptBuffer();
3545:                script.appendCall(getContextPath() + "convertProperties",
3546:                        objProps, arrProps, bUnion);
3547:                getScriptProxy().addScript(script);
3548:            }
3549:
3550:            /**
3551:             * Removes a specific property from a record. If no such record exists in the XML document, this method fails quietly.
3552:             * @param strRecordId the <code>jsxid</code> attribute of the data record to modify.
3553:             * @param strPropName the name of the property to remove from the record.
3554:             * @param bRedraw if <code>true</code> or <code>null</code>, the on-screen view of this object is
3555:            immediately updated to reflect the deleted property.
3556:             */
3557:            public void deleteRecordProperty(String strRecordId,
3558:                    String strPropName, boolean bRedraw) {
3559:                ScriptBuffer script = new ScriptBuffer();
3560:                script.appendCall(getContextPath() + "deleteRecordProperty",
3561:                        strRecordId, strPropName, bRedraw);
3562:                getScriptProxy().addScript(script);
3563:            }
3564:
3565:            /**
3566:             * Returns an object containing the attributes of a particular CDF record as property/value pairs. The object returned by this
3567:            method is a copy of the underlying data. Therefore, updates to this object will not affect the underlying data.
3568:
3569:            The following two lines of code evaluate to the same value:
3570:
3571:            objCDF.getRecord(strId).propName;
3572:            objCDF.getRecordNode(strId).getAttribute("propName");
3573:             * @param strRecordId the <code>jsxid</code> attribute of the data record to return.
3574:             * @return the object representation of a CDF node or <code>null</code> if no such record found.
3575:             */
3576:            @SuppressWarnings("unchecked")
3577:            public jsx3.lang.Object getRecord(String strRecordId) {
3578:                String extension = "getRecord(\"" + strRecordId + "\").";
3579:                try {
3580:                    java.lang.reflect.Constructor<jsx3.lang.Object> ctor = jsx3.lang.Object.class
3581:                            .getConstructor(Context.class, String.class,
3582:                                    ScriptProxy.class);
3583:                    return ctor.newInstance(this , extension, getScriptProxy());
3584:                } catch (Exception ex) {
3585:                    throw new IllegalArgumentException("Unsupported type: "
3586:                            + jsx3.lang.Object.class.getName());
3587:                }
3588:            }
3589:
3590:            /**
3591:             * Returns an object containing the attributes of a particular CDF record as property/value pairs. The object returned by this
3592:            method is a copy of the underlying data. Therefore, updates to this object will not affect the underlying data.
3593:
3594:            The following two lines of code evaluate to the same value:
3595:
3596:            objCDF.getRecord(strId).propName;
3597:            objCDF.getRecordNode(strId).getAttribute("propName");
3598:             * @param strRecordId the <code>jsxid</code> attribute of the data record to return.
3599:             * @param returnType The expected return type
3600:             * @return the object representation of a CDF node or <code>null</code> if no such record found.
3601:             */
3602:            @SuppressWarnings("unchecked")
3603:            public <T> T getRecord(String strRecordId, Class<T> returnType) {
3604:                String extension = "getRecord(\"" + strRecordId + "\").";
3605:                try {
3606:                    java.lang.reflect.Constructor<T> ctor = returnType
3607:                            .getConstructor(Context.class, String.class,
3608:                                    ScriptProxy.class);
3609:                    return ctor.newInstance(this , extension, getScriptProxy());
3610:                } catch (Exception ex) {
3611:                    throw new IllegalArgumentException(
3612:                            "Unsupported return type: " + returnType.getName());
3613:                }
3614:            }
3615:
3616:            /**
3617:             * Returns a record from the XML data source of this object. This returned value is a handle to the record and
3618:            not a clone. Therefore, any updates made to the returned value with update the XML document of this object.
3619:            To reflect such changes in the on-screen view of this object, call
3620:            redrawRecord(strRecordId, jsx3.xml.CDF.UPDATE); on this object.
3621:             * @param strRecordId the <code>jsxid</code> attribute of the data record to return.
3622:             * @return the record node or <code>null</code> if none exists with a <code>jsxid</code>
3623:            attribute equal to <code>strRecordId</code>.
3624:             */
3625:            @SuppressWarnings("unchecked")
3626:            public jsx3.xml.Node getRecordNode(String strRecordId) {
3627:                String extension = "getRecordNode(\"" + strRecordId + "\").";
3628:                try {
3629:                    java.lang.reflect.Constructor<jsx3.xml.Node> ctor = jsx3.xml.Node.class
3630:                            .getConstructor(Context.class, String.class,
3631:                                    ScriptProxy.class);
3632:                    return ctor.newInstance(this , extension, getScriptProxy());
3633:                } catch (Exception ex) {
3634:                    throw new IllegalArgumentException("Unsupported type: "
3635:                            + jsx3.xml.Node.class.getName());
3636:                }
3637:            }
3638:
3639:            /**
3640:             * Inserts a new record into the XML data source of this object. If no XML data source exists
3641:            yet for this object, an empty one is created before adding the new record.
3642:            If a record already exists with an id equal to the jsxid property of objRecord,
3643:            the operation is treated as an update, meaning the existing record is completely removed and a new record with
3644:            the given jsxid is inserted.
3645:             * @param objRecord a JavaScript object containing property/value pairs that define the
3646:            attributes of the XML entity to create. Note that most classes that implement this interface require that all
3647:            records have an attribute named <code>jsxid</code> that is unique across all records in the XML document.
3648:            All property values will be treated as strings. Additionally, the following 3 characters are escaped:
3649:            <code>" &gt; &lt;</code>.
3650:             * @param strParentRecordId the unique <code>jsxid</code> of an existing record. If this optional parameter
3651:            is provided and a record exists with a matching <code>jsxid</code> attribute, the new record will be added as a child of
3652:            this record. Otherwise, the new record will be added to the root <code>data</code> element. However, if a
3653:            record already exists with a <code>jsxid</code> attribute equal to the <code>jsxid</code> property of
3654:            <code>objRecord</code>, this parameter will be ignored. In this case <code>adoptRecord()</code> must be called
3655:            to change the parent of the record.
3656:             * @param bRedraw if <code>true</code> or <code>null</code>, the on-screen view of this object is
3657:            immediately updated to reflect the additional record.
3658:             * @return the newly created or updated entity.
3659:             */
3660:            @SuppressWarnings("unchecked")
3661:            public jsx3.xml.Node insertRecord(jsx3.lang.Object objRecord,
3662:                    String strParentRecordId, boolean bRedraw) {
3663:                String extension = "insertRecord(\"" + objRecord + "\", \""
3664:                        + strParentRecordId + "\", \"" + bRedraw + "\").";
3665:                try {
3666:                    java.lang.reflect.Constructor<jsx3.xml.Node> ctor = jsx3.xml.Node.class
3667:                            .getConstructor(Context.class, String.class,
3668:                                    ScriptProxy.class);
3669:                    return ctor.newInstance(this , extension, getScriptProxy());
3670:                } catch (Exception ex) {
3671:                    throw new IllegalArgumentException("Unsupported type: "
3672:                            + jsx3.xml.Node.class.getName());
3673:                }
3674:            }
3675:
3676:            /**
3677:             * Creates a new CDF record and inserts it into the CDF data source of this object, before the record identified by strSiblingRecordId.
3678:
3679:            This method fails quietly if any of the following conditions apply:
3680:
3681:            there is no existing record with a jsxid equal to strSiblingRecordId
3682:                
3683:            there is an existing record with jsxid equal to objRecord.jsxid
3684:             * @param objRecord a JavaScript object containing property/value pairs that define the
3685:            attributes of the XML entity to create. Note that most classes that implement this interface require that all
3686:            records have an attribute named <code>jsxid</code> that is unique across all records in the XML document.
3687:            All property values will be treated as strings. Additionally, the following 3 characters are escaped:
3688:            <code>" &gt; &lt;</code>.
3689:             * @param strSiblingRecordId the unique <code>jsxid</code> of an existing record before which the new record will be inserted.
3690:             * @param bRedraw if <code>true</code> or <code>null</code>, the on-screen view of this object is
3691:            immediately updated to reflect the additional record.
3692:             * @return the newly created entity.
3693:             */
3694:            @SuppressWarnings("unchecked")
3695:            public jsx3.xml.Node insertRecordBefore(jsx3.lang.Object objRecord,
3696:                    String strSiblingRecordId, boolean bRedraw) {
3697:                String extension = "insertRecordBefore(\"" + objRecord
3698:                        + "\", \"" + strSiblingRecordId + "\", \"" + bRedraw
3699:                        + "\").";
3700:                try {
3701:                    java.lang.reflect.Constructor<jsx3.xml.Node> ctor = jsx3.xml.Node.class
3702:                            .getConstructor(Context.class, String.class,
3703:                                    ScriptProxy.class);
3704:                    return ctor.newInstance(this , extension, getScriptProxy());
3705:                } catch (Exception ex) {
3706:                    throw new IllegalArgumentException("Unsupported type: "
3707:                            + jsx3.xml.Node.class.getName());
3708:                }
3709:            }
3710:
3711:            /**
3712:             * Inserts a new record into the XML data source of this object. This method is the same as
3713:            insertRecord() except that its first parameter is of type jsx3.xml.Entity rather than
3714:            Object.
3715:             * @param objRecordNode an XML element of name <code>record</code>. Note that most classes that
3716:            implement this interface require that all records have an attribute named <code>jsxid</code> that is unique
3717:            across all records in the XML document.
3718:             * @param strParentRecordId the unique <code>jsxid</code> of an existing record. If this optional parameter
3719:            is provided and a record exists with a matching <code>jsxid</code> attribute, the new record will be added as a child of
3720:            this record. Otherwise, the new record will be added to the root <code>data</code> element.
3721:             * @param bRedraw if <code>true</code> or <code>null</code>, the on-screen view of this object is
3722:            immediately updated to reflect the additional record.
3723:             */
3724:            public void insertRecordNode(jsx3.xml.Node objRecordNode,
3725:                    String strParentRecordId, boolean bRedraw) {
3726:                ScriptBuffer script = new ScriptBuffer();
3727:                script.appendCall(getContextPath() + "insertRecordNode",
3728:                        objRecordNode, strParentRecordId, bRedraw);
3729:                getScriptProxy().addScript(script);
3730:            }
3731:
3732:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.