Visible = "true" and partialtriggers of the problems when you are using "necessary".

Hi, I think that I have not had my coffee today, but is it possible to have the following?

Panelformlayout with a selectOneChoice and three inputText elements. "Visible" from each inputText attribute is based on the value selected in the selectOneChoice. The selectOneChoice a autosubmit = true and each inputText has the selectOneChoice as a partialTrigger. It all works fine, until I try to do the required selectItems = true. The hide-dynamic stops working, and the entries are marked as empty (but the selectOneChoice shows the new value).

I tried to play with the addition of additional checks for the indicators 'immediate' and 'compulsory', for example, required = "#{pageFlowScope.testBean.requiredSet and pageFlowScope.testBean.showVal1}" but that seems to make no difference. " Someone at - it ideas?

Example of project: (uncheck the box to display the form works well without defined the required indicator and check to enable the problems I see)

http://www.mediafire.com/?immky4ynxqi

In the event that the link above does not work, here is the source:

JSP:
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  <jsp:directive.page contentType="text/html;charset=UTF-8"/>
  <f:view>
    <af:document id="d1" title="test thing">
      <af:form id="f1">
        <af:panelStretchLayout id="psl1">
          <f:facet name="center">
            <af:panelFormLayout id="pfl1">
              <af:group id="grp1">
              <af:selectOneChoice label="Select" id="selOne"
                                  value="#{pageFlowScope.testBean.selectValue}"
                                  autoSubmit="true" immediate="true">
                <af:selectItem label="Show: Value 1" value="reqVal1" id="si1"/>
                <af:selectItem label="Show: Value 1 + 2" value="reqVal1_2" id="si3"/>
                <af:selectItem label="Show: Value 1 + 2 + 3" value="reqVal1_2_3" id="si2"/>
              </af:selectOneChoice>
              <af:inputText label="Value 1" id="it1"
                        visible="#{pageFlowScope.testBean.showVal1}"
                            partialTriggers="selOne"
                            required="#{pageFlowScope.testBean.requiredSet and pageFlowScope.testBean.showVal1}"/>
              <af:inputText label="Value 2" id="it2"
                        visible="#{pageFlowScope.testBean.showVal2}"
                            partialTriggers="selOne"
                            required="#{pageFlowScope.testBean.requiredSet and pageFlowScope.testBean.showVal2}"/>
              <af:inputText label="Value 3" id="it3"
                        visible="#{pageFlowScope.testBean.showVal3}"
                            partialTriggers="selOne"
                            required="#{pageFlowScope.testBean.requiredSet and pageFlowScope.testBean.showVal3}"/>
              <af:inputText label="Value 4" id="it4"/>
              </af:group>
                <af:selectBooleanCheckbox
                                        label="Make Vals1-3 required" id="sbc1"
                                          value="#{pageFlowScope.testBean.requiredSet}"
                                          autoSubmit="true"/>

            </af:panelFormLayout>
          </f:facet>
          <f:facet name="bottom"><af:spacer width="10" height="10" id="s1"/></f:facet>
          <f:facet name="end"><af:spacer width="10" height="10" id="s2"/></f:facet>
          <f:facet name="start"><af:spacer width="10" height="10" id="s3"/></f:facet>
          <f:facet name="top"><af:spacer width="10" height="10" id="s4"/></f:facet>
        </af:panelStretchLayout>
      </af:form>
    </af:document>
  </f:view>
</jsp:root>
TestBean, as managed pageFlowScopeBean:
package com.testapp.view;

public class TestBean {

    private String selectValue = "reqVal1";
    private boolean requiredSet = false;

    public TestBean() {
        super();
    }

    public void setSelectValue(String selectValue) {
        this.selectValue = selectValue;
    }

    public String getSelectValue() {
        return selectValue;
    }

    public boolean getShowVal1(){
        return "reqVal1".equals(selectValue)
            || "reqVal1_2".equals(selectValue)
            || "reqVal1_2_3".equals(selectValue);
    }

    public boolean getShowVal2(){
      return "reqVal1_2".equals(selectValue)
          || "reqVal1_2_3".equals(selectValue);
    }

    public boolean getShowVal3(){
        return "reqVal1_2_3".equals(selectValue);
    }

    public void setRequiredSet(boolean requiredSet) {
        this.requiredSet = requiredSet;
    }

    public boolean isRequiredSet() {
        return requiredSet;
    }

}
Thank you
Barry

Nick Haralabidis wrote:
Hello

