Example Wanted:  JSP UIX data binding

Hullo! I'm trying to display an active tree using 9.0.3 JSP UIX. I was successful in straight UIX (thanks to the examples), but can't figure out how do get the databinding correct in JSP/UIX. Does anyone have an example using <uix:tree>, or failing that how about anything substantial in JSP/UIX?
The uiXML/UIX download examples are great, and the online documentation is extensive though I find it hard to follow... but for the JSP side there just aren't any working examples!
Thanks so much.
Heather

Thank you very much for the response.
It got me looking in the right direction, and now I have something working!
Sincerely,
Heather
btw In case anyone else is ever in a similar position, here is an implementation of the above example, with some really silly data plugged in.
jsp" contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="http://xmlns.oracle.com/uix/ui" prefix="uix" %>
<%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
<%@ page import = "oracle.cabo.ui.data.tree.*" %>
<%@ page import = "oracle.cabo.ui.data.*" %>
<%@ page import = "oracle.cabo.ui.*" %>
<%@ page import = "oracle.cabo.ui.data.*" %>
<%-- user interface begins here --%>
<HTML>
<HEAD>
<TITLE>Browse Page</TITLE>
<uix:styleSheet/>
</HEAD>
<BODY>
<uix:pageLayout>
<%-- Main page contents go here --%>
<uix:contents>
<uix:header text="Tree Demo"/>
<uix:spacer height="15" />
<%
SimpleTreeData shop = new SimpleTreeData();
shop.setText("Shop");
shop.setDescription("Spend some money!");
shop.setDestination( "http://bali.us.oracle.com");
shop.setDestinationText( "More Information");
shop.setExpandable(UIConstants.EXPANDABLE_EXPANDED);
SimpleTreeData books = new SimpleTreeData();
books.setText("Books");
books.setDescription("books have pages!");
books.setDestination( "http://bali.us.oracle.com");
books.setDestinationText( "More Information");
books.setExpandable(UIConstants.EXPANDABLE_EXPANDED);
SimpleTreeData art = new SimpleTreeData();
art.setText("Art");
art.setDescription("picasso et al!");
art.setDestination( "http://bali.us.oracle.com");
art.setDestinationText( "More Information");
SimpleTreeData[] bookCategories = { art, art };
books.addChildren( bookCategories );
SimpleTreeData[] categories = { books, books };
shop.addChildren(categories);
ListDataObjectList treeData = new ListDataObjectList();
treeData.addItem(shop);
request.setAttribute("treeData", treeData);
ClientStateTreeDataProxy proxy =
new ClientStateTreeDataProxy("",
request.getParameter(UIConstants.STATE_PARAM),
request.getParameter(UIConstants.NODE_PARAM),
request.getParameter(UIConstants.SELECTION_PARAM));
request.setAttribute("treeProxy", proxy);
%>
<uix:tree id="myId" nodesBinding="treeData@servletRequest"
proxyBinding="treeProxy@servletRequest">
<uix:nodeStamp>
<uix:flowLayout>
<uix:contents>
<uix:link destinationBinding="destination" textBinding="text" />
</uix:contents>
</uix:flowLayout>
</uix:nodeStamp>
</uix:tree>
</uix:contents>
</uix:pageLayout>
</BODY>
</HTML>
<jbo:ReleasePageResources />

