1
votes

I have a requirement to make few text in the title of my tree query in Oracle APEX to bold by adding b tag. But when i do that, the tag is displayed at the front end. My query is as mentioned below. I do not want to see the b tag, rather i want the text enclosed by b tag to be bold. Please help.

    SELECT
                        CASE
                                WHEN CONNECT_BY_ISLEAF = 1 THEN 0
                                WHEN level = 1             THEN 1
                                ELSE -1
                        END
            AS status,
            level,
                        CASE
                                WHEN level = 1  THEN questions
                                ELSE '<b>'  -- Comes in the front end which i do not want
                                || flow_condition
                                || '</b>'
                                || ' - '
                                || questions
                        END
            AS title,
            NULL AS icon,
            question_id AS value,
            NULL AS tooltip,
        --null as link
            apex_page.get_url(
                        p_page          => 401,
                        p_items         => 'P401_QUESTION_ID',
                        p_values        => question_id,
                        p_clear_cache   => 401
            ) AS link
    FROM
            (
                        SELECT
                                mmq.*,
                                mmm.flow_condition
                        FROM
                                msd_mc_questions mmq
                                LEFT OUTER JOIN msd_mc_par_chld_mapping mmm ON (
                                                    mmq.parent_id = mmm.parent_question_id
                                            AND
                                                    mmq.question_id = mmm.child_question_id
                                )
            )
    START WITH
            parent_id IS NULL
    CONNECT BY
            PRIOR question_id = parent_id
    ORDER SIBLINGS BY questions
2

2 Answers

4
votes

Struggled with this for hours but then found a solution via jQuery. Create a dynamic action that on page load and executes javascript. Find all items with class .a-TreeView-label (assuming that's the class name at runtime that you get as well - check to be sure) and loop over them and for each one, replace its text with itself. This forces it to re-render as HTML. My code in the javascript task:

$(".a-TreeView-label").each(function(index){
  $(this).replaceWith($(this).text());
});
0
votes

On the item attribute "Escape special characters" change to "No"