HTML DB 1.6  (Apex) htmldb_util.set_session_state and Trigger

Hi everybody,
I have two “1.6 HTML-DB applications”: “Number 1” and “Number 2” which I use the same « before insert » trigger.
But, in application “Number 2”, I want to skip some instructions, I want to put a condition.
Firs of all, I would add an element “abc” in the page 1 of application “Number 1” to affect it the “Yes” value and in the page 1 of application “Number 2” to affect it the “No” value.
First of all, I taught to add a condition in the trigger.
begin
If abc = ‘yes’ then
def……..
Xyz……
End if;
Azb…..
Yjn……
End;
But, someone told me to use “htmldb_util.set_session_state”, but I’m not sure to fully understand the reason to use that. Can someone could help me ?
Thanks. Bye.

Firstly, I would never put ApEx page item references directly in a trigger. Surely, you can refer to the underlying column value that's supposed to be coming in rather than a page item. This might mean that you create a separate procedure to do your insert operation but it keeps things a bit cleaner and, to my way of thinking, more manageable.
Second, just null out the value of the page item (with a computation or a process) when you click the create button - after the value has been used and properly inserted into the table.
Earl

Similar Messages

  • HTML-DB 1.6 (Apex) Page size and Page Model and monitor size

    Hi everyone,
    We developed our application based on 17 inches monitor. But, today one user told us that she has a 15 inches monitor. Thus, she don't see full page, she has to use the scroll.
    Is it in our model that you can reduce the page size for example 80% size in the page model to fit with 15 inches monitor ?
    Or to define a variable in the page model and have two different buttons one for 15 inches monitor (80% page size) and an other related to 17 inches monitor and more (100% page size) this pourcent should be the value of a variable in the page model ?
    Thanks. Bye.

    Hi Timiche,
    The easiest thing to do would be to make sure that the width of items on the page (especially tables) are set to a percentage and not a fixed px value. This way, the items will spread out to fill the available screen width.
    You should also bear in mind that users can change the resolution of the screens - 640x400, 800x600, 1024x768 etc. It would become a nightmare to try and cater for all possible resolutions and screen sizes by dynamically changing the fixed width dimensions of all objects on a page! I would check what items need to be of fixed width and change all the rest to percentages.
    We tend to inform our users that pages have been designed for a particular resolution - currently 1024x768.
    Regards
    Andy

  • Roll Your Own - APEX 4.0 and JQuery-UI Application

    For those with a apex.oracle.com account and want to see jQeury tabs running via 4.0 in your own Workspace, use following this script to create your own version of Shijesh's (Apex_Noob) application.
    Credit also goes out to Alistair Laing for his hard work in investigating why 4.0 is requiring the use of the googleapis jquery.js... libraries.
    Application Builder - Create
    Application Type - Database
    Create Application - From Scratch
    Name - jQuery Application
    Add Page - keep default and Click Add Page
    Click CreateMy application defaulted to Theme 2, you will need to switch the theme to one of the following: If you don't the tabs will not render properly.
    8 Orange
    10 Sand
    13 Classic Blue
    14 Simple Green
    15 Light Blue
    16 Dark Blue
    18 Simple Gray
    19 Red Gray
    Message - Application created successfully.
    Click Shared ComponentsUnder User Interface Click - ThemesIf you don't see one of the above Themes, you will need to Create and switch your Theme.
    Click - CreateFrom the Repository selected Click - Next and select one of the above Themes
    Click - Switch ThemeSelect one of the above Themes and Click - Next
    Click -NextClick - Switch ThemeReturn to your newly created Application by Clicking on Application xxxxxxx Breadcrumb
    Click - Create PageSelect - Blank PageClick - NextAssign the page a name
    Click - NextAccept defaults and Click - NextClick - FinishClick - Edit PageI still work in Component View, to toggle to this View, click on the control adjacent to Page number and Go button. Hover over the ones on the far right and you will see both Component View and Tree View
    From Component View
    Click on the Page Edit Control
    In the Text Area labeled Javascript/Execute when Page Loads - paste in the following code:
    $x("tabs").appendChild( $x("tabs-1"));
    $x("tabs").appendChild( $x("tabs-2"));
    jQuery("#tabs").tabs();In the Text Area labeled HTML Header and Body Attribute/HTML Header - paste in the following code:
    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/redmond/jquery-ui.css" type="text/css" />
    <script src= "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.js"> </script>Click - Apply ChangesRequired use of the Google jqueryui libraries is being questioned by recent threads created by Alistair Laing since it appears that 4.0 does not currently support jQeury tabs
    {thread:id=1083507}
    {thread:id=1083540}
    Create a Region
    Type HTML Text - accept defaults
    Provide a Title like "Tabs" and accept defaults
    Template - Reports Region
    Sequence 10
    Click - NextIn the Enter HTML Text Region Source: Text Area - paste in the following code:
    <div id="tabs">
    <ul>
    <li><a href="#tabs-1">Employees</a></li>
    <li><a href="#tabs-2">Departments</a></li>
    </ul>
    </div>Click - Create RegionCreate a second Region
    Type Report/Sql Report
    Provide a Title like "Employees" and accept defaults
    Template Reports Region
    Sequence 20
    Click - NextIn the Enter SQL Query or PL/SQL function returning a SQL Query: Text Area - paste in the following code:
    SELECT empno,
           ename,
           job,
           mgr,
           hiredate,
           sal,
           comm,
           deptno
    FROM   empClick - Create RegionEdit the newly created Report Region
    Under Attributes/Static ID - paste in the following code:
    tabs-1Click - Apply ChangesCreate a third Region
    Type Report/Sql Report
    Provide a Title like "Departments" and accept defaults
    Template Reports Region
    Sequence 30
    Click - NextIn the Enter SQL Query or PL/SQL function returning a SQL Query: Text Area - paste in the following code:
    SELECT deptno,
           dname,
           loc
    FROM   deptClick - Create RegionEdit the newly created Report Region
    Under Attributes/Static ID - paste in the following code:
    tabs-2Click - Apply ChangesRun you page and you should see you tabs.
    Jeff

    Great post Jeff,
    With regard to Jquery UI and tabs I've contacted the Apex dev team and received a reply from them.
    All the jQueryUI files are included in the APEX 4.0 distribution, but not all jQueryUI components
    are loaded by default to avoid a huge initial download. It's not necessary to load your own version of jQueryUI, just load the missing component.
    For the "Tabs" you have to add
    <link href="IMAGE_PREFIX#libraries/jquery-ui/1.8/themes/base/jquery.ui.tabs.css" rel="stylesheet" type="text/css" />
    <script src="#IMAGE_PREFIX#libraries/jquery-ui/1.8/ui/minified/jquery.ui.tabs.min.js" type="text/javascript"></script>
    to your page template or the header attribute of your page where you want to use it.They did not mention which other Jquery UI widgets were not included so people need to check to see if they get any JS errors Like "$('#tabs').tabs() is not a function" this would suggest that tabs is not being loaded. To included it in you page header directly after #HEAD# you need to place the css and js as stated above.
    If you need jquery help just post you queries here or the is some other jquery links that maybe of some use
    jQuery
    http://jquery.com/ - Official jQuery Website
    http://api.jquery.com/ - jQuery API Library
    http://plugins.jquery.com/ - jQuery Plugins (Not APEX related)|
    http://yayquery.com/ - yayQuery - jQuery Podcast
    http://jqueryui.com/ - Official jQuery UI Website
    http://jqueryui.com/demos/ - jQuery UI Demos
    Edited by: Alistair Laing on Jun 9, 2010 4:04 PM
    Add more links
    Edited by: Alistair Laing on Jun 9, 2010 4:09 PM

  • Problem regarding PDF printing in apex 3.1 and 11g database using cocoon

    Hi,
    i am configuring pdf printing on apex 3.1 (database 11g on windows XP OS) with cocoon/apache tomcat/fop using steps given in Carl Backstrom blog
    http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html
    I am using cocoon 2.2.10 / tomcat 6.0.20 and JDK 1.6
    I did everything as was mentioned in Carl's blog and everything configured without any hassle. I even enabled network services for FLOWS_030100 user on database. Even after doing all the steps I'm getting the error
    ORA-20001: The printing engine could not be reached because either the URL specified is incorrect or a proxy URL needs to be specified.
    I'm confused and don't know what to do next.

    Hi,
    By default, the ability to interact with network services is disabled in Oracle Database 11g release 1 (11.1). Therefore, if running Oracle Application Express with Oracle Database 11g release 1 (11.1), use the new DBMS_NETWORK_ACL_ADMIN package to grant connect privileges to any host for the FLOWS_030100 database user. Failing to grant these privileges results in issues with PDF/report printing, specifically, you will get the following error message:
    ORA-20001: The printing engine could not be reached because either
    the URL specified is incorrect or a proxy URL needs to be specified.
    Follow the steps mentioned in the Oracle Application Express Installation Guide, [Enabling Network Services in Oracle Database11g|http://download.oracle.com/docs/cd/E10513_01/doc/install.310/e10496/post_inst.htm#BGEJJIHE]. Also refer to the [troubleshooting section|http://download.oracle.com/docs/cd/E10513_01/doc/install.310/e10496/post_inst.htm#BHAGIHIB] in case you receive an ORA-44416: Invalid ACL error after running the previous script.
    /Kenny

  • Proper use of htmldb_util.set_session_state

    Looking for a way to set a page variable from a trigger.
    I have an app that needs a variable set from within an insert trigger. I would like to let the user see the value of that variable on the page after the insert is complete.
    Can I use htmldb_util.set_session_state for that?
    Thanks.

    See
    Re: HTMLDB_TOOLS by Vikas need some helps about rollback(Urgent !!!)
    The problem is that htmldb_util.set_session_state does a COMMIT and as you know trigger code is not allowed to have a commit (ORA-04092: cannot COMMIT in a trigger)
    What you could try doing is create a little procedure as a autonomous transaction as a wrapper around htmldb_util.set_session_state
    create or replace procedure my_set_session_state
    p_item_name in varchar2,
    p_item_value in varchar2
    is
       PRAGMA AUTONOMOUS_TRANSACTION;
    begin
    htmldb_util.set_session_state(p_item_name,p_item_value);
    end;
    /and call that from your trigger.
    Hope this helps.

  • Embed html code with Oracle Apex report

    hello Everybody,
    Iam wondering if you guys have any idea about embeding my own html code that has a javascript and html stuff in Oracle Apex page.
    Thanks,
    Abdul ALkhateeb

    Abdul,
    This is very common and can be done a few ways. It's actually one of the great things about ApEx - VERY flexible. Please be more specific about what you're trying to do so we could point you in the right direction.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen

  • Jasper report on HTML when one image loaded from database and for the other

    How to generate jasper report on HTML when one image loaded from database and for the other we give a image path
    My code
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
              exporter = new JRHtmlExporter();
              exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
              exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos);
              exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, strImageInputDirectory);
         exporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, strImageOutputPath == null ? "." : strImageOutputPath);
         exporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR, Boolean.TRUE);
         exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, Boolean.FALSE);
         exporter.setParameter(JRHtmlExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
              exporter.exportReport();
              byte[] bdata = ((ByteArrayOutputStream) baos).toByteArray();
    Can any one help pls
    Message was edited by:
    ameet.au

    hey sorry for posting it in this forum.
    but do u have sample code for making it work.. since i am able to do it on PDF format(image from Database and another stored in the webserver) using
    byte image[] =(byte[]) outData.get("image");
                        ByteArrayInputStream img = new ByteArrayInputStream(image);
                        hmimg.put("P_PARAMV3", img);
    print = JasperFillManager.fillReport(reportFileName, hmimg, jrxmlds);
    bdata= JasperExportManager.exportReportToPdf(print);

  • Where can I get an Html error report of all the syntax and tag problems?

    Where can I get an Html error report of all the syntax and tag problems?

    Thank you for your answer.
    Where is the DW validation for me?
    My files are in my computer so I don’t have an external URL.
    File > validation > as xml = closes DW... Maybe because it is not a correct command for HTML,
    And
    Window > results > validation = gives a partial mistakes (e.g. shows an open tag without closing tag, but doesn’t show a closing tag without an open tag).
    Thank you.

  • Export from Apex 3.2 and import to Apex 4.0

    I apologize if this has been asked before (and I am sure it has).
    We are about to move all our Apex/Oracle apps to a server where Apex 4.0 is installed. Our current Apex version is 3.2. My question is can we export from Apex 3.2 and import in Apex 4.0 and expect everything to work (assuming it all works fine in Apex 3.2 and all Oracle objects were moved properly to the new server , both servers have Oracle 11g).

    I am having trouble finding "update application" under any of the utilities.
    Also one of my applications gives me the following error when I try to import it from Apex 3.2. to 4.0
    ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful. ORA-02290: check constraint (APEX_040000.WWV_FLOW_WS_RPT_CHART_AGG_CK) violated &lt;pre&gt;begin wwv_flow_api.create_worksheet_rpt( p_id =&amp;gt; 24053127534342788+wwv_flow_api.g_id_offset, p_flow_id=&amp;gt; wwv_flow.g_flow_id, p_page_id=&amp;gt; 60, p_worksheet_id =&amp;gt; 24052412232342516+wwv_flow_api.g_id_offset, p_session_id =&amp;gt; null, p_base_report_id =&amp;gt; null+wwv_flow_api.g_id_offset,
    I have no clue how to fix that.
    George

  • Authentication support for Apex 4.1 and 3.2.1.00.1 on Active Direct 2008 R2

    Hi,
    We are about to upgrade our domain controllers to Windows Server 2008 R2 from Windows Server 2003.
    We have 2 Apex production applications running on:
    Apex 4.1 and Apex 3.2.1.00.11., both of which authenticate users against the domain. Can anyone confirm whether upgrading our Domain Controllers to WINDOWS SERVER 2008 R2 is supported or likely to require changes? Neither application points to a specific DC for authentication, they simply point to the domain top level.
    Thanks,
    Andy

    That's a shared drive. And it must be allowed because our current production APEX applications have been linking (and still do) to files for several years now. Only my fresh install of APEX 4.1 doesn't link.

  • I am using apex 4.2 and in sample application i cant find the administratio

    i am using apex 4.2 and in sample application i cant find the administration module
    through which i can add users.
    I dont think that facility is available in 4.2 kindly confirm pls
    Any information shall be appreciated
    Thanks
    Edited by: susf on Nov 26, 2012 6:02 AM

    It is called the sample database application. This consist of tabs like
    customer
    product
    order
    and admin
    In apex 4.0 i had a facility in admin to create users. .Thats not available in 4.2
    I mean facility to create user
    I was looking for custom authentication feature which was present earlier in this demo
    its not present currently
    Edited by: susf on Nov 26, 2012 6:07 AM
    Edited by: susf on Nov 26, 2012 6:17 AM

  • How do I download and saves html files off my website to store and save using Dreamweaver CS3?

    How do I download and saves html files off my website to store and save using Dreamweaver CS3?
    I need to save all files from web and store onto a drive to reupload to a new domain name.  I use Dreamweaver CS3.

    First define your Local Site folder in Dreamweaver.  DW will use this folder to store your site files.
    Go to Manage Sites > New or Edit site.  See screenshots.
    Servers:  Enter your remote server's log-in details.  When complete, hit TEST to see if the connection is working.  If all is well, hit SAVE.
    From the Files Panel (F8), click on Remote Server to show the files that are currently there.  Click the green Down Arrow to GET files from remote server to your local site folder.
    Nancy O.

  • APEX Bug - Drag and Drop

    Hey all
    I've discovered a rather annoying bug in APEX's drag and drop item layout.
    I'm designing a form and putting mainly text fields down in a column.
    Every now and then one of these text fields needs to have a text item (display only) beside it.
    The problem is, say if I add 2 display only items beside 2 different text fields, it "forgets" about one of these items when I press the Next button.
    It just comes up with the next screen - but it's missing one of the display only items!
    Then, seemingly at random, the missing item will (after much editing of the item layout) just appear again at the top of the item list! (when it was positioned somewhere completely different before).
    I've managed to reproduce this multiple times.
    Makes creating and editing pages with items a very annoying chore!

    Oh, ok.
    Well, it happened to me every time on 2 separate item regions.
    I'll just go and try to do it again... See if it still 'works' :)
    ok well it's still doing it...
    I just added 2 display only items to my existing item list, and NONE of them were actually added.
    Here was my display list:
    Region: Collection Details
    186 P2_COLL_DAYS Checkbox
    193 P2_COLL_TIME Text Field
    195 P2_ALLOW_MULTI_TRANS Checkbox
    196 P2_ACC_COUPON_TYPES Text Field
    198 P2_COUPON_OPTIONS Text Field
    200 P2_MESSAGE_1 Text Field
    201 P2_MESSAGE_2 Text Field
    202 P2_MESSAGE_3 Text Field
    203 P2_MESSAGE_4 Text Field
    204 P2_MESSAGE_5 Text Field
    205 P2_MESSAGE_6 Text Field
    22 Itemsand I tried to add a display only item after both of these:
    196 P2_ACC_COUPON_TYPES Text Field
    198 P2_COUPON_OPTIONS Text Fieldname: "P2_ACC_COUPON_TYPES_TEXT"
    text: "[e.g. 1,2,3]"
    and
    name: "P2_COUPON_OPTIONS_TEXT"
    text: "[e.g. 5 or 5,10,15]"
    And neither of them showed up on the next page (where you confirm and adjust the items).
    I'm using Internet Explorer 7.

  • I have 9 Soundcloud widgets on my web page, none of them work. They use HTML 5 which works on Google Chrome and Internet explorer. Do you have a fix for this ?

    I have 9 Soundcloud widgets on my web page, none of them work. They use HTML 5 which works on Google Chrome and Internet explorer. Do you have a fix for this ? I am using Firefox V 20.0.1

    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Press and hold Shift and left-click the Reload button.
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (MAC)
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • I cannot get the new mac mini to wake from sleep and trigger the displays - this is the second mac mini I have had and both have had the same issues. It worked before on my macbook extremely well...

    I cannot get the new mac mini to wake from sleep and trigger the displays - this is the second mac mini I have had and both have had the same issues. It worked before on my macbook extremely well...
    Using 2 displays, connected via HDMI and thunderbolt
    Been on to support a number of times now - is anyone experiencing the same issues?

    BUMP.
    I actually showed this to Apple geniuses when I took my computer to the apple store, and it's still here. In console it says:
    kernel[0]: Previous Shutdown Cause: -128
    I don't know if that's related or not, but maybe helps?

Maybe you are looking for

  • Berkeley  DB JE is getting hanged while calling environment sync method.

    Hi, I am developing an application in Java and I am using JE edition of Berkeley. I am facing an issue, during shutdown operation I am calling syn method of EntityStore class and Environment class. The EntityStore.sync() is getting completed but duri

  • Disk Utility - Restoring a previous image

    Since I first bought my Mac Mini (February of this year) I've been using the disk utility to make occasional backups (disk images) of my partitions, in case I ever need to restore a whole partition (or create a clone of an existing partition - for ex

  • MEdia disk for Solman 4.0 Sr3 Instalaltion master

    Hi Experts, I want to install Solution manager 4.0 SR2, can any one please suggest me the media i need to download for Solman 4.0 Installation master SR2 (Media disk no). I can find the Solman Sr3 Instalaltion master but i coulld not find the Sr2 Dis

  • Sync with two computers doesn't work anymore?

    Hi there I used to sync with my iPOD with both computers that I use. Work and Home. that's because I mostly buy music with this work computer cause it has MUCH faster connection than I have @ home. About a week ago I purchased John Lennon songs. Befo

  • My Mac book pro shuts down after starting

    My Mac book pro shuts down after a few second. I have to press the start button multiple time before uploading