AJAX and Read-Only Items

I used the examples from Carl Backstrom and Denes Kubicek to get my cascading select list working.
I have two select list fields (Origin and Type) that I use to determine the data to appear in a third select list field (Customer).
With help from people on this forum I was able to get things to work.
Now I have an issue when I conditionally make the Origin field "read-only".
When this occurs, data appears in my "Customer" select list on the INITIAL display of the form.
However, when I change the value in the "Type" select list field, no data appears in the Customer select list.
If I change the "Origin" field to NOT be read-only, I can change the value in the "Type" select list field and everything works OK.
I hope I have given enough information.
THANKS in advance.
Raymond

Raymond,
It looks like read-only select is really special:
(I replaced < > with [])
When select is not read-only generated html is:
[select name="p_t01" size="1" id="P1_ORIGIN_NO"
onchange="get_AJAX_SELECT_XML('P1_ORIGIN_NO','P1_DISPLAY_SSA','','','P1_CUSTOMER','CASCADING_CUSTOMER_LOV')";
[option value="%null%"]%[option]
[option selected="selected" value="001"]DOTIKI MINE[option]
[option value="S01"]ECO COAL PELLETIZATION NO. 12, LLC[option]
[select]
It means that P1_ORIGIN_NO in  get_AJAX_SELECT_XML will be "001"
But when select is read-only your html code is:
[input type="hidden" name="p_t01" value="001" /]
[span id="P2_ORIGIN_NO"
onchange=
"get_AJAX_SELECT_XML('P2_ORIGIN_NO','P2_DISPLAY_SSA','','','P2_CUSTOMER','CASCADING_CUSTOMER_LOV')";
DOTIKI MINE
[span]
[pre]
P2_ORIGIN_NO in  get_AJAX_SELECT_XML will be "DOTIKI MINE" which I think is wrong.
It looks like for read-only you need hidden item with code of
drop - down list or somehow you have to reach [input type="hidden" name="p_t01" value="001" /]
Lev
Message was edited by:
        le                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Session state protection and read-only items

    I have a requirement to create a report + form for a database table. In the form, there is mandatory database column that needs to be displayed but it should be read-only and its value derived using values entered elsewhere on the screen.
    It tried Display Only, Read Only and Disabled but they either fall foul of session state protection violation or ORA-01400: cannot insert NULL. The best method that I've found was to add readonly="readonly" the item element, but this causes the input item to lose its APEX classes and I'd prefer a declarative solution anyway.
    Anyone know the best approach?
    I've created a DEMO - http://apex.oracle.com/pls/apex/f?p=READONLY - which demonstrates the 4 methods.
    Edited by: KGelling on 17-May-2012 06:10

    KGelling wrote:
    The best method that I've found was to add readonly="readonly" the item element, but this causes the input item to lose its APEX classes and I'd prefer a declarative solution anyway.Looks like a bug to me. However a possible explanation/justification for this behaviour is that the HTML Form Element Attributes are often used to specify a custom class for the item, so the default class is removed to prevent any conflicts. IMO APEX needs to provide declarative support for the use of multiple, space-separated class values in page, region, item etc attributes.
    As a workaround in this case, just include the class in the HTML Form Element Attributes:
    class="number_field" readonly="readonly"
    I've created a DEMO - http://apex.oracle.com/pls/apex/f?p=READONLY - which demonstrates the 4 methods.
    Thanks for making the effort.

  • Defaulting Values and Read-Only Items?

    Hi All,
    Brand new to APEX and trying to think of ways to get a few things working for me hoping you might have some suggestions.
    1. Want to have a few items default upon the creation of a record.
    - Created Date - have a column/page item that I would like to default/auto populate with the current date
    - Create by - would like to have column/page item default with the login id of the user
    2. Dynamically make page/items read-only.
    - Once a record is created I would like to ensure that the only person able to edit the record would be the creator. I assume I can use the Read Only feature at the item level but am unsure of the syntax to use to make the item read-only for only the user who created/or is creating the record. Since I would like to be defaulting the "Create by" (see question 1) column to the login id of the user this should be plausible just not sure of the syntax to reference the current user id.
    3. Passing a value to to bind variable.
    - I have build a basic page with an Interactive Report and have made one of the columns in the Interactive report 'linkable' which launches a BI Publisher report by calling a Report Query. Currently in my report query I have hard coded a value in the SQL statements where clause to prove the theory works what I am struggling with is a declarative way to pass the value that I am clicking to a bind variable in my SQL statements where clause in the query.
    Thanks in advance for any suggestions and appreciate your patience with an APEX newbie .. about 2 days old at this juncture. The more specific you can be on what to do and where to go is greatly appreciated.
    For those interested in have greater control with your report layout BI Publisher looks to be a great options. I was able to getting by reviewing [how to document:|http://www.oracle.com/technology/products/database/application_express/howtos/howto_master_detail_pdf.html] on OTN. My challenge some in the fact that rather then simply being on the exact row that I want reported on I would like to simply click on a link in a list and pass that value as the bind variable.
    JES

    Hi -
    "1. Want to have a few items default upon the creation of a record."
    This is typically done in a trigger at the db level.
    CREATE OR REPLACE TRIGGER mytrigger
    BEFORE INSERT OR UPDATE
    ON mytable
    REFERENCING NEW AS new OLD AS old
    FOR EACH ROW
    BEGIN
      if (:new.CREATED_DATE is null)
        then
          :new.CREATED_DATE := sysdate;
        end if;
      if (:new.CREATED_USER is null)
        then
          :new.CREATED_USER := nvl(v('APP_USER'),user);
        end if;
      :new.UPDATED_DATE := sysdate;
      :new.UPDATED_USER := nvl(v('APP_USER'),user);
    END CREATE OR REPLACE TRIGGER mytrigger;"2. Dynamically make page/items read-only."
    See 'APP_USER' in the Apex docs...
    "3. Passing a value to to bind variable."
    This is done in the report configuration in the Apex UI...
    Session State Include application and session information.
    You might want to consider reviewing some of the Apex docs and tutorials, I recommend this:
    [http://download.oracle.com/docs/cd/E14373_01/appdev.32/e13367/toc.htm]
    Good luck.

  • Possible to make an item editable for certain users and read only for other

    Is it possible to make an item editable for certain users and read only for others?
    I've been able to accomplish this by taken the select statement that I used to define an authorization scheme, placing it in the Read Only condition of the item. However, I would like to simply reference the authorization scheme to utilize caching, and to help keep things cleaner for future maintenance.
    Is it possible to reference an authorization scheme in an item condition similar to the way another item can be referenced by preceding it with a colon (i.e. :P1_First_Name)?

    Thank you, your suggestion worked.
    It would be nice on a future release of APEX if a drop-down box existed under the Ready Only section that would allow an existing Authorization Scheme to be selected or negated when applying the Read Only attribute to a form item.

  • Read only item populated by dynamic LOV

    Since I'm using artificial keys in most of my table FKs, I need to use a lot of LOVs to provide the user with discernible data.
    Many of the columns I use an LOV for I need to be read only items. However, whenever I use a dynamic LOV, I do not see how to make it read only. It sets the value of the item to [].
    I know this can be accomplished in some cases with a join in the underlying query. However, many of the pages where I need to make this change are not based on a query.
    Is there a way to make an item populated by an LOV read only while still retaining the value?
    Thanks for your help!
    -Reid

    I'm using apex 3.2.1. Your testing and replies have helped me realize that the problem is that the column indeed did not have a value. When I had the item "display as" set to "select list" the LOV was also setup for allow NULL=NO. Thus, it was showing some value in the LOV in that item. But, when I switched to the "display as text" and set the always read only, then it gave the double brackets []. When I changed the allow NULL=YES, it worked fine and gave me a blank value.
    Thanks again!
    -Reid

  • How can I download my issues with Reader's Digest when each time a pop appears and reads " the item you tried to buy is no longer available"?

    I can no longer download my purchased Reader's Digest magazine since August as it requires updating the RD app. So when i try to download the RD app a pop up appears and reads " the item you tried to buy is no longer available". What does this mean and what do I do? I have 2 pending reader's digest issues that needs to be downloaded.

    I don't have an answer for you but it may help to have a look at the "More Like This" section at the far right of this page. Reading those additional threads may get you some idea of the actual issue and how to resolve it. It could be that problems were found with the app and it was temporarily pulled for some reason which may be the reason for the "the item you tried to buy is no longer available" message.

  • Crashes and read-only file systems

    Notice: I apolgize for the long post, I've tried to be as thorough as possible.  I have searched everywhere for possible solutions, but things I've found end up being temporary workarounds or don't apply to my situation.  Any help, even as simple as, "have you checked out XYZ log, it's hidden here", would be greatly appreciated.  Thanks
    I'm not sure what exactly caused the issues below, but they did start to happen within a day of running pacman -Syu.  I hadn't run that since I first installed Arch on December 2nd of this year.
    Setup:
    Thinkpad 2436CTO
    UEFI/GPT
    SSD drive
    Partitions: UEFISYS, Boot, LVM
    The LVM is encrypted and is broken up as: /root, /var, /usr, /tmp, /home
    All LVM file systems are EXT4 (used to have /var and /tmp as ReiserFS)
    The first sign that something was wrong was gnome freezing.  Gnome would then crash and I'd get booted back to the shell with all filesystems mounted as read-only.  I started having the same issues as this OP:
    https://bbs.archlinux.org/viewtopic.php?id=150704
    At the time, I had /var and /tmp as ReiserFS, and would also get reiserfs_read_locked_inode errors.
    When shutting down (even during non-crashed sessions) I would notice this during shutdown:
    Failed unmounting /var
    Failed unmounting /usr
    Followed by a ton of these:
    device-mapper: remove ioctl on <my LVM group> failed: Device or resource busy
    Nother of these errors had ever appeared before.
    After hours of looking for solutions (and not finding any that worked) I was convinced (without any proof) that my Reiser file systems were corrupt and so I reformatted my entire SSD and started anew - not the Arch way, I know   I set all logical volumes as EXT4.
    After started anew, I noticed
    device-mapper: remove ioctl on LVM_SysGroup failed: Device or resource busy
    was still showing up, even with just a stock Arch setup (maybe even when powering off via Arch install ISO, don't remember).  After a lot of searching, I found that most people judged it a harmless error, so I ignored it and continued setting up Arch.
    I set up Gnome and a basic LAMP server, and everything seemed to work for a couple of hours.  Soon after, I got the same old issues back.  The System-journald issue came back and per the workaround on https://bbs.archlinux.org/viewtopic.php?id=150704 and a couple other places, I rotated the journals and stopped journald from saving to storage.  That seemed to stop THOSE errors from at least overwhelming the shell, but I would still get screen freezes, crashes, and read-only file systems.
    I had to force the laptop to power off, since poweroff/reboot/halt commands weren't working (would get errors regarding the filesystems mounted as read-only).
    I utilized all disk checking functions possible.  From running the tests (SMART test included) that came as part of my laptop's BIOS to full blown fsck.  All tests showed the drive was working fine, and Fsck would show everything was either clean, or
    Clearing orphaned inode ## (uid=89, gid=89, mode=0100600, size=###
    Free blocks count wrong (###, counted=###)
    Which I would opt to fix.  Nothing serious, though.
    I could safely boot back into Arch and use the system fine until the system decides to freeze/crash and do the above all over again.
    The sure way of recreating this for me is to run a cron job on a local site I'm developing. After a brief screen freeze (mouse still moveable but everything is otherwise unreponsive) I'll systemctl status mysqld.service and notice that mysqld went down.
    It seems that it's at this point my file systems are mounted as read only, as trying to do virtually anything results in:
    unable to open /var/db/sudo/...: Read-only file system
    After some time, X/Gnome crashes and I get sent back to shell with
    ERROR: file_stream_metrics.cc(37)
    RecordFileError() err = 30 source = 1 record = 0
    Server terminated successfully (0)
    Closing log file.or_delegate.h(30)] sqlite erro1, errno 0: SQL logic error or missing database[1157:1179
    rm: cannot remove '/tmp/serverauth.teuroEBhtl': Read-only file system
    Before all this happened, I was using Arch just fine for a few weeks.  I wiped the drives and started anew, and this still happens with just the minimal number of packages installed.
    I've searched for solutions to each individual problem, but come across a hack that doesn't solve anything (like turning off storing logs for journal), or the solution doesn't apply to my case.
    At this point, I'm so overwhelmed I'm not even sure where exactly to pick up figuring this issue out.
    Thanks in advance for any help

    Did this occur when you booted from the live/install media?
    What is your current set up? That is, partitions, filesystems etc. I take it you have not yet reinstalled X but are in the default CLI following installation?
    If turning off log storage didn't help, reenable it so that you may at least stand a chance of finding something useful.
    What services, if any, are you running? What non-default daemons etc.?
    Does it happen if you keep the machine off line?
    Have you done pacman -Syu since installation and dealt with any *.pacnew files?
    Last edited by cfr (2012-12-26 22:17:57)

  • How to use same view as editable and read only in ADF

    Hi,
    how to use same view as editable and read only in ADF ?? How can we achieve this in TF's ???
    -mrudul

    Hi,
    Steven Davelaar wrote a presentation about this "Building Highly Reusable Taskflows"
    Starting slide 14 is where your use case comes into play
    Frank

  • Missing "illustrations" tab and read-only information

    After a Windows XP Home repair, no illustration tab and read-only information by new music downloads. Have most recent itunes. Can someone help me...please?

    Thanks Gilad, In that case, is there then a way (via a script) that if I leave field 2 as not readonly, so the cursor moves into this field on tab out of field one, that I can reject any input from the user, if field one does not contain any data ? I thought this might be a solution. I have the script with the If Else statement, that sets the value of field 2 to "", if the value of field 1 is also "", but what is the else statement required to accept the value, if the content of field 1 is not "" ?.
    The script preoduces an error, if field 1 is blank, and I try to enter data into field 2 and then tab out of field.

  • Can't mount USB disk with the atribute of  fix and read-only

    Hello All,
    I have a usb disk which is set as fix(non-removalbe) and read-only. I tried to connect it to Macbook version 10.4.11 ,but it failed to mount the disk. However, connecting to 10.5.X and windows XP work fine. I am wondering is it a bug specifically in 10.4.11 only ? Could I get any patch for this problem ?
    Thanks,
    Ying

    HI Ying and Welcome to Apple Discussions ...
    Try repairing disk permissions.
    Quit any open applications/programs. Launch Disk Utility. (Applications/Utilities) Select MacintoshHD in the panel on the left, select the FirstAid tab. Click: Repair Disk Permissions. When it's finished from the Menu Bar, Quit Disk Utility and restart your Mac.
    Carolyn

  • Editable and Read-Only Date Picker have different display formats -- Bug?

    Hi all,
    This is a follow on to a previous posting about getting a Date Picker field to display read-only (Date Picker and Read-Only Condition works on LAST state of element
    Now past that hurdle, I have noticed something about the date picker field when it is displays read-only. Namely, the date format is not the format selected, nor does the read-only date format comply with the format mask in the source section.
    I've modified my small test app to work as intended in order to demonstrate this feature. I also opened it up so everyone can see it <blush>. You can find it here: http://htmldb.oracle.com/pls/otn/f?p=42513: Please navigate to the Update Project tab.
    When a project in Program One through Four is selected (which has a Spec Committed date), the date is displayed DD-MON-YY format. When a project the other Programs (which do not have Spec Committed dates at the time of this writing) are selected, and a date value selected with the date picker, the date is displayed in the anticipated DD-MON-YYYY format.
    Anyone else notice this, or have I just missed something obvious?
    Thanks,
    Petie

    I'm not sure why this happens but to work around it I added this before header process code to the page:
    execute immediate 'alter session set nls_date_format = ''DD-MON-YYYY''';
    Scott

  • Stuck on ISW installation step - Config of other master and Read only

    I'm trying to figure out how to complete one of the last steps for my isw install. Stuck on this step:
    Configure the Sun Directory Server plugin on every other master and read-only replica that manage users under o=myorganization.

    2011 Macs do not have a PPC processor.   They have an Intel processor.  Apple menu -> System Preferences -> Energy Saver allows you to modify the sleep settings.
    Is your data backed up?

  • Are 'read only' items causing my automatic row processing to fail?

    I have a form that uses automatic row processing to update my table.
    I recently had to add a check to lock down the fields using the read only condition where a record has been 'approved'. So, I turned off all of the fields and hid the update button.
    Now they want me to check to see if the user is a manager, and if so, allow them to see the update button, and make a single field on the form modifiable.
    I have the user identified as a manager, and can make the field accept the change (a yes/no combo box). Yet when they click the update button, the form just sits there. A branch is supposed to fire on hitting that button, taking them back to the previous report, but it doesn't happen. The source of the combo box in question uses a column on the table, and works fine when the form has all of the fields showing for modification.
    I had some validations that I finally set to never fire, thinking that they were failing and just not giving the error messages. I know a bad sql or pl/sql atatement in a validation will cause the form to just keep sitting there doing nothing, and thought it might help.
    Several of the various fields are combo boxes, several are text boxes.
    I'm stumped.
    Shall I keep the regular update button hidden whether it is a manager or not (because it has been 'approved'), and enable a new button that fires off a process to update the one field that the manager may want to change? Does making a field 'read only' always have a detrimental effect on the auto processes I've been counting on? Is that if fact what is happening now?
    Thanks in advance for any advice or comments on this.
    Clayton

    Hi, Scott.
    My version is 3.0.0.00.20
    I have received info to set up the application, though I have not activated it as yet. I'm reluctant to try to load up the various tables to make it work. It could be done.
    My workaround is to that the user (a manager) fires off to another form to show an individual record, and ask if he/she really wants to make this change. On submit, they will be taken back to the original locked down form, and I will update the single field in that process of returning them. This will actually be a plus, in that I expect to show them all of the 'duplicate' entries for that item, and show them that by 'activating' this particular item, they will 'deactivate' the one duplicate that is currently active. Or, if they are deactivating the sole item that is active, that there will in fact be no active items in the system. Convoluted as heck, but they swear this is how they've been doing business with their briefcases and file cabinets of Excel files. I'm surprise they even float at this point (these are ships we're talking about).
    This all may be due to the form originally having a next/previous/count process once arrived at my clicking on the edit button of the report of items. All of that has been hidden away, and though the fields exist of the form, they are not used. They only see the current item that they clicked on from the report.
    I read up a little on session state, as well as posts with the debug error I was getting. I'm still not on board with the whole issue of 'state'. Items stay as they are until they're changed, no? I suppose that sounds simplistic.
    One of the things that caught my eye was several combo box lists that on read only mode, showed [] square brackets. Which, in some cases is okay.
    What I'll try to do is set up a public application - for future use if nothing else. I'm going to be working on this for awhile. I have more than a bit of work to do to cleanse the data as well as get rid of the single sign on requirement (I'll assume that I should have to do this) in order to share the app.
    I know you're expecting me to have this up and running for you to look at, but I'm under the gun. And they actually like my workaround.
    I'll keep everybody informed, one way or another.
    Clayton

  • Can I suppress HTML escaping in a read-only item?

    I have an item that is displayed as read-only. The item contains HTML markup. HTML DB seems to automatically escape special characters in the item value.
    Is there a way to suppress this?
    For example, I have a text input item with the value:
    &lt;b&gt;Hello&lt;/b&gt;
    (that is, it contains the bold elements which I want to output as is).
    HTML DB seems to be escaping the item value so I see the bold elements in the browser and what I see in the page source is: &amp;lt;b&amp;gt;Hello&amp;lt;/b&amp;gt;
    There doesn't seem to be "escape special characters" / "don't escape special characters" options for read-only mode like there is for "Display As Text" items. Can anyone suggest a workaround?
    Thanks,
    Eric

    Eric - Text input items are escaped on output whether they are read-only or not. But to answer your question generally, APEX does not emit input items of any type to the browser without escaping them unless there is a guarantee that they have been escaped on input, e.g., when passed in through the URL, or that they acquired their value from within the application. These guarantees apply only to non-POSTable item types such as Display As Text (does not save state) items and a couple others. So in short, we observe the rule (which should be observed by app developers) that it is never safe (from an XSS-protection standpoint) to emit a POSTable item without escaping it first.
    In your case, can you define a safe item type (Display as Text, does not save state) and set its source to the markup-containing item that you are now displaying as read-only? If so, you can conditionally display only the safe one and hide the other.
    Scott

  • Two questions: Event on a Date Picker and Read Only on a full page?

    Hello,
    I make use of this very informative board to develop an application but i have been unable to find info on these two topics. Sorry if it has been already discussed extensively.
    Using HTMLDB 2.2 for now.
    =>First question:
    I have a date picker item with an event
    onChange="resaStatusChange();"
    in the HTML Form Element Attribute field.
    The event is triggerring if i put a new data in the field but does not trigger if i use the picker.
    Is it a standart behaviour? Is there a way to trigger the event when new data is provided through the date picker?
    => Second question:
    One page in my application has to be used either to only display information or as a mixed displaying/entering data sheet.
    When the context is appropriate to use the page as a simple display (testing both global authorization and data to be displayed), is there a way to put a read only attribute on the full page instead of putting the read only conditions through each and every item of the page?
    Sorry if the questions are not clear and apologize for what should be newbie questions.
    Any link or info will be appreciated.
    Regards,
    Daniel Gureghian

    Hi Daniel,
    I'm not sure about your first question, but I can hopefully give you a helpfull answer for your second one.
    I'm handling it this way:
    var elInput = document.getElementsByTagName('input');
    var elTextArea = document.getElementsByTagName('textarea');
    var elSelect = document.getElementsByTagName('select');
    for (i = 0; i < elInput.length; i++)
      setReadOnly(elInput, true);
    for (i = 0; i < elTextArea.length; i++)
    setReadOnly(elTextArea[i], true);
    for (i = 0; i < elSelect.length; i++)
    setReadOnly(elSelect[i], true);
    function setReadOnly(pThis, pRead)
         if (pThis && pRead)
              pThis.disabled = pRead;
              pThis.style.emptyCells = "show";
              pThis.style.color = "black";
              pThis.style.backgroundColor = "#DDDDDD";
         else if (pThis && !pRead)
              pThis.disabled = pRead;
              pThis.style.emptyCells = "show";
              pThis.style.color = "black";
              pThis.style.backgroundColor = "#FFFFFF";
    I never used it on a whole page, only for regions. So maybe you have to make some changes.
    chrissy

Maybe you are looking for

  • LiveCycle Designer 8.0 - Submitting .pdf via E-mail

    Hi all, I've been working on this form for months now. I know this topic has been started a thousand times already, but after weeks of experimenting with the javascript functions I am losing my patience. My form needs a "Submit" button that does the

  • PDF forms won't open. Says Adobe Reader blocked for this site

    In last few days, when I click on link to a PDF document, I get a new tab, but a black message saying Adobe Reader blocked for the site. I've installed, and agreed end user; but nothing changes.

  • The CER number (Capital Expenditure Requirement) number is not mentioned in

    The CER number (Capital Expenditure Requirement) number is not mentioned in PR. It needs to be mentioned for capturing audit trail.

  • Package Run Prompts For Connection Information

    I've just loaded up Version 1.5.0.53 (my first version of 1.5), and I observed that when I try to run or debug a package, I'm prompted for connection information. The package works fine when I fill in the credentials. Is this expected behavior? I bel

  • E 63 Wirelesss LAN

    What is meant my Wireless LAN? I bought Nokia E 63 Phone having Wireless LAN option. i asked my Org IT Dept Team to configure the Settings, they put the settings for my phone as: Ip4&Ip6 : Automatic DNS(Primary& Secondary): Automatic Port :0 WPA Publ