It possible using javascript to change the value of another jsf text field?

In my case, I have an input text field and would like to copy it's value on the onchange() event into another text field. Using the destination text field's Id and assigning some content with it's .value property

Woodstock apparently renders some Javascript/DOM with some homegrown widget framework which on its turn renders the HTML DOM tree instead of plain vanilla HTML. Correct me if I'm wrong, to confirm this, just view the generated HTML source of the page.
After some Googling I found out that you need getProps() and setProps() to get and set element attributes respectively.
[http://google.com/search?q=webuijsf+domnode+site:sun.com].
If you stucks with this, I recommend you to post this question at a forum or mailinglist devoted to Woodstock, e.g at their own homepage at dev.java.net or the Netbeans forum at nabble.com. You're here at a Sun JSF forum, not at a Woodstock forum.

Similar Messages

  • Issue using JS to change the value of an output text component dynamically

    I am developing an application and I need to change the output text component value at run time when the mouse moves over a field. I am using javascript and then using UIComponent.setproperty to change the value.
    I am not able to do this and am getting nothing.
    Kindly let me know what am I doing wrong
    I am using ADF 11g (10th November release).
    Regards,
    Deepak

    Hi i'm doing the same thing with an input text
    here is my code
    jspx:
    <af:inputText value="#{bindings.MiddleName.inputValue}"
    label="#{bindings.MiddleName.hints.label}"
    required="#{bindings.MiddleName.hints.mandatory}"
    columns="#{bindings.MiddleName.hints.displayWidth}"
    maximumLength="#{bindings.MiddleName.hints.precision}"
    shortDesc="#{bindings.MiddleName.hints.tooltip}"
    id="it4" autoSubmit="true">
    <f:validator binding="#{bindings.MiddleName.validator}"/>
    <af:clientListener type="valueChange" method="mo_UpperCase"/>
    </af:inputText>
    js:
    function mo_UpperCase(event){
    var inputField = event.getSource();
    if (event.getNewValue().toUpperCase()!=event.getNewValue())
    inputField.setValue(event.getNewValue().toUpperCase());
    In my case i change the input text to upercase when the value is changing
    I hope it works with output text also,
    change my examples clientlistener type from valueChange to mouseOver
    If you have more than one component and you need to pass parameters check this thread also:
    bug at af:clientAttribute 11.1.1.2.0
    Tilemahos

  • Using javascript to change the "Overall Result" cell in WAD

    Hi experts,
    I am trying to use javascript to change the text of the "Overall Result" cell in my web template using BI 7.0. I am not familiar with javascript, but I this is what I have done so far.
    I dragged the web item "Script" into my web template and I inserted the following code:
    function change_overall_result_to_average() {
    var cell = document.getElementsByTagName("TD");
    var cellText;
    for (i = 0; i < cell.length; i++)
          cellText = cell<i>.innerText;
               if (cellText == "Overall Result")
                     cell<i>.innerText = "Average";               
    In the XHTML view I am using added the onload function to start the javascript every time the web template is loaded. The code works fine when the web template is first loaded and the cell text is changed to "Average". However, if I navigate in my web template, the javascript function is not triggered, and the cell is therefore changed back to "Overall Result". For example, this happens when I pick another selection from one of my dropdown boxes, such as changing the selection from year 2008 to year 2007.
    I don't really know how to solve this problem in an easy way, and the current solution is not good enough. I hope one of you guys can suggest an easy way of fixing this:-)
    Best Regards,
    Morten

    Woodstock apparently renders some Javascript/DOM with some homegrown widget framework which on its turn renders the HTML DOM tree instead of plain vanilla HTML. Correct me if I'm wrong, to confirm this, just view the generated HTML source of the page.
    After some Googling I found out that you need getProps() and setProps() to get and set element attributes respectively.
    [http://google.com/search?q=webuijsf+domnode+site:sun.com].
    If you stucks with this, I recommend you to post this question at a forum or mailinglist devoted to Woodstock, e.g at their own homepage at dev.java.net or the Netbeans forum at nabble.com. You're here at a Sun JSF forum, not at a Woodstock forum.

  • Change the font color of a text field in a table by key-combination

    I want to change the font color of a text field in a table (single cell only) on pressing a key combination. Does anybody know how to do this.
    I have a lot of data in a table. During an evaluation of the data in a meeting I want to change the color of the text depending on the result of the meeting. (for example: High risk = CTRL+R makes the text red).
    I know how to change the color using a button, but I do not want to add a button after each cell. For this reason I would like to do it on a key combination that alway refers to the active cell.
    Many thanks for your help in advance.
    Marcel

    Hi,
    I don't think you can use the ctrl key like that as those shortcuts will be intercepted by Reader (ctrl-R toggles the ruler display on / off).  You also might have trouble updating the color while you still have focus on it.  You can use the shift key in a similar way, so if you only have lower case characters in the text fields then you can do something like;
    if (xfa.event.shift)
        switch (xfa.event.change)
            case "R":
                this.fontColor = "255,0,0";
                break;
            case "O":
                this.fontColor = "255,102,0";
                break;
            case "G":
                this.fontColor = "0,255,0";
                break;
        xfa.event.change = ""; // ignore character
    If you need uppercase characters maybe you can have one button to set "review mode" and test that on the if (xfa.event.shift) line.  But again it wont take effect until you have tabbed out of the field.
    Regards
    Bruce

  • How to show $ sign alongwith the value in message styled text field.

    Hi,
    How to show $ sign alongwith the value in message styled text field.
    The value is coming from the table column in VO.
    I am working on OAF R12.

    Hi,
    Resolved.
    I used the below code in CO for the solution.
    Formatter currencyFormatter = new OADecimalValidater("$#,##0.00;($#,##0.00)",
    "$#,##0.00;($#,##0.00)");
    OAMessageStyledTextBean msrpField = (OAMessageStyledTextBean)webBean.findChildRecursive("MSRP11");
    msrpField.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, currencyFormatter);

  • Is there a way to allow the end user to change the font color in a text field?

    I didn't know LiveCycle existed yesterday so I have been using the Google a bunch.
    I am building a request form and was asked if there was a way to change the color of font within a text field. (EXAMPLE: Original content is black. Notes are red)
    I have 2 thoughts on this, one is to type it out and highlight then click a button to turn it red. The other way I am more partial to. Have a radial button that when off, types black. When on, types red. What is the best way to do this or is it even possible?

    Figured it out. Change "plain text" to "rich text" and have user press ctr+e. Seems odd to me but it works.

  • Transaction BP: Using data in one screen to change the value in another

    Is there any way to take the data on one tabbed page of the BP transaction screen and use that data to update a field in another tabbed page?
    BR,
    Tony.

    Short answer: no.

  • How do I se a checkbox to change the value of another cell?

    I am trying to create a spreadsheet for a job quote sheet. In column A I am inserting checkboxes, in column W i have the price of that particular option that coincides with that product. What I am trying to accomplish is if I select the checkbox for an option, the cost (from column W) will jump in Column Z. Then Column Z will be totaled up at bottom, giving my client a total of everything selected. Can this be done and if it can HOW?!
    Thanks in Advance!!

    James,
    Another approach that may work for you would be to have a column for quantity, rather than a checkbox.  If the quantity is greater than zero, then enter the extended price and total it at the bottom of the order list.
    In that case, you would write in Z:
    =A*W
    With no quantity, the result would be zero in Z.
    Jerry

  • Using javascript to change styles and such

    I want ot use javascript to change the "display" style of a
    div tag
    whatDiv.style.display = "block"
    This works fine if the div tag has an inline style defined:
    <div style="display:none"> ...</div>
    But if the tag has a class attached to it and the display
    :none is attached
    to that class, then it doesn't work
    <style...>
    div.hidden{ display:none; }
    </style>
    <div class="hidden"> ... </div>
    ... how can I remedy this?

    On Thu, 15 Jun 2006 17:20:54 +0000 (UTC), "jeremyluby"
    <[email protected]> wrote:
    >What gary is saying is that you should not use a class,
    but an ID only to
    >define the region.
    Nope. That's not what I'm saying. Regardless of whether
    you're using a
    class or not, if you get an object reference using an ID, you
    can change
    the properties. Consider this example:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    <title>Demo</title>
    <style type="text/css">
    .demo {
    background-color: #000099;
    border: 1px solid #000;
    color: #ffffff;
    text-align: center;
    height: 60px;
    width: 500px;
    </style>
    <script type="text/javascript">
    var bg="#009";
    function changeColor(x){
    o=document.getElementById(x);
    bg=(bg=="#009"?"#900":"#009");
    o.style.backgroundColor=bg;
    </script>
    </head>
    <body>
    <div id="test" class="demo">
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing
    elit.</p>
    </div>
    <p><a href="javascript:;"
    onClick="changeColor('test')">Change
    Color</a></p>
    </body>
    </html>
    Gary

  • I want to change the value of a text and this text is called by another text value..

    i have a txt_blk1 up to txt_blk32 and i also have a txt_we  .. if the text_we.text has a value of 1 to 32  how can i change the value of txt_block0-32.text to 0.. the text we already generates its own value so i dont have to use for loop.  i've tried to use  _root["txt_blk"+txt_we.text] = 0; im using actionscript 2 .. can someone help me

    i'm sorry sir.. its just that im on a hurry and i need all the help that i can get for my thesis.. so while i havent figure out what to do for this problem.. i have to move to another problem just to save time. and another thing is i don't really know where did i go wrong..
    this is the code i've put inside the chips
    on (press) {
                        blocknum=32;
              for(i=1;i<=blocknum;i++){
                        if (this.hitTest(_root["block"+i])) {
                                            this._x=_root["block"+i]._x;
                                            this._y=_root["block"+i]._y;
                                            trace("Source "+i)
                                            _root.txt_recent.text = i;
                                            break;
                                  /*if (this._x==_root["block"+i]._x and this._y==_root["block"+i]._y) {
                                            _root.txt_recent.text = i;
                                            trace("block "+i);
                                            break;
              startDrag(this);
              //tempx=this._x;
              //tempy=this._y;
    on (release) {
              blocknum=32;
              for(i=1;i<=blocknum;i++){
                                  if (this.hitTest(_root["block"+i])) {
                                            trace("des1:"+parseInt(_root.txt_recent.text)+3 );
                                            trace("des2:"+parseInt(_root.txt_recent.text)+4 );
                                            trace("des3:"+parseInt(_root.txt_recent.text)+5 );
                                            trace("des4:"+parseInt(_root.txt_recent.text)-3 );
                                            trace("des5:"+parseInt(_root.txt_recent.text)-4 );
                                            trace("des6:"+parseInt(_root.txt_recent.text)-5 );
                                            if(i==parseInt(_root.txt_recent.text)+3 or i==parseInt(_root.txt_recent.text)+4 or
                                               i==parseInt(_root.txt_recent.text)+5 or i==parseInt(_root.txt_recent.text)-3 or
                                               i==parseInt(_root.txt_recent.text)-4 or i==parseInt(_root.txt_recent.text)-5) {
                                                      this._x=_root["block"+i]._x;
                                                      this._y=_root["block"+i]._y;
                                                      _root.txt_we.text = _root.txt_recent.text;
                                                      _root["txt_blk"+txt_we.text].text = 0;
                                                      _root.txt_recent.text = i;
                                                      break;
                                            else{
                                                      this._x=_root["block"+_root.txt_recent.text]._x;
                                                      this._y=_root["block"+_root.txt_recent.text]._y;
                                                      break;
    and this is the code i putted on the block13
    all block have corresponding txt_blk according to its number:
    onClipEvent(enterFrame) {
                        chipnum=24;
                        for(i=1;i<=chipnum;i++){
            if (this.hitTest((_root["chip"+i]))) {
                                  _root.txt_blk13.text = i;

  • Change the value of the field on the screen

    Hello All,
    I want to change the value of another field on the screen when the user selects the value for a particular field.
    For eg: If i select ship-to-party value on the screen by F4 based on that the sales office and sales group values should change on the screen.
    I am modifying the internal table that has these values, but its not showing the new values on the screen.
    Please let me know how to resolve this issue.
    Points gauranteed.....
    Thank You,
    Suresh

    hi
    use at selection-screen on help request for field1
    OR  on value request for field1.
    Use selection screen events.
      AT SELECTION-SCREEN OUTPUT
      AT SELECTION-SCREEN ON sel_opt1.
      AT SELECTION-SCREEN ON test1.
    AT SELECTION-SCREEN ON END OF sel_opt1.
    AT SELECTION-SCREEN ON HELP-REQUEST FOR sel_opt1-low.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR test2.
    AT SELECTION-SCREEN ON BLOCK block1
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP rad1.
    Regards,
    Prasanth
    *Reward points if helpful

  • Using Javascript function to change the value of a request variable

    Have a javascript function that activates onchange within a form variable. Would like the javascript function to change the value of a request variable.
    The javascript function is able to obtain the current value of the request variable ( which is 0 ) however I am unsuccessful in changing the value to 1.
    I have been trying to use the following:
         var vchange = 'request.changes_made = 1 ;' ;
         eval(vchange);
    Any ideas?

    If the user makes a change to the content of the form, and then attempts to leave the form, a javascript alert pops up giving the user the option of cancelling the submit, returning to the form and saving it.
    If there have been no changes, then the user is free to migrate to another page.
    This process is to protect users from losing valuable information but not to annoy them with "R U Sure" messages.
    Knowing the status of the form content is important to the functionality of the application.
    G

  • Change the value of a SharePoint List lookup control value using javascript

    hi,
    could you please help in changing the value of a SharePoint List lookup control value using javascript.
    Please note that i have to change the lookup value which is in the form of a drop down from the infopath form.
    Thanks

    https://stackoverflow.com/questions/5678210/select-dropdown-menu-option-with-javascript
    Does that help?

  • Change the value of a variable used in a View query

    I am using JDeveloper 11g to develop a simple portlet application which displays data loaded from database. I am displaying the data by dragging the ViewObject from the AppModuleDataControl to the View.jspx page and selecting the option ADF Read-only Table. My ViewObject has a single variable :empId. Now is it possible to change the value of this variable with a value that comes from the request object. On the internet I found the following code:
            FacesContext facesContext = FacesContext.getCurrentInstance();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            ValueExpression valueExp =
            elFactory.createValueExpression(elContext, "#{data.AppModuleDataControl.dataProvider}",
            Object.class);
            ApplicationModule am = (ApplicationModule)valueExp.getValue(elContext);
            ViewObject emplVO;
            emplVO = am.findViewObject("EmployeeView1");
            emplVO.setNamedWhereClauseParam("empId", "1");I have put this code in the public void processAction(ActionRequest request, ActionResponse response) method. However this does not work when I deploy it.
    Does anyone know if the above code is correct in this case and if there is a better way how I can set this up?

    Hi there:
    Did you add a break point and debug the code to see what is the value for the :empid parameters passed in to your view object?
    If you are sure you have passed in the correct value for ":empid" parameter, then do the following:
    String amDef = "yourAmDef";
    String config = "yourConfig";
    ApplicationModule am =
    Configuration.createRootApplicationModule(amDef,config);
    ViewObject emplVO;
    emplVO = am.findViewObject("EmployeeView1");
    emplVO.setNamedWhereClauseParam("empId", "1");
    empVO.executeQuery();
    which will execute your view object with the new bind variable value and refresh the view.
    Please mark my answer as 'Correct' if it solves your problem, or 'Helpful' if it does.
    Thanks,
    Alex
    Edited by: Alexbie on 27-Aug-2010 8:52 AM

  • Is it possible to change the values of fields In Me21n tansaction?

    I Have to put in some logic to change the values of already existing Shipping condition field in the SHIPPING subscreen at the Line item level in ME21n transaction.
    I searched for the user exit to do soo. Did not find anything to do this. I would like to know if it is possible through some other way.
    thanks
    shubha

    Hi Shubha!
    You might use BAPI_PO_CHANGE. Even if there would be a user exit / BADI, then execution is not sure.
    You said: 'already existing shipping field' -> exits of a transaction are only executed during maintenance, not afterwards.
    So maybe you have to make your changes completely outside of PO.
    Still have a look at BADI ME_PROCESS_PO_CUST, there are a lot of methods and one might help you.
    Regards,
    Christian

Maybe you are looking for

  • Session could not be started

    Hi I'm using a PC with Windows Vista, my iPhone is using software version 2.2.1 and iTunes version 8.1.1.10 I can sync it with the laptop fine, but when I try and back up my phone I get the message: iTunes could not back up the iPhone with "phonename

  • DBCA- dataBase creation

    Hi Alls I have created additional database, also has selected sample schemas for this database during the creation of DB. It has created the new database folder in oralce_home under the ADMIN directory but it has not created new control files ,redo l

  • Non leading ledger (V3) shows wrong fiscal year

    Hi All, I am using leading ledger for USA (K4) and Non-leading ledger for local GAAP, India (V3). while posting into Asset Accounting, it is recorded properly bu when i am executing report for Asset accounting, i am geting the information in V3 for 2

  • Data Migration Legacy data date

    Hi, I have the following query with regard to the data migration of the Employee Master data: The legacy data of the employee starts from the date 01.01.1970. During the data upload do I need to create the employee record in SAP backdated to 01.01.19

  • Reset flag

    Hi Experts I need an advice for the below case. A flag which is set in the EBAN must be reseted. This is the programm. It doesn't do that. What can be reason for that. This is the Function Module Call from SAP SRM System with destination command. CAL