Help! How to retain the OutputText component status in the browser when the restore operation is called?

I managed to apply the texts of edtiable as output check the CAPTCHA function by using clientListener and serverListener. a group of texts are displayed using the tags < ad: iterator > in the output page, when you click on a text of output, it is alternated with the status of selected or deselected.

then click on the button restore to call the application module restore operation, chose these texts out status will be clean in brower he but correspong values on the server side are still in selected state.

My problem is that how can I retain the OutputText component status in the browser when the restore operation is called?

I have also some ADF DURATION issues:

a. when operation rollback is called, will be updated on all the components in the page?

b. when I set "binding" compenent properties < ad: iterator > related to the backing bean property, why is there only one child to < ad: iterator > compenent: activeOutputText, not a collection of activeOutputText?

c. when I try to set the property 'id' of activeOutputText with #{terminalItem.AbbrTerminalM} and run and it prompted this invalid id value. real value of this EL is alphabetical.

JSF page:


        <af:resource type="javascript">
            function processTerminalCodeClicked(event){
               var source = event.getSource();
               var terminalCode = source.getProperty("terminalCode");
               var isChecked;
               if(source.getInlineStyleProperty("background-color")!=""){// selected
                  source.setInlineStyleProperty("background-color","");
                  isChecked = false;
               }else{// not selected
                  source.setInlineStyleProperty("background-color","#94ff94");
                  isChecked = true;
               }
                AdfCustomEvent.queue(source, "terminalCodeClicked",  {'terminalCode' : terminalCode, 'terminalCodeChecked' : isChecked},  false);
            }
           
           
        </af:resource>

...


<af:iterator id="i1" value="#{bindings.TerminalView11.collectionModel}" var="terminalItem" rows="100">
                                            <af:panelGroupLayout id="pgl6">
                                                <af:activeOutputText  value="#{terminalItem.AbbrTerminalM}"
                                                                     id="aot1" clientComponent="true"
                                                                     inlineStyle="cursor:pointer; ">
                                                     <af:clientListener type="click"
                                                                       method="processTerminalCodeClicked"/>
                                                     <af:clientAttribute name="terminalCode"
                                                                    value="#{terminalItem.TerminalC}"/>
                                                     <af:serverListener type="terminalCodeClicked"
                                                                   method="#{pageFlowScope.yardPlanControllerManagedBean.processTerminalCodeClicked}"/>
                                                 </af:activeOutputText>
                                        </af:panelGroupLayout>
</af:iterator>

Managed bean:

private List terminalCodeList = new ArrayList();
....
public void processTerminalCodeClicked(ClientEvent clientEvent) {
      String terminalCode = (String)clientEvent.getParameters().get("terminalCode");
      Boolean terminalCodeChecked = (Boolean)clientEvent.getParameters().get("terminalCodeChecked");

      if(!terminalCodeChecked.booleanValue()&& terminalCodeList.contains(terminalCode)){
          terminalCodeList.remove(terminalCode);
      } else if(terminalCodeChecked.booleanValue() && !terminalCodeList.contains(terminalCode)){
          terminalCodeList.add(terminalCode);
      }
      if(terminalCodeList!=null && !terminalCodeList.isEmpty()){
         setValueToSession("currentTerminalCodeList", terminalCodeList);
      }else{
           FacesContext ctx2 = FacesContext.getCurrentInstance();
           FacesMessage msg2 = new FacesMessage(FacesMessage.SEVERITY_ERROR,"no terminal is selected!", "Please at least select one terminal!");
           ctx2.addMessage(null, msg2);
      }
}

I managed to reslove parts of the problem and the selected state of the output text can be kept now.

Remember the State selected in the list in bean managed, trigger refreshing of the page layout group containing all the output text and selected status of the output is determined by inlineStyle = "#{pageFlowScope.yardPlanControllerManagedBean.terminalInlineStyle"} "

JSF page:


            function processTerminalCodeClicked(event){
               var source = event.getSource();
               var terminalCode = source.getProperty("terminalCode");
               var abbrTerminalM = source.getProperty("abbrTerminalM");
               var isChecked;
               if(source.getInlineStyleProperty("background-color")!=""){// selected
                  //source.setInlineStyleProperty("background-color","");
                  isChecked = false;
               }else{// not selected
                  //source.setInlineStyleProperty("background-color","#94ff94");
                  isChecked = true;
               }
                AdfCustomEvent.queue(source, "terminalCodeClicked",  {'terminalCode' : terminalCode, 'abbrTerminalM': abbrTerminalM, 'terminalCodeChecked' : isChecked},  false);
            }



 
  
    
    
    
    
   
 

