how you mean? It extends textbox so you can use properties like before ex label="@load()"
chillworld ( 2016-01-27 10:38:10 +0800 )edit-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I've got a zul page which has a lots of buttons on a grid (hey the boss upstairs decided they should all be buttons) and the thing is I have lot of boilerplate code for those buttons.
Is there a way for me to simply create a standardized version of the button the way I want and just pass it some parameters like it's label value and its sclass? Yes I know this is possible in java but I'm asking more in terms of zul.
I've considered using templates but it seems like it might be too much for using templates and I'm unsure regarding the style and the label value.
Thanks.
As you know it's possible in Java. The best thing you can do :
Extend the button class and add all those boilerplate code there.
Now you have 2 options in the zul.
First one is using use
attribute in the zul :
<button use="my.path.ClassName" />
This will use your class in stead of the normal button class.
This you need of course to type everywhere where you use button.
So next could be adding this in top :
<?component name="mybutton" class="my.path.ClassName"?>
Like this you only need to use it like this :
<mybutton />
Greetz chill.
how you mean? It extends textbox so you can use properties like before ex label="@load()"
chillworld ( 2016-01-27 10:38:10 +0800 )editAsked: 2016-01-27 09:50:40 +0800
Seen: 12 times
Last updated: Jan 27 '16
How to control selectAll() feature in a Listbox with multiple=true and checkmark=true
ZK8 Wizard Series: Part 2 now released!
Faster And Lighter, The Performance Test On ZK8
org.zkoss.xel.XelException: Resource not found: http://www.zkoss.org/dsp/web/core
How To Check Dirty Status in ZK8?
Come and join the ''JS'' Hunt!