Problem when I make Read Only Property True

Dear Members,
I have an OAF Page on which I have the below two items:
1/ item1
2/ item2
These two items are message input text items and these two items will always have some value.
To meet one of my requirement, I am making the READ ONLY property of these two items to TRUE in processRequest method of page CO using PPR Concept. After this when I am trying to access the values of these two parameters in processFormRequest method using pageContext.getParameter method I am getting the Null Pointer Exception error.
Kindly please help me in resolving the above error.
Note: I have created a transient variable hdr1Trans and attached this variable to the both the items i.e., item1 & item2
Code in my processRequest method is as follows:_
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
OAViewObject pvo = (OAViewObject)am.findViewObject("pprPVO1");
pvo.setMaxFetchSize(0);
Row newRow = pvo.createRow();
pvo.insertRow(newRow);
OAViewObject vo = (OAViewObject)am.findViewObject("Headers_VO1");
String status="";
status=vo.getCurrentRow().getAttribute("Status").toString();
if(status!=null && !("".equalsIgnoreCase(status)))
if(status.equalsIgnoreCase("IN PROCESS"))
pvo.getCurrentRow().setAttribute("hdr1Trans",Boolean.TRUE);
else if(status.equalsIgnoreCase("NEW"))
pvo.getCurrentRow().setAttribute("hdr1Trans",Boolean.FALSE);
Code in my processFormRequest method is as follows:_
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
String headerId ="";
System.out.println("test-1");
String item1=pageContext.getParameter("item1").toString();
String item2=pageContext.getParameter("item2").toString();
I am getting the NPE error when I am trying to access a record with status value IN PROCESS.
Once I make the read only property to TRUE for both the above 2 items and after that if iam trying to access their value using pageContext.getParameter Iam getting this error.
Kindly please help me in resolving this error.
Many thanks in advance.
Best Regards,
Arun Reddy D.

Arun,
When you set item as readonly field, it will always show null when you will use pageContext.getParameter("<itemID>").
If there is a VO attached with these items eg- item1, item2 then you can get the value using below code
OAViewObject vo = (OAViewObject)am.findViewObject("<Some Vo>");
String item1=(String) vo.getCurrentRow().getAttribute("<Attribute Name>");Regards,
Gyan

