TableCombos[finalj].getSelectedIndex() always returns initial value

Hello.
I have a JPanel class with an array of JComboboxes. The combos are filled in from an SQL database at the JPanel launch, and the indexes are selected also based on a database. However, when I change the combo selection, the action fires, but getSelectedIndex() on the combo just changed returns the original selection number.
I tried using the code below to try and catch the loss of the selection:
this.tableCombos[finalj].addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed (ActionEvent e){
System.out.println(table.getColumnAt(finalj)+" (combo["+finalj+"]) changed: " + tableCombos[finalj].getSelectedIndex() + " selected");
The selection item visually changes, while the selectIndex returns as the original selection, not the new one. what could be causing this?
TIA,
- aenik

You should use an ItemListener (see attached sample working code) instead of overriding the actionPerformed() method. The following is an excerpt from the JComboBox class's actionPerformed() method:
This method is public as an implementation side effect. do not call or override.
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
public class ComboTest {
public static void main(String args[]) {
  new ComboTestFrame();
class ComboTestFrame extends JFrame {
JComboBox jcb = new JComboBox(new Object[] {"Red","Green","Blue","Yellow"});
ComboTestFrame() {
  super();
  /* Components should be added to the container's content pane */
  Container cp = getContentPane();
  cp.add(BorderLayout.NORTH,jcb);
  jcb.addItemListener(new ItemListener() {
   public void itemStateChanged(ItemEvent evt) {
    Object obj = evt.getSource();
    if (evt.getStateChange() == ItemEvent.SELECTED)
     System.out.println("Selected index: " + ((JComboBox) obj).getSelectedIndex());
  /* Add the window listener */
  addWindowListener(new WindowAdapter() {
   public void windowClosing(WindowEvent evt) {
    dispose(); System.exit(0);}});
  /* Size the frame */
  setSize(200,200);
  /* Center the frame */
  Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize();
  Rectangle frameDim = getBounds();
  setLocation((screenDim.width - frameDim.width) / 2,(screenDim.height - frameDim.height) / 2);
  /* Show the frame */
  setVisible(true);

Similar Messages

  • What is reason for cl_fpm_factory= get_instance( ) return initial value?

    In DEV system, this piece of code is working fine. However when it moves to Testing system it dump due to cl_fpm_factory=>get_instance( ) return initial value. What could be the reason for this? Thanks!
      data lo_fpm  type ref to if_fpm.
      lo_fpm = cl_fpm_factory=>get_instance( ).
      wd_this->go_message_manager = lo_fpm->mo_message_manager.

    Hi Anthony,
    how sure are you that the DEV and Test system running the same Netweaver SP versions ?.  My doubt is that the test system is not NW7.01 (Ehp-1) . Or some thigs are not enabled in the configuration.
    Regards
    Senthi

  • Xcontrol always returns default value

    I have an Xcontrol that holds an enum in the data in shift register. I have a control on the Xcontrol and that should update the value that will be returned whent the control is read, but the control only ever returns the default value of the enum. I have tried updating the value in the data in shift register, and the data in element of the display state in shift register, and neither works.  I can change the Xcontrol using the value propery of a property node. How do I do the same thing with a front panel control of the Xcontrol?

    Post your code so we can see what you're doing.  We might be able to give some advice then.
    Kelly Bersch
    Certified LabVIEW Developer
    Kudos are always welcome

  • Reg Exp always returning false value

    Hi,
    Below is my code. I want to restrict the values to only alphabets and numbers and not special char.
    But the below condition fails on a positive value also. Ex: ABCD, abcd, 1234. These should be acceptable.
    Is the reg exp wrong?
    private var special_char:RegExp = /^[A-Za-z0-9]*$/;
                                  private function validateSpecialChar(inputValue:String):Boolean {
                                            if (special_char.test(inputValue))
                                                      valid = true;
                                            else
                                                      valid = false;
                                            return valid;
    Thanks,
    Imran

    Try: http://stackoverflow.com/questions/9012387/regex-expression-only-numbers-and-characters

  • Standar ws ProjectByPartyQueryResponse_In is not returning any values

    Hi gurus,
      I'm trying to use the standar webservice ProjectByPartyQueryResponse_In in our landscape in order to get all the projects related to the person responsible for the project but the web service is not returning any values.
    When I execute the service -using soapui- with the following values (or any other value for that matters):
    <PartyID>20000143</PartyID>
    <PartyRoleCode>ZA</PartyRoleCode>
    The web service always returns :
           <Log>
                <BusinessDocumentProcessingResultCode>5</BusinessDocumentProcessingResultCode>
                <MaximumLogItemSeverityCode>3</MaximumLogItemSeverityCode>
                <Item>
                   <TypeID>002(ECC_SE_COMMON)</TypeID>
                   <SeverityCode>3</SeverityCode>
                   <Note>No records returned for ZA 0020000143</Note>
                </Item>
             </Log>
    The party Id exists and also de party role code and there is at least one project that has that party with that role. I'm sure because I use other web service to find a project by id and in the result the project has the <Party> section with those values.
    I was looking for solutions, notes, threads in forums with no success, then i decided to debug the webservice and I did find the following line in the webservice code.
      SELECT objnr INTO TABLE it_data FROM ihpa
      WHERE  parvw = role_code AND
             parnr = party_id AND
             obtyp = 'PDN'.
    when that line executes the select always returns 0 values, then I look in the table IHPA using the SE16 without any filter and I found that my records exists!! but the select does not get it. I was wondering why the select is not working and then I filter the data in the SE16 using the same values that the query does
    for example:
    PARVW= ZA
    PARNR = 20000143
    OBTYP = PDN
    And I was surprised when the SE16 did not found any value even I was seeing in the previous screen with no filters!!!! And I supouse thats why the webservice is not working. I started making filters one by one, for example firts filtering just de PARVW = ZA and works, but when I filter just the PARNR =  20000143 the SE16 can't find any value, just when I put an * at the end of the number the SE16 returns all the values expected, Im guessing that the fields in the database has blanks at the end but this is a standar table and a standar program.
    Have any of you had the same problem? is there anything that I can do? does anyone knows if this is an unkown bug? becaus I could'n find any note on the marketplace.
    Any help would be appreciated.
    Gustavo Balboa

    Hi!
      The problem were solved but not using the Badi, because the badi only let you change the value of the var party_id and that var is declared as PARNR (of type numeric with length 10), and no mater wat you do the two 00 can´t be removed.
      We solved the problem with an enhancement point in the code at the method "party_get_data", look at the beginin and at the end. We just change the type of var used for party_id.. now we use a CHAR one insted the numeric used by the original code.
    And we repeat the select...
    Thank you very much for the help.
    METHOD party_get_data.
    """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$SE:(1) Class CL_PRS_PROJECTPRJPARTYQR, Method PARTY_GET_DATA, Start                                                                                A
    $$-Start: (1)----
    $$
    ENHANCEMENT 1  ZPARTY_GET_DATA.    "active version
    DATA : WA_PARNR TYPE I_PARNR.
    DATA : WA_CHPAR(10) TYPE C.
    ENDENHANCEMENT.
    $$-End:   (1)----
    $$
      DATA :  temp_object_number TYPE ihpa-objnr,
              field1 TYPE char50,
              field2 TYPE char50,
              field_role TYPE char50,
              field_party TYPE char50,
              st_object_number TYPE TABLE OF bapiprexp.
      DATA : it_data TYPE TABLE OF st_data,
             wa_data LIKE LINE OF it_data,
             itab TYPE TABLE OF st_data,
             wa LIKE LINE OF itab,
             wa_project_details LIKE LINE OF project_details,
             null.
    Select Object number based on input Party and Role
      SELECT objnr INTO TABLE it_data FROM ihpa
      WHERE  parvw = role_code AND
             parnr = party_id AND
             obtyp = 'PDN'.
    Select Project ID based on input Object number
      LOOP AT it_data INTO wa_data.
        SELECT pspid post1 FROM proj INTO CORRESPONDING FIELDS OF wa_data
        WHERE  objnr = wa_data-pspid.                         "#EC CI_NOFIELD
        ENDSELECT.
        MOVE-CORRESPONDING wa_data TO wa.
        APPEND wa TO itab.
      ENDLOOP.
      IF sy-subrc <> 0.
        field_role = cl_wd_utilities=>get_otr_text_by_alias( 'PLM-SE_PRS_XI_PROXY/ROLE_CODE' ) .
        field_party = cl_wd_utilities=>get_otr_text_by_alias( 'PLM-SE_PRS_XI_PROXY/PARTY_ID' ) .
        CONCATENATE  field_role role_code_external INTO field1.
        CONCATENATE  field_party party_id INTO field2.
        MESSAGE e002(ecc_se_common) WITH field1 field2 INTO null.
        CALL FUNCTION 'PS_BAPI_MESSAGE_APPEND'
          TABLES
            return = party_return.
      ELSE.
        MESSAGE s082(ops_se_prs) INTO null.
        CALL FUNCTION 'PS_BAPI_MESSAGE_APPEND'
          TABLES
            return = party_return.
      ENDIF.
      LOOP AT itab INTO wa.
        MOVE-CORRESPONDING wa TO wa_project_details.
        APPEND wa_project_details TO project_details.
      ENDLOOP.
    """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$SE:(2) Class CL_PRS_PROJECTPRJPARTYQR, Method PARTY_GET_DATA, End                                                                                A
    $$-Start: (2)----
    $$
    ENHANCEMENT 2  ZPARTY_GET_DATA.    "active version
      WA_CHPAR = party_id.
      SHIFT WA_CHPAR BY 2 PLACES.
      CLEAR party_return.
      REFRESH party_return.
      SELECT objnr INTO TABLE it_data FROM ihpa
      WHERE  parvw = role_code AND
             parnr = WA_CHPAR AND
             obtyp = 'PDN'.
    Select Project ID based on input Object number
      LOOP AT it_data INTO wa_data.
        SELECT pspid post1 FROM proj INTO CORRESPONDING FIELDS OF wa_data
        WHERE  objnr = wa_data-pspid.                         "#EC CI_NOFIELD
        ENDSELECT.
        MOVE-CORRESPONDING wa_data TO wa.
        APPEND wa TO itab.
      ENDLOOP.
      IF sy-subrc <> 0.
        field_role = cl_wd_utilities=>get_otr_text_by_alias( 'PLM-SE_PRS_XI_PROXY/ROLE_CODE' ) .
        field_party = cl_wd_utilities=>get_otr_text_by_alias( 'PLM-SE_PRS_XI_PROXY/PARTY_ID' ) .
        CONCATENATE  field_role role_code_external INTO field1.
        CONCATENATE  field_party party_id INTO field2.
        MESSAGE e002(ecc_se_common) WITH field1 field2 INTO null.
        CALL FUNCTION 'PS_BAPI_MESSAGE_APPEND'
          TABLES
            return = party_return.
      ELSE.
        MESSAGE s082(ops_se_prs) INTO null.
        CALL FUNCTION 'PS_BAPI_MESSAGE_APPEND'
          TABLES
            return = party_return.
      ENDIF.
      LOOP AT itab INTO wa.
        MOVE-CORRESPONDING wa TO wa_project_details.
        APPEND wa_project_details TO project_details.
      ENDLOOP.
    ENDENHANCEMENT.
    $$-End:   (2)----
    $$
    ENDMETHOD.

  • Return array value based on selection criteria

    I have one data field that holds text data similar to below:
    "Meeting Room 1 (Projector), Meeting Room 2 (Whiteboard), Meeting Room 3 (Video Conferencing)"
    "Meeting Room 3 (LCD Display), Meeting Room 1 (Video Conferencing), Meeting Room 2 (Whiteboard)"
    The meeting rooms are not always in the same order, I cant count on Meeting Room 1 being followed by Meeting Room 2 etc.
    My objective is to only return the meeting room that has the Whiteboard.
    I'm aware that I can use SPLIT to seperate the Meeting Rooms by the comma and place their components into an array.
    What I'm not sure how to do is return the meeting room with the Whiteboard when that could be [1] in the Array or [2] or [3] in the array.
    I need to return the array value based on its contents. Could someone help me 'search' the array created by the SPLIT command and always return that value with the word 'Whiteboard'

    This works
    whileprintingrecords;
    global stringvar x:='';
    global numbervar n:=1;
    While n <= Ubound(split('......, Meeting Room X (Whiteboard),..............', ",")) Do
    if split('..........., Meeting Room X (Whiteboard), ............', ",")[n] like '*Whiteboard*'
    then x:=split('.............., Meeting Room X (Whiteboard), ..............', ",")[n];
    n := n + 1;
    x;
    Just replace my string with your field.
    Ian

  • Array elements keep returning to their initial value after being replaced

    Hello,
    This is my first post here, but this looks like a great place to discuss labview.
    I have a strange problem that probably has a simple answer.
    Basically, I have initialized an array outside of a "for loop" that contains a "flat sequence structure."  I use the array inside the flat seq structure, replacing elements within the array, incrementaly by 1 starting with index 0, so i have run a wire through the "for loop" barrier and then through the "flat seq structure box".
    However when I step through my VI what happens is this.
    On the first run through, it succesfully changes the element at index 0.  On the next iteration it succesfully replaces the element at index 1, however, now index 0 has returned to its initial value!   .... This continues.... say im up to my 100th iteration, all the previous indexes have all returned to their initialized value but index 99 (its the 100th iteration) now has the value it should...however on the next iteration, index 99 will return to its initialized value.... its a vicious cycle..
    Can anybody tell me what I've screwed up?
    Thanks a Million,
    Nick

    Are you using a shift register on your loop or a tunnel?  If you are using a tunnel, then the orginal value is always passed into the loop.  If you use a shift register, then each iteration of the loop has the value passed in the last iteration of the loop.  I'm not at work, so can't setup a perfect example, but this is from an example I showed someone else.  The first two examples I show here are using shift registers and a 2-D array.  The second example uses an element only available in later versions of LV, but is supposed to be more efficient memory wise.

  • Photo:getRawMetadata( "gpsAltitude") always returns a positive value

    I noticed, both on Windows 7 and Apple OS X 10.9 that calling the photo:getRawMetadata( "gpsAltitude") always returns a positive value.
    Also when Lightroom in the user interface displays a negative value.
    The strange thing is that the photo:getFormattedMetadata( "gpsAltitude") returns the right value, however formatted.
    I reported the bug, see Lightroom 5 SDK photo:getRawMetadata( "gpsAltitude") gives always positive value also when it should be negative
    I thought to document it also here for those who walk into this also.

    Yes, this will be a good idea! Please include!
    In general, if it will be possible to access (read/write) all EXIF tags with its name will be good. Also true for IPTC/IIM tags.
    Maybe, what someone can do with Geo-Tagging, this external program can give some very good ideas: http://www.geosetter.de
    A simple LUA scripts, which also uses the Exiftool can be found here:
    http://code.google.com/p/geotag-lightroom-plugin/
    But if sometimes LR will have functionalities like GeoSetter, this will be the best solution. Maybe, in a few years, every camera will have built-in GPS hardware, but if you look at GeoSetter, there is much more in Geo-Tagging than a GPS coordinate. I prefer, to have only one tool in my Workflow... And I like to see LR here. ;-)
    Manfred

  • GUID generation issue, SYSUUID always returns the same value.

    Hi,
    I'm using "SELECT SYSUUID FROM DUMMY" to get a guid value but it always return the same value.
    What should I do to get a unique value each time I execute the query above.
    Thanks.

    I thought I had the same problem and I found that if you generate multiple UUID's in the same SQL, it they will be the same.  If you make multiple calls, you should get multiple UUID's. 
    Try this:
    SELECT SYSUUID as UUID1 FROM DUMMY;
    SELECT SYSUUID as UUID2 FROM DUMMY;
    I get the following results:
    UUID1 = 538632FD7EA20426E10000000A3F10A9
    UUID2 = 538632FE7EA20426E10000000A3F10A9
    Notice that the strings look almost identical, but the 8th character on UUID1 is a D and the 8th on UUID2 is a E.
    Jim

  • Checkboxes in nested repeaters always return false

    I display a table using nested <netui-data:repeater> tag sets.
    <p>
    In the left column of the table, I have a checkbox to indicate user row selections for further action. These checkboxes are bound to an array of Row objects that have a boolean field indicating whether they are selected. These work great and I can iterate through the array of Row objects returned in the (pageflow-scoped) form.
    <p>
    In the first (header) row of the table, each cell contains the column name and a checkbox to allow the user to hide columns they don't want to see. These checkboxes are bound similarly to an array of Column objects with Boolean (used to be boolean, tried the object type to see if it helped) indicating their selected state. The initial values of the checkboxes are correct - they are all displayed as "checked"/true - so the data binding seems ok at this point.
    <p>
    PROBLEM: The selected values returned from the JSP are always all set to false for the Column objects! The only real coding difference is that the column checkboxes are rendered within a set of nested <netui-data:repeater> tags inside the set that render the row checkboxes (see below).
    <p>
    The {pageFlow.activity3Form.rows} are of type RowData with fields/getters/setters for fields:
    private boolean selected;
    private String[] fieldData;
    private long oid;
    <p>
    The {pageFlow.activity3Form.columns} are of type Column with fields/getters/setters for fields:
    private Boolean selected;
    private String columnName;
    private int columnIndex;
    <p>
    activity3Form contains a bunch of fields including:
    private RowData[] rows;
    private Column[] columns;
    <p>
    JSP code for the table:
    <code>
    <table width="2000" border="0">
    <tr class="style3" valign="top" bgcolor="#ffffff">
    <th colspan="150" class="style3_3" align="left">
    <netui:anchor action="showAllDataAL3" formSubmit="true">Show All Data</netui:anchor>
    <netui:anchor action="showDefaultDataAL3" formSubmit="true">Show Default Data</netui:anchor>
    <netui:anchor action="showSelectedDataAL3" formSubmit="true">Show Selected Data</netui:anchor>
    </th>
    </tr>
    <tr>
    <!-- The dataSource for the repeater is the array of EsiMemberRows in the form -->
    <netui-data:repeater dataSource="{pageFlow.activity3Form.rows}">
    <netui-data:repeaterHeader>
    <table class="tablebody" border="0" cellpadding="1" cellspacing="3">
    <tr class="style3" valign="top" bgcolor="#ffffcc">
    <th bgcolor="#89fbfb" nowrap valign="bottom">
    <input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/>All
    </th>
    <netui-data:repeater dataSource="{pageFlow.activity3Form.columns}">
    <netui-data:repeaterItem>
    <th valign="bottom">
    <netui:label value="{container.item.columnName}" defaultValue=" "/><br>
    <netui:checkBox dataSource="{container.item.selected}"/>
    </th>
    </netui-data:repeaterItem>
    </netui-data:repeater>
    <th align="left" nowrap valign="bottom">
    Transaction Status<br>
    <input type="radio" name="setall" value="Update" onclick="setAllRadioGroupsTheSame(this, 'Update');">Update
    <input type="radio" name="setall" value="Hold" onclick="setAllRadioGroupsTheSame(this, 'Hold');">Hold
    <input type="radio" name="setall" value="Proof" onclick="setAllRadioGroupsTheSame(this, 'Proof');">Proof
    <input type="radio" name="setall" value="Reject" onclick="setAllRadioGroupsTheSame(this, 'Reject');">Reject
    <input type="radio" name="setall" value="Unset" onclick="setAllRadioGroupsTheSame(this, 'Unset');">Unset
    </th>
    </tr>
    <tr class="style3" valign="top" bgcolor="#facf92">
    </tr>
    </netui-data:repeaterHeader>
    <netui-data:repeaterItem>
    <tr class="style3_3" valign="top" bgcolor="#89fbfb">
    <td background="#ffffff"><netui:checkBox dataSource="{container.item.selected}"/></td>
    <netui-data:repeater dataSource="{container.item.fieldData}">
    <netui-data:repeaterItem>
    <td nowrap><netui:label value="{container.item}" defaultValue=" "></netui:label></td>
    </netui-data:repeaterItem>
    </netui-data:repeater>
    <td align="left" nowrap>
    <netui:radioButtonGroup tagId="subGroup" dataSource="{container.item.oid}" labelStyleClass="style3_1">
    <netui:radioButtonOption value="Update">Update</netui:radioButtonOption>
    <netui:radioButtonOption value="Hold">Hold</netui:radioButtonOption>
    <netui:radioButtonOption value="Proof">Proof</netui:radioButtonOption>
    <netui:radioButtonOption value="Reject">Reject</netui:radioButtonOption>
    <netui:radioButtonOption value="Unset">Unset</netui:radioButtonOption>
    </netui:radioButtonGroup>
    </td>
    </tr>
    </netui-data:repeaterItem>
    <netui-data:repeaterFooter></table></netui-data:repeaterFooter>
    </netui-data:repeater>
    </tr>
    <!-- Data section END -->
    </table>
    </code>

    <p>
    A bit more info - how the HTML is rendered to the browser:
    <p>
    The failing (and initially checked/true) column checkboxes are generated as:
    <br>
    <input type="hidden" name="wlw-checkbox_key:{pageFlow.activity3Form.columns[0].selected}OldValue" value="false"><input type="checkbox" name="wlw-checkbox_key:{pageFlow.activity3Form.columns[0].selected}" checked>
    <p>
    The working (and initially unchecked/false) row checkboxes are generated as:
    <br>
    <input type="hidden" name="wlw-checkbox_key:{pageFlow.activity3Form.rows[0].selected}OldValue" value="false"><input type="checkbox" name="wlw-checkbox_key:{pageFlow.activity3Form.rows[0].selected}">

  • LOV Initial value on Parameter form

    Hi, I am new to Oracle Reports so I hope this is not a lame question.
    I have a drop down list on my parameter form based on a select query. My problem arises when I run the report, I would like the list to display a blank value as the initial value rather than the first value returned by the select statement. Does anyone have any ideas?

    You could always do something like:
    select ename from
    (select null ename from dual
    union
    select ename from emp)
    order by nvl(upper(ename), 'A')

  • Return Code value using 'starting new task' and 'wait until'

    I'm having a minor issue with some return code values in my ABAP.
    This is what part of it used to look like before I modified it:
    With Code in version 1, the sy-subrc was not always zero, sometimes it would be 4.
    That was fine, and my abap would do something based on the non-zero RC.
    had a need to implement an RFC timeout, the only way I could see to do it was to use 'starting new task' etc as seen in Version 2.
    However, with my changes, sy-subrc is always zero.
    The ABAP runs fine but I know that sy-subrc should sometimes be 4, even when it returns within the allotted 60 seconds.
    Maybe I've coded it incorrectly.
    Can someone point me in the right direction?
    #>> Start of VERSION 1
      call function 'MY_FUNCTION_MODULE'
           destination RFCDEST
           tables
                orders_list          = t_orders_packet
                apo_orders_list      = t_apo_orders
                apo_resources        = t_apo_resources
           exceptions
                COMMUNICATION_FAILURE    = 1 MESSAGE MSG_TEXT
                SYSTEM_FAILURE           = 2 MESSAGE MSG_TEXT
                NO_ORDERS_SUPPLIED       = 3
                NO_PEGGED_ORDERS_FOUND   = 4
                ORDERID_CONVERSION_ERROR = 5
                OTHERS                   = 6.
    if sy-subrc is initial.
      * do some stuff as RC was 0
    else.
    * log non-zero return code etc
    endif.
    * << End of Version 1

    And now Version 2.
    I didn't put this into the 1st post as the formatting goes bonkers.
    #>> Start of VERSION 2
      call function 'MY_FUNCTION_MODULE'
           destination RFCDEST
           starting new task 'taskname'
           performing receive_result on end of task
           tables
                orders_list          = t_orders_packet
                apo_orders_list      = t_apo_orders
                apo_resources        = t_apo_resources
           exceptions
                COMMUNICATION_FAILURE    = 1 MESSAGE MSG_TEXT
                SYSTEM_FAILURE           = 2 MESSAGE MSG_TEXT
                NO_ORDERS_SUPPLIED       = 3
                NO_PEGGED_ORDERS_FOUND   = 4
                ORDERID_CONVERSION_ERROR = 5
                OTHERS                   = 6.
      WAIT UNTIL results_received = 'X' UP TO 60 SECONDS.
    if sy-subrc is initial.   << Now this is always ZERO
      * do some stuff as RC was 0
    else.
    * log non-zero return code etc
    endif.
    FORM receive_result USING iv_taskname.
      RECEIVE RESULTS FROM FUNCTION 'MY_FUNCTION_MODULE'
           tables
                orders_list          = t_orders_packet
                apo_orders_list      = t_apo_orders
                apo_resources        = t_apo_resources
           exceptions
                COMMUNICATION_FAILURE    = 1 MESSAGE MSG_TEXT
                SYSTEM_FAILURE           = 2 MESSAGE MSG_TEXT
                NO_ORDERS_SUPPLIED       = 3
                NO_PEGGED_ORDERS_FOUND   = 4
                ORDERID_CONVERSION_ERROR = 5
                OTHERS                   = 6.
      results_received = 'X'.
    endform.                    "receive_result
    * < End of Version 2

  • Oawebbean.getValue() returns intial value not updated value. Please Help

    Hi all, I'm using the code
    OAMessageTextInputBean test = (OAMessageTextInputBean)oawebbean.findChildRecursive("xxTestTo");
    Object testing = test.getValue(oapagecontext);
    where xxTestTo is the ID of the field in the XML
    I've set the initial value for testing purposes to be 12345 and when the page loads I try to change the value to 54321 however, the value which is always passed is 12345 not the updated value.
    What am I doing wrong. I have the code above in my processFormRequest
    Please Help

    I think I've pinpointed the problem but I don't know the solution.
    When I add a messageinputtext field within the a region within the page, oawebbean.getValue always returns the old value.
    However if I add the messageinputtext field within the Page (not within a region) then oawebbean.getValue will give me the most updated value.
    When I add the messageinputtext, do I need to set its properties so that it doens't reset its value when I go into processFormRequest?

  • HasEventListener and willTrigger always return true

    Hi  everybody.
    I'm trying to achieve the following result.
    I'm listing all items in a form.
    When I encounter a button I check if it has already an event listener applied to it. If not , I apply the event Listener with addEventListener.
    In this way, the next time I'll list the whole form I won't apply the event listener another time (if for example I apply the same event listener twice to a button which insert a new record in a database as result I'll have 2 records added also if the user clicked once...no good at all!!!)
    To accomplish this task I'm using the Actionscript function hasEventListener(EventType) and here comes the weird thing.
    Eveytime I invoke hasEventListener on the form's button it always returns true event if is the first time a list the form (so no event listener applied yet) , even if before to invoke hasEventListener I run removeEventListener.
    I've got the same behavior when i use willTrigger() function, it always returns true no matter when i call it.
    One possible solution could be set a global boolean property to store if Ialready listed the form and applied the event listener to it, but it would be better using hasEventListener, because I've got a class that perform this form listing , and this class is used on wide project, so if I get to fix this problem inside the class I would fix the problem in the entire project in on shot (I love oop programming!!!!)
    Has anybody already addressed this problem?
    Any advisement would be really appreciated.
    Thanks in advance for the attention.
    Best regards!!
    Luke

    Hi, flex harUI.
    Thanks very much for your reply.
    I knew that if I apply an event listener twice it should fire up only once, but this isn't what happen.
    Here's my scenario:
    -  I've got a component with the form inside it
    - Through a menu a go to the state the component is in and I call an "init" function inside the component
    - In the init function I call the Class which activate the form by applying eventlistener on the button
    - The user can navigate away from the component by click another menu item and then return to the component invoking again the form activation (and so let my application apply once again the addEventListener)
    - Here's what happen: the second,third,... time the user return to the component, when he try - for example - to add a record, the record is added two,three... times according to how many times the users "reinitialized" the component. The same things happen when the user tries to delete a record, he is prompted two,three,.... times if he's sure to delete it.....
    It's a really strange behaviour.
    I've found i worked around, by setting a global bool var "initialized" and before call the form activation i check the value of this var, but It's not a very beautiful solution, 'cause I would prefer to fix this problem inside the class, so the fix the problem in the whole project just in one shot!!! (that's why I would like to use hasEventListener() to check if the button has already an eventListener)
    Thaks anyway for the reply!
    If I've some news I'll update ya.
    Bye!

  • What is the purpose of the Initial Value checkbox in SE11?

    Hi,
    When we create database tables using SE11, there is a Initial Value checkbox for the fields that we create. How do we make use of this checkbox?
    For example, after checking the Initial Value checkbox, how do I go about entering the intial value? There isn't a input field for me to do it. Thanks.

    "Initial values" Flag  ---> Indicator that NOT NULL is forced for this field
    Select the flag if a field to be inserted in the database is to be filled with initial values. The initial value used depends on the data type of the field.
    Please note that fields in the database for which the this flag is not set can also be filled with initial values.
    When you create a table, all fields of the table can be defined as NOT NULL and filled with an initial value. The same applies when converting the table. Only when new fields are added or inserted, are these filled with initial values. An exception is key fields. These are always filled automatically with initial values.
    Restrictions and notes:
    The initial value cannot be set for fields of data types LCHR, LRAW, and RAW. If the field length is greater than 32, the initial flag cannot be set for fields of data type NUMC.
    If a new field is inserted in the table and the initial flag is set, the complete table is scanned on activation and an UPDATE is made to the new field. This can be very time-consuming.
    If the initial flag is set for an included structure, this means that the attributes from the structure are transferred. That is, exactly those fields which are marked as initial in the definition have this attribute in the table as well.
    Hope this helps.
    Thanks,
    Balaji

Maybe you are looking for