6 Replies Latest reply: Apr 19, 2012 11:01 PM by Avi RSS

    Print needs some modification

    Avi
      Hi,

      In my jspx file i have used some of the HTML tags to display content on my screen. Now i have a printable page behaviour on my page. When i am executing this behaviour my HTML tag content is also going on printable page. How can i avoid this? I have an <af:table> on my page and i want only that to be printed.
        • 1. Re: Print needs some modification
          Timo Hahn
          You can add
          rendered="#{adfFacesContext.outputMode ne 'printable'}"
          on all attributes don't want to print.

          Timo
          • 2. Re: Print needs some modification
            Avi
            Hi Timo,

            Thanks for reply.

            I think this can only be applied to ADF components only but what about HTML tags and HTML DATA.
            • 3. Re: Print needs some modification
              Timo Hahn
              You can use JSTL for the check like
                          <af:panelGroupLayout layout="scroll" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                               id="pgl2">
                            <af:commandButton text="print 2" id="cb2">
                              <af:showPrintablePageBehavior/>
                            </af:commandButton>
                            <c:if test="${adfFacesContext.outputMode ne 'printable'}">
                            <f:verbatim>
                              <textarea name="ggg" cols="3" rows="4"></textarea>
                            </f:verbatim>
                            </c:if>
              ....
              Timo
              • 4. Re: Print needs some modification
                Avi
                Hi Timo,

                A great thanks to you man. It worked.

                But on the Printable Page(which opens up after clicking on button having printable page behaviour) the area that has been covered by HTML tags is also coming but as a white space. For ex:- My left section of page has some HTML content and Right side has <af:table>, so on printable page I am getting the table in right side and the left side space ,which contains HTML ,is coming white.
                How can i suppress this white space?
                • 5. Re: Print needs some modification
                  Timo Hahn
                  Sorry, I don't know.
                  I bet that's one of the reasons you should not mix html and adf on one page.

                  Check the source of the generated printable page if you find anything which can be connected to an element on the adf page which you then can try to hide (rendered = false for the printable page).

                  Timo
                  • 6. Re: Print needs some modification
                    Avi
                    Hi Timo,

                    As you posted "you should not mix html and adf on one page."

                    How can i segregate my HTML part and ADF part? Means i am not thinking of using any include directives on my page.