JSF value change Simple problem

I am having a small difficulty understanding which approach should be used to initialize data in JSF.
Take this simple example:
There is a drop down with 2 items: 1, 2
        <h:selectOneMenu value="#{bean.value}"
          valueChangeListener="#{bean.change}" onchange="submit()">
          <f:selectItem itemLabel="1" itemValue="1"/>
          <f:selectItem itemLabel="2" itemValue="1"/>
        </h:selectOneMenu>Now, when page loads, it really shows the second value of the drop down selected.
But, when I simply add a "valueChangeListener" method, I can see that there is a problem:
  public void change(ValueChangeEvent event)
    System.out.println("I was here");
  }Whenever switching from value: 1 to: value: 2, the event is not activate. Since I was setting each time the constructor is built, the value "manually".
The problem gets much deeper when, for exmaple, I would like to show a table that changes according to several filters. Initially the data is loaded on the constructor. But when filter changes, the data should be reloaded. So I load it twice: Once in the constructor, then I have to rebuild data in the event itself.
Am I missing here something ? Or the JSF mechanism is missing somthing ... ;-)

It's beacuse its ValueChangeListener :) no a "LabelChangeListener".
Value for those two items should be different :)
Itemlabel is what you see in combobox, and itemValue is real value for item.
If you change your code to :
<f:selectItem itemLabel="1" itemValue="1"/>
<f:selectItem itemLabel="2" itemValue="2"/>it will work :)
Martin

