Dvt::hiearchyView - Iterator Help

Hi All,
I have defined my view objects as a master details and using the App Module Tester all looks ok.... http://img502.imageshack.us/img502/5606/applicationmodule.png
I have then created a dvt:hierarchyViewer component declaritively but the page i get looks as follows.... http://img34.imageshack.us/img34/2231/nodes.png
I would expect the nodes to appear as
-Request For New Supplier
------ Enter Requisition
------ Enter Purchase Order
but it appears that not all notes are being shown for the second iterator.
My page looks as follows
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
          xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces">
  <jsp:directive.page contentType="text/html;charset=UTF-8"/>
  <f:view>
    <af:document id="d1">
      <af:messages id="m1"/>
      <af:form id="f1">
        <dvt:hierarchyViewer inlineStyle="width:100%; background-color:Gray;" id="hv1"
                             var="node"
                             value="#{bindings.ModulesLevel1_1.treeModel}"
                             selectionListener="#{bindings.ModulesLevel1_1.treeModel.makeCurrent}"
                             layout="hier_vert_top"
                             levelFetchSize="10"
                             controlPanelBehavior="initExpanded"
                             nodeSelection="single">
          <dvt:link linkType="direct" id="l1" linkStyle="dashDot"
                    endConnectorType="arrowOpen" linkColor="#2121ff"/>
          <dvt:node type="model.ModulesLevel1" width="233" height="233" id="n1"
                    showExpandChildren="false" showIsolate="false"
                    showNavigateUp="false">
            <f:facet name="zoom100">
              <af:panelGroupLayout inlineStyle="width:100%;height:100%;padding:3px"
                                   layout="horizontal" valign="middle"
                                   id="pgl3">
                <af:panelGroupLayout layout="vertical" halign="center"
                                     inlineStyle="width:100%;" id="pgl4">
                  <af:commandLink text="hello1234" id="xyz1" action="navigate"/>
                  <af:outputText value="#{node.ModuleId}"
                                 inlineStyle="font-weight:bold;font-size:20px;color:#383A47;"
                                 id="ot3">
                    <af:convertNumber groupingUsed="false"
                                      pattern="#{bindings.ModulesLevel1_1.hints.ModuleId.format}"/>
                  </af:outputText>
                  <af:outputText value="#{node.ModuleName}"
                                 inlineStyle="font-family:tahoma;font-size:20px;color:#383A47;"
                                 id="ot1"/>
                  <af:spacer height="5" id="s2"/>
                  <af:panelFormLayout inlineStyle="width:100%;height:100%;"
                                      id="pfl2"/>
                </af:panelGroupLayout>
              </af:panelGroupLayout>
            </f:facet>
          </dvt:node>
          <dvt:node type="model.ModulesLevel2" width="233" height="233" id="n2"
                    shape="rect" showNavigateUp="false" showIsolate="false"
                    showExpandChildren="false">
            <f:facet name="zoom100">
              <af:panelGroupLayout inlineStyle="width:100%;height:100%;padding:3px"
                                   layout="horizontal" valign="middle"
                                   id="pgl1">
                <af:panelGroupLayout layout="vertical" halign="center"
                                     inlineStyle="width:100%;" id="pgl2">
                  <af:outputText value="#{node.ModuleId}"
                                 inlineStyle="font-weight:bold;font-size:20px;color:#383A47;"
                                 id="ot2">
                    <af:convertNumber groupingUsed="false"
                                      pattern="#{bindings.ModulesLevel1_1.hints.ModuleId.format}"/>
                  </af:outputText>
                  <af:outputText value="#{node.ParentId}"
                                 inlineStyle="font-family:tahoma;font-size:20px;color:#383A47;"
                                 id="ot4">
                    <af:convertNumber groupingUsed="false"
                                      pattern="#{bindings.ModulesLevel1_1.hints.ParentId.format}"/>
                  </af:outputText>
                  <af:spacer height="5" id="s1"/>
                  <af:panelFormLayout inlineStyle="width:100%;height:100%;"
                                      id="pfl1">
                    <af:panelLabelAndMessage label="#{bindings.ModulesLevel1_1.hints.ModuleName.label}"
                                             labelStyle=" font-family:tahoma;font-size:16px;color:#5A6A7A"
                                             id="plam1">
                      <af:outputText value="#{node.ModuleName}"
                                     inlineStyle="font-family:tahoma;font-size:14px;color:#383A47"
                                     id="ot5"/>
                    </af:panelLabelAndMessage>
                  </af:panelFormLayout>
                </af:panelGroupLayout>
              </af:panelGroupLayout>
            </f:facet>
          </dvt:node>
        </dvt:hierarchyViewer>
      </af:form>
    </af:document>
  </f:view>
</jsp:root>The definition is as follows
<?xml version="1.0" encoding="UTF-8" ?>
<pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
                version="11.1.1.55.36" id="TestPageDef" Package="view.pageDefs">
  <parameters/>
  <executables>
    <variableIterator id="variables"/>
    <iterator Binds="ModulesLevel1_1" RangeSize="25"
              DataControl="AppModuleDataControl" id="ModulesLevel1_1Iterator"/>
  </executables>
  <bindings>
    <tree IterBinding="ModulesLevel1_1Iterator" id="ModulesLevel1_1">
      <nodeDefinition DefName="model.ModulesLevel1">
        <AttrNames>
          <Item Value="ModuleName"/>
          <Item Value="ModuleId"/>
        </AttrNames>
        <Accessors>
          <Item Value="ModulesLevel2" Label="ancestor"/>
        </Accessors>
      </nodeDefinition>
      <nodeDefinition DefName="model.ModulesLevel2">
        <AttrNames>
          <Item Value="ParentId"/>
          <Item Value="ModuleName"/>
          <Item Value="ModuleId"/>
        </AttrNames>
      </nodeDefinition>
    </tree>
  </bindings>
</pageDefinition>Any ideas what is wrong?

I have fixed this. I had not set the Keys on my View Objects correctly.

