0

format postalCode in lixtbox

asked 2011-04-01 03:50:23 +0800

t702271 gravatar image t702271
63

Hy:

I would like to format the data showed in a listbox.

As an example
Now a days the list box shows the postal code without leading 0

postal code
8999
8991

What I want is:

postal code
08999
08991


How can I do that?

This is my code

<listcell label="@{xxx.postalCode}" />


thanks in advace

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2011-04-01 03:59:05 +0800

Steva77 gravatar image Steva77 flag of Italy
1014 3
http://www.research.softe...

This remember a bit this thread http://www.zkoss.org/forum/listComment/10271
Maybe you can use regular expressions?

link publish delete flag offensive edit

answered 2011-04-01 04:15:03 +0800

mjablonski gravatar image mjablonski
1284 3 5
http://www.jease.org/

Hi,

you'll need to attach a ListitemRenderer to your listbox which formats the output for each listcell:

http://books.zkoss.org/wiki/ZK%20Developer's%20Reference/MVC/View

Cheers, Maik

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-04-01 03:50:23 +0800

Seen: 151 times

Last updated: Apr 01 '11

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