ORACLE tags in Templates vs Dynamic Pages

Hello all,
I have a procedure that prints the Portal version:
Create or Replace PROCEDURE MATSTESTSCHEMA.SHOW_PORTAL_VERSION
as
l_ver varchar2(20);
BEGIN
l_ver := portal30.wwctx_api.get_product_version();
htp.print(l_ver);
END;
I can call this procedure successfully from a Dynamic Page with
the following embedded syntax in the HTML code:
<ORACLE>
BEGIN
MATSTESTSCHEMA.SHOW_PORTAL_VERSION;
END;
</ORACLE>
I want to use some procedure calls in my templates as well.
Tried to use the same syntax as above but it does NOT work.
The whole code block between the <ORACLE>-tags seems to be
ignored as soon as a procedure call is included.
A simple syntax like this DOES work in a template:
<ORACLE>
BEGIN
htp.p('hello');
END;
</ORACLE>
Why doesn't it work to call procedures from the templates???
Has anyone alse run into this?
PS! I'm using Portal version 3.0.7.6.2
Will soon upgrade to the latest version...

What I'm trying to do is to do a redirect of a page depending on
some conditions which my PL/SQL procedure can determine. So I
hoped that I could call my procedure from the page template
header and the procedure would print a redirect tag, if
appropriate. Something like this:
Page template (part of..)
<HTML>
<HEAD>
<ORACLE>
BEGIN
MYSCHEMA.DO_REDIRECT;
END;
</HEAD>
The DO_REDIRECT procedure prints the META tag for a redirect of
the browser if it finds it necessary. otherwise it would do
nothing..
<META     HTTP-EQUIV="Refresh"
     Content     = "30;
     URL=http://www.oracle.com">
