Package org.zkoss.zk.ui.impl
Class Utils
java.lang.Object
org.zkoss.zk.ui.impl.Utils
Utilities to implement ZK.
- Since:
- 5.0.7
- Author:
- tomyeh
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentInfogetComponentInfo(Component comp) Returns the component info associated with the given component, or null if not available.static org.zkoss.util.resource.XMLResourcesLocatorReturns the XML resources locator to locate metainfo/zk/config.xml, metainfo/zk/lang.xml, and metainfo/zk/lang-addon.xmlstatic booleanmarkClientInfoPerDesktop(Desktop desktop, String key) Marks the per-desktop information of the given key will be generated, and returns true if the information is not generated yet (i.e., this method is NOT called with the given key).static ComposernewComposer(Page page, Object o) Instantiates a composer of the given object.static voidsetComponentInfo(Component comp, ComponentInfo info) Sets the component info for the given component.static voidsetShadowInfo(Component comp, ShadowInfo info) Sets the component info for the given component.static final booleantestAttribute(Component comp, String name, boolean defValue, boolean recurse) Tests if the given attribute is defined in a component or in library property.
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
markClientInfoPerDesktop
Marks the per-desktop information of the given key will be generated, and returns true if the information is not generated yet (i.e., this method is NOT called with the given key). You could use this method to minimize the bytes to be sent to the client if the information is required only once per desktop. -
getXMLResourcesLocator
public static org.zkoss.util.resource.XMLResourcesLocator getXMLResourcesLocator()Returns the XML resources locator to locate metainfo/zk/config.xml, metainfo/zk/lang.xml, and metainfo/zk/lang-addon.xml -
newComposer
Instantiates a composer of the given object. This method will invokeUiFactory.newComposer(org.zkoss.zk.ui.Page, java.lang.Class)to instantiate the composer if page is not null. -
getComponentInfo
Returns the component info associated with the given component, or null if not available.It is used only internally.
-
setComponentInfo
Sets the component info for the given component.It is used only internally.
-
testAttribute
public static final boolean testAttribute(Component comp, String name, boolean defValue, boolean recurse) Tests if the given attribute is defined in a component or in library property.- Parameters:
name- the name of the attributedefValue- the default value if neither component's attribute or library property is defined for the given namerecurse- whether to look up the ancestor's attribute- Since:
- 5.0.7
-
setShadowInfo
Sets the component info for the given component.It is used only internally.
- Since:
- 8.0.0
-