PanelBox Disclosure icon is calling only checkbox value change listener

Hi
I have a page fragment, where i have a switcher and showing different facets based on condition, in my second facet i have a panel box which has a panel group layout which has one selectbooleancheckbox and one outputtext.
When i click on the check box, i need to make the outputtext invisible, this i am trying to achieve thru valuchangelistener. I am able to make it visible and invisible based on the value. The same way i have multiple panel boxes, the issue here is when i try to undisclose the panel box, or disclose the other panel boxes, the valuechangeevent is getting called.
I am using pageFlowScope for the bean and it has so many other value change events for select one choices, but only for the first time the check box value change events are getting called. I can achieve the same using java script, but i am trying to avoid using js.
I am using JDev 11.1.2.1.0 and the page fragment is in task flow, where i used the task flow as a region in a jspx page. Thanks.
N.

I think you're not dealing correctly with the default value of the selectOneMany. Do not let the submitted value be implicit but rather tells exactly what it should be. To manage that add a "noSelection" selectItem and return this value instead of null in from getImageType()
Thus you might have:
<h:selectOneMenu id="selectionid"
value="#{tagGeneratorTagView.imageType}" valueChangeListener="#{imageHandler.changeImageType}"
onchange="submit();">
  <f:selectItem itemValue="NOVALUE" itemLabel="No value selected"/>
  <f:selectItem .... your items ..
</h:selectOneMenu>And in getImageType
public String getImageType()
   //this is not a good example. the default value should be inject
  if(null==imageType)
    return "NOVALUE"
  return imageType
}

