OnClick on label change style

asked 2017-07-24 10:56:31 +0800

wigberto gravatar image wigberto
52 4

How can I change the style of a label with onClick? I have a listcell with a label and I would like to change the color of the label when doing onclick.

<listcell style="border: 1px solid lightgray; text-align:right" onclick="@command('showPurchaseOrderLines', tabbox = tabbox, purchaseOrder = each)"> <label value="@load(each.idPurchaseOrder)" style="font-size:12px; font-weight: bold; color: #009246"/> </listcell>

Thank You.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-07-24 15:25:30 +0800

LuigiFabbri gravatar image LuigiFabbri
46 5

updated 2017-07-24 15:31:43 +0800

Try this

1) insert the new style property in the purchaseOrder

2) in the zul change style="@load(each.style)"

3) in the command showPurchaseOrderLines, set new label style as follows:

purchaseOrder.setStyle("font-size:12px; font-weight: bold; color: #009246"); BindUtils.postNotifyChange(null, null, purchaseOrder , "style");

link publish delete flag offensive edit


Thank you LuigiFabbri. It worked perfectly.

wigberto ( 2017-07-25 08:46:35 +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

1 follower



Asked: 2017-07-24 10:56:31 +0800

Seen: 20 times

Last updated: Jul 24 '17

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