Data Binding in ADF UIX example trouble

Two related questions:
From the help example 3. Data Binding in ADF UIX example trouble in JDeveloper on UIX. If this worked I was going to run a small java class that captures the login and passes it as a messagebox with a Welcome login name on the first page, but I can't get past the example and path problems.
From the example..."
package yourpackage;
import java.util.Date;
public class CurrentDateBean
public CurrentDateBean() { }
public String getTime()
return (new Date()).toString();
Now, we want to change the page so it uses getTime(). We need to do three things: Tell UIX to data bind the text attribute. Add a <dataScope> to the page to provide data to the content. Write a small "data provider" in Java that can access the bean. First, we'll data bind "text": <text xmlns="http://xmlns.oracle.com/uix/ui"
text="${uix.data.currentDate.time}"/>The example has one small change. The value is changed to ${uix.data.currentDate.time}, which is an expression that defines the data. This is shorthand for "get the time property from currentDate." If you tried running this example, you'd see nothing. That iss because we haven't given currentDate to the page, so the databinding failed, and the "text" is left to null. We do this by adding <dataScope> to the page: <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
<provider>
Q#1?? Trying to follow the demo. The method class and method name do not seem to match the names in the above class from the demo. Am I missing a point here, please help.
<data name="currentDate">
<method class="yourpackage.DataDemo" method="getCurrentDate"/>
</data>
</provider>
<contents>
<text text="${uix.data.currentDate.time}"/>
</contents>
</dataScope>
Q#2?? When I try and apply the demo class to my home.uix XML file with
"<?xml version = '1.0' encoding = 'windows-1252'?>
<page xmlns="http://xmlns.oracle.com/uix/controller"
xmlns:ui="http://xmlns.oracle.com/uix/ui"
xmlns:data="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>
<!-- start Add DataProviders (<data> elements) here -->
<data name="currentDate">
<method class="us.mn.state.dot.apptrack.security.CurrentDateBean" method="getTime()"/>
</data>
<!-- end Add DataProviders (<data> elements) here -->
</provider>
<contents>
<text text="${uix.data.currentDate.time}"/>
<document>
<metaContainer>"
I get the following, and I don't know how to make the UIX XML accept the correct path, please help:
�file:/C:/JDeveloper905p/jdev/mywork/ProjTrack/AppTrack/ViewController/public_html/home.uix: Parsing error, line 12, column 97: Could not find class us.mn.state.dot.apptrack.security.CurrentDateBean

for question 1 the name of the class CurrentDateBean
actually has nothing to do with the el expression
uix.data.currentDate.time. The currentDate part of the
el expression is coming from the method data provider part
of your page:
<data name="currentDate">
<method class="yourpackage.DataDemo"
method="getCurrentDate"/>
</data>
so if you changed the name of the data provider to "foo":
<data name="foo">
<method class="yourpackage.DataDemo"
method="getCurrentDate"/>
</data>
your el would look like this:
uix.data.foo.time
by the way the uix.data part tells UIX to look for
a <data> element define in the <provider> section of
your dataScope.
For question #2, do you have the java file
us.mn.state.dot.apptrack.security.CurrentDateBean on
your classpath and is it compiled? You will get that
warning if it is not on your classpath.
Also you are incorrectly interpreting the example. What
you are doing is trying to reference the actual bean
object and its getTime() method. What you want to do
is write a method data provider that returns your
CurrentDataBean. so uix.data.currentDate would return
a CurrentDateBean instance object. the .time part of the
el expression would tell UIX to look for a method named
getTime() and use that value.
let me know if you have any more questions.