Similar Messages

  • How to set the read only property for dynamic ALV column

    Hi All,
    I have built one dynamiv ALV and I have one name column inside that ALV for which I have to set read only property based on two column fields that exist in the same ALV,say IS_SP and IS_CORP of type boolean.
    If any one of the flag is 'X',i have to make that name column as display only and
    If both flag are not set,it should be displayed as ediatable column.
    I have written one method as INIT_ALV which gets called when ALV is loaded.
    Code is as  follows:
      lr_column_settings ?= wd_this->alv_all_roles.
      lt_columns = lr_column_settings->get_columns( ).
    LOOP AT lt_columns INTO ls_column.
    CASE ls_column-id.
       WHEN <NAMECOLUMN>. "name column which should be editable/display
    Create Input Field
            CREATE OBJECT lr_uie_input_field_ro
              EXPORTING
                value_fieldname = ls_column-id.
         ls_column-r_column->set_cell_editor( lr_uie_input_field_ro ).
        After this,I have to set the read only property based on IS_SP and IS_CORP values,
              CALL METHOD lr_uie_input_field_ro->set_read_only_fieldname
              EXPORTING
                *value = 'IS_SP' or 'IS_CORP'
    ENDLOOP.
    I dont want to use cell variants also.
    Help me to achieve this.
    Thanks and Regards,
    Divya

    Divya - I have done it in the past following these documents. Please read it and try it it will work.
    Please read it in the following order since both are a continuation documents for the same purpose (it also contains how to change colors of row dynamically but I didnt do that part I just did the read_only part as your requirement) 
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0625002-596c-2b10-46af-91cb31b71393
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0155eb5-b6ce-2b10-3195-d9704982d69b?quicklink=index&overridelayout=true
    thanks!
    Jason PV

  • How to Enable/Disable MessageTextInput Read Only property in PFR?

    Dear All,
    When i click on a submit button i need to enable/disable the Read only property of MessageTextInput item.
    Can any one tell me how to do this?
    I am executing the code
    if (pageContext.getParameter("EnableBT") != null) {
    OAMessageTextInputBean beanEmployeeIdCL = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("EmployeeIdCL");
    beanEmployeeIdCL.setReadOnly(false);
    When i used the above code in Process Form Request method it is showing developer mode exception in run time as we can call the above code only in Process Request form.
    Request to please help regarding this.
    Thanks & Regards,
    CAK

    CAK,
    You need to make use of Partial Page Rendering (PPR) & SPELL. Modifying the bean property in PFR is not supported in OAF.
    Refer - PPR section of Devguide for more.
    Regards
    Gyan

  • DFS-R hub server - which way to make read-only?

    Hi all,
    This is more of a technical clarification than a problem we're having...
    Firstly, we have a bunch of file servers in various EMEA regions, which are set up to replicate back to a central hub server at our UK datacentre in order to take backups. These spoke servers are the only location where the data is changed.
    We are in the middle of migrating the hub server over to Windows Server 2008R2, meaning we can use the supported one-way replication method instead of disabling one end of the member connections.
    My question is this:
    Which member do we need to make read-only? This would have seemed obvious to me, however there is some confusion amongst our systems engineers.
    I would have said that you make the spoke member read-only, as you don't want the hub replicating anything back to it. This makes perfect sense to me, but not everyone is so sure.
    Could someone please clarify?

    I think it is what I want to achieve - many remote spoke/writeable downstream servers talking with one central/hub server so only this hub has the content of them all - but what do You mean saying "configure
    your DFS targets ... such that the HubServerB is disabled"? Isn't it by making it read-only?
    I've just found this -
    Make a Replicated Folder Read-Only on a Particular Member (http://technet.microsoft.com/en-us/library/dd759239.aspx).
    Well. There is a clear explanation that users cannot add or change files on read-only replicated folder but all three examples show remote servers as read-only while hub server is always writeable, isn't it?
    RODC example is clear - for safety reason no user-made changes are allowed on remote DC but it gets changes from writeable (central/hub) DC/DC's.
    Reports files generated and changed only on hub server - OK. But I can imagine an opposite situation where branch offices are responsible for producing and changing reports which are read-only in company's headquarter. Do the remote offices do it all on the
    hub server? Then the reports are replicated to remote read-only member servers? What for?
    But keeping installation files on remote servers is not understandable for me. I would rather keep them on central/hub server and propagate them to remote servers and make hub server read-only to prevent from backward replication.
    I'm not a native English speaker so maybe I don't get the exact sense of this article. Somebody help me, please?
    Krzysztof

  • I use captivate 8, the problem when i make app for android. the sound not heard. i use android4.4. how i do?

    i use captivate 8, the problem when i make app for android. the sound not heard.
    i use android4.4. how i do?
    i use phonegap online.
    thank you

    Yes I do spend a lot of time in China but I have had problems in other countires as well.  I am in China right now.
    I have two Gmail accounts and one Cox account.  Cox is my intranet provider back home.  I have had problems with all three accounts. 
    I have tried several outgoing port settings.  993, 995 465, 587 are some that I can remember trying.
    Sometimes my accounts will go offline without me doing anything.  This is all a mystery to me.  I don't have any idea why I have trouble like this.  A few minutes ago I changed my Cox account outgoing port and took the account on line and I got my incoming email but when I tried to forward an email that I got it would not go out. 
    Any ideas you have would be helpful.

  • How to make read only field in Task list?

    Hi All,
    How to make read only field in Task list?

    This can be done one of two ways:
    1. Customize the form in Infopath, right click your field and disable the control.
    2. Use JavaScript/jQuery on the page to disable the element.
    Andy Wessendorf SharePoint Developer II | Rackspace [email protected]

  • WD ALV  read only property

    Hi,
    Is there a read only property for the cell editor in the ALV table?
    (I prefer it to the enabled/disabled) visually.
    Many thanks!

    CL_SALV_WD_UIE_INPUT_FIELD

  • [svn:fx-3.x] 13374: Expose a public read-only property httpService on HTTPOperation.

    Revision: 13374
    Revision: 13374
    Author:   [email protected]
    Date:     2010-01-08 07:43:33 -0800 (Fri, 08 Jan 2010)
    Log Message:
    Expose a public read-only property httpService on HTTPOperation. HTTPOperation.service will still return null as a consequence of an old design decision (HTTPService does not extend AbstractService), but a warning is now logged to inform the user that they should use HTTPOperation.httpService to access the containing service.
    Doc notes: Please explain that if a standard HTTPService is used, the event.target on the ResultEvent from this service is an instance of HTTPOperation, and users can access the originating HTTPService with event.target.httpService. (see bug for use-case)
    Bugs: SDK-24775
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24775
    Modified Paths:
        flex/sdk/branches/3.x/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as

    For a TwoWay binding to work the source property must have public setter and an anonymous object (like the one your select new LINQ query creates) has not.
    But since you are binding to the Text property of TextBlocks you could just remove Mode=TwoWay from the bindings in the ItemTemplate of the ListBox:
    <TextBox Name="txtOrderID" Text="{Binding Path=OrderID,Mode=OneWay}" Margin="5,0,10,0" Width="30"/>
    <TextBlock Text="Order Date:" TextAlignment="Right" Width="80"/>
    <TextBlock Name="txtOrderDate" Text="{Binding Path=OrderDate,StringFormat={}{0:MM/dd/yyyy}}" Margin="5,0,10,0" Width="75"/>
    <TextBlock Text="Required Date:" TextAlignment="Right" Width="80"/>
    <TextBlock Name="txtRequiredDate" Text="{Binding Path=RequiredDate,StringFormat={}{0:MM/dd/yyyy}}" Margin="5,0,10,0" Width="75"/>
    There is no reason to bind TwoWay to a TextBlock.
    Hope that helps.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

  • I have faceing problem when i make voice call or video call

    i have faceing problem when i make voice call or video call... pleace resolve this issue soon.Thanks

    See if this helps:
    Re: Disable pre-call "time available" announcement - $80/mo. prepaid unlimited plan

  • Can I show correctly formatted text areas when they are read only.

    Hi all,
    I have an application that allows users to enter large blocks of descriptive text in a TextArea field. This is a simple TextArea field with no spell check etc and is not an HTML editor.
    As part of this entry I use the normal 'return' key to enter line breaks / new paragraphs as you would expect.
    This works fine and the data is stored correctly. When I extract this text, via XML, into a BI Publisher PDF document, the text is correctly formatted with line breaks where they are expected.
    However, when I try and display this information on the screen, in read only mode, the line breaks are lost and all I see is a continuos block of text with no line breaks.
    I am displaying this as a TextArea in a read only form (basically the page is a copy of the entry/maintenance page with all the fields set to ReadOnly = Always) and I cannot get it to display correctly. As soon as I make the field ReadOnly = Never the text dispaly OK, but then the user can go and change it.
    How can I get this field to display correctly?
    Many thanks,
    Martin

    Hi Dimitri,
    Thanks for your reply.
    I tried changing the field source to:
    select replace(replace(MANUAL_STEP_TEXT,CHR(10),'
    '),CHR(13),'
    from tpa_rel_patches
    where patch_id = :P40_PATCH_ID
    and now I get:
    1.Take a backup of existing jdbc driver files In all the Tiers (Admin, External & Middle Tiers)
    cd $JAVA_TOP
    cp jdbc111.zip jdbc111.zip_4899697
    cp jdbc12.zip jdbc12.zip_4899697
    cp jdbc14.zip jdbc14.zip_4899697
    2.Apply the Oracle JDBC Drivers Patch using ADPATCH
    u4899697.drv
    Any ideas?
    Martin

  • Samsung 2TO disk drive when unexpectedly to read only

    I have been using a Samsung 2TO hard disk connected directly on the firewire of my Mac (27" of late 2009) running under Snow Leopard and it has been running properly with read/write and delete capabilities. I migrated to Mavericks yesterday morning and could use the external drive as before.
    This morning (16-10-14) came as a surprise that I could not write anything anymore on this disk. After a check (information), the Share and permissions indicate "Read only". The format also indicates NTFS. It also shows that my last update is of 15/10 2:54 PM. I have no access at all on the properties of this disk, cannot look to the owners, group etc...and cannot configure it at all, even with disk utilities. I attached some screenshots. It seems that the only remedy is to reformat the disk! Is this true? No other means to avoid me exporting more than 1.5 TO of data? 

    Install updated Tuxera NTFS, your problem will be solved. The software u were using till update is may not compatible with Mavericks. Try the software.
    https://www.google.co.in/url?sa=t&source=web&rct=j&ei=HxRAVIyCCJSyuQSix4DADw&url =http://www.tuxera.com/products/tuxera-ntfs-for-mac/&ved=0CB0QFjAA&usg=AFQjCNFJf OFkKdTjjD0Te6UXhVwgtep7qA

  • Setting read-only property for a RTL inputtext.

    HI,
    I am using JDeveloper version 11.1.2.2.0. In my fusion web application, in the af:inputtext field, if the language is, RTL or LTR the value is displaying according to that. Suppose, if it is English, the value is displaying left to right. If it is, Arabic, the value is displaying from left to right. But if I set the column value is read-only, everything is displaying as left to right. Here is the code of my input text field.
    <af:column sortProperty="#{bindings.PhraseTranslationView3.hints.Description.name}"
    sortable="true"
    headerText="#{bundle['PhraseTranslation.des']}"
    id="c5">
    <af:inputText value="#{row.Description}" id="ot6"
    inlineStyle="border-style:none; overflow:hidden;border-color:rgb(255,255,255);direction:#{row.TextDirection};border-width:thin;height:16px; font-weight:bold; color:rgb(0,0,0); font-size:8.0pt;font-family:Arial Unicode MS;"
    label="Label 6">
    </af:inputText>
    </af:column>
    What is going wrong in this?

    Yeah, I have set it to 'True'. If I set it, the value is not displaying from left to right.
    Here is the code.
    <af:inputText value="#{row.Description}" id="ot6"
    inlineStyle="border-style:none; overflow:hidden;border-color:rgb(255,255,255);direction:#{row.TextDirection};border-width:thin;height:16px; font-weight:bold; color:rgb(0,0,0); font-size:8.0pt;font-family:Arial Unicode MS;"
    label="Label 6"
    styleClass="rtl" readOnly="true">
    </af:inputText>
    Regards,
    Infy

  • Using  Data Pump when database is read-only

    Hello
    I used flashback and returned my database to the past time then I opened the database read only
    then I wanted use data pump(expdp) for exporting a schema but I encounter this error
    ORA-31626: job does not exist
    ORA-31633: unable to create master table "SYS.SYS_EXPORT_SCHEMA_05"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.KUPV$FT", line 863
    ORA-16000: database open for read-only access
    but I could by exp, export that schema
    My question is that , don't I can use Data Pump while database is read only ? or do you know any resolution for the issue ?
    thanks

    You need to use NETWORK_LINK, so the required tables are created in a read/write database and the data is read from the read only database using a database link:
    SYSTEM@db_rw> create database link db_r_only
      2   connect to system identified by oracle using 'db_r_only';
    $ expdp system/oracle@db_rw network_link=db_r_only directory=data_pump_dir schemas=scott dumpfile=scott.dmpbut I tried it with 10.2.0.4 and found and error:
    Export: Release 10.2.0.4.0 - Production on Thursday, 27 November, 2008 9:26:31
    Copyright (c) 2003, 2007, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    ORA-39006: internal error
    ORA-39065: unexpected master process exception in DISPATCH
    ORA-02054: transaction 1.36.340 in-doubt
    ORA-16000: database open for read-only access
    ORA-02063: preceding line from DB_R_ONLY
    ORA-39097: Data Pump job encountered unexpected error -2054
    I found in Metalink the bug 7331929 which is solved in 11.2! I haven't tested this procedure with prior versions or with 11g so I don't know if this bug only affects to 10.2.0.4 or 10* and 11.1*
    HTH
    Enrique
    PS. If your problem was solved, consider marking the question as answered.

  • Java Does Not Throw Exception When Writing To Read-Only Files

    I have noticed that when I try to write to a read-only file in a window environment, Java does not throw an IOExcpetion, it just dosn't write to the file.
    I am writing an FTP server and here is the code:
         public static long copyStream(InputStream in, OutputStream out)throws IOException
              IOException exception = null;
              long copied = 0;
              try
                   byte buffer[] = new byte[1024];
                   int read;
                   while((read = in.read(buffer)) != -1)
                        out.write(buffer, 0, read);
                        copied += read;
              catch(IOException e)
                   //ensures that the streams are closed.
                   exception = e;
              try
                   in.close();//ensures output stream gets closed, even if there is an
                   //excption here.
              catch(IOException e){exception = e;}
              out.close();//try to close output.
              if(exception != null)
                   //exception is not null, an exception has occured.
                   //rethrow exception.
                   throw exception;
              return copied;//all ok, return bytes copied.
         }Is this a bug in JAVA VM? Is so, how should I report it?

    I have noticed that when I try to write to a read-only file in a window environment,
    Java does not throw an IOExcpetion, it just dosn't write to the file.C:\source\java\Markov>attrib readonly.out
    A R C:\source\java\Markov\readonly.out
    �C:\source\java\Markov>java b
    java.io.FileNotFoundException: readonly.out (Access is denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at b.main(b.java:5)
    import java.io.*;
    public class b {
        public static void main(String[] args) {
         try     {
              OutputStream os = new FileOutputStream ( "readonly.out");
         catch (Exception e) {
              e.printStackTrace();
    }

  • Is it possible to Update Powerpoint slides from the Sharepoint slide-library using Macros when its in read-only mode?

    As Wendy Li informed that PPT ask you to update from slide library automatically. But this happens only if the slides are saved in your system(in read write mode). Is it possible to run the updates automatically on Read-only slides as well.
    Thanks.
    Old:
    Currently I'm executing the task manualy by using the Check for updates option. But I'm willing to develop a macro code which can be executed when the slide is open and automatically replaces the slides with the latest one from the Slide-Library. Any links
    to pre-existing code will be helpful. Thanks.

    Hi SamGoe,
    According to your description, my understanding is that you want to update the PoerPoint slide from SharePoint 2010 slide library automatically.
    It seems to be not necessary to use Macros. SharePoint provides an OOB way to notify you to check for update to the slide library slides when you open the presentation. PowerPoint does this because you selected the option
    Tell me when this slide changes when you copied the slides from the library.
    More information, please refer to the link below:
    http://office.microsoft.com/en-us/powerpoint-help/sharepoint-slide-libraries-ii-use-slides-in-the-library-RZ010254089.aspx?section=6
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

Maybe you are looking for

  • KMS / xorg 1.8 on intel 830m / 82830M

    Hi, i run the old intel xf86-video-intel 2.9 on my beloved Vaio R600 HFP with a intel 830m / 82830M graphics chipset. KMS is switched off by i915.modeset=0. Now with the kernel 2.6.34 and KMS switched on, i get a console, but when X is started i get

  • (Item) was not copied to the iPod (Name)'s iPod Touch because it cannot be played on this iPod

    Last week I purchased Star Wars the Clone Wars: Season 5 off of the iTunes store. I have purchased all previous seasons over the years and they have been able to play on my iPod. But when I purchased this new season, whenever I try to add the episode

  • Can i create a standby database in oracle 10g standared edition ?

    what are the steps required for creating a standby database using oracle 10g standard edition. or Any other feature for mirroring database in oracle 10g standared edition

  • Reg: Script Output in PDF form

    Hai.. Can anybody tell me how we will get script output (P.order output) in PDF format and we need to downlaod this PDF to our local drives. plz tell me the function modules to be used for this requirement and paste the code if any of you worked on t

  • Guitar cuts out while recording

    Hi All, I'm using Garageband and the Griffin guitar connect cable and when I try to record my guitar, the recording cuts out after a few bars. Useful stuff: -original iPad and fully up to date iOS. -cut out is random, though the most I've been able t