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.

Default table filter for number view attribute doesn't validate if value is a number

Robert ŠajinaDec 15 2017 — edited Dec 15 2017

Hi,

i have just noticed that for View object attributes (or Entities attributes) that are numbers(Integer,BigInteger,BigDecimal)  a default table filter doesn't checks if the entered value is a number.

After entering a string of letters in a filter and hitting enter application stops and a "Invalid number" shows in a popup.

I know that this issue could be easily solved by adding a new InputText into Column filter facet and adding a converter for that InputText but in a big application like ours we would try to avoid this.

I am surprised that this even happens, i mean if a attribute is a Number that means no letters should be entered.

Also, if we supply a converter (On entity attribute or ViewObject attribute) why isn't it automatically added to filter component?

Is there a easy solution to this?

Anodyne also noticed this bug?

Thanks,

JDev: 12.2.1.2.0

Robert

This post has been answered by Timo Hahn on Dec 15 2017
Jump to Answer

Comments

cormaco
Answer

Here is one way:

with input_string(ins) as (
    select 'Chesterton, Mark;#789;#Erbach, Magnus;#786' from dual union all
    select 'Phillips, Edward;#744;#Bubba, Matthew;#782;#Mahony, Chloe;#779' from dual union all
    select 'Corbett, Paul;#784;#Johnson, Ben;#392;#Smith, Adam;#775' from dual
)
select regexp_substr(ins,',\ *([^;]+)',1,1,null,1) regex from input_string

REGEX               
--------------------
Mark                
Edward              
Paul
                
Marked as Answer by User_AS6XD · Oct 14 2021
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 12 2018
Added on Dec 15 2017
2 comments
185 views