Manage Editable Items to Read only by Backing Bean!!

Hi,
JDeveloper/ADF 11g update 2
I am finding such solution that how can I manage editable items by any action listener against button/link/object.
Details:_
Suppose I have a entry form of EMP tables' VO and want to show as read only during form load but when I will enter/click a edit button(manually created) then all items will be editable to be edited. and after submit and commit records then all items will be appear as like read only.
I want to manage editable and read only by backing class/ action listener of edit button(manually created) . Is it possible ? if possible please give me a such solution.
Please help me.
zakir
===

Ok here you go:
Bean code (put this bean in session or page flow scope): package demo.clickenable;
import javax.faces.event.ActionEvent;
import oracle.adf.view.rich.component.rich.input.RichInputText;
public class ClickEnableBean
    Boolean enable = Boolean.TRUE;
    public ClickEnableBean()
    public void setEnable(Boolean aEnable)
        this.enable = aEnable;
    public Boolean getEnable()
        return enable;
    public void flipEnable(ActionEvent actionEvent)
        if (getEnable().booleanValue())
            setEnable(Boolean.FALSE);
        else
            setEnable(Boolean.TRUE);
}JSPX page:<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
          xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
          xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  <jsp:directive.page contentType="text/html;charset=UTF-8"/>
  <f:view>
    <af:document>
      <af:form>
        <af:panelGroupLayout layout="vertical">
          <af:panelGroupLayout partialTriggers="bte">
            <af:inputText label="Label 1" disabled="#{ClickEnable.enable}"/>
            <af:inputText label="Label 2" disabled="#{ClickEnable.enable}"/>
            <af:inputText label="Label 3" disabled="#{ClickEnable.enable}"/>
          </af:panelGroupLayout>
          <af:panelGroupLayout>
            <af:commandButton text="#{ClickEnable.enable ? 'Click to enable' : ' Click to disable'}" actionListener="#{ClickEnable.flipEnable}"
                              id="bte" partialSubmit="true" partialTriggers="bte"/>
          </af:panelGroupLayout>
        </af:panelGroupLayout>
      </af:form>
    </af:document>
  </f:view>
</jsp:root>The real work is done by a partial trigger on the button (id=bte). This trigger is used to update the panelGroupLayout holding the input text fields which are enabled/disabled via the boolean value of the bean. Each click on the button toggles the boolean value and updates the page.
Timo

