[BUG]? SelectOneChoice ValueChangeListener works for all elements except one

Hello


I have a SelectOneChoice that displays a warning in different languages.

I have a LOV to select and an input field to display the warning.

Everything works to display the following warning language except for the first choice in the SelectOneChoice.

Here is the method in my bean
    public void languageSelectOne_valueChanged(ValueChangeEvent valueChangeEvent)
    {
     //Update the model
     this.setValueToEL("#{bindings.PageLanguage.inputValue}",
                 valueChangeEvent.getNewValue()); 
     log.info("Selected Value: " +
           JSFUtils.resolveExpression("#{bindings.PageLanguage.attributeValue}"));
     log.info("Display Value: " +
           JSFUtils.resolveExpression("#{bindings.PageLanguage.selectedValue ne ' ' ? bindings.PageLanguage.selectedValue.attributeValues[0] : ''}"));

     BindingContainer bindings = ADFUtils.getBindingContainer();
     DCIteratorBinding iter =
             (DCIteratorBinding) bindings.get("DisclaimerIterator");
     ViewObject disclaimerVo = iter.getViewObject();
     Integer langChosen =
             Integer.parseInt((String) JSFUtils.resolveExpression("#{bindings.PageLanguage.attributeValue}"));
     Object[] keys = new Object[1];
     keys[0] = langChosen;
     Row[] disclaimerRow = disclaimerVo.findByKey(new Key(keys), -1);
     log.info("Rows returned: " + disclaimerRow.length);
     BlobDomain languageText =
             (BlobDomain) disclaimerRow[0].getAttribute("PageText");
     log.info("Page Text length: " + languageText.getLength());
     try
     {
         log.info(new String(languageText.getBytes(1,
                                    (int) languageText.getLength()),
                    "UTF-8"));
         this.getDisclaimerText().setValue(new String(
                              languageText.getBytes
                              (1,
                              (int) languageText.getLength()
                               ),"UTF-8"));
         this.getLangChoice().setLabel((String)disclaimerRow[0].getAttribute("ChooseLanguageText"));
         this.getDisclaimerButton().setText((String) disclaimerRow[0].getAttribute("AgreeButtonText"));
     }
     catch (JboException jboe)
     {
         log.severe(jboe.getMessage());

     }
     catch (Exception e)
     {
         log.severe(e.getMessage());

     }
     AdfFacesContext.getCurrentInstance().addPartialTarget(getDisclaimerText());
     AdfFacesContext.getCurrentInstance().addPartialTarget(getLangChoice());
     AdfFacesContext.getCurrentInstance().addPartialTarget(getDisclaimerButton());


    }
Here's the LOV
SELECT 
    EPSS_WELCOME_PAGE.PAGE_LANGUAGE PAGE_LANGUAGE, 
    EPSS_WELCOME_PAGE.PAGE_ID PAGE_ID,
EPSS_WELCOME_PAGE.PAGE_DEFAULT
FROM 
    EPSS_WELCOME_PAGE
And here is the VO
SELECT EpssWelcomePageEO.PAGE_ID, 
       EpssWelcomePageEO.PAGE_LANGUAGE, 
       EpssWelcomePageEO.PAGE_TEXT, 
       EpssWelcomePageEO.PAGE_DEFAULT, 
       EpssWelcomePageEO.CHOOSE_LANGUAGE_TEXT, 
       EpssWelcomePageEO.AGREE_BUTTON_TEXT
FROM EPSS_WELCOME_PAGE EpssWelcomePageEO
ORDER BY PAGE_DEFAULT DESC, PAGE_LANGUAGE
I have a beforePhase method that set the SelectOneChoice to the first element in the list
    // Before Phase method to set the default language in the selectOneChoice
    public void defaultSelectionOnLoad(PhaseEvent phaseEvent)
    {
     RichSelectOneChoice soc;
     soc =
       (RichSelectOneChoice) JSFUtils.findComponentInRoot("langChoice");
     if (soc != null && soc.getValue() == null)
         soc.setValue(new Integer(0));
    }
The default language is English.

The first time the page is rendered, the warning in English and the selectOneChoice is IN.
I choose different languages in the list and everything works as expected. Then I try to display again the English version, and the newspaper returns a zero on the next line
         log.info(new String(languageText.getBytes(1,
                                    (int) languageText.getLength()),
                    "UTF-8"));
Even if the length of the LOB is equal to 1475 characters

Now if I change the ranking in my query the native language is Bulgarian.
The warning is made correctly, switching between languages, and then re - click the first choice (Bulgarian) returns a null value for the waiver.

The problem has something to do with the first choice in the list.

Thanks a lot for your help.

