Skip to Main Content

APEX

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 open a tree to a specific node? (Apex 19.2)

John like many othersOct 26 2020 — edited Oct 26 2020

Hello
I would like to open a tree to a specific hierarchical position after it was refresh (comes in closed state).
Based on the tree widget API I assume I have to open all nodes above the target. I can get all the NodeIDs before I would refresh the treeView: getExpandedNodeIds() but there are two problems with that:
This function returns the Node IDs not in a sorted way (from root to target node)
The Node ID is not stored in the HTML structure, so can't be referenced that way
The nicest/easiest way would be to hand over a jQuery object or a DOM object that defines the target node to which the tree should be expanded. Is something like this available and I didn't see it? If not, is there any other way to get the tree expanded to a specific node?

Comments

Hoek
Answer
Remove 2 brackets:
SQL> select case when regexp_like(regexp_replace( ' 123 4567 890', ' ' ), '^([0-9]{9}|[0-9]{12})$')
  2  then 'Match Found'
  3  else 'No Match Found'
  4  end as test
  5  from dual;

TEST
--------------
No Match Found

SQL> select case when regexp_like(regexp_replace( ' 123 4567 89', ' ' ), '^([0-9]{9}|[0-9]{12})$')
  2  then 'Match Found'
  3  else 'No Match Found'
  4  end as test
  5  from dual;

TEST
--------------
Match Found
SQL> 
Marked as Answer by ash0602 · Sep 27 2020
737905
SQL> var num number;

SQL> exec :num:=1234567890

PL/SQL procedure successfully completed.

SQL> ed
Wrote file afiedt.buf

  1  SELECT (CASE WHEN LENGTH(:num) =9 OR LENGTH(:num) = 12 THEN 'MATCH FOUND' ELSE 'MATCH NOT FOUND
  2* from dual
SQL> /

TEST
---------------
MATCH NOT FOUND

SQL> exec :num:=123456789

PL/SQL procedure successfully completed.

SQL> /

TEST
---------------
MATCH FOUND

SQL> 
ash0602
This is too fast a reply, and thanks for correcting my basic understanding. The same expression (my old) will work for javascript, but there is this slight difference between the handling regular expression in database and UI :)

Cheers,
Ash
Aketi Jyuuzou
Umm. Regex of Oracle has not supprted "Tanaka Akira Special" yet. :-(
with t(Val) as(
select ' 123 4567 890' from dual union all
select ' 123 4567 89'  from dual)
select Val,
case when RegExp_Like(replace(Val,' '),'^[0-9]{9}([0-9]{3})?$')
     then 1 else 0 end as result
  from t;

VAL            RESULT
-------------  ------
 123 4567 890       0
 123 4567 89        1
1 - 4

Post Details

Added on Oct 26 2020
4 comments
586 views