Skip to Main Content
Feature Request FR-4197
Product Area Developer Experience
Status CLOSED

1 Voters

Structured UI for building a URL link using f?p syntax

marion.finkler.taylor Public
· Jan 14 2025

Idea Summary
I'd love to see a structured UI, with spaces for the syntax arguments:

f?p=App:Page:Session:Request:Debug:ClearCache:itemNames:itemValues:PrinterFriendly

Use Case
navigation queries between pages

Preferred Solution (Optional)
I'm a senior with a dream.  I'm not a developer.  I'm self-taught.  I CAN write the f?p syntax now.  I can even correct CHATgpt when I ask for her help and she makes a mistake.  However, it seems ripe for a UI with boxes, that will create the string for me….

I love APEX - it is making my dream come true.

We reviewed this idea carefully, and while it was interesting, we concluded that due to all the internal implications we need to take into account, it is unlikely to make its way into APEX.

Comments

Comments

  • fac586 OP 5 months ago

    I can even correct CHATgpt when I ask for her help and she makes a mistake.

    That must keep you very busy…

  • fac586 OP 5 months ago

    Idea Summary
    I'd love to see a structured UI, with spaces for the syntax arguments:

    f?p=App:Page:Session:Request:Debug:ClearCache:itemNames:itemValues:PrinterFriendly

    Use Case
    navigation queries between pages

    Where specifically do you have a need for this? It already exists for interactive use when creating component links, buttons, and branches in the form of the Link Builder:

    and programatically via the apex_page.get_url() API method:

    APEX_PAGE.GET_URL (
        p_application        IN VARCHAR2 DEFAULT NULL,
        p_page               IN VARCHAR2 DEFAULT NULL,
        p_session            IN NUMBER   DEFAULT apex_application.g_instance,
        p_request            IN VARCHAR2 DEFAULT NULL,
        p_debug              IN VARCHAR2 DEFAULT NULL,
        p_clear_cache        IN VARCHAR2 DEFAULT NULL,
        p_items              IN VARCHAR2 DEFAULT NULL,
        p_values             IN VARCHAR2 DEFAULT NULL,
        p_printer_friendly   IN VARCHAR2 DEFAULT NULL,
        p_trace              IN VARCHAR2 DEFAULT NULL,       
        p_triggering_element IN VARCHAR2 DEFAULT 'this',
        p_plain_url          IN BOOLEAN  DEFAULT FALSE,
        p_absolute_url       IN BOOLEAN  DEFAULT FALSE )
        RETURN VARCHAR2;
    
  • marion.finkler.taylor OP 5 months ago

    @fac586  

    I do use the link builder (that's my first choice)

    I do use apex_page.get_url() 

    However, it seems that in some instances, I need the f?p syntax - such as in my navigation tree view.. 

    I'll re-try using the apex_page.get_url() 
     

    WITH menu_tree AS (
       SELECT 
           LOWER(menu_short) AS menu_desc, 
           node_id,
           parent_id,
           tooltip,
           SYS_CONNECT_BY_PATH(node_id, ':') || ':' AS menu_path
       FROM tree_menu
       START WITH parent_id IS NULL
       CONNECT BY PRIOR node_id = parent_id
    ),
    menu_filtered AS (
       SELECT 
           LOWER(menu_short) AS menu_desc,
           parent_id,
           node_id,
           mega_menu,
           tooltip,
           page_no,
           url_param_items,
           url_param_values,
           seq,
           icon_class,
           request,
           p0_show_all, -- include the P0_show_all column
             -- Concatenate P0_NODE_ID, P0_SHOW_ALL, and URL_PARAM_ITEMS
           'P0_NODE_ID,P0_SHOW_ALL'
           || CASE 
                  WHEN url_param_items IS NOT NULL THEN ',' || url_param_items
                  ELSE ''
              END AS full_param_items,
           -- Concatenate node_id, P0_SHOW_ALL value, and URL_PARAM_VALUES
           TO_CHAR(node_id)
           || ',' || p0_show_all
           || CASE 
                  WHEN url_param_values IS NOT NULL THEN ',' || url_param_values
                  ELSE ''
              END AS full_param_values
    
    
       FROM tree_menu
       WHERE mega_menu = 'Y' AND
       EXISTS (
               SELECT *
               FROM (
                   SELECT menu_tree.menu_path
                   FROM menu_tree
                   WHERE UPPER(menu_tree.menu_desc || ' ' || tooltip) 
                         LIKE '%' || UPPER(:P0_SEARCH) || '%'
               ) mp
               WHERE mp.menu_path 
                     LIKE '%:' || tree_menu.node_id || ':%'
           )
    )
    SELECT
       CASE 
           WHEN CONNECT_BY_ISLEAF = 1 THEN 0 
           WHEN LEVEL = 1 THEN 1 
           ELSE -1 
       END AS status,
       LEVEL,
       menu_desc AS title,
       icon_class as icon,
       --'icon-tree-folder' AS icon,
       -- Use the pre-constructed full_param_items and full_param_values
       'f?p=&APP_ID.:' 
       || page_no 
       || ':' 
       || :APP_SESSION 
       || ':' 
       || NVL(request, ' ')               -- 4th param = REQUEST
       || ':'
       ||'&DEBUG.'                         -- 5th para = debug
       ||'::'                              -- includes 6th null for clearCache
       || menu_filtered.full_param_items   -- items in 7th place
       || ':' 
       || menu_filtered.full_param_values      -- values in 8th
       ||':'                                   -- null for PrinterFriendly
        AS link,
       node_id AS value,
       CASE 
           WHEN page_no = :app_page_id THEN 'YES' 
           ELSE NULL 
       END AS is_current,
       tooltip
    FROM menu_filtered
    START WITH parent_id = (
       SELECT node_id
       FROM tree_menu
       WHERE parent_id = (SELECT node_id FROM tree_menu WHERE parent_id IS NULL)
       START WITH node_id = :P0_NODE_ID
       CONNECT BY PRIOR parent_id = node_id
    )
    CONNECT BY PRIOR node_id = parent_id
    AND LEVEL <= 4
    ORDER SIBLINGS BY TO_CHAR(seq, '9999'), menu_desc;
    
  • vincent morneau Admin OP 5 months ago

    This should be a rare use case for advanced users who are familiar with the documentation and link syntax. If not, then the component making use of f?p should be enhanced to use link builder instead., but I am not seeing that here.