Automatically, click a CommandButton in the JSF page after loaded the page

I need to automatically, click the command button 'refreshPage' after loading of the JSF page below: (after trying the code in blue comment I'm unhappy. Please help!)

<? XML version = "1.0" encoding = "UTF - 8"? >
"< jsp:root xmlns:jsp ="http://java.sun.com/JSP/Page"version ="2.1"
"xmlns:f ="http://java.sun.com/jsf/core"
"xmlns:h ="http://java.sun.com/jsf/html"
"xmlns:AF ="http://xmlns.oracle.com/adf/faces/rich"
"xmlns:PE ="http://xmlns.oracle.com/adf/pageeditor"
Cust ="http://xmlns.oracle.com/adf/faces/customizable" >. "

< f: loadBundle basename = "oracle.webcenter.portalframework.sitestructure.resource.PortalAppPageResource"
var = "portalResource" / >
< jsp:directive.page contentType = text/html"; Charset = UTF - 8 "/ >

< f: view >

< af:document id = "d1" title = "#{portalResource ['home_title']}" >

<!-< af:clientListener method = "callRefreshButton" type = "load" / >
< af:resource type = "javascript" >
function callRefreshButton()
{
var button = AdfPage.PAGE.findComponentByAbsoluteId ("refreshPage");
ActionEvent.queue (button, true);
}
< / af:resource >->

< af:messages id = "m1" / >
< af:form id = "f1" >

< af:pageTemplate value = "#{bindings.pageTemplateBinding.templateModel}" id = "pt1" "
viewId="/oracle/webcenter/portalapp/pagetemplates/pageTemplate_swooshy.jspx" >
< name f: attribute = "showNavigation" value = "#{true}" / >
< f: facet 'content' = name >
< af:group id = "g1" >
< af:inputText label = "Label 1" id = "it1" / >
< / af:group >
< / f: facet >
< / af:pageTemplate >

<!-< af:commandLink id = "refreshPage" text = "refreshPage.
action = "#{WangBean.reloadPage} '"
rendered = 'true '.
inlineStyle = "do-size: small;" color: white; »
partialSubmit = "true" clientComponent = "true" >
< / af:commandLink >->

< af:inputText value = "#{bindings." Sdan8.inputValue}.
columns = "#{bindings." Sdan8.hints.DisplayWidth}.
maximumLength = "#{bindings." Sdan8.hints.precision}.
shortDesc = "#{bindings." Sdan8.hints.ToolTip}"id ="it2.
Visible = "false".
inlineStyle = "do-size: medium;" make-weight: bold; ">
< f: validator binding = "#{bindings." Sdan8.validator} "/ >"
< af:convertNumber groupingUsed = "false".
model = ' #{bindings. " Sdan8.format} "/ >"
< / af:inputText >

< / af:form >

< / af:document >
< / f: view >
< / jsp:root >

Timo,

I got it works!

What happened is that I didn't notice that the system generated a method of PollEvent by default for me inside my WangBean after I created the af:poll component:

{} public void reloadPage (PollEvent pollEvent)

Add your code here

}

Once I pasted my code in the vote started working as expected and the inventory button. Component AF:poll solve my problem.

Thank you very much and I have learned 2 new staffs ADF on your part, am really appreciated.

Kind regards

Yi

Tags: Java

