Java Doc for Script.java in  » Ajax » zk » org » zkoss » zul » 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 » zk » org.zkoss.zul 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.zkoss.zk.ui.AbstractComponent
      org.zkoss.zul.Script

Script
public class Script extends AbstractComponent (Code)
A component to represent script codes running at the client. It is the same as HTML SCRIPT tag.

Note: it is the scripting codes running at the client, not at the server. Don't confuse it with the zscript element.

To avoid typo, this compnent requires you to specify the type ( Script.setType ) -- which is, if JavaScript, "text/javascript".

There are three formats when used in a ZUML page:

Method 1: Specify the URL of the JS file

<script type="text/javascript" src="my.js"/>
 

Method 2: Specify the JavaScript codes directly

<script type="text/javascript">
 some_js_at_browser();
 </script>
 

Method 3: Specify the JavaScript codes by use of the content property ( Script.setContent ).

<script type="text/javascript">
 <attribute name="content">
 some_js_at_browser();
 </attribute>
 </script>
 

author:
   tomyeh



Constructor Summary
public  Script()
    

Method Summary
public  StringgetCharset()
     Returns the character enconding of the source.
public  StringgetContent()
     Returns the content of the script element.
public  StringgetSrc()
     Returns the URI of the source that contains the script codes.
public  StringgetType()
     Returns the type of this client script.

Default: null.

public  booleanisChildable()
     Not childable.
public  booleanisDefer()
     Returns whether to defer the execution of the script codes.
public  voidredraw(java.io.Writer out)
    
public  voidsetCharset(String charset)
     Sets the character encoding of the source.
public  voidsetContent(String content)
     Sets the content of the script element.
public  voidsetDefer(boolean defer)
     Sets whether to defer the execution of the script codes.
public  voidsetSrc(String src)
     Sets the URI of the source that contains the script codes.
public  voidsetType(String type)
     Sets the type of this client script. For JavaScript, it is text/javascript

Note: this property is NOT optional.



Constructor Detail
Script
public Script()(Code)




Method Detail
getCharset
public String getCharset()(Code)
Returns the character enconding of the source. It is used with Script.getSrc .

Default: null.




getContent
public String getContent()(Code)
Returns the content of the script element. By content we mean the JavaScript codes that will be enclosed by the HTML SCRIPT element.

Default: null.
since:
   3.0.0




getSrc
public String getSrc()(Code)
Returns the URI of the source that contains the script codes.

Default: null.




getType
public String getType()(Code)
Returns the type of this client script.

Default: null. However, it is invalid. In other words, you must specify a correct type. For JavaScript, it is "text/javascript".




isChildable
public boolean isChildable()(Code)
Not childable.



isDefer
public boolean isDefer()(Code)
Returns whether to defer the execution of the script codes.

Default: false.




redraw
public void redraw(java.io.Writer out) throws java.io.IOException(Code)



setCharset
public void setCharset(String charset)(Code)
Sets the character encoding of the source. It is used with Script.setSrc .



setContent
public void setContent(String content)(Code)
Sets the content of the script element. By content we mean the JavaScript codes that will be enclosed by the HTML SCRIPT element.
since:
   3.0.0



setDefer
public void setDefer(boolean defer)(Code)
Sets whether to defer the execution of the script codes.



setSrc
public void setSrc(String src)(Code)
Sets the URI of the source that contains the script codes.

You either add the script codes directly with the Label children, or set the URI to load the script codes with Script.setSrc . But, not both.
Parameters:
  src - the URI of the source that contains the script codes




setType
public void setType(String type)(Code)
Sets the type of this client script. For JavaScript, it is text/javascript

Note: this property is NOT optional. You must specify one.




