Cause loop iteration to reRender

First off sorry if this has been asked ... did a quick search and didn't see anything.
Anyway here's my problem:
We iterate over a list in JSF to output some controls (which are dynamic determined in Java). This works fine.
Then it was decided that the controls which this list outputs need to validate 'on-the-fly' as users move through them. Again no problems; used a4j:support.
The only issue is that the a4j:support we cannot give it a reRender target as all the controls are generated by the loop. We could reRender the entire form or else we can put self-rendered a4j:outputPanels around each parameter ... this works except that in both cases it causes all controls to be reRendered (as expected) and not just the control which sent the ajax update. This makes the behavior of the page controls feel very twitch, especially if the user is moving through them quickly.
Is there anyway of causes ONLY the particular loop iteration to be reRendered? I've tried messing around with a4j:region for this but have not had any success. Would be really appreciative if anyone has a solution for this.
Here's the basics of our page code; I've omitted all control types besides h:inputText.
<ui:repeat value="#{seam-outjected-list}" var="item">
   <a4j:outputPanel ajaxRendered="true">
      <h:inputText value="#{item.value}">
         <a4j:support event="onblur" ajaxSingle="true" />
      </h:inputText>
   <a4j:outputPanel />
</ui:repeat>

Shameless bump for new work day ... :[
Also I've tried giving the output panel an ID and calling rerender on that even though its generated in the loop. I can see the loop index in the series of component IDs so I was hopeful but alas the same issues :(

Similar Messages

  • The speed of the "for loop iteration"

    Hi all:
    I have written a short mini program just to test out the speed of a "for loop iteration"
    package generator;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2004</p>
    * <p>Company: </p>
    * @author not attributable
    * @version 1.0
      private static long tmp = 0;
      public static int count=0;
      public synchronized long getValue(){
          long value = 0;
        value = 10 * System.currentTimeMillis();
        if(value == tmp){
          value++;
          count++;
        tmp = value;
        return value;
      public static void main(String[] args) {
       for (int i=0;i<1000;i++){
          getValue();
        System.out.println("count is " + count);
    }And i find that on average, count will be a value between 498-500, which probably means that on average the speed of a for loop is around 0.5 ms. But I guess the speed of the "for loop " iteration is also very much CPU dependent, could somebody possibly give me some education on this issue :) ?
    Also, anybody know exactly how System.currentTimeMillis works? For example, how does it get the current time from the OS, etc. let me know.
    Again, Many many thanks...

    Hi all:
    I have written a short mini program just to test out the speed of a "for loop iteration"You will find the overhead of the getValue() call, the increments and most importantly the System.currentTimeMillis() is what you are timing.
        public static void main(String args[])  {
            int ITER = 1000000000;
            long start = System.currentTimeMillis();
            for(int i=0;i<ITER;i++);
            long end = System.currentTimeMillis();
            System.out.println("Iterations per sec="+ITER*1000L/(end - start));
        }Prints the following Iterations per sec=576368876Running on a 1.8 GHz Intel/Windows2000

  • Simulate Signal Express VI is sending two periods of the wave per loop iteration - how can I reduce this to one period?

    Hello,
    I've been trying to use the Signal Generator Express VI and DAQ Assistant in order to generate an output waveform, as seen in this NI tutorial video:
    http://www.ni.com/academic/students/learn-daq/generate/ (timestamp is at 2:07 for what I'm trying to do)
    For background, I'm trying to move a piston device using Labview. The sine waveform is intended to move the piston at a smooth speed. For every loop iteration, the Simulate Signal VI running into my DAQ Assistant moves the piston to its maximum displacement and back twice. I cannot determine why this is occuring.
    The settings in my "Configure Simulate Signal" tab are as follows:
    Frequency: 1Hz
    Phase: 90 deg
    Amplitude: 2
    Offset: -2
    I would like my piston to only reach its maximum displacement and return for every iteration of the loop. I've tried adjusting all of the settings within "Configure Simluate Signal" but I can only work in even numbers - sending the piston back and fourth two, four, or eight times, ect.

    The Simulate Signal VI is set for integer number of cycles and the default frequency set in the Cycles per Second control is 3.75 Hz. That results in the signal containing three complete cycles and the data array contains 8000 elements, not the nominla 10000 specified in the Express VI dialog.
    If you only want one cycle, you need to specify the signal so that you only get one. Either reduce the frequency or reduce the number of samples.
    As you have noticed Express VIs do one thing exceedingly well: They obscure what is going on inside.  I pulled your signal generation code out into a separate VI and then created a generator which will generate the same signal but allow you to select the number of cycles. It uses the Sine Waveform.vi from the Signal Processing  >> Waveform Generation palette.
    I also recommend that you change the structure of your program. The use of sequence structures is discouraged in LabVIEW  because they defeat dataflow are very inflexible when changes need to be made. A Producer/Consumer Design Pattern plus a state machine would probably be a good choice. This will allow separation of the daq acquisition from the saving to file so that the timing of one does not constrain the timing of the other.
    Setting the Analog Input Read to read multiple samples simultaneously and using the hardware timing of the data acquisiton device will get data faster and the timing will be precisely (compared to software timing) controlled by the hardware.
    Writing to the same file in parallel loops probably results in some strange behavior such as differing numbers of writes from acquired data compared to generated cycles. As the file grows, the writes may slow down due to the OS needing to fragment or reallocate space for the file.
    Lynn
    Attachments:
    Signal generator.vi ‏49 KB

  • ORA-24333: zero iteration count  Cause: An iteration count of zero was specified for the statement Action: Specify the number of times this statement must be executed

    Get the following error from Oracle 
    ORA-24333: zero iteration count
    Cause: An iteration count of zero was specified for the statement
    Action: Specify the number of times this statement must be executed
    Any suggestions on whether is this a Oracle bug or if not what should be set to avoid this failure.

    Hello get this from executing the following.
    Occurs intermitently.
    select MAX(LENGTH(lxVal)) from lxString_74501fb6 where lxType=910231053
    Find the MaxLenght(LxVal) returned is null for this query.
    Did google it but says the iterator not initialized. But not the case here
    Thanks

  • My vi is writing just the same data into spreadsheet even after changing the loop iteration time. hw can I change this mode ?

    My VI is writing the same amount of data into spreadsheet file even after changing the for-loop iteration time

    You should post the VI (with appropriate values saved as default) to this thread.  (At least a JPEG or PNG screenshot).
    Inside the For Loop, right-click on the N terminal and create Indicator.  Run the VI and you will see how many times the Loop spins.
    Further guessing:  You may have a 2D array with two rows and many columns feeding the For Loop.

  • Foreach loop iteration question

    Here's what I want to do. I have a list of items that I need to insert a comma between. For the last item there should be no comma afterward, so I need to flag this loop iteration as special.
    <c:set var="numRsns" value="${fn.length(networksForm.regionalSportsNetworkStations)}"/>
    <c:forEach var="rsn" items="${networksForm.regionalSportsNetworkStations}" varStatus="rsncounter">
         <c:if test="??? < numRsns" >
                               <b><c:out value="${rsn.description}" escapeXml="false" /></b>
                     </c:if>
         <b><c:out value="${rsn.description}," escapeXml="false" /></b>
    </c:forEach>How can I find out what the current iteration of the loop is? I am fairly new to JSP and JSTL so all help is appreciated.
    Thanks!

    Another useful feature of the loop status variable - it has boolean properties "first" and "last" to indicate if it is the first or last row
    <b>
    <c:forEach var="rsn" items="${networksForm.regionalSportsNetworkStations}" varStatus="rsncounter">
      <c:out value="${rsn.description}" escapeXml="false" />
      <c:if test="${rsncounter.last}>,</c:if>
    </c:forEach>
    </b>{code}
    Also because everything in your loop is bolded, why not just put bold tags around the whole thing, rather than mark up each individual element?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Why is loop iterator signed and not unsigned?

    Why is the data type of loop iterator a signed integer rather than an unsigned integer?  

    I32 is much more universal, and is for example used for array indices, array sizes, etc. The iteration terminal is most often connected to one of those functions. Your diagram would have the measles, with coercion dots all over without I32 on the iterator.
    If you need to keep count with e.g. U32 or U64, you can make your own using a shift register and +1 function.
    (There are ideas to make the representation changeable according to your needs. See also my comment here)
    LabVIEW Champion . Do more with less code and in less time .

  • What happens to the while loop iteration counter if it runs unchecked?

    I want to use the iteration counter to initialise a value on the first loop of a while statement. ie i = 0, x = 100. Fine. The application I am building will be left to run for weeks or months on end without stopping (hopefully :¬)). What happens to the iteration counter in this situation? Does it reset to 0 or what? I don't want it reinitialising any values while the loop is running other than when it starts.
    I set up a while loop to try to figure out what happens and the iteration counter stops at 2147483648 which is 2^31 - 1.
    Any help would be appreciated,
    Thanks,
    Niel.

    It might be something you already looked at, but perhaps it's an option to perform the initialization outside (before) the while loop. That way it will be initialized correctly only once, no matter what the iteration counter does.
    Of course if you need the counter for other purposes than initialization you might have the same problem...
    Note that a lot of the timer functions also overflow after a certain time (I believe 24 or 48 days?) so be careful running very long loops (but you already knew that probably).

  • How to detect the final loop iteration of a step in a PostStep Engine Callback?

    I see the need to use a PostStep Engine Callback and look at the Step.Result container of the caller.
    My issue: If the caller is configured to loop, the PostStep Engine CB executes with each iteration and I do not see how to detect the final iteration (which is the only iteration I am interested in).
    Ideas are welcome. Thanks in advance,
    Guenter

    Guenter,
    well, the way i discripted IS the generic way. The reason for this is the following:
    You can compare TestStand very well with procedural programming languages. So you have variables with different lifetimes and scope. RunState is one variable, which is available in every scope, but it may have different content.
    So you leaving the execution of your clientsequence in order to call the callback, you leave the scope of the RunState from your clientsequence. But only there the information is stored on how many iterations are left. It does not make sense to pass this anywhere, since the execution of your clientsequence has to decide if to loop further or not.
    But, please note that there are different scopes for the "disable result recording" as well. You have found the most global one, the station option. But you can as well set this in the sequence settings (Edit >> Sequence Properties >> Disable Result Recording for All Steps) and at step-level (Run Options >> Record Result {uncheck it}).
    Looping on a single step using the step settings, you can additionally choose not to record results for each iteration. This will lead to only a single entry in the ResultList, the overall result of the looped step (if resultcollection is enabled of course!).
    hope this helps,
    Norbert 
    Message Edited by Norbert B on 08-22-2008 02:10 AM
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Any way to sample segment length longer than loop iterations w/o shift registers?

    Hi all,
    My loop iterates approx every 0.06s and now i've been asked to add to the program a function which will sample the most recent 3s of data and return the max/min value for two of the signals.  I can think of a programmatically clumsy way to do this with shift registers- take the max/min for each iteration, save-repeat-compare until you have enough iterations to fill 3s of time.  But I can't help but think there has to be a cleaner(better?) way to do this. 
    Any help?
    Thanks
    Solved!
    Go to Solution.

    Hi there,
    Try looking into a circular buffer.  
    http://zone.ni.com/devzone/cda/tut/p/id/7188
    Once you've determined how often you're putting entries into the buffer, you'll know exactly how big of an array to grab and do the Min/Max on.  
    Another option is to use a circular array.  
    http://decibel.ni.com/content/docs/DOC-3414
    I would set this up to function a little like a Functional Global or an Action Engine.   The subVI would then be used in your DAQ loop to "stack" new data.   And then called in another loop or part of your code to be read every three seconds.  
    Patrick Allen

  • For-loop & iterator.remove()

    Is it possible to remove an item during iterating with for-loop?
    for (SelectionKey opKey : selector.selectedKeys())
         // I need to remove opKey from selectedKeys set.
    }Is it really necessary to remove handled key from selectedKeys set? What will happen if I run selector.select() while selectedKeys set contains some keys?

    Desiderata wrote:
    Is it possible to remove an item during iterating with enhanced-for-loop?No
    Is it really necessary to remove handled key from selectedKeys set? What will happen if I run selector.select() while selectedKeys set contains some keys?[Selector Selection|http://java.sun.com/j2se/1.5.0/docs/api/java/nio/channels/Selector.html#selop]

  • Restricting loop iterations in smartforms

    hi,
        i am encountering a problem at loops in samrtforms.i am looping an vbak table and under that loop using an table i am displaying items each row in vbak each page and corresponding items.the problem is in vbak table thare are 12 rows but the sf iterating fo 13 times and in last page it is not displaying any values.i,e it it is iterating one more time than actual iterations.how to restrict it so that it will iterate for 12 times only.plz send some answers for me.thank u in advance.

    Hi
    I guess it is not a smartform iteration problem
    What might have happened is,
    When ever the contents to be displayed on a page exceeds the page limit the smartforms directly takes you to the next page and the remaining contents will get displayed in the next page
    So just make sure that the contents of a each vbak entry does not exceed the page limit.
    Regards,
    Sagar

  • ForEach Loop Iteration Order

    Hi,
    I have a SSIS package that uses a Foreach Loop Container to iterate through a series of flat files. The order in which the files are iterated through is based on the name of the file. Is it possible to change the iteration order? More specifically, can the
    iteration order be changed to the date when the file was placed in the iteration folder? i.e files that have been sitting in a folder for a longer amount of time get processed first?

    you can change order but for that you need to use a control table based approach. Using file enumerator  will always take order based on filename.
    The approach would be like this. Have a for each loop based on file enumerator first. Take the filename and arrival date (this you can get inside a script task see
    http://jamelcato.com/111/how-to-check-last-modified-date-using-ssis/) and populate the table with the information.
    Have a object variable and set query as 
    SELECT fileName
    FROM table
    ORDER BY DateField
    Then have a for each loop to iterate through object variable use ADO enumerator
    http://www.select-sql.com/mssql/loop-through-ado-recordset-in-ssis.html
    This would make sure it iterates based on file date value. Then have a variable inside to retrieve filename each time and use it for whatever processing you want.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • While Loop - Iteration Terminal

    Why the iteration terminal in my upper while loop counts only to 1? (err_while.vi)
    Petr Bilovsky
    Attachments:
    err_while.rar ‏289 KB

    Hi PetrB
    I tested your vi. Results are unexpected.
    Upper loop runs to 10 and stops.Down loop keeps running and it should not, because the inputs to AND gate are TRUE.
    I deleted down loop and copied upper loop ant Now they stop at 10.
    I don´t know your DLL, so try to make it reentrant to avoid side efects.
    Hope this helps.
    Alipio
    "Qod natura non dat, Salmantica non praestat"

  • IMAQ 1408 + DAQ cards crashing when loop iteration 1

    I have a problem trying to run some code which outputs a synchronised analog and digital pattern using the PCI-DIO-32HS and PCI-6713 DAQ cards which triggers an external analog camera. The images from the camera are then read via the IMAQ 1408 frame grabbing card.
    When I run the code once, it executes successfully every time. If, however, I select 'run continuously', or alternatively place a FOR-loop around the pattern output and image collection, the computer executes the pattern once, then completely freezes the computer, requiring a hard reboot of the computer.
    I have attempted to add wait times at various points through the code, however even if I place 10s delays in the loop (the pattern takes around 1s) the computer hangs and crashes. Running the code by repeatedly clicking 'run' however works every time, with no error or crashes.
    Is there any way to extract or trace the error causing this behaviour - the issue must be with the IMAQ drivers, however I cannot see what is different between running the VI manually 10 times in a row, and running it continuously with a wait to prevent it running at full speed. Any advice for debugging this error would be much appreciated. I have attached the code with subVIs necessary to reproduce the error.
    Attachments:
    JAI_Testing.zip ‏841 KB

    Hi Fan Wu,
    You're right that you only have two counters on your USB DAQ device. If we limit the problem to only one channel, then I would recommend using the counter because it sounds like you're creating a pulse train of known parameters. Since the counters use a fast timebase (if you're using Mseries you're using an 80MHz clock), you'll get very predictable performance at 1ms of interest.
    The other way to do this (since you'll need more channels) is to use a counter to setup a timing engine. A simple pulse train with 50% duty cycle and whatever frequency you're interested in (sounds like 1kHz) can be used as your DI/O timing clock. You can then create a digital waveform with the characteristics you are interested in and write that to your buffer. With your Digital task correlated to your counter output, you can output this waveform at the rate of your counter output.
    While this is NOT the end application you are looking to write, this example has some great parallels to what you are trying to do. It illustrates creating a clock with the counter and then writing a digital waveform to correlate to that clock.
    http://zone.ni.com/devzone/cda/epd/p/id/3687
    PBear
    NI RF

Maybe you are looking for

  • Issue with generation of document/literal type WSDL using Axis

    Hi All, I am trying to convert some Java code into WSDL using Axis 1.2 framework. I used Document/Literal style for binding. One of the methods in my Java code returns an array. This array is described in Axis generated WSDL as follows: <complexType

  • Issue with indicator values in report display

    Hi All, I am getting an issue with valutype #. we have  account  restricted hirerarchy ,fiscal year period and Valuetype in rows . I need to show the actuals indicator of value type 10 data in one row for each fiscal year period.But some of the key f

  • How do I send 'emoticons' in my outgoing emails?

    How do I include 'emoticons' in my outgoing emails?

  • (Help) Voice Project , CUCM or another?

    HI I´ve never participated of the project with more than 120 extensions, so i need help to what I have to buy, I always worked with CME. In this project will be 200 extensions, 150 mailboxes, 90 E1 channels, and a softwareto record the calls. So i th

  • How a fact table is choosen by BI Server ?

    I do have in a Presentation Catalog, Dims P, S, A and Facts FS, FA. The three dims connect to both FS and FA (in physical and BMM layers) I have FA setup as implicit fact. A query using Dims P, A uses FA. That is expected. Another query, using Dims P