Similar Questions

  • How to call "j_security_check" in the jsf page

    Hello

    with ADF security set up in Jdeveloper11.1.1.2, it automatically generates login.html and error.html for forms authentication.

    I found in login.html, the form action is "j_security_check" and I try to customize the page of connection with the jsf page, but do not know how to call "j_security_check" in the jsf page, there is no action attribute more within the af: form and I can't find the "j_security_check" in the action of Expression commandButton control build.

    Thanks in advance.

    Best regards
    Bill

    Hello

    you will need to add the login form to the JSf page wrapped in f: verbatim to show as part of the JSF page. JSF 1.2 using f: verbatim shoucl be no need, but in my experience, is best.

    If you develop and deploy on WLS, then Chapter 30 of the Fusion Developer Guide has a solution of God for you to build a form of connection in JSF completely

    http://download.Oracle.com/docs/CD/E15523_01/Web.1111/b31974/adding_security.htm#BABDEICH

    This requires any of j_security_check

    Frank

  • Call the method call activities before you navigate to the target jsf page

    Dear all,

    I use JDeveloper Studio Edition Version 12.1.3.0.0.

    Requirement:

    I have a stubborn taskflow. The stubborn workflow is without using page fragments.

    I have three pages: login.jsf, admin.jsf, user.jsf. I have a method call activity in the taskflow. The login.jsf is the default page. The page of login.jsf have an af:selectOneRadio with two af:selectItem: Admin and user. It also has an af:button. When the user select the af: af selectItem: selectOneRadio and click on the af: button, it should call the method call activity (doLogin) and based on logic it will redirect to the page admin.jsf or user.jsf page.

    Please find the taskflow below:

    How to achieve the solution to the prescription above.

    Thank you and best regards,

    Susanto Paul

    Hi all

    I'm able to resolve the obligation.

    The post below was really helpful.

    http://andrejusb.blogspot.in/2011/09/programmatic-ADF-task-flow-router.html

    Thank you best regards &,.

    Susanto Paul

  • Store the value of the client side in the .jsf page

    Hello

    I implemented the functionality of line selection using check box in an af:table paginated . The user can select a record by activating the individual checkbox at the level of each line or select all the records by selecting the checkbox "Select all" at the level of the table header. I added a client listener that fires on the box click and the javascript function I capture the unique value of each line and then invoke a server event and by passing all the unique values captured.

    I've also attached a server listener that calls a method in the managed bean. In the method I capture all the unique values (which went from java script) in the java collection and then storing the collection in the view range.

    On the page, I have a button 'Submit' who collect all values stored in the field of view and execute the necessary business logic. This full feature works very well.

    My requirement is to improve the flexibility of the page.

    When the user selects the check box, it takes around a second deal with the life cycle complete .jsf page.

    Is it possible to avoid the call Server to store the values in the field of view instead if I can store the decision-making value on the client side-side (which I believe will improve performance) and then finally when the user presses the button "submit" I'll enter the stored values on the client side and complete the rest of the business logic.

    Please let me know if this is possible in the page .jsf which is developed in the ADF with JDev 12 c (12.1.3) or please suggest another approach.

    Indications will be useful.

    Thanks in advance.

    Kind regards

    Gerard

    There are two ways to do this, consider for example the browser Local storage / storage of Session:

    http://blog.teamtreehouse.com/storing-data-on-the-client-with-localStorage

  • How to define data lists to scroll automatically in a jsf page?

    There is a requirement that data lists (extracts from the database) scrolls automatically in the region within a jsf page as a list of names of actors/actress will be shown and scroll at the end of a movie.

    Is there an easy way to implement it in jdev 12.1.2?

    Thank you.

    This is a great feature of continuous scrolling in tables in the ADF. (However, it is a characteristic of af: listView instead of af: jdev12.1.2 table?)

    Blog I've posted in previous answer was talking af:table and not af:listView.

    My first use case is different:

    This is data auto scrolling on the screen without user interaction.

    I got the impression that you're talking about that.

    Maybe you can use af:poll and call next() operation.

    Or you can try with AdfRichTable javascript api: http://jdevadf.oracle.com/adf-richclient-demo/docs/js_docs_out/index.html (I see methods like scrollToRowIndex(), but I don't know exactly how you can use it)

    A related use case is image slideshow:

    There are several images to shown but one for once, and the images can be shifted to show in turn automatically.

    Is the carousel component more af:poll be a good solution for this requirement?

    Yes, carousel will be the appropriate component.

    You can use af:poll (ADF 11 g: carousel goes round and round (... and round and..)-AMIS Technology Blog), or javascript to do the rotation (componentCarousel with autospin |) ADF recipes)

    Dario

  • How to keep summers jsf pages correctly updated to account for changes to data in the database?

    This is a case of common use for web applications:

    User open A (i.e. a jsf page) of a web application, keep open for a period of time and do some browsing or editing on this page.

    During this time, someone others or modified events of the data in the database, then:

    Scenario A:

    1. the user should be able to see the evolution of the data in the above open jsf page when page navigate to other records.

    or when the page is refreshed by refreshing the web browser (reload the page) or by pressing a button on the page manually.

    Scenario b:

    2. the page should be able to be updated automatically to reflect the new changed data in the backend database.

    -This means that the user has no need to run the refresh action intentionly/manually to get the new data.

    Here's a possible implementation are provided in subsection 12.1 JDEV/ADF for above use cases:

    1.kdario: tips to know how to refresh your data

    Re: Field Image cannot refresh when you move between records in a jsf page

    In my opinion, the solution of kdario is a little bit complicated, is there an easy approach?

    and kdario says:

    'normal way' for update page is generally very bad for applications based on JSF/ADF.

    Is there more evidence or reference documents to support above sayings?

    2 to implement scenario B, which is recommended methods?

    Is the Active Data one approach good?

    If there are active - as tech batteries was adopted for web applications on the internet (which will have more agreement than in the intranet user), would there be possible serious performance problems?

    Thanks in advance.

    In fact, I suggested to the position 3 solutions (and option c) Notifications of changes to database is the most complicated).

    Also, here is solution d) in pageDef, select iterator and ownership of Cache set to false results

    'normal way' for update page is generally very bad for applications based on JSF/ADF.

    Is there more evidence or reference documents to support above sayings?

    Well, when you use the "back/refresh" browser button, this will retrieve the Forms page cache and skip the controller of the ADF.

    You can use google to do this, for example:

    https://groups.Google.com/Forum/#! subject/adf-methodology/CKoDdhLdrYE

    ADF developers world: how to avoid the mistake Houston-35007?

    Andrejus Baranovskis Blog: How to manage the Web browser buttons in the ADF/WebCenter Applications

    Dario

  • Click title menu &amp; see the target automatically scrolling down.

    Hello

    I hope well.

    Now, I want to do something else in muse, you tell me how when I click on any position then the page to automatically scroll down and show the target.

    How his talk to me.

    Thank you

    Akash.

    Hi Akash,

    You can do this by using the widget of composition. Adobe Muse help | Working with widgets of Composition

    Kind regards

    Akshay

  • How do I reload the JSF page

    Hi all

    I'm working on an application where I have three tables linked together (master-detail-detail). I have created two forms and the table of the sources of data in the table of these master-detail-detail. I added corresponding createInsert
    and validate operations for each my form and table on the JSF page. The tables have 3 columns which is generated by a sequence in the database. I display as a text output in my page. When I created the new line of this table, it is not be displayed until I have reload the page by typing the url. based on this value, I should create the rows in other tables.

    The app should work the way below

    1. I should be able to create a row in the first table using CreateInsert operation. -> I am able to create and could see the line in the db

    2. I should be able to create a row in the second table, which is a child of the first table. Dynamically, it must take the value of one of the tables for the foreign key attribute. -> Is the case that if I reload the page manually by pressing

    the url... but not if I don't charge it. I guess that the iterator does not refreshsed.

    I need to reload the page, either programmatically or by using the Configuration of the ADF. Please help me in doing this.


    Thanks in advance

    You have configured a composite relationship between the master and detail?
    This should take care of automatically put in the id of this master in new records that you create in the part detail.
    http://docs.Oracle.com/CD/E16162_01/Web.1112/e16182/bcentities.htm#sm0150

    Also instead of do a reload of the entire page, it would probably be best to do a refresh of partial page for the section, you need to refresh.

  • External JSF pages to view the contents of the URL

    Hello

    Is it possible for a JSF page that uses the PanelPage component and the ADF controls to provide menus, etc to actually allow an HTML page (accessed via a URL to an external site/application) to be displayed somewhere in the JSF page?

    For example, clicking on a menu item to an external HTML page causes the page currently displayed in a frame or similar in the JSF page?

    I tried the FrameBorderLayout control and control Frame to try to integrate a picture to display such a page through the establishment of goals for a menu item, but that doesn't seem to work. At least not when in a PanelPage. It works within a basic JSP page.

    I would have thought that it would be possible for an application of JSF to incorporate content from other sites/servers HTML as if a part of the application. Even if it meant the definition of 'wrapper' of some pages effectively sort the link in the JSF application within its rules of navigation.

    Or am I missing something?

    Gene

    Hello

    You can use an iFrame wrapped in a f: tag verbatim. This will make

    Frank

  • What happened to my favorites right click? Now I have ' save page, discovered the image of background etc, junk, I don't use! How to bring back my click bookmarks right? image

    Before the upgrade, I could use the right click to access bookmarks, now I have a load of junk that I don't use and no Favorites. How can I get my favorites via my back of mouse?

    Kind regards

    Ben

    The 'blues star' image 'button' is to Mark this Page in the right-click menu (context menu).

  • Since the update of FF 16.0.1 FF your Page is empty, my bookmarks bar is not displayed automatically + navigation toolbars remains on the first url.

    Since the update of FF 16.0.1 FF your Page is empty, my bookmarks bar is not displayed automatically + navigation toolbars remains on the first url.

    I uninstalled 16.0.1 and reinstalled 15.0.1 and everything worked fine, then I reinstalled 16.0.1 and have questions again.

    Thanks for responding but I already uninstalled and re-installed, have now no problem.

  • mouse only works for low 3/4 of a page and clicks what anyone at the top of page

    Thr mouse will point the cursor anywhere on the screen but will not click on anything on the top of a page. This is a problem because the disconnection of the option is often at the top of the page

    This problem can be caused by that extended the Yahoo! toolbar or extension of Babylon also well down and covers the top of the browser window and therefore links and buttons in this part of the screen not clickable.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • In the old version of Firefox, when I opened a new tab, firefox remember and displays open previous tabs. I could automatically click a prior tab which has been opened to open it again - as my mail. This feature is available in 6.2?

    In the old version of Firefox, when I opened a new tab, firefox remember and displays previous tabs open when I click on the + to the new tab. This display last has shown several places I visited and I could automatically click it to bring up this last point of view. In this function, I could go to one of my last 6 views quite easily and make it appear one of them as a shortcut.

    Try:

  • After clicking on one of the results of Google search Firefox displays wrong web page

    If I click on any of the results of a Google search, I am taken to the wrong web page. When I go back and click again on everything is fine. It started a week ago. Re-loading of Firefox but its actually not difference.

    URL of affected sites

    http://

    User Agent

    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0 .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

    Make a check of malware with a few programs to scan for malware.
    You must use all of the programs, because each detect different malware.
    Make sure that you update each program to get the latest version of the database.

    http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    http://www.superantispyware.com/ - SuperAntispyware
    http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    ..........
    See also 'Spyware on Windows': http://kb.mozillazine.org/Popups_not_blocked and what to do when searches take you on the wrong search site

  • Update the table in a jsf page

    Hello experts

    I have a problem with refreshing table:

    I have an entity named "folder" of this entity, I select a few 'folder' special conditions:

    to exple table in the page 'A' shows all records where State = 'ongoing'

    and table b in the 'B' Page shows all the folder where State = 'TEMP '.

    the isssue here is when I change the State of a row in the second table, tha means when I select a line and State = 'in progress' with a merge feature, it has not appeare in the first tabe,


    I'm tempted to refresh it with iteratorbinding.excutequery () it works for the temp table record that designates the modified line is diseappeard but not there not appeare in the first table.


    I can't add a partial trigger table coz two are not on the same page, and I can't use the iterator to the first page (EXCEPTION of POINTER NULL)...


    I use jdeveloper 12.1.3.0.0, ejb and jpa and jsf pages for interaction with users and oracle for the database db11g

    Why don't you use a workflow?

    To allow the other iterator, you can drag from the data command and drop it onto the second page in the table. Once the table is visible on the second page, switch to source mode and remove the table tag. This will remove the table but leave the iterator binding available on page 2.

    Now, you can run the iterator again two page and when you navigate to a page it should show changes.

    However, this approach comes with certain costs. Add the iterator is available on page two, it is executed when you enter page two, even if you use it on the page. This could cause a delay when rendered, depending on the size of the data.

    Using the task flow will certainly be the best choice!

    Timo