Managed bean:

  private List abbrTerminalMList = new ArrayList();

    public void processTerminalCodeClicked(ClientEvent clientEvent) {
      String terminalCode = (String)clientEvent.getParameters().get("terminalCode");
      String abbrTerminalM = (String)clientEvent.getParameters().get("abbrTerminalM");
      Boolean terminalCodeChecked = (Boolean)clientEvent.getParameters().get("terminalCodeChecked");
      if(!terminalCodeChecked.booleanValue()&& terminalCodeList.contains(terminalCode)){
          if(terminalCodeList.size()>1){
              terminalCodeList.remove(terminalCode);
              abbrTerminalMList.remove(abbrTerminalM);
          }
      } else if(terminalCodeChecked.booleanValue() && !terminalCodeList.contains(terminalCode)){
          terminalCodeList.add(terminalCode);
          abbrTerminalMList.add(abbrTerminalM);
      }
     AdfFacesContext.getCurrentInstance().addPartialTarget(terminalsPanelGroupLayout);
    }

    public String getTerminalInlineStyle() {
        String inlineStyle = "cursor:pointer;";
        if(terminalActiveOutputText != null){
            String abbrTerminalM = terminalActiveOutputText.getValue();
            if(abbrTerminalM != null && abbrTerminalMList.contains(abbrTerminalM)){
               inlineStyle = "cursor:pointer;background-color:#94ff94";
            }
        }
        return inlineStyle;
    }

Tags: Java

