ADF UIX and Javascript

Hello,
I am new in ADF UIX...
I have a table in ADF UIX and I would like to use some my javascript functions. I know I have to set: <table proxied="true">....</table> but where I can write my functions, in an included file ? I mean, how does the interaction between the XML configuration file and javascript work ?
Thank in advance,
Henry

Hi Rade Todorovich,
As mentioned previously, if you had placed the javascript as indexed child of head element it would be fine.
<Head> is named child of <metaContainer> which inturn is named child of <document> element. The example below should make it clear.
This is how the UIX document would be
<?xml version="1.0" encoding="windows-1252"?>
<page xmlns="http://xmlns.oracle.com/uix/controller"
xmlns:ui="http://xmlns.oracle.com/uix/ui"
xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
xmlns:html="http://www.w3.org/TR/REC-html40"
expressionLanguage="el">
<content>
<dataScope xmlns="http://xmlns.oracle.com/uix/ui">
<provider>
<!-- Add DataProviders (<data> elements) here -->
</provider>
<contents>
<document>
<metaContainer>
<!-- Set the page title -->
<head title="test">
<contents>
<!-- case 1 -->
<script source="./cabo/js/test.js"/>
<script>
<contents>
function theFunction()
alert('the function');
</contents>
</script>
</contents>
</head>
</metaContainer>
<contents>
<body>
<contents>
<form name="form0">
<!-- case 2 -->
<contents>
<script>
<contents>
function hi()
alert('hi');
</contents>
</script>
<button text="call-hi" name="fn" onClick="return hi();"/>
<button text="call-theFunction" name="fn1" onClick="return theFunction();"/>
</contents>
</form>
</contents>
</body>
</contents>
</document>
</contents>
</dataScope>
</content>
<handlers>
<!-- Add EventHandlers (<event> elements) here -->
</handlers>
</page>
There are two usages:
Case 1
In your html it would just appear the way you would normally write a JS function with in the head
<html>
<head>
<title></title>
<META>
<script language="javascript" src="./cabo/js/test.js">
<!-- case 1-->
<scirpt language="javascript">
theFunction()
</script>
</head>
<!-- case 2 -->
<form ....>
</form>
<script language="javascript">
function hi()
alert('hi');
</script>
</html>
Case 2
As such <script> element can occur in HTML document.
as mentioned in http://www.w3.org/TR/html401/interact/scripts.html#h-18.2.1
In the same way UIX also allows the use of script element with in its <body> element.
With case 2 you can see the way the script gets inlined in the HTML document. Please run the UIX and view source for the rendered page. It should become obvious.
Thanks,
Vijay Venkataraman

