Parent TaskFlow Refresh

Hi,
I have a parent task flow ..... It has the following activities.
>MethodCall - Default Activity
>PageFragment - Lists data in the form of table
>Child Task Flow - will be opened as a dialog
Flow -> This parent task flow is being used as a region in a jspx page and whenever we hit the jspx page... initally, the method call will executed and the control will be forwarded to pagefragment. This pagefragment lists data in a table. Now if the user wants add a new row to this table, user clicks on the ADD button available on the page fragment.
Now, the control will be forwarded to CHILD TASKFLOW and the child taskflow will be opned as a Dialog.
Child Task Flow has the following activities.
>jspx page - dafult activity - Using this page user can enter the data. This data needs to collected and needs to be added to the table on the pagefragment of Parent TaskFlow.
>Method Call - This is the same activity which we used in the parent task flow as default activity.
>Return Activity
Now, my question is ... im able to enter the data in the dialog and able to collect the data at the backend. But unable to refresh the table on the parent taskflow to list this new record.
Let me know how can we achieve this.
Thanks & Regards,
Kiran Konjeti

Adding ReturnListener to the command link in the table column to partial trigger the table resolved the issue.
In the PageFragment, from where we are calling the child task flow .... which should get opened as Dialog, Inline popup :
==========================================================================
<af:table value="#{bindings.BorrowerHistoryView.collectionModel}"
var="row" rows="#{bindings.BorrowerHistoryView.rangeSize}"
summary="History table."
emptyText="#{bindings.BorrowerHistoryView.viewable ? 'No history records found.' : 'Access Denied.'}"
fetchSize="#{bindings.BorrowerHistoryView.rangeSize}"
autoHeightRows="10"
rowBandingInterval="0" id="t1"
partialTriggers="::socHistoryType d1Delete ::cbAdd"
contentDelivery="immediate"
styleClass="AFStretchWidth"
columnStretching="column:colComment"
*binding="#{pageFlowScope.borrowerHistoryMB.historyTable}">*
<af:column sortProperty="historyId" sortable="false" id="c3"
align="right" rowHeader="unstyled" headerText=" "
width="45">
<af:panelGroupLayout id="pgl15" layout="horizontal">
<af:commandImageLink action="editHistory"
immediate="true" id="clEdit"
visible="#{row.editable and (pageFlowScope.borrowerHistoryMB.userId eq row.sourceId)}"
shortDesc="Click to edit this comment."
icon="/images/edit.png"
useWindow="true" windowHeight="300"
windowWidth="500"
>*returnListener="#{pageFlowScope.borrowerHistoryMB.refreshTableData}">*
In the Managed Bean
=============
public void refreshTableData(ReturnEvent returnEvent) {
AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
adfFacesContext.addPartialTarget(getHistoryTable());
public void setHistoryTable(RichTable historyTable) {
this.historyTable = historyTable;
public RichTable getHistoryTable() {
return historyTable;
Regards,
KiranKonjeti

Similar Messages

  • Executing Child Taskflow Method from parent taskflow page

    Hi All,
    I have one issue with checking dirty data form Parent Taskflow button to check dirty data update in Child Taskflow page's view Object.
    JDev version: 11.1.1.3
    Scenario :
    Outer Container page has back button which need to check wherethere child taskflow has dirty data update or not. Child Taskflow transaction is always create new transaction and non-shared. But from ControllerContext, the root am service still associated with other viewobjects i.e. is loaded in others tabs in that outer container page, which is also checking dirty data from another tabs' viewobject dirty data checking (I need to avoid this issue that's why not working for me with controller context). I am thining to execute the child taskflow method from parent page on back button to check dirty data update for that tabs' page only. For it, how can we get access child taskflow method from parent page with static region taskflow. Is there any solution to implement like this? thank you so much.
    - Robin

    Hi,
    this should work:
    1. child task flow has input parameter "parentBean" defined.
    2. The child task flow has a managed bean "ChildBean" defined in pageFlowScope with a property "parentBean" with setter/getter.
    3. the parentBean input parameter references (in its value roperty) #{pageFlowScope.childBean.parentBean}
    4. The parent bean is configured on the parent view task flow (viewScope) and passed as a task flow binding input parameter. The parent bean has a boolean property "childFlowTransactionDirty"
    This allows the child bean to invoke the parent bean childFlowTransactionDirty to tell it that the transaction is dirty. On the parent view, you would just check the parentBean state for this property.
    Next is how you set the value on the parentBean from the childTaskFlow. One option is to use a RegionController on the PageDef file of ADF bound views in the child task flow.
    public class MyRegionController implements RegionController {
        public MyRegionController(){
        public boolean refreshRegion(RegionContext regionContext) {      
         int refreshFlag = regionContext.getRefreshFlag();
          //get access to the ChildBean and its parentBean property. Then call
          //ControllerContext .... to check the transaction state
          //update the childFlowTransactionDirty property
          ((DCBindingContainer)regionContext.getRegionBinding()).refresh(refreshFlag);
          return true;
        @Override
        public boolean validateRegion(RegionContext regionContext) {
            regionContext.getRegionBinding().validate();
            return false;
        public boolean isRegionViewable(RegionContext regionContext) {
            return regionContext.getRegionBinding().isViewable();
        @Override
        public String getName() {
            return this.getClass().toString();
    }Next: When users press the back button in the parent view, you call the ParentView bean childFlowTransactionDirty to check the child task flow transaction to be dirty or not
    Frank

  • Parent TaskFlow doesnt get control back if child taskflow is closed in IE

    Hi,
    We have a bounded taskflow , which internally calls a child taskflow in a new window. The problem is if we close the child taskflow window before it renders completely it doesn't pass the control back to the parent taskflow. After that parent window is unusable and we have to close it start it again.
    This issue is only seen in I.E (i am using 7.0) and chrome , it works fine in Firefox mozilla 3+
    Any idea what can be the issue here???

    Hi,
    I suggest to you create a test case and file a Service Request with customer support
    Frank

  • How to go back to parents taskflow without using taskflow return activity

    Hi all,
    How can i go back to parents taskflow without using taskflow return activity?
    With Regards,
    Wai Phyo

    Hi,
    when you enter a sub flow, the parent flow is put on a stack for later resume. You ecit a bounded task flow that you called using task flow call activity by exiting the task flow (return activity). There is no other option to return to the parent flow. If the bounded task flow executes as a region, then you use a parent activity to navigate the enclosing flow, or the root flow. However, regions seldom use return activities anyway.
    Hope this answers your question
    Frank

  • RI - What if Parent is refreshed - What happens to the constraints

    Hello
    I have a parent-child scenario. What happens if the parent table is completely refreshed? What happens to the child table (that has cascade delete)?
    If RI exists, will a complete refresh of parent be possible?
    What is the best way to handle this scenario?
    Thx!

    One of the quickest ways of identifying duplicate records in a table is to enable a unique (or primary key) constraint knowing ahead of time that it will choke on the duplicates, but using the EXCEPTIONS INTO EXCEPTIONS clause which will cause the rowids of the duplicates to be written into an EXCEPTIONS table (created ahead of time with the rdbms\admin\utlexcpt.sql script, for example).
    Therefore, imagine a million row table into which a fresh bulk load of another million rows from some external source is to be performed.
    You declare the constraint, you disable it, you perform the load, you enable it exceptions into exceptions. You now can clear out the duplicate data quite easily, and then enable the constraint normally. Next load, you disable the constraint all over again and repeat the process.
    That's one reason you might want to repeatedly disable/enable a constraint.
    Consider another: a unique or primary key constraint, by default, when created, will cause a unique index to be created on the table. Doing any sort of bulk load into a table, even of data you know to be 'clean' of duplicates, will be a lot slower as a result of each insert having to update the index. Therefore, one of the things you commonly do to speed up bulk loads is to disable constraints, therefore removing any associated unique indexes, and therefore saving the time that would normally be spent validating data and updating indexes.
    In the old days before they invented deferrable constraints, too, you might well be engaged in a complex data loading process that involves quite a few steps before finishing. If looked at during those steps, you'd say the data violated constraints... but if you just let me get to the end, you'll find that the data all comes good. So you had to be able to disable constraint checking at the start of the process, and re-enable it at the end. A good example of that is Scott's EMP table: it has a manager column and the data in that column refers to the EMPNO column. A manager has to be an employee, after all! So there's a self-referencing foreign key on that MGR column, which means you can't load a record containing a manager number that isn't already an employee. But if you were doing a bulk load of data into that table, starting with it completely empty, that would mean you'd never be able to load any data into it at all: no employees exist to begin with, so there are no managers, so the first employee record that mentions a manager gets rejected. But if only you'd let me do the initial load of data, you'd see that every manager mentioned DOES turn out to be an employee! At the end of the load, it all comes good, and everything is properly related to everything else.
    Short of being very careful about the order in which you load such data (presumably, you'd have to start with Mr King, who runs the company, then deal with the first lot of managers, and then you could load the clerks and salesmen), the simplest way of resolving that sort of Catch-22 is to disable the constraint, do the load, and then enable the constraint when all the data is in place and therefore all the relationships between records have come good.
    (As I say, since version 8.0 of Oracle, you can also defer the constraint so that it only gets checked at the point you commit all the data, but leaving that subtlety aside, it's still a classic example of where switching constraint checking on and off proves very useful).

  • Problem Binding Parent Taskflow's Bean with Included Page's UI component

    Hi,
    I am using JDev 11.1.1.5.
    I would like to ask *2* things:
    Number 1
    I have a Parent page (parentPage.jsff) which is inside the taskflow (parentTaskFlow). parentTaskFlow has a managed bean (ParentBean.java) with BackingBean Scope.
    Inside the parentPage.jsff, a child page (childPage.jsff) is included using Dynamic Declarative Component. +*<af:declarativeComponent viewId="/childFragments/childPage.jsff" id="dc1"/>*+
    When I tried to bind a ui component from childPage.jsff to ParentBean, it is returning null for this component.
    Could you please help me with this issue? Thanks.
    Number 2
    The other important thing that I want to know is that when a page fragment (jsff) is included with Dynamic Declarative Component, Is the PageDef of that page fragment is the same as that of parent page or not? Please explain me about this also.
    Thanks & Regards,
    cmoster

    Hi Frank,
    Thanks for your explanation.
    For Number 1
    I will explain you the problem in detail:
    As I mentioned in my previous post, I tried to bind a ui component from childPage.jsff to ParentBean.
    In parentPage.jsff, there is a commandButton whose actionListener is bound to backing bean method. And inside this actionListener method, the binding for ui component is Null. That's the problem I'm facing. When I debug, the setter of the ui component is run. But in actionListener method, it returns null.
    I made another test. In childPage.jsff, there is a commandButton whose actionListener is bound to backing bean method. But inside this actionListener method, the binding for ui component is NOT Null.
    Can you help me with this issue? Thanks a lot.
    Best Regards,
    cmoster

  • How to get Top most parent Taskflow Id at runtime?

    Hi,
    I am working on a portal site and I need to get the parent Id of the current taskflow at runtime.
    Following is the code through which I get the current taskflow Id.
    ControllerContext cctx = ControllerContext.getInstance();
    ViewPortContext currentViewPort = cctx.getCurrentViewPort();
    TaskFlowContext taskFlowCtx = currentViewPort.getTaskFlowContext();
    TaskFlowId taskFlowId = taskFlowCtx.getTaskFlowId();
    String taskFlowName = taskFlowId.getFullyQualifiedName();
    But How can I get the parent Id if this taskflow is embedded within some taskflow(s). I want to get the top most parent Id.
    Your help is appreciated.
    Thanks,
    Jaykishan

    Hi, i tried this code but i'am getting ClassCastException.
    ControllerContext cctx = ControllerContext.getInstance();
    ViewPortContext currentViewPort = cctx.getCurrentViewPort();
    ChildViewPortContextImpl c = (ChildViewPortContextImpl)currentViewPort; (get error here oracle.adfinternal.controller.state.RootViewPortContextImpl cannot be cast to oracle.adfinternal.controller.state.ChildViewPortContextImpl)
    Object pViewPort = c.getParentViewPort();
    ViewPortContext parentViewPort = (ViewPortContext)pViewPort;
    String parentTaskFlowId = parentViewPort.getTaskFlowContext().getTaskFlowId().toString();
    how did you manage to make work ?

  • How to Refresh or TaskFlow from pageFragment button?

    Hello im using Jdev 11.1.1.3.0, and i have a task flow with a managed bean with pageFlow scope, this managed bean defines a lot of parameters for my page framents that are on my task flow. I need a custom on this bean to programatically refresh the task flow or re-enter to the task flow.
    Any idea?

    Hi,
    I am a newbie in taskflow development world.
    Having gone through the above answer, I am not sure on how it fits in my problem domain. I created a taskflow with few iinput parameter to it. Actually it's a polling application that displays a poll on the basis of poll id provided by user through taskflow input parameter. A new requirement came up to show a list of polls and user may click on a poll from the list and that poll should get displayed.
    I have done the showing list of poll part, but when user clicks on a particular poll, even though I am setting the poll ID of the selected poll to the appropriate parameter, it's not being taken. While doing some R&D on this, I found there are two attributes called Refresh and RefreshCondition for taskflow refreshing. Initially the value of Refresh was set to 'always' which I modified to 'ifNeeded' and 'deferred', one at a time and it did not work. I have also tried binding a boolean variable to 'RefreshCondition' attribute, but while debugging, I have found, that the boolean variable is read only once while the taskflow is getting initiated, no matter what the value of 'Refresh' is.
    I did not get much time to explore the meaning and applicability of 'Refresh' and 'RefreshCondition' attributes, but have a feeling that these are the ones that I have to tweak a little to get my work done. Can someone please help me on this?
    Thank you,
    Kanchan Upadhyay

  • Refresh fragments

    I have quite a bit of trouble refreshing fragments that are used as regions on pages.
    i have 2 use cases:
    1. 2 or more fragments that are on the same jsff page, one of them holds an overview of the data in the database and the rest is used to change it. How do i refresh the overview region when the data change?
    2. a fragment is used by being imported as a jar to another workspace and then dropped as a region on a jsff. How do i from another fragment or page in this new workspace refresh it.
    Hopefully there is a solution i can use for both cases.
    Any ideas?
    TIA

    Hi,
    your question falls into the category of region interaction. Here are your choices
    Option 1. The task flows use a shared Datacontrol setting. In this case a PPR of a dependent region shows the data change
    Opion 2. Task flows cannot use PPR directly (e.g. the fragments are in sibling regions) : In this case you can work with bean dependency injection: Create a managed bean in viewScope in the parent task flow definition. Pass a reference to the managed bean to the task flows as input parameters (both task flows will need to have a input parameter defined that takes a reference to this bean and safes it in a task fow page flow scope bean). This way both regions can call out o the parent taskflow, which now has control to refresh (PPR) a dependent region.
    read: http://one-size-doesnt-fit-all.blogspot.co.uk/2010/09/master-child-btf-chaperone-contextual.html
    Option 3. Contextual events: See http://docs.oracle.com/cd/E23943_01/web.1111/b31974/web_adv.htm#CACJBFGI
    Frank

  • Opening TaskFlow as Popup

    Hi All,
    For Opening the task flow as popup. I have created 2 taksflows wiith one as .jsff and another one as .jspx.but for opening as a dialog it is accepting only .jspx but as per my requirment i need .jsff that is in bounded Task flow with page fragment.....Jdeveloper is not allowing me to create.kindly suggest why it is protesting and how can it be acheived.
    I am using Jdev 11.1.2.0
    plz kindly suggest a sol.
    I have seen this thread but no replys.....It may be usful for both the threads
    TaskFlow Region as a Pop Up inside another TaskFlow Region
    Regrads
    Peter

    Hi Frank,
    I am looking for a solution to develop a popup as a template or component in ADF since our app uses lots of popups. I try to build own buttons, like SAVE, APPLY, and CANCEL buttons.
    I have listened to many of your video and code corners. The following video shows the java controlled popup. It invokes a page fragment in the popup. The questionis : can this method used to popup a taskflow ?
    http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/ADF_Insider_Essentials/AdfFacesDialogOkCancelHandling/AdfFacesDialogOkCancelHandling.html
    I have two task flows, popup-parent-taskflow.xml and popup-taskflow.xml.
    The managed bean in popup-parent-taskflow.xml binds to the popup and table. The managedBean is in the Request scope
    The managed bean defined in the popup-taskflow.xml can't access to the popup and table. How is the table get refreshed ?
    "There is a pattern that explains how to do similar with Page Fragments, but honestly this is quite a lot of coding and doesn't allow your task flow to decoratively return values."
    Could you explain this statement ? Is this example you talked about ?
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/39-taskflow-in-popup-169181.pdf
    I would appreciate if you could suggest a best way to do popup for my case and provide the example for it.
    Thank you !
    David

  • Passing values from javascript in pop up window to parent jsp

    Hi
    I am trying to pass values from a pop up window to the main window that popped this child window , with the idea to have the parent window refresh itself with value from pop up window.But the values are not going through.I do a request on the hidden variable but when the parent
    jsp refreshes , the variable is still null...
    The following is the code i have .
    Parent jsp:a.jsp
    <form name='summary'>
    <input type=hidden name=customerid value="">
    <input type="button" class="textButton" name="action" value="customerlist" onClick="javascript:openWin('b.jsp','800','350')">
    <script>
    function openWin(loc, w, h) {
    var newWin = window.openloc,"HTML",'dependent=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=' + w + ',height=' + h);
    newWin.window.focus();
    </SCRIPT>
    <%
    String optionVal = request.getParameter("customerid");%>
    var user = "<%= optionVal%>";
    </form>
    child jsp- b.jsp (pop up window)
    <script>
    function closer(){
    var val = document.formname.id.selected.value;
    window.opener.document.summary.customerid.value = val;
    window.opener.location.reload();
    </script>
    <form name = formname>
    <input type="text" name="id" value = ''>
    <input type="button" class="textButton" value="select"
    onClick="closer();window.close();">
    </form>
    Any ideas on what i am missing
    Thanks
    Arn

    use window.opener.document.forms[0].filedname.value = 'value u need to set'

  • CascadeType.REFRESH does not work? (EJB3, Jdeveloper 10.1.3.0.4)

    Hi,
    We have requirement to at least for some entity bans be able to pick external changes to the database records from the appserver. This is why in 1:M relationships we need to be able to see deleted/added/changed children records for arbitrary parent record.
    For some reason, it does not look like CascadeType.REFRESH annotation works as it should (also tried CascadeType.ALL).
    Can anyone please shed some light on this (i.e whether this is a bug or something we do wrong here).
    Steps to reproduce (full code also provided):
    0.
    create table op_testchild
    chld_id NUMBER(12,0) PRIMARY KEY ,
    chld_par_ref NUMBER(12,0) NOT NULL,
    chld_name VARCHAR2(32) NOT NULL
    create table op_testparent
    par_id NUMBER(12,0) PRIMARY KEY ,
    par_name VARCHAR2(32) NOT NULL
    ALTER TABLE NECMS.op_testchild
    ADD CONSTRAINT FK_op_testchild_1
    FOREIGN KEY (chld_par_ref)
    REFERENCES NECMS.op_testparent(par_id);
    1. Generate entity beans from the two tables.
    Then configure parent bean to aggresively fetch children records:
    @OneToMany(mappedBy="opTestparent" , cascade =
    { CascadeType.REFRESH }, fetch=FetchType.EAGER)
    public Collection<OpTestchild> getOpTestchildCollection()
    return this.opTestchildCollection;
    2.
    Define Session Bean with following two methods (so that both insist on refresh of parent, and cascade to parent hopefully):
    /** <code>select object(o) from OpTestparent o</code> */
    public List<OpTestparent> findAllOpTestparent()
    Query q = em.createNamedQuery("findAllOpTestparent");
    q.setHint("refresh", Boolean.TRUE);
    return q.getResultList();
    /** <code>select object(o) from OpTestparent o</code> */
    public OpTestparent findOpTestparent(Long id)
    OpTestparent parent = em.find(OpTestparent.class, id);
    em.refresh(parent);
    em.refresh(parent);
    return parent;
    2.
    Make some changes to selected tables outside appserver.
    What actually is observed during client invocation is this:
    //In this case external changes to parent record are visible, adds/deletes of children records are visible, but changes to existing records never are:
    List<OpTestparent> parents = sessionEJB.findAllOpTestparent();
    for (OpTestparent p2: parents)
    System.out.println("->>parent: " + p2.getParName());
    List<OpTestchild> children2 =
    new ArrayList(p2.getOpTestchildCollection());
    for (OpTestchild c2: children2)
    System.out.println(c2.getChldName());
    //In this case external changes to parent record are visible, external adds/deletes of children records are visible, but changes to existing records are visible only after invoking findOpTestparent() second time around (?):
    OpTestparent p = sessionEJB.findOpTestparent(1L);
    System.out.println("->>parent: " + p.getParName());
    List<OpTestchild> children =
    new ArrayList(p.getOpTestchildCollection());
    for (OpTestchild c: children)
    System.out.println(c.getChldName());
    The simplest code that will demonstrate the problem:
    ///////////////////////////////////ENTITY 1
    package com.ht.model;
    import java.io.Serializable;
    import javax.persistence.CascadeType;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.JoinColumn;
    import javax.persistence.ManyToOne;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
    @Entity
    @NamedQuery(name="findAllOpTestchild", query="select object(o) from OpTestchild o")
    @Table(name="OP_TESTCHILD")
    public class OpTestchild
    implements Serializable
    private static final long serialVersionUID = 1L;
    private Long chldId;
    private String chldName;
    private OpTestparent opTestparent;
    public OpTestchild()
    @Id
    @Column(name="CHLD_ID", nullable=false)
    public Long getChldId()
    return chldId;
    public void setChldId(Long chldId)
    this.chldId = chldId;
    @Column(name="CHLD_NAME", nullable=false)
    public String getChldName()
    return chldName;
    public void setChldName(String chldName)
    this.chldName = chldName;
    @ManyToOne
    @JoinColumn(name="CHLD_PAR_REF", referencedColumnName="OP_TESTPARENT.PAR_ID")
    public OpTestparent getOpTestparent()
    return opTestparent;
    public void setOpTestparent(OpTestparent opTestparent)
    this.opTestparent = opTestparent;
    ///////////////////////////////////ENTITY 2
    package com.ht.model;
    import java.io.Serializable;
    import java.util.ArrayList;
    import java.util.Collection;
    import javax.persistence.CascadeType;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.FetchType;
    import javax.persistence.Id;
    import javax.persistence.NamedQuery;
    import javax.persistence.OneToMany;
    import javax.persistence.Table;
    @Entity
    @NamedQuery(name="findAllOpTestparent", query="select object(o) from OpTestparent o")
    @Table(name="OP_TESTPARENT")
    public class OpTestparent
    implements Serializable
    private static final long serialVersionUID = 1L;
    private Long parId;
    private String parName;
    private Collection<OpTestchild> opTestchildCollection;
    public OpTestparent()
    this.opTestchildCollection = new ArrayList<OpTestchild>();
    @Id
    @Column(name="PAR_ID", nullable=false)
    public Long getParId()
    return parId;
    public void setParId(Long parId)
    this.parId = parId;
    @Column(name="PAR_NAME", nullable=false)
    public String getParName()
    return parName;
    public void setParName(String parName)
    this.parName = parName;
    @OneToMany(mappedBy="opTestparent" , cascade =
    { CascadeType.REFRESH }, fetch=FetchType.EAGER)
    public Collection<OpTestchild> getOpTestchildCollection()
    return this.opTestchildCollection;
    public void setOpTestchildCollection(Collection<OpTestchild> opTestchildCollection)
    this.opTestchildCollection = opTestchildCollection;
    public OpTestchild addOpTestchild(OpTestchild opTestchild)
    getOpTestchildCollection().add(opTestchild);
    opTestchild.setOpTestparent(this);
    return opTestchild;
    public OpTestchild removeOpTestchild(OpTestchild opTestchild)
    getOpTestchildCollection().remove(opTestchild);
    opTestchild.setOpTestparent(null);
    return opTestchild;
    ///////////////////////////////////SESSION BEAN
    package com.ht.model;
    import java.util.List;
    import javax.annotation.Resource;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.Query;
    @Stateless(name="SessionEJB")
    public class SessionEJBBean
    implements SessionEJB, SessionEJBLocal
    @Resource
    private EntityManager em;
    public SessionEJBBean()
    public Object mergeEntity(Object entity)
    return em.merge(entity);
    public Object persistEntity(Object entity)
    em.persist(entity);
    return entity;
    public Object refreshEntity(Object entity)
    em.refresh(entity);
    return entity;
    public void removeEntity(Object entity)
    em.remove(em.merge(entity));
    /** <code>select object(o) from OpTestchild o</code> */
    public List<OpTestchild> findAllOpTestchild()
    return em.createNamedQuery("findAllOpTestchild").getResultList();
    /** <code>select object(o) from OpTestparent o</code> */
    public List<OpTestparent> findAllOpTestparent()
    Query q = em.createNamedQuery("findAllOpTestparent");
    q.setHint("refresh", Boolean.TRUE);
    return q.getResultList();
    /** <code>select object(o) from OpTestparent o</code> */
    public OpTestparent findOpTestparent(Long id)
    OpTestparent parent = em.find(OpTestparent.class, id);
    em.refresh(parent);
    return parent;
    ///////////////////////CLIENT
    package com.ht.model;
    import java.util.ArrayList;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import java.util.List;
    public class SessionEJBClient
    public static void main(String[] args)
    try
    final Context context = getInitialContext();
    SessionEJB sessionEJB = (SessionEJB) context.lookup("SessionEJB");
    OpTestparent p = sessionEJB.findOpTestparent(1L);
    System.out.println("->>parent: " + p.getParName());
    List<OpTestchild> children =
    new ArrayList(p.getOpTestchildCollection());
    for (OpTestchild c: children)
    System.out.println(c.getChldName());
    if (1 == 1)
    return;
    List<OpTestparent> parents = sessionEJB.findAllOpTestparent();
    for (OpTestparent p2: parents)
    System.out.println("->>parent: " + p2.getParName());
    List<OpTestchild> children2 =
    new ArrayList(p2.getOpTestchildCollection());
    for (OpTestchild c2: children2)
    System.out.println(c2.getChldName());
    catch (Exception ex)
    ex.printStackTrace();
    private static Context getInitialContext()
    throws NamingException
    // Get InitialContext for Embedded OC4J
    // The embedded server must be running for lookups to succeed.
    return new InitialContext();
    }

    I use the JDK delivered with JDeveloper which is JDK 1.5.0_06
    if I run [jdev-root]\jdev\bin\jdev.exe, I get some error messages in the console window when I'm doing the do to declaration function. I receive a lot of
    at oracle.ide.net.URLFileSystemHelper.openInputStream(URLFileSystemHelper.java:993)
    at oracle.ide.net.URLFileSystem.openInputStream(URLFileSystem.java:1164)
    at oracle.ide.net.IdeURLConnection.getInputStream(IdeURLConnection.java:44)
    at java.net.URL.openStream(URL.java:1007)
    This pattern is repeated many many times (probably > 100).
    Message was edited by:
    user579938

  • BO dashboard auto-refresh

    Post Author: happymouse
    CA Forum: Performance Management and Dashboards
    Dear all,
    I have a dashboard with multiple analytics within it. Currently, for refreshing of the dashboard, we need to click on the submenu name.
    Kindly advise if there is any way to auto-refresh the dashboard (without clicking on submenu) say, every 5-mins interval. Hopefully we can leave the dashboard open without clicking on the submenu for refresh while data feed is coming in continuously.
    Thanks.
    HappyMouse

    Post Author: jezbraker
    CA Forum: Performance Management and Dashboards
    No specific refresh option within the out the box system - but its prertty simple to create a html based component you can hide in the dashboard page that runs a little script that calls a parent frame refresh that would do the job - used this type of solution a few times now. Rather depends on what version of DM youre using for specific examples.

  • How to refresh or close graphics from forms

    I call two graphics from forms, through pl/sql. There are
    parameters in the forms to tune the graphics. But trying to
    refresh the graphics results in access violation and the
    graphics becomes a 'zombie'. Why is it possible ? How to avoid
    it ?
    null

    Hi,
    I am a newbie in taskflow development world.
    Having gone through the above answer, I am not sure on how it fits in my problem domain. I created a taskflow with few iinput parameter to it. Actually it's a polling application that displays a poll on the basis of poll id provided by user through taskflow input parameter. A new requirement came up to show a list of polls and user may click on a poll from the list and that poll should get displayed.
    I have done the showing list of poll part, but when user clicks on a particular poll, even though I am setting the poll ID of the selected poll to the appropriate parameter, it's not being taken. While doing some R&D on this, I found there are two attributes called Refresh and RefreshCondition for taskflow refreshing. Initially the value of Refresh was set to 'always' which I modified to 'ifNeeded' and 'deferred', one at a time and it did not work. I have also tried binding a boolean variable to 'RefreshCondition' attribute, but while debugging, I have found, that the boolean variable is read only once while the taskflow is getting initiated, no matter what the value of 'Refresh' is.
    I did not get much time to explore the meaning and applicability of 'Refresh' and 'RefreshCondition' attributes, but have a feeling that these are the ones that I have to tweak a little to get my work done. Can someone please help me on this?
    Thank you,
    Kanchan Upadhyay

  • Inline popup sending contextual event to calling taskflow?

    Is it possible?
    Because of the returnListener not firing consistently, I was thinking of using contextual events. I am not sure, however, if that will work.
    11.1.1.4
    Basically I have a link, opens an inline popup to display a task flow as JSPX. Upon clicking on the okay button there, I want to fire an contextual event back to the
    parent to refresh it's data.

    Hi,
    yes, this should work because the calling task flow also remains active
    Frank

Maybe you are looking for