But calling procedures from templates as described above does
not seem to work, at least in version 3.0.7.6.2.
(We're in the process of upgrading to the latest version)
Does this work in 3.0.9 ?
...or does anyone know a better way to do this?
Any advice is really apreciated.

Similar Messages

  • Do not apply Templates for dynamic page

    Hi,
    When i add a tag <ORACLE> ...</ORACLE> then all code before this tag don't displate.(I have viewed source after apply template but did't see code before Oracle tag).
    Could you tell me the way to sovle the problem.
    thanks !
    thangtk

    Dear Candace ,
    - I have a dynamic page that includes oracle tag (<oracle> </oracle>).Run it ok .
    -When i apply my template(user template) then dynnamic don't display all component of Template.
    -I had viwed source code (dynamic+template) .I only see componet code begin <oracle> to end. (contains HTML outside <oracle>..</oracle>) and all code before <oracle>..</oracle> to lose .
    Ex:I have a code
    <html>
    <head>
    <title>
    </title>
    </head>
    <body>
    <table>
    </table>
    <oracle>
    begin
    htp.init();
    htp.p('..');
    end;
    </oracle>
    </body>
    </html>
    run it anh view source then i only see:
    <oracle>
    begin
    htp.init();
    htp.p('..');
    end;
    </oracle>
    </body>
    </html>
    I lose code.
    <html>
    <head>
    <title>
    </title>
    </head>
    <body>
    <table>
    </table>
    I think that Templates don't display ,the same cause.
    I hope you will reply quickly for you.
    thanks very much !
    (sorry ,I write very bad)

  • Oracle tags in templates

    I know I've seen posts on this in the past, but can't find them for the life of me. I've searched through about 20 pages of search results with no hits, so I must ask again.
    Can someone explain why the functionality of the oracle tags were removed from the HTML templates? And is there a way I can solicit to have it put back in?
    Thanx.

    Hello,
    >>
    There certainly may be other ways to do what we want without the ORACLE tags, but constructing the pages in Oracle Portal and ApEx would be much different in that scenario and it would be nice have a common way of developing the "template" of a page in both environments.
    Am I making this too complicated?
    >>
    I think you are in one respect and not in another.
    As for page templates( the more complicated part), the cold hard fact is APEX and Portal are two different animals and their template systems are just different, the easiest way to take care of those differences is to make as much of your Look and Feel derived from an external CSS. This will allow you to apply the same look and feel to any development environment you might have to use in the future as well.
    As for the menu that is slightly different. What I would do is create a PL/SQL package that creates the required HTML structure, then you can call that package using a PL/SQL region in APEX, and I guess &lt;oracle> tags or whatever else Portal uses to output PL/SQL sections.
    One way I've done something similar is to use the XMLDB functions of the database to render out the html i need to make menu's tree's etc, It's pretty easy to get what you want and is very generic.
    Regards,
    Carl
    blog : http://carlback.blogspot.com/
    apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5

  • How do I store and retrieve variables end user enters in Dynamic Pages ?

    I have 4 dynamic pages, a user enters in variables on first page. At the next 3 dynamic pages I send the user to I have to display the items they entered on the first page in text items.
    How do I pass these variables ????
    thanks!

    ok, so on my page 1 I have the parameter "name", if I use <ORACLE> tags on this first dynamic page they are executed upon entering the form. The user has to enter the data and if the <ORACLE> tags have already executed where do I store the value ?
    So where do I issue the wwsto_api_session.load_session (in the second dynamic page or the first one) ?
    I can see that I'll use the wwsto_api_session.get_attribute_as_varchar2 ('name') in the second dynamic page with the htp.p - is that right ?
    You wouln't have an example you could share with us all do you ? Sure seems like this is confusing to a lot of people. Are there any useful examples of this in the PDK that show how to do this with the HTML included ?
    thanks again

  • How to retrieve and then update a field in a dynamic page?

    I use the dynamic page to retrieve a text field from db table, now I want to update it and save back into the database. The first part(retrieve and display) works fine. But when I put update the table codes inside another oracle tag,it gives me a page not found error. Can you operate on the same database field more than once in a dynamic page?

    The purpose is to automatically calculate the transport freight  as a percentage of the net amount of the sales order. We are able to retrieve this field even if the sales order has not been posted yet with this formatted search:
    Select $[$22.0.0]
    Our doubt is that this field is affected also by the item of the expenses that we are going to calculate, this is the reason why we are trying to calculate the line total of each row and in the formatted search exclude the item that have a certain code (i.e. transport freight), in this way we are sure that we are calculating the percentage of  the net amount of the goods without the freight.
    Thank you for the support.
    Fedora

  • Dynamic page size

    Hi,
    I need to run the same RTF template for US and Europe.
    The only difference is page size.
    US is using "Letter" page size, Europe is using "A4" page size.
    I can distinguish the page size by organization.
    Is there a way that I can have one template with dynamic page size, or I have to have two different templates?
    Thanks,
    karmit

    When the data is generated, can you determine who it is for (letter-sized or otherwise)? Once you pick off a value that identifies the page size, you can let a variable for lines per page (see the fixed lines per page example on Tim's blog) and base the page break on the paper size.

  • ORACLE Tags in Dynamic Pages

    In the beta version, a Dynamic Page could be developed that did not contain the Oracle tags, <ORACLE> and </ORACLE>. The production version appears to require the use of these tags.
    I've tried to work around this by using <ORACLE> select ' ' from dual</ORACLE> which gave me a blank, but with a different color background and <ORACLE>htp.br;</ORACLE> which Oracle Portal would not accept.
    Any suggestions on how to create a Dynamic Page where the Oracle tags do not impact the display of the page?
    Fran Bailey
    EDS - Meredith Account

    I am running 3.0.6.6.5 on Solaris 2.6.
    I entered your work around (<ORACLE>begin null; end;</ORACLE>) and got this error message when I tried to save the HTML code:
    ORA-06550: line 1, column 15:
    PLS-00103: Encountered the symbol
    "end-of-file" when expecting one of the following:
    ; <an identifier> <a double-quoted
    delimited-identifier>
    The symbol ";" was substituted for "end-of-file" to continue. (WWV-11230)
    Failed to parse as MAH - BEGIN NULL;
    END (WWV-08300)
    Any other suggestions would be appreciated.

  • Help on oracle tags inside dynamic pages

    Hi All
    I have used dynamic pages like this , i create a html form inside a dynamic page on submit of which a procedure gets called & inserts the values in the table.
    I see some <oracle> tags every time i create a dynamic page but have never used them. Could some one tell how to use these tags. whether they can be used to call a procedure or can i embed any dml statements in these oracle tags.
    Kindly somebody could explain it with an example.
    Regards
    Sushant

    There is a brief description in the online help - see http://isd-demos2.oracle.com:7778/help/wvtdynam.htm.
    You can also search this forum - there have been many examples posted here.
    If you have further questions about dynamic pages, the Portal Applications forum would be a better place to post them.
    Regards,
    Jerry
    Portal PM

  • Help on oracle tags in dynamic pages

    Hi All
    I have used dynamic pages like this , i create a html form inside a dynamic page on submit of which a procedure gets called & inserts the values in the table.
    I see some <oracle> tags every time i create a dynamic page but have never used them. Could some one tell how to use these tags. whether they can be used to call a procedure or can i embed any dml statements in these oracle tags.
    Kindly somebody could explain it with an example.
    Regards
    Sushant

    Hi,
    You can do all that you can do in a plsql block.
    Here is an example which paints a form for the employee records and submits them. On submit a procedure submit_form is called.
    <HTML>
    <HEAD>
    <TITLE>Example</TITLE>
    </HEAD>
    <BODY>
    <FORM action="<schema name>.submit_form" method="post">
    <H2>Example of A Dynamic Page</H2>
    <ORACLE>
    begin
    for c1 in (select * from scott.emp )
    loop
         htp.p(c1.empno);
         htp.p(c1.ename);
         htp.p(c1.deptno);
         htp.p(c1.hiredate);
         htp.p(c1.sal);
         htp.p('<input type="hidden" name="p_empno" value='||c1.empno||'>');
         htp.p('<input type="text" name="p_comm">');
         htp.p('<br>');
    end loop;
    htp.p('<input type="submit" name="p_action">');
    end;
    </ORACLE>
    </BODY>
    </FORM>
    </HTML>
    Thanks,
    Sharmila

  • Dynamic Page / Oracle Tags/ Javascript

    I'm attempting to insert values from an Oracle database into javascript code that creates a scrolling text area. I'm assuming I need to use <oracle></oracle> tags to do so, but I'm not sure exactly how to populate what I need in the code. Any ideas?
    The code is below. The area that needs to be populated with the data is in the Array variable, and I've used "Database Value 1, 2, 3" as placeholders.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
         <title>Untitled</title>
    <style TYPE="text/css">
         <!--
         .TextScrollStyle {
              visibility:hidden;
              font-family:Verdana;
              font-weight:bold;
              text-align:center;
              padding:0;
              margin:0;
              width:100%;
              overflow:hidden;
         -->
         </style>
    <script language="JavaScript1.2">
              var TS_message = new Array();
    TS_message[0] = '<div align="left">Database Value 1</div>';
         TS_message[1] = '<div align="left">Database Value 2</div>';
              TS_message[2] = '<div align="left">Database Value 3</div>';
    var TS_scrollwidth=400
              var TS_colorFG = 0x000000;
              var TS_colorBG = 0xFFFFFF;
              var TS_ymax = 50;               
              var TS_ystep = 1;               
         var TS_speed = 2;                    
    var TS_pause = 100;
              var TS_fadestep= 20;               
    if (document.all)
    document.write('<style>#containerarea{width:'+TS_scrollwidth+'}</style>')
    </script>
    </head>
    <body>
    <DIV id="containerarea">
    <SCRIPT LANGUAGE="JavaScript1.2" SRC="\\Portalapp\ORACLE\iSuites\portal30\java\textfader.js"></SCRIPT>
    </DIV>
    </body>
    </html>

    You can write a piece of PL/SQL for
    TS_message[0] = '<div align="left">Database Value 1</div>';
    TS_message[1] = '<div align="left">Database Value 2</div>';
    TS_message[2] = '<div align="left">Database Value 3</div>';
    between <ORACLE> tags:
    declare
    cursor ...
    begin
    loop for i in cursor loop
    htp.p('TS_message[0] = ''<div align="left">'||i.value||'</div>''; ';
    end loop;
    end;
    Hope it helps.

  • ORACLE tags in Unstructured templates

    I'm trying to call a function using the oracle tags in a UI template. If I put the same code in a dynamic page it works fine but when in a template it doesn't work.
    I noticed that the application templates have function/procedure calls in their html the_value column in the wwv_sys_app_template_details$ table. I'm therefore assuming that I'm missing some specific formatting or something that I'm supposed to be using??? I've tried htp.print/htp.p but I can't get the value returned from my function to display.
    Any suggestions would be most appreciated. thanks.

    Hi
    if you call a procedure from a UI template, you must grant that procedure to public, otherwise you don't see anything.
    #write my_schema.my_proc: for example
    create or replace my_proc as
    begin
    htp.p('Hello');
    end;
    #in sqlplus: conn my_schema/my_schema@my_sid
    grant execute on my_schema.my_proc to public;
    #in the UI template:
    <ORACLE>begin my_schema.my_proc; end;</ORACLE>
    It works,
    Ettore

  • Get error when add start:body tag, ERROR: oracle.apps.xdo.template.fo.area.NoAvailableAreaException: Not enough rendering area

    I'm using "Oracle BI Publisher Template Builder for Word"
    Version: 10.1.3.2.1  Build 87
    When I try to add <?start:body?> and <?end body?> tags get error in preview to pdf
    My structure is:
    for-each G_INVOICE
    [TABLE WITH HEADER INFORMATION]
    <?start:body?>
    [for-each G_DISTRIBUTION_LINE
    TABLE WITH DISTRIBUTION LINES INFO
    end G_DISTRIBUTION_LINE]
    <?end body?>
    "text for special instructions"
    end G_INVOICE
    The log generated is:
    Font Dir: C:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\fonts
    Run XDO Start
    RTFProcessor setLocale: en-us
    FOProcessor setData: Z:\projects\AEROSTAR\reports\AERO - AP - Disbursal Request\AEROAPDISREQ.xml
    FOProcessor setLocale: en-us
    oracle.apps.xdo.template.fo.area.NoAvailableAreaException: Not enough rendering area. Please look into the incomplete output file for cause.
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.createNewPage(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.startLayout(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.run(Unknown Source)
      at oracle.apps.xdo.template.fo.FOHandler.endElement(Unknown Source)
      at oracle.apps.xdo.common.xml.XSLTHandler$EEEntry.sendEvent(Unknown Source)
      at oracle.apps.xdo.common.xml.XSLTMerger.startElement(Unknown Source)
      at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:167)
      at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1182)
      at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
      at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
      at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
      at oracle.apps.xdo.template.fo.FOProcessingEngine.process(Unknown Source)
      at oracle.apps.xdo.template.FOProcessor.generate(Unknown Source)
      at RTF2PDF.runRTFto(RTF2PDF.java:632)
      at RTF2PDF.runXDO(RTF2PDF.java:466)
      at RTF2PDF.main(RTF2PDF.java:254)
    Please, Need help.
    Thanks in advance.

    The cause for this seems to be that a row in a table is larger than a page, and there is no place left for the Header row.
    Check the bellow action plan:
    1. Edit the template in MS Word.
    2. Click on the table.
    3. Right click on the little crossed square in the upper right corner of the table.
    4. Click on 'Table Properties' / tab 'ROW'.
    5. Look at all rows by using the button 'Next Row'.
    6. If 'Repeat as Header at the top of each page' is checked, please uncheck it.
    7. Save the template and retry.
    BR,
    Alex

  • Using Template information in dynamic pages

    Having created some interface templates for my current project, I find I am not able to readiily use them in dynamic pages.
    Is there a technique for this, that allows me to get the details from my page styles / Interface templates and combine them with output dynamic pages?
    I am able to associate backgrounds ( for example ) with customization forms, but not output.

    I understand the desire to not use an applet. Have you tried an html pop-up? This will create a separate http request through to your server on the user's same session. This allows your server to do the required processing to display the data to the user via html.
    Use the target="_blank" attribute of the anchor tag, or a window.open JavaScript method.

  • Dynamic page in region as a portlet not displaying in portal template

    As the title suggests I have a portal template that contains a region at the top . within this region i have included 2 portlets, first is a dynamic page (a simple banner title ) then a navigation page beneath them .
    when I am logged in as a specific user it displays correctly , when I log onto the page without logging in - the dynamic page does not display ,yet the navigation page does . I have clicked on every display to public check box , assigned public user with view privilege and everything else along those lines . Any ideas ??
    thanks in advance , Chris

    Hi Chris: Just to be specific, did you go to the providers tab in Navigator, the locally built providers link then the provider which contains your dynamic page and check the access set directly on that page? You can either set the dynamic page to have its own access (overriding that of the provider) or set the provider itself to be public.
    Rgds/Mark M.

  • Why is the template not being used when dynamic page called ?

    Hi,
    I have created a dynamic page and assigned a template to it. When I call the dynamic page using the 'show' procedure from a form, I do not see the template.
    Why is the template not being used ? How can I get the template working when I call the dynamic page ?
    I even tried to show the page from the dynamic page's manage components tab and there is same problem. Template is not being used.
    thanks,
    Mainak

    You can alter the generated package body to include the following function in the header and footer sections.
    Header:
    PORTAL.wwv_headings.show_header(
    p_template => 'PUBLIC.TEMPLATE_3',
    p_heading => 'Dynamic Page',
    p_help_link => 'PORTAL_DEMO.EXAMPLE_DYNAMIC_PAGE.help',
    p_about_link => 'PORTAL_DEMO.EXAMPLE_DYNAMIC_PAGE.about');
    Footer:
    PORTAL.wwv_headings.show_footer(
    p_template => 'PUBLIC.TEMPLATE_3',
    p_help_link => 'PORTAL_DEMO.EXAMPLE_DYNAMIC_PAGE.help');
    where
    <PORTAL_DEMO> indicates application schema
    <PORTAL> indicates the name of the portal (normally this will be portal30 by default).

Maybe you are looking for