-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
Hi there.
This structure will generate an infinite loop of cascading proxy objects. A product has a collection of prices, which in turn refer to the product, which refer to the price, etc.
You have to choose a point at which to use the actual object instead of a proxy. For example, you can decide that the proxy object targets "real" price objects instead of proxy prices. You can use the @immutable and @immutableelements annotations to do so.
http://books.zkoss.org/zk-mvvm-book/8.0/syntax/immutable.html http://books.zkoss.org/zk-mvvm-book/8.0/syntax/immutableelements.html
See an example in fiddle. https://zkfiddle.org/sample/h7t36l/10-Another-new-ZK-fiddle
2 | No.2 Revision |
Hi there.
This structure will generate an infinite loop of cascading proxy objects. A product has a collection of prices, which in turn refer to the product, which refer to the price, etc.
You have to choose a point at which to use the actual object instead of a proxy. For example, you can decide that the proxy object targets "real" price objects instead of proxy prices. You can use the @immutable and @immutableelements annotations to do so.
http://books.zkoss.org/zk-mvvm-book/8.0/syntax/immutable.html
http://books.zkoss.org/zk-mvvm-book/8.0/syntax/immutableelements.htmlSee an example in fiddle. https://zkfiddle.org/sample/h7t36l/10-Another-new-ZK-fiddle