ADFFaces (JSF ADF) javascript events vs button actions

Hello,
I currently have a jspx with the following components:
af:selectOneChoice
Onclick=#{backing_bean.myDropdownMethod}
AutoSubmit=true
af:commandButton
Action=#{backing_bean.myButtonMethod}
af:inputText
Value=#{bindings.TransientVoSomeData.inputValue}
the Backing_bean class methods are as follows:
myDropdownMethod {
TransientVoRow.setAttribute("someData", "someValue"); // called in AM via OperationBinding
TransientVoRowIterator.execute();
myButtonMethod {
TransientVoRowIterator.execute();
Basically, the dropdown fires the onclick event when changed, and successfully calls the AM to populate the transient VO attribute with some value (i verified this in the debugger and the VOIterator row does hold the data). However, the af:inputText does not display the value at this point. I must click the button, which does exactly the same call, and ONLY THEN is the data in the VOIterator row displayed in the af:inputText on the page. Also, it seems that clicking the button also causes the dropdown's Onclick event to fire...don't know if this affects it.
Can anyone suggest an easy approach to causing the af:inputText to display the data directly after the onclick event, without having to refresh the page or invoke another event? Do I have to resort to AJAX, or can i survive with the built-in javascript events?
thanks

Try defining partial page rendering between your list and your textItem.
http://download.oracle.com/docs/html/B25947_01/web_complex004.htm#CEGBBGEG

Similar Messages

  • Help in button action to open a file that is attached to main pdf doc

    Hello,
    I have created a button and used an icon saying "click here...." the action I want to attach to it is to have on mouse down for it to open the file which is attached to the document.
    Is this possible?  If so how do I direct the acton of "open file" to be the one attached in document?  can't figure out path...
    there was a suggestion of how to make a javascript for the button action to open the attachment panel...
    this is what was written... and then below that is my question on what was written...
    thomp wrote:Try thisif(app.viewerVersion < 8)
    app.execMenuItem(....);
    else
    app.execMenuItem(....);
    what would go in the '(...)' above?
    I am very poor at javascript, but I am guessing that there is something I would need to fill in there? Am I correct?
    thank you...
    I, too, am trying to get my button action to open the attached document in my pdf form - NOT the navigation panel... I already have it doing that...
    thanks again for any feedback!

    Erin,
    After you set your link... go back into the edit mode, click on your link and go to Actions Tab, click on the "go to page view in another document' under the actions part of that tab (bottom portion of page), then click on Edit... it will open a 'Target Document' window and in the top portion click on 'open in...' drop down box and select 'new window'.... close out and SAVE!
    Hope that helps!

  • Button action event not call in dataprovider

    hi,
    i have JSF table and it's bound to Mysql database table. when i bound the table and run it's working properly but it's button action event is not call action. when i use static jsf table then it's table action event work properly.
    my jsp code is
    <ui:table binding="#{search.search_table}" id="search_table" lite="true" selectMultipleButton="true" sortPanelToggleButton="true"
                                style="height: 70px; left: 240px; top: 240px; position: absolute; width: 600px" title="Search Text :" visible="true" width="600">
                                <ui:tableRowGroup binding="#{search.tableRowGroup1}" id="tableRowGroup1" rows="5" sourceData="#{search.srch_tablevalDataProvider1}" sourceVar="currentRow">
                                    <!--    <ui:tableColumn headerText="Script" id="tableColumn2" width="700">
                                        <ui:staticText id="staticText4" text="#{currentRow.value['search_script']}"/>
                                    </ui:tableColumn>-->
                                    <ui:tableColumn binding="#{search.tableColumn13}" headerText="Search Word" id="tableColumn13" style="#{search.columnStyle}">
                                        <ui:staticText binding="#{search.search_word1}" id="search_word1" text="#{search.search_word1}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{search.tableColumn4}" headerText="#{search_lang['search.contentName']}" height="39" id="tableColumn4"
                                        style="#{search.columnStyle}" width="100">
                                        <ui:staticText id="staticText1" onMouseOver="play_video(this);" text="#{currentRow.value['name']}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{search.tableColumn6}" headerText="#{search_lang['search.srchTag']}" id="tableColumn6"
                                        sort="search_tags" style="#{search.columnStyle}">
                                        <ui:staticText id="staticText3" text="#{currentRow.value['search_tags']}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{search.tableColumn5}" headerText="#{search_lang['search.tpDetail']}" id="tableColumn5" style="#{search.columnStyle}">
                                        <ui:imageHyperlink action="#{search.action}" id="imageHyperlink1" text="#{currentRow.value['details']}"/>
                                        <ui:button action="#{search.button2_action}" id="button2" text="Button"/>
                                    </ui:tableColumn>
                                </ui:tableRowGroup>
                             </ui:table>and back bean code is
    public String button2_action() {
            // TODO: Process the button click action. Return value is a navigation
            // case name where null will return to the same page.
            System.out.println("Invoke");
            return null;
        }i don't know what is problem there if found any solution, help me.

    You need to make sure that the getter of the datatable value returns exactly the same list in the apply request values phase of the form submit as it did during the render response phase of the initial display. Only this way JSF can find out which action which row was been invoked. Alternatively you can also place the data bean in session scope (which may have more impact), or use for example Tomahawk's t:dataTable with preserveDataModel attribute set to "true".

  • JSF - Different REQUIRED Fields depending on button/action

    Hello, I have a form in JSF, with a set of fields, then I also have a Save button and a Search button, for those I wish tho have different required fields os emulate that somehow. What do you think to be the best solution for that?
    Thanks

    We grappled with similar situations and there were many solutions (setting immediate to true,�.etc). But honestly, the easiest solution was to move validation logic to Invoke application phase (i.e. action event of button). Not pretty, but that avoids all the headaches you would need to deal with otherwise.

  • Javascript embedded in button pl/sql event handler not being executed

    Javascript calls not working from pl/sql button event handler. What am I missing? Are specific settings needed to execute javascript from pl/sql proceedures?
    Example: Want to toggle target='_blank' off and on in a button pl/sql event handler to open url call in new window & then reset when processing submit is done & the app returns to the form.
    portal form button's pl/sql submit handler:
    begin
    htp.p('<script language=JavaScript>') ;
    htp.p('this.form.target="_blank"') ;
    htp.p('</script>') ;
    PORTAL.wwa_app_module.set_target('http://www.oracle.com') ;
    htp.p('<script language=JavaScript>') ;
    htp.p('this.form.target="_blank"') ;
    htp.p('</script>') ;
    end ;
    Putting the following in the button's javascript on_click event handler works great:
    this.form.target='_blank'
    to force opening new window with a call in the button's submit pl/sql code via:
    PORTAL.wwa_app_module.set_target('http://www.oracle.com') ;
    but then the target='_blank' is left on when the submit is done & we return to the form.
    putting the above javascript as a function (called fcn_newpage) elsewhere (e.g., after form opens) & calling in the submit pl/sql with
    htp.p('fcn_newpage') ;
    also doesn't work.
    Metalink thought this was an application issue instead of a bug, so thought I'd see if anyone knows what's going wrong here. (Portal 9.0.4.1)

    thanks for your discussion of my post.
    Please clarify:
    "htp.p('fcn_newwindow') sends a string":
    What would you suggest the proper syntax for a function fcn_newwindow() call from a pl/sql javascript block that differs from
    htp.p('<script language="Javascript">') ;
    htp.p('fcn_newwindow');
    htp.p('</script>');
    or more simply
    htp.p('fcn_newwindow') ;
    More generally, what I'm trying to figure out is under what conditions javascript is executed, if ever, in the pl/sql of a button (either the submit or custom event handler, depending on the button).
    I've seen lots of posts asking how to do a simple htp.p('alert("THIS IS TROUBLE")') ; in a pl/sql event handler for a button on a form, but no description of how this can be done successfully.
    In addition to alerts, in my case, I'd like to call a javascript fcn from a pl/sql event handle that would pass a URL (e.g., http://www.oracle.com) where the javascript fcn executed
    window.open(URL). The API call to set_target(URL) in pl/sql has no ability to open in a new window, so calling that is inadequate to my needs and I must resort to javascript.
    Its clear in the PL/SQL of a button, you can effect form components since p_session..set_target & p_session.get_target set or get the contents of form components.
    So to see if javascript ever works, I tried to focus on something simple that only had to set what amounts to an enviromental variable when we returned to the form after a post. I chose to try to change the html value of TARGET from javascript in the PL/SQL button because it doesn't need to be implemented until we finish the post and return to the form.
    So I focused on a hack, setting this.form.TARGET='_blank' in the on_click event handler that forced every subsequent URL call or refresh of the form to be a new window. I then wanted to turn off opening new windows once I'd opened the URL call in a new window by setting TARGET='' in the portal form. I can achieve what I want by coding this.form.TARGET='' in the javascript (on_focus, on_change, or on_mousedown, ...) of every form component that might refresh the form. However, that is a ridiculous hack when a simple htp.p('<script>') ; htp.p('this.form.target=""') ; htp.p('</script>') ; at the end of the button's pl/sql event handle should do the same thing reliably if javascript ever works in the pl/sql event handler.
    If we didn't have access to form components through p_session calls, I'd assume it was a scope issue (what is available from the pl/sql event handler). But unless my syntax is just off, when, if ever, can javascript be used in a portal form's pl/sql event handler for a button?
    if I code a javascript funtion in the forms' pl/sql before displaying form:
    htp.p('<script language="JavaScript">') ;
    htp.p('function fcn_new_window(URL)') ;
    htp.p('window.open(URL)' ) ;
    htp.p('</script>') ;
    the function can be called from a button's on_click javascript event handler:
    fcn_new_window('http://www.oracle.com')
    but from the same button's pl/sql submit event handler this call doesn't work: htp.p('fcn_new_window("http://www.oracle.com")')
    So my questions remain: Is there other syntax I need, or does javascript ever work properly from the pl/sql of a form button's event handler? If it doesn't work, isn't this a bug that should be fixed by Oracle?
    I can probably figure out hacks to make things work the way I need, but executing javascript from pl/sql event handlers seems to be the expected way to affect portal html pages (forms, reports, ...) and it seems not to work as expected. I don't feel I should have to implement hacks for something as simple as calling a javascript function from pl/sql when almost every example I've found in metalink or the forums or Oracle Press's "portal bible" suggests using javascript from pl/sql via the utility htp.p() to effect web page components in portal.
    My TAR on the subject, while still open, returned the result basically: "We can reproduce your situation. Everything looks okay to us, but we can't explain how to use javascript where you want or point you to any documentation that would solve your problem or expain why it should not work the way you want it to. We don't feel its a technical issue. Why don't you post the problem on the portal applications forum."
    I'm hoping I'm just missing something fundamental and everything will work if I implement it a little differently. So if anyone sees my error, please let me know.
    by the way, not sure this is germain, but in reference to your comment:
    "redirections in pl/sql procedures give a peculiar result. in a pl/sql procedure, usually, portals give the last redirection statement and ignore anything else coming after it."
    if I try to raise an alert:
    htp.p('alert("you screwed up")');
    return;
    in a pl/sql event handler, it still doesn't raise the alert, even though its the last thing implemented in the event handler. But if I set the value of a text box using p_session..set_value_as_string() at the same spot, it correctly sets the text box value when I return to the form.

  • Integrate javascript event into Oracle ADF Components

    Can someone show me how to use javascript attribute, for instance onclick, in CoreCommandButton? How do we normally integrate javascript event into Oracle ADF Components?

    Hi,
    you already have a link. Its not an Oracle project but a project of Wilfred from Eurotransplant. Feel free to ping him directly on this or ask this question on the Forms forum, if you haven't already, where he most likely is signed up for.
    Frank

  • Jsf command button action bean method call from text fox

    Hai Friends,
    I want call the command button action bean method from textbox entry time.
    because i develop login form that time user enter user name and password if he press enter from password component that time i want to use the commandbutton action

    What's the problem exactly? Won't the commandbutton action be invoked when you press [enter] in the textbox?

  • How show popup on filedownload button action

    Hi Experts,
    Working on jdev 11.1.1.3.0, ADF BC with rich faces.
    I have requirement in my application like i need to show popup and at the same time need to download file. like on selected rows in the table i have validation on each row, if the validation failed rows i need to show in popup to user at the same time i have validation success rows also those rows i need to generate a file and that file i need to download.
    i have written logic in the command button which has fileDownload, here remaing logic is working fine except showing popup. can any one tell me how to solve this issue.
    Edited by: user5802014 on Aug 19, 2010 5:57 PM

    Hi Frank,
    After chaning actionEvent.forceFullSubmit(); now everything is working fine, but now the problem is if i came from another jsff page to the current page then my file download is not happening i am getting on my browers like error on ....
    javascript:
    function customHandler(event) {
    var exportCmd = AdfPage.PAGE.findComponentByAbsoluteId("pt1:pt_region0:1:cb1")
    var actionEvent = new AdfActionEvent(exportCmd);
    actionEvent.noResponseExpected();
    actionEvent.queue();
    Bean:
    if(downloadFile!=null){
    System.out.println("invoking downloads...............................");
    erks.addScript(context, "customHandler();");
    } if (requestClause != null){
    System.out.println("invoke popup");
    executeSactionCheckVO(requestClause);
    //erks.addScript(context, "showPopup();");
    ADFUtils.invokePopup(this.getP2().getClientId(FacesContext.getCurrentInstance()));
    can you please how to avoid this error or can you please tell me how to call filedownload method in another button action.

  • How to call a bean method from javascript event

    Hi,
    I could not find material on how to call a bean method from javascript, any help would be appreciated.
    Ralph

    Hi,
    Basically, I would like to call a method that I have written in the page java bean, or in the session bean, or application bean, or an external bean, from the javascript events (mouseover, on click, etc...) of a ui jsf component. I.e., I would like to take an action when a user clicks in a column in a datatable.
    Cheers,
    Ralph

  • How to specify the target for a command button action?

    Hi can anybody explain how to achieve the target feature, i mean i need to display the result of the action in a different window after clicking on the button. Is there anyway to achieve this?
    I want to click the button using Javascript.(using button.click event).
    Thanks in advance

    Thanks for the reply Stas, but it is not the solution I wanted. I want display the result of that action into a different frame of the window. As we have target attribute of the anchor tag in HTML. The target attribute of the h:CommandLink is not working. I tried that.
    Anyway thanks again.

  • JavaScript events

    How can I use javascript events with ADF Faces components 11

    This is not possible as the framework is based on JSF, which at its core is a server-side framework. ADF Faces RC provides some facilities for JavaScript events, but these are a complement not a replacement for server-side events.
    Regards,
    ric

  • How to catch a event by button personalization

    Hi,
    I added a button in a standard page by Personalization. On click of button, I need to do some validations.
    As this is not a “Submit Button”, I cannot get the event in processFormRequest.
    So I need to define a event by setting “Action Type” as “Fire Partial Action”.
    But in Personalization structure where I added a button, this option of defining a event is not there.
    So what is the procedure to fire a event through button in case of personalization?
    Please help. Thanks in advance.

    Girish,
    This is basically javascript function to submit page.I have used it many times, haven't faced any problem.
    Your problem, seems to be irrevelant of this.Just in your new page remove this javascript function and then run with submit button, still you should get the same error, essentially your error says " Object name for type View Object is invalid." which has nothing to do with javascript function.
    You don't have to enter anything for defaultformname, just keep it as it is. This function will just submit the page with parametre XXX value as "abc".Also remember attach this function only to item of "button" type and not "submit button" type.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • JSF/ADF How to throw UI failure on SQLException?

    I have a button bound to the persistEntity action for a form listed on my page, but there can't be any mistake on whether this get's inserted in the database as it's part of a workflow. Failure was occurring and after checking the logs I found a SQLException for inserting a null value.
    While this is cleared up by more exact control of required fields, I would like to know if there is a way that I can set the persistEntity to cause a noticeable or blocking UI action so that users can't proceed with a workflow when there is an error in the SQL execution.
    Many thanks,
    Raymond

    Oop, sorry. Thanks for the redirect.
    -Raymond
    This post has been made at the following link: JSF/ADF How to throw UI failure on SQLException?

  • 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

  • Problems while deploying a JSF/ ADF Faces App to Apps Server 10.1.3.0.1

    Dear All,
    I built a JSF based application (Using ADF Faces Components) developed in JDeveloper 10.1.3.1.0 (Application Configuration: [JSF, ADF BC]. The application is running fine with the embedded OC4J intance (automatically aunch by JDeveloper).
    I am now trying to deploy it on the installed Oracle Application Server (running on the same local machine). The details of the versioning for different components in this App server are as follows:
    1. OracleAS J2EE 10.1.3.0.0
    2. Oracle ADF 10.1.3.1.0
    The deployment steps I followed (as given in Chapter 34 of 'Oracle ADF - Developer's Guide for Forms/4GL Developers') seems to be running smoothly. This is because the deploy process ends up showing no erros in the message window.
    However when I tried to test the application with a browser using the Apps Server URL (HTTP://localhost:8888/<my-app>/<firstfile.jspx>), I am finding 'Page not found error'.
    I also tried a manual deployment (using deploy to a WAR file then copy the resulting war & ear files and the xml descriptor file to the Apps server's http root) and gives the war file URL in the browser.
    In this case now I am getting the following error page:
    =====================================================
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    An invalid character was found in text content. Error processing resource
    'http://localhost:8888/HousingWithADF.war'.
    =====================================================
    Any idea?
    Regards,
    Irfan Ilyas
    PS: I am doubtful about creation of Deployment Descriptors step as the documentation is not very clear about exactly which descriptors we need to create. Using my own idea, I tried to create J2EE descriptor, and one tld (taglibrary) file. However, the manual war deployment generates only the tld file in the deploy folder.

    Thanks for the hint.
    OBSERVATION #1:
    After looking through the administration console for OC4J instance, I found my application name with UP status. When drill-down further, the console gives me the URL which can be used to test the application.
    While using the URL, a different error message was found:
    URL: http://localhost:8888/KFUPMHousing/
    Error:
    ====================
    HTTP 403:(Forbidden)
    ================
    You are not authorized to view this page
    You might not have permission to view this directory or page using the credentials you supplied.
    From my experience of Microsoft IIS, I know here I may need to configure the folder permissions for a web-user. But exactly which user and where it is defined (at OS Level or in AS), I am not much sure.
    Can you elaborate?
    OBSERVATION #2:
    The log text for my application shows the following error (for the attempt I did with the URL shown above)
    Log Text
    07/01/05 22:43:38.62 HousingWithADF: JspServlet: unable to dispatch to requested page: Exception:java.io.FileNotFoundException: C
    :\product\10.1.3.1\OracleAS_1\j2ee\home\applications\HousingWithADF\HousingWithADF\HosReqInfo.jspx (The system cannot find the file specified)
    However, I can browse the file on my local disk in the path specified with a little change in the path. The file is found in 'pages' folder within the last folder,named HousingWIthADF. I tried to move the file in the exact path specified in the log and now finding the 'Page not found' error.
    Any idea?
    Irfan Ilyas

Maybe you are looking for

  • The case of the disappearing Movies?

    OK, just got a new 22" IMac and Sync'd it up to the Apple TV. It started syncing and I went to sleep as I knew it would take hours.... Well when I checked it in the morning the Apple TV would not show up in the devices. So I updated everything on bot

  • Plug-in Acrobat Professional for Internet Explorer?

    Hi I've go t Adobe Acrobat Reader Professional 7.0. I need to sign PDF documents in a IE window, but only display the Adobe Acrobar Reader Menu. There´s any chance to open PDF document but show me the sign toolbar and sign it. Thanks in advance. Juan

  • Risks associated with database refresh.

    Hi experts, I need to clarify a  doubt .I have a cloned SAP BW system (from another system i.e SAn to SAN copy)and then after few months after the first clone I need to refresh the database(Oracle 10 G).The reason being I will have some changes in da

  • Sorry but we cant create a repair while Find my iPhone is active

    Hello everyone. First of all please accept my appologies in case im posting to the wrong place. I bought an iphone 5 used, like half year ago on ebay and now it stopped turning on. I browsed for troubleshooting on expresslane and came up to the page

  • CC 2014.2, photomerge, Nikon D810, Windows 7

    Updated to CC 2014.2, but when I try to stitch with Photomerge all goes well until the very end.  As the final merge appears on screen I get a message saying Windows has encountered a problem and must close Photoshop.  This happens with files from bo