The behavior is as expected: you make a value of 1, the value 2 and 3 value required and you autoSubmit on the selectOneChoice. Thus, when you make a selection, value 1, 2 and 3 of the value value are tempted to submit because of the partialTrigger. But since they are required, the validation is triggered.

No, the validation is thrown in a different phase. The selectOneChoice is immediate and his calls renderResponse ValueChangeListener then the validation phase is never executed. It would be the case if the 3 values were also immediate, but it is not so.

Nick Haralabidis wrote:

If you don't want the postings through the Select and always have value 1, 2 and 3 of the required value value, follow these steps:

(1) remove all partialTriggers of the jsf page

(2) linking the panelFormLayout to support bean as in:


Binding = "#{pageFlowScope.testBean.panelMain}" > "

(3) add a valueChangeListener to the selectOneChoice as in:


value = "#{pageFlowScope.testBean.selectValue} '"
autoSubmit = 'true' immediate = "true".
valueChangeListener = "#{pageFlowScope.testBean.onSelectionChanged}" > "

(4) in your valueChangeListener add a partialTarget in the Panel as in:

{} public void onSelectionChanged (ValueChangeEvent valueChangeEvent)
AdfFacesContext.getCurrentInstance () .addPartialTarget (this.panelMain);
}

I tested it and it works :)

Yes, it's another way to do it.

Kind regards

~ Simon

Tags: Java