Similar Messages

  • Uploading xml file using ADF UIX and storing in ordsys.orddoc field

    I am using ADF UIX and I am using the messageFileUpload tag to upload an XML file into the database (the file contains special characters like hyphens, apostrophes, $, etc). Once in the database I have a procedure which puts it into a clob field using the dbms_lob package. However, what exactly does ordsys.orddoc do with special characters? If I debug my procedure I see that 1 of 4 hyphens and 3 apostrophes have been turned into a character that looks like a square. Anyone know what is going on?

    It should pass binary information only, no conversion at all.
    The conversion is likely in messageFileUpload or the dbms_lob package you are using. Or you may need to tell DBMS_LOB the character set the XML file is in?
    You may want to upload the file using the interMedia tag library... Using uploadFormData?
    http://www.oracle.com/technology/software/products/intermedia/htdocs/descriptions/tag_library.html
    http://www.oracle.com/technology/products/intermedia/htdocs/jsptaglib/html/toc.htm
    Larry

  • Adf uix and 800*600 resolution

    We need to develop an application with adf uix and 800*600 resolution.
    It seems that uix rendering is not so fine with 800*600 resolution.
    What is the suggested workaround to this problem?
    Do we need to customize the look and feel (and what customization steps do we need to perform) or what else?
    Thanks in advance, Mauro

    800*600 did work until for a couple of days ago when it did start saying "sync. out of area"
    Its a siemens something screen... 5 years old...
    i did look at the cable to the screen one "pigg" of the 15 "piggs" are missing.. could it be some problem there... all other res. are working without a problem..
    the screen should work at 800*600 at 100hz

  • File upload, download using ADF UIX and not JSP

    I have examples for the file upload, download using JSP
    But I want to use ADF UIX. Look and feel in this is impressing and I want to use this. Any one have example for this.
    Users will select a file from their desktop
    This will be stored into the database (Any document. Word, Excel)
    When they query the records then the UIX column need to give a hyperlink. Clicking on the link should prompt to download the file to the local system

    Sure, I use the Apache Commons File Upload package, so that is what I will discuss here ( [Commons File Upload|http://commons.apache.org/fileupload/] ).
    The Commons File Upload uses instances of ProgressListener to receive upload progress status. So first create a simple class that implements ProgressListener:
    public class ProgressListenerImpl implements ProgressListener {
        private int percent = 0;
        public int getPercentComplete() {
            return percent;
        public void update(long pBytesRead, long pContentLength, int pItems) {
            if (pContentLength > -1) { //content length is known;
                percent = (new Long((pBytesRead / pContentLength) * 100)).intValue();
    }So in your Servlet that handles file upload you will need to create an instance of this ProgressListenerImpl, register it as a listener and store it in the session:
    ServletFileUpload upload = new ServletFileUpload();
    ProgressListenerImpl listener = new ProgressListenerImpl();
    upload.setProgressListener(listener);
    request.getSession().setAttribute("ProgressListener", listener);
    ...Now create another servlet that will retrieve the ProgressListenerImpl, get the percent complete and write it back (how you actually write it back is up to you, could be text, an XML file, a JSON object, up to you):
    ProgressListenerImpl listener = (ProgressListenerImpl) request.getSession().getAttribute("ProgressListener");
    response.getWriter().println("" + listener.getPercentComplete());
    ...Then your XMLHttpRequest object will call this second servlet and read the string returned as the percent complete.
    HTH

  • Oracle ADF UIX and Struts

    Does Oracle ADF UIX use Struts components internally? If yes, Does Oracle Support the issues that arises because this internally used Struts components? (I am using Oracle ADF in my application.
    Thanks,
    Aravind.

    DataForwardAction and DataAction are build on top of struts actions to coordinate ADF databindings and it's life cycle;
    UIX, has xmlns:struts="http://xmlns.oracle.com/uix/struts" this XML namespace has some elements like
    <struts:form> and <struts:messageTextInput> also <struts:dataScope>
    They work like struts jsp tag;
    here a good paper;
    http://download-west.oracle.com/otn_hosted_doc/jdeveloper/904preview/uixhelp/uixdevguide/struts.html
    Marcos Ortega
    Brazil

  • Adf uix and blaf

    Hello I've known The Browser Look and Feel (BLAF). I'd like to use that to do a form printable page (in a new window) without the navigation buttons . In next link there's an explanation but really I can't understand how I must use BLAF in my uix page:
    http://www.oracle.com/technology/tech/blaf/specs/printAndPreview_flow.html
    How can I do to interact a page uix with blaf?
    thanks!!

    The BLAF - as far as I understand it - is the usability concept behind UIX. So, UIX already implements (in part?) BLAF.
    To create a printable version of a page you use the showFacet element. The page "Customization of ADF UIX" will show you how to use it. Search the help for "showFacet".
    The facet already removes lots of elements not suitable for printing from the provided LAFs. You can do a
    rendered="${uix.renderingContext.rendererManager.facet!='printable'}in your controls to further control the visibility of elements.
    Sascha

  • ADF UIX and Database Changes

    We are in the process of designing an entirely new system. Our data model is still changing but we are also trying to develop programs using Jdeveloper ADF UIX. Here is our issue; whenever our database tables change, we have to refresh our developed programs. Doing a synchronize on the view objects doesn't seem to update the xml or java files. Is there an easy way to do this? I find that the xml or java files still reference old fields that have been renamed or removed from the database. We are using Jdeveloper 10g.
    Thanks!

    I am very new to Jdeveloper 10G...First of all i want to create a screen with multiple rows and this screen should open up in Insert mode...and then on the button click i want a database procedure to be called which would then insert these rows into the table after few validations...
    Now could you tell me how to create a screen with multiple rows in insert mode and if you have some example of referring to a database procedure then could you please point me to that?

  • ADF, UIX and ORDDOC

    JDev 9.0.5.2 ADF, UIX, Struts
    When I try to create a new record and upload a file as an ORDDOC type, I get ArrayOutOfBoundsException.
    My database table and Entity Object have 2 columns:
    DocumentId - DbSequence (trigger in database to increment id)
    DocFile - OrdDocDomain (ORDSYS.ORDDOC)
    Anyone have any ideas?

    See the following thread for the solution:
    Re: ADF UIX upload size does not exceed 2M

  • ADF UIX and Jdeveloper 10.1.3.0.4

    Hello all,
    I was trying to make a ADF UIX form and am attempting to use Jdeveloper 10.1.3.0.4.
    It looks as if ADF UIX components cannot be made with Jdeveloper 10.1.3.0.4.
    Is this true?
    Thanks for any help,
    Bradley

    Yes it is true.
    please read this:
    http://www.oracle.com/technology/products/jdev/collateral/papers/9.0.5.0/adfuix_roadmap/adfuix_roadmap.html

  • Should I upgrade to STRUTS, ADF-UIX or to JSF

    My applications still use the older bc4j objects and the trivial page flow manager. I have been looking at upgrading these apps to ADF-UIX and using STRUTS.
    With the flurry of announcements about JSF, should I skip the planned upgrade above and go directly to JSF, if it's stable and complete enough, or wait until it is?
    Thanks for any thoughts on this.
    Steve

    Shay,
    Thanks for the quick response. Your comments on the lack of data binding cleared it up for me. I use data binding in my UIX code right now and plan to use more.
    I will wait on JSF until a version is available with this feature.
    Steve

  • JDev 10.1.2 / ADF UIX: Approach to render data in levels/groups

    Hi guys, I'm looking for ideas on how to use ADF (UIX and BO) to render (and let the user work with) a structure of 3 tables which have a parent->child->child-of-the-child relationship.
    The need is to show a table with the parent in one row and below of it all its children and below of each children its own children. Also, the lowest level rows have numeric data which have to be summarized by the parent and so on upwards; and the lowest level rows should be selectable for edition in another page, and after edition return to the table.
    Is the recommended approach to use the hGrid to do this?
    Or should I use plain JSP and customized tags to achieve this (for easiness)?
    Are there any other options?

    Solved it!! :-)
    In the UIX page I check for the proxy in the event result, if it is there I take it, otherwise I take it from bindingcontext. Is this the right way to do it? Here is the UIX code:
                            <hGrid id="pptoHGrid" alternateText="No items were found"
                                   treeData="${bindings.bindingContext['tree']}">
                              <boundAttribute name="proxy">
                                <if>
                                  <comparison type="equals">
                                    <null/>
                                    <dataObject default="${uix.eventResult.hGridProxy}"/>
                                  </comparison>
                                  <dataObject default="${bindings.bindingContext['hGridProxy']}"/>
                                  <dataObject default="${uix.eventResult.hGridProxy}"/>
                                </if>
                              </boundAttribute>Greets,
    Fernando

  • UIX and Struts ActionForm

    Hi,
    Can I use Struts ActionForm and ADF UIX?
    Thanks

    The "Simple Hello World sample using ADF UIX and JDeveloper 10g Preview" application integrates Struts with ADF UIX.
    http://jjacobi.blogspot.com/2003_11_30_jjacobi_archive.html
    Simple ADF UIX User Input Application
    http://www.oracle.com/technology/products/jdev/howtos/10g/adf_uix_userinput_ht/index.html

  • ADF UIX: communication between more than one browser window

    Dear Sirs...
    how can i open more than one browser window using ADF UIX and jdeveloper 10.1.2 such that the data entered in the second window affects the data in the first?
    for example in the date field, a popup window appear that allows me to select the date, and then the selection appears in the first window.
    how can i achieve something similar? i am using UIX not JSP
    thanks for any help in advance
    best regards

    dear sir...
    i am afraid you got me wrong, i am not talking about the database values.
    let me give you an example of what i am trying to achieve:
    1- create a date field, create an input forum to fill that field (uix page)
    2- now you run the application, try to click the icon near the date field, a new popup window will appear, that helps you enter the date value.
    3- when you select the value, the popup window disappears and the date is inserted into the forum
    i am trying to achieve something similar.
    thanks for your previous answer, but you got my question wrong.
    best regards

  • Making a delete commit automatically with ADF BC, Struts and ADF UIX

    I'm trying to create a delete action that commits to the database automatically using ADF Business Components, Struts and ADF UIX.
    I have a browse page from which the user can view all records in the table, and perform edit, create and delete actions on the data.
    When the user selects a record and clicks edit they are taken to a screen where they can amend the details of that record. Create works in a similar way, but the create action on the view object is invoked before taking the user to the edit page (this is done by linking the browse page to an ADF DataAction (bound to Create) on the Struts page flow diagram, and then linking the ADF DataAction to the edit page).
    When the user clicks submit on the edit page, the container follows a forward from the edit page to an ADF DataAction bound to the Commit method, and then from there a forward back to the browse page.
    This seems to work fine for edit and create, but when I try to do something similar for delete, it behaves unpredictably - sometimes the delete is committed to the database, sometimes not.
    To be more specific, the way I have tried to implement the auto commit delete is as follows:
    There is a UIX submitButton on the browse page called Delete. When clicked, this button triggers an event, which is caught by an event handler inside the page. The event handler causes the UIX servlet to take a forward to an ADF DataAction bound to the Delete method on the relevant view object. It thens follows a forward from the previously mentioned DataAction to another ADF DataAction bound to the Commit method for the application module. There is then a forward leading back to the browse page.
    Has anyone else encountered similar problems?

    did you figure this out?

  • ADF UIX Struts and the BajaContext, Page, and PageEvent

    Hi,
    I'm hoping someone can point me to the right piece of documentation, but I can't seem to figure out how to build the link between 1) the new ADF bindings and the UIX controller event handler objects such as the BajaContext and 2) a UIX event handler and the ADF bindings.
    We used the ServletBindingUtils object to gain a handle on BC4J objects within UIX event handlers. To get the application module, we'd use getApplicationModule and pass in the BajaContext object. Or, the BindingContext, but this context is the oracle.cabo.data.jbo.bind.BindingContext, not oracle.adf.model.BindingContext.
    Also, the opposite question remains on how does one obtain a handle the Page, PageEvent, and BajaContext from the struts side, from say the DataActionContext?
    If there is no link (or not one easily obtained) are there plans to provide one, or are these two controller mechanisms to remain separate?
    Thanks much,

    I don't know if this will help:
    http://helponline.oracle.com/jdeveloper/help/state/content/navSetId.jdeveloper/navId.4/vtAnchor.handlingEvents/vtTopicFile.jdeveloper%7Cuixhelp%7Cuixdevguide%7Cintroducingbaja%7Ehtml/
    There is a snippet to finding the BajaContext off of the rendering context:
    BajaContext bajaContext = BajaRenderingContext.getBajaContext(context);
    I'm not sure if something similar can be done with the ActionContext or not.
    Brad

Maybe you are looking for