How to make a button look like a link in ZK
Question
So what i want is to bind label
and onClick
event of a link to a java bean in ZK.
So i tried
<a onClick="@command('reset')"/>
But <a>
does not have label
attribute.
<button>
has both label
and onClick
but it show up as button which it is...
<button label="@bind(vm.value)" onClick="@command('reset')"/>
So how to make a button look like a link in ZK ?
I am using mvvm model
Solution
ZK's ‘a‘ Component does, in fact, have a ‘label‘ attribute.
<a label="@bind('vm.value')" onClick="@command('reset')"/>
OTHER TIPS
I suggest you use <label>
instead of <a>
for link.
<label style="cursor:pointer;text-decoration: underline;"
value="@bind(vm.value)" onClick="@command('pickFromMember')" />
you can also prefer @Sean Connolly answer <a>
tag also have label attribute
<a label="@bind('vm.value')" onClick="@command('reset')"/>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow