Masking elements at the entrance to the page if the NULL value in the database...

Environment: APEX 3.1.1.00.09

I have two 2 page elements I want to hide in 2 two instances:

1. when the page first that the user enters a new round of data
2 when the values of these objects have the value NULL, based on the recovered database

I would like to than the items to be displayed if the values in the extracted line are not NULL.

I already have the logic that allows you to hide items based on specific values being selected or changed by the user, but as requested (1) above I elements be hidden initially.

Be gentle as I am still a beginner. :-) >

-gary

Hi Gary - I thought today, it was a public holiday in the United States (something to do with a new President?)

Anyway...

You have reason - javascript there has nothing to do with Apex, so debugging doesn't even know it exists. To test if your script is run, the simplest method is to put messages alert ('message') in the code:

function ...()
{
 alert("Here 1");
 ...
 alert("Here 2");
 ...
etc

Name the messages in a way that you can easily identify what is running.

It might be easier for you to explain what I did on my page (assuming it does what you're trying to do? Otherwise, just say).

On the attributes of my page, I have added the following in the Header HTML parameter:

<script type="text/javascript">
function shA()
{
 var l = document.getElementById('P6_LISTA');
 if (l.value == 'A')
 {
  $x_ItemRow('P6_TEXTA','SHOW');
 }
 else
 {
  $x_ItemRow('P6_TEXTA','HIDE');
 }
}
function shB()
{
 var l = document.getElementById('P6_LISTB');
 if (l.value == 'B')
 {
  $x_ItemRow('P6_TEXTB','SHOW');
 }
 else
 {
  $x_ItemRow('P6_TEXTB','HIDE');
 }
}
</script>

Strictly speaking, you could add this anywhere above the P6_xxx dishes - but the HTML header is the best place to add javascript functions.

I have then four elements on the page:

P6_LISTA - a selection list
The Source is: STATIC: A, B, C, D, E
and the setting of the attributes of the Form HTML element is: onchange = "javascript:shA();" »

P6_LISTB - a selection list
The Source is: STATIC: A, B, C, D, E
and the setting of the attributes of the Form HTML element is: onchange = "javascript:shB();" »

These two have display Null: Yes - Null display value: - Select - and Null return value: Z

P6_TEXTA and P6_TEXTB are two normal text fields and not of special parameters.

Finally, I have a region in the foot before displaying the point and the use of 'No. Template' which has a Source in the region:

<script type="text/javascript">
shA();
shB();
</script>

(this pass just the code show/hide the page loading)

Who help me?

Andy

Tags: Database

Similar Questions

  • How do I dynamically set values of the pages on a null value when an item is changed

    Hi all

    I am new to Oracle Apex.

    I have P_ITEM1 as a selection and P_ITEM2 also a list selection of value P_ITEM1. (to my condition that I do not use cascading article Parent LOV)

    I submit the page when the P_ITEM1 value is selected then LOV on P_ITEM2 gets refreshed based on the P_ITEM1 value.

    I am train to clear the item previously selected to P_ITEM2 when the value of P_ITEM1 is changed.

    I tried to create a dynamic action on the change on P_ITEM1 event and net Action on P_ITEM2.

    and the dynamic action does not work.

    Thank you.

    -Kumar

    Kumjeeth

    Set the attribute area of the Page to send items to P_ITEM2. He would submit the P_ITEM2 on dynamic action of refreshment.

    Nicolette

  • elements on the page do not set when called via the hyperlink in graphics

    Hello to anyone who can help me on this thorny issue,

    I have a barchart on one page (page 39), where if you click on the bar graph, open the page 40 and variables are placed on the elements of page 40. variables depend on what bar was clicked. somethiing looks like this:

    Select ' F? P = 102:40 :'|| : APP_SESSION |': NO::P40_DATE, P40_JAHR :'|| TO_CHAR (reference, 'yyyy.mm.dd') | ',' | link to_char (reference, "yyyy"),
    TO_CHAR ("reference, ' dd.mm.yyyy"),.
    Avg_mips
    go... a few sql queries...

    It works usually - BUT, once in a while, good page, but the elements have the value NULL.
    only when I press F5 to refresh the page, the variables pass correctly for items and the appropriate query is made...
    After a few tests, it seems to happen when I click on fairly quickly. quickly return to page 39, a new bar and click on I'm back on page 40.
    If I do this slowly, maybe wait a few seconds, it works in general.

    for example, the URL looks something like this:
    http://Daidalos:7777/pls/Apex/F?P=102:40:2118535974571692::no::P40_DATE,P40_JAHR:2008.12.16,2008
    -I know that the variables are correct when I look at the URL
    -However, the new graph page 40 shows null values, and a click on the button 'session' confirms that items are null!
    -Once I press F5, the URL is the exact same onle, items are now "refreshed" and appropriate treatment can take place.

    so, can someone tell me what is happening here and how can I avoid this?
    the elements are defined as 'hidden' (unprotected). There is no calculation or the default settings for elements, and they are not reset to null at any time.

    Kind regards
    Mike

    Mike:

    Validations are those interpreted by the SPECTACLE of the APEX and ACCEPT the process.
    The idea here is to force a 39 page ACCEPT and then see HER return the table on page 40.
    This is achieved by replacing the graphic link to a redirect by a form submission followed of a branch on page 40.
    Thus, Javascript must be on page 39 and the part on page 39 must specify page 40 as target. You will need to do P40_DATE and P40_JAHR hidden items from page to page 39 so JS can set values for these.

    CITY

  • recover the database by using the RMAN backup archivelogs

    Hello

    I tried to find the resolution of this problem in google a lot but couldn't find something useful.

    Location:

    We try to clone the dev environment of production that are completely on different servers and do not share a common mount point.
    Backup RMAN of PROD with RMAN as well as arch newspapers are kept in this mount point.
    We took control of backup files of PROD restored in DEV fired restore with recovery until a when not.
    Turns out that the sequence was not saved in right backupsets there if recovery has not requested more arch newspapers that are present in the PROD.
    Archs are stored in ASM and only way out is to take of RMAN backup of them.
    We control the file as a repository for RMAN.

    my questions are

    1. surely, I need to take backup of the control file after I take the log arch by RMAN backup and restore this file command in the DEV of so that when I start RMAN recovery in DEV, database will be able to find the backupset with arch newspapers. But the new restore a control file will delete the data files restored information?

    2. If we did not have a point of common Assembly and then after sending the backup destination elements how the database would be the locations of the game copied to the new location of the control file that is restored from the backup source?

    Suppose that in the source backups are stored in/backup/rman
    in destination copy us in/backup/clone
    in the PROD control file, their locations are saved in/backup/rman
    so if I restore this command file in custom DEV it find the elements of backup in/backup/rman?
    is it possible to save a backup of outside item in the control of a database file?


    3 al ' ASM, is there another way to extract the PROD archive logs and apply them to a cloned instance? (sending of newspapers without DR)

    The help is very appreciated.

    Kind regards
    Marjorie Dutta

    1. .... But the new restore a control file will delete the data files restored information?

    N ° provided that you do not have renamed, moved or abandoned any of the data files that were already copied in DEV. (also, subject that you did not add da new Production data between two backups - otherwise the new controlfile file will wait as datafile also to be present at DEV).
    You will do an incomplete recovery until a certain SNA / sequence # if information subsequent archivelogs beyond your point of recovery in the controlfile are redundant. In addition, a RESETLOGS would be done when you OPEN the database.

    2... how to know the locations of the game copied to the new location of the control file that is restored from the backup source database?

    What is the order CATALOG. In 9i, CATALOGUE could only of catalog datafilecopy. In 10g and more, you can BackupPieces CATALOGUER. Thus, it would "update" the controlfile (which is the RMAN Repository) with information about the BackupPieces that are present in a replacement / new location.
    See http://download.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta011.htm#sthref230

    3. ... ASM, is there another way to extract the PROD archive logs and apply them to a cloned instance?

    According to the version you are using, ASMCMD has a 'cp' command to copy the files from the DSO for the operating system. However, you cannot use ASM to apply directly the archivelogs. You always use the 'RECOVER' of RMAN or SQL command line command.

    Hemant K Collette
    http://hemantoracledba.blogspot.com

  • You will return the "Select an element in the page" button right in Inspector?

    The 'select an element on the page' is to the extreme left now. Since ver.32 FF. As seen in this image:
    https://MDN.mozillademos.org/files/8315/Inspector-select-element-fx32.PNG
    Change for the worse in my opinion. You will return it right into the next version? Thank you.

    N ° it is always on the far left in the current construction of 35.0a1 of Firefox.

    All Toolbox items are on the far right, including the gear button options to define what items to display.

  • To move a page item value in another element of the page

    I have page 1 and page 2, page 1 to an element name is name: _ and page 2 has an element name is your name _. How to pass the First Name of the element value in your name point.

    Please suggest me

    one way can be branch

    https://Apex.Oracle.com/pls/Apex/f?p=57481:22:8403002623920:no:

    WORKSPACE:-REEMATEST

    username:-test

    password:-test

    Page 22

  • Using the page submit after elements in the process of treatment page

    Hi all

    I have a form of DML in which the user can update a column.

    After clicking the Apply Changes button that I need to send an email saying the record has been updated with some page elements in the body of the email.

    I am able to send email, but I'm not able to display the page elements in the body.

    After changing the save the session state for the 'yes' also he did not.

    Y at - it another option that must be set so that I can use the page elements in the body of the email.

    Thank you

    MJ

    Make sure that after settlement it is normally a reset page call, is perhaps what kills the variables you are trying to access.  You should put your mail send processes PRIOR to the reset page process...

    Thank you

    Tony Miller
    Los Alamos, NM

  • APEX 5 - missing values in link for the PAGE that is modal if it has used some PAGE ELEMENTS in the VALUE of the

    Hi Experts,

    There is a problem in the APEX when I open a modal page-> submit modal page and refresh parent region (report one).

    When I first open a report from the region and click the modal page, everything is ok:

    Modal page values are defined in the sense of link that open to it.

    Submit after modal page by button (there is a process of dialogue), the dialog box is closed. On the parent page, there is a DA - dialogue close report parent refresh.

    After update - waiting indicator is indicated - all the element referenced in the link to open modal values are defined as empty values.

    Is there a problem in the links when I use it it set the values of the elements of the page? (not report items)

    I reproduced the problem on apex.oracle.com:

    https://Apex.Oracle.com/pls/Apex/f?p=16502:9

    user/pass: demo/demo

    "Just check the link in 1 region report-#OPEN_MODAL" report item. You can check the link with the appropriate values.

    After opening modal, simply click on the button. Dialog box is closed and updated in the region. Check the link again. Link is not valid because the values are empty. (screenshots above)

    concerning

    J

    Hi Jozef,

    the values of your page P9_NEW1 - P9_NEW5 items are not in persistent session state, they are only available in memory at the time when the page is rendered. Every time when you want to refer to an element in your report, and no matter if it is in the report SQL statement or as a substitution in a link, it must present the server as part of the "Refresh" / AJAX call so that the server can initialize this session state and you are able to reference it. You can do this by setting "Page elements must send" your report. In your case, you must set it to P9_NEW1, P9_NEW2, P9_NEW3, P9_NEW4, P9_NEW5. See the example updated, you provided.

    Concerning

    Patrick

  • Branch of the page pass nulls to the elements on the page

    I have a branch of the page that is supposed to pass a value to a page element to another, but what I find is that it is passing a null value.  "I have the field 'Defined these elements' as 'P10_ID' and the ' with these values as ' & P3_ID. ' (without the single quotes).

    The url redirects to the right page, but this is what it looks like:

    ' f ? p = 259:10:7766556198967978:NO:P10_ID:'

    P3_ID is a page element hidden with the source as "Always replace the value that exists in the session state" and the Type of Source as "database column".

    Anyone had problems using branches to move page elements?  I use Apex 4.1.0.00.32

    Thank you

    -Steve

    switbeck wrote:

    I have a branch of the page that is supposed to pass a value to a page element to another, but what I find is that it is passing a null value.  I have the field 'Defined these elements' as 'P10_ID' and the ' with these values, defined as '& P3_ID' (without the single quotes).

    The url redirects to the right page, but this is what it looks like:

    ' f ? p = 259:10:7766556198967978: NO::P10_ID:'

    P3_ID is a page element hidden with the source as "Always replace the value that exists in the session state" and the Type of Source as "database column".

    Anyone had problems using branches to move page elements?  I use Apex 4.1.0.00.32

    It seems that P3_ID doesn't have a value in session state when the branch occurs. It is not clear from the foregoing if this branch is on page 3 or elsewhere. Please describe the treatment more in detail. Search for process/branch settings to clear the Cache and use traces of debug on the affected pages to check for changes in the value of P3_ID.

  • ﷯Error - error message: an element on the page "News" at location 33 642 requires the pixelation, but is too large to rasterize. Resize it smaller and try again... I can't fix this or find that the line number.  How can I find this line?

    ﷯Error - error message: an element on the page "News" at location 33 642 requires the pixelation, but is too large to rasterize. Resize it smaller and try again... I can't fix this or find that the line number.  How can I find this line?

    I don't know why it worked, but I changed the police and was able to download Web site.  Thanks for your help!

  • Session-&gt; display-&gt; State of Session-&gt; displays the elements of the page

    Hello!

    I'm currently running Application Express 4.2.5.00.08 on Debian.

    If click on Session-> display-> there is no Session State page element.

    If I connect to the database as sys and I run the following command:

    Select nom_element, component_comment

    apex_util.get_session_state (item_name) session_value

    of apex_application_page_items

    where application_id = 500;

    all my Articles page are displayed but not their values.

    What do I need to configure something in the APEX?

    Thanks for any help!

    Gerhard

    gerhard2001 wrote:

    I'm currently running Application Express 4.2.5.00.08 on Debian.

    If click on Session-> view-> Session State contains no items of the current page.

    Page elements have any value in session state to the point that do you? Note that the time with null values are not displayed, and point values defined by using properties of the Source item or by default during the page see the transformation come not in session state until the page is sent.

  • IN PHOTOSHOP ELEMENTS 13 HOW CREATE A VIRGIN PAGE ON WHICH PASTE THE RESULT TO DO A PRINT SCREEN?

    IN PHOTOSHOP ELEMENTS 13 HOW CREATE A VIRGIN PAGE ON WHICH PASTE THE RESULT TO DO A PRINT SCREEN?

    The editor > file > new > Blank File

  • How to display decimal numbers with elements of the page?

    Hey everybody,

    I work with APEX 4.2. I have a page with an element (element of the page displayed in the text field).

    This point of displays the values the database. If the value in the database is "0.5" item only shows that ", 5" instead of "0.5".

    I tried it already as digital point. Can someone help me?

    Your article is using data column?

    Otherwise, data recovery process:

    Select to_char (number_value, '990.0')

    in: point

    table;

  • APEX dynamic action - how to hide an element after the loading of the page

    Hello

    I have a form with the element Type, lesson and page.   I want to create a dynamic as action ' on page load "If Type = x don't then see the lesson and the elements of the page. .

    How can I know if Type = x don't see the lesson and the page. It does not show them.

    Please note the dynamic, action = Page load event

    Thank you

    Try adding

    When the Condition "Javascript expression."

    Value: $v ('P1_TYPE') == 'x')

  • A page element to the 'CALENDAR' page instead of 34 488 requires pixelation, but it is too large to rasterize. Resize it smaller and try again

    I get this error message,

    A page element to the 'CALENDAR' page instead of 34 488 requires pixelation, but it is too large to rasterize. Resize it smaller and try again

    This basically means that there is an object that has its upper left corner at x: 34 y: 488 which is too large to be rasterized, it could be due to any extreme wide or tall object.

    Try to check the contents of the page and then resize to verify the behavior. Please let me know how it goes.

    Thank you

    Sanjit

Maybe you are looking for