Client Attribute"

From Documentation
m
Line 38: Line 38:
 
<references/>
 
<references/>
 
</blockquote>
 
</blockquote>
 +
 +
{{ZUMLReferenceHeadingToc}}
  
 
=Version History=
 
=Version History=
Line 48: Line 50:
 
| The client-attribute namespace was introduced.
 
| The client-attribute namespace was introduced.
 
|}
 
|}
 
{{ZUMLReferenceHeadingToc}}
 
  
 
{{ZUMLReferencePageFooter}}
 
{{ZUMLReferencePageFooter}}

Revision as of 07:29, 16 April 2014


Client Attribute


Name: client attribute
Namespace: http://www.zkoss.org/2005/zk/client/attribute
Namespace shortcut: client/attribute
Java: LanguageDefinition.CLIENT_ATTRIBUTE_NAMESPACE

It is the reserved namespace for specifying client-side DOM attributes. Unlike the client namespace, which assigns something to widgets, the client/attribute namespace assigns additional DOM attributes to the DOM tree directly at the client.


Notice that if the widget's DOM output (Widget.redraw(Array)) also has the same DOM attribute, both of them will be generated and it is technically not legal. Thus, you should prevent the DOM attributes that widget might output.

For example, suppose you want to listen to the onload event, you can do as follows[1].

<iframe src="http://www.google.com" width="100%" height="300px"
  xmlns:ca="client/attribute"
  ca:onload="do_whater_you_want()"/>


If the attribute contains colon or other special characters, you can use the attribute element as follows.

<div xmlns:ca="client/attribute">
  <attribute ca:name="ns:whatever">
  whatever_value_you_want
  </attribute>
</div>

The other use of the client-attribute namespace is to specify attributes that are available only to certain browsers, such as accessibility and Section 508.


  1. For more information, please refer to ZK Component Reference: iframe.



Version History

Last Update : 2014/04/16


Version Date Content
5.0.3 July 2010 The client-attribute namespace was introduced.



Last Update : 2014/04/16

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.