Binding in ContentControl:

Hi,
In the Resources section I've the following code:
<Grid x:Key="TileStyle">
            <Border  Height="212" Width="230" Margin="3" BorderThickness="1">
                <TextBlock Style="{StaticResource TileTitleTextStyle}" ></TextBlock>
            </Border>            
            <TextBlock Style="{StaticResource TileTextBlockOneStyle}"></TextBlock>
            <TextBlock Style="{StaticResource TileTextBlockTwoStyle}"></TextBlock>
        </Grid>
I'm using this template in ContentControl as below:
<ContentControl Content="{StaticResource TileStyle}"></ContentControl>
Along with assigning Content to ContentControl, I also want to bind to an object in ContentControl. I'm getting Binding.XmlNamespaceManager when I type is Binding. Please do let me know how can I bind to an object.
Kindly waiting for response.
Thanks,
Santosh

>>Along with assigning Content to ContentControl, I also want to bind to an object in ContentControl. I'm getting Binding.XmlNamespaceManager when I type is Binding. Please do let me know how can I bind to an object.
You cannot apply a binding to an element that is defined inside the Grid resource from by setting some property of the ContentControl if that's what you are trying to do.
If you want to be able to set or bind to a property of the Grid you should create your own custom Grid class and add a dependency property to it, e.g:
namespace WpfApplication24
public class MyGrid : System.Windows.Controls.Grid
public MyGrid()
//create the Border element and the TextBlock elements here...
Border border = new Border();
TextBlock txtBlock = new TextBlock();
txtBlock.SetBinding(TextBlock.TextAlignmentProperty, new Binding("MyProp") { Source = this });
border.Child = txtBlock;
this.Children.Add(border);
// Dependency Property
public static readonly DependencyProperty MyPropProperty =
DependencyProperty.Register("MyProp", typeof(string),
typeof(MyGrid), new FrameworkPropertyMetadata(""));
public string MyProp
get { return (string)GetValue(MyPropProperty); }
set { SetValue(MyPropProperty, value); }
...and then create an instance of this custom control instead of using a ContentControl:
<Grid xmlns:local="clr-namespace:WpfApplication24">
<local:MyGrid MyProp="the text to be displayed in the TextBlock..."/>
</Grid>
The ContentControl has no Binding property. It simply displays some the content specified by its Content property.
Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question.

