Problem with Refreshing the data bound text fields

Folks,
First of all, this a GREAT product and I am moving my apps from Eclipse to Studio Creator. I am very impessed with it so far.
I am gone through most tutorials, but can't help resolve the problem that I am having. I have a page, that lists all the users in a table. When you click on any user, it opens up another page that lists the detail of the specific user you have clicked on. This a typical use in most web applications, right?
In the user detail page, I open it in "Read" only mode, by setting the "setReadOnly" to true for all text field components. Then users can edit it by clicking "Edit" button. Edit button just changes the "setReadOnly" to false, to allow editing. After editing, they can hit the "Save" button to save the changes. In the save button, I call this code:
public void prerender() {
        try {
            userID=getSessionBean1().getUserID();
            getSessionBean1().getWeb_userRowSetUserDetail().setObject(1,userID);
            getWeb_userDataProviderUserDetail().refresh();
            info("prerender: Refresh called");
        } catch (Exception ex) {
            error("Error in userForm.prerender():"+ex.getMessage()+ex.getStackTrace());
            log("Error in userForm.prerender():", ex);
        setReadWrite();
public String btnSave_action() {
        try {
            getWeb_userDataProviderUserDetail().commitChanges();
            getWeb_userDataProviderUserDetail().refresh();
            info("Data Provider Refreshed in SAVE");
            _readOnly=true;
            form1.discardSubmittedValues("saveVForm");
            info("User Updated New:"+userID);
        } catch (Exception ex) {
            log("Error Description", ex);
        return null;
    public String btnEdit_action() {
        try {
            _readOnly=false;
            //info("User ID Edt="+getSessionBean1().getUserID());
        } catch (Exception ex) {
            error("Error in userForm.btnEdit_action:"+ex.getMessage()+ex.getStackTrace());
            log("Error in userForm.btnEdit_action():", ex);
        return null;
    private void setReadWrite(){
        // Set read-only to true or false for all text fiels
        this.btnEdit.setVisible(_readOnly);
        this.btnSave.setVisible(!_readOnly);
        this.user_id.setReadOnly(_readOnly);
        this.user_email_client.setReadOnly(_readOnly);
        this.user_email_office.setReadOnly(_readOnly);
        this.user_fname.setReadOnly(_readOnly);
        this.user_lname.setReadOnly(_readOnly);
        this.user_id.setReadOnly(_readOnly);
        this.user_password.setReadOnly(_readOnly);
        this.user_password_conf.setReadOnly(_readOnly);
        this.user_phone_cell.setReadOnly(_readOnly);
        this.user_phone_cell_aac.setReadOnly(_readOnly);
        this.user_phone_client.setReadOnly(_readOnly);
        this.user_phone_home.setReadOnly(_readOnly);
        this.user_phone_office.setReadOnly(_readOnly);
    }When the save button is clicked, the database is updated (as I can verify by looking directly into the database), but the data-bound text fields do not display the new value. YES, I am calling refresh() on data provider? I tried to call refresh in both "preRender()" and "Save" button action event, but that did not help either.
Please note that the save button also changes the "setReadOnly" back to TRUE for all text fields. That means, users view the page in Read-Only mode after saving. (They have to click on "Edit" button again to edit it). I discovered that if I do not set the text field components in "ReadOnly" mode, then they display the updated value of the fields. But if I change setReadOnly to TRUE, then they display the old values (before the save).
Any idea what I am doing wrong here?
Thanks

Here is my experience with it. I have three text
boxes to be filled out. They are part of a virtual
form with an add button as the submit. You can fill
out the 3 and add them and a node is added to a tree
component. When you click on a node in the tree
component (the submit to another virtual form that
the 3 buttons participate in) the text fields should
be loaded with the values that they where added with.Hard to tell from this explanation, but if the text fields do not participate in a virtual form, then they are not going to get updated when an action in the virtual form happens. Not sure this is your problem. Like I say, hard to tell from this explanation.
They will not display the values though...having
nothing to do with read only. If I disable them
before hand...they display the updated values. If I
set their value at the top or bottom of prerender,
they display the change...if I set the value in an if
conditional that is hit (I have checked many times)
in prerender, they will not display the values. If I
set them in the tree handler anywhere, they will not
display the values. This is very frustrating and is
wasting tons of my time...I simply want to load the
text fields based on the tree node that was
clicked...I have messed with this for hours and it
certainly does not work.Well, setting them in the tree handler won't work because the tree handler gets called in the page instance that handles the submit and not the page instance that renders the response.
Posting your prerender code might help. Also, your action handler.
>
>
- Mark

Similar Messages

  • Problem in refreshing the data of the UI element Table

    Hi Experts,
    I am having a problem.
    I have a screen which displays list of variants in table ( variant name , variant desc )
    I am binding the entries of table in WDDOINIT method.
    but when i go back to selection screen view and come back to display variants view, WDDOINIT is not triggering.
    Now if i move the code written in WDDOINIT method to WDDOMODIFYVIEW method, its not retaining the lead selection as the binding happens on every server round trip. if i check with First_time = 'X'. its same as that of having it in WDDOINIT method.
    How do i overcome this problem of refreshing the table data.
    any clue is highly appreciated.
    Regards,
    Ajay

    hi Ajay ,
    create a custom controller for this and when u want to move from selection screen view to display variant ,
    call method of this custom controller
    DATA lo_edit TYPE REF TO ig_edit .
    lo_edit =   wd_this->get_edit_ctr( ).
      lo_edit->edit1(
    here I am calling the edit1 method of my custom controller named EDIT.
    try to move code of ur WDDOINIT here.
    it shud help
    rgds,
    amit

  • Problem in refreshing the data in Xcelsius

    Hi,
    I have added a refresh button in my dashboard  to refresh the data from the BOE , but ones i click that button it ask for user authentication and ones i enter that and click ok nothing happens , the data is not getting refreshed.
    In second case i made my data connection as refresh on load  so as soon i launch my dashboard it ask for user authentication and after entering that details nothing happens and i am not able to see the data and even if i enter wrong details in the pop up window it does not gives any error message for wrong credentials.
    Earlier i was getting the error like #2032 , #2017 so i maintained the crossdomail.xml file in web server it was resolved.
    But i am not able to refresh the data nor i am getting any error message kindly suggest !!
    Regards,
    Mishra,Vibhav

    Dear Ingo,
    Thanks for replying.
    Step 1 : I have used a excel sheet using the live office connection and using the existing CR report from the BOE.
    Step 2 : Then i have published that excel sheet in BOE
    Step 3 : I have imported that spreadsheet in the Xcelsius and created a dashboard on top of that.
    Step 4 : I have added a refresh button on the dashboard which is used to refresh the live office connection and the session URL   that i have maintained is  http://XXXC043A:8080/dswsbobje/services/session . i am not using the refresh on load option.
    Step 4 : When i preview the dashboard with the preview button  available in the Xcelsius i can see the dashboard with the existing data but ones i click the Connection refresh button a user authentication window pop up which ask for the system name user id and pwd and Authentication type . I used the Enterprise authentication for that but ones i submit the credential nothing happens even if i enter the wrong information no error  message is prompted.
    Thanks in advance .
    Regards,
    Mishra,Vibhav

  • How to retrieve the data in texts field for ME23N

    hai all,
    i need to do some coding for the item texts field for PO, which can be saw under ME23N. i need to retrieve the details in the text. but i have no idea how am i going to get the data from that field, which table is it under for PO?
    please advice. thanks

    Hi,
    the texts will be stored in STXH table..u need to pass the four values TDOBJECT
    TDNAME
    TDID
    TDSPRAS...U will get the text details
    Or
    use the FM 'READ_TEXT'.
    cehck the below links
    http://www.sap-basis-abap.com/sapac002.htm
    FM READ_TEXT
    reward if helpful.
    Regards,
    Nagaraj

  • Problem in refreshing the data in OBIEE answers?

    Hi,
    My report doesn't show the latest data in the database. I tried restarting my BI server and Presentation server also. But it is still showing the old data only. But in Admin tool im able to view the latest data. What could be the reason for this? Wont the refresh button given at the bottom of the report refresh the data?
    Thanks,
    Karthick

    Hi,
    If you want to use the cache and you have a regular load of data into your source for OBIEE, then you just need to ensure that the cache is cleared after your load. There is an ODBC command which will clear it:
    Call SAPurgeAllCache();
    You can put this in a sql file and then call it from a .cmd file:
    nqcmd -d "AnalyticsWeb" -u Administrator -p <password> -s D:\OracleBI\server\Scripts\Common\purge_cache.sql -o D:\OracleBI\server\Scripts\Common\purge_cache.out
    When you run this .cmd file it will clear the cache, this could then be caled from another tool, i.e. an Informatica workflow. All above is based on using a windows machine to connect and run the command.
    If your data is changing all the time and you just don't want caching on then just turn it off in nqsconfig.ini, change:
    ENABLE     =     YES;
    To
    ENABLE     =     No;
    in the cache section.
    Regards,
    Matt

  • Problem while refreshing the data for the second time using excel services in sharepoint 2013...

    Hi,
    I have migrated my Sharepoint from 2010 to 2013.I am able to get the data at the first time of refresh when I click on refresh for the second time I am getting the empty the sheet.
    below find the flow of refresh
    First Refresh
    On Click of refresh open the workbook with excel services and return the session id.
    Using that session I am invoking RefrehAsync method of excel services
    After refresh completed I am setting the calculation of workbook as automatic(to calculate the formulas) using the same session id
    After setting the calculation as Automatic I am setting the calculation type as full(recalculate) using the same session id.
    Now I am able to see the data
    Second Refresh
    After clicking on refresh instead of opening the workbook I am using the session id(already opened workbook) and setting the calculation type as manual
    I am following the same process from refresh(RefreshAsync) as I have followed in first refresh.
    This time my formulas are not getting calculated because of that I am not able to see the data.
    Could you please let me know that am I missing anything here?
    Is this know issue in Sharepoint2013 excel services as same code is working fine with Sharepoint2010.
    If I close the workbook(session id null) and opens(new session id) for all the refreshes it is working and I am able to see the data.
    Thanks,
    Meenakshi Nagpal
    N.Meenakshi

    I am able to see the data for the second refresh  if I change the data source.If I use the same data source which is used in the first refresh I am not getting the data.Excel services will contact the cubes and calculate the formulas in my workbook.
    Could you please let me know what could be the problem at second refresh while contacting the same data source with same session id?
    Please help me asap.
    Thanks,
    Meenakshi Nagpal
    N.Meenakshi

  • How do I auto populate the date into text fields when form is first opened?

    Hello,
    I read all about the changing the scripts but its not really working for me. I was hoping someone could help me with directions on how to auto populate the date into designated text fields when my adobe document is first opened?
    I am working in Adobe Acrobat 9.
    Thank you,
    Sheri

    When you add a new document JavaScript (Advanced > Document Processing > Document JavaScripts > Script Name (enter something) > Add), you will be given a function skeleton by default. Just delete it and enter the line of code I showed above. Now, whenever the document is opened, the code will get triggered and the field will be updated with the current date. There is no "Document Open" action (at least that's accessible via Acrobat's UI), but this is effectively the same thing since any document-level JavaScripts are executed when the document is opened.

  • Problem with displaying the data from Database on swf file.

    Hi ,
      I am new to flash.Thanks in Advance Please help me....
    Actually my requirement is my application consists a button(submit_Btn) when we click on the button(submit_Btn), each time it must to database(through servlet) and brings the data from database and places it on the flash swf file.Here my problem is for the first time when we click on the button it goes to database and place the data(which was returned from database) on the swf file.Next  when we click on the button for the second time(or anytime) it is not going  and bringing the new data from database(if some data is modified in database or not),Infact it is showing the old data(the data that was collected from previous ClickListener) only on the swf file and it is also not showing any complile time or run time error.
    my Code looks like this:
    submit_Btn.addEventListener(MouseEvent.CLICK,onCheck2);
    function onCheck2(evnt:MouseEvent):void {
    var xmlLoader:URLLoader = new URLLoader();
        var xmlurl:String = "http://localhost:8888/xmlServlet";
        var xmlrequest:URLRequest = new URLRequest(xmlurl);
    xmlLoader.dataFormat = URLLoaderDataFormat.TEXT;
    xmlLoader.addEventListener(Event.COMPLETE, xmlcompleteHandler);
    xmlLoader.load(xmlrequest);
    function xmlcompleteHandler(event:Event):void {
        var loader:URLLoader = URLLoader(event.target);
        var succData:String=loader.data;
            var xmlData:XML = new XML();
            var xmlList:XMLList;
            xmlData = XML(loader.data);
            xmlList = xmlData.children();
            for (var i=0; i<xmlList.length(); i++) {
                for (var n=0; n<xmlData.UserHumanap[i].HumanapDot.length(); n++) {
                        var x_coordinate:Number = xmlData.UserHumanap[i].HumanapDot[n].@x;
                        var y_coordinate:Number = xmlData.UserHumanap[i].HumanapDot[n].@y;
                        var point2:Point = new Point(x_coordinate,y_coordinate);
                        var circle:Sprite = new Sprite();
                        circle.graphics.beginFill(0x00ff00);
                        circle.graphics.drawCircle(point2.x,point2.y,3);   //Placing the data as dots on the swf file
    Thanks in Advance.......Please Help me..........
    its Urgent..........
    Thanks,
    Swarthi

    Checkout following line in your code
    var xmlurl:String = "http://localhost:8888/xmlServlet";
    now change it to
    var xmlurl:String = "http://localhost:8888/xmlServlet?random="+String(MAth.random());
    I think you will get the point now

  • Problem with adding participation date as updateable field during HRBEN0001

    We have a need to update the participation date on our health plans (infotype 0167) during the enrollment process after modifying an adjustment reason (infotype 0378). We used SE84 to add the participation date (RPBEN_SA-PARDT) to screen 0100 of program SAPLHRBEN00ENROLLMENT.  We can now type in the new date in the field but when you hit enter, it immediately reverts to the old date (that was already displayed by SAP). We even tried saving without hitting enter but, of course, this didn't work either. We've tried everything and can't seem to make it work. Because of the nature of screen 0100 we are having trouble turning on debugger to see if we can see what happens. It looks like the screen has the field defined as not updateable but we can't find where that is set. Our insurance providers often require us to set the participation date to dates other than the default that SAP is setting. It doesn't appear to have anything to do with the field on infotype 0167 since we can modify the participation date field there through PA30. This gives us a work around but makes the process very tedious for out Benefits user since she often has large numbers of changes.  Does anyone have any suggestions?

    Tim :
    Interesting as we also try to get field participation date maintained through benefit enrollment screen. The problem is the way SAP
    is written in function 'HR_BEN_MAINTAIN_PLAN'. When selecting a life change event in benefit enrollment, SAP populates a list of internal tables (e.g. plan_offer internal table in which participation date is already defaulted to a date like current date).
    When you click on a plan to enroll (e.g. health plan), a corresponding function is called ('HR_BEN_MAINTAIN_HEALTH_PLAN' for health plan). This function controls the window and logic for you to select the plan option / coverage. Within this function, it first populates fields in the window (display or not) with pre-populated records in the internal table, then overrides only fields currently
    editable in this window (i.e. health plan option, dependent coverage). Therefore, even you add participation date and make it editable field into this window, this field will still be overrided with what's stored in the pre-populated internal table once you hit return or 'Accept'.
    We even created a note with SAP to see if they can provide any suggestion; the answer is to submit a request for development for SAP to review.
    What we ended up doing is to do this in two steps. First, enroll in a plan through benefit enrollment (knowing participation date value is not what we want). Once done, click on 'Overview' to go to 'Benefit Overview' so user can pick a record to edit (we have to do enhancement here to enable 'Change' tab here). This is to reduce the pain of having to get out benefit enrollment tcode, then  go to benefit overview tcode to change participation date.
    Rgds.

  • Problem with acrobat 9 when validating text fields

    Hello
    I've been using a script to provide feedback for my English Students. The correct input turns the backgroundcolor to green, an incorrect one turns it to red. This script has been working fine for many years including Acrobat Reader 8, but version 9 gives me a problem. When filling in the field and pressing enter, nothing happens, only when you give focus to the filled in field again does the color change. Leaving the field turns the color again to its original. Here is a link to an example:
    http://schulen.eduhi.at/herderschule/pdf/E3/e3u1sentences.pdf
    Try it with reader 9 and a previous version and you'll see what I mean.
    Can somebody help me fix this problem?
    Here is the code that I'm using to validate the textfields:
    //TestLetter
    /*********** belongs to: Document-Level:TestLetter ***********/
         var f = this.getField("1")
              f.value = "";
         var f = this.getField("2")
              f.value = "";       
    function TestLetter(FieldName,FieldValue)
      var RetValue;
       RetValue = false;
      switch (FieldName)
        case "1":
          if (FieldValue == "in the Australian bush.")
               RetValue = true;
             break;
        case "2":
          if (FieldValue == "for a pack of dingoes.")
               RetValue = true;
                 break;
         default:
         RetValue = false;
         break;
      return  RetValue;
    //trim
    /*********** belongs to: Document-Level:trim ***********/
    function trim(inputString) {
       if (typeof inputString != "string") { return inputString; }
       var retValue = inputString;
       var ch = retValue.substring(0, 1);
       while (ch == " ") {
          retValue = retValue.substring(1, retValue.length);
          ch = retValue.substring(0, 1);
       ch = retValue.substring(retValue.length-1, retValue.length);
       while (ch == " ") {
          retValue = retValue.substring(0, retValue.length-1);
          ch = retValue.substring(retValue.length-1, retValue.length);
       while (retValue.indexOf("  ") != -1) {
          retValue = retValue.substring(0, retValue.indexOf("  "))
        + retValue.substring(retValue.indexOf("  ")+1, retValue.length);
       return retValue;
    //1:Validate
    /*********** belongs to: AcroForm:1:Validate ***********/
    event.value = trim(event.value);
    var f = this.getField("1"); /* field that the event occurs at */
         f.readonly = false;
         f.fillColor = color.ltGray
    if (event.value != "")
      if (TestLetter("1",event.value)==true)
        f.fillColor = color.green;
    else
      f.fillColor = color.red;
    //2:Validate
    /*********** belongs to: AcroForm:2:Validate ***********/
    event.value = trim(event.value);
    var f = this.getField("2"); /* field that the event occurs at */
         f.readonly = false;
         f.fillColor = color.ltGray
    if (event.value != "")
      if (TestLetter("2",event.value)==true)
        f.fillColor = color.green;
    Else
    f.fillColor = color.red;

    You probably have field highlighting turned on. You can use JavaScript in the file to turn off this user preference setting.
    I'd also suggest a code change:
    event.value = trim(event.value);
    var f = event.target; /* field that the event occurs at */
    George

  • Having Problems with "pattern" in Spry Validation Text Field

    Hi, thanks for reading. I have read the primers and docs on
    using the "custom" pattern ability of the spry textfield validion.
    However, I am unable to fully understand how to implement the
    conditions I desire. I have read that you use:
    "B"; "b" for Case-insensitive alphabetic characters.
    I suppose my first question is, does that mean either B or b
    will work?
    What I am trying to accomplish for my first validation is:
    1- to allow between 1 and 15 characters to be entered. They
    should be only a) alphanumeric (number or letter) b) they MAY
    contain a space in there and c) the first character needs to be a
    letter. So, what I want it to scrub for is a char string no longer
    than 15 chars, number or letter (may contain a space, but that
    counts towards the 15) and the first char must be a letter.
    I have been playing around with the attributes:
    ("spryCustomtest", "custom", {validateOn:["blur"],
    minChars:1, maxChars:15, pattern:"a"});
    however, i am unable to see how to specify the pattern so
    that it allows for 1-15 chars and insists that only the first char
    is a letter......
    My second question is, how could I implement a field for
    heightened password-choosing rules....
    perhaps tell it to allow for:
    a) minimum of 8 characters
    b) at least one capital letter
    c) at least one special character or number
    d) maximum of 30 characters
    thanks for any help, Tex

    Did you ever find a solution for this?

  • Problem withe using the russian characters in selection

    Hi guys,
    I have this code:
    select result from ztable into v_result where field1 = c_russia.
    where c_russia = Отправитель...
    i have this in the ztable but its not showing in my v_result when I debug and sy-subrc NE 0...
    y is this so? is there anything wrong with it?
    thanks a lot!

    Hi Mark,
    Check this code I have return a simple code for fetching data from MAKT.. Copy the data for text field directly from ZTABLE and paste it in your program. I feel there is some mismatch in the program it seems.
    REPORT  ZTEST01.
    tables: makt.
    Data: c_text(40) type c value '89ABX1:Listauswertung nach Jahren'.
    data: begin of i_makt occurs 0.
            include structure makt.
    data: end of i_makt.
          select * from makt into corresponding fields of table i_makt
                                              where MAKTX = c_text.
    loop at i_makt.
       write:/ i_makt-matnr,
               i_makt-maktx,
               i_makt-maktg.
    endloop.

  • How to insert a new field without refreshing the data

    Hi,
    I have data of 3 years in a cube. I have to enhance a new field in that cube and i want the data will come from now onwards. I dont wanna have the data for the past 3 years.
    Can anyone tell me how i can load the data of that field into the cube without refreshing the cube as cube has too much data.
    Roma

    Hi Roma,
    It depend up on whether you are adding Cgharacteristic or Key figure. If you are adding key figure then no need to worry.
    Just create the new keyfigure, add this in all your data flow and activate all the objects and assign proper transformation.
    from next load you will get data for this field.
    If you are addign data the this is a bit difficult than key figure. addign characteristic is nothing but you are making changes to your cube dimensions.
    when you are changing your cube dimensions, you should delete the data before you transport the objects.
    You can try once to transport the objects with out deleting data. If it fails then you have to delete the data from Cube.
    Regards,
    Venkatesh.

  • HT204266 My iPad (version 1, IOS 5.1) has quit connecting with the store. I am unable to update or buy any app. I did a reboot and a reset with deleting the data. I can not find anything in support for this problem. Any help will be appreciated.

    My iPad (version 1, IOS 5.1) has quit connecting with the store. I am unable to update or buy any app. I did a reboot and a reset with deleting the data. I can not find anything in support for this problem. Any help will be appreciated.

    My iPad (version 1, IOS 5.1) has quit connecting with the store. I am unable to update or buy any app. I did a reboot and a reset with deleting the data. I can not find anything in support for this problem. Any help will be appreciated.

  • Refreshing the Data Source View in Analysis Services

    I have added columns to the SQL Database table that is used as a dimension in an Analysis Services Cube.  The new columns will be used as additional Property Fields for the dimension.  When I attempted to refresh the Data Source view so that the additional columns are present, I am given the following error:
    System.Data
    Property not accessible because 'Parent Columns and Child Columns don't have type-matching columns'
    I have done nothing to the columns used for the parent of child and the error message provides nothing to gon on. Does anyone have any ideas on this?
    Gary

    Olga,
    Thanks for your response.  I will try and answer your questions
    1) I have not tried removing the columns yet.  I will try that this afternoon but have limited hope.  The two columns I added are simple text columns that will be used as attributes in the dimension.  I have made no change to the parent or child columns.
    2) The table I modified is the source table for a parent-child dimension.
    3) The reference to the "check list" does not take me to any kind of check list.
    4) The parent-child dimensions I am trying to modify have been in use for months and the parent and child columns do have the dame data types.
    5) I have also check the data types between the dimension table and the fact table.  they use the same data types (small int).
    6) I have not made a collection for the parent key, it is a single column. The remainder of your last paragraph is not clear to me. Can you give me an example.
    I am fairly inexperienced with Analysis Services, please talk slow and use small words  :-)
    Thanks again for your help!
    Gary

Maybe you are looking for

  • I've my iphone stolen ,Can you help me ?

        Hi, your heigherness. My iphone 4 (white 8G) was stolen in night of 2013-03-09 Hangzhou China, and I'm here to ask for your help, the info about my set is: SERIAL NO. : C3*******PMW     I've do what I can(such like 'find my iphone',which shows  o

  • W540 Questions & Issues

    Hi Folks, Questions & Issues: 1.  Where is the Break key on the W540? 2.  My W540 locks up about once every two days - there does not appear to be any common task that causes this.  When it lock nothing works, not Ctrl+Alt+Del, I must power off with

  • Mapping Help:-UDF or Direct mapping

    Hi I have two input field A and B based on certain criteria Field C will get created. Please help.

  • SAPEU component install fails - caf.eu.gp.model.eap

    Hi Experts I am currently testing the instaltion NW7 SR3 SP14 for rollout and this error stops the process: The install runs fine until it comes to step 34/ 44 (UT ep, epcore, WebAS), and then stops when it tries to deploy a sub comonent of the SAPEU

  • How do I output different sounds on multiple displays?

    For example, if I connect my Macbook Pro to my TV via HDMI and make it as a separate display, how do I change the sound output so that sound that comes from the external display will only play from the external display while sound from my MacBook Pro