Similar Messages

  • I want to use data binding in jsp,just like microsoft ASP's RDS,how can I d

    I want to use data binding in jsp,just like microsoft ASP's RDS,how can I do?

    I can't claim to know exactly what RDS binding involves, but if my hunch is correct, you can get very similar behavior by using JSTL and define your data source using JNDI. See the JSTL spec, my article series about JSTL, or a JSP/JSTL book (such as mine ;-) for details:
    http://java.sun.com/products/jsp/jstl
    http://www.onjava.com/pub/a/onjava/2002/08/14/jstl1.html
    http://www.onjava.com/pub/a/onjava/2002/09/11/jstl2.html
    http://www.onjava.com/pub/a/onjava/2002/10/30/jstl3.html
    http://www.thejspbook.com/

  • 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.

  • 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.

  • 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

  • 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

  • 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

  • Getting at the data binding for table rows in ADF/UIX

    At the highest level, I'm trying to figure out the best way to get spreadsheet-like behavior in a table where some of the cells are editable. The table cells were created using the "model=${uix.current.<columnName>}" mechanism.
    I've been able to specify event handlers triggered by the <primaryclientaction> for a table cell component which call into static java methods. But I haven't been able to figure out what binding to use to get at the Java instance for that cell's row in order to use <invoke> to get at non-static methods in the row's view object. The ${uix.current} binding is stale at that point.
    Are the table row data bindings just gone after the table is rendered or is there some alternate notation that lets me get at them.
    Thanks in advance.

    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

  • 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

  • [UIX] Data not visible in template, litteral instead of the value

    Hello,
    I follow this tuto :How To create a Look and Feel for ADF UIX
    (url : http://www.oracle.com/technology/products/jdev/howtos/10g/adf_uix_laf_ht/index.html)
    So my page is made with a pageLayout.uit.
    And i want to retrieve and display some data (e.g method result or simple string) on every page. But when i run my page, it displays with a literal "${uix.current.value}" instead of theValue.
    It is the same if i put ${ui:cond(..,true,false)}, it display the litteral "${ui:cond(..,..,...)}" instead of true or false.
    This is my page (where i use pageLayout template)
    <?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>
    <!-- Add DataProviders (<data> elements) here -->
    <!--<data name="link">
    <method class="view.Auser" method="getURLAndText"/>
    </data>-->
    <data name="commonName">
    <inline value="Outer text"/>
    </data>
    <data name="rareName">
    <inline value="Rare text"/>
    </data>
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title="Template SIGILI2"/>
    </metaContainer>
    <contents>
    <body>
    <contents>
    <form name="form0" method="post">
    <contents>
    <pageLayout>
    this is my pageLayout.uit
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Copyright (c) Oracle Corporation 2003. All Rights Reserved. -->
    <!-- Template used by sample sample LAF for page layout. -->
    <templateDefinition xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    xmlns:demo="http://www.example.org/demo/templates"
    xmlns:sample="http://xmlns.example.org/laf/sample"
    targetNamespace="http://www.example.org/demo/templates"
    localName="pageLayout">
    <version>$Name: $ ($Revision: 1.0 $) $Date: 2004/02/18 13:40:50 $</version>
    <author>Jonas Jacobi</author>
    <!-- Import template for startarea -->
    <!-- <templates>
    <templateImport source="startContainer.uit"/>
    </templates> -->
    <!-- Define the template's type information - we extend pageLayout -->
    <type base="ui:pageLayout"/>
    <!-- Define the template's content -->
    <content>
    <dataScope>
    <provider>
    <!--<data name="someData">
    <method class="view.Auser" method="getChaine"/>
    </data>-->
    <data name="commonName">
    <inline value="Inner text"/>
    </data>
    </provider>
    <contents>
    <!--Where i want to display my data -->
    <contents>
    <!--<messageStyledText id="txtHeaderInfo" text="${uix.data.dat1.name}"/>-->
    <styledText>
    <attributeMap>
    <rootAttributeMap/>
    </attributeMap>
    </styledText>
    <!--<link text="${uix.data.link.text}"
    destination="${uix.data.link.url}"/>-->
    <styledText text="${uix.data.commonName.value}"/>
    <styledText>
    <attributeMap>
    <rootAttributeMap/>
    </attributeMap>
    </styledText>
    <styledText text="${uix.data.rareName.value}"/>
    </contents>
    But doesn't work.
    I follow this help from JDev Help, Templates and Data Binding[b]
    Thands for your help

    thank for your answer
    As i see it in JDev help, i'm sure it is possible.
    Can someone help me with that problem ?

  • JSP uix:table without bc4j

    Hi!
    I am trying to build a page in JSP including UIX tags for tabs and other layout issues. I would like to include a table. I have some fixed tables I want to include. In UIX XML I have seen I can manually build a table using the <table> tag and build up the table with a header, then row-by-row.
    Is it possible to do the same thing in UIX JSP as well? When I try to cut and paste the code from UIX XML to the JSP and prefix all the tags with uix:, all it gives me is "tag is not registered in taglib". Is there another way to build up a table, other then just plain html?
    One of the reasons I want to use the table tag, is to be able to split up long tables over multiple pages. Using BC4J and view objects is not an option!
    Thanks in advance,
    Jeroen van Veldhuizen

    Yes you can.
    Right click your session facade and choose create data control
    Then drag the query results from your datacontrol onto the page and drop as a pivot table.
    If you don't want to use ADF Binding you'll need to create a managed bean for your JSF that has the correct data collection for a pivot table.

  • Where is detailed description of what data binding language can do?

    Where in the documentation does it clearly spell out exactly what you can do with
    the data binding language (the stuff between "{...}")? I'm trying to understand
    what is happening in the SamplesApp, in the "repeaterTag" module, in XMLString.jsp
    and repeaterTagController.jpf.
    In particular, in XMLString.jsp, it references an expression like this:
    <netui-data:repeater dataSource="{pageContext.xml.employee}">
    I can't figure out how this is working. I can see that the "callPageFlow" tag
    just before this is putting the result of "getXMLStr()" into the "xml" variable.
    This string looks like this:
    <employees>
    <employee title=\"CEO\"><first>Mary</first><last>Smith</last></employee>
    <employee title=\"President\"><first>Mark</first><last>Jones</last></employee>
    <employee title=\"Vice President\"><first>Matt</first><last>Nelson</last></employee>
    <employee title=\"Salesperson\"><first>John</first><last>Doe</last></employee>
    <employee title=\"Office Manager\"><first>Jane</first><last>Doe</last></employee>
    </employees>
    This usage of the data binding language is a little unusual, but I would assume
    it's documented somewhere, right?

    I had already read that description. It has just about one sentence that covers
    the ability to reference elements of an XML string, but without giving any usable
    details. I was already convinced that this and direct variable references were
    worth avoiding, I just wanted to understand the extent of the available features
    first. I guess the lack of any documentation on referencing elements in XML strings
    will make it easier to deprecate :) .
    Eddie O'Neil <[email protected]> wrote:
    David--
    A general data binding description is here:
    http://edocs.bea.com/workshop/docs81/doc/en/workshop/guide/netui/guide/conDatabindingXScript.html
    This help topic describes the NetUI data binding contexts and how
    properties / objects are
    accessed using them. As far as property binding, a question that came
    up in the group earlier,
    public properties always win over JavaBean properties, so if you expose
    data on any Java object
    (page flow, global app, form bean, repeated data item) like this:
    ::::: Controller.jpf
    public String foo = "foo";
    private String anotherFoo = "another foo";
    public String getFoo()
    return anotherFoo;
    and bind to this in a JSP:
    <netui:label value="{pageFlow.foo}"/>
    the value "foo" will display in your page because it is a public property.
    The specific example that you mention below is a sample of using the
    XScript capabilities in the
    8.1 NetUI data binding language to bind directly to parts of an XML document
    without having turned
    the document itself into a JavaBean.
    Frankly, I'd encourage you to use a JavaBean centric approach as we
    will likely deprecate this
    feature in the future in favor of a more XMLBean / JavaBean centric binding
    model. The JavaBean
    property binding model is also much more in-line with the JSP 2.0 expression
    language.
    In the same vein, I'd also suggest following the best practice of
    exposing JavaBean properties on
    your objects instead of using direct binding to fields.
    If you have additional specific questions, feel free to post them
    here and we can address them as
    they come up.
    Hope that helps...
    Eddie
    David Karr wrote:
    Where in the documentation does it clearly spell out exactly what youcan do with
    the data binding language (the stuff between "{...}")? I'm tryingto understand
    what is happening in the SamplesApp, in the "repeaterTag" module,in XMLString.jsp
    and repeaterTagController.jpf.
    In particular, in XMLString.jsp, it references an expression like this:
    <netui-data:repeater dataSource="{pageContext.xml.employee}">
    I can't figure out how this is working. I can see that the "callPageFlow"tag
    just before this is putting the result of "getXMLStr()" into the "xml"variable.
    This string looks like this:
    <employees>
    <employee title=\"CEO\"><first>Mary</first><last>Smith</last></employee>
    <employee title=\"President\"><first>Mark</first><last>Jones</last></employee>
    <employee title=\"Vice President\"><first>Matt</first><last>Nelson</last></employee>
    <employee title=\"Salesperson\"><first>John</first><last>Doe</last></employee>
    <employee title=\"Office Manager\"><first>Jane</first><last>Doe</last></employee>
    </employees>
    This usage of the data binding language is a little unusual, but Iwould assume
    it's documented somewhere, right?

  • Question: about data binding

    hi :
    I want to know components binding database in UIX . for example :
    Component -- "train" , now , I only get data souce from javaBean ,but the data is static . of course , i know this only .I want to know train how to binding database ,
    get value from database.
    i study uix Shortly , please help me . thanks , in advance . It's better provide a example . Thanks , again.
    Follows is via javaBean, code, like this .
    datapage.uix
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    <data name="nodeData">
    <method class="view.NodeBean" method="getTableData"/>
    </data>
    </provider>
    <contents>
    <train value="${bindings.StepSno}">
    <contents childData="${uix.data.nodeData}">
    <link text="${uix.current.text}"/>
    </contents>
    </train>
    </contents>
    NodeBean.java (javaBean)
    static public Object getTableData(RenderingContext context, String namespace, String
    name)
    // The following List is recreated every time this method is called
    // (which is once per page render). A better implementation would
    // move the List creation to a UIX Servlet Event Handler.
    // See the Using a Controller in ADF UIX chapter for more information.
    List list = new ArrayList();
    for (int i = 0; i < 5; i++)
    HashMap row = new HashMap();
    row.put("text", "Row " + i);
    list.add(row);
    return list;
    for this example , i can get data from javaBean as train's value , but the data is
    static , i want to get data from database , but i don't know how to do this . please help me
    thanks very much ,again , in advance .
    Steven

    Hi,
    <train value="${bindings.StepSno}">
    uses Expression Language to bind to the ADf binding object. You can add your own Java bean that accesses the database and reference it in the same way.
    Frank

  • Report data binding error with date values

    I have CF7.02 with a Microsoft Visual FoxPro 9.0 SP1 Database
    that I connect to using ODBC (FoxPro Driver 6.01.8630.01). I send
    my sql results to a CF Report Builder 7.02 PDF report and it works
    fine. If I dump the date values before I change them, they look
    like the following: {ts '2004-12-20 00:00:00'} . However I have
    tried a number of ways of manipulating the date before sending it
    to the report, but I continue to get errors. I don't care what
    format they go to the report in, since the report reformats them
    anyway. I checked to make sure that none of the dates were null.
    For example <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDateTime(#ldCFPrcInputDate#) /> yields values in the
    {ts '2004-12-20 00:00:00'} format when I dump the query results to
    screen. Where:
    ldCFPrcInputDate = 12/20/2004
    CreateODBCDateTime(ldCFPrcInputDate) = {ts '2004-12-20
    00:00:00'}
    ReportQuery.PrcInputDate[lcCurRow] = {ts '2004-12-20
    00:00:00'}
    I get the error:
    Report data binding error Unable to get value for field
    'prcinputdate' of class 'java.util.Date'.
    coldfusion.runtime.OleDateTime -> Date
    Not using the CreateODBCDate function for example <cfset
    ReportQuery.PrcInputDate[lcCurRow] = #ldCFPrcInputDate# /> I
    get:
    Report data binding error Unable to get value for field
    'prcinputdate' of class 'java.util.Date'.
    java.lang.String -> Date
    Here are some of my failed attempts:
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDateTime(#ldCFPrcInputDate#) />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    #ldCFPrcInputDate# />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    DateFormat(CreateODBCDate(#ldCFPrcInputDate#),'mm/dd/yyyy') />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDate(DateFormat(#ldCFPrcInputDate#,'mm/dd/yyyy') />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDate(DateFormat(#ldCFPrcInputDate#,'mm-dd-yyyy') />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    Trim(createODBCDateTime(ldtmpdate)) />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDate({05-07-2006}) />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDate('{05-07-2006}') />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDate(05/07/2006) />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDate('05/07/2006')/>
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDate(parseDateTime('05/07/2006')) />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    parseDateTime(CreateODBCDateTime(05/07/2006)) />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    parseDateTime(CreateODBCDateTime('#ldCFPrcInputDate#')) />
    <cfset ReportQuery.PrcInputDate[lcCurRow] = '{05-07-2006}'
    />
    <cfset ReportQuery.PrcInputDate[lcCurRow] = '{05/07/2006}'
    />
    <cfset ReportQuery.PrcInputDate[lcCurRow] = '05/07/2006'
    />
    I also did some googling without success. Any help is
    appreciated.

    You may want to make sure that the column is not included in
    the query variable list in your report cfr file.
    The newest version of the Report Builder, which may be
    installed on the server, no longer tolerates vars appearing in that
    list of they are not in the query itselft.

  • Data Binding for Custom Controls?

    Hello,
    I'm a little bit confused of how to use databinding for custom controls.
    I know i can bind a property, as seen here http://help.sap.com/saphelp_uiaddon10/helpdata/en/91/f0f3cd6f4d1014b6dd926db0e91070/content.htm, but how can I map whole arrays?
    My problem is the following:
    I want to create a custom table control in SAPUI5 (as the default one doesn't provide the neccessary options and properties I need), but I can't seem to find an example how to bind "rows".
    There has to be a way to do this properly. All I can think of now, and implemented, is, passing the name of the variable in the model...
    var x = new my.controls.complex.table({data: "/status"});
    var row1 = new my.controls.complex.columnHeaderRow();
    row1.addColumn(new my.controls.complex.column({text: "", rowspan: "2", colspan: "1", content: "FIRST_COL"}));
    x.addColumnsRow(row1);
    x.placeAt("content");
    ...my JSON/model looks like:
    { "status": [ {"FIRST_COL": "a" , ...}, {"FIRST_COL": "b", ... }, ... ], ... }
    (which should translate into /status/0/FIRST_COL, /status/1/FIRST_COL, ... AFAIK)
    ... and then I use this variable name by getting the application-wide model and use the variable passed as key for the model... (please note, this code is just a snippet)
           var sapCore = sap.ui.getCore();
                if (sapCore !== undefined) {
                 var model = sapCore.getModel().getObject();
                 if (model === undefined || model == [] || model == null){ } else {
                  $.each(model, function(idx, item){
                   $.each(oControl.getColumnsRows(), function(idx, item2) {
                    $.each(item2.getColumns(), function(idx, item3){
                     var content = item3.getContent();
                     if (content !== undefined && content != ""){
                      outpLine = outpLine + "<td>" + model[idx][content] + "</td>";
    ...which still leaves me with the problem of to get an event to react to re-render on changes within the data model, as well as when there would be just an control-specific model, or just a sub-node within a model etc.
    So my question is:
    Is there a way/best practice to define data binding in a custom control and have a way to react on it, and how to react on data changes within a custom control?
    Thanks & KR
    Chris

    I create a entirely new control, from sap.ui.core.Control.
    sap.ui.core.Control.extend("my.controls.complex.table",{... });
    I did define a aggregation...
            aggregations : { columnsRows: {type : "my.controls.complex.columnRow", multiple : true, visibility: "public"}     },
    ...yet I'm still unclear how I work with this aggregation and databinding. I know we can use the bindAggreation functionallity, but since the aggregation is a object (my.control.complex.columnRow) I don't know how my JSON model should be able to bind to that aggregation (as well as how would one be able to cascade a aggregation like this down futher? For example if there is an aggregation in the object of my aggregation?), plus it still doesn't solve my problem of how I can react (for example redraw) on model changes.
    Thanks in advance,
    Chris

Maybe you are looking for

  • Unable to sync my ipod-library moved to external harddrive

    Please Help I have moved my library to an external harddrive, and had no problems for quite a while, but now i cannot sync my pod. It is saying that the original file cannot be found. I have made sure that itunes is looking in the right place, and ca

  • Installing ubuntu 13.04 on mac?

    I installed windows 8 (64bit) beside OSX (10.8.3) thorugh BootCamp 5. i want to install ubuntu 13.04 beside my OSX and Windows. Can anyone give me some help how can i do it?

  • Help in Optimizing code

    Hello experts, I have a function module that runs so slow, I just want to seek some advice to help me have a better performance speed what can I used and alternatives to make my codes faster... any advice can help Heres my <b> code </b> <b>Declaratio

  • My mac is getting hot

    i want to know if it is normal that the base of my computer gets hot, what should i do?

  • APPLE PLEASE HELP! Mail hangs after start, address book never launches!

    I've been reviewing postings since friday last week about issues with mail/address book after 10.5.2 and here's a summary: • Symptom 1: Mail launches slow • symptom 2: mail hangs while downloading new mail (in my case from 1 particular account accord