Read Only page

Hi,
Is there a way to make all the fields in a page read only - say based on a variable input from a task flow? I don't want to check for this variable in all the fields. Is there a way to achieve at top level?
I am using Jdev 12.1.2
Thanks
Uma

You could probably try to write a recursive function which sets the readonly property programmatically and call that from wherever you want.
I have not tried, but you could probably try it. Sample code :
    private void setInputItemsReadOnly(AdfFacesContext adfFacesContext, 
                                     UIComponent component){ 
       List<UIComponent> items = component.getChildren(); 
       for ( UIComponent item : items ) { 
           setInputItemsReadOnly(adfFacesContext,item); 
           if ( item instanceof RichInputText  ) { 
               RichInputText input = (RichInputText)item; 
               if ( !input.isDisabled() ) { 
                   input.setReadOnly(true) ; 
                   adfFacesContext.addPartialTarget(input); 
           } else if ( item instanceof RichInputDate ) { 
               RichInputDate input = (RichInputDate)item; 
               if ( !input.isDisabled() ) { 
                   input.setReadOnly(true) ; 
                   adfFacesContext.addPartialTarget(input); 
Not tested.
Created the above code by copying the resetValueInputItems() method from the below link :
Java / Oracle SOA blog: Some handy code for backing beans ( ADF & JSF )
Cheers
AJ

Similar Messages

  • Creating a read only page

    Say I have a page with 80 items on it. Is there any way to make the page/regions read-only instead of doing it by individual items. I've search the forum and it looks like it is by item only. Has anyone come up with a workaround or now of a solution that they are willing to share.
    I'm using version 2.0.0.00.49 with IE 6.0
    Thanks,
    Derek

    Derek - Check out this wizard: Create Page > Form > Summary Page. It isn't exactly what you asked for but you might be able to use it.
    Scott

  • Read only page level attribute

    Are there any plans to add a 'Read only' conditional attribute at the page level. It would save a lot of time if a page level read only attribute was available which was overrriden at the item level.
    The page level attribute would allow a page with lots of items to be rendered read only at the click of one option rather than having to go through each item on the page. (It would also be nice to be able to programatically set this via a function call)

    i know you can do this at the item level. Lets say you have 50 items on a page and you want to set the same condition for making each item read only. It would be a little tedious to have to go into each item to do this. Whereas a page level attribute would cascade down, being overrriden by the item level setting if a few of the items had different conditions or were not to be made read only.
    just think it would be a nice to have feature

  • Read Only page/region attribute - Tabular form

    APEX 4.2.1/Oracle 11.1
    The new readonly attribute at the page and region level works very nicely to make a page readonly without having to set the readonly condition individually on each page item. Great job.
    But I noticed that tabular form inputs don't honor this setting. Is there a easy way to make a tabular form readonly as well i.e. make it look like a classic report instead of showing input (even disabled) fields?
    I guess we can clone the region as a classic report region and conditionally show one or the other but that's not ideal from a maintenance perspective.
    Thanks

    Marc - Thanks for logging the enhancement request. Couple of observations
    1. The Copy Region wizard allows us to copy a tabular form region (along with its associated processes and buttons) but running the page raises errors since APEX only allows one tabular form per page. Perhaps the Copy Region wizard should check for this
    2. Most tabular form regions are customized after the wizard creates them. Column headings are changed, display types, number/date formats, column links, etc. Re-doing all this to create a copy of the tabular form region as a classic report region is a bit of a chore. Maybe you can think of a easier way to do this in 5.0. Really all that needs to happen is change the Display As for all the tabular form INPUT fields to Display as Text and preserve all other customizations.
    Thanks

  • CFLock, Read-Only Issues

    I am trying to make edits to a previously read-only page. I
    have added some queries and when I run the page, the queries are
    not run. I have put the queries in a try/catch block and again, not
    run. I have even put in random test (i.e. 'asdfasdf') hoping to see
    it when I run the page; nothing. Maybe the page is cached or
    something? I restarted CF services, but that still didn't help.
    It's CF4.5, so maybe there are page caching issues?
    Sorry for all the code, but the things I added are the
    'asdfasdfasdf' after the InsertConsultant query, and I also added
    the get_event_type query and catch try block. Thanks for any
    help!

    are there still people using cf4.5? man give me some poison
    now please! I think cf5 should be banned and if you are still using
    4.5 then you probably live in Darfur or something and I would
    recommend php as it is free and facebook uses it so it must be
    alright!! (hint hint adobe sort it out and make it free you are
    leaving us developers out to dry here!!)

  • Tabular Form Read Only Date Picker

    Hello,
    I have two or three Items with date pickers and do not want to implement
    this code because it will be too many buttons on my form. I need to clear one item
    at a time when the datepicker is readonly but, in a tabular form.
    function f_clear_items()
        {$x('P1_ITEMA').value = ''};
        {$x('P1_ITEMB').value = ''};
        }Then once I create a url button and pass this function I can clear the datepicker's. But, I
    was wondering is there a cleaner way to this.
    I have other items on the page that are named the same but, in different tables. I only want
    to clear each date picker item at a time. This code works fine for a regular form.
    -Element Post Element Text for the Item to Clear
    a href="javascript:setValue('P1_ITEMA','');">Clear Date</aThere is a thread named 'How to clear a read only page Item...?' that states how this code works but, does not
    work for a tabular form in a Master Detail page. There is a link on side the Date Picker to clear item specified but, in a tabular form Item, there is no Element tab, any ideas on how to clear a readonly date picker item using a tabular form
    and not using a button for each item, thanks in advance. I am using Application Express 3.2.0.00.27.

    Dan,
    I totally understand your point of view. So, this tabular form aspect was not tested once the Clear Date link was discovered to clear a Read Only date field. Yes, using a button to clear a date is great but, I do not want to clear every date or specified item with the click of one button for this application. It is very useful but, not for my needs at the moment.
    Basically, if a date is selected and it needs to be cleared out you can just delete the value. But, if the date is readonly you can not clear/delete the date value unless you have the Clearing functionality for a particular item using the datepicker. It may not be worth the trouble Dan like you state by adding this extra code to the calender. If an invalid date is entered an error will appear anyway.
    Thanks alot Dan for expanding my mind and showing me some JQuery and providing me with this link to do some further research if needed, thanks again.

  • 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

  • How to make an assignment block in an overview page read only

    Hi Experts,
    We have the following requirement:
    In Campaign overview page we need to make the Partner and Product assignment block read only.
    Can this be achieved through coding or through configuration?
    Please give detail steps for the appropriate approach.
    Thanks in advance.
    Regards,
    Sayan

    Hi Leon,
    Is there any authorization group which can be customized to take care of this situation?
    For Product Assignment block in DO_PREPARE_OUTPUT method of class CL_CPGOE_AB_OVELPRODUCTS_IMPL (Component : CPGOE_ABLOCKS :: View : OVELProducts) it is checking some authority. Any pointers where those authorities are maintained will be helpful.
    Creating a new configuration is not helping as the views are 'Table View'.
    We are looking for an approach which will avoid coding or involve minimum coding.
    Regards,
    Sayan

  • Querying up AR Customer OA page in read-only mode for a Single Customer

    We are building a Custom Form in which associated Customer <defined in AR> would be queried up.
    Now we want to give an option to the User to view the complete details of the Customer. We would be giving a menu option in Tools 'View Customer' thru which he would see the Full Customer Details. <AR Customer OA page>
    We have two requirements
    1> The Full Customer Details should show up in Standard OA Customer Page the moment page comes up. The user should not be required to query the details.
    2> It should be read-only and user should not be able to update any field.
    How can we achieve this requirement? I did some RnD but did not see any place in EBS where we display the Customer Page in read-only mode and that too quried up for one particular customer.
    Thanks
    Arun

    Hi Arun,
    Please let me know if find any solution for this. We have a similar scenario in which we need to call the customer Page with all the inforamtion populated, related to one customer.
    Thanks in advance,
    Mannuru

  • Making Period Start Date read-only on Appraisal page

    Hi,
    I have a requirement to default Appraisal Period Start Date and Period End Date and make these fields non-editable. I am able to default the values for these fields by extending CO. When I make these fields read-only and performs any operation on page, getting error
    +'You must enter a value for Period Start Date as criteria for the List Of Values.'+
    Please suggest a solution to resolve this error.
    Thanks.
    Edited by: user12037955 on May 12, 2011 9:26 PM

    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    java.util.Date dateValue1 = null;
    java.util.Date dateValue2 = null;
    java.util.Date date = null;
    OAApplicationModule oaapplicationmodule = pageContext.getApplicationModule(webBean);
    OAMessageDateFieldBean bean1=(OAMessageDateFieldBean)webBean.findIndexedChildRecursive("StartDate");
    OAMessageDateFieldBean bean2=(OAMessageDateFieldBean)webBean.findIndexedChildRecursive("EndDate");
    String startDate=bean1.getText(pageContext);
    String endDate=bean2.getText(pageContext);
    String strDate1=null;
    String strDate2=null;
    if((startDate==null||startDate.equals(""))&& (endDate==null||endDate.equals("")))
    date=pageContext.getCurrentDBDate();
    SimpleDateFormat simpledateformat = new SimpleDateFormat("yyyy-MM-dd");
    String dateValue=simpledateformat.format(date);
    String year=dateValue.substring(0,4);
    try
    String sqlStatement = "";
    CallableStatement cs = null;
    // OAApplicationModule oaapplicationmodule = pageContext.getApplicationModule(webBean);
    OADBTransactionImpl txn = (OADBTransactionImpl)oaapplicationmodule.getOADBTransaction();
    cs = txn.createCallableStatement(" ",1);
    sqlStatement = "SELECT to_char(to_date(ffv.attribute1,'RRRR/MM/DD HH24:MI:SS'),'DD-MON-YYYY') attribute1, " +
    " to_char(to_date(ffv.attribute2,'RRRR/MM/DD HH24:MI:SS'),'DD-MON-YYYY') attribute2 " +
    " FROM apps.fnd_flex_value_sets ffvs,apps.fnd_flex_values ffv " +
    " WHERE ffv.flex_value_set_id = ffvs.flex_value_set_id " +
    " AND ffvs.flex_value_set_name = 'XXX_PMP_Fiscal_Date_VS' " +
    " AND (SYSDATE BETWEEN NVL(ffv.start_date_active,SYSDATE) AND NVL(ffv.end_date_active,SYSDATE)) " +
    " AND flex_value= " + year +
    " AND ffv.enabled_flag = 'Y' ";
    ResultSet rset = cs.executeQuery(sqlStatement);
    if (rset.next())
    strDate1 = rset.getString(1);
    strDate2= rset.getString(2);
    catch(Exception e)
    throw new OAException("Error:" + e.toString(), OAException.ERROR ) ;
    SimpleDateFormat convertFormat = new SimpleDateFormat("dd-MMM-yyyy");
    if(strDate1!= null || strDate2!=null)
    try
    dateValue1 = convertFormat.parse(strDate1.toString());
    dateValue2 = convertFormat.parse(strDate2.toString());
    catch(Exception exception)
    bean1.setValue(pageContext,dateValue1);
    bean2.setValue(pageContext,dateValue2);
         bean1.setReadOnly(true);
    bean2.setReadOnly(true);
    }

  • Acrobat X - Read this Page Only not working

    Hello,
    I have Acrobat Pro X, and need to make accessible PDFs from InDesign. Before I upgraded to Acrobat X, I used to have Acrobat read the text to me to help check the reading order. But in Acrobat X, the "Read this page only" selection does not work. If I click on some text, it will read that line, but that doesn't help me to see what order it will actually read since it doesn't read the next line to the end of the page unless I manually click on it.
    My problem is that we tag things in InDesign and set up the proper reading order (we've tried using the structure and using the Articles panel...), but in the Reading Order panel, it often shows a different order. Even two text frames that are threaded, it will show the 2nd text frame as being 1st in the reading order rather than the 1st text frame where the text originated. That makes no sense. The tag structure in the PDF looks correct but the reading order does not (if viewing from the TouchUp Reading Order view.
    So we want to make sure we check the reading order, and having it read the page to us is one of the easiest ways to do this.
    Anyone have this kind of problem? Any suggestions to get it to actually read the entire page?

    It is often a good idea use a screen reader to check the accessibility of  files -- even if you check the Tag Structure, content and order panels. Sometimes a file can be corrupt and will not read, even though the tags are perfect and the file passes the Accessibility checker.  This does not happen very often, but I have had it happen several times.
    And many people recommend using a screen reader to check pages with figures or tables.  Read Aloud will NOT do a very good job of checking tables. I don't think it can identify row and column headers or identify cells associated with them.  There are a number of screen readers available for download that are more sophisticated and much better suited for checking file accessibility.  For exampe, Freedom Scientific's Jaws runs in demo mode. You may want to try that.
    Regardless, while the Read Outloud feature was not designed to validate and is not the best tool for the job, it should be working for you. 
    You could try using Read Outloud on different files, or on a different machine and see if that makes any difference.  Sometimes system updates and/or software conflicts may effect things. Check and see if the shortcuts below have any effect --
    Ctrl Shift
    B
    Read out loud from the current page to the end of the document
    Ctrl Shift
    C
    Pause reading out loud
    Ctrl Shift
    E
    Stop reading out loud
    Ctrl Shift
    V
    Read only the current page out loud
    Ctrl Shift
    Y
    Activate and deactivate read out loud
    Good luck and let us know if you have resolved the issue.

  • Make jsp page read only

    dera frds,
    im working on a site,i make a web page based on jsp,that page has a download file,i want the authorized user can download that file,other can see that file as read only mode,but can't download,so plz provode me some program to make jsp page as read only.

    ya well i want that other can see that file,but only authories users can download that page or file.unauthories user can see that page or file,but can't download.
    basially assume that file might be having some course that can download by authoried users.

  • How to make a page in read only

    Hello,
    I am using 11.1.1.4, I am having a requirement to display all the components on my page read only when first time page loaded, By clicking on 'Edit' button I have to make all components in editable. I am using Transient View object to render various components on my page. I have 50 components approximately on my page. How can I make page read only with very minimal changes?
    Thanks

    Try something like that:
            public static void disableControls(UIComponent component, Object[] disabledParam) {
               Iterator<UIComponent> i = component.getFacetsAndChildren();
               while (i.hasNext()) {
                     UIComponent child = (UIComponent) i.next();
                     Class mc = child.getClass();
                      try {
                         Class[] cls = {boolean.class};
                         Method setDisabled = mc.getMethod("setDisabled", cls);
                         setDisabled.invoke(child, disabledParam);
                         AdfFacesContext.getCurrentInstance().addPartialTarget(child);                 
                      } catch(NoSuchMethodException ex){
                      } catch(Exception e) {
                         log.error(...);
                     disableControls(child, disabledParam);
               } // of while      
            }if you pass {Boolean.TRUE} as second param, you will disable all children of first param component.
    Next, in the JSF page, yuo need something like follows:
            <af:clientListener type="load" method="onPageLoad"/>     
            <af:serverListener type="disable" method="#{myBean.handleDisable}"/>
        </af:document> The javaScript part:
    function onPageLoad(event) {
      var source = event.getSource();
      AdfCustomEvent.queue(source,"disable", {}, false);
    }And finally , here is handleDisable() Java method, in which you should call disableControls() utility method:
        public void handleDisable(ClientEvent event) {
            disableControls(_some_UI_comp, new Object[]{Boolean.TRUE});
        }

  • Making OAF page read-only

    Hello,
    In forms to make a form read-only we set the parameter QUERY_ONLY=Yes
    like that for OAF page do we have any option to make the entire page query only. can OAF personalization be used for this?
    Thanks.

    There is no such functionality... in OA Framework, by which u can turn all the fields on a page to read only by some page layout region property. You would have to set the read only property to true for each bean in the page.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • APEX 4 Bug: Wrong quickpicks in Item Page's Read Only section

    This bug is an easy one
    In Edit Page Item page, Read Only section, the predefined option list (now quickpicks) is as follows:
    [PL/SQL] [item=value] [item not null] [request=e1] [page in] [page not in] [exists] [none] [never]
    But if you look carefully, Conditions section has same quickpicks. Right quickpicks for Read Only should be:
    [PL/SQL] [item=value] [item not null] [request=e1] [page in] [page not in] [exists] [always] [never]
    Best regards.
    Oscar

    Hi Oscar,
    this problem has already been filed as bug# 9752881 and will be addressed in a future release.
    Thanks
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins

Maybe you are looking for

  • Problem in Save the Billing Document

    Hi, We have a problem while saving the Billing Document i.e. Document 83034087 saved (error in account determination) Message no. VF051 when we saw it;s Revenue accounts, found there - Condition type............Message.................Description ZM0

  • Install SMC Server 3.6 in Sol 10 local zone?

    Dear all, Is it possible to install and running SMC Server 3.6 in local zone with whole root (not sparse) steup? thanks

  • Why I can't access soundcloud with firefox

    I am using firefox & used to browse www.soundcloud.com website everyday. But recently i can't get any access there. Its says "Secure Connection Failed An error occurred during a connection to soundcloud.com. The OCSP response is not yet valid (contai

  • Frequent beachballs for maybe a year now?

    After an iTunes upgrade a long time ago, maybe a year ago, I have been having beachballs everytime I try to do ANYTHING in iTunes - play a song, scroll, select another song, you name it. I get it within a second or two of my asking it to do anything.

  • After Effect update problem

    Hi, I have problems updating the last version of After Effect via Creative Cloud. It starts the download but after a while it stops. I found this window with an error message. In italian it says: Errori durante l'installazione.(U44M1P7) In english sh