@ref"

From Documentation
m ((via JWB))
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{ZKDevelopersReferencePageHeader}}
 
{{ZKDevelopersReferencePageHeader}}
 +
{{Deprecated | url=[http://books.zkoss.org/zk-mvvm-book/8.0/syntax/ref.html zk-mvvm-book/8.0/syntax/data_binding/ref]|}}
  
{{Template:UnderConstruction}}
 
  
 
__TOC__
 
__TOC__
  
 +
{{ZK PE and EE}}
 
  Since 6.0.1
 
  Since 6.0.1
  
 
=Syntax=
 
=Syntax=
  
<tt> @ref(</tt> ''[EL-expression]'' <tt>) </tt>
+
<code>@ref(</code> ''[EL-expression]'' <code>)</code>
  
 
= Description =
 
= Description =
Line 16: Line 17:
 
'''Purpose:''' Create a reference to an EL expression that can be used in another EL expression.  
 
'''Purpose:''' Create a reference to an EL expression that can be used in another EL expression.  
  
Create this binding on a component's custom attribute whose name can be referred and used in another EL expression. The EL expression that refers to the reference must be the children of the component that contains the reference binding. This feature is useful in shortening EL expressions by referring it to another expression.
+
Create this binding on a component's custom attribute whose name can be referred and used in another EL expression. The EL expression that refers to the reference must be the children of the component that contains the reference binding. This feature is useful in shortening EL expressions by referring it in another expression.
  
 
= Example =
 
= Example =
Line 22: Line 23:
 
<source lang="xml" >
 
<source lang="xml" >
  
<div p="@ref(vm.selectedPerson)"/>
+
<div p="@ref(vm.selectedPerson)">
 
     <label value="@load(p.id)" />
 
     <label value="@load(p.id)" />
 
     <label value="@load(p.name)" />
 
     <label value="@load(p.name)" />
Line 29: Line 30:
 
</source>
 
</source>
  
 +
=Version History=
  
 
+
{| class='wikitable' | width="100%"
 
 
=Version History=
 
{{LastUpdated}}
 
{| border='1px' | width="100%"
 
 
! Version !! Date !! Content
 
! Version !! Date !! Content
 
|-
 
|-

Latest revision as of 07:35, 8 July 2022

Stop.png This article is out of date, please refer to zk-mvvm-book/8.0/syntax/data_binding/ref for more up to date information.


  • Available for ZK:
  • http://www.zkoss.org/product/zkhttp://www.zkoss.org/whyzk/zkeeVersion pe-ee.png
Since 6.0.1

Syntax

@ref( [EL-expression] )

Description

Target Attribute: custom attribute.

Purpose: Create a reference to an EL expression that can be used in another EL expression.

Create this binding on a component's custom attribute whose name can be referred and used in another EL expression. The EL expression that refers to the reference must be the children of the component that contains the reference binding. This feature is useful in shortening EL expressions by referring it in another expression.

Example

<div p="@ref(vm.selectedPerson)">
    <label value="@load(p.id)" />
    <label value="@load(p.name)" />
</div>

Version History

Version Date Content
6.0.1 May 2012 The new reference-binding feature.




Last Update : 2022/07/08

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