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

Similar Messages

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

  • How to disable or change the value of h:commandlink jsf component

    Hi,
    I am a student. I am using h:commandlink. I need to change the value of the component once it is clicked by the user. How do i do that?
    If i cannot change the displayed value of the commandlink. I am thinking of atleast disabling the link once the user clicked., to avoid the link being clicked more than once by the user.
    <h:commandlink id = "follow" action = "usermanager.followdoctor" value = "Follow"/>
    Usermanager is my managed bean class for this jsp page. The value "Follow" is the one that i want to be changed to "following" once it is clicked. Please help me. Thanks for your time in advance.

    Hello qimbal2,
    Thanks for getting back to me. you are right , i should disable the link as soon as it is clicked. I went ahead and implemented this logic by using a property in my bean class and binding that property to the value of my link. I wrote the logic in my action method in such a way that when i click on follow for the first time, the value of the link would change to 'Following' and the link would be disabled. It works for me now.
    Thanks,
    Suha

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

  • Getting a value of an input text component in backing bean

    I have created an input text component on a page where I will be entering a number, setting Autosubmit feature as true. ValueChangeListener property is set as #{test.displayTable} where displayTable is a method defined in test managed bean.
    Now I know to fetch the value entered in input text component by creating a RichInputText variable in Advanced property.
    But in case the Advanced property is blank, then how will I be able to retrieve the value of it? This is the code. I am not able to get the value entered in the component. I can't even find any getvalue method for it.
    FacesContext facesContext = FacesContext.getCurrentInstance();
    UIViewRoot root = facesContext.getViewRoot();
    RichInputText inputText = (RichInputText) root.findComponent("it1");  // it1 is the id of the input text component
    System.out.println("inputText: "+inputText);On using sop statement, this is the output which is getting generated, while I had entered 90.
    inputText: RichInputText[UIXEditableFacesBeanImpl, id=it1]

    One more thing. Once the VO is getting refreshed, I am able to display an inline message saying that 'Table refreshed Successfully!' (refer the code)
    But in case if the user doesn't enter anything, and press TAB button, I want to display an error message exactly besides the input text component, saying that 'Please Enter an Integer.' According to my understanding, if the user enters a null value then while casting string to Integer, it will throw an exception, so I will be writing the code in the catch part. Any suggestions?
    public void displayTable(ValueChangeEvent valueChangeEvent) {
            BindingContext bctx = BindingContext.getCurrent();
            BindingContainer bindings = bctx.getCurrentBindingsEntry();
            OperationBinding method = (OperationBinding)bindings.get("displayEmployeeTable");
            try {
                Integer getValue = Integer.valueOf(valueChangeEvent.getNewValue().toString());
                System.out.println("getValue: " + getValue);
                method.getParamsMap().put("deptId", getValue);
            } catch (Exception e) {
            method.execute();
            FacesMessage message = new FacesMessage("Table refreshed Successfully!");
            message.setSeverity(FacesMessage.SEVERITY_INFO);
            FacesContext fc = FacesContext.getCurrentInstance();
            fc.addMessage(null, message);
        }Edited by: Sonull on Jan 12, 2013 3:56 PM

  • 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

  • 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

  • Copy the values input in input text 1 to input text 2 using value change listener

    Hello ,
    I have two input texts :
    input text 1 & input text 2 .
    I need to copy the values input in input text 1 to input text 2 .
    How do I implement this using value change listener ?
    I did the following steps :
    1) I selected input text 1 and chose Value Change listener --> edit .
       Typed a new bean & class name .
       Which method name should I add ?
    Any help please ?

    Hi,
    Give any name to the method and bind the two input text to manged bean using bindings attribute of InputText. just follow the below given code
    Ex:
    test.java class
        private RichInputText inputVal1;
        private RichInputText inputVal2;
        public Test() {
        public void ValChange(ValueChangeEvent valueChangeEvent) {
            // Add event code here...
            inputVal2.setValue(inputVal1.getValue().toString());
        public void setInputVal1(RichInputText inputVal1) {
            this.inputVal1 = inputVal1;
        public RichInputText getInputVal1() {
            return inputVal1;
        public void setInputVal2(RichInputText inputVal2) {
            this.inputVal2 = inputVal2;
        public RichInputText getInputVal2() {
            return inputVal2;
    test.jspx page
    <af:inputText label="Label 1" id="it1" valueChangeListener="#{backingBeanScope.TestBean.ValChange}"
                                  binding="#{backingBeanScope.TestBean.inputVal1}" autoSubmit="true"/>
                    <af:inputText label="Label 2" id="it2" binding="#{backingBeanScope.TestBean.inputVal2}"
                                  partialTriggers="it1"/>
    Thanks
    nitesh

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

  • How can I change the value used in a Criteria Rule in a Subscription agent

    Dear mobile heroes.... How can I change the value used in a Criteria Rule in a Subscription agent in a quality environment? (CRM 70 SP04).
    I have built a subscription agent in dev, which uses a static where clause to filter activity_object on VKORG. I need to filter on a different VKORG value in the quality environment, but when I change the value of the sales org, the change is not saved. I have tried this even non 'activated'  subscription agents, but it still does not appear possible to change and save the changes.
    This poses a big problem because the VKORG value I want to use does not even exist in the dev environment, so I could not even rebuild in dev and transport the new agent to quality. Can anyone help me?

    Too old to care now.

  • How to change the value of Valuation class.

    dear friends:
    i want to change the value of Valuation class in the material master .but system  warning info occurs .
    The valuation class cannot be changed
    Message no. M3 368
    Diagnosis
    You wanted to change the valuation class. However, this is not possible because one or more of the following already exist for the material:
    Valuated stocks in the current period or in the previous period
    Open purchase orders or delivery schedule lines
    Production orders for which a goods movement has already taken place
    System Response
    Your change is reset by the system.
    Procedure
    If valuated stocks already exist, you can change the valuation class only as follows:
    a) Post the stocks of the material to an interim account.
    b) Change the valuation class in the material master record.
    c) Post the stocks of the material back to their original account.
    If open purchase orders already exist, you can only change the valuation class if you first flag the corresponding purchase order items for deletion.
    If production orders exist for which a goods movement has already taken place, you can only change the valuation class if you first set the status of the production orders to Deleted.
    Procedure for System Administration
    In Customizing for the Material Master, you can switch the check for open purchase orders and/or for production orders to a warning. You do this in Define Attributes of System Messages by assigning the message type Warning to message MM 326 and/or MM 327 respectively. However, first ensure organizationally that further processing of the open purchase orders or production orders cannot result in inconsistencies.

    To resolve SAP error message M3 368 I would suggest that you refer to SAP note number 1967543. This note outlines the issue and a resolution to it:
    Please have a look at the description of the error M3 368. This error may occur if one or more of the following already exist for the material:
    1. Valuated stocks in the current period or in the previous period
    2. Open purchase orders or delivery schedule lines
    3. Production orders for which a goods movement has already taken place
    Resolution:
    If you have valuated stocks in the current period or in the previous period, you will get message "Stocks already exist.". You have to clear all the stocks both in current period and previous period. Please have a look at SAP Note 30656, it shows an example on how to clear the stocks in
    previous period. You can use transaction MIGO to execute this step.
    If you have open purchase orders or delivery schedule lines, you will get message "Purchase orders already exist.". You can find related purchase orders after you click 'Display Error' button. Please delete them in transaction ME22N.
    If you have production orders for which a goods movement has already taken place, you will get message "Production orders already exist.". Please archive these production orders. You need to set deletion flag for these orders firstly and go to SARA, use archiving object PP_ORDER to archive
    these orders.
    Kind regards,
    James

  • How to change the value of project data in the BPM instance?

    Hi Everybody,
    I have a situation that after the bpm instance was created. We found that one of the project data/variable contains the incorrection information. Is it a way we can change the value of that project data/variable? I checked the BPM workspace, as administrator, there are not function for it and we can't stop/withdraw the instance. Can we change the MDS database for it? Please advise. It is so important for us that will stop us to move on of our project.
    Thanks

    As per my knowledge we can not change the value of BPM project variables from outside BPM. If you look at PAPI API also you will find methods to get values from BPM but not to set to BPM.
    If this is daily issue for your application then change your design to add a Edit Data Activity (Screen) and then use Grab functionality to get the control to this Edit Data Activity to change the required data.
    Else if it is an issue with the only one instance then it is better to Abort this instance and re-create the instance with correct data. Changing value in the MDS database is not encouraged.
    Hope this helps.

  • How to change the value of "DenyOnNotProtected " in OAM 11g

    Hi,
    I just wanted to know how we can change the value of the parameter "DenyOnNotProtected " in OAM 11g. In the documentation it is mentioned that we can't change the value. When I tried from console, I am not able to. Is there any other way to do this?
    Thanks,
    Srikanth

    Hi Colin,
    Thanks for the update. What you said is correct. Even though I change the attribute its updating in console (check box). But behavior is not changing. Even setting Antonymous authentication also seems to be of no use. Here I am integrating WebCenter with OAM. I have done all the configurations as per Oracle documentation. But when I try to access a protected URL (say https://oimtest.example.com/webcenter/adfAuthentication with a valid user creds, I am getting the error: Access to the URL /webcenter/oracle/webcenter/webcenterapp/view/templates/publichtml/LandingGateway.jsp has been denied for the user. I have made /webcenter/.../* as public with Anonymous authentication. Still getting access denied error. What could be the issue?
    Thanks,
    Srikanth

  • 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

  • SPEL? make REASON field required if user has changed the value in SALARY

    I have a requirement to make REASON field required if user has changed the value in SALARY field. Is it possible using spel? what are my options?

    Karan,
    You can change the Rendered Property through personalization.
    But in your requirement you need to attach the Spell through personalization & extend the existing CO to set the value of the SPELL based upon the condition.
    Note - Refer this thread http://forums.oracle.com/forums/thread.jspa?threadID=2176729&tstart=0. If you have worked on SSHRParams kindly help the user.
    Regards,
    Gyan

Maybe you are looking for

  • My iPad will only open Apple apps, the other apps open and then close straight away, how do I fix this?

    My iPad will only open Apple apps, the other apps open and close straight away, how do I fix this?

  • Inserting row in JTable (runtime)

    i need to inserting row in JTable in runtime so tell me what it do

  • CALL_FUNCTION_CPICTERMIO_ERROR

    Hi Gurus, Please suggest on this abap runtime error CALL_FUNCTION_CPICTERMIO_ERROR. This is happening when there is CIF communication between ECC and APO system. The dumps are coming in APO system and the inbound CIF queues are getting locked with SY

  • Some websites are not loading

    Hello, some of the website www.facebook.com  , www.businessinside.com are not at all opening, it doesn't show any error, but seems to be hang/ i tried all known option, clear dnscache, reset safari didn't work, Even other browser in mac book also sam

  • Iphoto can't see my external drive

    Hi, I want all my photo's from Iphoto to go on an external drive I have. But if I click on Export and have to chose a place then I can't click on my external drive because it's not there on the list on the left side... Is there an other why to move a