Revision history [back]

click to hide/show revision 1
initial version

answered 2021-03-05 16:54:58 +0800

MDuchemin gravatar image MDuchemin

ZK Team

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

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

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More