fulfill"

From Documentation
m
m (correct highlight (via JWB))
 
(One intermediate revision by one other user not shown)
Line 5: Line 5:
 
  fulfill="''conditon_1'', ''conditon_2'',..."
 
  fulfill="''conditon_1'', ''conditon_2'',..."
 
  fuffill="''condition''=''a_uri''"
 
  fuffill="''condition''=''a_uri''"
  fulfill="''conditon_1''=''uri_1'', ''conditon_2''=''uri_1'',..."
+
  fulfill="''conditon_1'', ''conditon_2''=''a_uri'',..."
  
and the fulfill condition (<tt>condition</tt>, <tt>condition_1</tt> and <tt>condition_2</tt>) could be one of the following:
+
and the fulfill condition (<code>condition</code>, <code>condition_1</code> and <code>condition_2</code>) could be one of the following:
  
 
* ''event-name''
 
* ''event-name''
Line 14: Line 14:
 
*${''el-expr''}.''event-name''
 
*${''el-expr''}.''event-name''
  
It is used to specify when to create the child components. By default (i.e., <tt>fulfill</tt> is not specified), the child components are created right after its parent component, at the time the ZUML page is loaded.
+
It is used to specify when to create the child components. By default (i.e., <code>fulfill</code> 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 <tt>fulfill</tt> 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 you want to defer the creation of the child components, you can specify the condition with the <code>fulfill</code> 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.
 
If an EL expression is specified, it must return a component, an identifier or a path.
  
If URI (<tt>a_uri</tt>, <tt>uri_1</tt> and <tt>uri_2</tt>) is specified, the ZUML document of the given URI will be loaded and rendered as children of the associated component.
+
If URI (<code>a_uri</code>) is specified, the ZUML document of the given URI will be loaded and rendered as children of the associated component. Notice that you could specify at most one URI in a fulfill attribute.
  
 
For more information, please refer to [[ZK Developer's Reference/UI Composing/ZUML/On-demand Evaluation|ZK Developer's Reference: On-demand Evaluation]].
 
For more information, please refer to [[ZK Developer's Reference/UI Composing/ZUML/On-demand Evaluation|ZK Developer's Reference: On-demand Evaluation]].
  
 
= 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 <code>onFulfill</code> event with an instance of <javadoc>org.zkoss.zk.ui.event.FulfillEvent</javadoc> to notify the component for further processing if any.
  
For example, if you use the <tt>wireVariables</tt> method of the <javadoc>org.zkoss.zk.ui.Components</javadoc> class, you might have to call <tt>wireVariables</tt> again to wire the new components in the <tt>onFulfill</tt> event.
+
For example, if you use the <code>wireVariables</code> method of the <javadoc>org.zkoss.zk.ui.Components</javadoc> class, you might have to call <code>wireVariables</code> again to wire the new components in the <code>onFulfill</code> event.
  
 
<source lang="xml" >
 
<source lang="xml" >

Latest revision as of 13:27, 19 January 2022

Syntax:

fulfill="conditon"
fulfill="conditon_1, conditon_2,..."
fuffill="condition=a_uri"
fulfill="conditon_1, conditon_2=a_uri,..."

and the fulfill condition (condition, condition_1 and condition_2) could be one of the following:

  • event-name
  • target-id.event-name
  • id1/id2/id3.event-name
  • ${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.

If URI (a_uri) is specified, the ZUML document of the given URI will be loaded and rendered as children of the associated component. Notice that you could specify at most one URI in a fulfill attribute.

For more information, please refer to ZK Developer's Reference: On-demand Evaluation.

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 : 2022/01/19

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