-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hai,
This is My Zul file
<div id="monthsDiv" children="@bind(vm.months)">
<template name="children" var ="node">
<h:li>
<a id="showsImages" sclass="activator" onClick="@command('showImages', ref=self.label, iref = self.uuid )" label="@bind(node.mName)"> </a>
</h:li>
</template>
</div>
I need to set children's by using @wire Div and A tag, Please help me i am new at Zk.
I am trying this way,it's not working please help me :
@Wire
A showsImages;
@Wire
Div monthsDiv;
Div div = new Div();
A a = new A(filename.toString());
a.setParent(div);
showsImages.setLabel(filename.toString());
div.setParent(showsImages);
I am getting value on filename.toString(),but setting by @Wire variable not working.
I took the freedom to update Chills answer to use <ul><li><a>
... instead of vbox to get closer to the original design:
http://zkfiddle.org/sample/1phndgi/2-clear-and-get-new-values
NOTE I am using the xhtml namespace instead of the native namespace.
Look at this update fiddle :
http://zkfiddle.org/sample/2m7g68o/37-Another-new-ZK-fiddle
This fiddle shows you how to set the months under each other and clear the children when you change the combobox value.
You normally have enough info now to overcome your first problem.
The images is just setting them like the A we did in code.
http://zkfiddle.org/sample/1phndgi/1-clear-and-get-new-values
Greetz chill.
well, you have the onlisten of the combobox, when you change the value=> clear the div and put it back with what you want, no?
chillworld ( 2015-01-28 14:40:18 +0800 )editlooks like what you wanted, just need to clear the div before the others are inserted
chillworld ( 2015-01-29 05:14:21 +0800 )editAsked: 2015-01-27 14:33:41 +0800
Seen: 63 times
Last updated: Jan 29 '15
Problem binding values to a composite component
How to access static member field of a class in zul without zscript
How can i load a constant in .zul
MVVM Validator: class not found ? [closed]
MVVM tab box - delay @load until tab pane displayed?
mvvm, load or save with after or before for seach command
how to fire an event when a variable value loaded through VM
Sorry if I'm rude but I'm not putting mine time in this question. Only 1 question is accepted by you, never up or down voted an answer if it (didn't) helped you. Never feedback why you didn't vote, cause maybe the answer wasn't good enough. As last, new at ZK if you have questions older then a year
chillworld ( 2015-01-27 14:55:24 +0800 )editsorry chillworld,i don't know about compulsory vote,i will vote now onwards.please help me.
sathishk ( 2015-01-28 05:04:08 +0800 )editare you working mvc or mvvm? older question by you was mvvm
chillworld ( 2015-01-28 05:58:14 +0800 )editnow i am working on mvc.
sathishk ( 2015-01-28 06:33:43 +0800 )editare you sure?
chillworld ( 2015-01-28 07:07:54 +0800 )edit@bind
,@command
are MVVM commands. if you declared the controller as viewmodel the@Wire
will not work. Don't forget taht theA
has multiple instances in the div.