TableView in MVC - how to bind view to controller data?

Hi,
I have a default view in my BSP with a tableView on it. I have set the table and iterator variables. In the controller DO_INIT I am selecting the reqd data - how do I pass this data to my table view?
I have created a iterator class and implemented the required methods - how should I use this iterator class to move the data to the view.
In the DO_REQUEST method I am setting the attributes for the view - the table values and also iterator attribute, but its not working...
Thanks
Kiran

All right we will try this one question at a time:
>How do I use the iterator, where do I implement the std. methods of the iterator interface.
I think that has already been answered in another thread after your question. But just to be clear, the iterator is generally a completly separate class that implements the interface IF_HTMLB_TABLEVIEW_ITERATOR.  I said generally, because technically this can be any object that implements this interface.  You could implement this interface in your model, your controller, or your application class - but this is not advised.  I like to create a separate class and instaniate it either in my model or my application class.  I store the object reference as an attribute of the hosting object.  This makes the iterator easily accessible when you need it.
>How will my view know that it has to use the iterator class that I create?
It doesn't.  Nor does it need to.  The view has nothing to do with the iterator.  The iterator is not a general method for generating Extension Elemetns (that is what the BEE is for).  The iterator class is specific to the element htmlb:tableView and can only be used with this element.  The Iterator instance is passed into the tableView during the definition of this element in the view.  The class behind the tableView will then use and interact with the iterator class at the correct times.  The table will pass the correct data into the iterator object so that the iterator can pass over either the column, the row, or the cell (the three different methods of the interface) and change the rendering of the tableView.
>I am new to MVC and dont know how to create biding between view & model attribute.
Yes Data binding is done between a view and a model (the model's attributes) not the controller. Data binding is very useful as metadata about fields can be consumed automatically by UI elements in the View.  It also handles Input Handleing for you.  I can't explain the entire concept of MVC and databind in a thread posting - as that wouldn't do it justice. However there are blogs, on-help and chapters in certain BSP Books dedicated to just that topic.
>Finally is the model class & application class one & the same?
No they are very different objects with different purposes.  Application classes existed before MVC was supported by BSP.  You can have one and only one application class per BSP application.  They are used in stateful applications to store data and object references over the entire lifetime of the application.  They can also be holders for application logic that spans the entire application. However since the introduction of MVC (in release 6.20) they should take a back seat to full MVC.  MVC separates the presentation logic (view), flow and eventing (Controller) and Application Logic (Model) into separate objects.  In a BSP application you can have 0:n model objects.  Technically a model class is any standard ABAP class that inherits from CL_BSP_MODEL2.  You create them in the ABAP Editor like any other class. However the inheritance has methods that can be called by the BSP and MVC framework to perform functions like data binding.

Similar Messages

  • How can i view my iphone contents on PC. How can i view my backup data in itunes. How can i see my SMS and contact on PC

    Hi,
    Can anybody help me out on the follwoing questions
    how can i view my iphone contents on PC. How can i view my backup data in itunes. How can i see my SMS and contact on PC

    The data isn't actually stored in iTunes.  iTunes is like a card catalog that allows you to access information from the various places that it's stored on the computer.  SMS and contact info will be viewable in whatever program you sync contact information.  The backup actually keeps the files, but doesn't make them viewable, I'm pretty sure.  You can only see the info you've actually synced.

  • How to Block Viewing Back Dated Data

    Dear All,
    Please help in the following scenario :
    Requirement : To Block Viewing of Back Dated Data.
    For Eg : from 2012-2013 we have had data, but management wanted from 2014 April 1st
    on wards viewing of data for 2012-2013 year should be blocked except for management
    and not for employees or middle level guys.
    Suppose if we open FBL3N, this tcode should only allow viewing of 2014 April 1st onward data
    and not back dated. I mean to say not only for tcode FBL3N but across all tcodes.
    I was thinking of validation @ company code level and date range, but not getting how to proceed.
    Abstract Logic :
    if company code = '1000' and Date <= '31-3-2013' , do not display data for any tcode and throw error msg "your are not authorized to view data"
    Your help will be highly appreciated.
    Thank you,
    Regards,
    Mahesh

    Hi,
    You can do following :
    1. Go to transaction code FBL1N
    Enter Company code
    Enter Date you want to restrict
    2.  Click on Save
    3. Next Screen
    Select Protect field option for posting date
    4. Click n Save
    5. FBL1N Screen
    h
    You can see that Posting date  has became non editable.
    6. Use function module RS_ABAPVARIANT_AUTH. and pass Variant name and User ID.
    We hope your problem will get resolved by this methodology.
    Regards,
    Tejas

  • In Debugging how can we  view the normal data instead of  Hexadecimal data

    While i am debugging if i am checked  internal table structure fields. Hexa decmial data is coming up. how can we check normal data.

    If u r using Standard Debugger (Old Debugger) U will have a icon with + or - (search button type) beside ur fields. Click that. If that is in + mode u will see ur actual data, if it is in - u will see Hexa data.
    awrd points if helpful
    Bhupal

  • How to bind xml or any data to a mobile list in Dreamweaver?

    I am trying to figure out what should be a simple thing in Dreamweaver.
    That is while using jquery mobile, how do I attach an xml file to the attribute list elements?
    If that isn't possible, would someone be able to tell me or direct me to a way to handle data within Dreamweaver for mobile apps. I'm over the top trying to figure out all of the technologies. It appears that HTML5, xml, sqlite, and json all have possibilities. I have a simple database of maybe 300 items: an image and a description. The data will reside and be read client side on the mobile app.
    I want to read the items into a list. Then call up individual items on a new "page" based on the user's list item selection. This is so easy in Dashcode under Mac. Surely, I must be missing something in Dreamweaver 5.5.
    TIA to anyone who tries to point me in the right direction.

    Have a look here http://books.google.com.au/books?id=kJ5ZWFZtWFgC&pg=PA113&lpg=PA113&dq=spry+datasets+and+j query+mobile&source=bl&ots=l8vMEvoRZn&sig=rZYgQGSdsxX64jCQPnFFqJdMwFg&hl=en&sa=X&ei=xpwPT8 GRIumiiAeztrQK&sqi=2&ved=0CF4Q6AEwBw#v=onepage&q=spry%20datasets%20and%20jquery%20mobile&f =false (apologies for the lenth of the URL) and here http://foundationphp.com/dwmobile/
    Gramps

  • JSP/BC4J app: How to get view object row data into a scriplet variable?

    I have a JSP application using BC4J data tags. Within a rowsetiterate tag, how can I get the data value of an attribute for the current row into a scriplet variable?
    Thanks,
    Steve

    Using the <jbo:Row> tag like this:
      <jbo:RowsetIterate .... >
        <%--
         | Establish a scriptable variable "curRow" for the current row
         +-->
        <jbo:Row id="curRow" action="current"/>
        <%
          String foo = (String)curRow.getAttribute("YourAttrName");
        %>

  • How to view the key mapping when viewing Hierarchy in Data Manager

    Hi! I previously posted a question on doing value mapping using the hierarchy code rather than the name. I have got that working now using concept of remote key. When I first loaded the hierarchy with remote key and check in Data Manager, I can see the hierarchy structure with the key mappings. However, when I subsequently went back to the hierarchy to have a second look, the keys are gone. Does anyone know how I can view hierarchy in Data Manager with the key mappings?
    Cheers!
    SF

    Hi,
    Go to Record mode, and open Hierarchy table. Now to select click on any hierarchy node record and then right click and select "Edit Key Mappings". This will show you existing keys as well as allow you to manually modify keys. You can only Check Remote keys on hierarchy in Record mode and in Hierarchy Mode "Edit Key Mappings" option will be disabled.
    Please revert if you face any issue.
    Regards,
    Shiv

  • As a JSF Developer, I want to understand technically how the JSF View Components are rendered as html and how there events are binded to Server.I want to know each Java Class that is involved in flow.

    As a JSF Developer, I want to understand technically how the JSF View Components are rendered as html and how there events are binded to Server.I want to know how flows goes to the server and server understands the method which is to be called of managed bean. I know it is with annotation @ManagedBean and method name, but how Call is binded with annotation @ManagedBean.
    In short, i want to know the internal implementation of JSF Framework.

    As a JSF Developer, I want to understand technically how the JSF View Components are rendered as html and how there events are binded to Server.I want to know how flows goes to the server and server understands the method which is to be called of managed bean. I know it is with annotation @ManagedBean and method name, but how Call is binded with annotation @ManagedBean.
    In short, i want to know the internal implementation of JSF Framework.

  • How to hide a column (clnt) in tableview using MVC?

    Hy,
    I would like, please if you cand help me: how to hide a column (clnt) in tableview using MVC for example on sflight table.
    Thanks

    Hi,
    You can use the below logic
    <htmlb:tableView id = "t1"
               visibleRowCount = "10"
               table = "<%= flights %>">
         <htmlb:tableViewColumns>
              <htmlb:tableViewColumn columnNamd = "carrid" />
              <htmlb:tableViewColumn columnNamd = "connid" />
              <htmlb:tableViewColumn columnNamd = "fldate" />
         </htmlb:tableViewColumns>
    </htmlb:tableView>
    define all the required columns using tableViewColumn tag.
    Regards,
    Ravi

  • How to bind a user selected value to a view object bind variable?

    Hi
    I have two pages in ADF BC application. In the first page ,i will give a drop down menu to user which displays all the table names in my databse.
    when the user selects a table and goes to the second page..he should be given a menu or a check list of all the columns in the user selected table....
    to display the columns i have used the query
    Select COLUMN_NAME from user_tab_columns where table_name = : table_name in the view object.
    now how to bind the user selected table value in the first page to the table_name bind variable in view object ?
    thanks
    swathi.

    Hi,
    depends on how the select box is implemented. With ADF and ADF Faces, the default value selection is the list index. In a value change listener you could look up the selected value from the underlying iterator. Store this value e.g. in a session attribute and point the NDValue of the ExecuteWithParams operation to #{sessionScope.your_attribute}
    Frank

  • How to Bind a Combo Box so that it retrieves and display content corresponding to the Id in a link table and populates itself with the data in the main table?

    I am developing a desktop application in Wpf using MVVM and Entity Frameworks. I have the following tables:
    1. Party (PartyId, Name)
    2. Case (CaseId, CaseNo)
    3. Petitioner (CaseId, PartyId) ............. Link Table
    I am completely new to .Net and to begin with I download Microsoft's sample application and
    following the pattern I have been successful in creating several tabs. The problem started only when I wanted to implement many-to-many relationship. The sample application has not covered the scenario where there can be a any-to-many relationship. However
    with the help of MSDN forum I came to know about a link table and managed to solve entity framework issues pertaining to many-to-many relationship. Here is the screenshot of my application to show you what I have achieved so far.
    And now the problem I want the forum to address is how to bind a combo box so that it retrieves Party.Name for the corresponding PartyId in the Link Table and also I want to populate it with Party.Name so that
    users can choose one from the dropdown list to add or edit the petitioner.

    Hello Barry,
    Thanks a lot for responding to my query. As I am completely new to .Net and following the pattern of Microsoft's Employee Tracker sample it seems difficult to clearly understand the concept and implement it in a scenario which is different than what is in
    the sample available at the link you supplied.
    To get the idea of the thing here is my code behind of a view vBoxPetitioner:
    <UserControl x:Class="CCIS.View.Case.vBoxPetitioner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:v="clr-namespace:CCIS.View.Case"
    xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
    mc:Ignorable="d"
    d:DesignWidth="300"
    d:DesignHeight="200">
    <UserControl.Resources>
    <DataTemplate DataType="{x:Type vm:vmPetitioner}">
    <v:vPetitioner Margin="0,2,0,0" />
    </DataTemplate>
    </UserControl.Resources>
    <Grid>
    <HeaderedContentControl>
    <HeaderedContentControl.Header>
    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
    <TextBlock Margin="2">
    <Hyperlink Command="{Binding Path=AddPetitionerCommand}">Add Petitioner</Hyperlink>
    | <Hyperlink Command="{Binding Path=DeletePetitionerCommand}">Delete</Hyperlink>
    </TextBlock>
    </StackPanel>
    </HeaderedContentControl.Header>
    <ListBox BorderThickness="0" SelectedItem="{Binding Path=CurrentPetitioner, Mode=TwoWay}" ItemsSource="{Binding Path=tblParties}" />
    </HeaderedContentControl>
    </Grid>
    </UserControl>
    This part is working fine as it loads another view that is vPetioner perfectly in the manner I want it to be.
    Here is the code of vmPetitioner, a ViewModel:
    Imports Microsoft.VisualBasic
    Imports System.Collections.ObjectModel
    Imports System
    Imports CCIS.Model.Party
    Namespace CCIS.ViewModel.Case
    ''' <summary>
    ''' ViewModel of an individual Email
    ''' </summary>
    Public Class vmPetitioner
    Inherits vmParty
    ''' <summary>
    ''' The Email object backing this ViewModel
    ''' </summary>
    Private petitioner As tblParty
    ''' <summary>
    ''' Initializes a new instance of the EmailViewModel class.
    ''' </summary>
    ''' <param name="detail">The underlying Email this ViewModel is to be based on</param>
    Public Sub New(ByVal detail As tblParty)
    If detail Is Nothing Then
    Throw New ArgumentNullException("detail")
    End If
    Me.petitioner = detail
    End Sub
    ''' <summary>
    ''' Gets the underlying Email this ViewModel is based on
    ''' </summary>
    Public Overrides ReadOnly Property Model() As tblParty
    Get
    Return Me.petitioner
    End Get
    End Property
    ''' <summary>
    ''' Gets or sets the actual email address
    ''' </summary>
    Public Property fldPartyId() As String
    Get
    Return Me.petitioner.fldPartyId
    End Get
    Set(ByVal value As String)
    Me.petitioner.fldPartyId = value
    Me.OnPropertyChanged("fldPartyId")
    End Set
    End Property
    End Class
    End Namespace
    And below is the ViewMode vmParty which vmPetitioner Inherits:
    Imports Microsoft.VisualBasic
    Imports System
    Imports System.Collections.Generic
    Imports CCIS.Model.Case
    Imports CCIS.Model.Party
    Imports CCIS.ViewModel.Helpers
    Namespace CCIS.ViewModel.Case
    ''' <summary>
    ''' Common functionality for ViewModels of an individual ContactDetail
    ''' </summary>
    Public MustInherit Class vmParty
    Inherits ViewModelBase
    ''' <summary>
    ''' Gets the underlying ContactDetail this ViewModel is based on
    ''' </summary>
    Public MustOverride ReadOnly Property Model() As tblParty
    '''' <summary>
    '''' Gets the underlying ContactDetail this ViewModel is based on
    '''' </summary>
    'Public MustOverride ReadOnly Property Model() As tblAdvocate
    ''' <summary>
    ''' Gets or sets the name of this department
    ''' </summary>
    Public Property fldName() As String
    Get
    Return Me.Model.fldName
    End Get
    Set(ByVal value As String)
    Me.Model.fldName = value
    Me.OnPropertyChanged("fldName")
    End Set
    End Property
    ''' <summary>
    ''' Constructs a view model to represent the supplied ContactDetail
    ''' </summary>
    ''' <param name="detail">The detail to build a ViewModel for</param>
    ''' <returns>The constructed ViewModel, null if one can't be built</returns>
    Public Shared Function BuildViewModel(ByVal detail As tblParty) As vmParty
    If detail Is Nothing Then
    Throw New ArgumentNullException("detail")
    End If
    Dim e As tblParty = TryCast(detail, tblParty)
    If e IsNot Nothing Then
    Return New vmPetitioner(e)
    End If
    Return Nothing
    End Function
    End Class
    End Namespace
    And final the code behind of the view vPetitioner:
    <UserControl x:Class="CCIS.View.Case.vPetitioner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
    mc:Ignorable="d"
    Width="300">
    <UserControl.Resources>
    <ResourceDictionary Source=".\CompactFormStyles.xaml" />
    </UserControl.Resources>
    <Grid>
    <Border Style="{StaticResource DetailBorder}">
    <Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="Auto" />
    <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <TextBlock Grid.Column="0" Text="Petitioner:" />
    <ComboBox Grid.Column="1" Width="240" SelectedValuePath="." SelectedItem="{Binding Path=tblParty}" ItemsSource="{Binding Path=PetitionerLookup}" DisplayMemberPath="fldName" />
    </Grid>
    </Border>
    </Grid>
    </UserControl>
    The problem, presumably, seems to be is that the binding path "PetitionerLookup" of the ItemSource of the Combo box in the view vPetitioner exists in a different ViewModel vmCase which serves as an ObservableCollection for MainViewModel. Therefore,
    what I need to Know is how to route the binding path if it exists in a different ViewModel?
    Sir, I look forward to your early reply bringing a workable solution to the problem I face. 
    Warm Regards,
    Arun

  • How to bind several data (more then 7300) to datagrid

    Hello,
    I am trying to  bind to datagrid several data. I created an observablecollection, i stocked data into this collection and then i binded this collection to my datagrid. In xaml file i declared my datacontext. When i did it my visual studio and all application
    on my computer clock. I can't do anything. A simple think that i can do, is to close session and restart .
    I need help.
    Here is some sample:
    code cs ViewModel:
    using System;
    using System.Collections.Generic;
    using System.Text;
    using GestionDeContrats_Offres_ClientsGUI.VueModele;
    using System.Collections.ObjectModel;
    using System.Windows.Data;
    using System.ComponentModel;
    using GestionDeContrats_Offres_Clients.GestionOffres;
    using GestionDeContrats_Offres_Clients.GestionContrats;
    using System.Windows.Input;
    using GestionDeContrats_Offres_Clients.GestionModele;
    using GestionDeContrats_Offres_ClientsGUI.crm;
    using System.Data;
    namespace GestionDeContrats_Offres_ClientsGUI.VueModele
        /// <summary>
        /// </summary>
       public class GestionDeContratVueModele : VueModeleBase
            private readonly ObservableCollection<ContratVueModele> contrats;
            private readonly PagingCollectionView pagingView;
            private GestionDeContrat gestiondecontrat;
           /// <summary>
           /// Constructeur de la classe
           /// GestionDeContratVueModele
           /// </summary>
            public GestionDeContratVueModele() {
                try
                    this.gestiondecontrat = new GestionDeContrat();
                    this.contrats = new ObservableCollection<ContratVueModele>();
                    this.contrats.Clear();
                    foreach (contract contrat in this.gestiondecontrat.ListeDeContrat())
                       // this.contrats.Add(new ContratVueModele());
                             this.contrats.Add(new ContratVueModele() { NOMDUCONTRAT = contrat.title, DATEDEDEBUT = contrat.activeon.Value, DATEDEFIN
    = contrat.expireson.Value, LESTATUT = contrat.statecode.formattedvalue,LESTATUTAVANT=contrat.access_etatavant.name });
                    this.pagingView = new PagingCollectionView(this.contrats, 3);
                    if (this.pagingView == null)
                        throw new NullReferenceException("pagingView");
                    this.currentpage = this.pagingView.CurrentPage;
                    this.pagingView.CurrentChanged += new EventHandler(pagingView_CurrentChanged);
                catch(System.Web.Services.Protocols.SoapException soapEx){
                    soapEx.Detail.OuterXml.ToString();
           /// <summary>
           /// </summary>
           /// <param name="sender"></param>
           /// <param name="e"></param>
            void pagingView_CurrentChanged(object sender, EventArgs e)
                OnPropertyChanged("SelectedContrat");
                Dispose();
                //throw new NotImplementedException();
                    /// <summary>
            /// Propriété permettant de manipuler la
            ///Vue Modèle de la liste des contrats
            /// </summary>
            public ObservableCollection<ContratVueModele> Lescontrats
                get
                    return this.contrats;
           code xaml:
           <UserControl x:Class="GestionDeContrats_Offres_ClientsGUI.VueModele.UserControlGestionContrat"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 mc:Ignorable="d"
                 x:Name="GestionContrat"
                 xmlns:local="clr-namespace:GestionDeContrats_Offres_ClientsGUI.VueModele"
                 d:DesignHeight="300"  >
        <UserControl.DataContext>
            <local:GestionDeContratVueModele  />
        </UserControl.DataContext>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="30"/>
                <RowDefinition Height="40"/>
                <RowDefinition />
                <RowDefinition Height="40"/>
            </Grid.RowDefinitions>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="320"/>
                    <ColumnDefinition Width="40" />
                </Grid.ColumnDefinitions>
                <TextBox Name="searchtexbox" Grid.Column="0"/>
                <Image Grid.Column="1" Source="/GestionDeContrats_Offres_ClientsGUI;component/Images/16_find.gif" />
            </Grid>
            <ToolBar Grid.Row="1" Name="toolbarcontrat">
                <Button    Name="btNewContrat"  Click="btNewContrat_Click">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Image Source="/GestionDeContrats_Offres_ClientsGUI;component/Images/plusvert.jpg" />
                        <Label Content="Nouveau" Grid.Column="1"/>
                    </Grid>
                </Button>
                <Button    Name="btCopierContrat" >
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Image Source="/GestionDeContrats_Offres_ClientsGUI;component/Images/editcopy.png" />
                        <Label Content="Copier" Grid.Column="1"/>
                    </Grid>
                </Button>
                <Button    Name="btSupprimerContrat" >
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Image Source="/GestionDeContrats_Offres_ClientsGUI;component/Images/delgreen16.jpg" />
                        <Label Content="Supprimer" Grid.Column="1"/>
                    </Grid>
                </Button>
                <Button    Name="btModifierContrat" >
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Image Source="/GestionDeContrats_Offres_ClientsGUI;component/Images/ico_18_4207.gif" />
                        <Label Content="Modifier" Grid.Column="1"/>
                    </Grid>
                </Button>
            </ToolBar>
            <DataGrid Name="listViewContrat" Grid.Row="2" ItemsSource="{Binding Path=Lescontrats, Mode=OneWay}"  IsSynchronizedWithCurrentItem="True" AutoGenerateColumns="False"
    CanUserReorderColumns="True" CanUserResizeColumns="True" CanUserSortColumns="True" CanUserAddRows="True" CanUserDeleteRows="True">
                <DataGrid.Columns>
                    <DataGridTemplateColumn Header="Nom du contrat" >
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Path=NOMDUCONTRAT, Mode=OneWay}"/>
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>
                    <DataGridTemplateColumn Header="Date de début" >
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Path=DATEDEDEBUT, Mode=OneWay}"/>
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>
                    <DataGridTemplateColumn Header="Date de fin"  >
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Path=DATEDEFIN, Mode=OneWay}"/>
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>
                    <DataGridTemplateColumn Header="Statut" >
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Path=LESTATUT,Mode=OneWay}"/>
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>
                    <DataGridTemplateColumn Header="Statut avant" >
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Text=""/>
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>
                </DataGrid.Columns>
            </DataGrid>
            <StackPanel Grid.Row="3" Orientation="Horizontal">
                <Label Margin="2" Content=""/>
                <Button Content="Suivant" Name="btNext" Margin="2" />
                <Button Content="Précédent" Name="btPrevious" Margin="2"  />
            </StackPanel>
        </Grid>
    </UserControl>
     I include link to this usercontrol into MainWindow.xaml.
    Thanks 
    Regards      

    I think what darnold was trying to say....
    Those very clever people who come up with insights on human behaviour have studied how many records a user can work with effectively.
    It turns out that they can't see thousands of records at once.
    Their advice is that one presents a maximum of 200-300 records at a time.
    What with maybe 40 fitting on a screen at a time. Few people like spending 20 minutes scrolling through a stack of data they're not interested in to find the one record they're after.
    Personally, I would use a treeview, set of combos or some such so the user can select what subset they are interested in and present just that.
    Anyhow.
    If you have a viewmodel which exposes an observable collection<t> as a public property you can bind the itemssource of a datagrid to that.
    Although UI controls have thread affinity, the objects in such a collection do not.
    That means you can use another thread to go get your data, add it to the observable collection, the fact it's an observable collection tells the view as records are added and it will show them. The ui will remain responsive.
    You can do this using skip and take to read a couple hundred records at a time and add those, pause and repeat for the next couple hundred records.  Use linq - skip and take.
    Please don't forget to upvote posts which you like and mark those which answer your question.
    My latest Technet article - Dynamic XAML

  • How to bind a UI element to the context

    Hi Experts,
               I have a problem binding UI element to the context. In my code i have to create TabStrips dynamically and under this tabstrip number of UI elements would be there. For this i have a code like this..
    IWDTransparentContainer theActionContainer =(IWDTransparentContainer)view.getElement("RootUIElementContainer");
         IWDTabStrip ts = (IWDTabStrip) view.createElement(IWDTabStrip.class,"TabStrip");
              IWDTab tab1 = (IWDTab) view.createElement(IWDTab.class,"Tab1");
              IWDInputField in = (IWDInputField) view.createElement(IWDInputField.class,"in");
              IWDCaption header1 = (IWDCaption) view.createElement(IWDCaption.class,"Header1");
              header1.setText("Tab1");
              tab1.setContent(in);
              ts.addTab(tab1);
              IWDTab tab2 = (IWDTab) view.createElement(IWDTab.class,"Tab2");
              IWDInputField in2 = (IWDInputField) view.createElement(IWDInputField.class,"in2");
              IWDCaption header2 = (IWDCaption) view.createElement(IWDCaption.class,"Header2");
              header2.setText("Tab2");
              tab2.setHeader(header2);
              ts.addTab(tab2);
              theActionContainer.addChild(ts);
    <b>when i run this code it is giving following exceptions..</b>
    The initial exception that caused the request to fail, was:
       com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Property 'value' of AbstractInputField with id 'in' in view 'LoginView' must be bound to the context
        at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.getValue(AbstractInputField.java:1260)
        at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.InputFieldAdapter.getValue(InputFieldAdapter.java:582)
        at com.sap.tc.ur.renderer.ie6.InputFieldRenderer.render(InputFieldRenderer.java:56)
        at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:435)
        at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:134)
        ... 63 more
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Property 'value' of AbstractInputField with id 'in' in view 'LoginView' must be bound to the context
         at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.getValue(AbstractInputField.java:1260)
         at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.InputFieldAdapter.getValue(InputFieldAdapter.java:582)
         at com.sap.tc.ur.renderer.ie6.InputFieldRenderer.render(InputFieldRenderer.java:56)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:435)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:134)
         at com.sap.tc.ur.renderer.ie6.TabStripRenderer.renderTabStripItemContentFragment(TabStripRenderer.java:1867)
         at com.sap.tc.ur.renderer.ie6.TabStripRenderer.renderTabStripFragment(TabStripRenderer.java:838)
    From these exceptions what  i understood is, i need to bind these UI elements to context.
       Can any body tell me how to bind a UI element to the context if I understood the exceptions correct..
    Thanks in Advance,
    Murthy.

    HI,
    lets say Ctx is your context attribute,
    IWDAttributeInfo attrInfo = wdContext.getNodeInfo.getAttribute("Ctx");
    then , as per your code,
    IWDInputField in = (IWDInputField) view.createElement(IWDInputField.class,"in");
    <b>in.bindValue(attrInfo);</b>
    if your contex attribute is child of some other node then do like this,
    IWDAttributeInfo attrInfo = wdContext.getNodeInfo.getChildNode("SalesOrder",0)getAttribute("Ctx");
    //this is when Ctx is child of node SalesOrder, and we are taking Ctx from its 0th element
    then ,
    IWDInputField in = (IWDInputField) view.createElement(IWDInputField.class,"in");
    <b>in.bindValue(attrInfo);</b>
    include this in your code ,
    let me know if you face any problem
    regards
    reward points if it helps

  • In MVC, how should already-loaded data be handled?

    I have an AS3 application and I'm trying to implement an MVC framework.
    On the model's initialization, data is gathered about the user. When the user clicks a button, say to print their first name, I want to request and retrieve only that data from the model.
    I currently have the view listening for a button click. The button click is handled by the controller. The controller fires a "getUserFirstName" method in the model. I'm confused about this part...
    Since the controller and not the view is calling the method, I can't do a return of the user's first name in this method. Should I dispatch an update event? I'm not sure how to pass this data to the view in the most efficient way. Thank you.

    Good question Kevin.  Design patterns are my forte, so I can assist. first the view is allowed to receive input events but rarely should.  The view as it's referring to is the reflection of data and nothing more.  The controller is the gate way of the users input to the model,  The controller either passes data to the model or can control a views placement/initialization.   Both view and controller have access to the model. The model should retain a reference of any of it's subscribers.  When data is changed in the model, the model should send a notification to any and all subscribers.  I in your case this is the view and controller.  Upon this notification, the view and controller will access the model and retrieve what they require.  There are two types of models.  A push and a pull.. What I just described is the pull methd.  A push is where the model will send in e dispatch what has changed.  For more information feel free to order my latest design pattern book for design patterns on amazon.  advanced action script design patterns.

  • How to bind dynamic data to JNet

    Develop tools: NWDS 7.1
    Server: Windows2000
    Does anyone have experiences with using JNET within Webdynpro Project ?
    In our case, we use JNet to generate a hierachical network diagram in the Webdypro's GUI. The data source is from the tables in a DB. However, till now, we only know how to let JNet generate the network diagram from a static XML file.
    Since the data in the DB changes all the time, how to let the network diagram reflect the newest data status automatically? That is, how to bind JNet to a dynamic data source then?

    Hi,
    Network UI element is related with Jnet. What you need to start up working with this is you need to create a context structure mentioned below.
    Node:Source
    Element--- xml -> this should be of type binary.
    Place the following code in the init.
    ISimpleTypeModifiable mod = wdContext.nodeSource().getNodeInfo().getAttribute("xml").getModifiableSimpleType();
    IWDModifiableBinaryType bin = (IWDModifiableBinaryType)mod;
    bin.setMimeType(new WDWebResourceType("xml", "application/octet-stream", false));
    ISourceElement element =wdContext.nodeSource().createSourceElement();
    wdContext.nodeSource().addElement(element);
    try
    fileName = WDURLGenerator.getResourcePath(wdComponentAPI.getDeployableObjectPart(), "jnettest.xml");
    element.setXml(readFile(fileName));
    catch (WDAliasResolvingException e)
    You have to place the Jnet test.xml under the mimes folder of your application.
    Place the network element in the view and in the data source specify the context attribute source.xml
    if your xml file complies with the jnet schema your application will render it.
    Pl go through this
    Using the "Network" UI Element
    Regards
    Ayyapparaj

Maybe you are looking for

  • Cannot install flash player due to internet explorer

    I am running Windows 7 and Internet Explorer 10. I have disabled activeX filtering, made sure scripting was enabled, and temporarily shut off my antivirus software as instructed by Adobe website. None of these things have fixed my problem. I try to d

  • Ipod classic connection to imac

    I have a 20g ipod wheel. My imac has no fire wire connection as does the ipod. The computer won't recognize or charge the ipod when i use a cable from an iphone,iphone 3gs,ipod mini. it will charge fine from its firewire on its charger. I need itunes

  • Composite Application

    Hi, can someone tell me where to find a simple and easy guide about creating and using Composite Applications? I have a workflow designed in the Process Composer Perspective that has a Mapping Activity whose function references a bean definition link

  • Error when Enabling SSO in ESS/MSS  for My SAPERP2004

    Hi Friends, Form past 3 days i am trying to enable SSO for my Enterprise portal to MySAPERP2004. We have installed EP rapidinstaller sp14 in our system, since it is preconfigured, we are now trying to enable SSO to myERP system after maintaining JCO

  • Anyway you can change color on iPod?

    I have a question regarding to iPod 60GB Video, it works fine and everything but I was wondering if you could change the color settings or the font, like the part of the artist and song title come up. Anyway if anyone could answer this for me I'd app