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});
    }

Similar Messages

  • How to make a DFF in read only mode

    Hi All
    There is a requirement to male an descriptive flexfield (in Puchasing PO Headers) i read only mode for all the users.
    So that user must not select any values, Is any way to do this. Any workaround is possible ?
    Regards

    Hi;
    Please follow below and see its helpful:
    [Solved] How to make a DFF segment 'Read-Only' using Form Personalization?
    Also check:
    http://download-west.oracle.com/docs/cd/A60725_05/html/comnls/us/fnd/ogenff03.htm
    Regard
    Helios

  • How to make a DFF as Read only field

    How to make a DFF as Read only field

    Hi,
    You can add the read only token ($RO$) to any of the segments in the list. For example:
    segmentlist = "Context1|Segment1($RO$)|Segment2..."
    Thanks,
    Kumar

  • How to make few DFF fields read only in Forms

    Hello.....
    I am having an Issue in forms customization through custom.pll
    I need to make few DFF fields read only in HRMS enter and maintain form through custom.pll
    I tried with fnd_descr_flex.update_definition but in vain
    So please help me how to rectify this issue.
    Edited by: user.nazeer25 on Jul 9, 2010 5:27 AM

    Hello,
    Wrong forum.
    Ask this kind of question in the E-Business Suite forum ;-)
    Francois

  • How to make a checkbox as read-only ?

    Hi,
      My current requirement is to make a checkbox as read-only. Previously, the checkbox has been declared as
    PARAMETERS: cb_gr AS CHECKBOX DEFAULT 'X'.
    Now am required to make this as read-only. There are <b>no screens</b> defined in the report containing this checkbox and so am not knowing where to give the statement
    LOOP AT SCREEN.
    **Make the checkbox as disabled**
    ENDSCREEN.
    It is known that this statement has to be given in the PBO of a screen. So kindly guide me at the earliest on how to resolve this issue.

    Hi aISWARYA  ,
    Here is the Example for  making the report  parameter as  Read only  using the Report  Event  ,   Dont need and  screen Number for it , becuase  your selections itself is an Defualt 1000 screen which as   PAI & PBO , in which it maintains this Report Events in it  .
    "Change the Input Fields Dynamically in a Screen
    'The following example may help you:
    SELECTION-SCREEN BEGIN OF BLOCK 001.
    PARAMETERS: P_MRU  RADIOBUTTON GROUP SEL DEFAULT 'X' USER-COMMAND AC,
                P_PART RADIOBUTTON GROUP SEL.
        SELECT-OPTIONS P1 FOR <field> MODIF ID PRT.
        SELECT-OPTIONS G1 FOR <field>  MODIF ID MRU.
    SELECTION-SCREEN END OF BLOCK 001.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
      IF P_MRU = 'X'.
          IF SCREEN-GROUP1 = 'PRT'.
            SCREEN-INPUT = '0'.
          ENDIF.
          IF SCREEN-GROUP1 = 'MRU'.
            SCREEN-INPUT = '1'.
          ENDIF.
      ELSEIF P_PART = 'X'.
         IF SCREEN-GROUP1 = 'MRU'.
           SCREEN-INPUT = '0'.
         ENDIF.
         IF SCREEN-GROUP1 = 'PRT'.
           SCREEN-INPUT = '1'.
         ENDIF.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
    Reward points  if it is usefull .......
    Girish

  • How to make a schema really READ ONLY

    Our legacy database is on 11.2.0.1/Redhat. Last week, one developer by accident changed the legacy schema by executing drop/creat/alter table commands. This causes big problem. Now we want to make the legacy schema absolutely read only. Thus nobody can change the schemas object and data.
    There were posts talked about make the tablespace toe read only. That stopped inserting/deleting but one can still change the schema objecs with create, drop and alter, e.g.11:31:41 SQL> create table DUMMY(dummy int);
    Table created.
    11:32:06 SQL> alter table dummy add ( address varchar(20));
    Table altered.
    11:24:14 SQL> drop table DUMMY ;
    Table dropped.How can I stop this type of changes to the schema?

    Revoked most privileges from user LCCH (this is the one I want its schema READ ONLY), only leftselect distinct privilege,admin_option from (
    select r.role,user,r.privilege,r.admin_option from role_sys_PRIVS r
    union
    select 'sys',p.* from user_sys_PRIVS p order by 1,2,3
    PRIVILEGE                                ADM
    CREATE SESSION                           NO
    SELECT ANY DICTIONARY                    NO
    SELECT ANY TABLE                         NONow user LCCH can still create table in its own schema13:08:49 SQL> show user
    USER is "LCCH"
    13:08:56 SQL> create table lcch.DUMMY(dummy int);
    Table created.
    13:09:33 SQL> drop table dummy purge;
    Table dropped.I double checked the privileges granted and confirm that schema has not role granted, no object privileges granted and only the above 3 system privileges granted.

  • How to make specific cell(s) read-only in a data-grid

    Hi there!
    Is there a way to make an specific cell read-only in a data-grid?
    Best regards,
    Ciro

    Hi !
    After some months... here is the solution:
    Private WithEvents _gridTaste As DataGrid
    Private Sub MyScreen_Created()
    AddHandler FindControl("GridTaste").ControlAvailable,
    Sub(s, e)
    _gridTaste = CType(e.Control, DataGrid)
    End Sub
    End Sub
    Private Sub _gridTaste_BeginningEdit(sender As Object, e As DataGridBeginningEditEventArgs) Handles _gridTaste.BeginningEdit
    ' I want do set the cell (2,0) as read only:
    If e.Row.GetIndex = 2 AndAlso e.Column.DisplayIndex = 0 Then
    e.Cancel = True
    End If
    End Sub
    I hope this post help you too!
    Best regards,
    Ciro

  • How to make a cell/column read only

    HI All,
    Is there any way to make a specific cell read only with in a specific data form?
    Similarly is there any way to make whole column read only inside a specific data form?
    I don't want to make changes in my dimension member (e.g Dynamic Calc), i want to make these changes at data form level because, these cell/column are read only at one form but on some other data form they are editable/enterable

    If you want to make a column read only then have a look at asymettric columns in the planning admin doc, if you use them then you can make one of the columns read only.
    If you want a make one cell read only then one method could be to use javascript, you could add an extra member which is dynamic calc and point to the original member with a formula but it doesn't sound like you want to do that.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to make a column as read only for update integrator.

    Hi All,
    i came across one issue while creating integrator.
    for update integrator i have column rowid.rowid is a parameter. by using this(rowid) i'am updating.i want to make rowid column as read only .
    if i enable read only for rowid,then it is passing null as parameter and inserting new row instead of updating the row.
    If any one came across this problem you can help me in fixing this issue.

    Hi Sanket,
    Thanks for reply.
    i have created a dummy column and passed the value of the orginal column values to dummy cloumn. and hided the orginal column.
    in this process i have come across same issue. it is not passing the value as parameter and instead of updating the row it is inserting an new row.
    Any alternate for this scenario.
    Thanks in advance.

  • How to make select list as read only

    Hi All.
    when i m loading a page ...how to make value of select list as read only ..
    i tried doing this ....
    i added readonly attribute to the select list's element attibute ...it is showing as read only field by darkening the select list field but ... the select list is editable even now... its allowing to choose from drag and drop ...
    Thanks & Regard ,
    Nandini

    I have the same requirment..
    I have a select list on a editable form and i want to make that one read only.
    When I use read only property it doent do anything. (But this is working for text items well).
    When I use "disabled' option it works fine. But then that value does not post when use POST the form. So making select list disabled is not a solution.
    Any Idea..
    Thanks
    mc

  • How to make the fields dynamic read only in live cycle designer

    hi folks
    I have created a form in Adove livecycle es. Some fields should be read only from the start. So i have set the property .access 'open'. In versions of Adobe 8 this works, but in the latest version  it won't so i think it should be done via another solution. Does anybody know how?
    kind regards,
    Anton Pierhagen

    May be the below code may help.. It loops thru all the pages in the PDF form and make them protected. So the user can not change any value in the form.
    for (var i = 0; i < xfa.host.numPages; i++)
    var oFields = xfa.layout.pageContent(i, "field");
    var nodesLength = oFields.length;
    //set the access type to be protected for all fields
    for (var j = 0; j < nodesLength; j++)
    var oItem = oFields.item(j);
    oItem.access = "protected";
    Thanks
    Srini

  • How to make a User Field Read Only?

    Hi,
    How can i make a title userfield in a Document Form read only?
    I can't set enabled to false i just want to make it read only.
    I had tried to capture de key_down event on the user field, nothing happens!
    I had tried to capture de form_key_down event on the user field... SAP throws the event without the item id reference.
    Is there a work-around for this?
    thanks,
    Ricardo Momm

    Hi,
    1. capture et_click and click to another item, also save the original value to a variable
    and/or
    2. use et_validate with before_action = true to be sure the item hasnt changed and set bubbleevent
    to false when the value is different from the variable
    regards
    David

  • How to make an list row Read only

    Hi All,
        Can anyone please tel me how to make the List row (list item) read only where the status column value is Submit.(i.e the whole row has to be made as readonly, am using event handler to try this out)
    Thanks in advance 

    Hi,
    According to your description, my understanding is that you want to set the list item read only based on the status column.
    If you want to do it using Event Receiver, you need to check the status column value using Server Object Model, then break role  Inheritance and rest role assignments to set the item read only.
    Here are some detailed code demo for your reference:
    Change SharePoint list item permissions to Read only programmatically
    How to: Create an Event Receiver
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to make BPEL File Adapter read only new files?

    Hello
    we have BPEL processes that define to run from bpel component - file adatper-
    when a file come into location that it is path on the linux server . the bpel start run when "File Adapter" bpel component recognize that new file come to the location. its PollingFrequency define to 5. property name="DeleteFile" value="false" so the files remaine there.
    we want to migrate the bpel to new SOA version so we did export and deploy to new SOA Domain.
    the location of the file adapter is the same.
    but when the BPEL processes deployed its start to run for all the files that are in this location- that the file adapter define on .
    even the original soa tooks those files and start the BPEL processes for each one of them. also the new SOA that we did deploy to the BPEL processes take those files even if they are very old.
    we want the file adatper we take only new files . the start point is the time when we do deploy to the process so if we do deploy in 10:00 am we dont want this bpel will take files from 9:00 or earlier time
    Please help , how we can do this?
    Thanks

    thank you
    do you kno hat the value means in the example:
    Java mon amour: File Adapter metadata with SOA Suite
    <property name="jca.file.LastModifiedTime" value="1293041258635">
    what should I rite for read only the files that are only neer then yesterday?

  • How to make a field conditional Read Only

    Hi,
    There is a "Close date" field. I need to check if the date today, and the "Close date" falls in the same quarter. If it does, then, a particular field has to be made editable otherwise not.
    (Better, if it could be done by using business component user properties)

    Hi,
    Surely i can give you details.
    The LOV Type is - QTR_DET which has the following values -
    1.Description - 04/03/2009 & Display Value - "Q2-2009"
    2.Description - 07/05/2009 & Display Value - "Q3-2009"
    3.Description - 10/02/2009 & Display Value - "Q4-2009"
    These 4 quarter values are updated for every year
    Hence, I need to compare values, on the basis of these values.
    The Quarter for the Close Date has to be compared to Quarter which includes "Today"
    As far as i know, JulianQuarter divides the year into exactly 4 parts, but as you can see, the values are not same as the quarter values, i need to use.
    It would be surely great if you could help me solve this, as i am new to siebel.
    I was trying to try with Lookup as well.
    (The Following way, i was trying, but did not work
    -Field1 is a calculated field - Lookup(QTR_DET,[Close Date])
    -Field2 is a calculated field - Lookup(QTR_DET,Today())
    -InPresentQuarter is a calculated field - IIF((Field1 = Field2), "N", "Y")
    And this was further used for the Field Read Only Field: [Field Name] to make it read only)
    Also please let me know, if this is the right way.

Maybe you are looking for

  • Adding a JMenuBar

    I am trying to create a simple JMenuBar in the application enlosed below. I keep getting the following error when ever i compile "Screen.java": Error #: 300 : method setJMenuBar(javax.swing.JMenuBar) not found in class random.Screen at line 67, colum

  • Contribute CS4 - Can you schedule Publishing?

    Dear Community, Is it possible to schedule publishing on Contribute CS4? I'd like to apply some changes to my website and have Contribute CS4 publish them automatically at the end of the day, 5pm for example, rather than having to publish manually. I

  • HT1386 ipad sync problem

    error message - the ipad cannot be synced because the connection to the ipad was lost

  • How to call the illustrator plugin?

    Is it possible to call the illustrator-plugin through sdk? Could you please provide any samples.

  • Some OO matter

    Hi, I am new to OO as well as new to Java. I got some problem. I need to get the value of File file[]=fcSelectFile.getSelectedFiles() from BtnBrowse action to actually perform file uploading to the internet using BtnUpload. But I have no idea how to