Access Parent Page Binding From Region

Hello
I'm using JDev 11.2 and i have a task flow which I call from a parent page- and to pass parameters to it.
Is there a way for me to access the parent page bindings from a region in the taskflow?
Thanks for you time
Talya

You shouldn't be directly accessing a containing page values from a task flow. This will create a situation where your task flow is only usable in a single page.
Instead define parameters to your task flow and pass those from the containing JSF.

Similar Messages

  • How to access Parent page UIComponent from inlineFrame using ADF javascript

    Hi,
    My application includes an <af:inlineFrame component on the top portion of the page. It contains a table with delete option for the end user. Requirement is after user has deleted all the records of the table and table has no records to display, inlineFrame needs to be made invisible so that the bottom portion content of my page will get stretched fully and has more visibility to the user. Hence when user click on Delete button of the table, after delete operation, I am planning to check the row count and write javascript to client using ExtendedRenderKitService to make the inlineframe invisible.
    Question:
    1. What is the right ADF javascript API to access the parent page and work with its components. I came to know we can call using 'parent.document.getElementById' but I want to know correct ADF's javascript API.
    Thanks in Advance
    Raghu

    The way you suggested didn't help me.
    Yes.. This inlineFrame content is also a part of the same application only. The reason why it is kept in inlineFrame is it is an ADS implemented table. ADS is able to push the data to the table provided we should keep the application idle. If I keep on working with the application (i.e. request/response happens because user works with the bottom portion content of the page), ADS is not able to push the data to UI. Keeping the ADS implemented table in a top portion still but inside an inlineFrame has solved this problem.
    Given below my page design
       main.jspx
       ======
       <af:form id="f1"....
           <af:inlineframe source="faces/page/employee.jspx" />
       </form>
       employee.jspx
       =========
       <af:form id="f2"
        </form>
                 In the employee.jspx only I have delete button and javascript which is suppose to find the parent page (i.e. main.jspx) and to work with inlineframe component to make it visible/invisible based on whether table gets records or no records. (This javascript call will happen with the help of ClientListener set for the ADS implemented table with event type as propertyChange) Intention is to check the row count of the table during every javascript call and to go to parent page, find the inlineframe, make it visible or invisible.
    Edited by: Raguraman on 25-Jan-2013 08:59

  • Triggering action on Parent Page automatically from Page Fragment

    Hi All,
    I am new to adf and I need help in the following.
    I have a page fragment(one.jsff) included within a JSPX page(main.jspx).This one.jsff page contains few fields and one command button named "SUBMIT".
    The parent page(main.jspx) also has a command button "GO" and an associated javascript function displayText().
    My requirement is that if an user clicks on the SUBMIT button on the page fragment,then the GO button also gets clicked automatically and the associated code gets executed.
    Is this possible?
    Thanks in advance.

    Thanks Vinay and Arun for your replies.
    But the problem is javascript function displayText on the main.jspx doesn't get executed upon clicking the SUBMIT button on the one.jsff page.
    The code of the javascript function on main.jspx is as follows:
    //This function basically loads the oracle form applet and passes information to it
    function displayText()
    document.forms_applet.raiseEvent('message','payload');
    When the GO button on the main.jspx is clicked,the function is called and the form applet loads.
    But when the SUBMIT button on one.jsff is clicked,though the javascript function gets called(i tested it by putting alert messages within the function), the applet doesn't load.
    I think this is because the page fragment tries to search for a document element within its code but since the same doesnt exist,the applet doesn't load.
    Let me know if my understanding is wrong.
    How can I trigger the loading of the applet from the page fragment?
    Thanks.

  • Put a child page into a region in a parent page?  (APEX 2.2.0)

    Hi, all,
    Thanks so much for all of your help previously.
    I want to have the entire contents of child page inserted into a region of parent page. The child page uses the "Empty Template" template and has an report region that uses the "No Template" template.
    The parent page has a region containing a single div into which I want to insert the child page. If I do this using JavaScript and htmldb_Get object, inserting the result of the AJAX request into the DIV, I get what I want. I can't figure out how to preload the page into the region.
    I've tried using the URL region, but I keep getting
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1674
    ORA-12545: Connect failed because target host or object does not existwhen I enter the URL for the child page.
    I can't use UTL_HTTP.REQUEST, either.
    select utl_http.request('http://myserver/f?p=100:100:12345678901234')
    from dual;I get roughly the same error. (I copy and paste the same URL that I use for the AJAX request. I can also type that URL into a browser and get the page.)
    I can get both Google's and Oracle's Web sites this way.
    My other option is to render the entire page to a string, store it in a VARCHAR2 / CLOB, and output it to the screen. Is there a way (maybe using WWV_FLOW) to render a page to a string?
    I want to avoid using DHTML when it's not needed and I don't think that I would need it to initially load the page.
    Thanks!

    Carl,
    (Sorry about the reply gap.)
    As best as I can tell, iframes can't auto-fit their contents without JavaScript. I've also heard mixed things about iframes and accessibility. The contents of the iframe also don't inherit the CSS definitions from the parent frame. (None of those may be good enough reasons to not use iframes, but I am totally unfamiliar.)
    There are workarounds for all of those problems, but I'm just as inclined to write some PL/SQL function that generates my page for me and call that from a PL/SQL region, since the page is so simple. It might take me less time to write the PL/SQL function and PL/SQL region than it will to make the iframes look pretty.
    Thanks for the reply!
    Message was edited by:
    Don_84
    Well, that's odd. When I changed my authentication scheme from what I was using to the database authentication (the DAD one), the utl_http.request call works, as does the URL region. So the authentication is getting in the way. I wonder if there is a (elegant) way around that?
    Message was edited by:
    Don_84
    Is WWV_FLOW.SHOW documented? In a PL/SQL region, I can call
    WWV_FLOW.SHOW(P_INSTANCE => '&SESSION.', P_FLOW_ID => '100', P_FLOW_STEP_ID => '1000');where 100 is my app number and 7000 my page number, but it only works if I have no other regions. Otherwise, the page entirely fails to render.

  • Access page item from Javascript

    I have searched the forum, and based on my findings this is what I've done so far:
    I have a page item where the Google Map key is stored. I want to access it from Javascript so that I can call the Google map with the key. (Note: The key can't be hardcoded as it will be pulled from DB according to the environment/url the app is running on. e.g. - dev, test, production.)
    Here's a javascript code block:
    <script>
       var google_key = $x('P1_GOOGLE_KEY').value;
       var l_url = "http://maps.google.com/maps?file=api&amp;v=2&amp;key=" +
                   google_key +
                   "&sensor=false";
    </script>I have tried, $v('P1_GOOGLE_KEY') , $x('P1_GOOGLE_KEY') , &P1_GOOGLE_KEY. and none of them work.
    How do I access a page item from Javascript?
    Thx!
    Marc

    Marc,
    I am going to take a shot in the dark, but are you referencing this item outside of a function in your head tag? So basically it tries to reference the item on load? If so this is not going to work because the item does not exist yet. If you are using jQuery change your code to look like:
    $(document).ready(function(){
       var google_key = $x('P1_GOOGLE_KEY').value;
       var l_url = "http://maps.google.com/maps?file=api&amp;v=2&amp;key=" +
                   google_key +
                   "&sensor=false";
    });This will tell the javascript to fire after everything has fully loaded. If you are not using jQuery then you can use a little javascript snippet from here to add a ready event to your page. or you can copy paste this into a script tag.
    (function () {
      var ie = !!(window.attachEvent && !window.opera);
      var wk = /webkit\/(\d+)/i.test(navigator.userAgent) && (RegExp.$1 < 525);
      var fn = [];
      var run = function () { for (var i = 0; i < fn.length; i++) fn(); };
    var d = document;
    d.ready = function (f) {
    if (!ie && !wk && d.addEventListener)
    return d.addEventListener('DOMContentLoaded', f, false);
    if (fn.push(f) > 1) return;
    if (ie)
    (function () {
    try { d.documentElement.doScroll('left'); run(); }
    catch (err) { setTimeout(arguments.callee, 0); }
    else if (wk)
    var t = setInterval(function () {
    if (/^(loaded|complete)$/.test(d.readyState))
    clearInterval(t), run();
    }, 0);
    document.ready(function (){
    var google_key = $x('P1_GOOGLE_KEY').value;
    var l_url = "http://maps.google.com/maps?file=api&amp;v=2&amp;key=" +
    google_key +
    "&sensor=false";
    Good Luck,
    Tyson Jouglet

  • Apex in an iframe - only allow access from specific parent page

    Hi,
    I have a simple, unauthenticated Apex 4 application which lets users enter search terms and return records using a classic report. I wish to publish the application within an iframe, so that my organisation's communications department can maintain control over the rest of the page content. A side effect of this solution is that it will be possible for users to lift the application URL from the page source and reuse it elsewhere. I would prefer to avoid this, since I don't want our main website traffic to be diverted. Is there a way to restrict access to an application based on the parent page of the iframe in which it is embedded?
    Thanks in advance,
    Simon

    Hi,
    I'm sure there might be better way than this and this might have some holes , but anyway
    Create HTML region "After header" without template to page zero
    <script type="text/javascript">
    var u="my_ifarme_url_here";
    if(top.location.href!=u){top.location.href=u;}
    </script>Replace "my_ifarme_url_here" with URL your iFrame is located
    Regards,
    Jari

  • Access jspx page from af:region

    hi
    jdeveloper 11.1.2.3
    i have a jspx and inside it there is dynamic bounded task flow , how can i refresh parent page from this dynamic region.
    tnanks

    Hello,
    The "RefreshCondition" attribute into Property Inspector of af:region, you could set the condition (EL expression) to refresh only
    the region (returns true) or the parent page (returns false).
    http://suneesh-adf.blogspot.com/2013/09/refreshing-adf-region.html
    rfh.

  • Get the Values of the components inside the region onto the Parent Page

    Hi All,
    I am using Jdeveloper 11.1.1.5.
    I just wanted to know that my use case can be fitted to contextual events or should i use the #{data.pageDef.Attribute.inputValue} to get the values.
    I have a bounded taskflow "ChildTF.xml" with fragment say "child.jsff".Now i have dragged the ChildTF.xml on the other page say "Parent.jspx" as a region.In the child.jsff page i had input form having 20 fields and all the 20 fields are dragged from a View Object so i don't have the field values binded to the Managed Bean and on the parent page "Parent.jspx" i have a button. Now on click of button i need to get the values of those 20 fields of "child.jsff" page.
    How can i achieve this?
    Thanks
    Shah

    Hi Timo,
    Thanks .
    For sharing the data control i should follow this :-
    In the Property Inspector for the called task flow i.e ChildTF.xml, select Behavior.
    In the data-control-scope list, select shared.
    Is there anything else do i need to do ??
    I mean do i need to add the iterator to the parent page also. ?
    Kindly Suggest!!
    Regards,
    Shah

  • How can I access the Attribute Values from the Search Region

    Hi all,
    I have a table which contains Company id, department id, and PositonId. For a particular Company and Department there may be multiple records.
    I have to pupulate a table which contains the position and other details that comes under a particular Department and Position based on the selection in the Three comboBoxes.
    Also I have to populate a select many Shuttle to add new postions and records under a particular Department.
    I created a query panel *(Search Region)* for the serch and a table to display the data. That is working fine.
    Now the issue is I am using a view criteria to populate the shuttle with two bind variables ie, DepartmentId and CompanyId.
    If the serach will return a resuktant set in the table it will also pupulate the correct records, otherwise ie, if the if the serch result is empty the corresponding iterator and the attribute is setting as null.
    SO I want to access the attribute values from the Search Region itsef to populate the shuttle.
    I don't know how can I access the data from the Search Region.
    Please Help.
    Regards,
    Ranjith

    you could access the parameters entered in search region by the user as follows:
    You can get handle to the value entered by the user using queryListener method in af:query.
    You can intercept the values entered as described
    public void onQueryList(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    List<Criterion> searchList = qdes.getConjunctionCriterion().getCriterionList();
    for ( Criterion c : searchList) {
    if (c instanceof AttributeCriterion ) {
    AttributeCriterion a = (AttributeCriterion) c;
    a.getValues();
    for ( Object o : a.getValues()){
    System.out.println(o.toString());
    //call default Query Event
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    public void onQueryTable(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    private void invokeQueryEventMethodExpression(String expression, QueryEvent queryEvent){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    ExpressionFactory efactory = fctx.getApplication().getExpressionFactory();
    MethodExpression me = efactory.createMethodExpression(elctx,expression, Object.class, new Class[]{QueryEvent.class});
    me.invoke(elctx, new Object[]{queryEvent});
    Thanks,
    Navaneeth

  • What is the best way of accessing application module without page binding?

    Hi All
    I am using Jdeveloper 11g R2 (11.1.2.3) & Weblogic 10.3.5.0
    What is the best way of accessing application module without page binding?
    In my application after user authenticated from LDAP
    I need to read some information from database and set my menues.
    Thanks
    Mohsen

    Hi,
    if you don't have a binding the I am not sure the binding context is created. Anyway, try
    BindingContext.getCurrent().findDataControl("name here as ID in DataBindings.cpx") and see if it returns a valid instance
    Frank

  • Accessing a binding from inside a servlet

    Hey all,
    So I'm attempting to access a binding from a servlet instead of using the ApplicationModule approach which is recognized as a bad idea (http://blogs.oracle.com/jdevotnharvest/2010/11/when_to_use_createrootapplicationmodule_in_oracle_adf.html). However, when the code is executing in the servlet the line BindingContent.getCurrentBindingsEntry() returns null! I think there's something missing in my configuration that's causing ADFm to not recognize the servlet as having a binding file. Anything stand out?
    So inside of a servlet I have the following:
    public class RSSNewsServlet extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingsEntry();
    DCBindingContainer bindingsImpl = (DCBindingContainer)bindings;
    DCIteratorBinding dciter = bindingsImpl.findIteratorBinding("AllPapers1Iterator");
    Row [] rows = dciter.getAllRowsInRange();
    Web.xml:
    <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <servlet-name>NewsServlet</servlet-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    </filter-mapping>
    <servlet>
    <servlet-name>NewsServlet</servlet-name>
    <servlet-class><path-to-servlet>.RSSNewsServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>NewsServlet</servlet-name>
    <url-pattern>/servlet/news.rss</url-pattern>
    </servlet-mapping>
    newsServletPageDef.xml:
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="11.1.1.56.60" id="newsServletPageDef"
    Package="<path-to-pagedefs>pageDefs">
    <parameters/>
    <executables>
    <variableIterator id="variables"/>
    <iterator Binds="AllPapers1" RangeSize="25"
    DataControl="GatewayNewsAppModuleDataControl"
    id="AllPapers1Iterator"/>
    </executables>
    <bindings>
    <tree IterBinding="AllPapers1Iterator" id="AllPapers1">
    <nodeDefinition DefName="<path-to-model>AllPapers"
    Name="AllPapers10">
    <AttrNames>
    <Item Value="PapId"/>
    <Item Value="PapTitle"/>
    <Item Value="PapPublishDate"/>
    <Item Value="PapExpireDate"/>
    <Item Value="PapAuthor"/>
    <Item Value="PapType"/>
    <Item Value="PapIssueDate"/>
    <Item Value="PapFileName"/>
    <Item Value="PapUserName"/>
    <Item Value="PapPostedDate"/>
    <Item Value="PapModifiedDate"/>
    <Item Value="PapNeverExpire"/>
    <Item Value="PapFile"/>
    </AttrNames>
    </nodeDefinition>
    </tree>
    </bindings>
    </pageDefinition>
    DataBindings.cpx:
    <pageMap>
    <page path="/servlet/news.rss" usageId="MyAlmacTemplate_view_newsServletPageDef"/>
    </pageMap>
    <pageDefinitionUsages>
    <page id="MyAlmacTemplate_view_newsServletPageDef"
    path="com.almac.aurora.gateway.pageDefs.newsServletPageDef"/>
    </pageDefinitionUsages>

    when the code is executing in the servlet the line BindingContent.getCurrentBindingsEntry() returns null!The method BindingContext.getCurrentBindingsEntry() returns from the requestScope the variable with key "bindings". When using ADF Faces this variable is set at ADF Faces' Prepare Model phase (by the PageLifecycleImpl.prepareModel() method). But when using a plain servlet this variable is not set (because the ADF Faces' page lifecycle is not executed) and this is the reason why you get a null result. As a workaround you can use the following code in your servlet:
    BindingContext bctx = BindingContext.getCurrent();
    DCBindingContainer pagedef = bctx.findBindingContainerByPath(request.getServletPath());
    bctx.setCurrentBindingsEntry(pagedef); // Invoke this method only if for some reason you need the "bindings" variable set in the environmentDimitar

  • Access page method from template

    Hi,
    I'm using JDev11/ADF and I need to implement this scenario : A have a page fragment based on a page template. This page has a backing bean with a class exteded from a generic class. I have some generic buttons in the page template. Theses buttons need to call a method in the base backing bean class through the page's backing bean. I read Frank's solution to access the page's binding from the template :
    [http://thepeninsulasedge.com/frank_nimphius/2007/11/23/adf-faces-rc-implementation-strategies-for-global-buttons-in-page-templates/]
    but is there a way to access a method in the page's bean from the template (A listener for instance ?)...
    tks.

    Hi,
    what is missing is a method attribute like in declarative components. This however does not exist for templates yet. So there is no other solution yet than to invent some kind of contract.
    Frank

  • [ER] Partial submit (PPR) propagation from Region to Parent

    Hi!
    I would suggest to enable propagation of partial submits (PPR trigers) from Regions to parent page. New Parent Action element in taskflows enables propagation of navigation actions so similar propagation of PPR should be very neat feature.
    Regards,
    PaKo

    Frank,
    thank you for info. The blog is very helpful.
    Still, I would encourage devs to rethink on some more declarative support for PPR propagation. With ADFc powerful region and taskflow management, the PPR isolation is very limiting or, better to say, introduces additional programming (thus lowering productivity) in order to achieve cross-region UI logic interaction.
    Thanks for consideration!
    Regards,
    Pavle

  • How to access a page from another website in to the portlet

    Hai,
    I need this specific requirement. In a portlet that is written in jsp, i need to access another page which is running in another server.I will explain what is my requirement clearly.. In a portlet, i have to acess a page from another site, and i have to pass a parameter directly. If i use URL-Based Portlet with passing parameters, It ask the user to enter the parameter and submit the page.. But what my need is, i have to pass the parameter directly. what i am planning is in a new tab, i will add a portlet, where i need to access the another website page..when the user opens that tab, it directly shows that website..... How do i proceed...
    Can anybody help me.. Its URGENT....
    If possible send me the code..
    my mail id: [email protected]
    Thanks in advance
    damodar

    Damodar,
    To include an existing JSP page as a portlet have a look in the PDK section http://portalcenter.oracle.com there is lots useful information. The two things you might find most relevant is a paper on creating java portlets. This paper has a section on turning an existing JSP page into a portlet
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/ARTICLES/HOW.TO.BUILD.A.JAVA.PORTLET.USING.PDK.JAVA.V2.HTML
    and to pass parameters and events
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/ARTICLES/OVERVIEW.PARAMETERS.EVENTS.HTML
    Hope this helps,
    Candace

  • How to delete i.e. clear the pending access requests list from Access request page in SharePoint 2013

    Hi Team,
    I am site collection admin of a SP13 site. The issue is we have added some of the users manually after we got requests from them for site access. But this has left those users as pending on Access requests page. We don't want that list to stack up.
    I can not decline those requests as those users will be notified with declined mail. I searched for clearing the list of those pending requests but did't find any guidelines for this. 
    Is there any way I can do this. Any help is appreciated thanks in advance  

    You might consider using PowerShell to remove unwanted items from the "Access Requests" list of the web site.  This list holds all of the access requests including pending, declined and approved.  The following example demonstrates removing
    the first item from the list.  Please note, I'm not aware whether or not there are any negative side effects to removing items from this list so doing so would be at your own risk.
    $web = get-spweb https://yoursharepointsite
    $list = $web.lists["Access Requests"]
    $list.items[0].delete()

Maybe you are looking for