Similar Messages

  • JWM MenuMaker Wrapper

    Joe's Window Manager is a very lightweight WM used by distros such as DSL and Puppy Linux which uses fewer system resources than Openbox and Fluxbox despite coming with its own panel by default. The biggest problem is that it can be quite frustrating to set up an applications menu.
    I wrote a shell script wrapper (with a lot of awk) for MenuMaker to extend its compatibility to JWM. It does the same thing as MenuMaker except that it only works for JWM and it adds a few extra shortcuts for convenience. MenuMaker is a dependency. It passes options to MenuMaker so it works the same way except that you should not put "JWM" at the end. MenuMaker only creates static menus, as does my script, so I would recommend keeping jwmmaker and MenuMaker installed for as long as you intend on using JWM.
    I recommend installing it by saving a file called jwmmaker.sh somewhere safe (it should stay there as long as you want to keep jwmmaker) with the script below as its contents, and making a symlink to /usr/bin like so:
    # ln -s /path/to/jwmmaker.sh /usr/bin/jwmmaker
    then you can run jwmmaker like so:
    $ jwmmaker [options]
    Here is how I would do it:
    $ jwmmaker -vf
    Here is one way to view the MenuMaker help file plus a few distinctions regarding jwmmaker:
    $ jwmmaker -h
    Here is the script:
    #!/bin/sh
    # jwmmaker 0.1.0
    # Copyright 2014 Drew Nutter
    # This program is free software: you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # (at your option) any later version.
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    # GNU General Public License for more details.
    # You should have received a copy of the GNU General Public License
    # along with this program. If not, see <http://www.gnu.org/licenses/>.
    # Initialize variables
    h=0
    ii=0
    f=0
    c=0
    t=0
    v=0
    lo=""
    so=""
    term=""
    categ=""
    arg=$(echo $@ | sed 's/f//') # This avoids a force overwrite of the openbox menu if the user has one already.
    # Identify options that affect this script's behavior (other than passing).
    for (( i=1; $i<=$#; i++ )); do
    iter=${!i}
    if [ "${iter:0:2}" == "--" ]; then
    if [ "$iter" == "--help" ]; then
    h=1
    elif [ "$iter" == "--version" ]; then
    v=1
    elif [ "$iter" == "--force" ]; then
    f=1
    elif [ "$iter" == "--stdout" ]; then
    c=1
    fi
    elif [ "${iter:0:1}" == "-" ]; then
    string=${!i}
    for (( j=1; j<${#string}; j++ )); do
    opt=${string:$j:1}
    if [ "$opt" == "h" ]; then
    h=1
    elif [ "$opt" == "f" ]; then
    f=1
    elif [ "$opt" == "c" ]; then
    c=1
    elif [ "$opt" == "i" ]; then
    ii=1
    elif [ "$opt" == "t" ]; then
    t=1
    fi
    done
    fi
    done
    # Determine whether .jwmrc exists to determine source.
    # /etc/system.jwmrc will not be modified, but it will be used to create the new .jwmrc if ~/.jwmrc does not exist.
    if [ $HOME/.jmwrc ]; then
    jwmrc="$HOME/.jwmrc"
    else
    jwmrc="/etc/system.jwmrc"
    fi
    # Main function, call later on depending on options
    function main
    # Pull pre-menu jwmrc
    out1=$(awk '
    BEGIN { dontprint = 0 }
    if (dontprint == 0)
    print $0
    if ($1 == "<RootMenu")
    dontprint = 1
    }' $jwmrc)
    # Generate jwmrc menu from mmaker's openbox menu
    out2=$(mmaker -ci $arg openbox | awk '
    BEGIN {
    FS = "[<>/=]"
    indent = " "
    print indent "<Program label=\"Run\">gmrun</Program>"
    print indent "<Separator/>"
    print indent "<Program label=\"Terminal\">xterm</Program>"
    print indent "<Program label=\"Web Browser\">xdg-open http://</Program>"
    print indent "<Program label=\"File Manager\">xdg-open $HOME</Program>"
    print indent "<Separator/>"
    if ($2 == "menu id")
    print indent"<Menu label="$4">"
    indent = " "indent
    if ($3 == "menu")
    indent = substr(indent,5)
    print indent"</Menu>"
    if ($2 == "item label")
    printf indent"<Program label="$3">"
    if ($2 == "execute")
    print $3"</Program>"
    END{
    print indent "<Separator/>"
    print indent "<Menu label=\"Exit\">"
    print indent " <Program icon=\"lock.png\" label=\"Lock\">"
    print indent " xscreensaver-command -lock"
    print indent " </Program>"
    print indent " <Separator/>"
    print indent " <Program label=\"Reboot\">reboot</Program>"
    print indent " <Program label=\"Shut Down\">shutdown now</Program>"
    print indent " <Separator/>"
    print indent " <Restart label=\"Restart JWM\" icon=\"restart.png\"/>"
    print indent " <Exit label=\"Exit JWM\" confirm=\"true\" icon=\"quit.png\"/>"
    print indent "</Menu>"
    # Pull post-menu jwmrc
    out3=$(awk '
    BEGIN { dontprint = 1 }
    if ($1 == "</RootMenu>")
    dontprint = 0
    if (dontprint == 0)
    print $0
    }' $jwmrc)
    # -h or --help = show help, cancel operation
    if [ $h == 1 ]; then
    echo -e "JWM has a file (~/.jwmrc) which configures more than just the JWM menu. This script does not alter any part of that file except the menu.\n"
    echo "Below is the help file generated by MenuMaker which is installed on your system. Please ignore the \"frontend\" information. Use jwmmaker like so:"
    echo -e "$ jwmmaker [options]\n"
    mmaker -h
    echo -e "\nAbove is the help file generated by MenuMaker which is installed on your system. Please ignore the \"frontend\" information. Use jwmmaker like so:"
    echo -e "$ jwmmaker [options]\n"
    elif [ $v == 1 ]; then
    echo "jwmmaker 0.1.0"
    mmaker --version
    # Print new xml data based on mmaker analogous user input.
    else
    if [ $ii == 0 ] && [ $c == 1 ]; then # -c = show output
    main
    echo "$out1"
    echo "$out2"
    echo "$out3"
    elif [ $c == 1 ]; then # -ci = show only menu output
    main
    echo "$out2"
    elif [ $ii == 1 ]; then # -i = show error message, do not overwrite
    echo "-i MUST be used in conjunction with -c; this is done to prevent accidental overwriting of the custom menu"
    elif [ $f == 1 ] || [ $jwmrc == "/etc/system.jwmrc" ]; then # If -f or no jwmrc file, $ jwmmaker = write to .jwmrc
    cp $HOME/.jwmrc $HOME/.jwmrc.bak 2> /dev/null # Create backup for .jwmrc if it exists
    main
    echo "$out1" > $HOME/.jwmrc
    echo "$out2" >> $HOME/.jwmrc
    echo "$out3" >> $HOME/.jwmrc
    else # If .jwmrc exists, $ jwmmaker = do nothing, require -f
    echo "You already have a .jwmrc file. Its menu section will not be overwritten unless you delete it or use the -f flag."
    fi
    if [ $c = 1 ]; then # If -c is chosen, put this is at bottom so user can immediately see if there were any errors.
    nov=$(echo $@ | sed 's/v//') # No need to double up on verbosity.
    mmaker -c $nov openbox > /dev/null
    fi
    fi
    Every time it overwrites the .jwmrc file, it automatically creates (or overwrites) a backup of the previous version in your home directory called .jwmrc.bak. I also added some shortcuts to the main menu by default to improve the convenience of the menu. A few of these shortcuts rely on your system having one of the following packages installed, so these are optional dependencies:
    gmrun
    xdg-utils
    xscreensaver
    As I was testing it I ran into some problems regarding how options are passed based on how the arguments are put together by the user. I fixed every issue that I found, but there is a possibility I missed something, so please report any bugs to this thread so I can fix them. I am not a professional software developer, so you might find ways to be more stable or efficient. I'd be more than happy to accept community input to improve this.
    COPYING: GPLv3
    MenuMaker is licensed under the two clause BSD license.
    Last edited by Drew (2014-10-20 19:15:05)

    Joe's Window Manager is a very lightweight WM used by distros such as DSL and Puppy Linux which uses fewer system resources than Openbox and Fluxbox despite coming with its own panel by default. The biggest problem is that it can be quite frustrating to set up an applications menu.
    I wrote a shell script wrapper (with a lot of awk) for MenuMaker to extend its compatibility to JWM. It does the same thing as MenuMaker except that it only works for JWM and it adds a few extra shortcuts for convenience. MenuMaker is a dependency. It passes options to MenuMaker so it works the same way except that you should not put "JWM" at the end. MenuMaker only creates static menus, as does my script, so I would recommend keeping jwmmaker and MenuMaker installed for as long as you intend on using JWM.
    I recommend installing it by saving a file called jwmmaker.sh somewhere safe (it should stay there as long as you want to keep jwmmaker) with the script below as its contents, and making a symlink to /usr/bin like so:
    # ln -s /path/to/jwmmaker.sh /usr/bin/jwmmaker
    then you can run jwmmaker like so:
    $ jwmmaker [options]
    Here is how I would do it:
    $ jwmmaker -vf
    Here is one way to view the MenuMaker help file plus a few distinctions regarding jwmmaker:
    $ jwmmaker -h
    Here is the script:
    #!/bin/sh
    # jwmmaker 0.1.0
    # Copyright 2014 Drew Nutter
    # This program is free software: you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # (at your option) any later version.
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    # GNU General Public License for more details.
    # You should have received a copy of the GNU General Public License
    # along with this program. If not, see <http://www.gnu.org/licenses/>.
    # Initialize variables
    h=0
    ii=0
    f=0
    c=0
    t=0
    v=0
    lo=""
    so=""
    term=""
    categ=""
    arg=$(echo $@ | sed 's/f//') # This avoids a force overwrite of the openbox menu if the user has one already.
    # Identify options that affect this script's behavior (other than passing).
    for (( i=1; $i<=$#; i++ )); do
    iter=${!i}
    if [ "${iter:0:2}" == "--" ]; then
    if [ "$iter" == "--help" ]; then
    h=1
    elif [ "$iter" == "--version" ]; then
    v=1
    elif [ "$iter" == "--force" ]; then
    f=1
    elif [ "$iter" == "--stdout" ]; then
    c=1
    fi
    elif [ "${iter:0:1}" == "-" ]; then
    string=${!i}
    for (( j=1; j<${#string}; j++ )); do
    opt=${string:$j:1}
    if [ "$opt" == "h" ]; then
    h=1
    elif [ "$opt" == "f" ]; then
    f=1
    elif [ "$opt" == "c" ]; then
    c=1
    elif [ "$opt" == "i" ]; then
    ii=1
    elif [ "$opt" == "t" ]; then
    t=1
    fi
    done
    fi
    done
    # Determine whether .jwmrc exists to determine source.
    # /etc/system.jwmrc will not be modified, but it will be used to create the new .jwmrc if ~/.jwmrc does not exist.
    if [ $HOME/.jmwrc ]; then
    jwmrc="$HOME/.jwmrc"
    else
    jwmrc="/etc/system.jwmrc"
    fi
    # Main function, call later on depending on options
    function main
    # Pull pre-menu jwmrc
    out1=$(awk '
    BEGIN { dontprint = 0 }
    if (dontprint == 0)
    print $0
    if ($1 == "<RootMenu")
    dontprint = 1
    }' $jwmrc)
    # Generate jwmrc menu from mmaker's openbox menu
    out2=$(mmaker -ci $arg openbox | awk '
    BEGIN {
    FS = "[<>/=]"
    indent = " "
    print indent "<Program label=\"Run\">gmrun</Program>"
    print indent "<Separator/>"
    print indent "<Program label=\"Terminal\">xterm</Program>"
    print indent "<Program label=\"Web Browser\">xdg-open http://</Program>"
    print indent "<Program label=\"File Manager\">xdg-open $HOME</Program>"
    print indent "<Separator/>"
    if ($2 == "menu id")
    print indent"<Menu label="$4">"
    indent = " "indent
    if ($3 == "menu")
    indent = substr(indent,5)
    print indent"</Menu>"
    if ($2 == "item label")
    printf indent"<Program label="$3">"
    if ($2 == "execute")
    print $3"</Program>"
    END{
    print indent "<Separator/>"
    print indent "<Menu label=\"Exit\">"
    print indent " <Program icon=\"lock.png\" label=\"Lock\">"
    print indent " xscreensaver-command -lock"
    print indent " </Program>"
    print indent " <Separator/>"
    print indent " <Program label=\"Reboot\">reboot</Program>"
    print indent " <Program label=\"Shut Down\">shutdown now</Program>"
    print indent " <Separator/>"
    print indent " <Restart label=\"Restart JWM\" icon=\"restart.png\"/>"
    print indent " <Exit label=\"Exit JWM\" confirm=\"true\" icon=\"quit.png\"/>"
    print indent "</Menu>"
    # Pull post-menu jwmrc
    out3=$(awk '
    BEGIN { dontprint = 1 }
    if ($1 == "</RootMenu>")
    dontprint = 0
    if (dontprint == 0)
    print $0
    }' $jwmrc)
    # -h or --help = show help, cancel operation
    if [ $h == 1 ]; then
    echo -e "JWM has a file (~/.jwmrc) which configures more than just the JWM menu. This script does not alter any part of that file except the menu.\n"
    echo "Below is the help file generated by MenuMaker which is installed on your system. Please ignore the \"frontend\" information. Use jwmmaker like so:"
    echo -e "$ jwmmaker [options]\n"
    mmaker -h
    echo -e "\nAbove is the help file generated by MenuMaker which is installed on your system. Please ignore the \"frontend\" information. Use jwmmaker like so:"
    echo -e "$ jwmmaker [options]\n"
    elif [ $v == 1 ]; then
    echo "jwmmaker 0.1.0"
    mmaker --version
    # Print new xml data based on mmaker analogous user input.
    else
    if [ $ii == 0 ] && [ $c == 1 ]; then # -c = show output
    main
    echo "$out1"
    echo "$out2"
    echo "$out3"
    elif [ $c == 1 ]; then # -ci = show only menu output
    main
    echo "$out2"
    elif [ $ii == 1 ]; then # -i = show error message, do not overwrite
    echo "-i MUST be used in conjunction with -c; this is done to prevent accidental overwriting of the custom menu"
    elif [ $f == 1 ] || [ $jwmrc == "/etc/system.jwmrc" ]; then # If -f or no jwmrc file, $ jwmmaker = write to .jwmrc
    cp $HOME/.jwmrc $HOME/.jwmrc.bak 2> /dev/null # Create backup for .jwmrc if it exists
    main
    echo "$out1" > $HOME/.jwmrc
    echo "$out2" >> $HOME/.jwmrc
    echo "$out3" >> $HOME/.jwmrc
    else # If .jwmrc exists, $ jwmmaker = do nothing, require -f
    echo "You already have a .jwmrc file. Its menu section will not be overwritten unless you delete it or use the -f flag."
    fi
    if [ $c = 1 ]; then # If -c is chosen, put this is at bottom so user can immediately see if there were any errors.
    nov=$(echo $@ | sed 's/v//') # No need to double up on verbosity.
    mmaker -c $nov openbox > /dev/null
    fi
    fi
    Every time it overwrites the .jwmrc file, it automatically creates (or overwrites) a backup of the previous version in your home directory called .jwmrc.bak. I also added some shortcuts to the main menu by default to improve the convenience of the menu. A few of these shortcuts rely on your system having one of the following packages installed, so these are optional dependencies:
    gmrun
    xdg-utils
    xscreensaver
    As I was testing it I ran into some problems regarding how options are passed based on how the arguments are put together by the user. I fixed every issue that I found, but there is a possibility I missed something, so please report any bugs to this thread so I can fix them. I am not a professional software developer, so you might find ways to be more stable or efficient. I'd be more than happy to accept community input to improve this.
    COPYING: GPLv3
    MenuMaker is licensed under the two clause BSD license.
    Last edited by Drew (2014-10-20 19:15:05)

  • Dvt:map Selection Iterator

    This is a question of urgency. It is holding up a deliverable.
    The dvt:mapPointTheme selectionListener property does not seem to fill the Iterator with the selected data point information any longer. This code used to work in TP4.
    Here is the .jspx code:
    <dvt:mapToolbar mapId="map1"/>
    <dvt:map id="map1" startingX="-98.0" mapServerConfigId="mapConfig1"
    baseMapName="ELOCATION_MERCATOR.WORLD_MAP" mapZoom="3"
    inlineStyle="width:100%; height:400px;" startingY="39.0">
    <dvt:mapPointTheme id="mapPointTheme1"
    value="#{bindings.Load.geoMapModel}"
    selectionListener="#{mapBacking.processSelection}">
    <dvt:mapPointStyleItem imageURL="/loadUnselected.png"
    selectedImageURL="/loadSelected.png"
    shortLabel="Customer Load"
    isDefault="true"/>
    </dvt:mapPointTheme>
    </dvt:map>
    Here is the binding pageDef:
    <mapTheme IterBinding="fetchMoreLoadsIterator" id="Load"
    xmlns="http://xmlns.oracle.com/adfm/dvt">
    <mapThemeDataMap mapThemeType="point">
    <item type="us_form_2" street="street" city="city" state="state"
    zipCode="zipcode" label="cityState"/>
    <item type="data" value="customer" label="Customer"/>
    </mapThemeDataMap>
    </mapTheme>
    Here is the "mapBacking" backing bean:
    public void processSelection(MapSelectionEvent E) {
    if (E.getSelectionMode().equals("Unselect")) return;
    Iterator I= E.getIterator();
    while (I.hasNext()) {
    DataContent DT = (DataContent)I.next();
    String S= DT.getLocationName();
    When the user chooses the "arrow" icon on the map toolBar, then left click on the data point on the map:
    1. The icon changes appearance from "loadSelected.png" to "loadUnselected.png" correctly.
    2. The processSelection(mapSelectionEvent E) backing bean method gets called. But the Iterator is empty.
    When the user uses a selection shape (circle, square..) on the toolbar, then draws a shape around several of the data points on the map:
    1. The icons changes appearance from "loadSelected.png" to "loadUnselected.png" correctly.
    2. The processSelection(mapSelectionEvent E) backing bean method gets called. But the Iterator is still empty.
    This code used to work. We are up against an extremely tight deadline. Is this an dvt:map bug, or is it just something simple we are overlooking.
    Please, we need help ASAP. Thank you gratefully.

    I just tried the following with JDeveloper 11g update 2: Build JDEVADF_MAIN.BOXER_GENERIC_090328.0229.5205
    Create an ADF BC EO/VO/AM based on a table with spatial data.
    Create a page with panelStretchLayout
    Drag the data control to the start area as a Form
    Drag the data control as to the center as a Map
    Define PartialPage rendering so the map updates the form.
    Run the page - clicking points in the map updates the Form.
    Which build are you using?
    Does your ADF BC VO has an attribute marked as key?
    JSF page
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces">
      <jsp:directive.page contentType="text/html;charset=windows-1252"/>
      <f:view>
        <af:document>
          <af:messages/>
          <af:form>
            <af:panelStretchLayout startWidth="300px">
              <f:facet name="bottom"/>
              <f:facet name="center">
                <dvt:map id="map" startingX="0.0" mapServerConfigId="mapConfig1"
                         baseMapName="ELOCATION_MERCATOR.WORLD_MAP" mapZoom="0"
                         inlineStyle="width:100%; height:600px;" startingY="0.0"
                         autoZoomThemeId="mapPointTheme1">
                  <dvt:mapPointTheme id="mapPointTheme1"
                                     value="#{bindings.HousesView1.geoMapModel}"
                                     clickListener="#{bindings.HousesView1.geoMapModel.processClickAction}"
                                     selectionListener="#{bindings.HousesView1.geoMapModel.processSelection}"/>
                </dvt:map>
              </f:facet>
              <f:facet name="start">
                <af:panelFormLayout partialTriggers="map">
                  <af:panelLabelAndMessage label="#{bindings.Id.hints.label}">
                    <af:outputText value="#{bindings.Id.inputValue}">
                      <af:convertNumber groupingUsed="false"
                                        pattern="#{bindings.Id.format}"/>
                    </af:outputText>
                  </af:panelLabelAndMessage>
                  <af:panelLabelAndMessage label="#{bindings.Zip.hints.label}">
                    <af:outputText value="#{bindings.Zip.inputValue}">
                      <af:convertNumber groupingUsed="false"
                                        pattern="#{bindings.Zip.format}"/>
                    </af:outputText>
                  </af:panelLabelAndMessage>
                  <af:panelLabelAndMessage label="#{bindings.City.hints.label}">
                    <af:outputText value="#{bindings.City.inputValue}"/>
                  </af:panelLabelAndMessage>
                  <af:panelLabelAndMessage label="#{bindings.Street.hints.label}">
                    <af:outputText value="#{bindings.Street.inputValue}"/>
                  </af:panelLabelAndMessage>
                  <af:panelLabelAndMessage label="#{bindings.Price.hints.label}">
                    <af:outputText value="#{bindings.Price.inputValue}">
                      <af:convertNumber groupingUsed="false"
                                        pattern="#{bindings.Price.format}"/>
                    </af:outputText>
                  </af:panelLabelAndMessage>
                  <af:panelLabelAndMessage label="#{bindings.Longitude.hints.label}">
                    <af:outputText value="#{bindings.Longitude.inputValue}">
                      <af:convertNumber groupingUsed="false"
                                        pattern="#{bindings.Longitude.format}"/>
                    </af:outputText>
                  </af:panelLabelAndMessage>
                  <af:panelLabelAndMessage label="#{bindings.Latitude.hints.label}">
                    <af:outputText value="#{bindings.Latitude.inputValue}">
                      <af:convertNumber groupingUsed="false"
                                        pattern="#{bindings.Latitude.format}"/>
                    </af:outputText>
                  </af:panelLabelAndMessage>
                  <f:facet name="footer">
                    <af:commandButton text="Submit"/>
                  </f:facet>
                </af:panelFormLayout>
              </f:facet>
              <f:facet name="end"/>
              <f:facet name="top"/>
            </af:panelStretchLayout>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>pagedef code:
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
                    version="11.1.1.52.5" id="untitled5PageDef"
                    Package="demo.view.pageDefs">
      <parameters/>
      <executables>
        <iterator Binds="HousesView1" RangeSize="-1"
                  DataControl="AppModuleDataControl" id="HousesView1Iterator"/>
      </executables>
      <bindings>
        <attributeValues IterBinding="HousesView1Iterator" id="Id">
          <AttrNames>
            <Item Value="Id"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="HousesView1Iterator" id="Zip">
          <AttrNames>
            <Item Value="Zip"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="HousesView1Iterator" id="City">
          <AttrNames>
            <Item Value="City"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="HousesView1Iterator" id="Street">
          <AttrNames>
            <Item Value="Street"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="HousesView1Iterator" id="Price">
          <AttrNames>
            <Item Value="Price"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="HousesView1Iterator" id="Longitude">
          <AttrNames>
            <Item Value="Longitude"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="HousesView1Iterator" id="Latitude">
          <AttrNames>
            <Item Value="Latitude"/>
          </AttrNames>
        </attributeValues>
        <mapTheme IterBinding="HousesView1Iterator" id="HousesView1"
                  xmlns="http://xmlns.oracle.com/adfm/dvt">
          <mapThemeDataMap mapThemeType="point">
            <item type="lat_long" longitude="Longitude" latitude="Latitude"
                  label="Street"/>
            <item type="data" value="Price"/>
          </mapThemeDataMap>
        </mapTheme>
      </bindings>
    </pageDefinition>

  • Newbee help iterator ????

    Hi
    I have an assignement I have to make in java. My problem is that I cannot understand why the following code won't compile, the compiler sais that iterator method is wrong???? I use the iterator package from the libraries...i have a homogenous list of items, only String...I really can't figure it out...anybody can help me??? :-|
    public void searchName(String searchname)
            boolean gotit = false;
            Iterator it = varer.iterator();
            while (it.hasNext()) {
                Varer searchname = (Varer) it.next();
                if (searchname.equals(searchvare.getName())) {
                    System.out.println("Vare: " + searchvare.getName());
                    gotit = true;
            }

    Gosh...I am so stupid, of course...now it will compile, I repaced "varer" with another instance....I used so much time on this!! :-o
    Thanks a lot!!!!
    :D

  • Please help with combining two java packages into one iteration

    Hello, I work for a pharmaceutical company and run reports for credits that we have received. Currently the packages are reported seperately from the credit reports and my job is to combine them. There are two models that handle these and I need to link the second to the first with some common entities. Please help me figure out what I need to do in order to add a credit column to the report. I have a sample of the code below and would appreciate any help you can offer.
    First, the info pulled about the boxes:
    rm = (ReportManager) ManagerFactory.getManager(ManagerFactory.REPORTS);
    items = rm.getRVSSearchResults(hvstoresid,
    hvstoregroupsid,
    String.valueOf(request.getParameter("price_type")).trim(),
    String.valueOf(report_by).trim(),
    vendor_type,
    String.valueOf(request.getParameter("vendor")).trim(),
    from_date,
                        until_date,
    debitNum,
                        processing_type,
    sort_field,
    sort_direction,
                        includeAll222s).iterator();
    Second, the page that has the data i need to transpose to the first:
    PackoutModel pm = null;
                             int iter = searchpageposition*resultPageSize;
                             while (iter < packouts.size() && iter<(searchpageposition*resultPageSize)+resultPageSize)
                             { pm = (PackoutModel) packouts.get(iter);
                                  BigDecimal invoiceAmt = DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getInvoiceAmt(),"0.00");
                                  BigDecimal creditRec = DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getAmtReceived(),"0.00");
                                  BigDecimal processingFee = DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getProcessFeeTotal(),"0.00");
                                  BigDecimal shippingFee = DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getShippingHandlingFeeTotal(),"0.00");
                                  BigDecimal balanceDue =(invoiceAmt.add(processingFee.add(shippingFee))).subtract(creditRec);
    All that I need from the second page is to get a value for:
    DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getAmtReceived(),"0.00");
    which I believe must first have the store id, etc equal to the first model. So there is the existing rvs.FOO and the needed pm.BAR but since it is in an iter loop, I can't seem to figure out how to join the two.
    Any ideas?

    could you explain your problem with a simplified schema or a more
    understandable code.
    (don't bother to write the details of your project plz)

  • Please help convering recursion to iteration

    Hello all, I am relatively new with Java. I am implementing a Region Growing algorithm, and it works fine for small regions. For large regions, I get the usual stack overflow problem. I was never able to increase my stack size and didn't really want that approach. I have posted the method that does the region growing. It is messy, and I know there is stuff in there that will not make sense but, the region growing section is there. I have given up and need some help...
    Thanks everyone who can help!!
         private void growRegion(int x, int y) {
              double red = 0;
              double green = 0;
              double blue = 0;
              double alpha = 0;
              pixelArray2 = new double[5];
              wraster.getPixel(x,y,pixelArray2);
              red      = pixelArray2[0];
              green      = pixelArray2[1];
              blue      = pixelArray2[2];
              alpha      = pixelArray2[3];
              pixelChange2[0] = 195;
              pixelChange2[1] = 195;
              pixelChange2[2] = 195;
              pixelChange2[3] = alpha;
              if (x < 0 || y < 0) return;     
              if (x >= wraster.getWidth()) return;     
              if (y >= wraster.getHeight()) return;     
    // the pixel has been assigned a threshold but has not been associated
    // with a region.
              if (assigned[x][y]==true && associated[x][y]==false){     
                   wraster.setPixel(x,y,pixelChange2);
    associated[x][y] = true;          
    // the recursive calls that are driving me nuts
                   growRegion(x+1,y);                    
                   growRegion(x-1,y);          
                   growRegion(x,y+1);          
                   growRegion(x,y-1);
              }else{
    // do something else...anything but recursion
         }

    You should use some recursion but this looks like an over-use. Method growRegion starts (after some initializations) with a termination statement,
    if (x < 0 || y < 0) return;
    if (x >= wraster.getWidth()) return;
    if (y >= wraster.getHeight()) return; This means you could probably remove this and instead use for-loops to drive the recursion,
    if (d != 0)
       for (int i=x+1, l=wraster.getWidth(); i<l; i++)
          growRegion(i,y,0);
    if (d != 1)
       for (int i=x-1; i>=0; i--)
          growRegion(i,y,1);
    if (d != 2)
       for (int i=y+1, l=wraster.getHeight(); i<l; i++)
          growRegion(x,i,2);
    if (d != 3)
       for (int i=y-1; i>=0; i--)
          growRegion(x,i,3); The signature of growRegion is now,
    growRegion(int x, int y, int d)And in the very first call d (direction) must be -1. I think this will replace lots of (unnecessary) recursion with iteration but I'm not sure. It an easy change so it could be worth a try -:)

  • Need help in iteration problem

    i have a question that requires to use iteration ("for" repetition ) and it inquires to enter each day's cost for a whole week and then calculate and display the total week's cost.
    can anyone help me with this? cause i've tried everything i know.

    dunno, i dont think it is cause the total is unknown
    and it is what i want to getof course the total is unknown. that's what your program does, finds it out. forget computers for a minute. how would you do this with a pen and paper? you'd start off not knowing the total, and ask questions until you had it, right? like
    "what were mondays takings?" "oh, 50"
    "ok,what were tuesdays?" "um, 102"
    "and wednesdays?" "200"
    and you'd add the latest answer to your running total. same thing here

  • Need Help With Iteration Problem

    So I recently decided I would try and make a program to help me edit my mp3 ID3 tags. I'm relatively new to Java but can usualy figure things out on my own. My code is rarely efficient but it gets the job done. So here's the deal. I got this package from ID3.org and started messing around with it. I can get it to edit the tags but not with an iteration. Here's my code:
    import javax.swing.*;
    import de.vdheide.mp3.*;
    import java.io.*;
    class ID3TagEdit {
         public static void main(String args[]) {
              String dir = chooseDir();
              String[] fileList = makeList(dir);
              String filename = "";
              for(int i = 0; fileList[i] != "null"; i++) {
                   try {
                        filename = dir + "\\" + fileList;
                        MP3File currentFile = new MP3File(filename);
                        TagContent tc = currentFile.getArtist();
                        tc.setContent("TEST");
                        currentFile.setArtist(tc);
                        currentFile.update();
                   catch(IOException e) {
                        System.out.println("Error 101");
                   catch(FrameDamagedException e) {
                        System.out.println("Error 102");
                   catch(NoMP3FrameException e) {
                        System.out.println("Error 103");
                   catch(TagFormatException e) {
                        System.out.println("Error 104");
                   catch(ID3Exception e) {
                        System.out.println("Error 105");
                   catch(ID3v2WrongCRCException e) {
                        System.out.println("Error 106");
                   catch(ID3v2Exception e) {
                        System.out.println("Error 107");
         public static String chooseDir() {
              String FolderPath = "";
              try {
                   JFileChooser chooser = new JFileChooser();
                   chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
                   int returnVal = chooser.showOpenDialog(null);
                   FolderPath = chooser.getSelectedFile().getPath();
              catch(IllegalArgumentException e) {
                   System.out.println("Error 201");
              return FolderPath;
         public static String[] makeList(String dir) {
              File directory = new File(dir);
              String[] fileList = directory.list();
              return fileList;
    If I don't iterate it then it will work. If I omit the 'for' loop and change the code to this:
                        filename = dir + "\\" + fileList[3];
                        MP3File currentFile = new MP3File(filename);
                        TagContent tc = currentFile.getArtist();
                        tc.setContent("TEST");
                        currentFile.setArtist(tc);
                        currentFile.update();
    It works just fine. Any suggestions on what I'm doing wrong?

    If I don't iterate it then it will work. If I omit
    the 'for' loop and change the code to this:
    It works just fine. Any suggestions on what I'm
    doing wrong?You said
    without loop it works just fine.Then what's the wrong?
    If you don't use loop then your fileList may not be null.And then your program'll be in infinite loop.

  • Iterator recursion help needed

    there is a recursion example in my text book. it is a bit difficult for me. so i thought i would type it out and follow the progress of the code in the debugger to get a better understanding of how it works. trouble is, i can't figure out what kind of statement in a simple test class will get it working and actually PRINTING out all the permutations.
    the example code takes any given word and is supposed to spit out all the permutations of the word. for example, the user defined word might be "key". the program should print out . . .
    key
    kye
    eky
    eyk
    yke
    yek
    ordinarily, i wouldn't be so dead set on understanding this example, but it is essential that i do.
    the book gives the class that has the recursion interator, but if someone could help me out with a bit of code (i know it must only be a line or two) that will start up the iterator to give me the results.
    the code is
    public class PermuteString {
    private String word;
    private int index;
    private PermuteString substringGenerator;
    public PermuteString(String s) {
    word = s;
    index = 0;
    if (s.length() >1) {
    substringGenerator = new PermuteString(s.substring(1));
    public String nextPermutation() {
    if (word.length() == 1) {
    ++index;
    return word;
    else {
    String r = word.charAt(index) +
    substringGenerator.nextPermutation();
    if (!substringGenerator.morePermutations()) {
    ++index;
    if (index < word.length ()) {
    String tailString = word.substring(0, index) +
    word.substring(index + 1);
    substringGenerator = new PermuteString(tailString);
    return r;
    public boolean morePermutations() {
    return index < word.length();
    if anyone could give me a bit of code to put into a test to get this thing running, i might get a little headway into understanding it.
    thanks
    crquick

    Create an instance of PermuteString, passing it the String you want to permutate. While it has morePermutations(), print the nextPermutation().
    PermuteString p = new PermuteString("key");
    while (p.morePermutations()) {
      System.out.println(p.nextPermutation());
    }

  • Iteration of rows in table region.. help needed urgent !!!!

    Hi ,
    In my OAF Page ,user selects an account and clicks serach button,based on the account number the records are listed in a table .these rows are editable and a new row can be added to this region.
    how can we iterate thru these rows and pass these values to the API which will store the values in to the database.
    please do help me in iteration of these rows....i cannot do a vo.getrowcount and row.getattribute as this will get the values from the database and not the values from the current page.
    I should iterate in the table region ... and it should also get the newly created row values when the user clicks the save button.
    thanks
    ramya
    Edited by: user5400563 on Feb 12, 2009 5:00 AM

    can you post the detailed error stack?
    --Prasanna                                                                                                                                                                                                           

  • Help with Jsp: logic:iterate  Cannot create iterator for this collection

    Hello,
    I am developing a jsp with struts. This is the snap of the code:
            <logic:iterate id="prod" collection="productList" >
              <tr align="center">
                   <td><html:text property="prodDesc" size="50" indexed="true"/></td>
                   <td>
                        <html:select property="prodUnit" indexed="true">
                             <option selected>-</option>
                            <OPTION VALUE='NMB'>NMB
                             <OPTION VALUE='TEN'>TEN
                             <OPTION VALUE='TPR'>TPR
                             <OPTION VALUE='GWH'>GWH
                        </html:select>
                   </td>
                   <td><html:text property="prodQty" size="20" indexed="true"/></td>
                   <td><html:text property="prodVal" size="20" indexed="true"/></td>               
              </tr>
            </logic:iterate>"productList" is defined as an array of Product[], "prod" is defined as a single Product object in the form. But when i run the page, it gives me this errors:
    "javax.servlet.jsp.JspException: Cannot create iterator for this collection".
    I also tried to make "productList" an ArrayList type, but it game me this same error.
    We are using Websphere 4.0 with Struts 1.1.
    Anyone can help?
    Thanks a lot.
    All the best,
    warren

    Hi , I have similar problem. wonder anyone can help me. I have a datastructure. ArrayList contains list of Hashtable; each Hashtable has two key-value sets ; for each key-value set , value is a ValueObject.
    My jsp works ok. but when I click on the radio butten for one radio group, it sets not only the porperty on that row, but the rows belows ,which suppose to be another radio group , because I am using indexed="true". each row should be a individual group seperated by the name poDisplayVO[i] , as show in the html generated .
    <!-- JSP -->
    <logic:iterate id="poDisplayVO"
    name="testForm"
    property="poDisplayVOList"
    type="java.util.Hashtable">
    <tr>
    <td>
    <bean:write name="poDisplayVO" property="name"/>
    </td>
    <td>          
    <% String val = ((java.util.Hashtable)poDisplayVO).get("subjAreaName").toString();%>
    <html:radio indexed="true" name="poDisplayVO" property="fosVO.select" value="<%=val %>" />
    <bean:write name="poDisplayVO" property="subjAreaName"/>
    </td>
    <td>           
    <html:radio indexed="true" name="poDisplayVO" property="fosVO.select" value="no" /> NO
    </td>
    <td>           
    <html:radio indexed="true" name="poDisplayVO" property="fosVO.select" value="yes" /> YES
    </td>
    </tr>
    </logic:iterate>
    <! ------------------------ html genterated ------------------------------------------------>
    the HTML generated as folllows:
    <tr>
    <td>
              Accounting Studies
    </td>
    <td>          
         <input type="radio" name="poDisplayVO[0].fosVO.select" value="Accounting">
              Accounting
    </td>
    <td>           
         <input type="radio" name="poDisplayVO[0].fosVO.select" value="no"> NO
    </td>
    <td>           
         <input type="radio" name="poDisplayVO[0].fosVO.select" value="yes"> YES
    </td>
    </tr>
    <tr>
    <td>
              Accounting Studies
    </td>
    <td>          
         <input type="radio" name="poDisplayVO[1].fosVO.select" value="Bookkeeping">
              Bookkeeping
    </td>
    <td>           
         <input type="radio" name="poDisplayVO[1].fosVO.select" value="no"> NO
    </td>
    <td>           
         <input type="radio" name="poDisplayVO[1].fosVO.select" value="yes"> YES
    </td>
    </tr>
    <tr>
    <td>
              Accounting Studies
    </td>
    <td>          
         <input type="radio" name="poDisplayVO[2].fosVO.select" value="Computerized Accounting(Duplicate)">
              Computerized Accounting(Duplicate)
    </td>
    <td>           
    <input type="radio" name="poDisplayVO[2].fosVO.select" value="no"> NO
    </td>
    <td>           
    <input type="radio" name="poDisplayVO[2].fosVO.select" value="yes"> YES
    </td>
    </tr>
    <! ------------------------ action form-----------------------------------------------
    public ArrayList getPoDisplayVOList() {
         return poDisplayVOList;
    public void setPoDisplayVOList(ArrayList list) {
         poDisplayVOList = list;
    public Hashtable getPoDisplayVO(int i) {
         Object obj = poDisplayVOList.get(i);
         if (obj == null)
              obj = new Hashtable();
              poDisplayVOList.add(obj);
         return (Hashtable)poDisplayVOList.get(i);
    public void setPoDisplayVO(Hashtable programDisplayVO, int i) {
              poDisplayVOList.add(i, programDisplayVO);
         }

  • Please help, how to implement hasNext() and next() of a HashSet iterator?

    Hi guys,
    Can someone help me out with this? I'm struggling to write an iterator (the hasNext() and next() methods) for a SimpleHashSet class and I keep failing. I have a basic unit test, which goes like this:
    @Test
        public void testIterator() {
            SimpleHashSet<String> instance = new SimpleHashSet<String>();
            assertTrue(instance.iterator() != null);
            Iterator<String> it = instance.iterator();
            assertFalse(it.hasNext()); //Should return false on an empty HashSet
            assertTrue(it.next() == null); //Should return null on an empty HashSet
            instance.add("First");
            instance.add("Second");
            assertTrue(it.hasNext()); // Return true if has first element
            assertTrue(it.next() != null); //Should return first element
            assertTrue(it.hasNext()); //Return true if has second element
            assertTrue(it.next() != null); //Should return second element
            assertFalse(it.hasNext()); //Return false, no third element
            assertTrue(it.next() == null); //Return true, no third element         
        }and I can't figure out a way to pass all of these tests. I have written several variants and none of them works completely, only partially, inconsistently. I just don't know how to write it.
    The SimpleHashSet is declared like this:
    public class SimpleHashSet<E> extends AbstractSet<E> {
        private static final int SIZE = 11;
        LinkedList<E>[] buckets = new LinkedList[SIZE];
    }I appreciate all help and guidance,
    PR.

    Awesome, great answers, very helpful, thanks very much. Careful debugging and testing led me to a working solution. It passes my tests. This is what I have:
        @Override
        public Iterator<E> iterator() {
            final SimpleHashSet<E> here = this;
            Iterator<E> it = new Iterator<E>() {
                private final SimpleHashSet<E> mySet = here;
                private List<LinkedList<E>> bucketList = Arrays.asList(mySet.buckets);
                private Iterator<LinkedList<E>> bucketsIterator = bucketList.iterator();
                private LinkedList<E> currentBucket;
                private Iterator<E> elements;
                    currentBucket = bucketsIterator.next();
                    elements = currentBucket.iterator();  
                @Override
                public boolean hasNext() {
                    while (bucketsIterator.hasNext()) {
                        if (elements.hasNext()) {
                            return true;
                        } else {
                            currentBucket = bucketsIterator.next();
                            elements = currentBucket.iterator();
                    if (elements.hasNext())
                        return true;
                    return false;
                @Override
                public E next() {
                    while (bucketsIterator.hasNext()) {
                        if (elements.hasNext()) {
                              return elements.next();
                        } else {
                            currentBucket = bucketsIterator.next();
                            elements = currentBucket.iterator();
                    if (elements.hasNext())
                        return elements.next();
                    if (!bucketsIterator.hasNext())
                        throw new NoSuchElementException();
                    return null;
            return it;
        }I'm only not sure if it behaves the same as an original HashSet iterator. I doubt. The problem with my implementation is that both hasNext() and next() progress the internal iterators forward, so i.e. calling hasNext() on an empty set will progress the internal iterators to the end, so then adding some elements and calling hasNext() again will return false. I couldn't figure out a way that hasNext() does not progress the iterators, so that only next does that. Both hasNext() and next() are dependent on each other in my example. But it works.
    Thanks,
    PR.

  • Siebel testing help me please - Iterative test whith a data file - HELP PLS

    good morning,
    I have a problem. In my work, we are making an application testing of Siebel Loyalty and are too established items. this is why we want to use the Oracle Application Testing Suite tool but do not know how and which one to use (whether to use open funtional testing or script). The aim is to check the query for a datum, such as a client (PK), all data associated with this are correct based on a file that we prepared for this. The idea is to carry out an iterative navigation and browse the application by checking that the different fields in each view are correct in relation to the file you talk to them. These would be steps that could better describe the way we want to do:
    1 - making the customer No. of inserts and submit to update the other fields.
    2 - go through the first hearing and verifies the customer's first and last name are the same that appear in the file as well as the rest of the fields.
    3 - Continuing on the screen of current account transactions and verify that the customer has to be the same as in the file.
    All this by checking each field data with data from the file.
    understand file format should be "CSV", the issue is not how to configure the application and which of the two applications mentioned above is correct to do what I want. Please Help.
    Sincerely,
    Martin Gatto

    Not really sure if I understand completely what you are trying to do. How do vendors send over files? Is it uploaded to the system through a web UI or is an actual set of delimited files that are imported through a utility? I would think that if the files are being uploaded via multipart post and the validation can be done through the Siebel UI then all you have to do is have a set of controlled inputs.

  • My recirculating pump in sub vi simulation link doesnt work in the second iteration .It opens for maybe half a second whereas i gave the time delay for 5 secs..plz help very urgent

    Hi,
         I have attached my simulation loop.In the model attached i hav eone main pump with constant rpm which drives the 5 smaller pumps and fills the tank at the same time.As soon as the tanks reach their 90% level,the valves of the five pumps close(SP1,SP2,SP3,Sp4,Sp5).After that the recirculating pumps opens for 5 secs of the first tank.As soon as the recirculation finishes,the drain valve(SV1) for tank 1 open and the volume goes to interim storage.This happens for all the remaining tanks.
    My simulation works the first time,but when the second time the loop starts,it skips the recirculation pump even though i gave a time delay for 5 secs.Plz help ..I have attached the simulation.
    Thanks,
    Rami
    Attachments:
    Spatial Logic_2_Final.vi ‏223 KB

    Rami,
    I suspect that you have a race condition. The widespread use of local variables frequently leads to race conditions. Your subVI (Spatial Logic Sub_2.vi was not included) so I cannot run the VI. You have no way of knowing whether the subVI or the inner case structure will execute first, because there is no data dependency between them.
    I think a shift register or a few and some dataflow thinking would allow you to eliminate the inner case structure, the local variables, and, probably, most of your problems.
    Some of the SPi are indicators and some are controls. How are they used?
    The last case of the inner loop retursn to Case 1. Would case 0 be better?
    As for the second time through issue, it may be related to the Elapsed time function Auto Reset. From the help file: "Resets the start time to the value in Present (s) when the Express VI reaches the Time Target (s)." If more than 5 seconds elapses between the first time you use this and the next, it will exit immediately on the subsequent calls.
    Lynn

  • Help need in iteration

    Hi all,
    I need to know is there any way of sending Resultset or vector from Clentinterface method to .jspx page and can iterate the resultset there as table?
    Please help me how to iterate and display as table
    Regards,
    Suresh kumar.k

    Which technology do you use?
    If you use adf rich faces you can use af:foreach or af:iterate
    Timo

Maybe you are looking for

  • Saving to original location

    I have been helping some friends switch over to Mac. One of the most common questions is "why doesn't it save back to where I opened the file from, like on the pc?" Does anyone know how to make files save back to their original location? Thanks. -dr

  • FTP-Adapter reads filled file as empty file

    Hi, well i have a FTP-Poll to a folder where a filled file is existing. the adapter takes it and put it into archive folder after saying that the content is transformed into XML (shown in CC-Monitoring). Well the archive file i found but in Monitor t

  • Oracle ADF Faces integrated in Oracle JDeveloper: Freebie?

    Hi room, I'd like to ask if Oracle ADF Faces, the version integrated in Oracle JDeveloper (this is a freebie) is a Freebie also, any1 knows, do share. Thanks a lot.

  • Cannot use Java Embedding in Jdeveloper 11.4

    Hi, I am using Jdeveloper 11.1.1.4.0 . I am using a Java Embedding Activity in my BPEL and when i compile the project, the error which is coming is SCAC 50012. The same is working in 11.1.1.3.0 Jdeveloper Version. The code i am using in Java Embeddin

  • JAVA Install on software update but programs that need it not recognizing ?

    I upgraded to 10.4 recently and I had to add software which requires java 1.6 I ran software update and I think I got version 8. When I try to load the orig software that needed 1.6 it has an error and shows java at the old version.. I downloaded jav