JClient equivalent post-change trigger and JTextField issue.

Hi,
JClient 10.1.2
What is the equivalent event listener I could use to obtain the forms post-change functionality?
With following components:
JTextField
JComboBox
JCheckBox
For example on a JComboBox I would like to display a warning message dialog if a special value has been selected.
I've tried using itemStateChanged method on a combo box but the message dialog is displayed everytime the row gains currency.
Should I use focusGained to store the previous value and in the focusLosted method, check for a change?
What would you recommend?
One more question on JTextField, what is the method to track "global changes".
I've tried using the DocumentListener, but the methods changedUpdate,insertUpdate and removedUpdate are fired on each keyboard action.
Is there a way to track "global changes" on the whole text?
Thanks
Frederic

You can work at setAttribute (Vo or Entity) level.
You should be carefull, however, because in a cliente server environment it looks like the forms post-change event but in a 3 tier J2EE environment it's a server event and is not possible to interact with the screen in processing that event.
Any other comment is wellcome.
Bye
Tullio

Similar Messages

  • Post Change trigger issue

    I placed a post change(Item level) trigger to LOV enable item(deptno) and insert the following code there.
    But as expected other block items (dname, loc) of dept block won't come to the form once change the LOV.
    ------------------ code --------------------
    BEGIN
         SET_BLOCK_PROPERTY('dept',DEFAULT_WHERE, 'deptno = ' || :dept.deptno);
         EXECUTE_QUERY;
    END;
    Any solutions
    thax
    Shabar

    shabar,
    the EXECUTE_QUERY cannot be given in POST-CHANGE Trigger.
    I think your requirement is this.
    some departments were already saved.
    if some one tries to create new department with old deptcode, then the actual department details should retrieve.
    if this is the case, then, give the code in the KEY-NEXT-ITEM Trigger.
    and if the deptno field is varchar, then u have to change the code like this,
    DECLARE
    CURSOR Cur_Dept IS SELECT DEPTNO FROM DEPT WHERE DEPTNO = :DEPT.DEPTNO;
    Str_Deptno VARCHAR2(20);
    BEGIN
    IF :DEPT.DEPTNO IS NOT NULL THEN
    OPEN Cur_Dept;
    FETCH Cur_Dept INTO Str_Deptno;
    IF Str_Deptno IS NOT NULL THEN
    SET_BLOCK_PROPERTY('DEPT', DEFAULT_WHERE, 'DEPTNO = ''' || :DEPT.DEPTNO || '''');
    CLEAR_BLOCK(NO_COMMIT);
    EXECUTE_QUERY;
    END IF;
    END IF;
    END;
    Its better to check whether the DEPTNO is valid or not.
    Regards,
    Manu.

  • Post-change trigger problem

    I have problem with post-change trigger, i'm using Forms 10g
    I have two block, one is database block and the other is non-database block for example A is Nondatabase block and B is Database block, I have written commit_form built-in in Key-Next-Item of a item in B(database) block. When it is getting executed commit_form built-in firing the post-change trigger of a item in A(Non-database) block. I dont know why it is firing and I dont want the post-change trigger to fire (we are not assigning any value to that item in A block during commit_form).
    Can anybody help me on this..
    Regards
    Radha

    when you issue a commit_form, forms will validate all items in all blocks which re not valid at that moment. This also occurs for non-database-block.
    The question is why is the item not valid ? Are you putting something in it in some other trigger? If so, you could explicitly set the itemstate to valid with a
    SET_ITEM_PROPERTY('BLOCK.ITEM', ITEM_IS_VALID, PROPETY_TRUE);btw.. you should not use the POST-CHANGE-trigger for validations etc. its better to use the WHEN-VALIDATE-ITEM-trigger.

  • FRM-40735: illegal restricted procedure COMMIT in POST-CHANGE trigger

    I am using forms6i. I have three text fields FL1 ,*FL2* , FL3 in a form. Cursor passes from FL1 to FL2 and FL2 to FL3. I want when cursor transfers from FL1 to FL2 the form should be saved(commit). On FL1 i put COMMIT; in post-change.
    But when I pressed Enter key on FL1 it gives following error message.
    FRM-40735: illegal restricted procedure COMMIT in POST-CHANGE trigger
    Can you help me doing this.

    Gul wrote:
    I am using forms6i. I have three text fields FL1 ,*FL2* , FL3 in a form. Cursor passes from FL1 to FL2 and FL2 to FL3. I want when cursor transfers from FL1 to FL2 the form should be saved(commit). On FL1 i put COMMIT; in post-change.
    But when I pressed Enter key on FL1 it gives following error message.
    FRM-40735: illegal restricted procedure COMMIT in POST-CHANGE trigger
    Can you help me doing this.You cannot use COMMIT_FORM in post-change trigger. Because post-change only accept UN-restricted procedure. and commit is not.
    try this
    /* Trigger KEY-NEXT-ITEM on every item and write sample code */
    commit_form;
    next_item;Hope this works..
    Hamid
    Mark correct/helpful to help others to get right answer(s).*

  • POST-CHANGE TRIGGER

    Hi,
    I am using Forms Version 9.0.4.0.19.
    I created a form which consists of two blocks. Both blocks have a database field called city_code. I am trying to create a post-change trigger that would display the description and not the code of the city. Unfortunately, I keep getting no records found when I run the form although I now for certain there are records, there are records when I remove both triggers.
    Here is my code for the trigger for block1:
    =======================================================
    BEGIN
         SELECT DESCRIPTION
         INTO :INST.txtCITY
         FROM DICT
         WHERE CODE = :INST.CITY_CODE
    END;
    =======================================================
    Here is my code for the trigger for block2:
    =======================================================
    BEGIN
         SELECT DESCRIPTION
         INTO :CONTACT.txtCITY
         FROM DICT
         WHERE CODE = :CONTACT.CITY_CODE
    END;
    =======================================================
    Thanks in advance.
    VC

    Hi Again,
    I thought it worked, it didn't give me an error when I compiled it, but when I ran the form the data didn't appear. Below is my code, can somebody please help?
    DECLARE
         CURSOR LOOKUP_INST_TYPE IS SELECT DICT.DESCRIPTION
         FROM DICT
         WHERE DICT.CODE = :INSTITUTION.INST_TYPE
         AND DICT.TOPIC = 'INST_TYPE';
    BEGIN
         OPEN LOOKUP_INST_TYPE;
         FETCH LOOKUP_INST_TYPE INTO :INSTITUTION.TXTINST_TYPE;
         CLOSE LOOKUP_INST_TYPE;
    END;

  • Post-change trigger alternative

    db and dev 10g rel2 ,
    hi all ,
    i want same functionality of using post-change trigger in 10g ?

    newbi_egy wrote:
    It would be easier to answer, if you would tell us what exactly is your problem. What does not work? What to you want to achieve?i've said before , how to get the same functionality of post-change trigger ?
    and i said that post-change trigger fires under these situations :
    the post-change trigger fires under these situations :
    1- The Validate the Item process determines that an item is marked as Changed and is not NULL.
    2- An operator returns a value into an item by making a selection from a list of values, and the item is not NULL.Above two points also done by When-Validate-Item trigger. so it's an alternative of Post-Change.
    3- Oracle Forms fetches a non-NULL value into an item. In this case, the When-Validate-Item trigger does not fire. If you want to circumvent this situation and effectively get rid of the Post-Change trigger, you must include a Post-Query trigger in addition to your When-Validate-Item trigger. See "Usage Notes" below.
    but when-validate-item trigger does not satisfy all these situations .Only point 3 are not satisfied by When-Validate-Item trigger. for this you need Post-Query trigger.
    It's just another clarification of Andreas answer.
    Hope it's clear now.
    Hamid

  • Post-change trigger raising when query!!

    this trigger is form related: i just attach a post-change trigger with an item.
    contains the following code
    declare
    name varchar2(50);
    name1 varchar2(50);
    begin
    name1 :='%'||:BLK_EMP_MST.FATHER_NM||'%';
    select first_nm INTO name from hrt_emp_mst
    where father_nm like name1;
    if(name is not null) then
    MESSAGE(name||' has same father name');
    MESSAGE('WARNING');
    end if;
    exception
    when no_data_found then
    null;
    end;
    it working fine when we insert a new record. but when i query for record, it fires, which should not be

    I agree with Manu, rather than use a Post-Change trigger to validate user input, use the When-Validate-Item (WVI) trigger instead. This will allow you to validate the input from a user, but the WVI trigger won't fire when a record is queried into your block.
    @Manu
    POST-QUERY is kept only for backward compatibility in 10gI think you meant to say "Post-Change" instead of "Post-Query." The Post-Change trigger has been depricated, but the Post-Query trigger is still valid in all Forms versions.
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • PI Interface Posting Files - Trigger Process Chain Issue

    Dear Reader,
    Situation -
    We get multiple flat files from source system via PI interface. To process this in BW 7.0 side we have created the web service interface. In the function module we have written a code to trigger process chain, once a data is posted.
    Issue -
    As there are multiple files being posted, the PC runs on completion of the every single post, which is not desired. We need to run the process chain only once at the end of all the files being posted.
    Notes -
    1. Number of files keep varying.
    2. Clubbing all the files in a single file and then posting it would cause performance issues.
    Request your help in find a way like -
    1. A file being posted of name, say 'START PC', which can be trapped in the funciton module and controll the PC call.
    2. <any Other idea>
    regards,
    vinay gupta

    Hi Dhanya,
    This is the code i have in the ABAP program in the process chain. I just included the API_SEMBPS_POST part, but still it doesn't work. Please give me your email address so that i can send some screenshots.
    REPORT  ZHTEST.
    DATA: l_subrc TYPE sy-subrc.
    DATA: ls_return TYPE bapiret2.
    CALL FUNCTION 'API_SEMBPS_POST'
    IMPORTING
       E_SUBRC         = l_subrc
       ES_RETURN       = ls_return.
    CALL FUNCTION 'RSAPO_CLOSE_TRANS_REQUEST'
      EXPORTING
        I_INFOCUBE               = 'ZMAP_TAB'
    EXCEPTIONS
      ILLEGAL_INPUT            = 1
      REQUEST_NOT_CLOSED       = 2
      INHERITED_ERROR          = 3
      OTHERS                   = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Previous Post ( v4l, opencv and Webcam issues )

    I feel like this is probably a better location for it than the last place because I have recently reasoned it is more of a programming issue. (If so can someone move it?)
    I've been struggling with this problem for the last couple days. I can't get opencv (c) to work with my camera however I can get the opencv (python) to work. I find it odd because I figured it was almost an identical library. Anyhow, this is my previous post.
    http://bbs.archlinux.org/viewtopic.php? … 99#p629099
    Any help would be greatly appriciated, for I have not found many people experiencing this issue.
    Thanks,
    Brian

    So. what is the status of your project? im very interested in some simple app to control window focus of my tiling wm using webcam head tracking.
    Write me a pm, plox

  • Post-query trigger ? save changes?

    I have a similar problem to that posted by 'nova' on Dec. 27, 2000. I have a form generated by Designer. The problem is that upon subsequent querying (F8 pressed twice), it asks me if I want to save my changes, when I have not made any changes.
    I looked in the generated code for the post-query trigger and found SET_RECORD_PROPERTY(:SYSTEM.TRIGGER_RECORD, 'NEW_CUST', STATUS, QUERY_STATUS) which is apparently not the problem, according to this prior post. I am at a loss and have tried everything I could think of.
    What else could be causing this? I checked to see if there were any items being set in the property sheet to default values, and removed the defaults - that did not work.
    ??? I would greatly appreciate any assistance. Thanks.

    Hi Pina,
    my similar problem I have solved like this:
    Post-Record trigger:
    BEGIN
    *** this is important to test the record status - without this I had the same problem
    IF :SYSTEM.Record_Status='INSERT' THEN
    IF :TRANZIT_ZADAJ.ID_SADZBY_TV_PRENOSOV IS NULL THEN
    :TRANZIT_ZADAJ.ID_SADZBY_TV_PRENOSOV:=:SADZBY_ZADAJ.ID;
    END IF;
    END IF;
    END;
    You can check Pre-... and Post-... triggers
    if there are any items being set to any values.
    I hope this will help you.
    Helena

  • Master-Detail Form - implementing some thing like Post-Query trigger

    Hi all,
    I am struggling to implement an eqivalent of a post-query trigger in Oracle Forms. Please bear with me as I am trying to explain in detail what the problem is.
    Here is my situation.
    I have three tables EMP, DEPT and LOCATION. I created a Master/Table pages on EMP and DEPT.
    Basic relationships.
    Each LOCATION has one or more DEPTs; Each DEPT is at one and only one LOCATION.
    Each DEPT has one ore more EMPs; Each EMP is assigned to only and only DEPT.
    Not getting too complicated, here are the table layouts:
    LOCATION:
    ID number(10,0) not null,
    NAME varchar2(20) not null
    DEPT
    ID number(10,0) not null,
    NAME varchar2(20) not null,
    LOC_ID number (10,0) not null foreign key from LOCATION
    EMP
    ID number(10,0) not null,
    NAME varchar2(20) not null,
    DEPT_ID number (10,0) not null foreign key from DEPT
    Assume I have all the constraints, BIU triggers, sequences defined properly.
    I am using the APEX page wizard to create a Master/Detail Form on DEPT and EMP. The first page is the Master Report on DEPT. I want to display the Location Name on this page also. Because the Master Report allows
    you to change the query, I was able to add the Location Name as part of the
    query. This was very simple.
    Select a.name "Department_Name",
    b.name "Location"
    from dept a, location b
    where a.loc_id = b.id
    Moving on, In the Master Detail Form, I would like to get the Location Name as part of the first Region (Dept Region).
    In this region, I would like to include the Location Name also. So my first region on the Master Detail form includes:
    Dept Id: ________
    Dept Name: _______
    Location Name: __________
    As Region are automatically populated using using a Fetch Row from EMP table (Automated Row Fetch) on an After Header process point, I don't have a way of including the Location as part of query. So I created a Region level Item called Location Name, made it Display only.
    In the old SQL*Forms, or Oracle Forms days, I used to use a Post-Query trigger, or Post-Change trigger to fire on the Loc_Id column to populate the Location Name. Simple fetch like:
    Select name
    into :P80_location_name
    from location
    where loc_id = :P80_loc_id
    However, I am struggling to implement some thing simple like this in APEX. Tried creating a processes, computatations etc, but nothing is working.
    I have seen some previous responses to fetching values from a foreign table
    using a button or AJAX script, but this should be very basic. What am I
    missing here?
    Appreciate any insights.
    Thanks.
    John

    Hi John,
    I'm not too familiar with the post-query triggers in Oracle Forms, but the use of a List of Values (LOV) on your LOCATION table might do the trick for you. If you create a dynamic LOV based on your LOCATIONS table, it can then be referenced by the LOC_ID item on the Master-Detail page, to display the Location Name. You could try doing the following:
    1. Create a new dynamic LOV, LOCATIONS, using a query similar to the following:
    select Name d, ID r
    from LOCATION
    order by 1
    2. Edit the "Create" button on the Master report page, and in the "Optional URL Redirect" section set "Request" to CREATE. Click Apply Changes, to save the setting.
    3. Edit the LOC_ID item on your Master-Detail page, and set the following:
    * in the "Name" region change the "Display As" setting to Select List
    * in the "Label" region change the Label to Location Name.
    * in the "List of Values" region set the "Named LOV" to LOCATIONS
    * in the "Read Only" section, set the condition to Request != Expression 1, and set Expression 1 to CREATE.
    Click Apply Changes to save the settings.
    When you run the pages now, the Location Name field will appear as Read-Only when editing a selected Master row. The item will appear as a Select List when the user clicks "Create" on the Master page, to create a new Master row.
    I hope this helps.
    Regards,
    Hilary

  • What's wrong with "Post-Change" anyway?

    Post-change has been fading out since Forms 4.5 (maybe earlier). We are now supposed to use "WHEN-VALIDATE_ITEM" AND "POST-QUERY" to do the same job.
    Our company uses Post-change a lot to complete description fields (example: "Unit Description" for the "UNIT_CODE" field on "SALE". When the user enters a new UNIT_CODE OR a UNIT_CODE is returned from a query, we use POST-CHANGE on UNIT_CODE to populate the (non-base table) UNIT_DESCRIPTION field). We have hundreds of occurrences like this in our application.
    Now Oracle want to make us use two triggers when one is perfectly sufficient for the job but is now being phased out. This means we will need to either duplicate the code ("select unit_descr into :sale.unit_description from unit where unit_code = :sale.unit_code;") in two triggers or create a separate function and call it from both triggers. Neither of these options sounds good to us.
    Can anyone explain why post-change is being phased out? Will it ever actually go? (It's still there in Forms 9i)
    Cheers,
    Tim.

    Tim,
    From what I remember (it's been a while since I've done any Forms) the Post-Change trigger doesn't fire if the Item is set to NULL.
    This is fine when getting data back from the server; non-database items are populated correctly, and NULL values don't trigger any form of action.
    But, if during data input the user sets and item to NULL the Post-Change trigger does not fire, and so doesn't clear out you non-database item, or do whatever else you wanted.
    If you have the opportunity I would recommend changing the code to use When-Validate-Item and Post-Query. As you say, you don't want to duplicate code, so you'll need some common functions.
    An approach that I favour is to create one package per database block, with one procedure per item, into which you can pass an "Event Name". eg: for the EMP block...
    Post-Query:  begin
        emp_pkg.latest_hire_date('POST-QUERY');
      end;When-Validate-Item:  begin
        emp_pkg.latest_hire_date('WHEN-VALIDATE-ITEM');
      end;emp_pkg Package:  package body emp_pkg
      is
        procedure latest_hire_date
          ( p_event in varchar2 )
        is
        begin
          if (p_event = 'POST-QUERY')
          then
          elsif (p_event = 'WHEN-VALIDA[i][pre]Long postings are being truncated to ~1 kB at this time.

  • Cannot use GO_ITEM, GO_BLOCK in POST-CHANGE

    It is quite difficult to control the flow if I cannot use GO_ITEM, GO_BLOCK in POST-CHANGE trigger, is there alternative way?

    This really is an old chestnut. In the days of character mode many people used to put such code in key-triggers, which meant large numbers of triggers, possible loopholes, and a nightmare when it came to conversion to mouse navigation.
    After using various methods in the past, I have now standardised on using a FORM-LEVEL WHEN-NEW-ITEM-INSTANCE trigger in all of my new forms. Although I originally did this because I wanted to highlight the current field, I have since found it very useful for doing other things. If I want to navigate as a result of WHEN-VALIDATE-WHATEVER I set a variable to the name of the item I want to go to (could use a global but I prefer packaged variables). The W-N-I-I trigger reads the variable and does the GO-ITEM (and of course nullifies the variable).
    I also agree with Steve, POST-CHANGE is oldy-fashioned and not really the right thing to use.

  • Sir how I avoid I this error FRM-40735: POST-QUERY trigger raised unhandled

    Hi master
    Sir this error crate may problem for me
    FRM-40735: POST-QUERY trigger raised unhandled exception ORA-01403
    sir how I avoid I this error and show my message
    or system not show this error and bypass this error
    please send me code how I avoid this error
    thanks
    aamir

    There may be many causes of this error. You better diagnose and remove them.
    1- A field length may be less than what your query return a data into it.
    2- A POST-CHANGE trigger on any data may return un-desired data (character into numrice field, longer value than a field etc).
    likewise.
    Regards
    Sayeed
    [email protected]

  • Transfer Order auto create for Posting Change not working

    Hello Gurus -
    When we release an inspection lot from "Q" status, it creates a posting change notice, and we have it configured to create a TO in the background to the same bin, and auto confirm.  The desired and intended result is to take something from "Q" status to unrestricted status, while keeping it in the same bin - and avoiding the user having to deal with the transfer orders.  Essentially it is seamless and all in the background, the user just sees that he has changed something from quality status to unrestricted.
    It works fine when the entire quantity is selected for the usage decision, but when a partial usage decision is made, the transfer order does not create - and requires processing in LU04 for the posting change.
    Why would this work for an entire qty, but not work for a partial qty - and simply require someone to go in to LU04 and hit "create transfer order" - with no additional information?
    Any help would be most appreciated.  Does it have something to do with a setting of quants?

    Hi,
    In case of a usage decision for a partial quantity, it is not possible to create the Transfer Order for the generated posting change notice automatically. This is only possible when the full quantity is released. The same happens if you release a partial quantity and post the rest to blocked stock or scrap. The reason is, there needs to be a user decision, which part of the quantity has to be posted, this is necessary for example when the quantity is distributed in the warehouse over many storage bins. But even if the full quantity is on one storage bin, there is no automatic TO creation. You can see this also in the online
    processing (LT05), in case of partial quantities you have to enter the selected quantity in the quant list, for a full posting this is not necessary.
    Hope this helps,
    Sinéad Curran

Maybe you are looking for

  • Using a java program to fill in forms using information from a spreadsheet

    I had an idea to "automate" some data entry at work and need to know if my idea is feasible with Java. Here is the back story: I work on a research project and we have all of our contact data in an Excel spreadsheet (I know access may be better for t

  • Motion Blur help.

    Alrighty, I'm using Photoshop CS4 Extended, and I'm having troubles with motion blur. When I set the angle to anything above 60 really and distance to about 300 it crashes saying Adobe Photoshop CS4 has encountered a problem and needs to close. This

  • What is the proper way to include search terms in your page

    Say you have a web page that is about a certain topic and has information displayed on the page.  What is the proper way to include terms that you would like this page to show up on a search for but don't necessarily want to display on the page? I di

  • Auto resolve alert - Polling interval

    Hi, When service is stopped, alert is generated but once i restart the service alert gets auto-resolved within a minute. When alert is generated if database size is full, once we increase the size it will take more than an hour for alert to get auto-

  • Trying to download a trial of Photoshop Elements but can't download Air

    My husband has suggested getting a better photo editing software and I saw Photoshop Elements and thought about buying it.  I see that you are able to download a trial version but I don't have AIR.   When I go to download it it just keeps opening up