Source Code Cross Referenced for GoToAndChangeValueConsoleMacroTag.java in  » Workflow-Engines » JFolder » org » jfolder » console » macro » v1 » 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 » Workflow Engines » JFolder » org.jfolder.console.macro.v1 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * JFolder, Copyright 2001-2006 Gary Steinmetz
003:         *
004:         * Distributable under LGPL license.
005:         * See terms of license at gnu.org.
006:         */
007:
008:        package org.jfolder.console.macro.v1;
009:
010:        //base classes
011:        import java.util.HashMap;
012:
013:        //project specific classes
014:        import org.jfolder.common.tagging.AppraiseConceptTagContext;
015:        import org.jfolder.common.tagging.CompoundConceptTagConstraintContext;
016:        import org.jfolder.common.tagging.ConceptTagCharacteristic;
017:        import org.jfolder.common.tagging.ConceptTagCharacteristicHolder;
018:        import org.jfolder.common.tagging.ConceptTagConstraint;
019:        import org.jfolder.common.tagging.ConceptTagConstraintHolder;
020:        import org.jfolder.common.tagging.ConceptTagConstraintTemplate;
021:        import org.jfolder.common.tagging.DynamicConceptTagConstraintContext;
022:        import org.jfolder.common.tagging.InitializeConceptTagContext;
023:        import org.jfolder.common.tagging.RootConceptTagHolder;
024:        import org.jfolder.common.tagging.StaticConceptTagConstraintContext;
025:        import org.jfolder.common.tagging.StudioConceptTagInstanceInfoContext;
026:        import org.jfolder.common.tagging.StudioConceptTagTypeInfoContext;
027:        import org.jfolder.common.utils.xml.XMLHelper;
028:        import org.jfolder.common.web.template.ConsoleTemplateSession;
029:        import org.jfolder.common.web.template.PageSetupContext;
030:        import org.jfolder.console.macro.ConsoleMacro;
031:        import org.jfolder.console.macro.ConsoleMacroTag;
032:        import org.jfolder.console.macro.ConsoleMacroTagHelper;
033:
034:        //other classes
035:
036:        public class GoToAndChangeValueConsoleMacroTag implements 
037:                ConsoleMacroTag {
038:
039:            ////characteristics
040:            private ConceptTagCharacteristic idCtchar = null;
041:            private ConceptTagCharacteristic valueCtchar = null;
042:            ////private ConceptTagCharacteristic conceptTagRegistryCtchar = null;
043:            //
044:            ////pane details
045:            //private final static String PANE_CTCON = "pane";
046:            //private final static String PANE_TITLE = "Pane";
047:            //private final static String PANE_SHORT_DESCRIPTION = "Pane";
048:            //
049:            ////property details
050:            //private final static String PROPERTY_CTCON = "property";
051:            //private final static String PROPERTY_TITLE = "Property";
052:            //private final static String PROPERTY_SHORT_DESCRIPTION = "Property";
053:            //
054:            ////name of property details
055:            //private final static String PROPERTY_CTCON_NAME_CTCTEMP = "name";
056:            //private final static String PROPERTY_CTCON_NAME_TITLE = "Name";
057:            //private final static String PROPERTY_CTCON_NAME_SHORT_DESCRIPTION =
058:            //"Name";
059:            //
060:            ////value of property details
061:            //private final static String PROPERTY_CTCON_VALUE_CTCTEMP = "value";
062:            //private final static String PROPERTY_CTCON_VALUE_TITLE = "Value";
063:            //private final static String PROPERTY_CTCON_VALUE_SHORT_DESCRIPTION =
064:            //    "Value";
065:
066:            //id details
067:            private final static String ID_CTCON = "id";
068:            private final static String ID_TITLE = "ID";
069:            private final static String ID_SHORT_DESCRIPTION = "ID";
070:
071:            //value details
072:            private final static String VALUE_CTCON = "value";
073:            private final static String VALUE_TITLE = "Value";
074:            private final static String VALUE_SHORT_DESCRIPTION = "Value";
075:
076:            ///////////////////////////////////
077:
078:            public void initialize(InitializeConceptTagContext inIctc) {
079:
080:                //
081:                ConceptTagConstraintHolder rootCtconh = ConceptTagConstraintHolder
082:                        .newInstance(inIctc);
083:
084:                //constrain "id"
085:                ConceptTagConstraint idCtcon = ConceptTagConstraint
086:                        .newInstance(ID_CTCON, rootCtconh);
087:                idCtcon.setTitle(ID_TITLE);
088:                idCtcon.setShortDescription(ID_SHORT_DESCRIPTION);
089:                //
090:                StaticConceptTagConstraintContext idSctcc = StaticConceptTagConstraintContext
091:                        .newInstance(idCtcon);
092:
093:                //constrain "value"
094:                ConceptTagConstraint valueCtcon = ConceptTagConstraint
095:                        .newInstance(VALUE_CTCON, rootCtconh);
096:                valueCtcon.setTitle(VALUE_TITLE);
097:                valueCtcon.setShortDescription(VALUE_SHORT_DESCRIPTION);
098:                //
099:                StaticConceptTagConstraintContext valueSctcc = StaticConceptTagConstraintContext
100:                        .newInstance(valueCtcon);
101:
102:                ////constrain "pane"
103:                //ConceptTagConstraint paneCtcon =
104:                //    ConceptTagConstraint.newInstance(PANE_CTCON, rootCtconh);
105:                //paneCtcon.setTitle(PANE_TITLE);
106:                //paneCtcon.setShortDescription(PANE_SHORT_DESCRIPTION);
107:                ////
108:                //DynamicConceptTagConstraintContext paneDctcc =
109:                //    DynamicConceptTagConstraintContext.newInstance(paneCtcon);
110:                ////
111:                //paneDctcc.addDefaultValue(UpDownConsoleConfigTag.class);
112:                //
113:                ////constrain "property"
114:                //ConceptTagConstraint propertyCtcon =
115:                //    ConceptTagConstraint.newInstance(PROPERTY_CTCON, rootCtconh);
116:                //propertyCtcon.setTitle(PROPERTY_TITLE);
117:                //propertyCtcon.setShortDescription(PROPERTY_SHORT_DESCRIPTION);
118:                ////
119:                //CompoundConceptTagConstraintContext propertyCctcc =
120:                //    CompoundConceptTagConstraintContext.newInstance(propertyCtcon);
121:                //
122:                ////constrain "name" of "property"
123:                //ConceptTagConstraintTemplate propertyCtconNameCtctemp =
124:                //    ConceptTagConstraintTemplate.newInstance(
125:                //        PROPERTY_CTCON_NAME_CTCTEMP, propertyCctcc);
126:                ////
127:                //StaticConceptTagConstraintContext propertyCtconNameSctcc =
128:                //    StaticConceptTagConstraintContext.newInstance(
129:                //        propertyCtconNameCtctemp);
130:                //
131:                ////constrain "value" of "property"
132:                //ConceptTagConstraintTemplate propertyCtconValueCtctemp =
133:                //    ConceptTagConstraintTemplate.newInstance(
134:                //        PROPERTY_CTCON_VALUE_CTCTEMP, propertyCctcc);
135:                ////
136:                //StaticConceptTagConstraintContext propertyCtconValueSctcc =
137:                //    StaticConceptTagConstraintContext.newInstance(
138:                //        propertyCtconValueCtctemp);
139:
140:                //
141:                inIctc.initialize();
142:
143:                //
144:                this .idCtchar = idCtcon.getCharacteristic();
145:                this .valueCtchar = valueCtcon.getCharacteristic();
146:
147:            }
148:
149:            //
150:            public void appraise(AppraiseConceptTagContext inCtic) {
151:                if (inCtic instanceof  StudioConceptTagInstanceInfoContext) {
152:                    StudioConceptTagInstanceInfoContext sctiic = (StudioConceptTagInstanceInfoContext) inCtic;
153:                    sctiic.setInstanceTitle("Go To And Change Value");
154:                    sctiic.setInstanceDescription("Go To And Change Value");
155:                } else if (inCtic instanceof  StudioConceptTagTypeInfoContext) {
156:                    StudioConceptTagTypeInfoContext scttic = (StudioConceptTagTypeInfoContext) inCtic;
157:                    scttic.setTypeTitle("Go To And Change Value");
158:                    scttic.setTypeDescription("Go To And Change Value");
159:                }
160:            }
161:
162:            //
163:            public final static GoToAndChangeValueConsoleMacroTag newInstance(
164:                    ConceptTagCharacteristic inCtchar, String inId,
165:                    String inValue) {
166:                //
167:                GoToAndChangeValueConsoleMacroTag outValue = null;
168:
169:                outValue = new GoToAndChangeValueConsoleMacroTag();
170:                //
171:                ConceptTagCharacteristicHolder nextCtcharh = inCtchar.addValue(
172:                        inCtchar.getValueLength(), outValue, true);
173:                //
174:                ConceptTagCharacteristic nextIdCtchar = nextCtcharh
175:                        .registerCharacteristic(ID_CTCON);
176:                nextIdCtchar.addValue(0, inId);
177:                //
178:                ConceptTagCharacteristic nextValueCtchar = nextCtcharh
179:                        .registerCharacteristic(VALUE_CTCON);
180:                nextValueCtchar.addValue(0, inValue);
181:
182:                return outValue;
183:            }
184:
185:            //
186:            public void generateMacroCommands(PageSetupContext inPsc,
187:                    ConsoleTemplateSession inCts, RootConceptTagHolder inRcth,
188:                    HashMap inVars, String inFromHandle,
189:                    String inAliasFromHandle, String inSourcePage,
190:                    String inDestinationPage) {
191:                //
192:                String id = this .idCtchar.getValueAsString(0, null);
193:                id = ConsoleMacroTagHelper.replaceEnvVars(id, inVars);
194:                //
195:                String value = this .valueCtchar.getValueAsString(0, null);
196:                value = ConsoleMacroTagHelper.replaceEnvVars(value, inVars);
197:                value = XMLHelper.fromStringToJSCData(value);
198:                //
199:                inPsc.addMacroCommand("macroGoTo('" + id + "')");
200:                inPsc.addMacroCommand("macroClickImage()");
201:                inPsc.addMacroCommand("macroChangeValue('" + id + "', '"
202:                        + value + "')");
203:                //inPsc.addMacroCommand("macroAlert('ChangeFormValue Not Impl')");
204:                //macroChangeValue(inSource, inValue)
205:            }
206:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.