Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to add leading zeros to String in ADF Table

TechieInnovatorJun 11 2014 — edited Jun 11 2014

I have af:table with a column which may have values like "01", "STW", "RT003", etc coming from DB.

I want to display total 10 length String with leading zero if the length is less than 10.  How do I do it?

I have tried below groovy expression in VO and gives error

String.format("%10s", mycolumnname).replace(' ', '0')

This post has been answered by Dimitar Dimitrov on Jun 11 2014
Jump to Answer

Comments

baftos
Not sure if this will help, but try to consume() the events.
darrylburke
Note: This thread was originally posted in the [Java Programming|http://forums.sun.com/forum.jspa?forumID=31] forum, but moved to this forum for closer topic alignment.
darrylburke
It's this second-long delay which is the anomoly. I'm guessing it results from the fact that the KeyEvent is not being fired constantly or immediately after the release of the first key.
That's the usual key-repeat behavior on most OSs.
I'm wondering if there's a way to get rid of the delay
Probably by setting booleans in the keyPressed(...) / keyReleased(...) and polling those booleans at equal intervals using a Timer.

db
843807
>
Probably by setting booleans in the keyPressed(...) / keyReleased(...) and polling those booleans at equal intervals using a Timer.
>

I did something similar to this. Thanks.
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 9 2014
Added on Jun 11 2014
5 comments
2,303 views