fulfill"

From Documentation
m
m
Line 1: Line 1:
 
{{ZUMLReferencePageHeader}}
 
{{ZUMLReferencePageHeader}}
  
 +
'''Syntax:'''
 
  fulfill="''event-name''"
 
  fulfill="''event-name''"
 
  fulfill="''target-id''.''event-name''"
 
  fulfill="''target-id''.''event-name''"
Line 12: Line 13:
 
If an EL expression is specified, it must return a component, an identifier or a path.
 
If an EL expression is specified, it must return a component, an identifier or a path.
  
== The onFulfill Event ==
+
= The onFulfill Event =
 
After ZK applies the fulfill condition, i.e., creates all descendant components, it fires the <tt>onFulfill</tt> event with an instance of <javadoc>org.zkoss.zk.ui.event.FulfillEvent</javadoc> to notify the component for further processing if any.
 
After ZK applies the fulfill condition, i.e., creates all descendant components, it fires the <tt>onFulfill</tt> event with an instance of <javadoc>org.zkoss.zk.ui.event.FulfillEvent</javadoc> to notify the component for further processing if any.
  
Line 23: Line 24:
 
</source>
 
</source>
  
==Version History==
+
=Version History=
  
 
{| border='1px' | width="100%"
 
{| border='1px' | width="100%"

Revision as of 10:47, 18 November 2010

Syntax:

fulfill="event-name"
fulfill="target-id.event-name"
fulfill="id1/id2/id3.event-name"
fulfill="${el-expr}.event-name"

It is used to specify when to create the child components. By default (i.e., fulfill is not specified), the child components are created right after its parent component, at the time the ZUML page is loaded.

If you want to defer the creation of the child components, you can specify the condition with the fulfill attribute. The condition consists of the event name and, optionally, the target component's identifier or path. It means that the child elements won't be processed, until the event is received by, if specified, the target component. If the identifier is omitted, the same component is assumed.

If an EL expression is specified, it must return a component, an identifier or a path.

The onFulfill Event

After ZK applies the fulfill condition, i.e., creates all descendant components, it fires the onFulfill event with an instance of FulfillEvent to notify the component for further processing if any.

For example, if you use the wireVariables method of the Components class, you might have to call wireVariables again to wire the new components in the onFulfill event.

<div fulfill="b1.onClick, b2.onOpen" onFulfill="Components.wireVariables(self, controller)">
	...
</div>

Version History

Version Date Content
     



Last Update : 2010/11/18

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