Similar Messages

  • How to open a view to a Item in "read only" mode directly from SAP Logon.

    Hello Gurus;
    We need to display a given portfolio item to the user in display (read only) mode.
    We have managed to open a view to the portfolio item using function INM_UI_NAV_GET_OIF_URL to obtain its URL and FM CALL_BROWSER to open it. The problem is that the item is opened in edit mode.
    Is there any way to open this item in read only mode (and disable the 'Edit' button as well)?
    Thanks in advance.
    Regards.

    Please, anybody can solve this?
    Regards.

  • "Device Manager is running in read-only mode because you are running it on a remote computer" when local

    Hello - since configuring a Windows Web Server 2008 R2 x64 to be hardened for an internet-facing deployment I receive this:
    "Device Manager is running in read-only mode because you are running it on a remote computer."
    when entering Device Manager.
    I have tried reversing the changes I have made, such as:
    - Re-adding Client for Microsoft Networks
    - Re-enabling NetBIOS over TCP-IP
    - Re-adding File and Printer Sharing
    - Disabling the Windows Firewall in all profiles (public, domain, private)
    I get no joy. It looks like a Microsoft ballsup. I'll try and use Process Monitor to have a look. Google returns only 1 page for this error.
    Luke

    Got it.
    After my changes to DHCP and static IPs the machine picked up the IP address of another server on my little home LAN. The hostname in IPCONFIG was different to the actual server computer name and so this led Device Manager to think the connection and the
    local machine were different.
    What an odd and infuriating problem. My thoughts on this are that Microsoft should be more verbose with error messages and their causes. For example, displaying the values of the assertion would help diagnose a problem; "The host-name www02.farm.brand.com
    that you are connecting from does not match the local host-name rest01.dev.farm.brand.com. Connections from remote computers can only use Device Manager in read-only mode; some options will be disabled."
    When troubleshooting, the main thing on an engineer's mind is "what has led Windows to its [unexpected] conclusion?"
    Luke

  • TS1550 Back up to time machine failed.  Error, "Files can't be copied onto the backup disk because it appears to be read-only". Back up has been working.  drive is not read only.  How do I fix this?

    Back up to time machine failed.  Error, "Files can’t be copied onto the backup disk because it appears to be read-only". Back up has been working.  drive is not read only.  How do I fix this?

    Hello,
    http://pondini.org/TM/C6.html

  • How i can make text item as read only

    hi
    im trying to make a text item as read only so no one can write on it i tried to make it as display item but i neeed also to call lov when i double click on the text item in display item case u can not double click
    so please how i can make text item as read only
    and another thing
    how i can change an item properties by code i mean when i click in one button the text item become visibile how i can change its property by code
    thank u

    You can set a text item's property to be non-updateable
    You can change this programmatically with set_item_property()
    :)

  • How can i devlope three JSPX pages & having only one backing bean.

    Hello Team,
    I am working on Jdevloper11g
    I have one form registration in this from user enters the self information in first screen, insurance information in second screen, employment information in third screen
    So I developed the following scenario
    I create one JSPX page & in this page I taken 3 panelGroupLayout n I simply rendering the panelGropuLayout that time its very essay stuff.......
    But now I have to implement the af:train component in that I have to implement above scenario in three JSPX pages & I want only one backing bean for this three JSPX pages.
    SelfInformation.jspx ...... SelfInformation.java
    InsuranceInformation.jspx
    EmploymentInformation.jspx
    I done this too…
    But now I want when
    I adding some components on second screen ex af:inputText its backing bean create in SelfInformation.java
    Is this possible?

    HI..
    I created three jspx pages...& i drag n drop af:train & af:trainButtonBar camponant.... by default Back & next button is created...But my requirment is...Only on first form i dont want to show Back Button...
    How can i do this?
    Edited by: Charu on Nov 22, 2009 9:42 PM

  • Time Machine reported 'volume is read only' & rolled back to old state

    I've been in love with Time Machine ever since Leopard arrived. This has all come crashing down over the last few days...
    Firstly I got a new 1tb drive, so I mirrored my old TM drive (using SuperDuper), and all seemed to be fine – backups were chugging along for a week or so as normal on the new, bigger drive.
    A few days ago I got a time machine error stating that "The backup volume is read only". I thought this was strange as the drive was working without issue for a week. I checked permissions, format, etc and all were set correctly. I restarted and Time Machine kicked back in and all seemed to work fine other the fact that there seemed to be no backups created for 6 hours before I got the error message. Then I made a scary realisation, somehow the files on my computer had been restored to a state from 6 hours prior, all the work I'd done for the morning was gone.
    I put this down to a one off glitch (stupid, stupid, stupid). I've today got the same "backup volume is read only" message again, and this time around my files have been restored to a state from 3 days ago. Fortunately this time around Time Machine has a backup of the important stuff a few hours ago.
    I am now very worried about using the same disk with Time Machine. I also have no idea if Time Machine is the culprit (but logic tells me with the rolling back of files it must be). What should I do? How can I figure out what is going on?

    This may fix the "read only" problem:
    What to do if Time Machine reports you don't have permission
    This was posted in the Apple Discussions by V.K. I have only modified it slightly to be more generic.
    The problem seems to be that 10.5.6 changes permissions on a file so that even the root user doesn't have write peivileges. I have no idea why they did this. The workaround suggested in [an]other post will probably work, too, but i did something less drastic. Instead of deleting the file I changed permissions on it, and it worked just fine. An added benefit is that the permission change seems to stick, so you don't have to delete the file every time you change a drive.
    [Open the Terminal application in your Utilities folder. At the prompt [enter] the following command:
    sudo chmod 644 /volumes/"TM drive name"/.xxxxxxxxxxxx
    The name of the file .xxxxxxxxxxxx is based on the MAC address of your computer and will be different for every computer. Put the name of the TM drive in the above and keep the quotes.
    You'll have to enter your admin password (which you won't see) which is normal.
    This was edited by Kappy just for cleanup.
    Enable Finder to Show Invisible Files and Folders
    Open the Terminal application in your Utilities folder. At the prompt enter or paste the following command line then press RETURN.
    defaults write com.apple.finder AppleShowAllFiles TRUE
    To turn off the display of invisible files and folders enter or paste the following command line and press RETURN.
    defaults write com.apple.finder AppleShowAllFiles FALSE
    Alternatively you can use one of the numerous third-party utilities such as TinkerTool or ShowHideInvisibleFiles - VersionTracker or MacUpdate.

  • CRM Order - Item No at a Order Item becomes Read Only

    Hi All,
    We are creating an Order (SAP GUI) and enter a few products. For some products the ITEM NO becomes read only.
    We have 2 Item Category group (NORM, VOLL) and 2 Item Categories (TAN, ZTAN). For some products (NORM, TAN) or (NORM, ZTAN) or (VOLL, TAN) the Item no becomes Read Only.
    We do not have Higher level items or Alternate Items.
    Could you please let us know under what conditions would the Item No become read only.
    Thanks and Regards

    Hi,
    you would have to pass the variant condition keys (and pricing factors - default is 1) to the pricing engine. I have never seen this part of the application myself and it think it is difficult to achieve this as this might be direct communication between the configurator and the pricer. The variant conditions are passed in a reference characteristic called "VKOND" to the order and then to the pricer.
    Are you planning to use a configurable product or a non-configurable product for this task? If you use the later you can ensure the SAP configurator is not called and then just have to feed additional data into the pricing engine (e.g. via manual conditions or via user exits in pricing).
    Regards, Marcus

  • Firefox is already running. "Check access rights" - Read Only, revert back and selected automatically!

    I Have follow the steps releated issue "Firefox is already running, but not responding. To open a new window, you must first close the existing Firefox process, or restart your system".
    However, issue is solved for sometimes by following steps (1 & 2) but the issue created again. Regarding step 5, I cannot applied it, because when I uncheck "Read Only" it revert back again!!
    Please advise.
    Note:
    We are running the Firefox through Citrix XenApp Presentation 4.5.
    Thank you

    Do you get that all the time or only if you close Firefox and want to restart Firefox?
    See also:
    * "Hang at exit": http://kb.mozillazine.org/Firefox_hangs
    * "Firefox hangs when you quit it": https://support.mozilla.org/kb/Firefox+hangs
    *http://kb.mozillazine.org/Profile_in_use
    *https://support.mozilla.org/kb/Firefox+is+already+running+but+is+not+responding

  • Can you save editable pdf as read only

    I have a client who's using an editable pdf that I set up in the full version of Acrobat 8.0. They would like to edit the doc in Acrobat Reader and then do a save as and make the doc "read Only" so that their viewers can't edit the document after they have made their changes. Is this possible or am I the only one who can make it readable or not readable with the full version of Acrobat?

    You can do it. They can't.
    If this is something they are going to do a lot of, recommend that they purchase at least Acrobat Standard if not Pro.

  • Using edit box in Read only mode

    I am using JDeveloper 10.1.3.1.0 with OAF.
    In one page I have created one region with a few edit boxes. In this region I want to display the information using the edit boxes in a "Read Only" mode so that it matches with the same background colour.
    If the content of the edit box is small, i.e.: a few characters long, but if the content is large about 150 characters, then if I make the edit box read only, then it does not come to a new line. For this I have to make the edit box in "Disabled" mode. In "Disabled" mode only, the long message is shown in multilines. But my problem is that, when I make is "Disabled, it does not become uniform with other edit boxes with the same background colour. Can you please suggest, how can I address this problem.
    Regards

    HawkerHunter,
    I am using JDeveloper 10.1.3.1.0 with OAF.I stopped reading after that sentence. You should use the [url http://forums.oracle.com/forums/forum.jspa?forumID=210]OA Framework Forum
    John

  • Convert editable PDF to read-only when sent in an email - JavaScript

    I have a real estate company that is trying to have an application that a agent and customer can fill in the needed information, hit a submit button, have the javascript compose an email with the attached pdf.  Here's the issue I'm having: I need to be able to convert the editable pdf to a read only so when the customer receives a copy they cannot edit the information again. 
    Here is my javascript code for the submit button:
    // This is the form return email. It's hardcoded
    // so that the form is always returned to the same address.
    // Change address on your form to match the code below
    // Send to buisness email
    var cToAddr = "[email protected]";
    // First, get the client CC email address
    var cCCAddr = this.getField("1st Tenant Email").value;
    if(cCCAddr != "")
    // Now get the second email only if it is filled out
    var cBenAddr = this.getField("2nd Tenant Email").value;
    if(cBenAddr != "")
    // Now get the third email only if it is filled out
    var cthirdAddr = this.getField("3rd Tenant Email").value;
    if(cthirdAddr !="")
    // Set the subject and body text for the email message
    var cSubLine = "Test - Lease Form"
    var cBody = "Thank you for submitting your form.\n" + "Save the filled form attachment for your own records"
    // Send the entire PDF as a file attachment on an email
    this.mailDoc({bUI: true, cTo: cToAddr, cCc: (cCCAddr + "; "
    + cBenAddr + "; " + cthirdAddr), cSubject: cSubLine, cMsg: cBody});

    Hi keely,
    Firstly you will need to buy a Reader Extensions license (this allows Reader to save the form data - otherwise the client will require Acrobat). Once this is done, you will then need a button (called "Lock Down" or something) that executes a script that makes all of the fields readOnly and updates a form variable (say, "locked") to indicate that the form is locked. You will also need to add a script to the initialize event that checks for the value of "locked", then executes the readOnly script (if the form needs to be locked down). An example of a readOnly script can be found on page 434 of http://www.adobe.com/go/learn_lc_scriptingReference (see "Disabling all form fields" script)
    Here is a sample form ( https://files.acrobat.com/a/preview/9df046bd-1125-4923-95de-35fc845139ca ) with a 'Lock All fields' button. Once you click this button all the forms turn 'Read only'.
    Another way to accomplish this which still requires Reader Extensions or Acrobat Pro is to use digital signatures. The people you are sending this to should have certificates set up.
    Hope this helps.
    Regards,
    Rave

  • Cant edit birthday calendar (read-only)

    Hello,
    im pretty new to iCal, just started today.
    i recognised it imports / offers a calendar for each location you have on your mac os X.
    in prefs i found the additional birthday calendar option.
    after enabling it, i was wondering why i cant edit it.
    "you cannot change events or toDo in a read-only calendar"
    i hoped the type birthday calendar offers my the option to use all inserts i did for all coming years.
    any ideas howto solve that read-only status ?
    best regards
    fidel

    Hi fidel,
    iCal's birthday calendar takes it's data from birthdays you put into Address Book. It is not editable from within iCal.
    Best wishes
    John M

  • Possible to save editable pdf as read only?

    I need to make an editable pdf that I can send to a client. The client needs to be able to open it in Adobe Reader, make changes, save it, and then email to customers. Is there any way (in Adobe Reader) that they can make the pdf read-only after they have made their edits, so that their customers can't edit the pdf?

    You can do it. They can't.
    If this is something they are going to do a lot of, recommend that they purchase at least Acrobat Standard if not Pro.

  • How to get selected items from a tree in backing bean without adfbc

    Hi ADF Experts,
    Below is my code for af:tree. My question is how can I get selected Items from the selectionListener (without adf bc) this uses formation of tree from backing bean.
    Using Jdev 11.1.1.7.0
    <af:tree var="node" value="#{pageFlowScope.MerchandizeBean.model}"
                      binding="#{pageFlowScope.MerchandizeBean.treeModel}"     id="tree" immediate="true" autoHeightRows="0"
                           styleClass="AFStretchWidth" rowSelection="multiple"
                           selectionListener="#{pageFlowScope.MerchandizeBean.treeNodeSelection}">
                    <f:facet name="nodeStamp">
                      <af:commandLink text="#{node.classDescription}"
                           actionListener="#{pageFlowScope.MerchandizeBean.createListManyItemForMerchandise}"           id="displayTable" partialSubmit="true">
                      </af:commandLink>
                    </f:facet>
                  </af:tree>
        public void treeNodeSelection(SelectionEvent selectionEvent) {
            // Add event code here...
            RichTree tree = (RichTree)selectionEvent.getSource();
                    TreeModel model = (TreeModel)tree.getValue();
                    //get selected value
    Thanks
    Roy

    Hi,
    in a multi select case, try
    RowKeySet rks = tree.getSelectedRowKeys();
    Iterator iter = rks.iterator();
    while(iterator.hasNext()){
    Object aKey = iterator.next();
    tree. setRowKey(aKey);
    Object rowData ? tree.getRowData();
      .... do something with the data here ...
    Frank

Maybe you are looking for