Similar Messages

  • Set content of RichTextBlock Dynamically by Binding or simply by code

    I am trying to set the content of RichTextBlock dynamically. I have tried Data Binding and also by adding Paragraph element as child but found no solution. Can somebody provide some solution or snippet for it?

    Hi Rohitrkkumar,
    It seems that RichTextBlock doesn’t provide binding functionality. You can try the following approach to work around.
    Step 1, build a ContnetControl to instead of RichTextBlock like the following code snippet.
    <ContentControl Content="{Binding Path=Snippet, Converter={StaticResource RtFToBlocks}}">
    </ContentControl>
    Step 2, prepare RTF string like
    <RichTextBlock xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'><Paragraph><Bold>Fearful</Bold> of all things, Fred...</Paragraph></RichTextBlock>
    Step 3, use value converter to bind to ContentControl.
    public object Convert(object value, Type targetType, object parameter, string language)
    string rtfText = (string)value;
    object blocksObj = XamlReader.Load(rtfText);
    return (RichTextBlock)blocksObj;
    Please let me know if you have any concerns.
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate
    the survey.

  • Get Control inside ContentControl as CommandParameter and programatically

    Hi,
    In a Window I've a ContentControl and a button 
    <ContentControl x:Name="buscarRegion"
    prism:RegionManager.RegionManager="{Binding RegionManager,
    RelativeSource={RelativeSource AncestorType={x:Type Window}, Mode=FindAncestor}}"
    prism:RegionManager.RegionName="{x:Static inf:RegionNames.BuscarRegion}"/>
    <Button Content="Button" HorizontalAlignment="Left"
    Command="{Binding ExcelGridCommand}" CommandParameter="???????"/>
    Prism does the work and UserControl with a grid inside appears in ContentControl, my problem are two:
    -How can i pass the grid as parameter to ExcelGridCommand?. Button is not inside the UserControl and in xaml i don't find the way to do it
    -How can i access to grid programatically ? I've been trying with VisualTreeHelper:
    ContentPresenter cpresenter = VisualTreeHelper.GetChild(this.buscarRegion, 0) as ContentPresenter;
    var nChildCount = VisualTreeHelper.GetChildrenCount(cpresenter.Content as DependencyObject);
    for (int x = 0; x<nChildCount; x++)
    FrameworkElement child = VisualTreeHelper.GetChild(cpresenter.Content as DependencyObject, x) as FrameworkElement; //returns a Border :-(
    if (child == null)
    continue;
    // Is child of desired type and name?
    if ( child.Name.Equals("grid"))
    // Bingo! We found a match.
    MessageBox.Show("Found matching element [{0}]", "grid");
    break;
    } // if
    No way, any idea ?
    Thank's in advance

    -How can i pass the grid as parameter to ExcelGridCommand?. Button is not inside the UserControl and in xaml i don't find the way to do it
    foreach (Grid grid in FindVisualChildren<Grid>(buscarRegion))
    if (grid.Name.Equals("grid"))
    theButton.CommandParameter = grid;
    <Button x:Name="theButton" Content="Button" HorizontalAlignment="Left"
    Command="{Binding ExcelGridCommand}" />
    You will have to get a reference to the Grid element programmatically and then set the CommandProperty of the Button in the code-behind of the view. Refer to the below code for details.
    -How can i access to grid programatically ? I've been trying with VisualTreeHelper:
    You could use the following helper method:
    public static IEnumerable<T> FindVisualChildren<T>(DependencyObject depObj) where T : DependencyObject
    if (depObj != null)
    for (int i = 0; i < VisualTreeHelper.GetChildrenCount(depObj); i++)
    DependencyObject child = VisualTreeHelper.GetChild(depObj, i);
    if (child != null && child is T)
    yield return (T)child;
    foreach (T childOfChild in FindVisualChildren<T>(child))
    yield return childOfChild;
    Usage:
    foreach (Grid grid in FindVisualChildren<Grid>(buscarRegion))
    if (grid.Name.Equals("grid"))
    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please only ask ONE question per thread.

  • Hubsections and ContentTemplate and ContentControl

    I have a simple windows store app, based on the hub template.
    The main hub contains 8 very similar hubsections. So instead of copy/pasting each hubsection properties I'd like to use some kind of template.
    Each hubsection is like so:
    <HubSection Width="350" x:Uid="HubSection1" Header="Header1">
    <DataTemplate>          
    <ListBox x:Name="lbMilitary" ItemsSource="{Binding}" Grid.Column="1" Background="Red">
    <ListBox.ItemTemplate>
    <DataTemplate>
    <Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="auto"></ColumnDefinition>
    <ColumnDefinition Width="12"></ColumnDefinition>
    <ColumnDefinition Width="*"></ColumnDefinition>
    </Grid.ColumnDefinitions>
    <TextBlock Style="{StaticResource PlayerNameTextBlockTemplate}" Text="{Binding PlayerName}"/>
    <TextBox Text="{Binding PlayerScore1, Mode=TwoWay}"  Style="{StaticResource TbTemplate}/>
    </Grid>      
    </DataTemplate>
    </ListBox.ItemTemplate>
    </ListBox>
    </DataTemplate>
    </HubSection>
    So, to simplify my XAML I have written a contentcontrol, like so:
    <Page.Resources>
    <ResourceDictionary>
    <DataTemplate x:Key="TemplateTest">
    <ContentControl>
    <Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="auto" />
    <ColumnDefinition Width="24" />
    <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>
    <ListBox Grid.Column="0">
    <ListBox.ItemTemplate>
    <DataTemplate>
    <TextBlock FontSize="32" Text="{Binding PlayerName}"/>
    </DataTemplate>
    </ListBox.ItemTemplate>
    </ListBox>
    </Grid>
    </ContentControl>
    </DataTemplate>
    </ResourceDictionary>
    </Page.Resources>
    And I am trying to use this template like so:
    <HubSection x:Name="HubSecTest" Header="Test" ContentTemplate="{StaticResource TemplateTest}"> </HubSection>
    If inside my control I simply insert a simple element such as a textblock, it seems to be working. But with a listbox (such as the one in the full hubsection model), nothing displays.
    What am I doing wrong ?
    Also, another difficulty is that in my TextBox that is bound to PlayerScore I would like to be able to choose a specific binding for each separate hubsection, like so :
    <HubSection x:Name="HubSecTest" Header="Test" ContentTemplate="{StaticResource TemplateTest}">
    <!-- Bind the textblock to "PlayerName" -->
    <!-- Bind the TextBox to "PlayerScore1" -->
    </HubSection>
    <!-- Next hubsection -->
    <HubSection x:Name="HubSecTest" Header="Test" ContentTemplate="{StaticResource TemplateTest}">
    <!-- Bind the textblock to "PlayerName" as in the previous section BUT -->
    <-- Bind the TextBox to "PlayerScore2" -->
    </HubSection>
    Thanks :)

    Thank you very much for your answer.
    I'll try to answer your question as accurately as possible (I'm still rather new to all this ...).
    Both TextBlock and TextBox are included in a single ListBox in my basic design, as you can see in the first code example. Therefore, I guess my second code example is incomplete since the template should also include a TextBox in addition to the TextBlock,
    like so :
    <DataTemplate x:Key="TemplateTest">
    <ContentControl>
    <Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="auto" />
    <ColumnDefinition Width="24" />
    <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>
    <ListBox Grid.Column="0">
    <ListBox.ItemTemplate>
    <DataTemplate>
    <TextBlock FontSize="32" Text="{Binding PlayerName}"/>
    <TextBox Text="{Binding}"/>
    </DataTemplate>
    </ListBox.ItemTemplate>
    </ListBox>
    </Grid>
    </ContentControl>
    </DataTemplate>
    Here, I have left <TextBox Text={Binding}"/> since in each separate HubSection I would like to be able to bind this TextBox to different properties (while the TextBlock will always be bound to PlayerName).
    From your answer, I understand that this is not possible and that I should use 2 ListBox in my template.
    However, I do not understand how I could do so. How would it be possible in XAML ? (if not, should I do it from code behind and how ?)
    For example, what could I do when defining the HubSection below ?
    <HubSection x:Name="HubSecTest" Header="Test" ContentTemplate="{StaticResource TemplateTest}">
    </HubSection>
    Is there a code that could allow binding the TextBlock or TexBox to different properties (for the TextBlock it is easy since I can define it in the template) ?
    The itemsource is indeed the same. I have created a class called Players.cs into which the properties Players.PlayerName and Players.PlayerScore<1..n> are defined.
    Thank you again for your time.

  • Report Performance with Bind Variable

    Getting some very odd behaviour with a report in APEX v 3.2.1.00.10
    I have a complex query that takes 5 seconds to return via TOAD, but takes from 5 to 10 minutes in an APEX report.
    I've narrowed it down to one particular bind. If I hard code the date in it returns in 6 seconds, but if I let the date be passed in from a parameter it takes 5+ minutes again.
    Relevant part of the query (an inline view) is:
    ,(select rglr_lect lect
    ,sum(tpm) mtr_tpm
    ,sum(enrols) mtr_enrols
    from ops_dash_meetings_report
    where meet_ev_date between to_date(:P35_END_DATE,'DD/MM/YYYY') - 363 and to_date(:P35_END_DATE,'DD/MM/YYYY')
    group by rglr_lect) RPV
    I've tried replacing the "to_date(:P35_END_DATE,'DD/MM/YYYY') - 363" with another item which is populated with the date required (and verified by checking session state). If I replace the :P35_END_DATE with an actual date the performance is fine again.
    The weird thing is that a trace file shows me exactly the same Explain Plan as the TOAD Explain where it runs in 5 seconds.
    Another odd thing is that another page in my application has the same inline view and doesn't hit the performance problem.
    The trace file did show some control characters (circumflex M) after each line of this report's query where these weren't anywhere else on the trace queries. I wondered if there was some sort of corruption in the source?
    No problems due to pagination as the result set is only 31 records and all being displayed.
    Really stumped here. Any advice or pointers would be most welcome.
    Jon.

    Don't worry about the Time column, the cost and cardinality are more important to see whther the CBO is making different decisions for whatever reason.
    Remember that the explain plan shows the expected execution plan and a trace shows the actual execution plan. So what you want to do is compare the query with bind variables from an APEX page trace to a trace from TOAD (or sqlplus or whatever). You can do this outside APEX like this...
    ALTER SESSION SET EVENTS '10046 trace name context forever, level 1';Enter and run your SQL statement...;
    ALTER SESSION SET sql_trace=FALSE;This will create a a trace file in the directory returned by...
    SELECT value FROM v$parameter WHERE name = 'user_dump_dest' Which you can use tkprof to format.
    I am assuming that your not going over DB links or anything else slightly unusual?
    Cheers
    Ben

  • How to Dene a Data Link Between Queries: Bind Variables

    This is an interesting topic and I cannot get it to work using Bind Variables.
    I have 2 queries: Q1 and Q2. Q2 needs c_id, account_code and account_type from Q1.
    Whe I run the data template below, I get only the data for Q1.
    Now people may argue that there is no data in Q2 for the relevant clause. So if I even remove the where clause in Q2 I still get no joy i.e Data appears for Q1 but not for Q2
    <dataTemplate name="FLCMR519_DATA_SET" description="Termination Quote Report">
         <parameters>
              <parameter name="cid" dataType="number" defaultValue="1"/>
              <parameter name="p_cln_id" dataType="number" defaultValue="62412"/>
         </parameters>
         <dataQuery>
              <sqlStatement name="Q1">
                   <![CDATA[SELECT qm.qmd_id,
    qm.contract_period,
    qm.quo_quo_id||'/'||qm.quote_no||'/'||qm.revision_no reference_no,
    qm.contract_distance,
    qm.mdl_mdl_id,
    q.qpr_qpr_id,
    q.quo_id,
    q.drv_drv_id,
    qm.revision_user username,
    pb.first_name||' '||pb.last_name op_name,
    pb.telephone_no,
    pb.facsimile_no,
    pb.email,
    q.c_id c_id,
    q.account_type account_type,
    q.account_code account_code,
    m.model_desc,
    ph.payment_description payment_head_desc,
    cl.fms_fms_id,
    cl.start_date,
    cl.end_date,
    cl.actual_end_date,
    cl.con_con_id,
    cl.cln_id,
    cl.term_qmd_id term_qmd_id,
    qm2.contract_period term_period,
    qm2.contract_distance term_distance
    FROM quotations q,
               quotation_models qm,
               contract_lines cl,
               personnel_base pb,
               models m,
               model_types mt,
               payment_headers ph,
               quotation_models qm2
    WHERE q.quo_id = qm.quo_quo_id
           AND cl.cln_id = :p_cln_id
           AND qm.qmd_id = cl.qmd_qmd_id
           AND qm2.revision_user = pb.employee_no (+)
           AND qm.mdl_mdl_id = m.mdl_id
           AND m.mtp_mtp_id = mt.mtp_id
           AND qm.payment_id = ph.payment_header_id
           AND qm2.qmd_id (+) = cl.term_qmd_id
    ]]>
              </sqlStatement>
              <sqlStatement name="Q2">
                   <![CDATA[SELECT ea.c_id,                  ea.account_type,ea.account_code,ea.account_name
    FROM external_accounts ea
                 WHERE ea.c_id = :c_id
                   AND ea.account_type = :account_type
                   AND ea.account_code = :account_code
    ]]>
              </sqlStatement>
         </dataQuery>
    </dataTemplate>

    Defining dataStructure section is mandatory for multiple queries.

  • Problem with binding value on the UI  from a calculated column in the view

    I have calculated field "Readiness" in my db view, which gets calculated based on other columns in the same table. I have added new column to my EO using "Add from table" option and added the same column from to VO using "Add from EO" option. In my application, I will update a particular date field in the UI and this calculated column "Readiness" in the db will be set to yes or no and this logic is working fine, both date date field and calculated field are in same view object. I have added a attribute binding to this "Readiness" column in my view page. The problem is the calculated column value does not reflect the new value in the db, it shows the old value. I have tried different refresh option for the iterator and ppr option for the field binding. Even after reloading the page, the value shown on the UI page is different from the value in db, other bindings on the UI page works fine, not sure any special settings are required for the Calculated columns. any ideas are appreciated.
    Thanks for your help,
    Surya

    I tried to add soms debugging statements in the EO and getters method, the calcaulated column is not picking the value in db view. I'm not any special iterator/field settings are required at BC level. I'm a newbie, any help is appreciated.
    Thanks,
    Surya

  • ORA-03111 - JCA Binding error while invoking a stored procedure in DB

    Hi,
    We are facing this problem for one interface alone.
    Need expert advice to fix this problem..
    This is scheduled to run once in a day and fails daily for past 2 weeks..
    We receive below error as response..
    Same interface worked fine for past 1 yr..
    Also it works fine if we reprocess the batch in next day morning...
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'DB_Legacy_To_EBS_Invoice_Conversion' failed due to: Stored procedure invocation error. Error while trying to prepare and execute the IRSOA.AR_SOA_INVOICE.TRN_GET_CUST_INV_RAW_TO_STAGE API. An error occurred while preparing and executing the IRSOA.AR_SOA_INVOICE.TRN_GET_CUST_INV_RAW_TO_STAGE API. Cause: java.sql.SQLException: ORA-03111: break received on communication channel ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
    AND
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'DB_Legacy_To_EBS_Invoice_Conversion' failed due to: Stored procedure invocation error. Error while trying to prepare and execute the IRSOA.AR_SOA_INVOICE.TRN_GET_CUST_INV_RAW_TO_STAGE API. An error occurred while preparing and executing the IRSOA.AR_SOA_INVOICE.TRN_GET_CUST_INV_RAW_TO_STAGE API. Cause: java.sql.SQLException: ORA-01013: user requested cancel of current operation ORA-06512: at "IRSOA.XXIR_AR_SOA_CUSTOMER_INVOICE", line 213 ORA-06512: at line 1 ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution
    Thanks,
    Sundaram

    Looks like the SQL might be taking a longer time to execute and might be timing out.
    Please refer the following:
    Re: ORA-01013: user requested cancel of current operation
    http://www.dba-oracle.com/t_ora_01013_user_requested_cancel_of_current_operation.htm
    Additionally, ORA-06512 indicates that there is a mismatch of the with the data length that is being processed. Refer http://www.techonthenet.com/oracle/errors/ora06512.php
    Hope this helps.
    Thanks,
    Patrick

  • Error when using Variable Transport Binding in Sender Mail Adapter

    Hi,
    I am using the Sender Mail Adapter to receive an email, convert the attached tab delimited text file into xml and map it to an IDOC.
    I am using PayloadSwapBean and MessageTransformBean in order to do this, and this all works perfectly.
    I am now trying to access the Adapter Specific Message Attributes to retrieve the SHeaderFROM attribute from the message and map it to a field in the idoc.
    However when I check the "Variable Transport Binding" option in the Advanced tab of the mail adapter, the message no longer goes through to SXMB_MONI and I get the following error in the Java logs.
    Transmitting the message to endpoint http://sapserver:53500/sap/xi/engine?type=entry using connection AFW failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Received HTTP response code 500 : Error during parsing of SOAP header.
    Any ideas why this is happening?
    Thanks,
    Brad

    Hi Luciana,
    Honestly, I cant really remember how or if it was resolved and I was just helping out on the issue, but another consultant continued with it, so unfortunately I cant be any help on this.
    Good luck!
    Cheers,
    Brad

  • Mail sender adapter with Variable Transport Binding doesn't work

    Hi,
    we have PI/700 SP7.
    An external partner sends an email with one attachment (a simple csv file).
    I take "PayloadSwapBean" (with swap.keyName = payload-name) to get the attachment.
    Both, the Adapter-Specific Message Attributes indicator and the Variable Transport Binding indicator are set.
    I set the mail package format indicator too.
    What I need is the sender, receiver and subject of the mail plus the attachment.
    Unfortunately it is not possible to read in the email with this configuration - I get an error.
    If I unset the Variable Transport Binding indicator - I get the email but without "sender, receiver and subject" in "SHeaderFROM, SHeaderTO, SHeaderSubject". The "mail package" is overwritten by the attachment.
    Is it a problem of the namespace "http://sap.com/xi/XI/System/Mail"?
    Do I have to define this namespace or do I have to import a content (SAP BASE 700, SP7 is imported)?
    Please help...
    Regards
    Wolfgang

    Hi Wolfgang,
    I hope it is not due to the namespace.
    This might help you.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05
    Need some Guide regarding Configuration of Sender Mail Adapters....
    Regards
    Agasthuri Doss
    Message was edited by: Agasthuri Doss Baladandapani

  • 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

  • Not able to Bind DPS 6.3.1

    Hey,
    I configured Sun Directory Server 6.3.1 on Solaris Sparc. I'm not able to bind the ldapclient.
    **DPS Error log says:**
    17/Sep/2009:07:36:08 +0000] - BACKEND - WARN - No data source available for ADD,BIND,COMPARE,DELETE,MODIFY, in data source pool cn=my pool,cn=datasource pools,cn=config .You may want to check whether the configuration of this pool contains at least one data source enabled and with non-zero weights.
    [17/Sep/2009:07:36:08 +0000] - BACKEND - WARN - Can't retrieve LDAP schema (LDAP error code: 32) No data view were found to process the search request.
    [17/Sep/2009:07:36:08 +0000] - STARTUP - INFO - Sun-Java(tm)-System-Directory-Proxy-Server/6.3 B2008.0311.0334 started on host server-ldap in directory /opt/ldap/master/att-dps1
    [17/Sep/2009:07:36:08 +0000] - STARTUP - INFO - Listening for secure client connections on 0.0.0.0:5392
    [17/Sep/2009:07:36:08 +0000] - STARTUP - INFO - Listening for client connections on 0.0.0.0:5391
    [17/Sep/2009:07:36:37 +0000] - BACKEND - WARN - LDAP server server-ldap:3998/ is up and running.
    [17/Sep/2009:07:36:37 +0000] - BACKEND - WARN - Attempt to bind as dc=my-domain,dc=com to backend server server-ldap:5389/ failed. Silent BIND failed : err=48, error message "",
    [17/Sep/2009:07:36:37 +0000] - BACKEND - ERROR - Failed to create a connection to mdtnj001ldap:5389/
    [17/Sep/2009:07:36:37 +0000] - BACKEND - WARN - LDAP server mdtnj001ldap:5389/ is up and running.
    [17/Sep/2009:11:39:53 +0000] - BACKEND - WARN - No servers available to process BIND in data source pool cn=defaultdatasourcepool,cn=datasource pools,cn=config
    DPS Acces logs says:*_
    [17/Sep/2009:08:56:45 +0000] - SERVER_OP - INFO - conn=67 op=1 BIND RESPONSE err=0 msg="" s_conn=dscc_ldap_mdtnj001ldap:3998:32
    [17/Sep/2009:08:56:45 +0000] - PROFILE - INFO - conn=67 assigned to connection handler cn=directory services administrators,cn=connection handlers,cn=config
    [17/Sep/2009:08:56:45 +0000] - OPERATION - INFO - conn=67 op=1 BIND RESPONSE err=0 msg="" etime=0
    [17/Sep/2009:08:56:45 +0000] - OPERATION - INFO - conn=67 op=2 UNBIND
    [17/Sep/2009:08:56:45 +0000] - DISCONNECT - INFO - conn=67 reason="unbind"
    [17/Sep/2009:08:56:45 +0000] - CONNECT - INFO - conn=68 client=135.25.219.143:28428 server=mdtnj001ldap:5391 protocol=LDAP
    [17/Sep/2009:08:56:45 +0000] - PROFILE - INFO - conn=68 assigned to connection handler cn=default connection handler, cn=connection handlers, cn=config
    [17/Sep/2009:08:56:45 +0000] - OPERATION - INFO - conn=68 op=0 EXTENDED oid="1.3.6.1.4.1.1466.20037"
    [17/Sep/2009:08:56:45 +0000] - OPERATION - INFO - conn=68 op=0 EXTENDED RESPONSE err=0 msg="" etime=0
    [17/Sep/2009:08:56:45 +0000] - OPERATION - INFO - conn=68 op=1 BIND dn="cn=admin,cn=administrators,cn=dscc" method="SIMPLE" version=3
    [17/Sep/2009:08:56:45 +0000] - SERVER_OP - INFO - conn=68 op=1 BIND dn="cn=admin,cn=Administrators,cn=dscc" method="SIMPLE"" version=3 s_msgid=4 s_conn=dscc_ldap_mdtnj001ldap:3998:33
    *DS Error logs says:*
    [15/Sep/2009:09:35:59 +0000] - Sun-Java(tm)-System-Directory/6.3 B2008.0311.0058 (64-bit) starting up
    [15/Sep/2009:09:36:00 +0000] - Listening on all interfaces port 5389 for LDAP requests
    [15/Sep/2009:09:36:00 +0000] - Listening on all interfaces port 5390 for LDAPS requests
    [15/Sep/2009:09:36:00 +0000] - slapd started.
    [15/Sep/2009:09:36:00 +0000] - INFO: 161 entries in the directory database.
    [15/Sep/2009:09:36:00 +0000] - INFO: add:0, modify:0, modrdn:0, search:1, delete:0, compare:0, bind:0 since startup.
    [16/Sep/2009:09:36:00 +0000] - INFO: 161 entries in the directory database.
    [16/Sep/2009:09:36:00 +0000] - INFO: add:0, modify:2, modrdn:0, search:7348, delete:0, compare:0, bind:4 since startup.
    **DS Access logs says:**
    [17/Sep/2009:09:06:52 +0000] conn=630 op=44 msgId=45 - SRCH base="" scope=0 filter="(objectClass=1.1)" attrs=ALL
    [17/Sep/2009:09:06:52 +0000] conn=630 op=44 msgId=45 - RESULT err=0 tag=101 nentries=0 etime=0
    [17/Sep/2009:09:07:22 +0000] conn=637 op=180 msgId=1 - SRCH base="" scope=0 filter="(|(objectClass=*)(objectClass=ldapSubEntry))" attrs="1.1"
    [17/Sep/2009:09:07:22 +0000] conn=637 op=180 msgId=1 - RESULT err=0 tag=101 nentries=1 etime=0
    **On Ldap Client which is also Sun Sparc Box:**
    bash-3.00# ldapclient list
    NS_LDAP_FILE_VERSION= 2.0
    NS_LDAP_BINDDN= cn=proxyagent,ou=profile,dc=my-doamin,dc=com
    NS_LDAP_BINDPASSWD= {NS1}25c94587c053424f
    NS_LDAP_SERVERS= Y.Y.Y.Y:5389
    NS_LDAP_SEARCH_BASEDN= dc=my-domain,dc=com
    NS_LDAP_AUTH= simple
    NS_LDAP_SEARCH_REF= FALSE
    NS_LDAP_CACHETTL= 0
    NS_LDAP_CREDENTIAL_LEVEL= proxy
    bash-3.00# ldaplist -v
    +++ database=NULL
    +++ filter=objectclass=*
    +++ template for merging SSD filter=%s
    ldaplist: Object not found (Session error no available conn.
    I'm able to run successfully ldapsearch -p 5389 -h Y.Y.Y.Y -D "cn=Directory Manager" -b 'ou=People,dc=my-domain,dc=com' objectclass=* from client box [ When I'm using port 5389 where DS service is running on]
    BUT
    Getting Error when searching using port 5391 [Where DPS is running on ]
    bash-3.00# ldapsearch -p 5391 -h Y.Y.Y.Y -D "cn=Directory Manager" -b 'ou=People,dc=my-doamin,dc=com' objectclass=*
    Enter bind password:
    ldap_simple_bind: Operations error
    ldap_simple_bind: additional info: Unable to retrieve a backend BIND connection
    bash-3.00#
    bash-3.00# tail -f /var/ldap/cachemgr.log
    Tue Sep 15 09:06:38.0240 Starting ldap_cachemgr, logfile /var/ldap/cachemgr.log
    Tue Sep 15 09:06:38.0460 sig_ok_to_exit(): parent exiting...
    Tue Sep 15 09:31:25.3718 Starting ldap_cachemgr, logfile /var/ldap/cachemgr.log
    Tue Sep 15 09:31:25.3977 sig_ok_to_exit(): parent exiting...
    bash-3.00# tail -f /var/adm/messages
    Sep 17 03:44:41 mdtnj001wbs last message repeated 11 times
    Sep 17 03:44:41 mdtnj001wbs last message repeated 11 times
    Sep 17 03:48:31 mdtnj001wbs ldaplist[6828]: [ID 293258 user.error] libsldap: Status: 32 Mesg: openConnection: simple bind failed - No such object
    Sep 17 03:48:31 mdtnj001wbs ldaplist[6828]: [ID 293258 user.error] libsldap: Status: 32 Mesg: openConnection: simple bind failed - No such object
    Could you please help me out. Whats wrong configuration I made .. OR Did I forget to add....
    Thanks
    Sanjay

    Adding Few more Info for the same:
    I create My View/My Pool
    bash-3.00# /opt/ldap/master/dps6/bin/dpconf get-ldap-data-view-prop -h server-ldap -p 5391 -v My\ View
    alternate-search-base-dn : ""
    alternate-search-base-dn : dc=com
    attr-name-mappings : none
    base-dn : dc=my-doamin,dc=com
    contains-shared-entries : false
    custom-distribution-algorithm : none
    description : -
    distribution-algorithm : none
    dn-join-rule : none
    dn-mapping-attrs : none
    dn-mapping-source-base-dn : none
    excluded-subtrees : -
    filter-join-rule : none
    is-enabled : true
    is-read-only : false
    is-routable : true
    ldap-data-source-pool : My Pool
    lexicographic-attrs : all
    lexicographic-lower-bound : none
    lexicographic-upper-bound : none
    non-viewable-attr : none
    non-writable-attr : none
    numeric-attrs : all
    numeric-default-data-view : false
    numeric-lower-bound : none
    numeric-upper-bound : none
    pattern-matching-base-object-search-filter : all
    pattern-matching-dn-regular-expression : all
    pattern-matching-one-level-search-filter : all
    pattern-matching-subtree-search-filter : all
    process-bind : -
    replication-role : master
    viewable-attr : all except non-viewable-attr
    writable-attr : all except non-writable-attr
    The "get-ldap-data-view-prop" operation succeeded on "server-ldap:5391".
    bash-3.00# /opt/ldap/master/dps6/bin/dpconf list-attached-ldap-data-sources -h server-ldap -p 5391 -v My\ Pool
    SRC_NAME add-weight bind-weight compare-weight delete-weight modify-dn-weight modify-weight search-weight
    My DS disabled disabled disabled disabled disabled disabled 100
    The "list-attached-ldap-data-sources" operation succeeded on "server-ldap:5391".
    bash-3.00# /opt/ldap/master/dps6/bin/dpconf list-ldap-data-sources -v -h server-ldap -p 5391
    SRC_NAME is-enabled ldap-address ldap-port ldaps-port description
    My DS true server-ldap 5389 ldaps
    dscc_ldap_server-ldap:3998 true server-ldap 3998 ldaps dscc administration server
    The "list-ldap-data-sources" operation succeeded on "mdtnj001ldap:5391".
    If you need more info .. please let me know....
    Thanks
    Sanjay

  • Can not bind server stubs.

    Hi All,
    i am strugling for a few days (!) now with a starnge problem
    i have created an rmi application and when i run under windows all is well.
    when i tried running it under Linux (Red Hat 7.2) and the stubs where not packed in a jar file all is well as
    well. BUT - if i pack the stubs in a jar i get an exception :
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: (<name of class>...)
    The Exception occour when i try to BIND the stub not when the client is looking for it.
    i have set the policy , classpath , and security manager properly obviously since the appliaction is working
    ok when the stubs are not packed in a jar. the jar file is at the same directory as the unpacked stubs when
    the application is runnig so i dont think it is a classpath issue.
    Can anyone please help ? thanx.

    I don't, sorry. I suppose windows is making a informed guess about the path to the classes. I'm only using linux and Java 1.5 and I have to make sure and expose the interfaces I bind to the rmi registry. Not sure which behavior is supposed to be the correct one.

  • Error while  binding  data into Node which is Created  Dynamically.

    Hi  All
    We have a scenario , which is  to create the Context and its attribute dynamically at runtime. When I create the context with structure. Using the method  <b>‘create_nodeinfo_from_struct()’</b>.here the attributes under the created node is automatically taken from the provided structure ‘SPFLI’.
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
      parent_info = rootnode_info
      node_name = ‘DYN’
      structure_name = ‘SPFLI’
      is_multiple = abap_true ).
    Using the above method it is working fine and I could bind the value into the node.
    But  our scenario is to create context and its attributes without giving any predefined structure. We need to add attributes manually giving one by one.
    For that I have used the method ‘rootnode_info->add_new_child_node’ &
    dyn_node->add_attribute( exporting attribute_info = ls_attribute ).
    But am getting short dumb showing <b>‘Line types of an internal table and a work area not compatible’.</b>
    Please give me a solution..
    I used the following code…. 
    data:
      rootnode_info type ref to if_wd_context_node_info,
      dyn_node type ref to if_wd_context_node,
      data :ls_attribute type wdr_context_attribute_info.
      rootnode_info = wd_context->get_node_info( ).
      call method rootnode_info->add_new_child_node
        exporting
         SUPPLY_METHOD                =
         SUPPLY_OBJECT                =
         DISPOSE_METHODS              =
         DISPOSE_OBJECT               =
         STATIC_ELEMENT_TYPE          =
          name                         = 'DYN'
          is_mandatory                 = abap_false
          is_mandatory_selection       = abap_false
          is_multiple                  = abap_true
          is_multiple_selection        = abap_false
          is_singleton                 = abap_true
          is_initialize_lead_selection = abap_true
         STATIC_ELEMENT_RTTI          =
          is_static                    = abap_false
         ATTRIBUTES                   =
        receiving
          child_node_info              =  node_nsp
      ls_attribute-name = 'CARRID'.
      ls_attribute-type_name = 'S_CARR_ID'.
      ls_attribute-value_help_mode = '0'.
      node_nsp->add_attribute( exporting attribute_info = ls_attribute ).
      ls_attribute-name = 'CONNID'.
      ls_attribute-type_name = 'S_CONN_ID'.
      ls_attribute-value_help_mode = '0'.
      node_nsp->add_attribute( exporting attribute_info = ls_attribute ).
      DATA : BEGIN OF str,
             carrid TYPE s_carr_id,
             connid TYPE s_conn_id,
             END OF str.
      DATA :  it_str LIKE TABLE OF str.               
      select carrid connid from spfli into corresponding fields of table it_str
      dyn_node = wd_context->get_child_node( name = 'DYN'  ).
      dyn_node->bind_table( it_str ).
    data: l_ref_cmp_usage type ref to if_wd_component_usage.
      l_ref_cmp_usage =   wd_this->wd_cpuse_alv_usage( ).
      if l_ref_cmp_usage->has_active_component( ) is initial.
        l_ref_cmp_usage->create_component( ).
      endif.
      data: l_ref_interfacecontroller type ref to iwci_salv_wd_table .
      l_ref_interfacecontroller =   wd_this->wd_cpifc_alv_usage( ).
      l_ref_interfacecontroller->set_data(
        r_node_data =  dyn_node                     " Ref to if_Wd_Context_Node
    Thanks in advance..
    Nojish
    Message was edited by:
            nojish p

    Hi Nojish.
    I gues the error happens when you try to read the static attributes of an element of
    you dynamic node. This does not work using your defined type str, cause with
    get_static_attribute you only receive the static and not the dynamic attributes.
    Static attributes are attributes that are defined at design time. Thats why the
    structure does not match.
    But you can use the following code to get your dynamic attributes, for example
    getting the lead selection element and the attribute carrid:
    dyn_node = wd_context->get_child_node( name = 'DYN' ).
      lr_elelement = dyn_node->get_element( ).
      lr_el->get_attribute(
        EXPORTING
          name = 'CARRID'
        IMPORTING
          value = lv_carrid
    Hope this helps.
    PS: Or do you get the reerror in above code? Your code works here. If so pls provide short dump.
    Cheers,
    Sascha
    Message was edited by:
            Sascha Dingeldey

  • Unable to bind portlet parameter with page parameter in webcenter portal

    Hi All,
    I am trying to bind portlet parameter with the page parameter so that I can ahieve some business requirements.
    Here is what I did,
    In my Portlet producer application:
    1) Created standards based portlet (jsr 286) with view.jspx and edit.jspx with rest of the things being default.
    2) In my portlet.xml created two parameters and assigned these parameters to the portlet created above.
    3) In the view.jspx added couple of output label adf components in the page.
    4) deployed this to integrated weblogic server.
    In my WC portal application:
    Created a new page and added the portlet to this page( WSRP connection already exists).
    deployed portal application on integrated server.
    In the edit mode of the page I added one page parameter(Param1) and some default (constant) value added.
    What I want is this:
    when Param1 value is One display first output label and
    when Param1 value is Two display second output label.
    I am using jdev 11.1.1.5.0 with integrated weblogic server.

    There is no need to use page parameters for this.
    You also have two types of parameters depending on what you want...
    1) Preferences: these parameters can be used on a user based level. This means that users can personalize the portlets. When a user change the value of a preference, it is only applied for that specific user
    2) Public parameters: these parameters are used to customize the portlet. The value you set in these parameter apply for all users.
    I have made a simple example to show these two differences: http://www.yonaweb.be/PortletTest.zip
    The portlet has 4 inputText on it. The first two can be set by specifying One or Two into the preference.
    The other 2 inputText uses the value of the public parameter.
    You should only deploy the portlet and consume it in a webcenter application. In the webcenter application, you don't need to do anything special. All is done in the portlet.
    I am guessing you don't have written the code that will get the value of the parameter:
    in case of a preference you will get the value by following code:
       PortletRequest request = (PortletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
       PortletPreferences preferences = request.getPreferences();
       return preferences.getValue("outputparam", "One");In case of a public parameter (for customization instead of personalization) you use following code to retreive the value of a public parameter:
    PortletRequest req = (PortletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
      String param = (String)req.getParameter("PublicParam");
      if(param == null)
          return "Three";
      return param;This code can also be found in the sample portlet application.

Maybe you are looking for