Similar Messages

  • I loaded Mac OS X v10.7 Lion yesterday. Everything's running fine, except for a simple problem. Any time I want to copy a file, JPEG, etc., I am prompted "Finder wants to make changes. Type your password to allow this." I don't want this!! Is there a way

    I loaded Mac OS X v10.7 Lion yesterday. Everything’s running fine, except for a simple problem. Any time I want to copy a file, JPEG, etc., I am prompted “Finder wants to make changes. Type your password to allow this.” I don’t want this!! Is there a way to unlock “Finder” or rid this process?

    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. You can demote it back to standard status when this step has been completed.
    Triple-click the following line to select it. Copy the selected text to the Clipboard (command-C):
    sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:20 ~ $_ ; chmod -R -N ~ $_ 2> /dev/null
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you don’t have a login password, you’ll need to set one before you can run the command.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2
    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    resetpassword
    That's one word, all lower case, with no spaces. Then press return. A Reset Password window will open. You’re not going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • Need help going to error page from jsf component value change event

    Afternoon all,
    I have a jsp page which uses jsf components and when one of the jsf combo boxes components handles an value change event, the method 'handleTestComboValueChange' is fired.
    Within this method if an error is caught I would like to display an error page instead of the currently displayed page.
    Can some one tell me how to do this. I tried to use getFacesContext().getExternalContext().redirect("errorpage.jsp"); but I just got an illegalStackException error.
    Any help would be great.
    Thanks in advance,
    Lex

    log output listed below...
    [14/04/06 14:52:48:781 BST] 6b0ec4d8 ProcessValida E com.sun.faces.lifecycle.ProcessValidationsPhase com.sp.exceptions.ServicePackagesException: My custom error message
    [14/04/06 14:52:48:812 BST] 6b0ec4d8 ProcessValida E com.sun.faces.lifecycle.ProcessValidationsPhase TRAS0014I: The following exception was logged javax.faces.el.EvaluationException: com.sp.exceptions.ServicePackagesException: My custom error message
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
         at javax.faces.component.UIInput.broadcast(UIInput.java:492)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:252)
         at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:346)
         at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:78)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         at com.ibm.faces.webapp.FacesGenericPortlet.execute(FacesGenericPortlet.java:637)
         at com.ibm.faces.webapp.FacesGenericPortlet.processAction(FacesGenericPortlet.java:142)
         at com.scottishpower.portlet.GoldenAccountPortlet.processAction(GoldenAccountPortlet.java:143)
         at com.ibm.wps.pe.pc.std.cmpf.impl.PortletFilterChainImpl.processAction(PortletFilterChainImpl.java:104)
         at com.ibm.wps.propertybroker.standard.filter.PropertyBrokerActionFilter.processAction(PropertyBrokerActionFilter.java:260)
         at com.ibm.wps.pe.pc.std.cmpf.impl.PortletFilterChainImpl.processAction(PortletFilterChainImpl.java:95)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.dispatch(PortletServlet.java:148)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.doPost(PortletServlet.java:76)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at com.ibm.wps.pe.pc.std.cache.CacheablePortlet.service(CacheablePortlet.java:257)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1095)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:254)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:204)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:168)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.action(PortletInvokerImpl.java:82)
         at com.ibm.wps.pe.pc.std.event.ActionEvent.execute(ActionEvent.java:111)
         at com.ibm.wps.pe.pc.std.event.EventQueueManager.processEventLoop(EventQueueManager.java:86)
         at com.ibm.wps.pe.pc.std.PortletContainerImpl.performEvents(PortletContainerImpl.java:168)
         at com.ibm.wps.pe.pc.PortletContainerImpl.performEvents(PortletContainerImpl.java:229)
         at com.ibm.wps.engine.phases.WPActionPhase.processPortlets(WPActionPhase.java:947)
         at com.ibm.wps.engine.phases.WPActionPhase.execute(WPActionPhase.java:489)
         at com.ibm.wps.state.phases.AbstractActionPhase.next(AbstractActionPhase.java:130)
         at com.ibm.wps.engine.Servlet.callPortal(Servlet.java:710)
         at com.ibm.wps.engine.Servlet.doGet(Servlet.java:562)
         at com.ibm.wps.engine.Servlet.doPost(Servlet.java:736)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
         at com.ibm.wps.state.filter.StateCleanup.doFilter(StateCleanup.java:86)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:258)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1086)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:201)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
    Caused by: com.sp.exceptions.ServicePackagesException: My custom error message
         at pagecode.fragments.GSolus.getTariffsByRef(GSolus.java:297)
         at pagecode.fragments.GSolus.handleServicePackageComboValueChange(GSolus.java:214)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
         at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         ... 68 more
    javax.faces.el.EvaluationException: com.sp.exceptions.ServicePackagesException: My custome error message
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
         at javax.faces.component.UIInput.broadcast(UIInput.java:492)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:252)
         at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:346)
         at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:78)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         at com.ibm.faces.webapp.FacesGenericPortlet.execute(FacesGenericPortlet.java:637)
         at com.ibm.faces.webapp.FacesGenericPortlet.processAction(FacesGenericPortlet.java:142)
         at com.sp.portlet.GoldenAccountPortlet.processAction(GoldenAccountPortlet.java:143)
         at com.ibm.wps.pe.pc.std.cmpf.impl.PortletFilterChainImpl.processAction(PortletFilterChainImpl.java:104)
         at com.ibm.wps.propertybroker.standard.filter.PropertyBrokerActionFilter.processAction(PropertyBrokerActionFilter.java:260)
         at com.ibm.wps.pe.pc.std.cmpf.impl.PortletFilterChainImpl.processAction(PortletFilterChainImpl.java:95)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.dispatch(PortletServlet.java:148)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.doPost(PortletServlet.java:76)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at com.ibm.wps.pe.pc.std.cache.CacheablePortlet.service(CacheablePortlet.java:257)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1095)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:254)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:204)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:168)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.action(PortletInvokerImpl.java:82)
         at com.ibm.wps.pe.pc.std.event.ActionEvent.execute(ActionEvent.java:111)
         at com.ibm.wps.pe.pc.std.event.EventQueueManager.processEventLoop(EventQueueManager.java:86)
         at com.ibm.wps.pe.pc.std.PortletContainerImpl.performEvents(PortletContainerImpl.java:168)
         at com.ibm.wps.pe.pc.PortletContainerImpl.performEvents(PortletContainerImpl.java:229)
         at com.ibm.wps.engine.phases.WPActionPhase.processPortlets(WPActionPhase.java:947)
         at com.ibm.wps.engine.phases.WPActionPhase.execute(WPActionPhase.java:489)
         at com.ibm.wps.state.phases.AbstractActionPhase.next(AbstractActionPhase.java:130)
         at com.ibm.wps.engine.Servlet.callPortal(Servlet.java:710)
         at com.ibm.wps.engine.Servlet.doGet(Servlet.java:562)
         at com.ibm.wps.engine.Servlet.doPost(Servlet.java:736)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
         at com.ibm.wps.state.filter.StateCleanup.doFilter(StateCleanup.java:86)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:258)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1086)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:201)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
    Caused by: com.sp.exceptions.ServicePackagesException: My custome error message
         at pagecode.fragments.GSolus.getTariffsByRef(GSolus.java:297)
         at pagecode.fragments.GSolus.handleServicePackageComboValueChange(GSolus.java:214)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
         at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         ... 68 more

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

  • How to tackle the dataflow problem when Value Change event always triggers after another GUI event

    We know that Value change event always triggers after another GUI event. Eg, the user modifies string control, the user clicks on a boolean control. Then event boolean clicked is triggered before event string control value change.
    Now suppose somehow the GUI event that must happen to subsequently trigger the Value change event can potentially affect the data that Value change event is supposed to work on. How can we tackle this problem ?
    For example, in a mockup application that the grand purpose is to have user entered values in a textbox logged to a file (no missing information is accepted, and there is a boolean to determine how the information is logged).
    There are 2 controls, boolean A when clicked (mouse down) will load random number in text box B. Text box B is designed with event structure VALUE change which saves whatever values user enters into text box B to a log file.
    There are 3 problems when instead of clicking anywhere on the front panel after modifying text box B, the user ends up clicking on boolean control A.
    1. Event mouse down on Boolean control A will execute first, modifying text box B content before the user entered values in B get saved.
    2. The value of boolean A can potentially affect how textbox B is loggged.
    3. The value of boolean A affects how the file is logged and this is indeterminate. Somehow when running this VI with no Highlighting, the textbox B Value change event executes -before- boolean A value is updated (F to T). When running this VI with Highlighting, the boolean A value is updated (F to T) (because we click on it) -before- textbox B value change event occurs. Why is it like this ?
    Now the situation I made up seems non-sense, but I believe it resembles one way or another a problem that you might run into. How would you solve this problem elegantly ?
     

    You can set the string control to "update while typing".
    Are you sure appending the log to itself is reasonable? Wouldn't it grow without bounds if the users keeps entering strings or pressing the ingore button?
    Why isn't the "constant" a diagram constant instead of a control. Is the user allowed to change it?
    To reset just write empty strings or a false to local variables of the controls (renit to defaults" seems a bit heavy handed).
    All you probably need is a single event case for "ignore:value change" and "String" value changed", no need for the local variable..
    Also add a stop button and an event for it.
    You don't need the timeout event.
     

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

  • LOV value changes to first in list when using valueChangeListener

    All,
    I'm having a problem using a valueChangeListener with an af:inputListOfValues. The listener is firing properly but unless
    I use the search popup to select the value it is changing the value back to the first row in the list.
    If I try to type in a value it's just going to be changed back to the first row in the list.
    I'm sure there's something simple that I'm missing. Any ideas? Thanks.
    I am using JDev 11.1.2.2.0
    Below is how the list is defined and the Java behind the listener:
    <af:inputListOfValues id="workCenterEntryId"
                             popupTitle="Search and Select: #{bindings.WorkCenterEntry.hints.label}"
                             value="#{bindings.WorkCenterEntry.inputValue}"
                             label="#{bindings.WorkCenterEntry.hints.label}"
                             model="#{bindings.WorkCenterEntry.listOfValuesModel}"
                             required="#{bindings.WorkCenterEntry.hints.mandatory}"
                             columns="#{bindings.WorkCenterEntry.hints.displayWidth}"
                             shortDesc="#{bindings.WorkCenterEntry.hints.tooltip}"
                             binding="#{pageFlowScope.PalletBuildBackingBean.workCenterEntryId}" editable="always"
                             simple="false"
                             valueChangeListener="#{pageFlowScope.PalletBuildBackingBean.changeWorkCenter}" autoComplete="on" autoSubmit="true">
    <f:validator binding="#{bindings.WorkCenterEntry.validator}"/>
    <af:autoSuggestBehavior suggestedItems="#{bindings.WorkCenterEntry.suggestedItems}"/>
    </af:inputListOfValues>
    public void changeWorkCenter(ValueChangeEvent valueChangeEvent) {
         FacesContext facesContext = FacesContext.getCurrentInstance();
         valueChangeEvent.getComponent().processUpdates(facesContext.getCurrentInstance());
         //More code to do other stuff
    }

    Thanks for your response.
    Here's what I tried:
    1) I removed the value change listener and the problem still occurred.
    2) I set AutoSubmit to false and the problem stopped.

  • Component binding and Value change listeners

    Hi -
    I'm fairly new to JSF and are having a few teething problems.
    I have a date component in my registration page. Its made of up 3 text inputs (1 each for day, month, year). Since these need to be validated as a group I use a method in my backing bean (request scoped) to do this. (I saw this demonstrated in Core JSF).
    Here's my code for the date components:
    <h:outputLabel value="#{register.labelData.dateOfBirth}" /><br />
    <h:message for="day" styleClass="error" />
    <h:inputText id="year" styleClass="input smaller" maxlength="4" value="#{register.dateOfBirthYear}" binding="#{register.dobYearInput}" onfocus="doOnFocus('registerForm:year')" onblur="doOnBlur('registerForm:year')" tabindex="12" />
    <h:inputText id="month" styleClass="input smallest" maxlength="2" value="#{register.dateOfBirthMonth}" binding="#{register.dobMonthInput}" onfocus="doOnFocus('registerForm:month')" onblur="doOnBlur('registerForm:month')" tabindex="13" />
    <h:inputText id="day" styleClass="input smallest" maxlength="2"  value="#{register.dateOfBirthDay}" binding="#{register.dobDayInput}" validator="#{register.validateDate}" required="true" requiredMessage="#{register.msgData.dobMandatory}" onfocus="doOnFocus('registerForm:day')" onblur="doOnBlur('registerForm:day')" tabindex="14" />Now this works great.
    The other feature I have on the page is a select box so the page can be displayed in different languages. My application stores the current language in a session scoped bean. I have attached a value change listener onto the select box so the session is updated with the new language.
    <h:outputLabel for="languageSwitch" value="#{sessionBean.labelData.langSwitch}" />
    <h:selectOneMenu id="languageSwitch" styleClass="select" onchange="submit()" immediate="true" value="#{sessionBean.language}" valueChangeListener="#{sessionBean.changeLanguage}">
        <f:selectItems value="#{sessionBean.languages}" />
    </h:selectOneMenu>The request scoped beans have a reference to this session scoped bean, and use it to look up the page text in the appropriate language from the DB. IE:
    String label = getMessage(getSession().getLocale());The problem is on the registration page - because the date controls are bound to the managed bean the bean is (re-)created in the RESTORE_VIEW phase, BEFORE the value in the session has been update in the PROCESS_VALIDATIONS phase.
    I'm a little puzzled as to how berst to fix this problem - so any ideas that anyone has would be gratefully received.
    Thanks -
    Edited by: mbea023 on Jul 20, 2008 9:18 PM

    Thanks for the reply Raymond -
    The request scoped beans don't actually store the Locale directly - they have a reference to the SessionBean which store the locale. So they determine the locale by the following:
    Locale currentLocale = getSessionBean().getLocale();The reference to the SessionBean is injected (by Spring) in the constructor of the request scoped bean. Then, in the constructor, the request bean queries the DB for the language specific text to display on the page. EG:
    public MyRequestScopedBean {
    String message = messageAccessor.getMessage(messageKey, currentLocale);
    }Unfortunately it is a requirement to use a DB to store messages, so we can't use resource-bundles.
    Firstly, Is this the best way of request scoped beans having a reference to the session? Or is there a better way.
    The problem occurs when I have a page that has control bound to the request scoped bean ie:
    <h:XXXX binding="myRequestBean.ZZZ />
    {code}
    Then the constructor of the request bean runs *before* the value of the locale is changed in the sessionBean - this means the page messages are looked up with the old locale.
    Any further advice would be a great help - Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Drop Down Lists and Value Change Events

    I have 4 drop down lists each with a set of values from the database.
    Based on the value of the first list(ValueChangeEvent only for list1) , I fetch data from the database and set the 'selected value' in the other lists.
    I have a Submit button which takes values from these 4 lists and puts it in the database.
    Problem:
    I change list 2 through list 4 and hit a Submit button which inserts all the values in the database.
    However,on Clicking the Submit button I never get the new selected values, it always refers to the previously fetched values.
    I tried to recreate this case in a Sandbox without a database , Here is the code:
    Page1.jsp
    <h:selectOneMenu id="list1" value="#{SessionBean1.selectedList1}" valueChangeListener="#{SessionBean1.list1ValueChangeListener}"  onchange="this.form.submit();" >
                   <f:selectItems id="dropdown1SelectItems" value="#{SessionBean1.list1}"/>
    </h:selectOneMenu>
      <h:selectOneMenu id="list2" value="#{SessionBean1.selectedList2}" >                           
                  <f:selectItems id="dropdown2SelectItems" value="#{SessionBean1.list2}"/>
       </h:selectOneMenu>
       <h:commandButton id="add" actionListener="#{SessionBean1.addActionListener}" value="Add"/>
        <h:inputText id="result" value="#{SessionBean1.result}" />SessionBean1
       public SessionBean1() {
            list1.add(new SelectItem("0","0"));
            list1.add(new SelectItem("1","1"));
            list1.add(new SelectItem("2","2"));
            list1.add(new SelectItem("3","3"));
            list2.add(new SelectItem("a","a"));
            list2.add(new SelectItem("b","b"));
            list2.add(new SelectItem("c","c"));
            list2.add(new SelectItem("d","d"));
            map.put("0", "a");
            map.put("1", "b");
            map.put("2", "c");
            map.put("3", "d");
        private void fetch_data(String value){
             selectedList2=map.get(value);
        public void list1ValueChangeListener(ValueChangeEvent vce){
                fetch_data(vce.getNewValue().toString());
        public void addActionListener(ActionEvent event){
            result=selectedList2;
        }I tried debugging and found that after the Value Change Event is fired only selectedList1 gets a new value during Update Model Values Phase and selectedList2 still has the old value.
    With this sand box project I cannot even get the second list to show the corresponding value.
    Any insight on this would be helpful

    Thank You Balus C,
    I just realized the reason why this is not working, I found the reason in your article Populating Child Menu's article, I am just
    putting it as a reference here.
    One concern is that the skipping of the UPDATE_MODEL_VALUES will also cause that the new values of the menu's which have immediate="true" set won't be set in the backing bean. This can partly be fixed by getting the new value from the ValueChangeEvent inside the valueChangeListener method and assign it to the appropriate property. But this won't work for other menu's of which the valueChangeListener isn't been invoked. This would cause problems if you select a child menu value and then select the parent menu back to null and then reselect it to same value again, the child menu which will show up again would remain the same selection instead of null while its child will not be rendered! To solve this we need to bind the menu's to the backing bean so that we can use UIInput#setValue() and UIInput#getValue() to set and get the actual values.+ The JSF lifecycle will set and get them in the RESTORE_VIEW and RENDER_RESPONSE phases respectively.+
    I am not sure I understand whether or not it is a limitation but the reason above is valid and I rolled back to binding my menus and getting to work with that.
    Is Binding UI components a wise idea because most of the attributes can be programmed using properties in Backing Beans unless you have to build new components?
    Thanks Again

  • Intensive slider control use may lead to LabVIEW hang and system instability when coupled to event loop "Value Change"

     Occasionally, over the past year or two, I have noticed on different machines and versions of LabVIEW (8.0 and 8.5) that intensive operation of the LabVIEW slider control (holding down the left mouse button and shaking the mouse quickly back and forth to move the slider for several seconds) may cause LabVIEW to hang with high CPU usage (50% on my current test machine, which has a Pentium IV "hyperthreaded" processor, so 50% is the max that a single thread can take up). In some instances, after the LabVIEW process is forced to quit, the system itself becomes unstable (more high CPU usage) or hangs, up to and including the need for a hard restart. I have seen this behavior both when handling slider change events the "old fashioned" way with a while loop and a case structure; and also when using a while loop with an event structure handling the "Value Change" event for the slider. 
    Attached is an .rtf file dump of the front panel and block diagram of a simple test VI that replicates this problem in my hands (using an event structure). The loop count runs to at least several hundred iterations before the crash occurs.
    At least for the "old fashioned" loop handling method, adding a forced wait of a few dozen msec per loop didn't seem to be a workaround. I haven't tried this idea with the event structure, but don't expect joy to follow. The possibility of a system hang discourages aggressive experimentation. 
    Is this a known issue? Can anyone else replicate it (carefully)? In any case, I'd welcome other suggestions for workarounds.
    Thanks,
    Darin Nelson
    Attachments:
    Hang Slider.rtf ‏683 KB

    Thanks for all your responses, and especially to those who are waggling their mice around trying to reproduce this. I'll respond to (most aspects of) the last several posts in one message.
    LabViewGuruWannabe:
      I'll see if I can get the original code to post in a separate message, I posted the .rtf originally because I thought there might be filtering on forum posts (I'm sort of new here). But I doubt you re-created it wrong.
      The "more modern" test hardware was an Intel Core2 , 2.4 GHz, 2Gb RAM, on an Intel 965 family motherboard. As I said, it took me two tries to trigger the error on this hardware; in the case where it triggered, I was at almost 12000 iterations before things went south. 10000 iterations, therefore, might not be enough--or you might never get it, for all I know. My Pentium 4 Hyperthreaded machine (3.2 GHz, 2 Gb RAM) triggers the hang much more easily (always within 2500 iterations, usually within 1000), so there seems to be some hardware dependence here. Maybe the workaround is just to use hardware recent enough that no one not under the influence of strange compulsions will accidentally trigger the hang.
    TonP:
      After reading your suggestion, I tried something even more radical  -- getting rid of the handling code altogether. I took the slider node out of the while loop, and removed all code inside the "Slide" case of the event structure.
     On my Pentium 4 machine, the hang triggered after 677 iterations.
    Brian Beal:
    <!--
    /* Style Definitions */
    p.MsoNormal, li.MsoNormal, div.MsoNormal
    {mso-style-parent:"";
    margin:0in;
    margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:12.0pt;
    font-family:"Times New Roman";
    mso-fareast-font-family:"Times New Roman";}
    span.EmailStyle15
    {mso-style-typeersonal;
    mso-style-noshow:yes;
    mso-ansi-font-size:10.0pt;
    mso-bidi-font-size:10.0pt;
    font-family:"Courier New";
    mso-ascii-font-family:"Courier New";
    mso-hansi-font-family:"Courier New";
    mso-bidi-font-family:"Courier New";
    color:windowtext;
    mso-text-animation:none;
    font-weight:normal;
    font-style:normal;
    text-decoration:none;
    text-underline:none;
    text-decoration:none;
    text-line-through:none;}
    @page Section1
    {size:8.5in 11.0in;
    margin:1.0in 1.25in 1.0in 1.25in;
    mso-header-margin:.5in;
    mso-footer-margin:.5in;
    mso-paper-source:0;}
    div.Section1
    {pageection1;}
    -->
     Huh, I never even noticed that checkbox existed. Anyway, yes, I
    kept the default to lock out the front panel while the event process. If I
    disable it… I still get the hang.
    Message Edited by dman on 02-04-2008 06:36 AM

  • Line Item Value change in MIRO Transaction

    I have one  requirement i.e as follows.
    <b>Line Item Value change in MIRO Transaction</b>
    After getting the items in table control of  the miro screen of a particular order.
    I have to clicked on edit own condition of selected item.
    then it will show another screen ( create invoice document item - conditions)which have the all condtions details like
    Fra1 , frb1 , sd%  ,  Penalty % , gross price , frieght charges etc.
    In this screen first time it is showing line item as
    in the miro intial screen i.e. if u click po item
    10 it will show 10 only.
    after  updating fra1  value , i came back to the main screen at that time it is asking that select the any one of three.
    after selecting manual selection its fra1 was changed.
    once again if i go to the same line item by clicking
    the edit own condition(13 column if u select all information in textbox whixh is above tablecontrol right corner) it is showing line item as 1 in screen ( create invoice document item - conditions) which  should be line item as 10. ( here i took line item as 10)
    Please clarify this, why it is showing
    first time as  a original line item and
    after updating it is showing like
    for line item 10 -
    1
                   20 -
    2
                  100 -
    10
                  110 -
    11.

    "...it does not work..." is probably the worst description of a problem you can imagine. As an application developer you should know that. Do you use firebug to see what happens once it "does not work"? Any better hints?
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    https://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • How to put a page break when a value changes

    Hi there, I am very new to BI Publisher. I realize this is a really SIMPLE question, but I can't seem to find a CLEAR answer.
    I have a set of data that I have a repeating group for in my RTF template and it works great. But I want to have a page break each time one of the values changes and I cannot figure out how.
    here is the xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- Generated by Oracle Reports version 6.0.8.28.0 -->
    <PIR05>
    <LIST_G_ITEM_NO>
    <G_ITEM_NO>
    <PAGE_NO>0</PAGE_NO>
    <ITEM_NO>4242301</ITEM_NO>
    <ITEM_DESC1>13MM Aries Cell Assembly</ITEM_DESC1>
    <LOT_NO>123</LOT_NO>
    <LOT_DESC>4242301</LOT_DESC>
    <SUBLOT_NO />
    <LOCATION>2IRE</LOCATION>
    <GRADE_CODE>NONE</GRADE_CODE>
    <ITEM_UM>Each</ITEM_UM>
    <ITEM_UM2 />
    <LINE_NO>614</LINE_NO>
    <COUNT_NO>614</COUNT_NO>
    <P_ITEMUM2LABEL />
    <P_ITEMUM2DASH />
    <F_ITEMUM2>1</F_ITEMUM2>
    <P_CSITEMUM2_LABEL />
    <P_CSITEMUM2_DASH />
    </G_ITEM_NO>
    - <G_ITEM_NO>
    <PAGE_NO>0</PAGE_NO>
    <ITEM_NO>4242301</ITEM_NO>
    <ITEM_DESC1>13MM Aries Cell Assembly</ITEM_DESC1>
    <LOT_NO>1232</LOT_NO>
    <LOT_DESC>4242301</LOT_DESC>
    <SUBLOT_NO />
    <LOCATION>2IRE</LOCATION>
    <GRADE_CODE>NONE</GRADE_CODE>
    <ITEM_UM>Each</ITEM_UM>
    <ITEM_UM2 />
    <LINE_NO>615</LINE_NO>
    <COUNT_NO>615</COUNT_NO>
    <P_ITEMUM2LABEL />
    <P_ITEMUM2DASH />
    <F_ITEMUM2>1</F_ITEMUM2>
    <P_CSITEMUM2_LABEL />
    <P_CSITEMUM2_DASH />
    </G_ITEM_NO>
    <G_ITEM_NO>
    <PAGE_NO>0</PAGE_NO>
    <ITEM_NO>4242301</ITEM_NO>
    <ITEM_DESC1>13MM Aries Cell Assembly</ITEM_DESC1>
    <LOT_NO>562354</LOT_NO>
    <LOT_DESC>4242301</LOT_DESC>
    <SUBLOT_NO />
    <LOCATION>WOR RECV</LOCATION>
    <GRADE_CODE>NONE</GRADE_CODE>
    <ITEM_UM>Each</ITEM_UM>
    <ITEM_UM2 />
    <LINE_NO>603</LINE_NO>
    <COUNT_NO>603</COUNT_NO>
    <P_ITEMUM2LABEL />
    <P_ITEMUM2DASH />
    <F_ITEMUM2>1</F_ITEMUM2>
    <P_CSITEMUM2_LABEL />
    <P_CSITEMUM2_DASH />
    </G_ITEM_NO>
    </LIST_G_ITEM_NO>
    <WHSE_DESC>OPM INVENTORY ORG</WHSE_DESC>
    <CS_NODATA>617</CS_NODATA>
    <CYCLE_NO>000000014</CYCLE_NO>
    </PIR05>
    I want the g_item_no (repeating group) to have a page break each time LOCATION changes.

    You can declare two variables, to hold the previous and current LOCATION values and break the page when it differs.
    Or just before your end-for-each, have this code.
    <?if:position()!=1 and position()!=last() and LOCATION!=following::LOCATION[1]?><xsl:attribute name="break-before">page</xsl:attribute><?end if?>
    Ensure that its placed in a form field.
    This will have a page break when LOCATION changes.

  • Multicolum​n listbox value change and mouse up event in one case of event structure

    Hello All,
    Am facing two problems:
    1. I have two multicolumn events, one is value change for deleting the rows of Multicolumn listbox and another one is mouse up for sorting the columns. But I can't combine both the events in one case. And if I create two separate cases then each time the event of mouse up executes and sorting takes place irrespective of selection of delete event.
    2. I have a selection VI in which user selects which parameter he wants to show it in a multicolumn listbox. I want this parameters to be retain or stored when next time I run the VI after closing it.
    Am using LabVIEW 11. Pls reply soon.
    Thanks & Regards,
    Manisha 

    try this
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.
    Attachments:
    Untitled 2.vi ‏12 KB

  • Double value change event if cursor is set busy (LV2009)

    Hello everybody,
    I just migrated from LV 8.0 to LV 2009 (on linux) and now got problems with a value change event. I want to send a command if a button is pressed and send another one if the button is released. After sending the command I need to wait for an acknowledge from the receiver and to avoid user interaction in between I lock the cursor with "set busy" VI until the acknowledge is received. To see, when the button is pressed or released, I use a value change event. Inside the event structure the cursor is set busy.
    This worked reliable in LV 8.0 but not any more in LV 2009. The button's mechanical action is set to "switch until released" and if I press the button and keep it pressed it is reset to false automatically. The value change event is fired twice instead of only once (see attached vi) and "new value" is one time true and one time false. This doesn't happen if the mechanical action is set to "switch when pressed".
    Does anybody have an explanation or a workaround for this behaviour? Am I doing something wrong or is this a bug in LV? For now I'll just keep the cursor unlocked.
    Thanks for your help.
    Attachments:
    setMouseBusy_01.vi ‏11 KB

    Hi ckis,
    attached you'll find your modified example, it should do the trick now.
    Regards,
    Bernd
    Attachments:
    setMouseBusy_01.vi ‏9 KB

Maybe you are looking for

  • UCCX 10.5 Real Time Report shows "Not Connected"

    Hi, UCCX 10.5 HA over LAN. As per the title, RTR shows Not connected for both nodes and no data shown for all reports. all services are In service in both nodes.  Any Ideas? Regards.

  • How to find number of characters in a character string

    Hi,   Can anyone please tell me about how to find the number of characters in a character string type variable. Reagards, Siva

  • How can I copy a play list from iCloud to a jump drive?

    Hello, I use a PC for work, a MAC for home, and my wife and I both have iPhone 4 and iPad 2.  I would like to download the songs from one particular playlist on the iCloud to the jumpdrive so that I can install the mujsic onto my car's hard disk.  I

  • Manpower Planning to P&L

    Hi Friends, I am doing Manpower planning, which involves user will plan the headcount for the period in numbers:quantity(1,2,,3). I need to do in such a way, the salaries components has to hit the respective GL account like (Basicpay, Incentive). i.e

  • Apache 2.2 and ColdFusion MX

    I have ColdFusion MX 7 and Apache 2.2.4 installed on my machine, I have ran the latest JRUN connector which created all the necessary entries in apache etc. When I try to serve a coldfusion template, I get a 'You have chosen to open' alert i.e.doesn'