0

when we use apostrophe (single quote) and without it

asked 2013-07-09 12:18:41 +0800

progamerdotcom gravatar image progamerdotcom
117 5

updated 2013-07-09 13:40:30 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

If we use mvvm pattern, we found

@id('vm') -> using apostrophe
@init('com.foo.MyClass') -> using apostrophe
@load(vm.current) -> without apostrophe
@save(vm.current) -> without apostrophe

how to remember when we use apostrophe or without it, or the easy way to understand

thanks

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-07-09 13:45:01 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

From my understanding if you are accessing viewmodel variable in zul then you are doing vm.varaibleName then in this case no need for Single quotes but when you creating a object of viewmodel ,firing a event then you have to add Single quotes.

link publish delete flag offensive edit

Comments

thank Sjoshi, would you like to explain creating a object of viewmodel with a example

progamerdotcom ( 2013-07-10 03:22:12 +0800 )edit

<window apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('com viewmodel.HomeViewModel')"/>

sjoshi ( 2013-07-10 05:52:16 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-07-09 12:18:41 +0800

Seen: 14 times

Last updated: Jul 09 '13

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