Handling two blocks in a canvas

I have two block namely "emp" and "dept" and I want to execute query in each block on a single button click.
when the cursor is in "emp" table then the "emp" data should be display and vice versa.

Hi
I want to execute query in each block on a single button click.1. The good approach is to create a relation between the two block ...
2.Then in WHEN-BUTTON-PRESSED Trigger pls use
GO_BLOCK('dept');
EXECUTE_QUERY;The relation will fetch the employees according to their related department they hired within the company.
Hope this helps...
Regards,
Ammatu Allah.

Similar Messages

  • Opening two blocks at a time

    hi i am yugandhar!
    i just wanted to know whether i can open two blocks at a time if
    they are on different canvass

    yes, you can do..But one canvas should be stacked canvas..because you can't display two content canvases at the same time..other wise you can place items belongs to different blocks on one canvas..
    Suresh

  • Is-it normal to face situation where the "Reference Handler" is blocked?

    Hi all,
    I would like to know if it can be a normal behavior to have the "Reference Handler" thread from the class java.lang.ref.Reference in BLOCKED state in my thread dump (generated from visualvm) as you can see below.
    "http-0.0.0.0-8080-56" - Thread t@578
       java.lang.Thread.State: RUNNABLE
    at org.apache.lucene.index.TermBuffer.toTerm(TermBuffer.java:122)
    at org.apache.lucene.index.SegmentTermEnum.term(SegmentTermEnum.java:167)
    at org.apache.lucene.index.SegmentMergeInfo.next(SegmentMergeInfo.java:66)
    at org.apache.lucene.index.MultiSegmentReader$MultiTermEnum.next(MultiSegmentReader.java:494)
    at org.apache.lucene.index.SegmentMergeInfo.next(SegmentMergeInfo.java:65)
    at org.apache.lucene.index.MultiSegmentReader$MultiTermEnum.next(MultiSegmentReader.java:494)
    at org.apache.lucene.search.FilteredTermEnum.next(FilteredTermEnum.java:67)
    at org.apache.lucene.search.FilteredTermEnum.setEnum(FilteredTermEnum.java:49)
    at org.apache.lucene.search.FuzzyTermEnum.<init>(FuzzyTermEnum.java:127)
    at org.apache.lucene.search.FuzzyQuery.getEnum(FuzzyQuery.java:100)
    at org.apache.lucene.search.FuzzyQuery.rewrite(FuzzyQuery.java:104)
    at org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:383)
    at org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:368)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.exoplatform.services.security.web.SetCurrentIdentityFilter.doFilter(SetCurrentIdentityFilter.java:90)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.exoplatform.portal.application.localization.LocalizationFilter.doFilter(LocalizationFilter.java:179)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.exoplatform.web.login.ClusteredSSOFilter.doFilter(ClusteredSSOFilter.java:62)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.exoplatform.container.web.PortalContainerFilter.doFilter(PortalContainerFilter.java:69)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
    at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:402)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
    at java.lang.Thread.run(Thread.java:662)
       JNI locked monitors:
    - locked <5258ed3e> (a java.lang.ref.Reference$Lock)
       Locked ownable synchronizers:
    - None
    "Reference Handler" - Thread t@2
       java.lang.Thread.State: BLOCKED
    at java.lang.Object.wait(Native Method)
    - waiting on <5258ed3e> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:485)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
       Locked ownable synchronizers:
    - NoneAs you can see in my thread dump the object "java.lang.ref.Reference$Lock" is locked by a common thread which has for consequences to annoy a lot the GC and to freeze the whole application. Regarding the code (http://kickjava.com/src/java/lang/ref/Reference.java.htm) since the class java.lang.ref.Reference$Lock is private and the field "lock" is also (static) private, I was wondering if it is normal that this field can be locked by a common thread and if so can you tell me why and how (by reflection I assume like my example below)? Can it be a JVM Bug?
    This issue makes me realized that any Java application without a Security Manager installed can be easily frozen thanks to this simple code:
          // The thread that will steal the lock to the "Reference Handler" to block the GC and then the whole application
          new Thread("Reference$Lock Holder Thread")
             public void run()
                try
                   // Get the lock field by reflection
                   Field fieldLock = Reference.class.getDeclaredField("lock");
                   // Make it accessible
                   fieldLock.setAccessible(true);
                   // Get the static lock object
                   Object o = fieldLock.get(null);
                   Object mutex = new Object();
                   // Lock the lock object
                   synchronized (o)
                      // Wait forever
                      synchronized (mutex)
                         mutex.wait();
                catch (Exception e)
                   e.printStackTrace();
          }.start();
          // This is a simple code used to simulate normal object creation until the GC call
          for (int i = 1;;i++)
             new Object();
             if ((i % 1000) == 0)
                System.out.println(i);
          }NB: This issue has been occured on RHEL 5.3 et JVM Sun 1.6 u26 (64 bit)
    Thanks for helping,
    BR,
    Nicolas

    essobedo wrote:
    I did not understand that from the javadoc by "javadoc on that field" you mean this :
    /* Object used to synchronize with the garbage collector. The collector
    * must acquire this lock at the beginning of each collection cycle. It is
    * therefore critical that any code holding this lock complete as quickly
    * as possible, allocate no new objects, and avoid calling user code.
    So for you it is normal that the normal thread "http-0.0.0.0-8080-56" holds the lock expected by the "Reference Handler" and 20 other normal threads? If so do you have any idea why it works like this? Is-it how the GC works internally?if those threads are doing garbage collection work, then yes, they will be holding that lock (which is exactly what the javadoc says).

  • Using built-in function in the definition of relation between two blocks...

    Hi ,
    Is it possible to define a relation between two form blocks(db based) ....
    I have a master table such as:
    table : strdet (cols: ms varchar2(10) , det varchar2(10))
    materialized view : mv (cols : det varchar2(10) , sum_a number(5), sum_b number(5))
    and data:
    strdet
    ms                   det
    1                     1.1
    1                     1.2
    1.1                  1.1.1
    1.1                  1.1.2
    1.1.1               1.1.1.1
    e.t.c.
    and for the mv
    det               sum_a     sum_b
    1                   500        300
    1.1                100        200
    1.2                540        150
    e.t.c.
    I have tried some versions of relations so as to create a master-detail relation(in reality , the two blocks are connected via ms.det
    ->mv.det...  but the relation is one-to-one....) . I want a result such as:
    Master block
    1.1
    Detail Block
    1.1.1
    1.1.2
    e.t.c.Is it possible somehow...????
    Note: I use Dev6i and Dev10g ...
    Thanks ,,,
    Sim

    I think you'll have to use a from-clause-query for the detail block. If you join the master table and the mv on the DET column then you can give each row in the detail block a MS column (from the master table) which you can use in the relation.

  • Create relation between two blocks which are based on different procedure

    Hiii
    How to create relation between two blocks which are based on different stored procedures in Oracle form??
    Pradhyumn Sharma

    hiii,
    I selected the common key deptno in both procedure.
    I created a relation between both procedure. but when i compile the form it give an error in ON-CHECK-DELETE-MASTER. My procedure are
    ==================================
    PACKAGE emp_pkg AS
    TYPE emprec IS RECORD(
    empno asg_emp.empno%type,
    ename asg_emp.ename%type,
    job asg_emp.job%type,
    sal asg_emp.sal%type,
    deptno asg_emp.deptno%type);
    TYPE emptab IS TABLE OF emprec INDEX BY BINARY_INTEGER;
    PROCEDURE empquery(block_data IN OUT emptab, p_deptno IN NUMBER);
    end;
    ====================================
    PACKAGE dept_rec IS
    type rec is record(dname asg_dept.dname%type,
         loc     asg_dept.loc%type,
         deptno asg_dept.deptno%type);
    type deptrec is table of rec index by binary_integer;
    PROCEDURE dept_rec1(block1 in out deptrec);
    END;
    ===================================
    In ON-CHECK-DELETE-MASTER
    CURSOR BLOCK9_cur IS
    SELECT 1 FROM dept_rec.dept_rec1 d
    WHERE d.DEPTNO = :BLOCK6.DEPTNO;
    identifier dept_rec.dept_rec1 must be declared.
    Regards
    Pradhyumn

  • Best way to coordinate two blocks?

    I want to coordinate two blocks. Block A shows info about people who have come in recently. Block B shows if they
    have had some certain paperwork filed.
    So for each record in block A there may or may not be an entry in Block B. I want the data to match up horizontally
    from block A through Block B.
    (and then eventually when the user clicks on button a missing record in block B it will fill in the details from various places in the database and the new entry(ies) in Block B can be saved back to Table B. )
    It escapes me how to do this. Any ideas? If B is a detail table to block A then it does not provide blank records
    where B does not have an entry for A yet.
    example
    block A           Block B
    id  came in        id  paperwork
    22 2/1/2012     22  paperwork done
      3 2/2/2012                                   (paperwork not done yet so B record missing)
    14 2/3/2012     14 paperwork done
    11 2/4/2012                                    (paperwork not done yet so B record missing)Edited by: lake on Feb 16, 2012 4:45 PM

    No it doesn't work to just have two blocks side by side.
    There is no way to coordinate them. In my experience with the master-detail relationship you can define, it does not have multi block to multi
    block capability. it's geared to one master key in the master block, not multiple master keys. But it would be a really great feature if
    there were a multi-master-detail capability! right?
    If you don't do the relationship thing but have the same type of query restrictions for each block, in block B there are no gaps for the cases
    a B record does not exist for an A record, i.e. the primary keys do not line up "horizontally".
    Although I think Andreas is correct that creating a view solves a lot of problems I'd like
    to proceed on emulating the multi-master-detail scenario if I can in the form.

  • Handling two transactions in session method at a time

    Hi frnds
    now im facing problem in handling two transactions in session method fs00,fspo
    at a time.
    i want some info.on how to handle two transactions at a time
    thanx

    Use the function module in the following sequence.
    BDC_OPEN_GROUP.
    BDC_INSERT. " for the first TCODE
    BDC_INSERT. "  for the second TCODE
    BDC_CLOSE_GROUP.
    This will solve your problem.
    Reward if helpfull.
    Thanks and regards,
    Veerendranath Maddula.

  • Questions on handling two table controls on one screen.

    Can some people  please share some technology  tips on handling two table controls on one screen . 
    Thanks
    Moderator message - You'll find some cool tips if you search the forum or use Google first - post locked
    Edited by: Rob Burbank on Dec 7, 2009 11:20 AM

    hi
    other Table is in Disable mode.
    check that u have unticked the READ ONLY property of ur UI
    also check if u have binded the ENABLE property of ur table UI to WDY_BOOLEAN in some method
    and u r setting it to 'X'
    in the OnToggle event of ur Checkbox , set this attribute to 'X to make the checkbox ticked
    in the OnToggle event of ur Checkbox , set this attribute to ' ' to make the checkbox un ticked
    DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
        DATA ls_cn_node TYPE wd_this->element_cn_node .
        DATA lv_attr  LIKE ls_city-ca_attr.
    *   navigate from <CONTEXT> to <CN_VISIBLE> via lead selection
        lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_ca_attr).
    *   get element via lead selection
        lo_el_cn_node = lo_nd_cn_node->get_element(  ).
    *   set single attribute
        lo_el_cn_node->set_attribute(
          EXPORTING
            name =  `CA_ATTR`
            value = ' ' ).
    // set attribute CA_ATTR under CN_NODE to ' '
    // this will make the table UI control disabled
    // this is a code generated thru code wizard ( control +f7) , read context node/attribute
    // use SET_ATTRIBUTE method
    regards,
    amit

  • How can i update two block that they data source is same table .

    i design user interface .
    there are tow block ,they datasource is same table but differe field .
    when i input a record ,i must input tow block ,then commit . for this .the total record is save in database .
    how can i write those code .

    Trying to hide your identity?
    Why do you have two separate blocks here if there are different fields in each. The feilds in a block can be spread over multiple canvases / windows so layout is not a reason.
    If you are in a situation where two blocks are displaying the same record for update them you'll have the potential of data consistancy problems as well.
    So explain what you're trying to do with the two separate blocks and maybe we can come up with a better way to implement it.

  • Detail blocks with TAB canvas

    I have master detail block but i want detail block on tab canvas how can i achieve it?
    Khurram

    create on the main window (with a content canvas) a
    tab canvas.Thanx gerd i did the same and diffrent detail blocks on diffrent tab canvases,but problem is that the moment i enlarge the tab canvas at design time and execute the form the tab canvase is invisible why?
    Khurram

  • How to create an relation between two block

    Oracle forms 6i
    Hai All
    I have created a form in that i have four button ADD, QUERY, SAVE ,EXIT.
    I have two block named Leader and members.
    Four fields in leader block namely name , codeno, deptcode, unitid.
    When i pressed query button and the cursor goes to name field in leader when i enter the name of leader and click
    enter i gives the codeno, deptcode and unitid of the leader_name.
    so now i have created another block in tabular structure to bring the members in the same deptcode that belongs to Leader_name.
    So pls tell me the steps how to create the relation between these two blocks.
    when i enter the leader_name and gives enter it needs to bring the codeno, deptcode, unitid and
    I also need to gives the members in that deptcode..
    Thanks In Advance
    Srikkanth.M

    If it is possible to create relationship with one table No.
    Or
    I have created a pre-Query in the detali block and my code is
    set_block_property ('block_name', default_where, 'deptcode = (select deptcode from emplmaster where name like :block_in_which_leader_name.leader_name_field');BTW no need of joining here it can be solve by set the block's where clause as u said in ur earlier post above. Just changing the little bit this statement and then try.
    If numeric
    set_block_property ('block_name', default_where, 'deptcode = '||:block_in_which_leader_name.leader_name_field);
    Otherwire
    set_block_property ('block_name', default_where, 'deptcode = '''||:block_in_which_leader_name.leader_name_field||'''');-Ammad

  • T61 with Docking Station: can it handle two 21" external Monitors?

    Hi
    I would like to know if somebody knows if the T61 laptop grafic card can handle two 21" monitors attached at the docking station. Our internal IT guys are confirming two 19" are fine, but they do not know about two 21".
    thanks
    GC

    If I remember correctly, you have the Intel-graphics-chip, and the docking/chip-combo does not support the dual-monitor setup via both VGA + DVI. You should be able to get image on the laptop-screen and the DVI output, I think?
    IT-technician, running my own company in Bergen, Norway
    Thinkpad T61, 8895CTO C2D 2Ghz/4GB/120GB SSD/1400x1050

  • I have a scenario like i have two blocks in my report

    I have a scenario like i have two blocks in my report.In Block 1 I have drill on Region.
    Block 1:
    Region Revenue
    APAC 2000000$
    EU 1200000$
    NA 1500000$
    Block2:
    Country Revenue
    India 6000$
    China 4000$
    USA 8000$
    Germany 6000$
    Now my requirement is when ever user click on on any region in block1
    corresponding countries should appear in Block2.
    SCN Moderator: Title was too long (maxed out: no replies possible)

    You can use Element link to have the desired results:
    Here is the initial layout:
    After applying Element Link, if you click on California, you will see this:
    If you click on Colorado, you will see this:
    Hope this helps.

  • Attach two blocks

    Hello
     I am new to LabView, I would like to link this two blocks but I don't know how,  I am controlling a DC motor and I want to change the direction of rotation each time the counter detects pulses which 304 631 are issued by the motor encoder. I thought of a toggle but now I can not join them.
     I leave the program for review
    Thanks I hope your comments ....
    Attachments:
    ani PWM.vi ‏206 KB
    Bloques.GIF ‏6 KB

    The problem is the dynamic data type (blue wire) caused by using all of those express VI's.
    You need to convert the blue wire to a scalar data value using the From DDT express VI right before you compare it to the 304361.  Then the result of the comparison will be a boolean (rather than another blue DDT) which will then wire up nicely to the stop terminal.
    Attachments:
    ani%20PWM[1]_BD.png ‏57 KB

  • SSIS to handle two lined Excel header

    Hi,
    I am querying excel header values in SSIS to checked if the column headers are matching with that of the table field names. Here now, i am facing an issue, like, one of the column header is having two lines as shown below
    So when querying the value comes with two lines only. Because of this the validation is failing. Is there a way to handle two lined column header of Excel while in SSIS? please share your experience which can help me how to fix this issue - Thank you!
    --------------------------- Radhai Krish | Golden Age is no more far | --------------------------

    What comes back as two lines you want to make one, it that right? So the line content before the line break is what you need is that right?
    I guess then you need to see if you can capture that character that separated the lines.
    Arthur
    MyBlog
    Twitter

Maybe you are looking for