Similar Messages

  • Manual Data binding with ADF table?

    Hi,
    I am making a stored procedure call for fetching data from database on the click of action button. My query has a where clause in it. I am not able to bind my adf table manually with my data control. Can anyone provide me some link for binding my ADF table with data control manually? My requirement is like : - I have one table in which I am displaying data in ADF table. I want to display data in another table on click of some id in the coulmn of first table.

    You basically have two options - you can choose to use ADF Binding - and have your Java class return a collection - then you just right click the class to expose it as an ADF Data control.
    Or if you rather not use ADF Binding, then you'll need to have a managed bean that returns a collection and you can use "regular" JSF binding to bind the table to it.
    The second option is shown in the ADF Faces Components demo: http://www.oracle.com/technology/products/adf/adffaces/11/doc/demo/adf_faces_rc_demo.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

  • ADF UIX programatic data binding

    Oracle ADF UIX Developer's Guide mentions the possibility to use the UIX framework in Java, to create new objects or alter the existing ones.
    E.g. we can create a table using a construct like:
    TableLayoutBean tlb = new TableLayoutBean();
    The same document demonstrates the data binding:
    BoundValue rows = new DataBoundValue(_YOUR_NAMESPACE, YOURNAME, "rows");
    tlb.setIndexedNodeList(new DataObjectListNodeList(rows));
    For "simple" attributes using DataObject DataObjectList, etc. the procedure is clear. But what about creating a data bound table or input text:
    <table model="${bindings.EmpView1}" ... >
    <messageTextInput model="${bindings.DeptCode}"/>
    It’s easy to understand that model="${bindings.EmpView1}" or model="${bindings.DeptCode}" are equivalent to multiple attribute bindings (data, validation, read-only, etc.), but it looks that the classes/methods resolving these equivalences and linking the bean to the corresponding DCControlBinding, are not public (or maybe I was not able to find them).
    How can we obtain programmatically, in Java, the same structure as described above (in XML)? The best would be to use the same classes used when the UIX XML document is parsed to create the page description.
    It would be very nice to be able to use a structure like
    tbl.setModel( new JUCtrlRangeBinding(...) );
    txt.setModel( new JUCtrlValueBinding(...) );
    or maybe
    txt.setAttribute( "model", new TextInputModelBoundValue(...) ) etc.
    In JSF we can do something like:
    ValueBinding vb = application.createValueBinding(value);
    component.setValueBinding(attributeName, vb);
    Can we do something similar in UIX?
    Any help will be appreciated,
    thanks,
    Mircea Ionita

    Since the code is already written, it's a pity that we can't use/extend it. I don't like to say it (sorry) but I find this design choice (implement the "model" only into the XML parsing layer) a little bit strange (or maybe I don't understand... ;-) ). We should (or we are supposed to) be able to do in java everything that we can do in XML.
    I would like to find more support/help for the programmatic approach. I have the feeling that you are too focalised on "use-our-state-of-the-art-tools/wizards-to-write-the-code-for-you" and you forgot that this is not suitable for all projects. E.g. our application creates the user interface according to a layout defined by each user. To generate it, we need to use at maximum the extension mechanism and we can't simply relay on "rendered" attribute etc.
    -When should we expect this new UIX release?
    -What about the UIX controller? The Struts controller will replace it?
    -What about the source code of uixexp2-demo.jar (distributed with ADF_UIX_component_guide)?
    -Why while debugging we can't set a method/class breakpoint on UIX classes (to understand the data flow) - the stack is secret?
    Thanks

  • Binding Editors not present in ADF UIX

    Hi
    I have been having some trouble with accessing both the Boolean Binding Editor and the LOV Editor from the structure window, when in design mode of an ADF UIX page.
    My bindings are present, but when I 'Edit' the binding, the only option available to me is to select the Iterator and the attribute.
    The documentation keeps telling me to select different tabs, but there aren't any!
    Anyone had this problem????
    I'm on;
    Oracle IDE     9.0.5.16.27
    Business Components Version     9.0.5.16.0
    UML Modelers Version     9.0.5.14.78
    Versioning Support     9.0.5.14.78
    WebDAV Support Version     9.0.5.14.78
    Struts Modeler Version     9.0.5.4.22
    Designer Generators Framework     9.0.5.5.71
    ADF UIX     2.2.8
    java.version     1.4.2
    java.home     C:\j2sdk1.4.2_04\jre
    java.vm.name     Java HotSpot(TM) Client VM
    java.vm.vendor     Sun Microsystems Inc.
    java.vm.version     1.4.2-b28
    user.language     en
    user.region     <no value assigned>
    user.name     chris.bell
    user.home     C:\Documents and Settings\chris.bell
    user.dir     C:\Software\Oracle\jdev9052\jdev\bin
    os.name     Windows XP
    os.version     5.1
    os.arch     x86
    http.proxyHost     <no value assigned>
    http.proxyPort     <no value assigned>
    http.nonProxyHosts     <no value assigned>
    ide.patches     
    Thanks in advance
    Chris

    the primaryclient action should pass the rowkey of the current row (${uix.current.rowKeyStr}) as a parameter. This way the server can find the corresponding row on the server in an event handler.
    see
    http://www.oracle.com/technology/products/jdev/tips/jacobi/edittable/tip_adfuixtable_edit.html

  • New to UIX : Need help in data binding

    I am new to UIX. I am using jDeveloper 9.0.5.2 (ADF UIX version is 2.2.8). I need to create a simple table with one column with checkbox, one column with input field and 2 columns from database query. How should I go about it ?
    I went through some tutorial but it's not helping me much. Can you point me to some examples / Tutorials which can help me to move further.
    Thanks in Advance.
    Sid.

    Hi Sid,
    you can do all that you are wanting to do using UIX and ADF but it's not as straight forward as dragging components from the data control palette. You have to write a bit of code in the source viewer in the UIX page.
    Refer to this document to create an editable table:
    http://www.oracle.com/technology/products/jdev/tips/jacobi/edittable/tip_adfuixtable_edit.html
    also read forum post: question regarding ADF UIX editable tables
    this document shows you how to do LOV's:
    http://www.oracle.com/technology/products/jdev/howtos/10g/adf_uix_lov_ht/index.html
    once you have the editable table working properly, you can add LOV code and other components to the selected column of the table. I suggest that you get the editable table working properly before trying to add lovs and checkboxes etc..
    another simpler option would be a read-only table with a link to an edit page containing an input form (for the same data control) without navigation. the input form could be on the same page as the read-only table, or a different page.
    regards,
    Brenden

  • ADF UIX with ADF Binding without Struts

    After trying the CRUD tutorial from the "Complete ADF UIX Application (Browse, Create, Update, Delete)" -(http://otn.oracle.com/products/jdev/collateral/tutorials/9050/adfuix_tut.html), I found it may be thousands of struts actions in my upcoming project.
    It will be difficult to merge and sync my team members works and the usefulness of StrutsPageFlow diagram will decrease severely although it is very convenient to drag data control operations to struts data actions without coding.
    I am trying to use ADF Controller event handler as my page flow engine to eliminate these drawbacks.
    When I use ADF controller as my page flow engine, if I have to pass ui model reference, initialize binding container, get binding container, get application module and refresh binding container, ... manually in my event handler codes just like the BasicDataAction class does in "ADF data binding primer (http://www.geocities.com/smuench/adfprimer/)"?
    Is there any document that cover this information or any suggestions?
    Daniel

    ADF Controller questions should be posted in the JDeveloper forum.

  • ADF UIX: How to define a binding's subtype?

    In an ADF-UIX project, we have deleted a binding which had been automatically created by a drag and drop operation that generated a multirecord master-detail form.
    When we try to recreate the binding using the binding editor (in application navigator, mouse right click and select the ...UIModel.xml file -> Create Binding), we choose to create a binding of type "range" (since the icon is of the same type than the icons for bindings generated automatically for a multirecord detail), however we get a binding of subtype "DCTable" instead of a "DCHGrid". There doesn't seem to be any way to create a "DCHGrid" binding and the UIModel.xml file is not editable.
    The problem is that the DCTable doesn't render properly when the UIX form is run.
    Any suggestions?

    The reason for deleting it was because the Data Binding is not always correclty refreshed after a column is added to the underlying VO. Initially we thought it would be necessary to recreate the binding, but using the drag & drop method would have been costly as the form was complex and a lot had been modified after the initial drag & drop operation.
    The case where the refresh on the binding is not made is when the binding is displaying all the attributes available within the iterator. Surprisingly, if the binding is only using a subset of the attributes of the iterator, then a new attribute on the underlying VO is immediately displayed.

  • 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

  • Stuck at error with How To Example for Data Binding in Multi-Form App

    I have succesfully completed the section "Serial Forms Use Case" by Ralph Gordon's in "Managing ADF JClient Data Binding in a Multi-Fom Application" How To Document. Everything worked as explained.
    Then I tried doing the second section "Concurrent Form Use Case". I got stuck there.
    Im sure it's just something silly, but I would love to complete this section.
    I get the follwing error when I click on the open details button in the master form:
    java.lang.ClassCastException: portaluniverse.debitorder.model.dao.ClientViewRowImpl
         at portaluniverse.debitorder.view.debitorder.debitform.openButton_actionPerformed(debitform.java:545)
         at portaluniverse.debitorder.view.debitorder.debitform.access$6000171(debitform.java:47)
         at portaluniverse.debitorder.view.debitorder.debitform$2.actionPerformed(debitform.java:144)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
         at java.awt.Component.processMouseEvent(Component.java:5100)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
         at java.awt.Container.dispatchEventImpl(Container.java:1613)
         at java.awt.Window.dispatchEventImpl(Window.java:1606)
         at java.awt.Component.dispatchEvent(Component.java)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:458)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    The error appears on this line:
    RowSetIterator detailAccessor = (RowSetIterator)row.getAttribute("ClientView");
    The above line of code was taken out of the following method:
    // object used in the following action listener
    oracle.jbo.Key masterRowKey ;
    // specify the action listener
    private void openButton_actionPerformed(ActionEvent e) {
    ClientForm df = new ClientForm();
    // note that the setBindingContainer() method will be defined in DetailForm.java
    df.setBindingContainer(createDetailBinding());
    // get master current row, get detail accessor iterator, then bind detail form iterator binding to
    // detail accessor iterator
    DCIteratorBinding iterBinding = getPanelBinding().findIteratorBinding("DebitOrderViewIterator");
    Row row = iterBinding.getCurrentRow();
    if (masterRowKey != null && row.getKey().equals(masterRowKey)) {
    //create a new RowSet Iterator for the same master to avoid auto-synchronization of currency
    RowSetIterator secondaryRSI = (RowSetIterator)iterBinding.getViewObject().createRowSetIterator(null);
    df.getPanelBinding().findIteratorBinding("ClientViewIterator").bindRowSetIterator(secondaryRSI, false);
    } else {
    RowSetIterator detailAccessor = (RowSetIterator)row.getAttribute("ClientView");
    df.getPanelBinding().findIteratorBinding("ClientViewIterator").bindRowSetIterator(detailAccessor, false);
    df.setVisible(true);
    My Master Form is called "DebitForm.java" and my Details Form is called "ClientForm.java".
    I appreciate any help.
    Thank-you in advance.
    Leana

    Leana,
    I'll point Ralph to this question. I can't see a difference between your code and Ralph's. Which JDeveloper version do you use use?
    Frank

  • How to handle html:multibox in jsp with ADF Data Binding

    Hi,
    I like to use html:multibox feature in my jsp with ADF Data Binding. I am able to retrieve checked values in the DataForwardAction form. However, when the page is refreshed, the checkboxes are not persistent and yet an error showing
    "JBO-25009: unable to create object type ....oracle.jbo.domain.Array" appears.
    Here is my jsp code:
    <c:forEach var="type" items="${bindings.SystemTypeView1.rangeSet}">
    <c:if test="${Row['SystemGroup'] == type['SystemGroup']}">
    <br>
    <html:multibox property="selectedSystemType">
    <c:out value="${type.SystemType}"/>
    </html:multibox>
    <c:out value="${type.TypeDesc}"/>
    </c:if>
    </c:forEach>
    Can anyone tell me how to handle html:multibox with ADF Data Binding and make the checkboxes persistent.

    Generally this can be done.
    I see a problem with your use case, which has nothing to do with jdev or java:
    How do you identify the user when he comes back to finish the form?
    For this you can't use information like session cookie or IP address because they change.
    So you have to save some information about the user which lets you identify him when he comes back. All other requirements can be implemented by ADF.
    Timo

  • Help: Data binding using uix:choice

    I have a uix jsp page with the following code snippets (trying to make a simple drop down list):
    <jbo:DataSource id="ds2" appid="PubModuleDef" viewobject="PubModule.FOAOIDGroupsVO" />
    and further down:
    <uix:choice>
    <uix:contents>
    <jbo:RowsetIterate datasource="ds2">
    <uix:option text="<%= ds2.getRowSet().getCurrentRow().getAttribute(\"Name\") %>" />
    </jbo:RowsetIterate>
    </uix:contents>
    </uix:choice>
    I am looking for a more elegant way to do this. Particularly I would like to eliminate the <%= ... %> code but I simply have not been able to figure out how to use Data Binding...
    Any advice?
    Claus

    Hi Matthias,
    I hope this is what you are looking for:
    http://help.sap.com/saphelp_erp2004/helpdata/en/fb/fbb84c20df274aa52a0b0833769057/frameset.htm
    Regards,
    Rainer

  • UIX Data Binding sorting

    I set up a UIX drop down data binding field on my application which works great, now I need to make the list sorted but i do not know where and how to do this. Does anyone know?

    You've got to use the BC4J bindings; or build a bean, or a
    DataObjectList which present your data. Take a look at the BC4J chapter
    of the Developer's Guide.

  • Adf uix, removing date picker

    I am working (with jdev 10.1.2) to an adf uix project. In some messagedatefield the date picker is not useful, and I don’t want the user to try to use it. How can I remove it?
    Thanks in advance, Mauro

    You can use the messageTextInput with a onSubmitValidator
    <onSubmitValidater>
    <date dateStyle="short"/>
    </onSubmitValidater>
    This will validate that the input is of the short date format.
    Jeanne

  • ADF UIX table example: oracle.cabo.doc.* missing

    Hi,
    I'm working through the Oracle ADF UIX Developer's Guide and want to try the ADF UIX Table Example. Unfortunately I don't seem to have the classes which are referred to in that example (located in oracle.cabo.doc.demo.table..), which makes it difficult for me to follow and understand the example.
    I've found a reply to a post to this forum of 26-nov-2002 where it is stated that these files were at that moment not yet available.
    My question is: have these files become available in the meantime. If so, wher can I find them?
    Regards,
    Anton

    Clicking on a sortable header generates a sort event. You need to specify a handler for this event. The error you see is a result of the application not knowing how to handle the sort event. On your page you should include something like the following to handle the sort event:
    <handlers>
    <event name="sort">
    <method class="myPackage.myClass" method="doMySort"/>
    </event>
    </handlers>
    For more details, see the "Sortable Column Headers" section in this chapter of the ADF UIX Dev Guide: http://helponline.oracle.com/jdeveloper/help/state/content/navSetId.jdeveloper/navId.4/vtAnchor.Sort/vtTopicFile.jdeveloper%7Cuixhelp%7Cuixdevguide%7Ctables%7Ehtml/

Maybe you are looking for

  • Add Z conditions in the Purchase Order

    Hi Gurus, We have created a Z condition in the RM0000 pricing procedure and we have addded a requirement and Formula for the same. If the requirement matches, then Formula is executed for assigning value in this condition. Now, when I try to create P

  • Is there any difference , selecting particular string from left to right

    hi we have a problem for selecting a string ... we selecting a string from JEditorPane .. useing JEditorPane.getselectedText(); After selecting text we adding some tags to selected text it working fine when we are selecting from right to left . when

  • Consignment / Production

    Hi all, I have a scenario where a company will be sending us raw materials into our warehouse. We need to keep these values reflected in our inventory, but there should be no accounting impact (So i was thinking vendor consignment). However, eventual

  • Showing Images in Japplet

    Hi All my code Image img = new Image(); img = getImage(getDocumentBase(), "images/db_logo2.gif"); no error found when compile but the image wun show, anyone knows?

  • Coverting to mp3

    Whenever I try to convert songs I bought on iTunes to MP3, it says the song "could not be converted because protected files cannot be converted to other formats". How can I fix that?