Reg af:iterator behaviour

Hi All,
Please help me understand the iterator behaviour.
I am trying to access alternate rows of an iterator with the use of varStatus.index value.
My requirement is to apply a style to alternate rows of an iterator. And for this am trying to implement logic at tr level, like -
<table>
<af:iterator varStatus="rowNum"...>
     <tr bgcolor="${rowNum.index mod 2 ne 0?'Green':'Yellow'}" >
          <td/>
          <td/>
     </tr>
</af:iterator>
</table>
My expectation is that the bgcolor gets applied alternately to the rows of the iterator, but the condition gets executed only at the beginning of the 1st tr and the same color gets applied to all the rows.
When I try implementing the logic by writing a method in my bean also, the method is invoked only once and for the rest of the tr.s, the same color is applied.
Request to help me understand the runtime behaviour of the component.Also, please suggest solution for applying alternate bgcolor to rows in an iterator.
I am using JDev 11.1.2.4
Thanks,
Deepthi

If you are not specific about Green and Yellow colors, you can set RowBandingInterval property to 1 on the af:table.
If you want Green and Yellow, I believe you can set some styleClass to override band color.
Thanks,
Nitish.

Similar Messages

  • SRM Close PO Short

    Hi Gurus,
    Please help me on the following issue.
    "When you do a final delivery in SRM and zero out the quantity to close the PR short, this does not transfer over to ECC.  Basically, the final delivery indicator is set in ECC, but the system will still allow you to do a goods receipt in ECC for the  quantity.  We have an example where the user closed PO  short in SRM (quantity remaining was 10)--we did a quantity of 0 and marked it for final delivery.  Now i was able to go into ECC to t-code MIGO for the goods receipt and saw the quantity of 10 still available to be received, even though the final delivery indicator was set in SRM."
    Please help.
    Reg,
    Bis

    Hello,
    Strange behaviour...
    You mean MIGO was allowed for concerned PO although its final delivery flag was set in R/3 ?
    Regards.
    Laurent.

  • Expected behaviour?: input controls change size with iterator in findMode

    Hi all
    I'm trying to work out if the following is expected behaviour with the JDev 11g ADF Faces RC input components or a bug, before lodging a support request.
    I've noticed that fields resize themselves based on the parent bound iterator being in find mode (as separate to the default execute (show) mode). This causes all sorts of havoc with page layout when switching between the 2 modes.
    To demonstrate the code I have a simple inputText control with a hardcoded column size, and a Find commandButton:
    <af:inputText value="#{bindings.Status.inputValue}"
       label="#{bindings.Status.hints.label}" columns="20"
       maximumLength="#{bindings.Status.hints.precision}" shortDesc="#{bindings.Status.hints.tooltip}"
       disabled="true">
      <f:validator binding="#{bindings.Status.validator}"/>
    </af:inputText>
    <af:commandButton actionListener="#{bindings.Find.execute}" text="Find" disabled="#{!bindings.Find.enabled}"/>There's nothing unusual about the bindings for these components:
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel" version="11.1.1.51.88" id="untitled1PageDef"
                    Package="view.pageDefs">
      <parameters/>
      <executables>
        <iterator Binds="TableView1" RangeSize="25" DataControl="AppModuleDataControl"
                  id="TableView1Iterator"/>
      </executables>
      <bindings>
        <attributeValues IterBinding="TableView1Iterator" id="Status">
          <AttrNames>
            <Item Value="Status"/>
          </AttrNames>
        </attributeValues>
        <action IterBinding="TableView1Iterator" id="Find" RequiresUpdateModel="true" Action="iteratorFind"/>
        ...and so on...Before I press the Find button (ie. Execute/show mode), the inputText renders 20 columns in width as expected, but in Find mode the field changes size.
    Is this expected behaviour or a bug? Alternatively can we influence the field's size in find mode (as the column attribute seems to be ignored), as I'd like to make it the same as the execute/result mode, so my page doesn't resize.
    Cheers,
    CM.

    Hi Frank
    I've recorded this following ScreenToaster session to show you the behaviour under Firefox. It's a standard search form dragged straight from the data control window. I haven't modified the columns attr at all, each component column is bound #{bindings.<fieldname>.hints.displayWidth}.
    Note when the Find button is pressed the fields change size to set defined width, then after the Execute button is pressed they go back to their dynamic sizes (presumably coming from the binding):
    http://www.screentoaster.com/watch/stWUtSQUVLRl1XRlpVXVta
    Let me know if you can't access the ScreenToaster video, it's my first try in publlishing a video via it.
    Cheers,
    CM.

  • ECC 6.0 VERSION UPGRADE - INCONSISTENCY BEHAVIOUR -MM - Reg

    Hai,
    We are in the process of ECC 6.O upgrade from ECC 5.0,
    we started the CT1/ CT2 testing and found the following error.
    While inwarding Material against Subcontracting purchase order / S.L.Agreement ,
    The system shows the error message of CHALLEN MATERIAL IS DIFFRENT FROM MATERIAL DOCUMENT , during GR
    note :- for the same material , same p.o , some times systems allows for GR & some times gives above error message.
    if i try with some other login , the behaviourseems to be same as my login
    Can anyone tell this why this inconsistency behaviour of system during GR for sub contracting item..
    Regards,
    Suresh.P

    go to SE38,  here type the program RM07CUFA,
    click on execute... type ur mov type 541... here make the purchase order field from display to optional..
               this will effected for new subcontracting scenerio....

  • Behaviour of the Stack-Iterator

    I've just wondered about the strange behavior of my program and found the reason in the "unintuitive" implementation of the iterator an stack returns. I would expect the iterator to begin from the "end" of the stack, and not at the beginning.
    Therefore my stack for-loop ( for(String s: someStack) ) is behaving like a vector-loop. Is this the way its supposed to be?
    Edited by: SaschaZorn on Nov 7, 2007 5:26 PM

    Apparently so, as the iterator methods are inherited. I agree that it's counter-intuitive but it's not going to change now ...

  • Reg insertComponent() in JTextPane...Strange Behaviour !

    Inside my ListRenderer (which extends JTextPane) I try to insert a image icon using insertComponent()...but it fails.
    But I am able to add it outside my ListRenderer.
    Please try this coding and let me know....
    import javax.swing.*;
    import java.awt.*;
    import java.util.*;
    public class MyTest extends JFrame {
        JList list;
        ImageIcon list_icon;
        DefaultListModel model;
        JScrollPane  jsp;
        Vector vect;
        public MyTest()
            model=new DefaultListModel();
            list=new JList();
            jsp=new JScrollPane(list);
            list_icon=new ImageIcon("choose your Image");//your Image Here
            list.setModel(model);
            this.getContentPane().add(jsp,java.awt.BorderLayout.CENTER);
            JTextPane text=new JTextPane();
            text.insertComponent(new JLabel("WELCOME"));//adding outside the list
            list.setCellRenderer(new TextPaneRenderer());
            model.addElement("Hello");
            model.addElement("Hello1");
            model.addElement("Hello2");
            this.getContentPane().add(text,java.awt.BorderLayout.SOUTH);
            this.setSize(300,300);
            this.setVisible(true);
        public static void main(String[] a)
            new MyTest();
        class TextPaneRenderer extends JTextPane implements javax.swing.ListCellRenderer {
                public TextPaneRenderer()
                public Component getListCellRendererComponent(JList list, Object value,
                int index, boolean isSelected, boolean hasFocus) {
                    JLabel lab1=new JLabel(list_icon);
                    lab1.setBackground(Color.blue);
                    setText(value.toString());
                    this.insertComponent(lab1);
                    setEnabled(list.isEnabled());
                    this.setPreferredSize(new Dimension(list.getWidth(),20));
                    if(isSelected)
                        setBackground(new Color(198,198,250));
                    else
                        setBackground(Color.white);
                   setFont(list.getFont());
                   return this;
    }

    Use this instead of insertComponent()..
    yourTextPane.setSelectionStart(doc.getLength());
    yourTextPane.setSelectionEnd(doc.getLength());
    yourTextPane.insertIcon(ic1);
    Ciao!!
    Giovanni

  • Strange behaviour of Runtime.getRuntime().exec(command)

    hello guys,
    i wrote a program which executes some commands in commandline (actually tried multiple stuff.)
    what did i try?
    open "cmd.exe" manually (administrator)
    type "echo %PROCESSOR_ARCHITECTURE%" and hit enter, which returns me
    "AMD64"
    type "java -version" and hit enter, which returns me:
    "java version "1.6.0_10-beta"
    Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b25)
    Java HotSpot(TM) 64-Bit Server VM (build 11.0-b12, mixed mode)"
    type "reg query "HKLM\SOFTWARE\7-zip"" returns me:
    HKEY_LOCAL_MACHINE\SOFTWARE\7-zip
    Path REG_SZ C:\Program Files\7-Zip\
    i wrote two functions to execute an command
    1) simply calls exec and reads errin and stdout from the process started:
    public static String execute(String command) {
              String result = "";
              try {
                   // Execute a command
                   Process child = Runtime.getRuntime().exec(command);
                   // Read from an input stream
                   InputStream in = child.getInputStream();
                   int c;
                   while ((c = in.read()) != -1) {
                        result += ((char) c);
                   in.close();
                   in = child.getErrorStream();
                   while ((c = in.read()) != -1) {
                        result += ((char) c);
                   in.close();
              } catch (IOException e) {
              return result;
         }the second function allows me to send multiple commands to the cmd
    public static String exec(String[] commands) {
              String line;
              String result = "";
              OutputStream stdin = null;
              InputStream stderr = null;
              InputStream stdout = null;
              // launch EXE and grab stdin/stdout and stderr
              try {
                   Process process;
                   process = Runtime.getRuntime().exec("cmd.exe");
                   stdin = process.getOutputStream();
                   stderr = process.getErrorStream();
                   stdout = process.getInputStream();
                   // "write" the parms into stdin
                   for (int i = 0; i < commands.length; i++) {
                        line = commands[i] + "\n";
                        stdin.write(line.getBytes());
                        stdin.flush();
                   stdin.close();
                   // clean up if any output in stdout
                   BufferedReader brCleanUp = new BufferedReader(
                             new InputStreamReader(stdout));
                   while ((line = brCleanUp.readLine()) != null) {
                        result += line + "\n";
                   brCleanUp.close();
                   // clean up if any output in stderr
                   brCleanUp = new BufferedReader(new InputStreamReader(stderr));
                   while ((line = brCleanUp.readLine()) != null) {
                        result += "ERR: " + line + "\n";
                   brCleanUp.close();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              return result;
         }so i try to execute the commands from above (yes, i am using \\ and \" in java)
    (1) "echo %PROCESSOR_ARCHITECTURE%"
    (2) "java -version"
    (3) "reg query "HKLM\SOFTWARE\7-zip""
    the first function returns me (note that ALL results are different from the stuff above!):
    (1) "" <-- empty ?!
    (2) java version "1.6.0_11"
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)
    (3) ERROR: The system was unable to find the specified registry key or value.
    the second function returns me:
    (1) x86 <-- huh? i have AMD64
    (2) java version "1.6.0_11"
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)
    (3) ERROR: The system was unable to find the specified registry key or value.
    horray! in this version the java version is correct! processor architecture is not empty but totally incorrect and the reg query is still err.
    any help is wellcome
    note: i only put stuff here, which returns me strange behaviour, most things are working correct with my functions (using the Runtime.getRuntime().exec(command); code)
    note2: "reg query "HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\0" /t REG_SZ" IS working, so why are "some" queries result in ERR, while they are working if typed by hand in cmd.exe?

    ok, i exported a jar file and execute it from cmd:
    java -jar myjar.jar
    now the output is:
    (1) "" if called by version 1, possible to retrieve by version 2 (no clue why!)
    (2) "java version "1.6.0_10-beta"
    Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b25)
    Java HotSpot(TM) 64-Bit Server VM (build 11.0-b12, mixed mode)"
    (3) C:\Program Files\7-Zip\
    so all three problems are gone! (but its a hard way, as i need both functions and parse a lot of text... :/ )
    thanks for the tip, that eclipse changes variables (i really did not knew this one...)

  • Strange behaviour with ActiveX invoke node and Excel

    I want to send a table of numbers from LV50.1f to Excel97. After getting a
    reg to Excel8.Application I retrieve the Workbooks property, Invoke Item to
    select a certain Workbook reference, retrieve the Worksheets collection
    reference, Invoke Item and then get a reference to WORKBOOKS again.
    Strangely, there is an example code from the NI web site that does exactly
    the same, but in the last step a variant is returned in stead of a
    reference, which is converted using Variant to G to a Worksheet reference.
    when I copied that last invoke node to my VI I also had a variant returned,
    so on one diagram I had to invoke nodes connected to the same sources, one
    returning a ref, the other returning a variant!
    Disco
    nnecting the sources to my Invoke node and rewiring gave no change.
    Also type casting the ref to workbooks to a worksheets ref, didn't work - I
    get errors in the following property node that retrieves a Range - which
    exists in Worksheet, but not in Workbooks.
    Appearantly, LV gets the returned type mixed up sometimes, and there is no
    way to fix it other then copying a invoke node from another diagram?
    Finally I got it working though, but this behaviour puzzles me. Contrary to
    the example from NI, I now managed to send a table (2d array of strings) in
    one call to Excel (don;t need to loop over cells or columns).
    PS
    I used to do the same using DDE but ranges are different for each language
    version of Excel (i.e. R1C1 for English and R1K1 for Dutch), so my VI's need
    to know the language of Excel. Also with NT and Win98, getting a DDE
    connection often hangs LV. But a big progress has been made - now I need
    different VI's for each version of Excel!!!
    Ferry Toth
    Enraf BV, The Netherlan
    ds

    Hi Enric,
    Can you try your queries again using the new release of DB XML? It contains some improvements in this area.
    http://www.oracle.com/technology/software/products/berkeley-db/xml/index.html
    John

  • FacesCtrlListBinding getInputValue ADFv: error while reactivating a reg

    Jdev. 11.1.1.4
    Trying to apply this in my application:
    http://one-size-doesnt-fit-all.blogspot.com.es/2011/06/jdev-111140-afshowdetailitems-and_20.html
    I'm getting this error while trying to programmatically reactivate my region after having deactivate it.
    This is a piece of degub listing of one execution of my application:
    <JUCtrlValueBinding> <startEvents> [8534] NumeroCopias: IGNORING Start events as it is not in active/push mode
    <ADFLogger> <begin> Get LOV list
    <JUMetaObjectManager> <getControlDefinitionFactory> [8535] JUMOM - CTRL_DEF_FACTORY not found: [ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'
    <JUMetaObjectManager> <getControlDefinitionFactory> [8536] JUMOM - factory from map: oracle.adfinternal.view.faces.model.binding.FacesBindingDefFactoryImpl, [ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'
    <DCUtil> <findSpelObject> [8537] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for AppModuleDataControl
    <ADFLogger> <addContextData> Get LOV list
    *<FacesCtrlListBinding> <getInputValue> ADFv: No se ha encontrado el elemento seleccionado que coincide con el valor 3 de tipo: oracle.jbo.domain.Number en la lista de valores.*
    <JUCtrlValueBinding> <startEvents> [8538] SvagrCodigo1: IGNORING Start events as it is not in active/push mode
    <DCExecutableBinding> <refreshIfNeeded> [8539] Invoke refresh for :SvSolicitudesServicioAtrView2Iterator
    <DCIteratorBinding> <refresh> [8540] Executing and syncing on IteratorBinding.refresh from :SvSolicitudesServicioAtrView2Iterator
    Error translated to english:
    *<FacesCtrlListBinding> <getInputValue> ADFv: Selected element of value 3 has not been found with type: oracle.jbo.domain.Number in the LOV.*
    The first time I display the region this error doesn't happen. Then it is deactivated (finalizing the task flow) and when activating again (initializing the task flow again) the error appears just when displaying the first jsf page. The error is due to a soc field in the page. If I remove it, then it doesn't give any error.

    Frank,
    I have already found the problem.
    You are right. What I am really doing is conditionally activating the region (with properties "activation" and "active"). I think this is ok.
    The problem that I have found is due to that page had the iterator defined as ChangeEventPolicy=ppr. Previously to executing the page, in the task flow I do a CreateInsert operation on that iterator. The first time I acceess the page it executes ok and handles the new record as the current record. When deactivating and reactivating (or as you prefer to call it) the region, afeter executing the ceratInsert, when the page is executed the ChangeEventPolicy=ppr erexecuets de iterator and the "new" row (that was not posted nor committed to the database) is lost.
    I have removed the ppr and now it seems to work better.
    Is this the behaviour of the iterator PPR ?

  • 10.1.3.4.0 : iterator mode : RowIterator.ITER_MODE_LAST_PAGE_FULL

    hi
    The ADF Developer's Guide For Forms/4GL Developers 10g Release 3 (10.1.3.0) section "27.1.4 Presenting and Scrolling Data a Page at a Time Using the Range" ...
    at http://download.oracle.com/docs/cd/B32110_01/web.1013/b25947/bcadvvo.htm#sthref2557
    ... documents two iterator mode flags.
    The first is ITER_MODE_LAST_PAGE_PARTIAL documented as "the style that works best for web applications ".
    The second is ITER_MODE_LAST_PAGE_FULL which turns out the be effectively the default iterator mode value, while the last page is not full.
    Please consider this example application created using JDeveloper 10.1.3.4.0
    at http://www.consideringred.com/files/oracle/2010/IterModeLastPageFull10gApp-v0.01.zip
    It has a simple View Object dropped on a JSF page as a read-only table. It also has a managed-bean that allows to show iterator mode information on the page.
    See the screencast at http://screencast.com/t/qm6flt7asYA
    questions:
    - (q1) Is it intended behaviour to have iterator mode ITER_MODE_LAST_PAGE_FULL while the last page is not full?
    - (q2) How should this iterator mode be configured, and is this possible declarative?
    - (q3) Is it possible to have the "last page full" when navigating ranges of rows using the af:table component (maybe using a configuration unrelated to iterator mode)?
    many thanks
    Jan Vervecken

    Thanks for your reply Frank.
    ... So this seems to be a bug in the behavior. I asked Steve if he would consider this to be a bug and am waiting for his response ...Thank you, I am looking forward to Steve's feedback.
    ... The place to set the declarative setting is on the "Tuning" panel of the VO. ". See the "Fill Last Page of Rows when Paging Through Rowset" checkbox.If I uncheck the "Fill Last Page of Rows when Paging through Rowset" checkbox, as in the modified example application ...
    at http://www.consideringred.com/files/oracle/2010/IterModeLastPageFull10gApp-v0.02.zip
    ... this is reflected on the page, showing
    r_adfHelper.iterModeInfo['EmployeesLimitedVOVIIterator']  ITER_MODE_LAST_PAGE_PARTIAL (0)... instead of ...
    r_adfHelper.iterModeInfo['EmployeesLimitedVOVIIterator']  ITER_MODE_LAST_PAGE_FULL (1) ... but the behaviour of the af:table component has not changed, see also the screenshot in IterModeLastPageFull10gApp-v0.01-v0.02.png.
    - about (q3): Any thoughts on other (configuration) options that could cause "last page full" behaviour in the af:table component?
    regards
    Jan

  • Attributes iteration of a value node bound to a structure invalid?

    A context value node bound to a structure always delivers all attributes of the structure bound instead of the attributes, which were selected from the available structure attributes.
    For example, if structure S has the attributes A, B and C and the value node V is bound to S, but "inherits" attribute A only, the code
    wdContext.nodeV().getNodeInfo().iterateAttributes()
    delivers an iterator which loops 3 times and returns A, B and C as attribute infos.
    Is this a wanted behaviour? I would expect that only the attributes, which are bound to the corresponding structure attributes (A in the sample) are returned.
    Regards
    Stefan
    Just to be a little bit more accurate: the term "structure" means a complex type defined unter "Structures" in the "Local Dictionary" for example. Attributes and nodes are Value Attributes/Nodes.
    Message was edited by: Stefan Klensch

    Yes, it is the intended behaviour. These <i>are</i> the attributes at run time. And I don't see why the additional structure attributes should be hidden from the application (besides the fact that iterateAttributes() is used internally, too).
    If you are interested whether an attribute was originally declared or was automatically added due to the structure binding, look at IWDAttributeInfo.isDeclared().

  • Iterator does not iterate

    Dear all,
    I have the following problem:
    I have a table with behind it a iterator. The data behind the table contains 12 rows. The table's rangesize gets initiated at 10 and the first time the table is shown it shows 10 filled rows.
    However:
    If I click on the 'next 2' or I select the '11-12' option on the dropdownlist of the table, the table shows 10 rows, starting from the 3th row of the previous set and ending with two blank rows.
    The normal behavior, of other tables in the same application, is showing the next two rows in a refreshed table of two rows, this particular table seems not to have that intention.
    I presume that the iterator, for some strange reason, doesn't change to the next row set.
    It doesn't update the correct range nor rangestart in stead it uses the old rangesize (10), wants to show the two last rows but doesn't (blank rows).
    Could anyone give me a hand on this ?
    Some code:
    the table:
    <af:table value="#{bindings.ViewsLvl1AppModule1BalancesRefMovResultView.collectionModel}"
    var="row"
    rows="#{bindings.ViewsLvl1AppModule1BalancesRefMovResultView.rangeSize}"
    emptyText="#{bindings.ViewsLvl1AppModule1BalancesRefMovResultView.viewable ? 'No rows yet.' : 'Access Denied.'}"
    banding="row"
    width="100%"
    binding="#{instrumentDetailsBean.coreTable}">
    From the pagedef:
    <iterator id="BalancesRefMovResultViewIterator" RangeSize="10"
    Binds="Root.ViewsLvl1AppModule1.BalancesRefMovResultView"
    DataControl="GlobalAppModuleDataControl"
    RefreshCondition="#{instrumentDetailsBean.queryExecuted}"/>
    and
    <table id="ViewsLvl1AppModule1BalancesRefMovResultView"
    IterBinding="BalancesRefMovResultViewIterator">
    <AttrNames>
    <Item Value="DatCreation"/>
    <Item Value="NbrMvt"/>
    <Item Value="AmtOper"/>
    <Item Value="TypMvt"/>
    <Item Value="StopCodStop"/>
    <Item Value="DscStop"/>
    <Item Value="RefCik"/>
    <Item Value="AccnNbrAcc"/>
    <Item Value="CodStop"/>
    <Item Value="DemdNbrDemand"/>
    <Item Value="NamShort"/>
    <Item Value="NamFullPrim"/>
    <Item Value="RefAff"/>
    </AttrNames>
    </table>
    If I on the other hand use a self-made dropdownlist that changes the range manually, the range and the table and, hurray, the last two rows, get displayed like a charm.
    from the bean:
    public void setRangeSize(Integer rangeSize) {
    if(rangeSize == null)
    return;
    coreTable.setRows(rangeSize.intValue());
    coreTable.setShowAll(false);
    this.rangeSize = rangeSize;
    EL.modifyRangeInIteratorBinding(this.rangeSize, "BalancesRefMovResultViewIterator");
    from 'EL':
    public static void modifyRangeInIteratorBinding(int range, String name) {
    DCIteratorBinding iterBinding = getIteratorBinding(name);
    if (iterBinding!=null){
    iterBinding.setRangeSize(range);
    } else {
    log.error("faulty iteratorbinding occured in modifyRangeInIteratorBinding:"+name);
    Any help or pointers to help greatly appreciated.
    S.
    Also: I tried to mimic the default behaviour by hand but it doesn't work, I attached a rangeChangeEventListener:
    public void changeRangeEvent(RangeChangeEvent rangeChangeEvent) {
    EL.modifyRangeStartInIteratorBinding(rangeChangeEvent.getNewStart(),"BalancesRefMovResultViewIterator");
    setRangeSize(rangeChangeEvent.getNewEnd()-rangeChangeEvent.getNewStart()+1);
    with again 'EL':
    public static void modifyRangeStartInIteratorBinding(int rangeStart, String name) {
    DCIteratorBinding iterBinding = getIteratorBinding(name);
    if (iterBinding!=null){
    iterBinding.setRangeStart(rangeStart);
    } else {
    log.error("faulty iteratorbinding occured in modifyRangeStartInIteratorBinding:"+name);
    But when this code is executed the rangestart stays on 0 (only the first rows are displayed).
    grtz,
    S.
    Edited by: matdoya on Dec 29, 2008 6:54 AM

    Hi,
    which Model technology is your application based on ?
    ADF Business Components ?
    The View Objects have a property called "*Fill Last Page of Rows when Paging Through Rowset*" (in the VO Editor wizard, "*Tuning*").
    From the online help:
    When a user scrolls through data in a page-by-page fashion on a client (such as from a series of web pages), the default behavior is to completely fill the last page with data.
    As a result, rows viewed on the previous page can appear on the last page. Select to maintain this default behavior.
    Regards,
    Didier.

  • Unexpected loop behaviour with asynchronous call

    I am having trouble with loop behaviour when using an asynchronous call.
    I am building an application to record simultaneously temperature (NI USB-TC01 thermocouple), displacement (DC voltage, read from an Agilent 34401a) and resistivity (using a Keithley 2400 sourcemeter).
    I am using a voltage sweep function on the Keithley 2400 to alternate current direction in a sample and measure the voltage drop - this is a common technique for eliminating thermal emf from resistance measurements. But what you need to know is that I set the number of current cycles I want and then wait for the instrument to measure and return the meausurements - up to 50 samples, which takes nearly 30 seconds. With the other two measurements, I have to programmatically call a measurement vi for each sample I want.
    I have set up my application to asynchronously program the resistivity measurement and then wait for the response, and I want to in parallel measure temperature and position until the resistivity is done. I then want to record the mean and standard deviation for each signal. I used an event structure to interrupt the temperature and position measurements when done.
    The problem I am running into is that after the first resistivity measurement is completed and I go to do the second one, the loop that measures temperature and displacement only runs twice, so I only get two samples, regardless of how many resistivity samples I want to collect. For example, if I want 50 resistivity samples at a time, the first iteration will measure rougly 40 samples of temperature and displacement, but any subsequent iterations will only measure twice.
    I know this is probably overwhelming to understand the operation, but can anyone help? I have attached my code ('Delatometer') as well as a test vi I built that uses the same structure but has no interactions with instruments ('asynchronousCall').
    The
    Attachments:
    Delatometer.zip ‏221 KB
    asynchronousCall.zip ‏29 KB

    I forgot to mention...the test vi that I uploaded executes as expected, so I am thinking that maybe its an issue with the instrument calls? I also found that if I run the Delatometer program in 'highligh execution mode' it runs properly, and it is my understanding that in 'highlight execution mode' there is no multi-threading.

  • Iterator Refresh Issue

    Hi,
    I'm seeing a weired behaviour when working with Iterator.
    Here are the thing what i have done & the problem that im facing with Iterator.
    Things what i have done
    ===============
    1.I have a DTO and a java class named ServiceDelegate in my model. And i have defined a method inside ServiceDelegate with the return type of DTO.
    2.And exposed this ServiceDelegate as Data Control.
    3.Using this DataControl, dragged the return type of the method(which is nothing but DTO) as a Search Form with a Submit button on to a jsff.
    4.Now, when the user enters the data for first time...the DTO is getting populated and able to retrieve the information which has been entered by the user into ServiceDelgate properly.
    5.This is fine.
    6.Now,if user tries to modify the data which was already entered .... and clicks submit button. This time, the modified data is not coming into the ServiceDelegate.
    Finally, i'm able to get the data from the Iterator(DTO) only for the first time. It is not working for the second time and further. If you open the page once again as fresh, it works fine.
    Does any one of you have any idea about this, why it is behaving so.
    Here is the code from my page Def.
    <methodIterator id="*borrowerDetailIterator*" Binds="editBorrowerDemographics.result" DataControl="BorrowerServiceDelegate" RangeSize="25"
    BeanClass="org.tgslc.defaultmanagement.domain.Borrower"/>
    <accessorIterator MasterBinding="*borrowerDetailIterator*" Binds="person"
    RangeSize="25" DataControl="BorrowerServiceDelegate"
    BeanClass="org.tgslc.defaultmanagement.domain.Person"
    id="personIterator"/>
    <accessorIterator MasterBinding="*borrowerDetailIterator*" Binds="address"
    RangeSize="25" DataControl="BorrowerServiceDelegate"
    BeanClass="org.tgslc.defaultmanagement.domain.PersonAddress"
    id="addressIterator"/>
    <accessorIterator MasterBinding="*borrowerDetailIterator*" Binds="phone1"
    RangeSize="25" DataControl="BorrowerServiceDelegate"
    BeanClass="org.tgslc.defaultmanagement.domain.PersonPhone"
    id="phone1Iterator"/>
    <accessorIterator MasterBinding="*borrowerDetailIterator*" Binds="phone2"
    RangeSize="25" DataControl="BorrowerServiceDelegate"
    BeanClass="org.tgslc.defaultmanagement.domain.PersonPhone"
    id="phone2Iterator"/>
    <accessorIterator MasterBinding="*borrowerDetailIterator*" Binds="email1"
    RangeSize="25" DataControl="BorrowerServiceDelegate"
    BeanClass="org.tgslc.defaultmanagement.domain.PersonEmail"
    id="email1Iterator"/>
    <accessorIterator MasterBinding="*borrowerDetailIterator*" Binds="email2"
    RangeSize="25" DataControl="BorrowerServiceDelegate"
    BeanClass="org.tgslc.defaultmanagement.domain.PersonEmail"
    id="email2Iterator"/>
    Regards,
    Kiran Konjeti

    Hi Amit,
    Thanks for the post. But you are too late. :) . I already tried that and it was working fine as expected. Anyhow, would like to mark your answer as Correct, because your post it correct.
    Thanks again.
    Regards,
    Kiran Konjeti

  • Strange behaviour of the rangeSize - or is it desired?

    Hi there,
    as recently asked in Difference between VO Fetch Size, Iterator rangeSize and af:table Fetch Siz we have a problem with the rangeSize property of the iterator binding.
    First of all, we're currently working wit JDev version 11.1.2.2.0. So, we have a page with a table. In this table is nested inside a panel collection which is nested inside a panel stretch layout. To cut a long story short, it stretches.
    The rangeSize is now set to the default 25, but you could see in the fullscreen usage about 35 rows. When we now select a row which is in the rage of the first 25 records and use the data in such a method:
    RichTable table = this.getTable();
    RowKeySet rowKeySet = table.getSelectedRowKeys();
    Iterator selectetNodesIterator = rowKeySet.iterator();
    CollectionModel treeModel = (CollectionModel)table.getValue();
    JUCtrlHierBinding treeBinding = (JUCtrlHierBinding)treeModel.getWrappedData();
    while (selectetNodesIterator.hasNext()) {
      List selectedRowKeyPath = (List)selectetNodesIterator.next();
      JUCtrlHierNodeBinding nodeBinding = treeBinding.findNodeByKeyPath(selectedRowKeyPath);
      Row row = nodeBinding.getRow();
      DBSequence aaId = (DBSequence)row.getAttribute("AaId");
    }We got a NPE at Row row = nodeBinding.getRow();, because the nodeBinding is null. Only the last fetched records have a JUCtrlHierNodeBinding.
    So yeah ok, for testing purposes we changed the rangeSize to 1, just to see what happens. And again it fetches one row after another as long is the tables current view is full. And if we try it again every record results in a NPE excpet the very last visible record. So far so good, after what we've seen with 25 records this was expected.
    When we change the rangeSize to a value greater than 36 (the visible rows, in that current fullscreen resolution) it works as it should.
    So, to see if there is a bug i decided to create a small testapp with the HR schema. I've just dropped the employees vo as a table inside a panel collection which is nested inside a panle stretch layout. And used nearly the same method:
    public String onButtonClicked() {
      RowKeySet rks = table.getSelectedRowKeys();
      CollectionModel tablemodel = (CollectionModel)table.getValue();
      JUCtrlHierBinding binding = (JUCtrlHierBinding)tablemodel.getWrappedData();
      Iterator it = rks.iterator();
      while(it.hasNext()){
        List selectedRowKeyPath = (List)it.next();
        JUCtrlHierNodeBinding node = binding.findNodeByKeyPath(selectedRowKeyPath);
        Row row = node.getRow();
        System.out.println("Testausgabe: " + row.getAttribute(1));
      return null;
    }When the rangeSize is now set to 1 every visible row except the last also result in a NPE. If we run that above code on a button click, but now the strange part. When the rangeSize is changed to a value greater 1 it works like a charm. You can run that code with every visible record an you get now NPE. Also very strange with a rangeSize = 1, when you select the last visible record which is working and run the code, then select a record above, which had thrown an NPE previously and run the code. It is working, but with the value of the last visible record.
    This leads us to a bunch of questions.
    1) Is it the supposed way to work, that you get a NPE when the rangeSize is set to a smaller number than visible rows?
    2) If 1) is the desired way, how do you handle the rangeSize for a table which is stretched? You couldn't now how many rows you could see.
    3) Does anyone have an idea how to explain the last explained behaviour with the testapp? (I could upload it)
    Thanks in advance.
    Alex

    Hi Alex,
    can you open a SR at Oracle support for this issue?
    I know there are several bugs which are somehow related with the rangeSize and the synchronization of the model (currrent row) and the view (in this case the visible part of af:table).
    See also Restore current row after rollback does not work with page ranging
    As far I know Oracle plans some enhancements in this area to fix the syncronize problems and change e.g. the rangeSize dynamically depending on the number of rows visible in the GUI.
    But anyway your issue sounds like a new bug.
    regards
    Peter

Maybe you are looking for