Methods inherited from org.zkoss.zk.ui.AbstractComponent
public void addAnnotation(String annotName, Map annotAttrs)(Code)(Java Doc)
public void addAnnotation(String propName, String annotName, Map annotAttrs)(Code)(Java Doc)
public void addEventHandler(String name, EventHandler evthd)(Code)(Java Doc)
public boolean addEventListener(String evtnm, EventListener listener)(Code)(Java Doc)
public boolean addForward(String orgEvent, Component target, String targetEvent)(Code)(Java Doc)
public boolean addForward(String orgEvent, String targetPath, String targetEvent)(Code)(Java Doc)
protected void addMoved(Component oldparent, Page oldpg, Page newpg)(Code)(Java Doc)
public void addSharedAnnotationMap(AnnotationMap annots)(Code)(Java Doc)
public void addSharedEventHandlerMap(EventHandlerMap evthds)(Code)(Java Doc)
protected StringBuffer appendAsapAttr(StringBuffer sb, String evtnm)(Code)(Java Doc)
final public boolean appendChild(Component child)(Code)(Java Doc)
public void applyProperties()(Code)(Java Doc)
public Object clone()(Code)(Java Doc)
public boolean containsVariable(String name, boolean local)(Code)(Java Doc)
public void detach()(Code)(Java Doc)
final public boolean equals(Object o)(Code)(Java Doc)
public List getAnnotatedProperties()(Code)(Java Doc)
public List getAnnotatedPropertiesBy(String annotName)(Code)(Java Doc)
public Annotation getAnnotation(String annotName)(Code)(Java Doc)
public Annotation getAnnotation(String propName, String annotName)(Code)(Java Doc)
public Collection getAnnotations()(Code)(Java Doc)
public Collection getAnnotations(String propName)(Code)(Java Doc)
public Object getAttribute(String name, int scope)(Code)(Java Doc)
final public Object getAttribute(String name)(Code)(Java Doc)
public Map getAttributes(int scope)(Code)(Java Doc)
final public Map getAttributes()(Code)(Java Doc)
public List getChildren()(Code)(Java Doc)
public ComponentDefinition getDefinition()(Code)(Java Doc)
final public Desktop getDesktop()(Code)(Java Doc)
public ZScript getEventHandler(String evtnm)(Code)(Java Doc)
public Set getEventHandlerNames()(Code)(Java Doc)
public Object getExtraCtrl()(Code)(Java Doc)
public Component getFellow(String compId)(Code)(Java Doc)
public Component getFellowIfAny(String compId)(Code)(Java Doc)
public Component getFirstChild()(Code)(Java Doc)
public String getId()(Code)(Java Doc)
public Component getLastChild()(Code)(Java Doc)
public Iterator getListenerIterator(String evtnm)(Code)(Java Doc)
final public String getMold()(Code)(Java Doc)
protected Object getMoldURI()(Code)(Java Doc)
public Namespace getNamespace()(Code)(Java Doc)
public Component getNextSibling()(Code)(Java Doc)
final public Page getPage()(Code)(Java Doc)
public Component getParent()(Code)(Java Doc)
public Component getPreviousSibling()(Code)(Java Doc)
public Component getPropagatee(String evtnm)(Code)(Java Doc)
public Component getRoot()(Code)(Java Doc)
final public IdSpace getSpaceOwner()(Code)(Java Doc)
final public String getUuid()(Code)(Java Doc)
public Object getVariable(String name, boolean local)(Code)(Java Doc)
public boolean insertBefore(Component newChild, Component refChild)(Code)(Java Doc)
public void invalidate()(Code)(Java Doc)
protected boolean isAsapRequired(String evtnm)(Code)(Java Doc)
public boolean isChildable()(Code)(Java Doc)
public boolean isListenerAvailable(String evtnm, boolean asap)(Code)(Java Doc)
public boolean isVisible()(Code)(Java Doc)
protected Object newExtraCtrl()(Code)(Java Doc)
public void onChildAdded(Component child)(Code)(Java Doc)
public void onChildRemoved(Component child)(Code)(Java Doc)
public void onDrawNewChild(Component child, StringBuffer out) throws IOException(Code)(Java Doc)
public void onPageAttached(Page newpage, Page oldpage)(Code)(Java Doc)
public void onPageDetached(Page page)(Code)(Java Doc)
public WrongValueException onWrongValue(WrongValueException ex)(Code)(Java Doc)
public void redraw(Writer out) throws IOException(Code)(Java Doc)
public Object removeAttribute(String name, int scope)(Code)(Java Doc)
final public Object removeAttribute(String name)(Code)(Java Doc)
public boolean removeChild(Component child)(Code)(Java Doc)
public boolean removeEventListener(String evtnm, EventListener listener)(Code)(Java Doc)
public boolean removeForward(String orgEvent, Component target, String targetEvent)(Code)(Java Doc)
public boolean removeForward(String orgEvent, String targetPath, String targetEvent)(Code)(Java Doc)
public void response(String key, AuResponse response)(Code)(Java Doc)
public void sessionDidActivate(Page page)(Code)(Java Doc)
public void sessionWillPassivate(Page page)(Code)(Java Doc)
public Object setAttribute(String name, Object value, int scope)(Code)(Java Doc)
final public Object setAttribute(String name, Object value)(Code)(Java Doc)
public void setComponentDefinition(ComponentDefinition compdef)(Code)(Java Doc)
public void setId(String id)(Code)(Java Doc)
public void setMold(String mold)(Code)(Java Doc)
public void setPage(Page page)(Code)(Java Doc)
public void setPageBefore(Page page, Component refRoot)(Code)(Java Doc)
public void setParent(Component parent)(Code)(Java Doc)
public void setVariable(String name, Object val, boolean local)(Code)(Java Doc)
public boolean setVisible(boolean visible)(Code)(Java Doc)
public void smartUpdate(String attr, String value)(Code)(Java Doc)
public void smartUpdate(String attr, int value)(Code)(Java Doc)
public void smartUpdate(String attr, boolean value)(Code)(Java Doc)
public void smartUpdateDeferred(String attr, DeferredValue value)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void unsetVariable(String name, boolean local)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.