Executing code from a Bean only once when page loads

Hi all,
I have a method in a BackingBean which access UI Bindings from my fragment: xxx.jsff.
So that method has to be invoked from a inside that fragment since access Bindings from xxxPageDef.xml
I need to execute that code one and only one time when that fragment loads.
What is the best approach to my case????

Thanks Pino for your reply.
Since the fragment does not have OnLoad event, I have no option than to find a work around.
That is exactly what I am doing.
I have a PageFlowScope variable which is set to true or false depending if I have input parameter value or not.
That variable is re-sated when the user pressed a button.
The problem was where to stick to code that will disable components if needed.
So I used one component and in its Rendered method I put the code that will disable components if needed (based on my PageFlowScope variable value).
Works perfectly fine, but it would be much nicer if there was more natural way of doing it (with OnLoad event on fragment).
Regards.

Similar Messages

  • Inputtext component refreshes and the entered data is vanishes only happen when page loads first time

    Hi,
    Am using 11.1.1.5 adf jdev.
    I got unique issue , i have couple of jsff seach pages . In jsff , i have user enterable inputtext box ,Issue is when user enters data for first time . the component refreshes and the entered data is vanishes .
    But it happen for the first time when page loads, There is no partial triggers on dat input text box.

    Hi John,
    My page is not a part of a task flow. The whole app is an Admin app comprising of multiple individual pages navigated using Menu.
    I have tried to run this page individually on my local machine as well as when deployed on the WLS server. The behavior is the same.
    Kindly advice,
    Thanks,
    Ram

  • Start routine: only once per teh load but not once per data packet

    Hi,
    I would like to execute some code in start routine (in update rules) only once per the load but not once per the data packet.
    How can I implement this.
    Regards,

    I once had that same requirement, but in a datasource in R3. I'm not sure if the same solution would work in BW, though. I used a memory id to keep the variable value between packets:
    DATA: ... n_globalvar TYPE n ...
    then I added...
    IMPORT n_globalvar FROM MEMORY ID 'ZMEMID01'.
    ...at the start of the routine to retrieve to the variable the value from the memory id.
    At the end of the code, I exported the variable back to the same memory id...
    EXPORT n_globalvar to MEMORY ID 'ZMEMID01'.

  • Pagination - JavaScipt in "Execute when Page Loads" stop working

    I'm using APEX 4.0.
    I have a standard report region on a page. In the page's JavaScript - Execute When Page Loads area, I put some javascript code there to initialize hover event handlers for dropdown menus inside the report. It works fine when the report is genarated.
    But it stop working when a pagination performed. For example, after clicked 'next" or any number form the pagination dropdown list.
    Please advice how to fix it. Thanks.
    Shiofan

    Hi, Peter:
    Thanks for the quick reply. That is appreciated.
    My code involves only CSS and JQuery.
    I have found out the reason. It is because "Enable Partial Page Refresh" was set to Yes. ( that is the default by APEX, isn't it? ). After I reset it to No, the dropdown menu does work fine after pagination.
    I don't know how APEX pagination work together with report attribute "Enable Partial Page Refresh". To me, no matter what, the style sheet, the JavaScript put in page template/page header should always be included since they are common to the page. Can we say this is an APEX bug need to be fixed?
    Thanks again.
    Shiofan

  • Javascript in 'Execute when page loads', not working when paging results grid

    I have some Javascript in an Apex page, running in 'Execute when page loads'. It does some stuff to a results grid. It works fine on page load, but then doesn't run when I page through, or sort the grid. I presume this is because the grid is being sorted / paged using Ajax, which means the page isn't being fully loaded.
    Is there anywhere else I can put the code so it gets applied to the grid on sorts and paging?

    Thanks, works perfectly! I used the After Refresh and just selected the region I wanted to trigger the Javascript, and it works great. As you say the scope needs to be Dynamic.
    For anyone else reading this, something which caught me out was that my reports region was using the No Template setting, and the Dynamic Action didn't work, as it requires you to use a template which contains #REGION_STATIC_ID# - which is used by the dynamic action to identify the region. Once I switched to using a template, it worked fine.

  • Display column titles only once per page

    Hello,
    I am a newbie to BIP (R12.1.3). Below is how the output data shows up in my custom template:
    Vendor type lookup : Expense
    Vendor no: A12345 Vendor Name: Test Vendor1 Vendor Category: Expense - Construction
    VENDOR SITE INVOICE# INVOICE DATE DUE DATE INVCT AMT REM AMT PAYMENT METHOD
    ======== ====== ========= ====== ====== ====== ============
    Kannapolis A#12345 03-MAR-12 15-MAR-12 1000.00 1000.00 Check
    Vendor no: B12345 Vendor Name: Test Vendor2 Vendor Category: Expense - Rents
    VENDOR SITE INVOICE# INVOICE DATE DUE DATE INVCT AMT REM AMT PAYMENT METHOD
    ======== ====== ========= ====== ====== ====== ============
    Test Site B#12345 03-MAR-12 15-MAR-12 1500.00 1500.00 EFT
    The column titles repeat for each vendor since the titles are in the for-each loop under the vendor grouping. However, is there a way to restrict the titles to show up only once per page on all the pages? I tried putting the titles outside the vendor grouping but with in the vendor type lookup grouping. It is displaying the titles only on page1.
    Thanks,
    Monkey

    Hi, could you try Inserting the code <?if:position()=1?> before the header of your template and the code <?end if?> after the header of your template.
    See the a sample code below:
    <?if:position()=1?>
    VENDOR SITE INVOICE# INVOICE DATE DUE DATE INVCT AMT REM AMT PAYMENT METHOD
    <?end if?>
    Thanks,
    mr_bip_learner

  • Dynamically displaying ADF rich components in UI, when page loads

    Hi All
    Could you please tell me how to display ADF 11g rich components in UI programmatically from managed bean, when page loads.
    I tried to call onPageLoad() from pagePhaseListener, however no idea how to set the components to the UI from onPageLoad() method. Please someone help me.
    Regards
    Venkat.S

    Thanks for your response Abhijit.
    However in the given video, ADF components are displaying only after clicking the button. But i need to know how to display those components dynamically when page loads(i.e, i wont be clicking any button). While page loads those components should display dynamically.

  • Unable to execute javascript from backing bean

    Hello experts,  I want to execute  javascript function from backing bean method.   
    In my .jsff  page,  I have added  the javascript as :
    <jsp:root  ..... >
    <af:resource type="javascript" >
              function fileDownloadJS() {
                                alert(" tesing js from backing bean");
        </af:resource>
    </jsp:root>
    in my backing bean method  :
    public void callJSfuntion(ActionEvent actionEvent) {
            RenderKit rk = FacesContext.getCurrentInstance().getRenderKit();
            ExtendedRenderKitService erks = (ExtendedRenderKitService) Service.getService(rk, ExtendedRenderKitService.class);
            erks.addScript(context, "fileDownloadJS();");
    I have table in my .jsff page,   inside table column,  I have command link  and when I click the link,   I am invoking bean method  :
    <af:table  ....>
        <af:column sortProperty="title" sortable="true"  
                           headerText="File name" width="250px" id="Title"
                           clientComponent="true">
                  <af:commandLink   id="cl1"    actionListener="#{MyBean.callJSfuntion}" clientComponent="true">  
                    <af:outputText value="#{row.title}" id="ot1"/> 
                  </af:commandLink>
         </af:column>
    .</table>
    But when  I  run my taskflow and  click on  the link inside the table column,    JS function is not invoked.
    Absolutely  no clue what  is the issue.
    Appreciate if you can  help me out to resolve this issue.   Thank you.

    For debugging purpose can you try :
    <script type="javascript" >
              function fileDownloadJS() {
                                alert(" tesing js from backing bean");
    </script>
    put it on top of the page and let me know what happens.
    If it doesn't work try writing the function itself in your addScript(context, script); to see if it works.

  • HT1277 how to delete e mail from my yahoo server once i down loaded to my apple mail

    how to delete e mail from yahoo server once i down loaded to my apple mail

    Hi wh2,
    Welcome to Apple Support Communities.
    If your Yahoo account is set up as a POP account, you can set the option "Remove copy from server after retrieving a message" in the Advanced settings of Mail.
    See this article for the steps to locate this option:
    Using a POP account with multiple devices
    http://support.apple.com/kb/ht3228
    In Mail for Mac OS X 10.5 or later, choose Mail > Preferences.
    Click the Accounts tab.
    Select the account for which you wish to change the settings.
    Click the Advanced tab.
    Select the "Remove copy from server after retrieving a message" option.
    Also, this article has more information on the options found in the Advanced tab:
    Mail (Mountain Lion): Advanced accounts preferences
    http://support.apple.com/kb/PH11686
    Remove copy from server after retrieving a message
    Specify when you want to delete received messages from the mail server. You can deselect this option if you need to temporarily access messages from more than one location or computer.
    This option is available only for Post Office Protocol (POP) accounts.
    Best,
    Jeremy

  • Displaying "af:panel accordion" dynamically in UI when page loads

    Hi
    My problem is, whenever my homepage loads "af:panel accordian" should display dynamically in UI. Like, if I mention value 4 in manged bean it should display 4 panel accordion in UI when it loads, and if it is 6 then it should display 6 panel accordion in my homepage.
    Please help me in this issue. Looking forward for you response.
    Regards
    Venkat.S

    Hi
    Actually only one panel accordion will be in my UI(sorry for my previous message), but the "af:showdetailitem" under af:panel accordion will differ and the values of this will varies each time when the page loads. So dynamically i should add af:showDetailItem into this af:panelAccordion from manged bean.
    Regards
    Venkat.S

  • How to open List when Page loads in SharePoint Hosted App?

    I  want to create an app same like InstantPracticeManager by InstantQuick.
    Now I want to know that in a SharePoint Hosted App How can I show the Whole List in a page. 
    Here I have added one image:
    Here there is one list and there are 4 views of that list.
    Now the App will be like when I load the page It will show like the image above. Now how can we show the list like this in sharepoint hosted app?
    I want the same scenario which is shown in the following blogs:
    http://sp2013.blogspot.in/2012/08/use-list-view-in-sharepoint-2013-apps.html
    and
    http://www.sharepointnutsandbolts.com/2013/08/working-with-web-parts-within.html
    where they add a list to an app
    Can any one suggest me the idea? I am bit confused.
    thanks in advance.

    Hi,
    According to your post, my understanding is that you want to show the different list view in a page in SharePoint Hosted App.
    We can use jQuery and cross-domain library to achieve it.
    The following articles for your reference:
    Adding a Tabbed View to A Web Part Page Using jQueryUI
    http://sympmarc.com/2011/11/09/adding-a-tabbed-view-to-a-web-part-page-using-jqueryui/
    How to: Access SharePoint 2013 data from apps using the cross-domain library
    http://msdn.microsoft.com/en-us/library/office/fp179927(v=office.15).aspx
    SharePoint 2013: Get list items by using the cross-domain library (JSOM)
    http://code.msdn.microsoft.com/office/SharePoint-2013-Get-items-d48150ae/view/SourceCode#content
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • How to set Lov item property (Action type,event,parameter etc) in PR when page load

    Hi gurus
    I am new to OAF, First I need to explain my scenerio.
    I need to make some field mandatory or non mandatory based on one LOV item (Pick list or message choice list).
    for this i extended the controler and apply the changes, but in this case what heppen, It will effect only when i open the list (pop list) and click on more (Available in poplist) and it will open a new form and i select value from that form. But when I open the poplist and select the value from the same list rather going to more option (it does not open new form), then there are no effect. I though the issue with refreshing when selecting value from the same list.
    To resolving this issue what i did
    1. go to page == > the same LOV
    2. Change the Client Action properties (
         Action type  = fireAction
         event          = xxevent
        submit = true.
    After doing this when i run the page from my OAF enviroement , every thing is OK. Then I transfer the Controler to Server machine and change the controller and run the same page from the server, it has the same refreshing issue, Then I thought because I did not transfer LOV such properties so this is hepening,
    Now I want to initilize such properties in Page load or what I need to do, Please advise me.
    Regards,
    Haq

    Edward,
    Thank you for the suggestion! It directly lead to my solution wherein I used CASE statements for the column in my Region SELECT such as the following:
    WHEN (:P2_GRADING_METHOD = 'CR/NC' OR scs.scs_pass_audit = 'P') AND GET_GRADE_B93 (sac.stc_final_grade, sac.stc_verified_grade) IS NULL THEN htmldb_item.select_list_from_lov (5, 'Enter Grade', 'GRADE_LOV_CRNC','onBlur="return validate_grade(this,''FW_DATE_'||ROWNUM||''')"','NO',NULL,NULL,'GRADE_'||ROWNUM)
    When the column is NULL, the Select List (LOV) contains the entry 'Enter Grade' and that is the value displayed on page load. I bypass the value 'Enter Grade' during Submit Processing where database updating occurs.
    I did not find the need to enter values for p_null_value and p_null_text since I don't believe that it would cause the 'Enter Grade' value to display on page load for null value columns but rather would enable the user to select 'Enter Grade' from the list and have a specified return value stored in htmldb_item array.
    Again, thank you for the help!

  • Scroll goes to bottom when page loads

    Hi all,
    I'm facing a kind of presentation problem with a Portal we are developing based on WebCenter 11g technology. We are currently using JDev 11.1.1.3.0 version.
    The situation is as follows:
    We have a base page (let's say base.jspx), this page contains a region and in the region a .jsff is showing some content from a Bean whose information comes from UCM. This region is divided in two parts: main content and related items (which are also the same kind of content). The action on the related items of the content being showed should reload the region shoing the new content and its related items.
    The problem is that when clicking on a related item, when the region reloads, it goes automatically to the bottom if the article is long enough as to create scroll. Notice that we don't redirect to any jspx page different that base.jspx at any moment. We remain at base.jspx and it is just the region that reloads with the new information. In this sense, solutions based on javascript on the main page trying to set the window scroll to (0,0) don't work as the window itself has no scroll. It is the region that has the scroll (actually, the corresponding panelStretchLayout or PanelGroupLayout).
    I've also tried to fix it with a javascript function trying to get the elementId and set its scroll, but the elements from the jsff are not visible from the jspx page.
    Do you have any idea why I'm getting this behavior?
    Any light you could shed on this would be highly appreciated.
    thank you very much in advance
    Juanma.

    In seems that the problem is that the last component being shown in the PanelGroupLayout is a commandLink which has associated an af:showPrintableBehavior. The component is getting the focus on it so that's why the page goes directly to the bottom.
    As I commented in previous posts, the page is not reloading, and it is part of a jsff contained in a main jspx, so javascript based solutions would be hardly possible.
    Any suggestion?

  • Page Flashes Yellow when Page Loads

    Hi, I actually have a web guy doing a site for a client of
    mine, but when the site loads, the whole background flashes bright
    yellow and subsequently each page flashes yellow before it loads as
    well, but only once. Web guy took out the SWF animations I sent him
    and the flashing stopped. I've given SWF animations to other web
    designers and this hasn't happened. Would someone be kind enough to
    look at the site and let me know if they have any ideas. It's still
    a work in progress. Here's the link:
    http://www.trendmultimedia.com/arrowhead3/index.html">website[/L]

    In the site CSS, there is this:
    body {
    background-color: #FFFF00; /**this is yellow**/
    Change it to dark blue.
    Also, that page has some html errors including 2
    </body> </body> tags at the
    end of the document. Only one end of body tag is required.
    --Nancy O.
    Alt-Web Design & Publishing
    www.alt-web.com
    "Mediadude8" <[email protected]> wrote in
    message
    news:gbg5r6$14q$[email protected]..
    > Hi, I actually have a web guy doing a site for a client
    of mine, but when
    the
    > site loads, the whole background flashes bright yellow
    and subsequently
    each
    > page flashes yellow before it loads as well, but only
    once. Web guy took
    out
    > the SWF animations I sent him and the flashing stopped.
    I've given SWF
    > animations to other web designers and this hasn't
    happened. Would someone
    be
    > kind enough to look at the site and let me know if they
    have any ideas.
    It's
    > still a work in progress. Here's the link:
    >
    http://www.trendmultimedia.com/arrowhead3/index.html
    >

  • Images are not showing when page load

    Hello All
    I am having lot of webparts on my page.
    In two of them webpart i applied xslt and showing image of created by person in this
    1)Announcement webpart(Wall updates)
    2)Showing blog using content by query webpart(Blogs)
    While page loading not able to load images in both webpart view.
    But when i decreases webparts on page images rendered properly.
    I think it is taking time to fetch images so timeout and showing default images.
    Kindly suggest me some way to tackle and images will displayed properly
    Thanks in advance
    Varsha Patil

    Hi,
    According to this documentation from MSDN about
    SharePoint Server 2010 capacity management: Software boundaries and limits:
    “In SharePoint Server 2010, there are certain limits that are by design and cannot be exceeded”, “The default values for these limits were defined by testing, and represent the known
    limitations of the product. Exceeding supported limits may cause unexpected results, significant decrease in performance, or other harmful effects”, “in most cases, operating at or near an established limit is not a best practice, as acceptable performance
    and reliability targets are best achieved when a farm’s design provides for a reasonable balance of limits values”.
    So it is not recommended to add many web parts into one page.
    If there is a special need to display many web parts in one page, it is recommended to reorganize the content to minimize the number of web parts in use and customization will
    be needed sometimes if the built-in web parts can’t meet the requirement.
    Best regards
    Patrick Liang
    TechNet Community Support

Maybe you are looking for