Kind regards
Senecaux

Published by: Stessy.Delcroix on June 1, 2011 14:33

The ValueChangeListener does not fire when the value is back to the original value. It's expected behaviour (i.e. it is how the JSF engine is designed and implemented) and is not a bug. Take a look at Chris Muir comments in these threads:

{: identifier of the thread = 1098626}
{: identifier of the thread = 1010102}

Dimitar

Tags: Java

Similar Questions

  • TAB key does not work for all elements in forms 10G

    My dear, all I use form 10G.
    I have 10 fields.
    I put property in all previous navigation item elements and the order of the day navigation correctly.
    But when I'm by pressing the TAB key, the cursor does not to another element.
    It works for some fields, but not for all.

    What could be the problem?

    Published by: LuKKa Sep 24, 2010 13:56

    do you have the encodings in key-next-item trigger in one of your items?

  • Customize for all users except a few usernames EBS R12

    Hello

    Does anyone know an easy way to make a customization for all users except a few?

    You can add level > user, value > user name, but it's only for users where this customization is active for, and not the reverse.

    I tried this:

    : OKS_HEADER. STS_MEANING = 'Active' and: $PROFILES$. USERNAME = "CHARLOTTE".

    But it does not work.

    I don't want to make a new responsibility. Is there a solution for this?

    Thanks in advance

    concerning

    ELCO

    Use ${ps.username.value} for USER NAME

    Try this, the condition will be true for other users to "Charlotte" for the personlization

    : OKS_HEADER. STS_MEANING = 'Active' and ${ps.username.value} <> 'Charlotte '.

  • How to create a validation "not null" unique for all elements in a page?

    Hello world

    How to create a validation "not null" unique for all elements in a page? I love textfields. Rather than create "not null" validation for each article, I would like to create a single validation control that will be used

    Thanks and greetings
    Umer

    Nice1 wrote:
    Bob, like u said I did the following:

    (1) less to create a button, there are 9 elements, and for each item, I put in the light of 'yes '.
    (2) under the button Delete, there is 1 point and have in light of the 'Yes' for the item
    (3) validation of the page defined for the 9 items under 'create a button' and put it to fire when 'create' button clicked
    (4) the page validation set for 1 number under 'remove' button and put it on fire when "delete" button clicked

    now, when I click on the 'create' button it shows same for the item under the "Delete" button that's a required element

    Sorry, I do not see this note. The required model will not work, there is no way to attach it to the button.

    The best solution is that the answer only a few answers to the top

    Create 2 validations page type as a PL/SQL with code

    1st validation
    
    :P1_ITEM1 IS NOT NULL and :P1_ITEM2 IS NOT NULL ...... and :P1_ITEM9 IS NOT NULL  include all 9 items
    
    Set the When Button Pressed to the CREATE button
    
    2nd validation
    
    :P1_ITEM10 IS NOT NULL
    
    Set the When Button Pressed to the DELETE button
    

    I think that this will be the best way to do it.

    Published by: Bob37 on April 27, 2012 12:02

  • Windows 7, Firefox 8.0, several user accounts, Firefox seems only to access internet for 1 user, IE works for all

    Most of the users of Win 7 cannot load the pages using Firefox, Internet Explorer works for them.

    One possible cause is security software (firewall) that blocks or limits Firefox or plugin-container process without informing you, possibly after the detection of changes (update) for the Firefox program.

    Delete all rules for Firefox in the list of permissions in the firewall and leave your firewall again ask permission to get full unlimited access to the internet for Firefox and the plugin-container and the update process.

    See:

  • Can I programmatically change the default property to create for all elements of the front panel?

    Can I programmatically change the default property to create for all elements of the front panel?

    I need to make the logout button, when click on, takes care of all the default values of my fron Panel.

    There is no way to programmatically call the functionality of an editor 'Use default' or 'Load Default'. To do it yourself, you will need to write your default values for each control explicitly in the diagram, when the user press the logout button.

  • How to properly temporarily disable all channels except one in the multichannel PID control loop?

    Hi all

    Help me please to solve the problem. How to correctly temporarily disable/enable all channels except one in the multichannel PID control loop?

    Thanks in advance,

    Oleg

    Hi Oleg,

    the entry "Car?" of the AdvancedPID is a table – as well as MS and pv entries.

    So what's the problem say - / allowing for a control (aka of entry) instead of all loop?

  • [basiljs] remove all pages except one

    In a script, I create pages, export to PDF, remove pages and then create a new etc.

    Right now I use this:

    [code]

    for (var j = b.pageCount (); j > 1; j-) {}

    b.removePage (j);

    }

    [/ code]

    But it's really slow. I think that indesign made many calculation after deleting a page (deadline: link textfields) so it would be more efficient to remove all pages at once.

    Now my question is how do?

    I tested and if I delete about 5500 empty pages with the script it takes about 8 minutes.

    If I select all in indesign, and then delete it takes about 10 seconds.

    Another way to speed up a litle is to erase all the content. It will take a long time but probably a bit faster.

    Thing is that I have

    b.Clear (b.doc ());

    but this removes the master page as well and I need to keep the master page.

    In short, how to remove all pages (except one since indesign needs a single page) at the same time?

    Hello

    I will remove a lot of pages in indesign with

    • Use documentPreferences.pagesPerDocument (faster)
    • use while loop or for
    • Close doc without saving changes, and then open again. (in some cases)

    Here's the test code, run with old Macbook Air + CS5 + OSX10.7

    var pp = function (args) {
      $.writeln(args);
    }
    
    var remove_all_pages_use_pref = function (doc) {
      pp("start deleting (use preferences)");
      $.hiresTimer;
      doc.documentPreferences.pagesPerDocument = 1;
      pp("end deleting");
      pp($.hiresTimer);
    }
    
    var remove_all_pages_use_loop = function (doc) {
      var i = doc.pages.length;
      pp("start deleting (while --)");
      $.hiresTimer;
    
      while (i--) {
        if (i==1) {break;}
        doc.pages[i].remove();
      }
      pp("end deleting");
      pp($.hiresTimer);
    }
    
    function main() {
      var doc = app.documents.add();
      $.hiresTimer;
      doc.documentPreferences.pagesPerDocument = 5500;
      pp('# create 5500 pages');
      pp($.hiresTimer);
      var indd = new File("~/Desktop/5500.indd");
      doc.save(indd);
    
      pp("------------");
      remove_all_pages_use_pref(doc);
      doc.close(SaveOptions.NO);
    
      pp("------------");
      pp("# try another way");
      var doc2 = app.open(indd);
      remove_all_pages_use_loop(doc2);
      doc2.close(SaveOptions.NO);
    }
    main();
    

    result

    # create 5500 pages
    30395026
    ------------
    start deleting (use preferences)
    end deleting
    28215999
    ------------
    # try another way
    start deleting (while --)
    end deleting
    268641063
    

    Thank you

    mg

  • Scanner does not work for all users on the computer Windows 7

    Photosmart 7510 Scanner does not work.  My scanner has the habit of work.   Now it does not for one of the three users on my Windows 7 desktop.

    I spent over 3 hours on the phone with HP.   They had me restart the computer, Plug and unplug the printer, reinstall the software twice under different names. The software depending on what user id, it is installed under allows access to the scanner/printer to one or more users.  The scanner works with Windows Paint software for all three nicknames.

    HP response is that some user control prevents the scanner software, who used to work on all three nicknames on the computer, which now works on one or more of the users.  They couldn't tell me which user control need changing.

    The HP solution is to restore my system when I could scan for all users of three.   I don't want to do that.   Does anyone have a better solution?

    The real problem is HP error messages.   When I click on scan a document, there is no answer.  Nothing happened.

    Then I tried to scan using Windows Fax and Scan.   I got an error message which helped me locate the source of the error.   I was able to fix the problem without creating a new user account.  I had deleted bu error the file MY Document.   Restore this file fixes the problem.

  • Site works in all browsers except IE - please help!

    I worked on this site for quite awhile. Throughout, I watched it in all browsers, I have access to, as well as on various computers.

    It worked fine on all but cut corners on some versions of Internet Explorer.

    Now that he is almost ready to launch, I find that for some reason seen in Internet Explorer, none of the links work. All other browsers seem to work OK.

    This could be due to 11 THE who recently launched? I know that it worked on IE not long ago.

    Here is the link

    http://2ndlookgraphics.com/CattAbstract/index.html

    I really need help on what the customer is present to its Board of Directors tomorrow.

    I work currently in Dreamweaver CC - I've just updated and do not know if I could have accidentally done something while trying to get used to the new interface.

    Thank you

    -Cathy

    Links seem to work in IE9, but I'm a little worried about that in your CSS code.  Positioning is not usually necessary on the body tag.  And a z-index of-10 could potentially cause usability problems.

    {body

    Color: #333;

    background-image: url (images/bkg - 3.jpg);

    background-repeat: repeat-x;

    text-align: center;

    margin: 0px;

    position: relative;

    ;

    background-color: #E2DEC5;

    }

    Nancy O.

  • Cannot recolor work for all vector objects?

    Hi all

    I used the trace function to create a vector. I can recolor work on some objects in Vector, but others, he has no option to recolor. Did someone knows why and it is possible to see Recolor options for all items?

    Work to redefine colors is a great tool for the Recolor of specific colors in the work without having to select specific objects and and change the shade used for this object. If you select all and access the Recolor feature, you should see all the color charts for all of the selected art and modify a shade of color throughout the work. There is a lot more to this function, but for what you do, it's a quick and easy way to make color changes to all items colored with a specific shade. See the online help, help > using Illustrator to recolor the most.

    Here is a tutorial if you are also interested.

    http://rwillustrator.blogspot.com/2009/01/tutorial-recoloring-artwork.html

  • Master page with rollover menu, using States, does not work for all pages?

    Hello.

    I created my masterpage with a basic at the top menu. It has two States. The 1st State is normal and State 2 is a simple rollover behavior, just a different color.

    Why my menu would work perfectly on the page ' 01', but then the reversal function does not work for other pages? (portfolio 03 etc.). She has just the hoverover slider and the link, but the color does not change.

    I have something wrong?

    Thanks a lot for all the help on these forums

    Make sure that all the subpages have a second State added to them. You

    do not put any content on this State, but it must be present

    the transfer of work from the watch page.

    If you do not already have that second State, trying to link then cancelled

    the subpages of the master page. I came across this scenario recently

    because I had created a master page after some of my subpages have been

    already built.

    HTH

    Jim Babbage

  • clear all items except one

    Hello all,.

    Can someone tell me how can I create a process that erases all the elements of a page except one Singel. I don't want a list of all the items on the process. Thanks in advance.

    I use Apex V4



    Zeng

    What is

    DECLARE
      lc_item_name VARCHAR2 := ''; --Name of the Item
      lc_item_value VARCHAR2;
    BEGIN
      --Get the Value of Special Item from Session
      lc_item_value := v(lc_item_name);
      --Clear the Page Cache
      APEX_UTIL.CLEAR_PAGE_CACHE (p_page => );  --Use the page whose cache has to be cleared
    
      --Set the session state of the item once again
      APEX_UTIL.SET_SESSION_STATE (p_name     => lc_item_name
                                                       ,p_value      => lc_item_value
                                                       );
    
    END;
    

    Alternatively, if the same thing using a branch that clears the cache of the page and in the section of item value, specify the name of the item in the to and from fields.

  • IPhone 6s - microphone does not work on all applications except camera and calls

    Hey, I don't know exactly know what happened with my phone. Suddenly, my microphone work on LINE, Whatsapp and almost all other applications that use mic. Except, camera and when someone call me on my number.

    But it does not work on whatsapp and LINE calls. And it also does not work when I snapchat. Only works on the default camera Apps and call through my number.

    I tried:

    -restart my phone

    -hard reset and blink? Reset with the power and the "home" button.

    -read the micro support page. Still no solution.

    TL; Dr:

    my microphone does not work on every apps on my phone except calls through number and approx. of default camera it gives you just that silence when I play it on voice notes. But it works when I record yourself using videos on the default camera app.

    Hello Bllacke,

    Thank you for using communities of Apple Support.

    I see from your post, some applications have a problem to access your Microphone. I know how it is important to ensure that your applications have access to the Microphone and can use this feature. I have a few things I want to try.

    First, tap Settings on your iPhone and then scroll to the last section that lists your apps. Select the applications that use the microphone and make sure that the Microphone is activated (green).

    Then, follow the steps in the article below to close these applications:

    Force a nearby application on your iPhone, iPad or iPod touch

    Then, test the microphone in these applications again and see if it works.

    Best regards.

  • Windows Vista does not work for all programs requiring administrator rights

    I have Windows Vista Business SP1 on a Dell XPS laptop. He worked from 3-4 years. It seems that after a recent update (in the last week), I rebooted the laptop and after that Vista can not run programs that require administrator privileges. This includes most of the items in the Panel, the observer of events, computer management, elevated command prompt and so on.

    After logging in, I get a notification of the task bar that says "Windows cannot connect to the customer service group policy."

    When I try to any program requiring administrative privileges (for example, msconfig), I get an error "Windows cannot find C:\Windows\system32\msconfig.exe. Make sure you typed the name correctly and try again"

    I restored the system (from safe mode) for a day where it seems to be ok, but the problem remains.

    The sound in the system tray icon is a trademark of the Red Cross on it, but sounds work ok.

    Analyses of virus through McAfee (all installed updates and latest virus definitions) showed no signs of the virus.

    As already mentioned in the original post, System Restore does not resolve the problem. I got to the new vista installation to fix the problem. Some windows updates and reboot after applying the update seems to be the cause.

Maybe you are looking for