Regarding Model Data Binding.

Hi Jain,
Data binding enables data transfer between views and models, so that we don't have to add or change controller coding to work with models.
Syntax for DataBinding:
For <htmlb:InputField>
<htmlb:InputField value="//query/a"/>
This example code creates an inputfield that takes its initial value from the a attribute of  query model.
here query is the instance for model we can define in conroller Do init method.
For ex if you want to add two numbers by using model data binding.
Create method add in model which has three attributes value1,value2, and result.We have to define  these attributes in model.Result is to print the added vaue.
Then we have to add these values to the model in the view by using above syntax:
<htmlb:InputField value="//query/value1"/>
<htmlb:InputField value="//query/value2"/>
<htmlb:InputField value="//query/result"/>
here query is instance for the model.
Here you have to remeber one point that no need to define these attributes(value1,value2,result) in the view again but you have define model instance in the attributes of view.
Try using this concept..........
Reward points if useful.

Hi Anubhav,
                Model Data Binding in business server pages ensure that data which is entered by the user in
                the user interface(view) automatically passes to the model attributes and also output from the
                backend system automatically passes to the result view.
                So we need n't handle the data which is going to backend or the data which is coming from
                backend system.
                Data binding takes care of all the data handling .so we need n't write code to handle the data.
                All i can say is data binding means binding the UI elements with the model class attributes.
               If data binding is not available in BSP, we would have written lot of code in controller class
               of business server pages.
              I am giving simple example here to make you understand.
               The initial view in this application contains 2 input fields, 4 radio buttons and 1 button.
               Here radio buttons named Add, Multiple , Subtract and Divide.
               The functionality i this application is whenever user enters numbers in input fields and select on
               radio button and click on button , the result has to be displayed in the result view.
              Initial View:
<htmlb:content design="design2003">
<htmlb:page title = " ">
    <htmlb:form>
  <htmlb:textView     text            = "value1"
                          design        = "EMPHASIZED" />
    <htmlb:inputField       id          = "f1" value = "//model/v1" />
     <htmlb:textView     text          = "value2"
                          design        = "EMPHASIZED" />
        <htmlb:inputField     id          = "f2" value = "//model/v2" />
     <htmlb:radioButtonGroup id="rbg" selection="//model/s" >
        <htmlb:radioButton id="id_add" text="add"/>
        <htmlb:radioButton id="id_sub" text="sub"/>
        <htmlb:radioButton id="id_mul" text="mul"/>
        <htmlb:radioButton id="id_div" text="div"/>
      </htmlb:radioButtonGroup>
</htmlb:form>
This code in the above view shows the data binding;
<htmlb:inputField       id          = "f1" value = "//model/v1" /> and  
<htmlb:inputField     id          = "f2" value = "//model/v2" /> and
<htmlb:radioButtonGroup id="rbg" selection="//model/s" >
Here v1,v2 and s are model class attributes . model is reference variable of model class .model is declared
as page attribute in BSP.
As i said above automatically the values of inputfields are passes to the model class without writing the code.
   Code in model class method:
METHOD toall.
  IF s = 'id_add' .
    v3 = v1 + v2.
  ELSEIF s = 'id_sub'.
    v3 = v1 - v2.
  ELSEIF s = 'id_mul'.
    v3 = v1 * v2.
  ELSE.
    v3 = v1 / v2.
  ENDIF.
ENDMETHOD.
</htmlb:page>
</htmlb:content>
   Result View:
<htmlb:content design="design2003">
  <htmlb:page title = " ">
    <htmlb:form>
      <htmlb:textView     text          = "output"
                          design        = "EMPHASIZED" />
      <htmlb:textView     text          = "//model/v3"
                          design        = "EMPHASIZED"  />
    </htmlb:form>
  </htmlb:page>
</htmlb:content>
       Here the result is available v3 attribute of model class and it is binded to the text view of the  result view.
      Finally the result is displayed in result view.In the above example i didn't explain about controller class
      I hope you know about controller class.
      Hope it helps.
      Reward points,if found useful.
