Use of javascript within the page fragment

Im trying to use javascript code within a fragment of a page with the tag

AF:resource

But the second time the page reloads I got this error: "ReferenceError: works is undefined"

<af:resource type="javascript">
      function funciona() {
          alert(123);
      }
</af:resource>

IM using JDeveloper 12 c

Check the 'witch hunt during the use of JavaScript in the regions of the ADF' in this document http://www.oracle.com/technetwork/developer-tools/adf/learnmore/march2012-otn-harvest-1571998.pdf

Timo

Tags: Java

Similar Questions

  • Refresh the page fragment data

    Hi all

    I use JDev 11 g, ADF BC, IE7 and Windows XP.

    My use case:

    I'm designing a screen where it is a workflow that toggles the display of screens suitable for the region. I am not able to update the data of the page fragment at the click of a button. I would like to know if activation helps partially to submit for the same purpose. Or are there other alternatives.


    I need to refresh the whole page with the new selection. How this approach?

    Thanks in advance
    -Jyothi

    Published by: JParsam on May 28, 2009 17:26

    OnClick of a button command that I can call action from view id (*) credits.

    Edited by: JParsam may 29, 2009 11:32

    Hello

    If you have added the workflow as a region, then, the region is updated when the property has the value 'ifNeeded' and the value of the 'Refresh' initial settings changed

    Frank

  • How to assign URLs dynamically using button/link on the page of peoplesoft? Please provide detailed instructions.

    How to assign URLs dynamically using button/link on the page of peoplesoft? Please provide detailed instructions.

    1. define the URL, the Z_URL1 or the Z_URL2 definitions

    2. in the change of field button:

    If true Condition then

    ViewURL (URL. Z_URL1);

    On the other

    ViewURL (URL. Z_URL2);

    End - if

  • JavaScript from the page as an argument element

    It is a simple javascript function to remove the space on the P6_JOB_NAME text field

    I want to move the agenda of the APEX page as an argument so that I can reuse this same javascript on several elements of the page function.

    I tried several different ways, as below. But none of them works. No idea where I am going wrong?

    1 work

    function removeSpace() {}

    job_name var = document.getElementById ('P6_JOB_NAME');

    var input_str = job_name.value;

    job_name. Value = input_str.replace (/ \s + / g, ");

    }

    in the text field...

    onChange ='Javascript:removeSpace();'

    2. does not work

    function removeSpace (id) {}

    job_name var = document.getElementById (id);

    var input_str = job_name.value;

    job_name. Value = input_str.replace (/ \s + / g, ");

    }

    in the text field...

    None of these works

    onChange = 'Javascript:removeSpace (this)';

    onChange = 'Javascript:removeSpace('P6_JOB_NAME')';

    Hi JonDaegu-Oracle

    Try using the following code, I didn't test, but I think it will work

    function removeSpace (id) {}

    var input_str = id.value;

    ID. Value = input_str.replace (/ \s + / g, ");

    }

    Concerning

    Salim

  • Declarative component are not available in the page fragment

    Hello

    I created the declarative component... But it can only access *.jsf page not page fragment...

    Hello

    Had in fact I created declarative component by using the page faclet (*.jsf)...  If I create DC using .jspx page... It's work

    Thank you

    Nitesh

  • Error using a taskflow inside a page fragment

    Hello

    I use a taskflow with a region in a jspx and it works.
    But when I put the region in a page fragment and then call the fragment of the jspx page I get the following error:

    < sept 13, 2012 8:39:07 AM PDT > < WARNING > < oracle.adf.view.rich.component.fragment.UIXRegion > < BEA-000000 > <
    java.lang.IllegalStateException: the expression "#{bindings.processViewerTaskflow1.regionModel}" (which has been specified for the "value" attribute RegionModel of the component of the region with the id "r1") evaluated to null.
    This is usually due to an error in the configuration of the objects referred to by this term.
    If it helps, the expression "#{bindings.processViewerTaskflow1} ' value 'null '.
    If it helps, the expression "#{bindings} ' value 'null '. Now using a RegionModel empty instead.
    at oracle.adf.view.rich.component.fragment.UIXRegion.getRegionModel(UIXRegion.java:441)
    at oracle.adf.view.rich.component.fragment.UIXRegion._beginInterruptibleRegion(UIXRegion.java:727)
    at oracle.adf.view.rich.component.fragment.UIXRegion.setupChildrenVisitingContext(UIXRegion.java:538)
    at org.apache.myfaces.trinidad.component.UIXComponent.setupChildrenEncodingContext(UIXComponent.java:1156)

    I made all the bindings using the jdeveloper.

    It's the jspx:

    <? XML version = "1.0" encoding = "UTF - 8"? >
    < xmlns:jsp = "http://java.sun.com/JSP/Page" version = "2.1" jsp:root xmlns:f = "http://java.sun.com/jsf/core".
    xmlns:af = "http://xmlns.oracle.com/adf/faces/rich" >
    < jsp:directive.page contentType = text/html"; Charset = UTF - 8 "/ >
    < f: view >
    < af:document title = "untitled6.jspx" id = "d1" > "
    < af:form id = "f1" >
    < jsp: include page="/untitled3.jsff"/ >
    < / af:form >
    < / af:document >
    < / f: view >
    < / jsp:root >

    And this is the untitled3.jsff file:

    <? XML version = "1.0" encoding = "UTF - 8"? >
    < jsp:root = "http://java.sun.com/JSP/Page" version = "2.1" xmlns:jsp xmlns:af = "http://xmlns.oracle.com/adf/faces/rich" >
    < af:region value = "#{bindings.processViewerTaskflow1.regionModel}" id = "r1" / > "
    < / jsp:root >

    What's wrong?

    Thank you

    Hello

    and that's where you fool you

    Include the JSP does not add the page PageDef file fragment to the Pagedef parent file. For thsis to work, you need to copy all the contents of the JSFF PageDef file in the parent page PageDef file. Add the JSFF to a workflow and workflow as a region on the page will take care of this business for you

    Frank

  • problem with javascript in the page jspx

    Hello

    using the last jdev from RTO 11 g.

    I'll have more javascript which works fine if I try out jdev using a html file but fails when I run the page with the error:
    OracleJSP error: oracle.jsp.parse.JspParseException:
    Error: oracle.xml.parser.v2.XMLParseException (/ adflib/myapp/setup/ui/page/CloseBrowser.jspx):
    [Line no.: column 37 #: 28: name expected instead of].


    JavaScript:

    < af:resource type = "javascript" >
    function getCompId (name) {}
    name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); "
    regexS var = ' [------? &] ' + name + ' = ([^ & #] *)';
    var regex = new RegExp (regexS);
    results var = regex.exec (window.location.href);
    If (results == null) return "";
    otherwise return results [1];
    }
    < / af:resource >

    Hello

    JSPX is a strict xml page... the problem is that your function has a few characters that are interpreted as part of the xml...
    As far as I know using & in xml are not valid... you use & amp; instead...
    so, you should try including your script inside cdata like this

    
    
  • The use of Javascript in the button Clear Cache

    Hi all

    I created a button and under optional URL redirection of the clear Cache, I wrote the page number to clear cache pages, but now I use target as "URL" and the target URL under: -.
    JavaScript:XYZ();

    and JS in HTML header is: -.

    < script language = "JavaScript" type = "text/javascript" >
    function xyz()
    {
    var response = confirm ("are you sure?")
    If (response)
    {
    Window.Location = ' f? p = & APP_ID.:9: & APP_SESSION. »
    }
    on the other
    {
    do something else
    }
    }
    < /script >

    I am therefore able to redirect the user to page 9, but with what I want also to clear cache certain pages (say for ex:-page 5, 6 and 7), so how can I write under URL


    can someone help me?


    Thank you


    Deep

    Hello

    Page 27 of clearing cache to be directly, using the good f? setting clear cache p. Using the value of the claim is to do it manually the APEX motor is done for you, automatically.

    It seems to me that something doesn't work correctly with your specific page. After answering the question of why Larry you think that the page cache is net clear, you should try to rebuild your situation on apex.oracle.com.

    Kind regards
    Arie.

  • He cannot use facebook applications. The pages are blank. Why?

    Facebook recently had an update to their program. Since then, when I try to access applications, all I get are blank pages. They will be fully not load, no matter what I do. All the browsers and flash player are updated. Have you tried the button reload, nothing seems to work. What can I do?

    Reset the page zoom on pages that cause problems: view > Zoom > reset (Ctrl + 0 (zero); Cmd + 0 on Mac)

    You can use one of the following extensions to define a page zoom and the size of the default font on web pages:

  • When you use my wireless mouse, the page jumps up and down

    Then comes my mouse wireless, especially the Center wheel button, the page I look at starting to jump upwards and downwards. What can I do to fix this?

    Often scrool wheel controls the location of the page on the screen and can work automatically when you press the wheel of screlll (perhaps by accident).  Try making sure you don't have puch down on the scrool wheel and may stop this beheaviior.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • use of parameters of the page

    Hello

    I use jdev 11.1.2.4.

    I defined a parameter showAllSkus the link of the page settings tab.

    and assigned a 'true' value to this parameter.

    on my page, I use a component outputText with value #{data.view_SkuSearchPageDef.showAllSkus.inputValue}

    When I run this page, I am getting error.

    javax.el.PropertyNotFoundException: inaccessible target, 'showAllSkus' returned null

    How can any ideas, I allocate/use value defined in the settings of the page?

    Thank you

    It works fine now. Just to share, here's what I did

    1. on the page binds parameters, said new parameter as

    Name = showAll

    Value = #{pageFlowScope.showAll}

    2. on the adfc-config, set the values of parameters of page as

    Value = true / / it can be any value

    Value = #{pageFlowScope.showAll}

    3. on the point of outputText, value that

    #{bindings.showAll}

    also, the call of the conduct of the bounded task

    1. new parameter said

    Name = showAll

    Class = java.lang.String

    Value = #{pageFlowScope.showAll}

    2 set values in the parameters that

    Name = showAll

    Value = true / / it can be any value

    Pass by value = unchecked

    I hope this helps!

    Thank you

  • RH8: Centering table page Centers text within the page

    I have a webhelp imported from MS word with plenty of tables. I used a table style to set up tables in word format.

    What I want: table centered on the page. Text inside the left-aligned table.

    What I get previews and webhelp output: Table centered on the page. Text inside table centered in the table

    (In the editor of HR, the table looks at how I want it with the table centered and text aligned to the left)

    I tried setting the text on the normal style, but has done nothing.

    I know I can manually edit the HTML code, but I don't have the time to do it.

    Please see point 24- http://www.grainge.org/pages/authoring/rh8/using_rh8.htm

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • Use external Javascript to the PDF zoom native control

    This is my first time posting and I'm not sure if this is the right place to post.

    I have an embedded pdf I want to disable the toolbar on. The only downside is that I don't want to rely on people knowing the ways around not having the buttons. Already, I have a zoom in and zoom back button somewhere else on the page. See the Image. I would like to use external keys vs those on the pdf, it's that I'll link to images not PDF I use zoom buttons for. Is it possible to access the zoom features of native adobe through external code reader?

    10-25-2012 1-41-14 PM.png

    I only really have dabled with JS placement in the pdf file.

    This old thread might help you:

    http://forums.Adobe.com/message/4447169

    in particular, the link of pdf_open_parameters near the bottom.

  • The use of JavaScript with the desgin-time properties

    Hi all

    I have a form with a few text fields. I would like to be able to update their legends by programming using JavaScript at design time.

    I don't know how to approach the design time objects.

    Any help would be much appreciated.

    Kamil

    At Design time you genrally cannot run JavaScript in the designer.

    The only option would be a macro, that requieres Designer ES2 or the designer of the ADEP.

    A macro is a javascript file, which is stored in a subfolder of the program folder, which can be performed at the time of design.

    Here's a macro with a flex dialog box I designed to manipulate fields at design time:

    http://thelivecycle.blogspot.com/2011/06/field-designer-macro.html

  • How to use CSS to force the page to full height?

    I'm trying to use CSS to force the content on the page to full height when the content is not long enough to do the job. After reading several articles on the Web, I put the html, body and articletest selectors at a height and min-height of 100%. But it does not work. The yellow area Brown/inner light should extend almost to the bottom, the the two final colors div should be at the bottom of the browser window...

    http://www.keithpurtell.com/kthings/Test01.htm

    You must make two changes as follows:

    (1) change your CSS for the body to look like the following:

    Body {background-color: #FFFFEE;}  / * a E4D9C2 * /.
    color: #31260F;
    font: 1em "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    Width: 100%;
    /*height:100%;*/
    height: 100 %}

    (2) change your CSS #main to look like this:

    #main {background-color: #FFFFEE;}
    margin: 0 0 auto;
    Max-width: 1180px;
    min-width: 30em;
    min-height: 100%;
    overflow: hidden;
    position: relative ;}

    This should do the trick.  He made and tested it on my system.  I put the page online if need be!

    Good luck.

Maybe you are looking for

  • Creating new sites in network

    I just spend most of recovery today since my last attempt at this, so I thought I'd better ask some advice before I try again... Most of the time my macBookPro is connected via Wifi or my home network or a wifi network where I work. And the automatic

  • HDMI to TV

    Hi using my MacBook Air I try to view a movie via HDMI to the TV while using my laptop to surf the web is not displayed on the TV?

  • In the formula box, ' / ' key shows as «»

    The MacBook Air running OS X 10.11.3 and numbers 3.6.1 (2566), when trying to enter "/" in the fx of dialogue, major shows like ' + '. Steps to reproduce: Enter in the cell, type "=" show dialog fx Click on a crowded to start cell formula Click on "/

  • Windows 7 Professional OEM product key

    A full install of Windows 7 Professional OEM Version and want to set up a normal Version of Windows without losing my data. A new product key is available, but the OEM version does not change product key. The link to change product key at the bottom

  • Remove application on runnning

    Hello I developed an application that runs all the time. If you close the application, it requestBackground, and if reset you your device, it will start automatically.My question is, how do I close/delete this type of application? I've searched the f