Similar Questions

  • Satellite A200-22I - DHCP and SENSE of the problems when you start Windows Vista

    When I started my laptop yesterday, I noticed it was going quite slowly, more there was a message saying that windows could not connect to a specified service.

    As a result my firewall was off tour and I can t connect to the internet. I tried to turn on the firewall, but I couldn't... and today, I tried another connection to inalambric, but I couldn't connect to the internet.

    I checked the registry of the solution and the problem and found it was something related to DHCP and sense.

    But really, I don - t know what causes this problem...

    I searched other forums where people have had the same problem but I could t find any solution apart from reinstalling Vista...

    Can someone help me? Help will be very appreciated!

    Thank you

    Hello

    What do you mean with SENSE? I never heard tell about.

    I put t know what are the causes of the problem too but did you look in Event Viewer? Sometimes, it's really useful.
    If you have a network problem, you must update the driver WLAN or LAN (depending on whether you are using). You can find it on the Toshiba site:
    http://EU.computers.Toshiba-Europe.com-online decision-making supported Downloads & => Download drivers

    It would be interesting to know what Windows service, you mean. View more information on this error.

    Welcome them

  • Firefox 17.0.7. Display the menu, when you are using extended view (Win7), flickers off when you move the slider to a selection. Reg FF version works fine.

    Using Windows 7, view extended., Firefox 17.0.7

    Firefox menus (file, editing, etc.) and user bookmark lists flicker in and out of visibility when you move the slider to a selection. This happens on the primary display only the second screen. It does not occur on regular product version (23, etc.) and does not occur on any other application.

    We are required to use version 17 on internal business machines.

    Bob Hello, that might be a problem with hardware acceleration - try updating your graphics driver, or in case this does not solve the problem, or there is no new version available at the time, disable hardware acceleration in firefox > options > advanced > General.

  • delay in reading the data when you are using multiple loops clocked on target RT

    Hello

    I have five loops clocked on a target of RT and I communicate to and from the host vi. All the loops of the value of the different priorities however when all running at the same time I found windows vi take up to 1 minute before reading the data. Four disabling loops to fix the problem. It is possible to start the app right after start windows vi?

    Kind regards

    Solved the problem by disabling variable autodeploy

    Thank you

  • WRT54GL abandons the connection when you are using the 2.4 Ghz cordless phone.

    I recently upgraded to a Linksys WRT54GL router and also hooked into a phone jack of magic using a 2.4 Ghz cordless phone. The interent connection is perfectly fine until I try to use the wireless phone.

    Within 60 seconds, the completely wireless signal drops and interrupts the connection from the phone. About 30-60 seconds later the wireless signal comes back and sometimes the computer reconnects automatically.

    My router is in a totally different room on one ground other than cordless phone base, and I already changed the channel on my router for 11. My computer is the only thing in the House using the Wi - Fi connection at the moment. What causes this problem & how to fix it?

    p.s. The wired computer sees no interruption of internet connection while the phone is in use.


  • Issue on the keyboard of the screen when you are using Microsoft Works.

    Close

    The on-screen keyboard does not appear to properly type the items inside.

    It could also bee a program compatibility problem, my PC is too new for her to work just & and/or may not be recognizing each keystroke.

    If someone who might have a solution to this, please reply to my email address @: * e-mail address is removed from the privacy * as soon as you can.

    Thank YOU, Chris Canfield.

    Discussions were merged.

    Deleted duplicates.

    Hello

    Thank you for the quick update.

    Since you have confirmed that the issue is limited to Microsoft works word processor, please ask your question in the following link:

    http://answers.Microsoft.com/en-us/Office/Forum/office_other?tab=threads

    See also what Deepa Raj replied on 23 January 2013 has suggested that it might be useful.

    Thank you.

  • Problems with clicking and scrolling when you are using the mouse in IE

    Separated from this thread.

    Original title:

    Problems with clicking and scrolling when you are using the mouse

    I have the same problem.  My touchscreen responds but my touchpad and mouse are unable to save a click in IE.  I need to reboot to rectify.  It seems to be more common when the laptop comes out of fashion 'sleep'.   I tried all the steps above, everything is up-to-date.

    Hello Fred,.

    Thanks for the reply.

    I appreciate your efforts to resolve the issue.

    I would suggest trying the following methods and check if it helps.

    Method 1:
    Run the hardware and devices Troubleshooter and check. Please follow these steps:

    a. press Windows + W keys, type Troubleshooting in the search box and press on Enter.
    b. click on 'show all' and then click 'hardware and devices'.
    c. click 'Next' and then follow the on-screen instructions.

    If this does not help, then use method 2.

    Method 2:
    Start your computer in safe mode and check the number.
    Refer to this article:
    Start settings for Windows (including safe mode)
    http://Windows.Microsoft.com/en-us/Windows-8/Windows-startup-settings-including-safe-mode

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

  • How do you solve the problem when you get "There is an IP address conflict"?

    How do you solve the problem when you get "There is an IP address conflict"?

    How can someone else have a computer with the same IP address?  Is this possible?  How do you get them?  Thank you

    I recvd a phone call yesterday telling me I had a computer at risk with the help of the same IP address or ID in China.  I thought it was a hoax.  They said they came from Microsoft, but when I tried to recall today, there was a message stating that the Group was not available.  Then I get on my computer and get the label "there is an IP address conflict" and I panic, what happens if someone in China is using my computer?  How can I stop this?  I ran antivirus and anything analyses.    Help, please?

    To resolve IP conflicts restart all computers, peripheral and the router at the same time.  Chances are it will fix

    Microsoft (or any other reliable service)'ll never call you cold.  They have no idea if your computer is in danger, a virus or anything else.  Calls are cold almost always a scam.

  • I'm working on the end of Vista this message comes when I tried to download creative cloud: "the operating system you are using is no longer supported by InDesign.» See you to the minimum required pour full list of

    I work under Vista and this message comes when I tried to download creative cloud: "the operating system you are using is no longer supported by InDesign.» Refer to the minimum requirements for a complete list of the supported platforms. "How can I do install creative cloud and use Indesign?

    Thank you

    Hi Laurent,.

    Please refer to the data sheet below:

    System requirements | Creative cloud

    Kind regards

    Sheena

  • Try to download the trial and the system says "you are using an operating system that is no longer compatible with Photoshop. See system requirements for a complete list of the supported platforms. What can I do?

    Hi, I am looking to download the trial and the system says "you are using an operating system that is no longer compatible with Photoshop. See system requirements for a complete list of the supported platforms. What can I do?

    My laptop is a MAC Pro

    Well, what IS your version of operating system?

    MINIMUM requirements for programs of cloud... scroll down and check each program

    -http://helpx.adobe.com/creative-cloud/system-requirements.html

  • flashes and turns off the video when you play, has sound

    Where to play games online TI juice flashes. I have sound but no video. This also happens when I watch QVC on my computer.

    Hi yesndeed70,

    ·         What version of the operating system is installed on the computer?

    ·         You use Internet Explorer? If so, what version are you using?

    ·         You get the error message?

    Follow these methods.

    Method 1: If you are using Internet Explorer, follow the steps in the article.

    The problems of games online using Internet Explorer

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

    Method 2: To update the drivers to display/graphics.

    Updated a hardware driver that is not working properly

    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

    For reference:

    The problems of the game performance

    http://Windows.Microsoft.com/en-us/Windows7/fixing-game-performance-problems

  • Where is the lock? I can't see it anywhere on the screen when you are connected to the https site

    Until I downloaded the latest version of Firefox, it appeared with icons in the bottom right of the screen. With Internet Explorer8, it appears on the right side of the address bar.

    The lock has been replaced by the site identity button, for details on use, see https://support.mozilla.com/kb/Site+Identity+Button

    If you want to add a padlock icon in the address bar, you can use the add-on locks- https://addons.mozilla.org/firefox/addon/padlock-icon/

  • Error message "the website has encountered a problem and cannot display the page" when you try to install Windows XP SP3 update

    Original title: cannot use Windows Update to install Windows XP SP3

    I have done a complete reinstallation of Windows XP Pro from the original disc and managed to update to SP2.  However, when I tried to upgrade to SP3, I got an error that "the site has encountered a problem and cannot display the page.  I tried all the suggested fixes that I can find.

    During the last attempt, I discovered that several dll is missing.  Here's the msxml6.dll, wups2.dll, c:\windows\system32\wucltux.dll and c:\windows\system32\wuwebv.dll.  If they are critical, where can I find them, and how do I get support.

    In addition, mshtml.dll is available, but the DllRegisterServer could not find an entry point.  Is this critical?

    In any case, I still can I install Microsoft Update or download/install SP3.

    The computer is an IBM R50e laptop.

    Thanks for any help you can give.

    Try to run this tool to windows update. This will help to re-register the dll

    After its done. try again and do the update

    hope this helps

  • Can't view photos on Facebook with Firefox 9.01. Do not have the problem when you use IE

    If you use Firefox (ver 9.01) on Facebook I can't see the photos/videos that are published by a friend. Only a setting with nothing iside the frame is shown other images as logos etc. are visible. Operating system is Windows 7. When you use Internet Explorer, though I can view the pictures.

    You can use the following steps to check if the images are blocked:

    • Click on the "More information" button to open the "Page Info" with the Security tab selected (also accessible via "tools > Page Info").
    • Go to the Media of the window tab "tools > Page Info.
    • Select the first link of the image and scroll down through the list with the arrow down.
    • If an image in the list is grayed out and there is a check mark in the box "block Images of..." and remove this mark to unlock the images from this area.

    See also:

  • Error "have sufficient privileges to complete this installation for all users of the machine. "log on as an administrator and try again the installation" when you try to install iTunes

    Original title:

    I just installed windows7, I had to uninstall itunes in order to complete the instalation of windows7. everything went well until I tried to reinstall itunes.

    During this process, I get the message "you don't have sufficient privileges to complete this installation for all users of the machine. log on as an administrator and try this installation again. ». but I am logged on as administrator.

    Hello

    To resolve this problem, use the following methods. After completing the steps in each method, check to see if the issue is resolved before you go to the next method. If the problem is resolved by any method, you do not have to use other methods.

    Method 1:

    Right click on the installer for iTunes and click Run as administrator.

    Method 2:

    Disable user account control settings and check.

    Enable or disable the User Account Control

    Note: User Account Control (UAC) can help prevent your computer from unauthorized changes. UAC notifies you when changes will be made to your computer that require administrator-level permissions. Disabling it can make your compromised computer. Please make sure that enable you UAC, once you have completed troubleshooting.

    Method 3:

    Allow the default Administrator and try to install it in this user account.

    a.Click on Start, click principally made programs, Accessories, right-click on command prompt and select run as administrator.

    b.Type in the following command and press ENTER.

    NET user administrator / active: yes

    c.Log disable the current user account and log in to the user called Administrator account.

    d.Install iTunes in this default Administrator account.

    e.Once of that installation is complete, the default administrator is disconnected.

    f. log in to your user account.

    g.Disable the default Administrator account. Follow these steps.

    i.Click on Start, click principally made programs, Accessories, right-click on command prompt and select run as administrator.

    II. type the following command and press ENTER.

    NET user administrator / active: No.

Maybe you are looking for

  • Satellite L350D - unabel to install Win7

    I tried to install Win7 on this laptop - but installation has failed every time with errormessage: "Der computer wurde unerwartet neu gestartet...» » Installation procedure: -Start using F12 bootmenu DVD player-remove all old scores-create a new part

  • USB output power?

    I have a Pavilion dm4-2181nr notebook and trying to determine if, when running on AC, the USB port will make 1000mW... I use to load a different device. Thank you! Joe

  • System 5 error

    I am trying to re-download mspaint that an i was told that I had to valadate my windows system trying to make it, I got this error code 5

  • Used to synchronize calendar

    I had two versions of Palm on my computer at the same time. Now just access. Agenda always has previous calendar and used to synchronize my calendar of events. How can I get rid of the other calendat file?

  • Installations of updates of Windows problems solved

    delete it please: problem solved.