Forum Stats

  • 3,827,925 Users
  • 2,260,839 Discussions
  • 7,897,407 Comments

Discussions

Escape option for ADF outputText leading to Error 404 in case of CLOB datatype

Magwaa
Magwaa Member Posts: 84
edited Oct 9, 2017 9:26AM in JDeveloper and ADF

Dear All,

   I am using Jdeveloper 12.1.2.0.0 version for development.

I am facing a problem regarding CLOB columns display as a outputtext. The use case is as follows:

I have a DB column with CLOB as a datatype containing HTML and scripts for jasper reports server. I am displaying it as an outputtext with "escape" option marked "false" , it works fine. Everything loads and BI report works as it is supposed to do but the problem is whenever I click any other component of the application i.e. Home or Language change it crashes with Error 404. I have tried Escape option with simple text fields from bean and hard coded value as well, it works fine for them and doesn't lead to crash. What I believe is that it's CLOB type which is creating problem when used with escape option marked to false. I have also tried applying converter for generic domain but all in vain. Any help is this regard would be much appreciated.

Warm Regards,

--Magwaa

Tagged:
«1

Answers

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,462 Red Diamond
    edited Oct 9, 2017 3:06AM

    Magwaa, check the page source of the resulting page. E.g. you can copy the source into an editor and verify that the html is valid.

    Then you can use your browsers development tools and inspect the network traffic when you click the button. You should see which artifact causes the 404.

    Timo

  • Magwaa
    Magwaa Member Posts: 84
    edited Oct 9, 2017 3:31AM

    Hi Timo,

      The page is fine. HTML  and everything inside is perfectly running with graph rendering as well. But once i click on Home Page button to go back it goes to 404 without showing any error on weblogic console.

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,462 Red Diamond
    edited Oct 9, 2017 3:52AM

    You have to check the javascript console, not the weblogic console. The 404 error means that you try to get an artifact but the uri can't be reached. The interesting part is to find out which artifact causes the problem.

    Timo

  • Magwaa
    Magwaa Member Posts: 84
    edited Oct 9, 2017 5:10AM

    There is no error in Browser console, nothing related to any HTML artifact.

    <?xml version='1.0' encoding='UTF-8'?>

    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"

              xmlns:f="http://java.sun.com/jsf/core">

        <af:panelGroupLayout id="pgl1" layout="scroll">

            <af:switcher id="s1" facetName="#{sessionScope.lang == 'ar' ? 'arabic' : 'english'}"

                         defaultFacet="#{sessionScope.lang == 'ar' ? 'arabic' : 'english'}">

                <f:facet name="arabic">

                    <af:outputText value="#{bindings.HtmlContentArb.inputValue}"

                                   shortDesc="#{bindings.HtmlContentArb.hints.tooltip}" escape="false" id="it2"/>

                </f:facet>

                <f:facet name="english">

                    <af:outputText value="#{bindings.HtmlContentEng.inputValue}"

                                   shortDesc="#{bindings.HtmlContentEng.hints.tooltip}" id="it1" escape="false"/>

                </f:facet>

            </af:switcher>

        </af:panelGroupLayout>

    </jsp:root>

    This is the code of a fragment which is part of a BTF and thrown on jspx page as a region. Application runs smooth when clicked inside the fragment, graph response etc. But when clicked on any any action outside this it goes out.

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,462 Red Diamond
    edited Oct 9, 2017 5:41AM

    Have you looked at the network tab in the browser?

    Timo

  • Magwaa
    Magwaa Member Posts: 84
    edited Oct 9, 2017 5:49AM

    erro0r.PNG

    This is happens on Network Console. Before that everything works perfectly fine. URL changes to:

    ../faces/BI-reports-html-landing-btf/BIReportsHTML?_afrLoop=331664650616142&_afrWindowMode=0&Adf-Window-Id=w0

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,462 Red Diamond
    edited Oct 9, 2017 6:42AM

    And what is the url before that?

    Timo

  • Magwaa
    Magwaa Member Posts: 84
    edited Oct 9, 2017 6:49AM

    it's just IP of my machine and port along with context root of application.

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,462 Red Diamond
    edited Oct 9, 2017 7:38AM

    So, somewhat is changing the context url. You need to find this 'something' and then think about how to prevent it.

    Timo

  • Magwaa
    Magwaa Member Posts: 84
    edited Oct 9, 2017 7:56AM

    Hi Timo,

      Thanks a lot for tagging along all the way. The problem is resolved. Actually the HTML was using <form> tag and they were many in number. Even a single <form> tag was causing the change in View Root of the application. Removing the <form> tag did the trick. Special thanks to you

This discussion has been closed.