Similar Questions

  • How to undo the restore operation (factory settings).

    I did a system restore to original factory setting on windows vista.lost all my data and photos of family that have been saved on my PC. How can I get that back. Help, please

    Hello

    a clean install wipes the hard drive clean of everything

    You cannot undo what you've done

    If you have lost data, you can try this

    http://www.Piriform.com/Recuva

    Read also:

    Since we don't know exactly how you reinstalled it seek a windows.old folder

    How to restore your personal files after you perform a custom Windows Vista or Windows 7 installation

    http://support.Microsoft.com/kb/932912

    or even return to a previous operating system by using the information in file window.old at the link below

    http://support.Microsoft.com/kb/933168

    If the above does not work:

    Try the data recovery experts

    but they are very expensive

  • How to check the internal operations, Manager of competitor status in Oracle Apps R12 of en

    Step by step how to check the internal operations, Manager of competitor status in Oracle Apps R12 of front end and how to start their.

    Richa says:
    Step by step how to check the internal operations, Manager of competitor status in Oracle Apps R12 from front end

    Simultaneous treatment - platform generic competitor Manager Questions / answers [ID 105133.1]

    and how to start the

    (1) using the adcmctl.sh (from the backend)
    (2) using the button Activate (from front) - http://docs.oracle.com/cd/E18727_01/doc.121/e12893/T174296T174302.htm#4334248

    Thank you
    Hussein

  • How to stop the abandoned operation messages for the opening of the games on Facebook?

    Original title: how to stop the abandoned operation messages

    When I connect to my facebook and began to open the game or any game I get this error operation failed and it want start the game... I can open facebook and update the games, but it won't play...

    Hi Annspikes,

    1. what browser do you use?

    2. This only happens with Facebook game?

    3. you remember to make changes to the computer before this problem?

    If you use Internet Explorer, you can read the following article and check.

    Why do I get an "Operation aborted" error message when I visit a Web page in Internet Explorer?

    Hope this information is useful.

  • Need help - how to open the 2007wfp cover? Monitor has intermittent problem with vertical sync.

    To open the lid of my 2007wfp monitor I removed the 4 screws located on the site where the monitor gets attached to the bar, but the cover will come off the coast. There must be some tighten hidden somewhere, which I couldn't find.

    Does anyone know how to open the box?

    Is there a manual to repair available somewhere?

    Any help is greatly appreciated!

    Message edited by HEW399 on 03/28/2008 19:42

  • Help, how to query the database using pagination

    Hello

    How to query the database using paging for large data.

    any API for this?

    Thank you in advance!

    Hello

    You can specify XmlQueryContext::Lazy as the type of assessment and only call XmlResults:: next() comes as many times as you need.

    John

  • How to remove the load operating system prompts for options in Dual boot

    Original title: remove the extra operating system - without a rear-updisc!

    I need to remove an additional laptop operating system, but don't have not a disk of re - install the operating system, I don't want.

    I bought a laptop with Windows Vista. My father also uses the laptop, but hate Vista, so it has installed an older operating system. Fortunately now he has his own laptop, and I am free to remove the old operating system (it slows things down!). How can I do this without a backup of Windows Vista disk?

    Thanks for any advice.

    Hello

    I suggest you go through the steps and check if it helps.

    Right click on my computer

    (a) click on properties

    (b) go to the Advanced tab

    (c) click on settings under startup & recovery

    (d) change the seconds to display the operating system to 0

    (e) to the operating system you want to start the default operating system to help the drop drop-down

    (f) click Ok

    (g) click on apply

    (h) click Ok

    I would also ask you to contact the manufacturer of the hardware for the recovery media. You can also check if the system has a recovery partition, and if so, try to access, which will reinstall the original operating system.

    See also:

    http://support.Microsoft.com/kb/888023

    I hope this helps.

  • How to get the restore to factory for Lenovo x 220 CD

    I have a 220 X thinkpad but unfortunetly I don't have the CD to factory default before reformatting now how to get it and where do I buy this from?

    Welcome to the community!

    Call Lenovo Service. they should be able to provide. You can find your country here phone numbers:

    http://support.Lenovo.com/en_US/feedback/detail.page?LegacyDocID=MIGR-76613

    I hope this helps.

  • How to make the comparison operation in the same column

    Hello

    here to fix vi I want to make the comparison of the 3rd column operation.

    I tried with different ways, but I didn't want to result.

    Please guide me how to compare the column value with the previous measured all 3rd.

    I want to compare the current value with the previous value, and if the current value is less, one of the previous then LED must be OFF.

    Thank you very much.

    Same basic idea, but less code...

  • HOW YOU REPALCE THE WINDOWS operating system (Vista) YOU LOST IN THE REMOVAL of a VIRUS?

    I contracted a virus called viruses 'The FBI'. When removing this virus, I lost my OS (WINDOWS VISTA), I was eager to replace it. I don't have the original product key.  I would also like to know if I could tell her, Windos XP or Windows 7 upgrade? Thank you for your quick response and aaccurate.

    Lustn

    Hello

    XP is not an upgrade, and you can buy XP or Windows 7.

    XP is no longer marketed by Microsoft or main computer for many years manufacturers.

    There are several methods to reinstall Vista.

    There is no Windows Vista downloads available from Microsoft.

    You can contact your computer manufacturer and ask them to send you a set of recovery disks.

    They should do this for a small fee.

    To reinstall Vista using their recovery disk/s, you start from the 1st recovery disk they provide and follow the manufacturer's instructions to reinstall:

    You need to change the Boot order to make the DVD/CD drive 1st in the boot order:

    How to change the Boot order in BIOS:

    http://pcsupport.about.com/od/fixtheproblem/SS/bootorderchange.htm

    "How to replace Microsoft software or hardware, order service packs and replace product manuals.

    http://support.Microsoft.com/kb/326246

    And if you have never received a recovery disk when you bought your computer, there should be a recovery Partition on the hard drive to reinstall Vista on how you purchased your computer.

    The recovery process can be started by pressing a particular combination of the key or keys at startup. (Power on / start)

    Maybe it's F10, F11, Alt + F10, etc., depending on the manufacturer.

    Ask them to the proper key sequence.

    And if you do not score a manufacturer of recovery on your hard drive, you should be able to make your own recovery from her disks to reinstall the operating system.

    Go to programs > name of the manufacturer of your computer > then their system or recovery tools software topics for them, depending on how it is formulated.

    If you can't find any reference to it, contact the manufacturer for advice on how to make these recovery disks.

    Some manufacturers have more available Vista recovery disks.

    If this happens, you may need to try this instead:

    You can also borrow and use a Microsoft Vista DVD, which contains the files for the different editions of Vista (Home Basic, Home Premium, Business and Ultimate) must be installed. The product key on your computer / Laptop box determines what Edition is installed.

    Other manufacturers recovery DVDs are should not be used for this purpose.

    And you need to know the version of 'bit' for Vista, as 32-bit and 64-bit editions come on different DVDs

    Here's how to do a clean install of Vista using a DVD of Vista from Microsoft:

    "How to do a clean install and configure with a full Version of Vista '

    http://www.Vistax64.com/tutorials/117366-clean-install-full-version-Vista.html

    And once the operating system is installed, go to your computer manufacturer's website and get the latest drivers for your particular model or laptop computer.

    And phone Activation may be necessary when you use the above installation method.

    "How to activate Vista normally and by Activation of the phone '

    http://www.Vistax64.com/tutorials/84488-activate-Vista-phone.html

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    Go to your computer / computer laptop manufacturer Web site and see if Windows 7 drivers are available for your make and model computer / laptop.

    If this is not available, Windows 7 will not properly work for you.

    Run the "Windows 7 Upgrade Advisor.

    http://www.Microsoft.com/en-US/Download/details.aspx?ID=20

    Check if your specifications are compatible for Windows 7:

    "Windows 7 system requirements"

    http://Windows.Microsoft.com/en-us/Windows7/products/system-requirements

    "Windows 7 Compatibility Center" for software and hardware:

    http://www.Microsoft.com/Windows/compatibility/Windows-7/en-us/default.aspx

    Windows 7 upgrade paths:

    http://TechNet.Microsoft.com/en-us/library/dd772579 (v = ws.10) .aspx

    «Installation and reinstallation of Windows 7»

    http://Windows.Microsoft.com/en-us/Windows7/installing-and-reinstalling-Windows-7

    See you soon.

  • How to remove the old operating system and install the new system?

    Dear Sir/Madam,

    I have install start windows 7 now I try to install vista but the system was correpted he opened not how remove both on the hard drive and install the new operating system.

    Hello

    Restart installing dual boot.

    "How to set up a Dual Boot Installation with Windows 7 and Vista"

    http://www.SevenForums.com/tutorials/5166-dual-boot-installation-Windows-7-Vista.html

    Or this way:

    "How dual boot Windows Vista and Windows 7 (Vista installed first)."

    http://apcmag.com/how_to_dual_boot_windows_vista_and_windows_7_vista_installed_first.htm

    «Dual Boot Windows 7 with XP/Vista in three easy steps»

    http://www.TechSpot.com/guides/143-dual-boot-Windows7/

    See you soon.

  • How to reset the restoration of the system to a previous date?

    HOW DO I LEFT A PREVIOUS RESTORE POINT WHEN IT MAINTAINS THE RESET TO TODAY'S DATE?

    TRIED TO PUT IN A RESETTING KEEPS EARLIER DATE, BUT IT TO TODAY'S DATE.

    Hello

    You can't redo a previous system restore point

    How to use the system restore

    http://www.windowsvistauserguide.com/system_restore.htm

    _________________________________________________

    There are a variety of reasons for system restore problems

    Norton and Norton product Tamper Protection is the main

    Read about it:

    http://us.Norton.com/support/kb/web_view.jsp?wv_type=public_web&docURL=20101101224849EN&LN=en_US

    http://Service1.Symantec.com/support/sharedtech.nsf/pfdocs/2005113009323013

    You can try restoring the system in safe mode

    http://www.windowsvistauserguide.com/system_restore.htm

    Windows Vista

    Using the F8 method:

    1. Restart your computer.
    2. When the computer starts, you will see your computer hardware are listed. When you see this information begins to tap theF8 key repeatedly until you are presented with theBoot Options Advanced Windows Vista.
    3. Select the Safe Mode option with the arrow keys.
    4. Then press enter on your keyboard to start mode without failure of Vista.
    5. To start Windows, you'll be a typical logon screen. Connect to your computer and Vista goes into safe mode.
    6. Do whatever tasks you need and when you are done, reboot to return to normal mode.

    and malware can interfere with the restoration of the system

    Download update and scan with the free version of malwarebytes anti-malware

    http://www.Malwarebytes.org/MBAM.php

    You can also download and run rkill to stop the process of problem before you download and scan with malwarebytes

    http://www.bleepingcomputer.com/download/anti-virus/rkill

    If it does not remove the problem and or work correctly in normal mode do work above in safe mode with networking

    Windows Vista

    Using the F8 method:

    1. Restart your computer.
    2. When the computer starts, you will see your computer hardware are listed. When you see this information begins to tap theF8 key repeatedly until you are presented with theBoot Options Advanced Windows Vista.
    3. Select the Safe Mode with networking with the arrow keys.
    4. Then press enter on your keyboard to start mode without failure of Vista.
    5. To start Windows, you'll be a typical logon screen. Connect to your computer and Vista goes into safe mode.
    6. Do whatever tasks you need and when you are done, reboot to return to normal mode.
  • How to get the phone in ongoing call screen

    It is a follow-up on the menu of the phone not shown thread.

    I checked with the KB and found an interesting topic: How - to upgrade a screen on the main event Thread

    My original question (as can be seen in the thread has already been mentioned) was to know how to draw something on the screen of the phone.

    Example:

    (1) a user accepts a call.

    (2) my application implements PhoneListener and in callConnected() just draws a picture on the top of the phone application

    (3) all the features of the phone (menu of the phone for example) are preserved.

    The article mentioned shows that it is possible to draw something on a screen.

    How can I get an instance of the phone screen?

    Here is my proposal (but it does not work):

    public void callConnected(int arg0){ UiApplication.getUiApplication().invokeLater(new Runnable()        {
    
                public void run()            {                Screen screenName = UiApplication.getUiApplication().getActiveScreen();                //Perform screen changes here.                Graphics g = screenName.getGraphics();                g.setColor(0xFF8080);                g.fillRect(10, 10, 100, 100);                //Calling invalidate() on your screen forces the paint                 //method to be called.                 screenName.invalidate();            }        }); }
    

    How to make the getUiApplication() to pick up the phone?

    Do you ever feel like you're talking to yourself ?

    That's what I had:

    //Calling invalidate() on your screen forces the paint                 //method to be called.                 screenName.updateDisplay();                //screenName.doPaint();                //screenName.invalidate();
    

    Why the work of updateDisplay doPaint (as well as his brothers and sisters invalidate()) does not work?

    But, alas, my efforts have been in vain.

    The 'red square' disappears when something is painted on them -ruins it a bit.

    So, I guess, my quest continues.

    Someone has an idea how draw a persistent image on the VoiceApp and always to enable all the features of VoiceApp (menu, for example)?

  • How to use the host operating system

    According to best practices, how he the host operating system should be used. Applications must be installed on the HOS or it must be installed in HOS and GOS be left to access the application in the virtual machine.

    I would like to create two virtualized partitions

    (1) HOS

    (2) GOS 1

    (3) GOS 2

    So I would like to know if any heavy application must be installed in HOS.

    Keep all the stuff on the guest has some advantages

    -You can run it anywhere where you have a VMWare host. This gives you great flexibility.

    -You can create easy backups, no need to set up the entire operating system again and again and install all applications again and again.

    -You can easily freeze the State of operational guest before making any changes (see before).

    -Depending on your environment, you become what some independent business strategies.

    AWo
    VCP / VMware vEXPERT 2009

    = Due to a lack of employees, human beings humans are working here. -Treat it with care, they are rare. =

  • How to avoid the SORT operation.

    Hi gurus,

    Oracle version is 11.1.0.7

    I have a select query that has Row_number() over (Partition of col1, col2 order by col1, col2 desc nulls last) function to eliminate the DUP on these two passes.

    Here it costs 4639 for sorting. Now, I added a two other columns in the query Select (has not changed the Row_number analytic function).

    COST of sorting is now 555635.

    This sort operation may use Temp table space. How to avoid the cost of SORTING.

    Note: I use the function analytical only to eliminate duplicates on Col1 and Col2 only.

    How to sort takes a large part of the COSTS by adding only two columns in the select list.


    Any Suggestions...?


    Thank you
    Mike

    I would say:
    1 don't worry unnecessarily about the cost of sorting - do you know if you have a problem.

    2. in general, eliminate from the beginning, sort late (i.e. After you have eliminated all you can)

    3. If you are concerned by the outpouring sort on the disc then you could go to manual management of pga (assuming that you are currently using automatic) for this particular operation and override sort_area_size.

Maybe you are looking for