Thanks,
Narendra.M

Similar Messages

  • MVC - Performance of data binding

    Hi Gurus out there
    I have a concern regarding performance of (dynamic) data binding if I have a lot of <i>textEdit</i> fields containing huge amount of data on a view page.
    <u>Scenario</u>:
    The view page contains buttons <b>[Add textEdit field]</b> and<b> [Save all entries]</b>. If you click the button <b>[Add textEdit field]</b> then a (new) <i>textEdit</i> will be generated and the model remembers the total number of <i>textEdit</i> fields that have been generated.
    DATA: textedit_count TYPE i,
          o_textedit     TYPE REF TO cl_htmlb_textedit,
          tabix(6)       TYPE c,
          binding_code   TYPE string,
          binding_str    TYPE string.
    textedit_count = o_model->get_section_count( ).
    DO textedit_count TIMES.
    * Create a unique ID for a textEdit field:
      tabix = sy-index.
      CONDESE tabix NO-GAPS.
    * String for the data binding of internal table model->data_stream_tab:
      CONCATENATE '//model/data_stream_tab['
                  tabix
                  '].data_string'   
             INTO binding_str.
    * Dynamic data binding:
      CREATE OBJECT o_textedit.
      CONCATENATE 'myTextEditID' tabix
             INTO o_textedit->id.
      o_textedit->width  = 650.
      o_textedit->height = 225.
      o_textedit->_text = binding_str.
      binding_code = o_textedit->IF_BSP_BEE~RENDER_TO_STRING( page_context ).
    <htmlb:label for = "<%= o_textedit->id %>"
                text = "<%= o_textedit->id %>"
              design = "EMPHASIZED" />
    <%-- Binding of the attribute (internal table) '//model/data_stream_tab<i>.data_stream' --%>
      <%= binding_code %>
    ENDDO.
    Obviously the <u>whole</u> contents of the <i>textEdit</i> fields in the coding above are <u>always</u> "moved" from the web browser to the server and vice versa when the button <b>[Add textEdit field]</b> is hit every time even though the content of some <i>textEdit</i> fields haven't changed.
    Does anyone have a good solution/optimization for this problem? Any suggestion, comment and/or answer will be very appreciated.
    Thanks
    HW

    Place this code above any textedit elements you have in your page:
    <script type="text/javascript">
    var myFields = new Array();
    </script>
    Then place this code after every textedit elements, this code will get run when the page is loaded in the browser, right after your element. You are saving the ID and the default value of your element to an array. For every further element, increase the array counter by 1!
    <script type="text/javascript">
    myFields[0] = new Object();
    myFields[0]["id"] = 'myTextEdit1';
    myFields[0]["default_value"] = document.getElementById(myFields[0]["id"]).value;
    </script>
    Finally, include this function in your page (does not have to be at the bottom, I just put it here chronologically):
    <script type="text/javascript">
    function compareFields() {
      for (var i = 0; i < myFields.length; ++i) {
        if(myFields<i>["default_value"] == document.getElementById(myFields<i>["id"]).value) {
        // nothing has changed, set to ignore-value (any highly unlikely value, like ")?.("
        document.getElementById(myFields<i>["id"]).value = ')?.(';
        // check against this value in your setter method
        // if this is set, then do not user submitted value to update your model attribute value
        // maybe do some output for debug purposes
        // alert(document.getElementById(myFields<i>["id"]).value);
    }</script>
    Now add this attribute to your submit button:
    onClientClick = "javascript:compareFields();"
    This should do, test it out and let me know.
    Max

  • Tree table is not reflecting the updated model data changes at the front end

    I have two tables ,
    1) Provider table(tree table)  2)member table
    I have implemented drag and drop functionality using jQuery UI on both tables.
    In my scenario when I drag a member from the member table and drop it on the Provider table and also when I delete an assigned member from the provider table I will update the data fetched from odata model and again I will call the method which binds the data to the provider table so that the table will reflect the changes.
    here is the code,
    on drop:
    $("#Provider tbody tr").droppable({
      drop: function(event){
           oController.AssignMember(oProviderId, oMemberId)
      }).disableSelection();
    Assign member function:   here am updating the model.
    AssignMember : function(oProviderId, oMemberId){
      var oModel = new sap.ui.model.odata.ODataModel("../../../services/provider.xsodata/", true);
      var oParameters = {};
      oParameters.PROVIDER_ID = oProviderId;
      oParameters.MEMBER_ID = oMemberId;
      oParameters.CREATED_ON = new Date();
      oModel.setHeaders({"content-type" : "application/json;charset=utf-8"});
      oModel.create( "/PROVIDERMEMBERS", oParameters, null, function() {
      var oController = sap.ui.controller("adsm.provider.member_assignment_view");
      oController.GetProviderData();
      },function(jqXHR) {
      var errorMessage = jqXHR.response.body;
      var jsondata = JSON.parse(errorMessage);
      sap.ui.commons.MessageBox.alert(jsondata.error.message.value);
    GetProviderData function: here i bind the data to the table
    GetProviderData: function(){
    var oModel = new sap.ui.model.odata.ODataModel("../../../services/provider.xsodata/", true);
    var Context = "/PROVIDERS?expand=ASSIGNEDMEMBERS&$select=NAME,ID,ASSIGNEDMEMBERS/NAME,ASSIGNEDMEMBERS/ID,ASSIGNEDMEMBERS/PROVIDER_ID";
      var oTable = sap.ui.getCore().byId("tblProviders");
      oModel.read(Context, null, null, true, onSuccess, onError);
      function onSuccess(oEventdata){
      var outputJson = {};
      var p = 0;
      var r = {};
      if (oEventdata) {
      r = oEventdata;
      try {
      if (oEventdata.d){
      r = oEventdata.d;
      } catch(e){
      //alert('oEventdata.d failed');
      try {
      if (oEventdata.d.results){
      r = oEventdata.d.results;
      } catch(e){
      //alert('oEventdata.d.results failed');
      try {
      if (oEventdata.results){
      r = oEventdata.results;
      } catch(e){
      //alert('oEventdata.results failed');
      $.each(r, function(i, j) {
      outputJson[p] = {};
      outputJson[p]["NAME"] = j.NAME;
      outputJson[p]["ID"] = j.ID;
      outputJson[p]["PROVIDER_ID"] = j.ID;
      outputJson[p]["DELETE"] = 0;
      var m = 0;
      if (j.ASSIGNEDMEMBERS.results.length > 0) {
      $.each(j.ASSIGNEDMEMBERS.results, function(a,b) {
      outputJson[p][m] = { NAME: b.NAME,
      ID : b.ID,
      PROVIDER_ID: b.PROVIDER_ID,
      DELETE: 1};
      m++;
      p++;
    var oModel = new sap.ui.model.json.JSONModel();
      oModel.setData(outputJson);
      oTable.setModel(oModel);
      function onError(oEvent){
      console.log("Error on Provider Members");
    oTable.bindRows({
      path:"/"
    Its working fine in chrome but in IE the model data gets updated but the table is not reflecting the changes at front end.Can anyone suggest me a possible solution to fix this?
    Please have a look at the attached screen shots.
    Best regards,
    Amala Suganya.

    Hi Amala,
    I think this will help you:
    Disabling Cache for CRUD/FI OData scenarios for a UI5 Application on Internet Explorer
    Kind regards,
    RW

  • Ceating nested table using data binding.

    Hi,
    My requirement is to create a table using ADF data binding where against a value in column 1, there are multiple rows ( in the same row ) in column 2 . Something similar to what we do in excel when we join the 2 horizontal cells.
    I am providing sample table layout below. I have created the backend model to match this but both table and tree not providing what i am looking for. Tree does navigate the model but present this in single column.
    ========================================================================
    Column1 Columns2 Column3
    ========================================================================
    ABC First Data31
    Second Data32
    Data33
    Should i use mange bean to render this ?
    Thanks & regards
    Pankaj.

    Hi Frank i have tried that , my requirement to have the data in different column . Somehow the sample table i put does not display the format correctly , but its like a normal table but the cell with multiple values are merged. I have tried the ADF tree which displays the data but the format is of Tree not of normal table .

  • Report data binding error

    I have created a banded report split into departments. Each
    recore has a value associated with it. The report runs fine if I
    dont try to sub-total each departments vale, but if I add a
    calculated field to the banding, I get the following error:
    Report data binding error Error evaluating expression :
    textField_2 Source text : calc.Department_Total.
    Variable calc.Department_Total is undefined.
    The calculated field is simply the sum of the values, with an
    initial value of 0 and set to reset when the group changes on the
    department. I am using the same data type for the calc field as it
    automatically gave for the original Value field (Big Decimal)
    Any ideas?
    Dave H

    Does anyone have any ideas about this, Its getting a bit
    critical now. Has anyone else been able to do sums that calculate
    on group changes?? The sum total works for the report, jusyt not
    the bands. I desparate here, pulling my hair out.
    Regards
    Dave H

  • How can I set the data binding between Web Dynpro & Database table

    Dear friend,
    I am a beginner of Web Dynpro. I want to develop my simple project like these:
    1. Create my own database table via Dictionary Project such as TAB_USER and have 3 fields: USER_ID, USER_NAME, USER_POSITION and I have already deployed & archived it.
    2. Create my own Web Dynpro Project, and create the input fields as User ID, User name, User position and icon 'Save' on the selection screen and I have deployed it already.
    For the process, I want to input data at the screen and save the data in the table, please give me the guide line like these:
    1. How can I set the data binding between Web Dynpro and Database table ?
    2.  Are there any nescessary steps that I will concern for this case?
    Sorry if my question is simple, I had try  to find solution myself, but it not found
    Thanks in advances,
    SeMs

    Hi,
    You can write your own connection class for establishing the connection with DB.
    Ex:
    public class  ConnectionClass {
    static Connection con = null;
    public static Connection getConnection() {
    try{
    Context ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("jdbc/TSPAGE");
    con = ds.getConnection();
    return con;
    }catch(Exception e){
    return null;
    You can place the above class file in src folder and you can use this class in webdynpro.
    You can have another UserInfo class for reading and writing the data into the DB .
    Regards, Anilkumar
    PS : Refer
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
    Message was edited by: Anilkumar Vippagunta

  • Failed JCO destination name 'WD_RFC_METADATA_DEST'    and MODEL DATA

    Hi Friends
    I am created "WD_RFC_METADATA_DEST". this meta data.When i am created this metadata i was called message server as technical system of CRM server.
    means i am created metadata for CRM System
    Once metadata had complted then i was cheing click on "Text"
    Here it display this error message
    Model Data test
    com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to message server host failed Connect_PM  TYPE=B MSHOST=ecc15 GROUP=PUBLIC R3NAME=E15 MSSERV=sapmsE15 PCS=1 ERROR       Group PUBLIC not found TIME        Fri Feb 19 01:12:26 2010 RELEASE     700 COMPONENT   LG VERSION     5 RC          -6 MODULE      lgxx.c LINE        4299 DETAIL      LgIGroupX COUNTER     1
    Meta data test
    com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to message server host failed Connect_PM  TYPE=B MSHOST=ecc15 GROUP=PUBLIC R3NAME=E15 MSSERV=sapmsE15 PCS=1 ERROR       Group PUBLIC not found TIME        Fri Feb 19 01:13:19 2010 RELEASE     700 COMPONENT   LG VERSION     5 RC          -6 MODULE      lgxx.c LINE        4299 DETAIL      LgIGroupX COUNTER     1
    What is problem. i m not getting can u tell me how slove this problem.
    Regards
    Vijay Kalluri

    Hi Vijay,
    You need check following thing to resolve this issue.
    1. Check the your host file entries for CRM System (Start>Run>enter 'drivers'>etc>hosts)
    2. Check SLD test is successfull or not.
    3. As per your error message group PUBLIC not found. Check in the CRM system (T-code : SMLG) whether PUBLIC group is available or not.
    Then check JCO destination parameter again and test it.
    Hope this will helps you.
    Thanks
    Arun

  • Context Mapping and data binding

    Hi,
    Please explain about the context mapping and data dinding
    and also differences
    Thank's & Regard's.
    Sri

    Hi Sridevi Sudunaguntla ,
    context mapping-> means mapping between different contexts
    ie suppose if we are creating a node in the component controllet and if we want to use that node in view a and view b, then  we have to map this node from component controller to the required view.. this mapping of context nodes is called context mapping..for context mapping, create nodes in compcontroller.. tehn go to view-> context-> tehn drag and drop required node from component controller to the view ..
    data binding-> means binding the data from nopde to the ui elements or viceversa... after the nodes are created in indudual views or after context mapping.. we have to bind these nodes to the ui elements... suppose we have an input field and we want to read that,, so we have to bind the input field to an attribute in the node.. this binding is called.. data binding.
    Regards
    Sarath

  • The data binding isn't working, what have I done wrong?

    I'm writing a very simple WPF app, one view. I've got a few models defined for the small handful of tables this app works with. I'm making some sort of boneheaded mistake, but I can't see what it is. I'm trying to bind to a property of one of the model
    classes I've define, to a textbox in a stackpanel. Here's the XAML:
    <StackPanel Orientation="Horizontal" Margin="0, 5" DataContext="{Binding cvsSpecMapping}">
    <TextBlock Margin="10,0,5,0">Specimen Mapping: </TextBlock>
    <TextBox x:Name="txtHl7SpecMap"
    Text="{Binding HL7SpecimenTypeName}"
    ToolTip="{Binding HL7SpecimenTypeName}"
    MinWidth="50"
    MaxWidth="100"
    MaxLength="250" />
    </StackPanel>
    Earlier in the same XAML file I've got the following collection view source defined in the windows' resources:
    <CollectionViewSource x:Key="cvsSpecMapping" />
    This isn't rocket science. Here's the model class definition. I'm removing all but the relevant property:
    using System;
    using System.ComponentModel;
    using System.Runtime.CompilerServices;
    namespace SpecMapException.Models
    * This class I am interested in knowing what properties change.
    * Also note that the properties in this class do NOT represent all of the properties
    * in the Prism.SpecimenMapping table. It only represents what this application has
    * to store.
    public class SpecimenMapping : INotifyPropertyChanged
    private const int MAX_HL7SPECIMENTYPENAME_LEN = 250;
    #region class properties
    private string _hl7SpecimenTypeName = "";
    public string HL7SpecimenTypeName
    get { return _hl7SpecimenTypeName; }
    set
    if (value != _hl7SpecimenTypeName)
    _hl7SpecimenTypeName = EnforceMaxLength(value, MAX_HL7SPECIMENTYPENAME_LEN);
    NotifyPropertyChanged();
    #endregion //class properties
    #region local routines
    private string EnforceMaxLength(string PassedValue, int MaxLength)
    if (PassedValue.Length <= MaxLength)
    return PassedValue;
    return PassedValue.Substring(0, MaxLength);
    #endregion
    #region PropertyChanged code
    * The usual property changed code.
    public event PropertyChangedEventHandler PropertyChanged;
    private void NotifyPropertyChanged([CallerMemberName] String propertyName = "")
    if (PropertyChanged != null)
    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    #endregion
    And lastly here's the relevant code which I've put into the windows Loaded event:
    Models.SpecimenMapping sm = null;
    private void Window_Loaded(object sender, RoutedEventArgs e)
    var cvsSpecMapNames = (CollectionViewSource)(this.FindResource("cvsSpecMapping"));
    cvsSpecMapNames.Source = sm;
    So what is the mistake that I've made? Why isn't the data binding to the textbox txtHl7SpecMap working?
    (I'm using VS 2013, .NET 4.5.)
    Rod

    cvsSpecMapping is a resource and not a property so you should set the DataContext using the StaticResource markup extension instead of Binding:
    <StackPanel Orientation="Horizontal" Margin="0, 5" DataContext="{StaticResource cvsSpecMapping}">
    Also, the Source property of a CollectionViewSource is supposed to be set to a collection:
    private void Window_Loaded(object sender, RoutedEventArgs e)
    sm = new Models.SpecimenMapping();
    var cvsSpecMapNames = (CollectionViewSource)(this.FindResource("cvsSpecMapping"));
    cvsSpecMapNames.Source = new List<Models.SpecimenMapping>() { sm };
    You may also want to set a default value of the HL7SpecimenTypeName property to confirm that the binding actually works after you have done the above changes:
    public class SpecimenMapping : INotifyPropertyChanged
    private const int MAX_HL7SPECIMENTYPENAME_LEN = 250;
    #region class properties
    private string _hl7SpecimenTypeName = "def....";
    public string HL7SpecimenTypeName
    get { return _hl7SpecimenTypeName; }
    set
    if (value != _hl7SpecimenTypeName)
    _hl7SpecimenTypeName = EnforceMaxLength(value, MAX_HL7SPECIMENTYPENAME_LEN);
    NotifyPropertyChanged();
    Hope that helps.
    Please remember to mark helpful posts as answer to close your thread and then start a new thread if you have a new question.

  • 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

  • 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

  • Dynamic table & data binding

    Hi all,
    I am trying to create an interactive form in WebDynpro ABAP (using Livecycle Designer 8.0).
    This application consists of two screens.
    I have a selection screen which populates an internal table in a context node.
    The next screen has the interactive form and should create the table dynamically to match the internal table.
    I can see the context on this screen as I inserted a simple WD table UI element and it displays the data.
    I created my form in the wizard here which allows you to set the interface to be a context node in the application. However the binding is not working at all. In fact when I set the binding attribute in the various subforms, rows etc I get a warning message
    "Using 'Normal' data binding when a default data connection is defined may produce undesirable results"
    Has anyone experienced this before or can anyone tell me how to set up a dynamic, bound table in WebDynpro ABAP?
    Thanks,
    Gregor

    Hi Gregor,
    From your information, I can say that you are having two Views. In the First View you have a selection screen and by the selection screen you are filling the Internal Table which is being used in the next View.
    To display the Internal in the Adobe Interactive Form from WebDynpro. Firstly you need to create a main context node and in that context node create another sub node with Cardinality "0..n" and Selection "0..1"and link that to a Table or Structure or leave that blank. i you left blank create attributes of your own or select from the table or structure you have referenced.
    Now in the Method you fill sub node after all the select statements written and at end write a code "sub_node_name->bind_table ( internal_table )".
    Now after filling the template source it asks for the interface, when filling select the main context node.
    I think this will solve your problem.
    Regards
    Pradeep Goli

  • Data binding with Multiple Filter

    Hi Experts,
    I am trying to do the data binding using filters with multiple values.
    ex: I am selecting the multiple values from list dialog and those i want to pass to odata service as a filters.
    name : abc
                   pqr
    I am looping on above and pushing it to array of filters.
         jQuery.sap.require("sap.ui.model.FilterOperator");
         var FilterOperator = sap.ui.model.FilterOperator;
         var filtersTerr =  new Array();
       for(i=0;i<name.length;i++){
      filterName = new sap.ui.model.Filter("FirstName", sap.ui.model.FilterOperator.EQ, name[i]);
      filter.push(filterName );
    this..getBinding("items").filter([filter],false);
    Final filter should be something $filter=FirstName='abc' or FirstName='pqr'.
    I have already looked into below discussions but somehow came to conclusion that array cannot be use with OR/AND.
    Odata Filter with OR
    http://scn.sap.com/thread/3462246
    http://scn.sap.com/thread/3560814
    Please let me know how this needs to be written.
    Thanks,
    Rahul

    Hi Rahul
    There are many ways.
    Filter for table
    var sRlUrl = "http://<host Name>/sap/opu/odata/sap/ZTWMP" ;
    var list = new sap.ui.model.odata.ODataModel( sRlUrl, false, "username", "pswd"); 
    list.setDefaultBindingMode(sap.ui.model.BindingMode.TwoWay);
    var iv_proID  = sap.ui.getCore().getElementById('input1').getValue();
    var iv_listNo = sap.ui.getCore().getElementById('input2').getValue();
    var iv_Matnr  = sap.ui.getCore().getElementById('input3').getValue();
    var iv_Po     = sap.ui.getCore().getElementById('input4').getValue(); 
    //... Set any Filters .. if reqd'
    var oFilter = new Array();
    var iCount = 0;
    if (iv_proID) {
    oFilter[iCount] = new sap.ui.model.Filter("abc", sap.ui.model.FilterOperator.EQ, sap.ui.getCore().getElementById('input1').getValue());
    iCount++;
    if (iv_listNo){
    oFilter[iCount] = new sap.ui.model.Filter("def", sap.ui.model.FilterOperator.EQ, sap.ui.getCore().getElementById('input2').getValue());
    iCount++;
    oFilter[iCount] = new sap.ui.model.Filter("PcTotal", sap.ui.model.FilterOperator.EQ,"HEADER" );
    iCount++;
    sap.ui.getCore().getElementById('T-POhdr-DR').setModel(list);
    //... Bind Rows with oData, with filters if any
    sap.ui.getCore().getElementById('T-POhdr-DR').bindRows({
    path: '/t_entity set/',
    filters: oFilter
    2 General filter
      OData.read({ requestUri: "http://<URL>:8001/sap/opu/odata/sap/ZTMP_ABC/Item?$filter=ID eq '"+ID+"' and DESC eq '"+Desc+"'", headers: { Accept: "application/json" } }, function (data, response) {
    if (data.results[0]) {
                     sap.ui.getCore().byId("oInput2").setText(data.results[0].<odata field to assign>;

  • Displaying header with data binded to the R/3 system

    hi
    I have developed an application which uses Interactive form to generate the Invoice PDF by getting data from back end system R/3.
    Now my problem is that the Header which I need to display contains some data binded with the back end system and that the Header needs to be displayed on each and every page of the Invoice.
    I need to know how can we set the header so that the header is displayed on each page with the data binded to the back end system.
    Immediate help would be appreciated.
    Thanks and regards,
    kris

    Hi Gopi,
    There is a limitation for your requirement.The runtime data will not change in each page or it will be blank in case of header.
    I have used an alternative for the forms designed from SFP .I have called the PDF in a loop in the driver program. Then a new pdf will generated for each case.
    May be the alternative is assign the values through scripting.
    pavan meda

  • 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

Maybe you are looking for

  • Internal GUI Error - PI 7.1 EHP1

    Hi All, We are on the following SPS level of PI 7.11 SAP_ABA     -->     711     -->     0004     -->     SAPKA71104     -->     Cross-Application Component SAP_BASIS     -->     711     -->     0004     -->     SAPKB71104     -->     SAP Basis Compo

  • How to disable loud speaker beep during install

    Is there a way to disable the the speaker beeping during install? Or at least lower its volume? Its extremely loud. Ive already removed the pcspkr module, but the beeping is still present. (I reinstall arch often and this is why I'm asking )

  • Alt Graph has no effect

    Hello! I'm having a peculiar problem and I'm at loss as of how to fix it. I have a fresh Solaris 10 x86 installed on an HP nx9420 laptop and it is localized to sv_SE.UTF8. All native X clients work perfectly, accepting keyboard input as expected. But

  • HTML Page Creation

    Hi to All I want to create the HTML page from my servlet. This is because i want to send the current page(brower) content as a email attachment. What is the easiest way to do this. Please help me.

  • Right-click File then select to email

    Is there an option to do this in OS X? I would like to be able to like right click a file on my desktop and then select an option to email, so then it would automatically attach the file in an email. Any help would be appreciated.