Source Code Cross Referenced for Anchor.java in  » J2EE » webwork-2.2.6 » com » opensymphony » webwork » components » 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 » J2EE » webwork 2.2.6 » com.opensymphony.webwork.components 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.opensymphony.webwork.components;
002:
003:        import com.opensymphony.xwork.util.OgnlValueStack;
004:
005:        import javax.servlet.http.HttpServletRequest;
006:        import javax.servlet.http.HttpServletResponse;
007:
008:        /**
009:         * <!-- START SNIPPET: javadoc -->
010:         *
011:         * A tag that creates a HTML &lt;a href='' /&gt; that when clicked calls a URL remote XMLHttpRequest call via the dojo
012:         * framework. The result from the URL is executed as JavaScript. If a "listenTopics" is supplied, it will publish a
013:         * 'click' message to that topic when the result is returned.
014:         *
015:         * <!-- END SNIPPET: javadoc -->
016:         *
017:         * <p/> <b>Examples</b>
018:         *
019:         * <pre>
020:         * <!-- START SNIPPET: example1 -->
021:         * &lt;ww:a id="link1" theme="ajax" href="/DoIt.action" errorText="An error ocurred" showErrorTransportText="true"&gt;
022:         *     &lt;img border="none" src="&lt;%=request.getContextPath()%&gt;/images/delete.gif"/&gt;
023:         *     &lt;ww:param name="id" value="1"/&gt;
024:         * &lt;/ww:a&gt;
025:         * <!-- END SNIPPET: example1 -->
026:         * </pre>
027:         *
028:         * </p>
029:         *
030:         * <!-- START SNIPPET: exampledescription1 -->
031:         *
032:         * Results in
033:         *
034:         * <!-- END SNIPPET: exampledescription1 -->
035:         *
036:         * </p>
037:         *
038:         * <pre>
039:         * <!-- START SNIPPET: example2 -->
040:         * &lt;a dojoType="BindAnchor" evalResult="true" id="link1" href="/DoIt.action?id=1" errorHtml="An error ocurred"
041:         * showTransportError="true"&gt;&lt;/a&gt;
042:         * <!-- END SNIPPET: example2 -->
043:         * </pre>
044:         *
045:         * </p>
046:         *
047:         * <!-- START SNIPPET: exampledescription2 -->
048:         *
049:         * Here is an example that uses the postInvokeJS. This example is in altSyntax=true:
050:         *
051:         * <!-- END SNIPPET: exampledescription2 -->
052:         *
053:         * </p>
054:         *
055:         * <pre>
056:         * <!-- START SNIPPET: example3 -->
057:         * &lt;ww:a id="test" theme="ajax" href="/simpeResult.action" preInvokeJS="confirm(\'You sure\')"&gt;
058:         * 	A
059:         * &lt;/ww:a&gt;
060:         * <!-- END SNIPPET: example3 -->
061:         * </pre>
062:         *
063:         * @author Ian Roughley
064:         * @author Rene Gielen
065:         * @version $Revision: 2468 $
066:         * @ww.tag name="a" tld-body-content="JSP" tld-tag-class="com.opensymphony.webwork.views.jsp.ui.AnchorTag"
067:         * description="Render a HTML href element that when clicked calls a URL via remote XMLHttpRequest"
068:         * @since 2.2
069:         */
070:        public class Anchor extends RemoteCallUIBean {
071:            final public static String OPEN_TEMPLATE = "a";
072:            final public static String TEMPLATE = "a-close";
073:            final public static String COMPONENT_NAME = Anchor.class.getName();
074:
075:            protected String notifyTopics;
076:            protected String preInvokeJS;
077:
078:            public Anchor(OgnlValueStack stack, HttpServletRequest request,
079:                    HttpServletResponse response) {
080:                super (stack, request, response);
081:            }
082:
083:            public String getDefaultOpenTemplate() {
084:                return OPEN_TEMPLATE;
085:            }
086:
087:            protected String getDefaultTemplate() {
088:                return TEMPLATE;
089:            }
090:
091:            public void evaluateExtraParams() {
092:                super .evaluateExtraParams();
093:
094:                if (notifyTopics != null) {
095:                    addParameter("notifyTopics", findString(notifyTopics));
096:                }
097:
098:                if (preInvokeJS != null) {
099:                    addParameter("preInvokeJS", findString(preInvokeJS));
100:                }
101:            }
102:
103:            /**
104:             * The id to assign the component
105:             * @ww.tagattribute required="false" type="String"
106:             */
107:            public void setId(String id) {
108:                super .setId(id);
109:            }
110:
111:            /**
112:             * Topic names to post an event to after the remote call has been made
113:             * @ww.tagattribute required="false"
114:             */
115:            public void setNotifyTopics(String notifyTopics) {
116:                this .notifyTopics = notifyTopics;
117:            }
118:
119:            /**
120:             * A javascript snippet that will be invoked prior to the execution of the target href. If provided must return true or false. True indicates to continue executing target, false says do not execute link target. Possible uses are for confirm dialogs.
121:             * @ww.tagattribute required="false" type="String"
122:             */
123:            public void setPreInvokeJS(String preInvokeJS) {
124:                this.preInvokeJS = preInvokeJS;
125:            }
126:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.