Populate Username on a text field in seeded page

Is it possible to populate some of the text fields in a seeded page with the username who is logged in and accessing the page.
Harshad

Hi Harshad,
Extend the controller and in the processRequest method write this code-->
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
String userName = pageContext.getUserName();
OAMessageStyledTextBean bean = (OAMessageStyledTextBean)webBean.findIndexedChildRecursive("ButtonID*");
System.out.println("Setting ViewAttr of CoverageVO");
bean.setValue(pageContext,userName);
*-->Button Id which you have created through personalization.
Also attach this extended controller through personalization.
Thanks
--Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • How to populate USERNAME into a text field [SOLVED]

    Hi all,
    Forms 10g(10.1.2.0.2), Windows XP
    In my form I have 2 blocks.
    Block 1 with only one item, where we enter some value and hit enter(this will navigate to block2 and execute the query).
    Block 2(tabular) will fetch the records. Now this block2 have 3 columns(caseid, userid, date).
    Now when I insert a new record, I just need to enter the caseid only. And userid and date have to be automatically populated.
    I'm able to populate date by setting Initial Value property to *$$DATETIME$$* for the date column.
    And I tried many ways to populate USERNAME into userid column without any success.
    I tired something like this
    In *When-New-Item-Instance*
    if :System.Cursor_Item is null then
         :BLOCK2.userid := Get_Application_Property(USERNAME);
    else
         null;
    end if;
    /*In this case, I can navigate to to the last recrord w/o any changes in the fetced records
    and while inserting the new record, USERNAME doesn't populate.*/
    In *When-New-Record-Instance*
    declare
         v_dummy varchar2(15) := null;
    begin
         v_dummy := nvl(:system.cursor_value, null);
         Copy(to_char(v_dummy), :System.Cursor_Item);
         if :System.Cursor_Item is null then
              Copy(null, :System.Cursor_Item);
              :BLOCK2.userid := Get_Application_Property(USERNAME);
         else
              null;
         end if;
    end;
    /* Nothing populates into the userid item while inserting new record */Any help please...

    Hi Ammad,
    It is populating number 73 (which is not my username) into the field.
    And when I changed it to :BLOCK2.userid:=GET_APPLICATION_PROPERTY('USERNAME');
    I get FRM-40735 WHEN-CREATE-RECORD trigger raised unhandled exception ORA-06502
    Also when the new record is inserting, the user shouldn't be able to edit userid and date fields. But this is also not working...
    Edited by: Charan on Sep 20, 2011 11:26 AM

  • Drop down lists populating text fields on a page different from the dropdown.

    Hello all,
    I have a form with several pages. The first page contains a number of drop down lists. These drop down lists, when an option is chosen, is to populate a text field on another page. I can get the drop down list to populate the text field when it is on the same page, but as soon as I move the text field to another page, the script doesn't work. Can anyone offer a solution? I've used javascript on change for the scripts.

    Thanks Paul,
    I have been able to solve the drop down list question, thanks to your help.
    I have another question that involves locking specific fields in a four page form which contains approximately 100 fields that need to be locked before the end user completes the remaining fields. How do I lock individual subforms so that the remaining fields remain open and editable?  The final version of the form, will have at least 200 fields in it that will also need to be locked in sections.
    I can lock all the fields using the lock all fields button, but have been unable to make it work for just part of the form.
    I've emailed the draft form.  It would be really helpful if I had one example of a locked subform on the form I'm struggling with.
    Thanks for your help.
    Nellie

  • Duplicate a Text Field on Every Page of a Document?

    Today I wrote my first vb.net/adobe app.  I managed to open the pdf doc in adobe and create a named text field.  I managed to insert a java script that gets the current date when the document is open and updates the text field.  I would like to duplicate the text field on all pages of the document.  Manually, I can right click on a text field and select duplicate.  I don't see a property or method that allows me to program this.  The field property "page" appears to be read only.  any help would be appreciated.  thanks.
    page
    The page number or an array of page numbers of a field. If the field has only one appearance in the document, the page property returns an integer representing the 0-based page number of the page on which the field appears. If the field has multiple appearances, it returns an array of integers, each member of which is a 0-based page number of an appearance of the field. The order in which the page numbers appear in the array is determined by the order in which the individual widgets of this field were created (and is unaffected by tab-order). If an appearance of the field is on a hidden template page, page returns a value of -1 for that appearance.
    TypeInteger | ArrayAccessRFieldsallExample 1Determine whether a particular field appears on one page, or more than one page.var f = this.getField("myField");
    if (typeof f.page == "number")
    console.println("This field only occurs once on page " + f.page);
    else
    console.println("This field occurs " + f.page.length + " times);

    I also tried the brute force method of moving from page to page and creating a text field on each page.   I used pageNum to changes the page, but, adobe didn't seem to recognize that.  I saw the page change on the screen, but, all of the textfields were created on the first page!

  • Changing font/-size of a text field on master-pages not possible? (field prop)

    Hi,
    I would like to change the font and font-size of a textfield on a master page.
    I wonder if I do anything wrong, because the font-options (size, font etc.) are simple greyed out / not avaliable, when I click on my text field.
    It seems, there is any way to customize the font-properties of a textfield (only) on master-page.
    Well I guess it would work with java script in init-event ...  but really, why the hell it should not be possible simply to use the properties/text properties?!
    Please correct me if I am wrong. Do I do anything wrong or is it really not possible to customize font of a text field on master pages?

    Hi,
    I was just about to post, that I figured it out.
    Actually, I use Livecycle Designer in SAP (transaction SFP). There seems to be a bug (one of hundrets by the way).
    If I click on a field, that does not have text-property e.g. subform, text-option menu greys out.
    Afterwards it stay this way until I click/doubleclick into a simple text (not text field). From that moment on, text/font-option menu is available again, until I click on something without text. => So pay attention and click wisely
    coming soon: "SAP meets Livecycle Designer - a (Bug)Lovestory", hardcover 124 Pages. ; )
    by the way: SAP does not sopport interactive forms higher than Reader 8.1. Its statement "8.1 is fine enough for everything you need in a SAP/Adobe Interactive Form". So beware of using XFA higher than in 8.1. sad, but true ...

  • 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.

  • Auto Populate Drop Down and Text Fields from Other Drop Down and Text Fields

    Hi everyone
    I'm trying to pre populate a "Proposed Employment Status" drop down field with the selection from the "Current Employment Status" drop down field and allowing users to select another option if the proposed employment has changed. If it hasn't it would just remain as populated by the Current Employment Status" entry.
    I'm also trying to do this with text fields eg "Proposed Position Title" is populated with "Current Position Title". If the title changes in the bew employment arrangements users can enter it over the Proposed Position Title that is presented when the Current Position Title is entered.
    I can get it to work if the drop down or text field names are the same, but this doesnt solve the problem.
    Any ideas
    Regards,
    Michael

    Java is a full featured-language and you shouldn't have any problem doing the mathematics, etc.
    As far as the rest, Studio Creator is a relatively easy way to create the user interface that you describe. If supports drop-down selectable lists and standard form capabilities. A Web Application architecture would appear to be ideally suited to what you describe, and this is supported by SC. Be aware that this would require a server to serve the application to the client computer.
    If the server is a problem you could consider an applet that would be downloaded from a website, and then run entirely on the client computer. But the first approach is better.

  • Display current username in a text field

    Hi I have done an application where a particular user can log an issue. I want to display the user bane in a text field so that when i click save the issue is saved along with my other details.
    My question is how do i display my user name in my form?

    yes i have already tried that but it doesnt work. The thing is i have a text field and i'm trying to display it in the text field. Is that the right way to do it? and where do i insert that code

  • Text Field repeating at Page Break in Interactive Adobe form in Webdynpro Java

    I have requirement in which Text field containing 'Rich Text' data has a huge data coming at runtime. It is displaying correctly without any scrollbars on a single page .Now the problem is when data exceeds to next page ,text field repeats it with first line and also adds scrollbar to text field.
    I have set text field properties like Allow Page Break,Allow multiple lines ,Height Auto fit.
    Also The Text field is in flowed Subform ,Allow page breaks checked.
    Kindly provide solution in quick time..

    Yes I have checked all the subforms Flowed. Text field is working good in Preview Pdf Option of NWDS.
    But when I generate the pdf on server, when TextField flows to next page, on next page it repeats from first line.

  • How can I add javascript text fields to Acrobat pages from Applescript please?

    I have a real need to add text fields to Acrobat document pages from Applescript. I can't access the Headers and Footers from Applescript in Acrobat XI. I can set watermarks using the following script, but cannot for the life of me work out how to add text fields. Any advice please?
    Regards
    set TempAttachmentName to "(20140717121212Z)"
    set PreserveFileName to "This is a test"
    set bypass to false
    tell application "Adobe Acrobat Pro"
      activate
      set CountOfPages to count of pages
      repeat with PageCounter from 1 to CountOfPages
      tell application "System Events" to tell process "AdobeAcrobat"
      try
      click menu item "Page..." of menu 1 of menu item "Go To" of menu 1 of menu bar item "View" of menu bar 1
      tell current application to delay 0.1
      keystroke PageCounter as text
      tell current application to delay 0.1
      keystroke return
      if not bypass then
      my ADDHeaderFooter(TempAttachmentName, PreserveFileName & " " & CountOfPages, PageCounter)
      end if
      end try
      end tell
      end repeat
    end tell
    on ADDHeaderFooter(The_String1, The_String2, currentPage)
      tell application "Adobe Acrobat Pro"
      activate
      set myDocument to document 1
      tell myDocument
      tell page currentPage
      set cbox to crop box
      set item 2 of cbox to (item 2 of cbox) + 44
      set item 4 of cbox to (item 4 of cbox) - 44
      set media box to cbox
      set crop box to cbox
      set theResult1 to my Add_WaterMarkText(The_String1, "IDAutomationHC39M", 12, 1, 1, 1, 0, 3, 10, 3, 0)
      do script theResult1
      set theResult2 to my Add_WaterMarkText(The_String2, "Times", 16, 1, 1, 1, 0, 4, 10, -6, 0)
      do script theResult2
      end tell
      end tell
      end tell
    end ADDHeaderFooter
    on Add_WaterMarkText(cText, cFont, nFontSize, nS, nE, nTA, nHA, nVA, nHV, nVV, nR)
      set Params to "cText: '" & cText & "'," & return
      set Params to Params & "cFont: '" & cFont & "'," & return
      set Params to Params & "nFontSize: '" & nFontSize & "'," & return
      if class of nS is integer then set Params to Params & "nStart: " & (nS - 1) & "," & return
      if class of nE is integer then set Params to Params & "nEnd: " & (nE - 1) & "," & return
      -- 0 = left, 1 = centre, 2 = right
      if class of nHA is integer then set Params to Params & "nHorizAlign: " & nHA & "," & return
      -- 3 = top, 4 = bottom
      if class of nVA is integer then set Params to Params & "nVertAlign: " & nVA & "," & return
      -- offset in points
      if class of nHV is integer then set Params to Params & "nHorizValue: " & nHV & "," & return
      -- offset in points
      if class of nVV is integer then set Params to Params & "nVertValue: " & nVV & "," & return
      if class of nR is integer then set Params to Params & "nRotation: " & nR & "," & return
      set javascript to "this.addWatermarkFromText({" & Params & "});"
      return javascript
    end Add_WaterMarkText

    G'day
    Unfortunately I don't have the API. My Adobe Reader installation updating to version XI failed, and subsequent attempts to fall back on the X version are blocked by the partial install of XI. Damn Adobe stuff.
    Could someone please post the relevant part of the API to give me some pointers, please.
    I ha mucked about with some information I found on the Web, and come up with the following, which fails because I can't work out how to address the current document with the variable myDoc.
    Regards, Brian
    set Params to Params & "var myDoc = this;" & return
    set TempAttachmentName to "(20140717121212Z)"
    set PreserveFileName to "This is a test"
    set bypass to false
    tell application "Adobe Acrobat Pro"
      activate
      set CountOfPages to count of pages
      repeat with PageCounter from 1 to 1 # CountOfPages
      tell application "System Events" to tell process "AdobeAcrobat"
      try
      click menu item "Page..." of menu 1 of menu item "Go To" of menu 1 of menu bar item "View" of menu bar 1
      tell current application to delay 0.1
      keystroke PageCounter as text
      tell current application to delay 0.1
      keystroke return
      if not bypass then
      my ADDHeaderFooter(TempAttachmentName, PreserveFileName & " " & CountOfPages, PageCounter)
      end if
      end try
      end tell
      end repeat
    end tell
    on ADDHeaderFooter(The_String1, The_String2, currentPage)
      tell application "Adobe Acrobat Pro"
      activate
      set myDoc to document 1
      tell myDoc
      tell page currentPage
      set cbox to crop box
      set item 2 of cbox to (item 2 of cbox) + 44
      set item 4 of cbox to (item 4 of cbox) - 44
      set media box to cbox
      set crop box to cbox
      set theResult1 to my Add_WaterMarkText(The_String1, "IDAutomationHC39M", 12, 1, 1, 1, 0, 3, 10, 3, 0, myDoc)
      do script theResult1
      set theResult2 to my Add_WaterMarkText(The_String2, "Times", 16, 1, 1, 1, 0, 4, 10, -6, 0, myDoc)
      do script theResult2
      end tell
      end tell
      end tell
    end ADDHeaderFooter
    on Add_WaterMarkText(cText, cFont, nFontSize, nS, nE, nTA, nHA, nVA, nHV, nVV, nR, myDoc2)
      #set Params to "var myDoc = app.newDoc();" & return
      set Params to ""
      set Params to Params & "var myDoc = this;" & return
      set Params to Params & "var inch = 72;" & return
      set Params to Params & "var Bbox = this.getPageBox(" & "\"Crop\"" & ");" & return
      set Params to Params & "var f = myDoc.addField(" & "\"Text1\"" & ", " & "\"" & cText & "\"" & ", 0, [72, Bbox[1]-inch, Bbox[2]-2*inch, Bbox[1]-2*inch ] );" & return
      set Params to Params & "f.strokecolor = color.black;" & return
      set Params to Params & "f.richText = true;" & return
      set javascript to Params
      return javascript
    end Add_WaterMarkText

  • Usage of attribute1 field of base table as a text field in OA Page

    Hi Gurus,
    Could you please let me know if attribte1 field of an oracle base table can be used as a simple text or LOV input field in OA Page, NOT as a DFF Field.
    Thanks in advance.
    With warm regards,
    SKA

    In my case, Attribute1 is reserved for DFF. But I have to use it with a Text Input Item. OA page is showing the value stored for attribute1 in database. But it doesn't store the value in Database through OA Page. I am able to save other fields of the same VO through same OA Page, but not attribute1.
    Is it because attribute1 is registered with DFF or some other reason??
    Please advice.
    Thanks in advance.
    -SKA

  • Loop through user text fields on a page

    I am new to APEX and I have searched for an answer to this problem, but was not able to find one.
    I have a page which has about 40 text boxes for user input. I would like to find a way to loop through all of the text boxes on the page when the user submits the form. I want to check the contents of each text box and filter out any characters that are not alpha or numeric. I would like to do this in one process. Is this possible? If so, how would I access the text boxes and remove the unwanted input? Could you please show me an example?
    Thanks for any guidance on this.

    Hi,
    I did not test this, but could something like after submit process work
    DECLARE
    l_temp VARCHAR2(32000);
    BEGIN
      FOR C IN
      (SELECT item_name
      FROM apex_application_page_items
      WHERE display_as   = 'Text Field'
      AND application_id = :APP_ID
      AND page_id        = :APP_PAGE_ID
      LOOP
        -- Do stuff e.g. remove character  Ö
        l_temp := REPLACE(v(c.item_name),'Ö');
        APEX_UTIL.SET_SESSION_STATE (
          p_name  => c.item_name,
          p_value => l_temp
      END LOOP;
    END;Br,Jari
    Edited by: jarola on Mar 4, 2010 5:26 PM

  • Unable to set focus to login text field AUTOMATICALLY on page load

    Hi,
    I'm trying to have my flash (AS 2) login page have the
    username field start blinking right away after the page is loaded
    but so far, no success.
    I've added the following Javascript to the HTML wrapper:
    But it still doesnt work. Can anyone help?
    See whats happening by
    clicking here.

    Use the following in the Flash code:
    Selection.setFocus(username_field_instance_name);

  • How to write Java script for refering the 1st page text field from 2nd page?

    Hello I am developing an VISITOR info interactive form with webdynpro ABAP, its with 2 pages. Their heirarchy is,
    VISITOR_form
        |
        |
        |------Page_1
        |            |
        |            |
        |            |------Text_Field_A_1
        |            |
        |            |------Text_Field_A_2
        |
        |------Page_2
                     |
                     |
                     |------Text_Field_B_1
                     |
                     |------Text_Field_B_2
    Now, i have selected the 'Text_Field_B_1' of page_2 and writing the Java script, my requirement is; If Page_1's 'Text_Field_A_2' has a value of "Value_ABCD", THEN the 'Text_Field_B_1' of page_2 should be 'readOnly'. Pls let me know Wht is the Java script for this requirement?

    if (xfa.event.newText=="ABCD")
    VISITOR_form.Page_2.Text_FieldB_1.access ="readOnly";
    place script on change event of Text_FieldA_2

  • How to populate text fields with data present in a table

    Hi,
    The page i'm building has got a select list for the primary key column and text fields corresponding to rest of the columns in the table.
    upon selecting some value from the list, the data corresponding to that row should get populated in the respective items. I don't want to add source in each item. can't i create a process or something else where this is done for each item.
    for eg there's a table with columns A(primary key) and B.
    there is a text fields on this page.
    this textfield should populate the data from the table whenever i submit the page such that teh value in B is select B from tablename where A = the selected value.
    Thanks
    Dhirendra

    So I assume page was not built using a wizard. Why on earth you would want to I dont know, but you could create an "After Header" pl/sql process to populate the relevant fields, assuming the id was know on entry to the page. If you want to select the id on the page and then populate the fields, guess you will need to use a "Text Field (always submits page when Enter pressed)" and then use an "On Submit" process to populate the items.
    If you are using an Automated Row Fetch, remember to select "Set memory Cache on Fetch" in that process.
    Hope this helps.

Maybe you are looking for

  • Bill of lading is not populating

    We are entering bill of lading information in MIGO but when we are posting invoice through MIRO Bill of lading field is empty. What can we do to it appear on the MIRO. Regards Ram

  • Safari using up all the RAM

    if I leave Safari open for an hour just regularly browsing sites, Safari and its other process Safari Web Content will use up all the available RAM on my computer. I have 4GB total, and eventually Safari will use up all the rest, usually 1-2GB. Any i

  • How link Vendor & customer Legers in SAP

    Hi please suggest how link vendor & customer lagers. please also suggested which T code use for linking in SAP with process note.

  • Address Book contacts keep multiplying!

    For some reason my address book contents will not delete and many of them seem to multiply!I sync between my iphone and a daylite. I have tried getting rid of all the contacts in address book and my iphone (successfully) but the problem persists. I h

  • Call function module from BSP page

    Hi Experts, I am new to ABAP and BSP as well. I am creating an BSP page through which I want to call an function module in R/3 which will fetch a file from the application server and place into an internal table. I have identified the function module