Maybe you are looking for

  • collections of iBooks, gone after update?

    In the recent update to iOS 9.3 on my iPad, it eliminated all dozen or collections so I created - so my almost 1500 books are now only pell-mell in the default collections.  Is there a any way I can back these collections? Is it a question of setting

  • HP Envy 15 Windows 7 Professional clean install Driver questions

    This morning, I did a clean install of Windows 7 on my brand new envy 15 (LW897AV), which includes the deletion of backup partition as the partition driver HP. Unfortunately, many drivers not installed, and I can't find a way to find them. This inclu

  • How to restore (the intensity of the signal) wireless network status icon to the toolbar

    I inadvertently deleted the icon status of wireless network (signal strength) (the signal strength of the bars as ATT) of my toolbar. I would like to add back. I checked the internet and found the answer. Instructions on how to do would be greatly ap

  • Folder view settings and the desktop icons.

    Hello Today, I turned on my computer to find the sight of my account settings are changed and salis.  I also found my command to change the icons of the bureau and all messed up. Since I bought my computer, I used the settings of Windows Vista Home P

  • OpenManage Network Manager does not connect to

    I use the 5.1 openmanage Network Manager to manage the switches PowerConnect 7048. I am able to manage/monitor switches using SNMP without problems. However when I use telnet/ssh it keeps throwing errors saying "1 has failed to authenticate. Please c