Java Doc for Page.java in  » Ajax » zk » org » zkoss » zk » ui » Java Source Code / Java DocumentationJava Source Code and Java Documentation

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


org.zkoss.zk.ui.Page

All known Subclasses:   org.zkoss.zk.ui.impl.PageImpl,
Page
public interface Page extends IdSpace(Code)
A page. A desktop consists of a set of pages.

When a ZK request is asking to render a new page, a new page is created and components that are created duing this request all belong to this page.

If a ZK requst is asking an update, it must have at lease one UUID of a component ( Component.getUuid . From this UUID, we know which page it belongs and activate it to process the update.

By activation, the system guarantees no concurrent access to pages and components (so you don't need use synchronized for them).

Desktop

In portal and some environments, a client request (e.g., ServletRequest) might consists of several ZK requests ( org.zkoss.zk.au.AuRequest ). While each ZK request might ask to create an independent page, all these pages are grouped as a desktop, such that they are activated and removed at the same time. Moreover, pages in the same desktop could communicate to eath other (see Inter-page communication).

A session, Session , might have multiple desktops of pages, Page , while a page belongs to exactly one session. A page, Page , might have many components, Component , while a component belongs to exactly one page.

All components of the same desktop of pages are removed at the same time if a page become 'obsolete'.

During each execution (${link Execution}), exactly one desktop of pages are locked (aka., activated). Though an execution serves a client request (e.g., ServletRequest), a client request might consist of multiple ZK request ( org.zkoss.zk.au.AuRequest ). Each ZK request might target to a different page (of the same desktop).

Inter-page Communication

To do inter-page communication, you could do:

  1. Invoke methods of components from another page directly.
  2. Use Execution.postEvent to post events to components from another page.

They are the same as handling components from the same page. However, invoking method directly for components from another page has one restriction:
It cannot create component.
author:
   tomyeh



Field Summary
final public static  intAPPLICATION_SCOPE
     Used with Page.getAttribute and relevants to denote custom attributes shared by the whole application.
final public static  intDESKTOP_SCOPE
     Used with Page.getAttribute and relevants to denote custom attributes shared by the same desktop.
final public static  intPAGE_SCOPE
     Used with Page.getAttribute and relevants to denote custom attributes shared by the same page.
final public static  intREQUEST_SCOPE
     Used with Page.getAttribute and relevants to denote custom attributes shared by the same request.
final public static  intSESSION_SCOPE
     Used with Page.getAttribute and relevants to denote custom attributes shared by the same session.


Method Summary
public  booleanaddEventListener(String evtnm, EventListener listener)
     Adds an event listener to specified event for all components in this page.
public  voidaddFunctionMapper(FunctionMapper mapper)
     Adds the function mapper in addition to the current one.
public  booleanaddVariableResolver(VariableResolver resolver)
     Adds a name resolver that will be used to resolve a variable by Page.getVariable .
public  booleancontainsVariable(String name)
     Returns whether the specified variable is defined.
public  ObjectgetAttribute(String name, int scope)
     Returns the value of the specified custom attribute in the specified scope.
public  ObjectgetAttribute(String name)
     Returns the value of the specified attribute associated with this page.
public  MapgetAttributes(int scope)
     Returns all custom attributes of the specified scope.
public  MapgetAttributes()
     Returns all custom attributes associated with this page.
public  ComponentDefinitiongetComponentDefinition(String name, boolean recur)
     Returns the component definition of the specified name, or null if not found.
public  ComponentDefinitiongetComponentDefinition(Class cls, boolean recur)
     Returns the component definition of the specified class, or null if not found.
public  ComponentDefinitionMapgetComponentDefinitionMap()
     Returns the map of component definitions (never null).
public  DesktopgetDesktop()
     Returns the desktop that this page belongs to.
public  ObjectgetELVariable(String name)
     Returns a variable that is visible to XEL expressions.
public  FunctionMappergetFunctionMapper()
     Returns the function mapper for resolving XEL functions, or null if not available.
public  StringgetId()
     Returns ID which is unique in the request (never null).
public  InterpretergetInterpreter(String zslang)
     Returns the interpreter of the specified scripting language.

The interpreter will be loaded and initialized, if it is not loaded yet.
Parameters:
  zslang - the scripting language.

public  LanguageDefinitiongetLanguageDefinition()
     Returns the language definition that this page belongs to (never null).
public  IteratorgetListenerIterator(String evtnm)
     Returns an iterator for iterating listener for the specified event.
public  CollectiongetLoadedInterpreters()
     Returns all loaded interpreters.
public  NamespacegetNamespace()
     Returns the namespace used to store variables belonging to the ID space of this page.
public  StringgetRequestPath()
     Returns the request path of this page, or "" if not available.

It is the same as the servlet path (javax.servlet.http.HttpServletRequest's getServletPath), if ZK is running at a servlet container.

Note: Desktop.getRequestPath returns the request path that causes the desktop to create.

public  CollectiongetRoots()
     Returns a readonly list of the root components.
public  StringgetStyle()
     Returns the CSS style of this page, or empty if not specified.
public  StringgetTitle()
     Returns the title of the desktop this page belongs to (and evaluate it if it contains an expression).
public  StringgetUuid()
     Returns UUID (universal unique ID) which is unquie in the whole session.
public  ObjectgetVariable(String name)
     Returns the value of a variable defined in the namespace ( Page.getNamespace ).
public  ObjectgetXelVariable(String name)
     Returns a variable that is visible to XEL expressions.
public  ClassgetZScriptClass(String clsnm)
     Returns the class of the specified name by searching the thread class loader and the classes defined in the loaded interpreters.
public  FunctiongetZScriptFunction(String name, Class[] argTypes)
     Returns the variable of the specified name by searching the loaded interpreters.
public  FunctiongetZScriptFunction(Namespace ns, String name, Class[] argTypes)
     Returns the variable of the specified name by searching the logical scope of the specified namespace for all the loaded interpreters.

It is similar to Page.getZScriptVariable(String) , except it uses the specified namespace as a reference to identify the correct scope for searching the variable. If the interpreter does NOT support hierachical scopes, this method is the same as Page.getZScriptVariable(String) .
Parameters:
  ns - the namespace used as a reference to identify thecorrect scope for searching the variable.It is ignored if the interpreter doesn't support hierachical scopes.Note: this method doesn't look for any variable stored in ns.

public  FunctiongetZScriptFunction(Component comp, String name, Class[] argTypes)
     Returns the variable of the specified name by searching the logical scope of the namespace of the specified component for all the loaded interpreters.
public  StringgetZScriptLanguage()
     Returns the default scripting language which is assumed when a zscript element doesn't specify any language. the default scripting language, say, Java.
public  org.zkoss.zk.scripting.MethodgetZScriptMethod(String name, Class[] argTypes)
    
public  org.zkoss.zk.scripting.MethodgetZScriptMethod(Namespace ns, String name, Class[] argTypes)
    
public  ObjectgetZScriptVariable(String name)
     Returns the value of the variable of the specified name by searching the loaded interpreters, if any.
public  ObjectgetZScriptVariable(Namespace ns, String name)
     Returns the value of the variable of the specified name by searching the logical scope of the specified namespace for all the loaded interpreters, if any.
public  ObjectgetZScriptVariable(Component comp, String name)
     Returns the value of the variable of the specified name by searching the logical scope of the namespace of the specified component for all the loaded interpreters, if any.
public  voidinterpret(String zslang, String script, Namespace ns)
     Interpret a script of the specified scripting language against the specified namespace.
Parameters:
  zslang - the scripting language.
public  voidinvalidate()
     Invalidates this page to cause all components to redraw.
public  booleanisListenerAvailable(String evtnm)
     Returns whether the event listener is available.
public  ObjectremoveAttribute(String name, int scope)
     Removes the specified custom attribute in the specified scope.
public  ObjectremoveAttribute(String name)
     Removes the specified attribute custom associated with the page.
public  voidremoveComponents()
     Removes all components in this page.
public  booleanremoveEventListener(String evtnm, EventListener listener)
     Removes an event listener.
public  booleanremoveVariableResolver(VariableResolver resolver)
     Removes a name resolve that was added by Page.addVariableResolver .
public  ClassresolveClass(String clsnm)
     Resolves the class of the specified name.
public  ObjectsetAttribute(String name, Object value, int scope)
     Sets the value of the specified custom attribute in the specified scope.
public  ObjectsetAttribute(String name, Object value)
     Sets the value of the specified custom attribute associated with this page.

Note: The attribute is removed (by Page.removeAttribute if value is null, while Page.setVariable considers null as a legal value.
Parameters:
  value - the value.

public  voidsetId(String id)
     Sets the identifier of this page.
public  voidsetStyle(String style)
     Sets the CSS style of this page.
public  voidsetTitle(String title)
     Sets the title of the desktop this page belongs to (it might contain an expression).
public  voidsetVariable(String name, Object val)
     Sets a variable to the namespace ( Page.getNamespace ).
public  voidsetZScriptLanguage(String zslang)
     Sets the defafult scripting language which will be assumed if a zscript element doesn't specify any language.
public  voidunsetVariable(String name)
     Unsets a variable from the namespace ( Page.getNamespace ).

Field Detail
APPLICATION_SCOPE
final public static int APPLICATION_SCOPE(Code)
Used with Page.getAttribute and relevants to denote custom attributes shared by the whole application.

It is also known as the application attributes.

It is the same as WebApp.getAttributes .




DESKTOP_SCOPE
final public static int DESKTOP_SCOPE(Code)
Used with Page.getAttribute and relevants to denote custom attributes shared by the same desktop.

It is also known as the desktop attributes.

It is the same as Desktop.getAttributes .




PAGE_SCOPE
final public static int PAGE_SCOPE(Code)
Used with Page.getAttribute and relevants to denote custom attributes shared by the same page.

It is also known as the page attributes.

It is the same as Page.getAttributes .




REQUEST_SCOPE
final public static int REQUEST_SCOPE(Code)
Used with Page.getAttribute and relevants to denote custom attributes shared by the same request.

It is also known as the request attributes.

It is the same as Execution.getAttributes .




SESSION_SCOPE
final public static int SESSION_SCOPE(Code)
Used with Page.getAttribute and relevants to denote custom attributes shared by the same session.

It is also known as the session attributes.

It is the same as Session.getAttributes .






Method Detail
addEventListener
public boolean addEventListener(String evtnm, EventListener listener)(Code)
Adds an event listener to specified event for all components in this page.

Due to performance consideration, unlike Component.addEventListener , all event listeners for the page are deferrable, no matter org.zkoss.zk.ui.event.Deferrable is implemented or not.
Parameters:
  evtnm - what event to listen (never null) whether the listener is added; false if it was added before.
See Also:   Component.addEventListener




addFunctionMapper
public void addFunctionMapper(FunctionMapper mapper)(Code)
Adds the function mapper in addition to the current one.

The new added function mapper has the higher priority. Page.getFunctionMapper will return the new
Parameters:
  mapper - the new function mapper (null to ignore).




addVariableResolver
public boolean addVariableResolver(VariableResolver resolver)(Code)
Adds a name resolver that will be used to resolve a variable by Page.getVariable .

Note: the variables resolved by the specified resolver are accessible to both zscript and EL expressions. wether the resolver is added successfully.Note: if the resolver was added before, it won't be added againand this method returns false.




containsVariable
public boolean containsVariable(String name)(Code)
Returns whether the specified variable is defined.

Note: null is a valid value for variable, so this method is used to know whether a variable is defined. On the other hand, Page.setAttribute actually remove an attribute (by Page.removeAttribute if value is null.




getAttribute
public Object getAttribute(String name, int scope)(Code)
Returns the value of the specified custom attribute in the specified scope.

If scope is Page.PAGE_SCOPE , it means custom attributes shared by components from the same page as this one's.

If scope is Page.DESKTOP_SCOPE , it means custom attributes shared by components from the same desktopas this one's.
Parameters:
  scope - Page.APPLICATION_SCOPE, Page.SESSION_SCOPE,Page.PAGE_SCOPE, Page.REQUEST_SCOPE or Page.DESKTOP_SCOPE.




getAttribute
public Object getAttribute(String name)(Code)
Returns the value of the specified attribute associated with this page.



getAttributes
public Map getAttributes(int scope)(Code)
Returns all custom attributes of the specified scope. You could reference them thru componentScope, spaceScope, pageScope, requestScope and desktopScope in zscript and EL.

If scope is Page.PAGE_SCOPE , it means custom attributes shared by components from the same page as this one's.

If scope is Page.DESKTOP_SCOPE , it means custom attributes shared by components from the same desktopas this one's.
Parameters:
  scope - Page.APPLICATION_SCOPE, Page.SESSION_SCOPE,Page.PAGE_SCOPE, Page.REQUEST_SCOPE or Page.DESKTOP_SCOPE.




getAttributes
public Map getAttributes()(Code)
Returns all custom attributes associated with this page.



getComponentDefinition
public ComponentDefinition getComponentDefinition(String name, boolean recur)(Code)
Returns the component definition of the specified name, or null if not found.

Note: unlike LanguageDefinition.getComponentDefinition , this method doesn't throw ComponentNotFoundException if not found. It just returns null.
Parameters:
  recur - whether to look up the component from Page.getLanguageDefinition




getComponentDefinition
public ComponentDefinition getComponentDefinition(Class cls, boolean recur)(Code)
Returns the component definition of the specified class, or null if not found.

Note: unlike LanguageDefinition.getComponentDefinition , this method doesn't throw ComponentNotFoundException if not found. It just returns null.
Parameters:
  recur - whether to look up the component from Page.getLanguageDefinition




getComponentDefinitionMap
public ComponentDefinitionMap getComponentDefinitionMap()(Code)
Returns the map of component definitions (never null).

Note: the map is shared among all instance of the same page definition. Any component definition added (by ComponentDefinitionMap.add ) are visible to all other instances of the same page definition. Thus, it is NOT a good idea to change its content.




getDesktop
public Desktop getDesktop()(Code)
Returns the desktop that this page belongs to.

Note: it returns null when org.zkoss.zk.ui.util.Initiator.doInit is called.




getELVariable
public Object getELVariable(String name)(Code)
Returns a variable that is visible to XEL expressions. Page.getXelVariable



getFunctionMapper
public FunctionMapper getFunctionMapper()(Code)
Returns the function mapper for resolving XEL functions, or null if not available.
since:
   3.0.0



getId
public String getId()(Code)
Returns ID which is unique in the request (never null).

Note: it returns null when org.zkoss.zk.ui.util.Initiator.doInit is called.




getInterpreter
public Interpreter getInterpreter(String zslang)(Code)
Returns the interpreter of the specified scripting language.

The interpreter will be loaded and initialized, if it is not loaded yet.
Parameters:
  zslang - the scripting language. If null, Page.getZScriptLanguageis assumed.
exception:
  InterpreterNotFoundException - if not found.




getLanguageDefinition
public LanguageDefinition getLanguageDefinition()(Code)
Returns the language definition that this page belongs to (never null).



getListenerIterator
public Iterator getListenerIterator(String evtnm)(Code)
Returns an iterator for iterating listener for the specified event.



getLoadedInterpreters
public Collection getLoadedInterpreters()(Code)
Returns all loaded interpreters.



getNamespace
public Namespace getNamespace()(Code)
Returns the namespace used to store variables belonging to the ID space of this page.
See Also:   Page.interpret



getRequestPath
public String getRequestPath()(Code)
Returns the request path of this page, or "" if not available.

It is the same as the servlet path (javax.servlet.http.HttpServletRequest's getServletPath), if ZK is running at a servlet container.

Note: Desktop.getRequestPath returns the request path that causes the desktop to create. And, there might be multiple pages in the same desktop.
See Also:   Execution.getContextPath
See Also:   Desktop.getRequestPath




getRoots
public Collection getRoots()(Code)
Returns a readonly list of the root components.



getStyle
public String getStyle()(Code)
Returns the CSS style of this page, or empty if not specified.



getTitle
public String getTitle()(Code)
Returns the title of the desktop this page belongs to (and evaluate it if it contains an expression).

Default: "".




getUuid
public String getUuid()(Code)
Returns UUID (universal unique ID) which is unquie in the whole session. The UUID is generated automatically and immutable.

It is mainly used for communication between client and server and you rarely need to access it.




getVariable
public Object getVariable(String name)(Code)
Returns the value of a variable defined in the namespace ( Page.getNamespace ).

It is the same as getNamespace().getVariable(name, true).

Differences between Page.getVariable and Page.getZScriptVariable

Page.getVariable returns only variables defined by Page.setVariable (i.e., a shortcut to Namespace.setVariable ). On the other hand, Page.getZScriptVariable returns these variables and those defined when executing zscripts.
See Also:   Component.getVariable
See Also:   Component.getNamespace




getXelVariable
public Object getXelVariable(String name)(Code)
Returns a variable that is visible to XEL expressions.

This method is mainly used to access special variable, such as request parameters (if this page is requested by HTTP).

Note: components that are specified with an ID are already accessible by Page.getVariable .
since:
   3.0.0




getZScriptClass
public Class getZScriptClass(String clsnm)(Code)
Returns the class of the specified name by searching the thread class loader and the classes defined in the loaded interpreters.

Note: if not defined in the interpeter, it will also look for the class by use of the current thread's class loader. See Page.resolveClass . the class, or null if not found
See Also:   Page.getLoadedInterpreters




getZScriptFunction
public Function getZScriptFunction(String name, Class[] argTypes)(Code)
Returns the variable of the specified name by searching the loaded interpreters. the method, or null if not found
See Also:   Page.getLoadedInterpreters
since:
   3.0.0



getZScriptFunction
public Function getZScriptFunction(Namespace ns, String name, Class[] argTypes)(Code)
Returns the variable of the specified name by searching the logical scope of the specified namespace for all the loaded interpreters.

It is similar to Page.getZScriptVariable(String) , except it uses the specified namespace as a reference to identify the correct scope for searching the variable. If the interpreter does NOT support hierachical scopes, this method is the same as Page.getZScriptVariable(String) .
Parameters:
  ns - the namespace used as a reference to identify thecorrect scope for searching the variable.It is ignored if the interpreter doesn't support hierachical scopes.Note: this method doesn't look for any variable stored in ns. the method, or null if not found
See Also:   Page.getLoadedInterpreters
since:
   2.4.1




getZScriptFunction
public Function getZScriptFunction(Component comp, String name, Class[] argTypes)(Code)
Returns the variable of the specified name by searching the logical scope of the namespace of the specified component for all the loaded interpreters.

It is a shortcut: getZScriptFunction(comp.getNamespace(), name, argTypes);
since:
   3.0.0




getZScriptLanguage
public String getZScriptLanguage()(Code)
Returns the default scripting language which is assumed when a zscript element doesn't specify any language. the default scripting language, say, Java. Never null.



getZScriptMethod
public org.zkoss.zk.scripting.Method getZScriptMethod(String name, Class[] argTypes)(Code)
Page.getZScriptFunction(String,Class[])



getZScriptMethod
public org.zkoss.zk.scripting.Method getZScriptMethod(Namespace ns, String name, Class[] argTypes)(Code)
Page.getZScriptFunction(String,Class[])



getZScriptVariable
public Object getZScriptVariable(String name)(Code)
Returns the value of the variable of the specified name by searching the loaded interpreters, if any.

Differences between Page.getVariable and Page.getZScriptVariable

Page.getVariable returns variables defined by Page.setVariable (i.e., a shortcut to Namespace.setVariable ). On the other hand, Page.getZScriptVariable returns the variables that are defined when executing zscripts. the value of the variable, or null if not found
See Also:   Page.getLoadedInterpreters




getZScriptVariable
public Object getZScriptVariable(Namespace ns, String name)(Code)
Returns the value of the variable of the specified name by searching the logical scope of the specified namespace for all the loaded interpreters, if any.

It is similar to Page.getZScriptVariable(String) , except it uses the specified namespace as a reference to identify the correct scope for searching the variable. If the interpreter does NOT support hierachical scopes, this method is the same as Page.getZScriptVariable(String) .
Parameters:
  ns - the namespace used as a reference to identify thecorrect scope for searching the variable.It is ignored if the interpreter doesn't support hierachical scopes.Note: this method doesn't look for any variable stored in ns.




getZScriptVariable
public Object getZScriptVariable(Component comp, String name)(Code)
Returns the value of the variable of the specified name by searching the logical scope of the namespace of the specified component for all the loaded interpreters, if any.

It is a shortcut: getZScriptVariable(comp.getNamespace(), name);
since:
   3.0.0




interpret
public void interpret(String zslang, String script, Namespace ns)(Code)
Interpret a script of the specified scripting language against the specified namespace.
Parameters:
  zslang - the scripting language. If null, Page.getZScriptLanguageis assumed.
Parameters:
  ns - the namspace. If null, the current namespace is assumed.The current namespace is the event target's namespace(org.zkoss.zk.ui.event.Event.getTarget),if the thread is processing an event.Otherwise, the current namespace is this page's namespace



invalidate
public void invalidate()(Code)
Invalidates this page to cause all components to redraw.



isListenerAvailable
public boolean isListenerAvailable(String evtnm)(Code)
Returns whether the event listener is available.



removeAttribute
public Object removeAttribute(String name, int scope)(Code)
Removes the specified custom attribute in the specified scope.

If scope is Page.PAGE_SCOPE , it means custom attributes shared by components from the same page as this one's.

If scope is Page.DESKTOP_SCOPE , it means custom attributes shared by components from the same desktopas this one's.
Parameters:
  scope - Page.APPLICATION_SCOPE, Page.SESSION_SCOPE,Page.PAGE_SCOPE, Page.REQUEST_SCOPE or Page.DESKTOP_SCOPE.




removeAttribute
public Object removeAttribute(String name)(Code)
Removes the specified attribute custom associated with the page.



removeComponents
public void removeComponents()(Code)
Removes all components in this page.
See Also:   Execution.createComponents(StringComponentMap)



removeEventListener
public boolean removeEventListener(String evtnm, EventListener listener)(Code)
Removes an event listener. whether the listener is removed; false if it was never added.



removeVariableResolver
public boolean removeVariableResolver(VariableResolver resolver)(Code)
Removes a name resolve that was added by Page.addVariableResolver . false if resolved is not added before.



resolveClass
public Class resolveClass(String clsnm) throws ClassNotFoundException(Code)
Resolves the class of the specified name. It first looks at Classes and then all loaded interpreters Page.getLoadedInterpreters .

It is similar to Page.getZScriptClass , except

  1. It searches the current thread's class loader first, and then, the loaded interpreters.
  2. It throws ClassNotFoundException if not found

since:
   3.0.1
See Also:   Page.getZScriptClass



setAttribute
public Object setAttribute(String name, Object value, int scope)(Code)
Sets the value of the specified custom attribute in the specified scope.

If scope is Page.PAGE_SCOPE , it means custom attributes shared by components from the same page as this one's.

If scope is Page.DESKTOP_SCOPE , it means custom attributes shared by components from the same desktopas this one's.
Parameters:
  scope - Page.APPLICATION_SCOPE, Page.SESSION_SCOPE,Page.PAGE_SCOPE, Page.REQUEST_SCOPE or Page.DESKTOP_SCOPE.




setAttribute
public Object setAttribute(String name, Object value)(Code)
Sets the value of the specified custom attribute associated with this page.

Note: The attribute is removed (by Page.removeAttribute if value is null, while Page.setVariable considers null as a legal value.
Parameters:
  value - the value. If null, the attribute is removed.




setId
public void setId(String id)(Code)
Sets the identifier of this page.

Note: you can change the page's ID only in org.zkoss.zk.ui.util.Initiator.doInit or org.zkoss.zk.ui.util.ExecutionInit.init . Once the page is initialized (by org.zkoss.zk.ui.sys.PageCtrl.init ), calling this method will cause an exception.
exception:
  UiException - if the page is initialized, i.e.,org.zkoss.zk.ui.sys.PageCtrl.init is called.




setStyle
public void setStyle(String style)(Code)
Sets the CSS style of this page.

Note: Unlike Page.setTitle , you can change the style only in the lifecycle of the loading page.




setTitle
public void setTitle(String title)(Code)
Sets the title of the desktop this page belongs to (it might contain an expression).



setVariable
public void setVariable(String name, Object val)(Code)
Sets a variable to the namespace ( Page.getNamespace ).

It is the same as getNamespace().setVariable(name, value, true).
See Also:   Component.setVariable
See Also:   Component.getNamespace




setZScriptLanguage
public void setZScriptLanguage(String zslang) throws InterpreterNotFoundException(Code)
Sets the defafult scripting language which will be assumed if a zscript element doesn't specify any language.
exception:
  InterpreterNotFoundException - if no such language



unsetVariable
public void unsetVariable(String name)(Code)
Unsets a variable from the namespace ( Page.getNamespace ).

It is the same as getNamespace().unsetVariable(name, true).
See Also:   Component.unsetVariable
See Also:   Component.getNamespace




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