Similar Messages

  • Problem in getting the current value of the drop down while calling value change listener

    I have 2 drop down list. I am trying to get the value of first drop down from other drop downs value change listener. Initially one drop down contains a default value. First time I got the value while calling the value change listener. But if I change the default value to other in the first drop down and call the value change listener of the second drop down then I got the old value in the bean. Can anyone suggest a process

    If I use the following code it gives me the current index.
                valueChangeEvent.getComponent().processUpdates(FacesContext.getCurrentInstance());
                System.out.println(valueChangeEvent.getNewValue());
    This is also giving me current index.
    BindingContainer container = BindingContext.getCurrent().getCurrentBindingsEntry();
    AttributeBinding attrIdBinding = (AttributeBinding)container.getControlBinding("PersonTypeId1");
    if(attrIdBinding.getInputValue()!=null)
                   System.out.println(attrIdBinding.getInputValue().toString());
    But at last I got some help from Shay Shmeltzer's Weblog.
    BindingContainer bindings =
                    BindingContext.getCurrent().getCurrentBindingsEntry();
                    // Get the sepecific list binding
                    JUCtrlListBinding listBinding =
                    (JUCtrlListBinding)bindings.get("PersonTypeId1");
                    // Get the value which is currently selected
                    Object selectedValue = listBinding.getSelectedValue();
                      long value =0L;
                    if(selectedValue!=null){
                        System.out.println("Sudip.. Person Type using bindings"+selectedValue.toString());
    But this returns "ViewRow [oracle.jbo.Key[300000860721156 ]]"
    300000860721156 is the original value.. Would you please help me to figure it.

  • Value change listener method on h:selectBooleanCheckbox in h:dataTable

    Hello,
    Does JSF handle value change listeners as expected when they are attached to h:selectBooleanCheckbox components within an h:dataTable?
    In the following example, I have a JSP that has some h:selectBooleanCheckbox components nested in an h:dataTable, and some that aren't. When I bulid and deploy the example to Tomcat 5.5, I can see (using the log4j output) that the value change listener methods for the checkboxes that are NOT in the dataTable are fired, but the ones that are in the dataTable do not get fired.
    I am using Sun's RI of JSF, version 1.1.0.1.
    Thanks,
    Scott
    ----------------------------- JSP:
    <%@ page language="java" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <f:view>
    <h:form>
    <h:dataTable value="#{checkboxBean.beans}" var="thisBean">
         <h:column>
              <h:outputText  value="#{thisBean.id}: " />
         </h:column>
         <h:column>
              <h:selectBooleanCheckbox value="#{thisBean.checked}" valueChangeListener="#{checkboxBean.somethingChanged}" />
         </h:column>
    </h:dataTable>
         <h:panelGrid columns="2">
              <h:outputText value="One:"/>
              <h:selectBooleanCheckbox id="firstOne" valueChangeListener="#{checkboxBean.somethingChanged}" />
              <h:outputText value="Two:"/>
              <h:selectBooleanCheckbox id="secondOne" valueChangeListener="#{checkboxBean.somethingChanged}" />
              <h:panelGroup/>
              <h:commandButton value="Do Stuff" action="#{checkboxBean.doStuff}" />
         </h:panelGrid>
    </h:form>
    </f:view>----------------------------- Beans:
    package workshop;
    import javax.faces.event.ValueChangeEvent;
    import org.apache.log4j.Logger;
    * Test attaching value change listener methods to checkboxes.
    public class CheckboxBean {
        private static final Logger logger = Logger.getLogger(CheckboxBean.class);
        private SomeBean[] beans = null;
        public CheckboxBean() {
            logger.debug("CheckboxBean()");
        public String load() {
            SomeBean[] someBeans = new SomeBean[3];
            someBeans[0] = new SomeBean("firstGuy", false);
            someBeans[1] = new SomeBean("2ndGuy", false);
            someBeans[2] = new SomeBean("third", false);
            this.setBeans(someBeans);
            return null;
        public String doStuff() {
            logger.debug("doStuff()");
            return this.load();
        public void somethingChanged(ValueChangeEvent e) {
            logger.debug("somethingChanged() in component with id " + e.getComponent().getId() );
        public SomeBean[] getBeans() {
            logger.debug("getBeans()");
            return this.beans;
        public void setBeans(SomeBean[] beans) {
            logger.debug("setBeans()");
            this.beans = beans;
    package workshop;
    public class SomeBean {
        private boolean checked = false;
        private String id = null;
        public SomeBean() {
        public SomeBean(String anId, boolean bool) {
            super();
            this.id = anId;
            this.checked = bool;
        public String getId() {
            return this.id;
        public void setId(String id) {
            this.id = id;
        public boolean isChecked() {
            return this.checked;
        public boolean getChecked() {
            return this.checked;
        public void setChecked(boolean checked) {
            this.checked = checked;
    }----------------------------- faces-config.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
      <managed-bean>
        <description>Checkbox bean.</description>
        <managed-bean-name>checkboxBean</managed-bean-name>
        <managed-bean-class>workshop.CheckboxBean</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
      </managed-bean>
    </faces-config>----------------------------- log4j config:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
        <appender  name="RollingFile" class="org.apache.log4j.RollingFileAppender" >
              <param name="File" value="/Users/scott/workshop/logs/workshop.log"/>
            <param name="Append" value="false"/>
            <param name="MaxFileSize" value="4096KB" />
            <param name="MaxBackupIndex" value="4" />
            <layout class="org.apache.log4j.PatternLayout">
              <param name="ConversionPattern" value="%d{DATE} %-5p %-15c{1} : %m%n"/>
            </layout>
        </appender>
        <category name="workshop" >
          <priority value="debug" />
        </category>
        <root>
            <priority  value="warn" />
            <appender-ref  ref="RollingFile" />
        </root>
    </log4j:configuration>

    I have Just run into the same problem. When using the following code inside a data table the valueChangeListener event is not fired when the checkbox has it's value changed. Is this a bug?
    I created a simple page with just a form and the selectBooleanCheckbox. This time the valueChangeListener event fired OK. It seems the problem only occurs when the check box is inside the dataTable
    here is the code snippet
    <h:form >
    <h:column>
    <f:facet name="header">
         <h:outputText value="Add to Basket"/>
    </f:facet>
    <h:selectBooleanCheckbox immediate="true" valueChangeListener="#{reportsResultHandler.addToBasket}" value="#{reportsResultHandler.addbasketChecked}" onchange="this.form.submit
    ();"/>                              
    </h:column>
    </h:form>

  • Get action or value change listener to be invoked from phaseEvent

    Hi,
    Does a PhaseEvent object has information for which action or value change listener is to be invoked?
    I have implemented a common logging method which has to be called on any action or value change event.
    The method requires the name of the method bound to action or value change listener.
    It is convinient if a phaseEvent object has information for the listener's method name because in that case I don't have to write a code calling the logging method in each action or value change listener but only in PhaseListener.
    Regards,
    Kenji

    Same as my thread...no answers...!

  • Differentiating HTTP Request through a URL and a value change listener

    Version Details:
    Oracle JDeveloper 11g Release 1 11.1.1.4.0
    Studio Edition Version 11.1.1.4.0
    Build JDEVADF_11.1.1.4.0_GENERIC_101227.1736.5923
    IDE Version: 11.1.1.4.37.59.23
    Product ID: oracle.jdeveloper
    Product Version: 11.1.1.4.37.59.23
    ADF Business Components     11.1.1.59.23
    Java(TM) Platform     1.6.0_21
    Oracle IDE     11.1.1.4.37.59.23
    Versioning Support     11.1.1.4.37.59.23
    Base Details:
    The Product, that a different team is working on (<i><b>which I cannot access, code, touch,...</b></i>), creates reports and essentially generates a URL with a bunch of parameters:
    http://<host>:<port>/myApplication/main.jspx?parameter1=value1&parameter2=value2...When the user clicks on an "Edit" button, a modal popup window is displayed (using jQuery) with an embedded iFrame with its source pointing to the above URL.
    The "myApplication" is an ADF application which brings up an ADF form based on the parameters. Once the user enters the data, validations occur and the data is written into a total of 3 different Tables in the Database. Once the operation is finished, the user closes the popup by clicking on the "X" button of the popup window, which essentially does "popup.*hide()*".
    Limitations:
    <li>Since there are varied combination of parameter values and associated ADF forms, taskflows is not* an option.
    <li>Since the logic of generating the ADF form is not straightforward, ADF BC is not* an option.
    <li>Since validations are based on the value change listeners, the managed bean has to be a session scope_ bean.
    Problem:
    When, for the first time, the user clicks on the Edit button with a particular set of parameter values, the corresponding ADF form is displayed and things work normal. Since the managed bean is under session scope, the form generated for the first popup window stays the same for any subsequent popup windows, even when the URL and its parameters are completely different. As I can not listen to the popup close event, I cannot invalidate my session either.
    I tried using filters in the web.xml to grab the request and apply the business logic. Due to the presence of multiple value change listeners (too many <tt>autosubmit=true</tt>), every value change listener triggers a request and so the business logic gets applied with every value change.
    After some tests, I deduced that the difference between the call from iFrame and the call from value change is the HTTP Request Method - GET for iFrame and POST for value change listener. So in my filter I apply the business logic when there is a GET request and not apply when its a POST request.
    Turns out, that is not a valid enough differentiation between the two requests being made. Sometimes, even the value change listeners are issuing a GET request.
    Question:
    *<font color="red">1</font>*. Is there a way to force the value change listeners to always trigger a POST request?
    *<font color="red">2</font>*. Is there a way to differentiate the requests originating from the other team's Product and those generated by my own value change listeners?
    *<font color="red">3</font>*. Is there a different approach, incorporating the above-mentioned limitations, to clear out the session scope each time when a request is made through iFrame? That is, whenever a request is made through the other team's Product?
    Edited by: user737922 on Apr 13, 2011 10:58 AM

    _(Temporary) Solution_:
    Summary:
    I am using the request parameter <b><tt>_adf.ctrl-state</tt></b> to differentiate between the HTTP requests that my application receives.
    Details:
    When I receive the request from the other team's Product, I receive a <tt>GET</tt> and a <tt>adf.ctrl-state</tt> value which I store into a local variable in my session-scoped managed bean. The <tt>adf.ctrl-state</tt> value stays the same for all requests (<tt>GET</tt> or <tt>POST</tt>) made from within my own application. It changes only when there is a new request from the other team's Product.
    Also, as my application is accessed through an iFrame, there is no possibility of the generated URL being modified by the end-user.
    For now it seems that the solution is appropriate but I am not fully confident if relying on the <tt>_adf.ctrl-state</tt> value is the best approach.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Getting a value of another textbox in value change listener

    Hi
    I am associating a value change listener with textbox1. and i need the values of textbox2 inside the listener. So every time, value of textbox1 changes , i want to call a listener which executes a query depending on the value of textbox2 which is constant. But i am not able to get the value of textbox2 inside the listener method.
    Thanks in advance..

    Read on about the JSF lifecycle. The valuechangelistener will be fired at the end of the 3rd phase of the JSF lifecycle (process validations) and the input values will be set in the bean in the 4th phase of the JSF lifecycle (update model values).
    In your case, a complete rewrite of the code may be more useful. If you are actually not interested in the difference between the old value and the new value, then remove the valuechangelistener and put the code logic in the action method of the bean. This will be executed in the 5th phase of the JSF lifecycle (invoke application), after the input values are been set.
    Or, in my opinion better, introduce some AJAX framework and make use of its capabilities. For example Ajax4jsf. It saves you from synchronous form submits on every entered character which may lead to poor user experience.
    This practical article might be helpful in understanding the JSF lifecycle: [http://balusc.blogspot.com/2006/09/debug-jsf-lifecycle.html]

  • 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

  • ADF :  Value change listener for the whole jsff page

    Is there any feature to have a value change listener for the whole jsff page ?
    How to know if user has change something in the page i.e. how to know whether the page is dirty ?

    User please tell us your jdev version!
    Read this blog https://blogs.oracle.com/groundside/entry/ever_wondered_how_uncommitteddatawarning_works
    Timo

  • Value change listener method does not refresh value

    Hi Frank,
    According to your documentation ADF Faces: How-to build dependent lists boxes with ADF and ADF Faces I have created dependent list box and it is working properly.
    Now in the similar way I have created a form where one attribute is set as select one choice and it takes value from a lov and this attribute have a value change listener event and when selecting a value for this attribute from lov, in backing bean it will set another attribute of the form and the value will be taken from the other field of the lov for the current row.
    But when I am running this, 1st time when I am selecting a value from lov, the 2nd attribute of the form gets its value but next time when I am selecting another value in LOV, the value in the other attribute is not changing accordingly.
    My original form is (test_date,machine_code,machine_no...)
    I have created LOV for machine_code.
    This LOV is --select machine_code,machine_no from machine_mast;
    This LOV returns machine_code to the machine_code field of my main form.
    For machine_code, I have created a value change listener method and set its autosubmit property to true and for machine_no field I have set its partial trigger property to the ID of machine_code field.
    The value change listener code is
    BindingContainer bindings = this.getBindings();
    DCIteratorBinding itr = (DCIteratorBinding)bindings.get("lov2_sqc0400_1Iterator");
    Row rw = itr.getRowAtRangeIndex(((Integer)valueChangeEvent.getNewValue()).intValue());
    Object machine_no= rw.getAttribute("MchnNo");
    inputText2.setValue(machine_no);
    Please help
    Regards/Thanks
    SK

    Hi All,
    Can anyone please help me?
    Thanks/Regards
    SK

  • How to update CheckBox value change in report in DB table

    Hi;
    I have created a tabular form & added a check box in my Select statment...also i created a procedure On Submit to update my table according to the checkbox values..
    My problem is that the update statment is updating the whole records in the form not only the changes which i done
    Any one can give me the key for the update statment?
    Regards;
    Ehammad

    Did any one tried to implement the same example of dkubicek?!! i tried to do the same code but i have problem (f011) should be identified!!!
    does any1 have any idea about kind of this error?
    Regards;

  • N- Step PO Approval only when Value Change

    Hi ,
       I am in SRM 5.5, I have a requirement that PO N-step workflow should only trigger when the PO value changed not any other changes, is it possible ? Please give me some details about this if possible
    John.

    Hello John,
    You also could use in the start conditions (SWB_COND):
    EC Purchase Order.Total Value Incrsd   - here you could check, if the value increased
    EC Purchase Order.Total Value Diff.    - here you check, if there is a difference to the original amount
    Both of the above starting conditions you could use in the event of 'CREATED' (new PO) or 'CHANGED' (amended PO).
    Give it a try.
    Franz
    Edited by: Franz Feichtenschlager on Sep 1, 2009 8:36 AM

  • How to trigger a value change listener in JSF without submitting the form

    hi friends,
    I have a JSF Page which contains a check box and a text box.
    I made the text box property as readonly.
    when i click the check box , i want to make my text box as editable.
    i achieved the above task by submitting the whole form when i click the check box.
    i want to acheive the same functionality with out submitting the form.
    In one of the references it is stated that "Value-changed handlers are executed if the page is submitted and the value of the component has changed."
    hope you got the question.
    please let me know, if you know the answer.

    Hi,
    If at all you dont want to submit the form and wanna reflect same form's field(s) as per the change in drop-down/check-box,
    you can simply achive it using traditional way of 'JavaScript'.
    For that you may typically give <h:form> tag any specific id say
    <h:form id="myForm"> and for dropdown/checkbox also you may give id say
    <h:selectBooleanCheckbox id="group" onchange="javascript:reflectChangedValue();"  ... >
    </h:selectBooleanCheckbox>and in the same JSP you can write any JS function say reflectChangedValue() as
    function reflectChangedValue()  {
         var formPrefix  = "myForm:";
         var groupId = formPrefix + "group";
         var value = document.getElementById(groupId).value;
          if(value) {
               // enale textbox here
          } else {
               // disable textbox here
    }For formPrefix and groupId, f you are having any doubts, you can refer to 'view source' from the browser,
    generated HTML of the working JSP.

  • HT1766 hi, i am trying to take a sim card from one phone and insert into an iphone 3. tha screen shows a lock and an itunes icon + emergency call only/ I called att and they said i nee to log on

    i am trying to change a sim card to this phone but an error comes up with an itunes icon an plug and the pad lock

    You need to perform a restore on a computer with iTunes installed

  • Can Attachment Icon be Disabled on a value change

    Hello Experts,
    in a form where attachment icon is enabled, can it be disabled when a value is selected in a list-box ? Did a search but couldn't get a hint.
    Forms Ver 10.1.2
    Oracle R12

    I am not sure what you are trying to do.
    You are in a custom form. And if a specific value is entered in a field, you would like to disable the ability to create or view an attachment?
    Is that what you want?
    Please state your requirement clearly.
    Sandeep Gandhi

  • How to run TCP/IP Tx in cRIO vi only when value changes?

    My design uses NI's TPC-2006 as the user interface for a cRIO-based product.  I use TCP/IP to exchange data between the TPC-2006 and cRIO.  My code causes the TPC to lock up after a variable number of minutes, typically about 10.  The OS is completely locked and requires a power cycle to recover.
    Based on the theory that the TPC-2006 is not keeping up with the TCP/IP packets sent by cRIO, I want to try configuring cRIO to transmit only when it has something new to say.  The event structure that I use for the TPC-2006 won't work on cRIO.  Can anyone out there suggest another approach?
    Jeff
    Climbing the Labview learning curve!
    Sanarus Medical
    Pleasanton, CA

    Hi Jeff,
    The simplest way to reduce transmission overhead in this scenario would be to encase your existing TCP/IP routine in a case structure that only executes if the data element you're interested in is not equal to its last value (stored in a shift register).  This shouldn't add much in the way of computational overhead on the RT side, but should reduce the flood of data if the value doesn't change very often.  Keep in mind also that if you have LabVIEW 8, you can use Shared Variables to send the data over your tcp/ip connection only when a new value is written to the variable - this may meet your needs just as well.
    Cheers,
    Matt Pollock
    National Instruments

Maybe you are looking for