0

Set a Toolbarbutton image in a gris accroding to a value of a cel in the same line

asked 2011-05-06 17:57:38 +0800

Bera gravatar image Bera
121 1 3

updated 2011-05-06 17:58:33 +0800

Hi

I have a grid in my app and in an specific cell I need to choose the right image according the value of a near cell in the same line in a grid

my static list cell is:

<listcell>
<toolbarbutton id="statusserver" label="OK" image="img/activity.png" dir="reverse" />
</listcell>


For example if a need to change this image of toolbarbutton above corresponding with the value of list cell label in the same line in the grid:

<listcell label="@{server.serverIPStatus}" />

I'm using Zk data bind with JPA annotations and these features.

What code I need to put in my controller to change the values of label and image in the toolbarbutton based in the dynamic value of
"@{server.serverIPStatus}" ?

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2011-05-07 15:53:06 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2011-05-07 15:53:49 +0800

Bera, if you do not work with a Renderer class so search the forum for how to using a 'converter' in a databinded listbox/grid .

best
Stephan

link publish delete flag offensive edit
link publish delete flag offensive edit

answered 2011-05-09 08:38:09 +0800

Bera gravatar image Bera
121 1 3

Tanks Terry and Ashishd

I believe is more easy to to this in the model instead...I will try this approach!

Thanks!

link publish delete flag offensive edit

answered 2011-05-09 11:52:45 +0800

Bera gravatar image Bera
121 1 3

Terry, your suggestion works perfectly for me, I understood and use a converter to manage my data type and pass it forward for my UI Component. Thx so much!

link publish delete flag offensive edit
Your reply
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

RSS

Stats

Asked: 2011-05-06 17:57:38 +0800

Seen: 289 times

Last updated: May 09 '11

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