Create a trigger which set Image source with binding to a dependency property.

I'm trying to create a specified button which switch images every time it pressed, without using the Click CBFunction, so I'm using toggle button and triggers (checked unchecked) and I want this button to
supply DP of string so who ever uses is button will only have to specify the images paths and a click CBFuntion to
perform what ever he wishes.
I managed to create the mechanism for switching images with triggers(but the triggers image paths are hard coded and not using DP) and to enable setting a click CBFunction. When I switch the hard coded image path with a DP which return a string with
the path the program crush, an exception is thrown.
U.C xaml:
<UserControl x:Class="ButtonChangeImage.UserControl1"
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">
<Grid>
<ToggleButton x:Name="btnCI">
<ToggleButton.Content >
<Image Name="img" Source="C:\Users\AmitL\Desktop\joecocker.jpg"/>
</ToggleButton.Content>
<ToggleButton.Triggers>
<EventTrigger RoutedEvent="ToggleButton.Checked">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.Target="{x:Reference img}" Storyboard.TargetProperty="Source">
<DiscreteObjectKeyFrame KeyTime="0:0:0">
<DiscreteObjectKeyFrame.Value>
<BitmapImage UriSource="{Binding FirstImage}"/>
<!--<BitmapImage UriSource="C:\Users\AmitL\Desktop\james-brown-010.jpg"/>--><!--if I switch to this line it works fine!-->
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
<EventTrigger RoutedEvent="ToggleButton.Unchecked">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.Target="{x:Reference img}" Storyboard.TargetProperty="Source">
<DiscreteObjectKeyFrame KeyTime="0:0:0">
<DiscreteObjectKeyFrame.Value>
<BitmapImage UriSource="C:\Users\AmitL\Desktop\joecocker.jpg"/>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</ToggleButton.Triggers>
</ToggleButton>
</Grid>
</UserControl>
U.C cs:
public partial class UserControl1 : UserControl
public static readonly DependencyProperty FirstImageDP = DependencyProperty.Register("FirstImage", typeof(string), typeof(UserControl1), new PropertyMetadata(@"C:\Users\AmitL\Desktop\james-brown-010.jpg", new PropertyChangedCallback(FirstImageSource)));
private string m_strFirstImage = string.Empty;
private BitmapImage m_oBMImage = null;
private static void FirstImageSource(DependencyObject obj, DependencyPropertyChangedEventArgs args)
UserControl1 l_UCBtnSwitchImage = (UserControl1)obj;
l_UCBtnSwitchImage.m_strFirstImage = (string)args.NewValue;
l_UCBtnSwitchImage.m_oBMImage = new BitmapImage(new Uri(l_UCBtnSwitchImage.m_strFirstImage, UriKind.Absolute));
public string FirstImage
get
string l_strTemp = (string)GetValue(FirstImageDP);
return l_strTemp;
set
SetValue(FirstImageDP, value);
public event RoutedEventHandler Click
add { btnCI.Click += value; }
remove { btnCI.Click -= value; }
public UserControl1()
InitializeComponent();
window xaml:
<Window x:Class="ButtonChangeImage.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:m="clr-namespace:ButtonChangeImage"
Title="MainWindow" Height="350" Width="525">
<Grid>
<m:UserControl1 Click="ToggleButton_Checked" FirstImage="C:\Users\AmitL\Desktop\james-brown-010.jpg"></m:UserControl1>
</Grid>
</Window>
The exception:
A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll
Additional information: 'Provide value on 'System.Windows.StaticResourceExtension' threw an exception.' Line number '20' and line position '46'.
I would love to know why when I switch the hard coded value with DP it suddenly throw exception, how to fix it or if there is other way to achieve U.C with those demands.
Thanks.

Hey Magnus,
Unfortunately I get the same result, the button is switching between the (Joe Cocker) image to blue button(normal pressed button look) how come the
(Joe Cocker) image return I didn't set a trigger for unchecked so what make it change the content
or the image source back to that image?
And I can't debug (by the way what's happening there how come it doesn't stop in all those code lines?).
I didn't make any changes here is all the code:
U.C cs:
namespace ButtonChangeImage
public class ImageConverter : IValueConverter
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
string s = value as string;
var source = new System.Windows.Media.Imaging.BitmapImage();
source.BeginInit();
source.UriSource = new Uri(s, UriKind.RelativeOrAbsolute);
source.EndInit();
return source;
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
throw new NotImplementedException();
public partial class UserControl1 : UserControl
public static readonly DependencyProperty FirstImageDP = DependencyProperty.Register("FirstImage", typeof(string), typeof(UserControl1), new PropertyMetadata(@"C:\Users\AmitL\Desktop\james-brown-010.jpg", new PropertyChangedCallback(FirstImageSource)));
private string m_strFirstImage = string.Empty;
private BitmapImage m_oBMImage = null;
private static void FirstImageSource(DependencyObject obj, DependencyPropertyChangedEventArgs args)
UserControl1 l_UCBtnSwitchImage = (UserControl1)obj;
l_UCBtnSwitchImage.m_strFirstImage = (string)args.NewValue;
l_UCBtnSwitchImage.m_oBMImage = new BitmapImage(new Uri(l_UCBtnSwitchImage.m_strFirstImage, UriKind.Absolute));
public string FirstImage
get
string l_strTemp = (string)GetValue(FirstImageDP);
return l_strTemp;
set
SetValue(FirstImageDP, value);
public event RoutedEventHandler Click
add { btnCI.Click += value; }
remove { btnCI.Click -= value; }
public UserControl1()
InitializeComponent();
U.C xaml:
<UserControl x:Class="ButtonChangeImage.UserControl1"
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">
<Grid>
<ToggleButton x:Name="btnCI" xmlns:local="clr-namespace:ButtonChangeImage">
<ToggleButton.Resources>
<local:ImageConverter x:Key="conv" />
</ToggleButton.Resources>
<ToggleButton.Style>
<Style TargetType="ToggleButton">
<Setter Property="Content">
<Setter.Value>
<Image Name="img" Source="C:\Users\AmitL\Desktop\joecocker.jpg"/>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Content">
<Setter.Value>
<Image Source="{Binding Path=FirstImage, Converter={StaticResource conv}}"/>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
</ToggleButton.Style>
</ToggleButton>
</Grid>
</UserControl>
Main Window cs:
namespace ButtonChangeImage
public partial class MainWindow : Window
public MainWindow()
InitializeComponent();
private void ToggleButton_Checked(object sender, RoutedEventArgs e)
MessageBox.Show("f");
Main Window xaml:
<Window x:Class="ButtonChangeImage.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:m="clr-namespace:ButtonChangeImage"
Title="MainWindow" Height="350" Width="525">
<Grid>
<m:UserControl1 Click="ToggleButton_Checked" FirstImage="C:\Users\AmitL\Desktop\james-brown-010.jpg"></m:UserControl1>
</Grid>
</Window>
Thanks,
Amit.

Similar Messages

  • How set Image Source with C#

    Hi,
    In C# I use FileOpenPicker to select the test.jpg, But it can't display the test.jpg.
    1. C#
    private async void button_addImage_Click(object sender, RoutedEventArgs e)
    FileOpenPicker fileOpenPicker = new FileOpenPicker();
    //fileOpenPicker.ViewMode = PickerViewMode.List;
    fileOpenPicker.ViewMode = PickerViewMode.Thumbnail;
    fileOpenPicker.SuggestedStartLocation = PickerLocationId.ComputerFolder;
    fileOpenPicker.FileTypeFilter.Add(".jpg");
    fileOpenPicker.FileTypeFilter.Add(".jpeg");
    fileOpenPicker.FileTypeFilter.Add(".png");
    StorageFile file = await fileOpenPicker.PickSingleFileAsync();
    if (file != null)
    Uri uri = new Uri(file.Path, UriKind.RelativeOrAbsolute);
    image_show.Source = new BitmapImage(uri);
    button_addImage.Visibility = Visibility.Collapsed;
    2. XAML
    <Grid Background="Orange" VerticalAlignment="Stretch">
    <!-- Source="ms-appx:///Assets/test.jpg" this is OK -->
    <Image x:Name="image_show" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Stretch="Uniform"/> <Button x:Name="button_addImage" Content="+" Click="button_addImage_Click">
    </Grid>

    Your app doesn't have access to the path the user picked. It needs to use the StorageFile returned from PickSingleFileAsync rather than bypassing it and going directly to the path. I discuss this in more detail in my blog entry at
    http://blogs.msdn.com/b/wsdevsol/archive/2012/12/05/stray-from-the-path-stick-to-the-storagefile.aspx .
    Open the StorageFile with StorageFile.OpenAsync then pass that stream to
    BitmapImage.SetSourceAsync. See the code snippet in the docs for an example.

  • How to set image source path in formsweb.cfg file in forms 11g

    Hi,
    I had written HTML code in the formsweb.cfg file in forms 11g. In the below code i am unable to retrive image file(i.e., .gif, .jpeg) from the server or local machine.
    In the below HTML code i set image source in the image tag as below:
    <img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-new11_04.GIF"
    Is this correct path to fetch the images from the server or local machine .
    Please help me out how to set path for image in html or is there any alternate process to retrive images.
    Here is the code :
    [INDIVIDUALUAT]
    workingDirectory=D:\Aims10dev\Work
    form=LMstartup.fmx
    userid=rmenu/rmenu@RLIFEQA64
    codebase=/forms/java
    imageBase=codebase
    width=1005
    height=750
    WebUtilArchive=/forms/java/frmwebutil.jar,/forms/webutil/jacob.jar
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljini.htm
    baseHTMLjpi=webutiljpi.htm
    archive_jini=frmall_jinit.jar,life-icons-round.jar,Agilis_Icon.jar,life_Icon.jar,personalize.jar,hyperlink.jar,amazingbutton.jar
    archive=frmall.jar
    separateFrame=False
    lookandfeel=Generic
    EndUserMonitoringURL=True
    usesdi=yes
    #HTMLbeforeForm= <table width="1005" border="0" cellspacing="0" cellpadding="0"><tr><td width="200"><img src="/forms/html/agilis-life-logo.gif" width="200" height="80" /></td><td width="10"><img src="/forms/html/agilis-life-new11_02.gif" width="36" height="80" /></td><td width="805" valign="top" background="/forms/html/agilis-life-new11_03.gif"></td></tr></td></tr></table>
    HTMLbeforeForm=<body topmargin="0" leftmargin="0" > <table width="1005" height="100" border="0" cellspacing="0" cellpadding="0"><tr><td width="200" valign="bottom" ><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-logo.gif" width="200" height="80" /></td><td width="10" valign="bottom" ><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-new11_02.gif" width="36" height="80" /></td><td width="550" valign="bottom" ><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-new11_03.gif" width="550" height="80" /></td><td valign="bottom"><table width="219" height="90" border="0" cellspacing="0" cellpadding="0"><tr><td height="36" valign="bottom" align="center"><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agile-logo.jpg" height="36"></td></tr><tr><td height="10" valign="bottom"> <div align="right"><span style="font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; text-decoration:none; color:#00000; " >Home | Change Password | Logout</span></div></td></tr><tr><td colspan="3" valign="bottom"><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-new11_04.GIF" width="100%" height="39" /></td></tr></table></td></tr></td></tr></table></body>

    AFAIK, this is not the correct way to set the image location.
    We call the working directory as context, so inside the context root along with WEB-INF, maintain a folder with name img and put all the images in that directory.
    You can use either .\<image_folder> or the optimum way would be (if you are using JSPs) to use getContext() method and traverse accordingly.
    FYI,,, using getContext() will give you context root directory, from there it is as simple as accessing any other folder.
    Hope this answers your question.
    Cheers,
    Jeets.

  • Set Image source programmatically

    I am working on a use case, where I have to set image source programmatically based on an input value. Eg: When I have a value of 'House1' in a form field, I have to display House1.png picture from a folder in file system. How can I do this?

    Thanks Timo.
    JDev Ver: 11.1.2.3
    I used the easy solution to have the images in a sub directory under root and accessing them using EL language. It is working fine. I have another question, as to the process to be implemented if I have to update the images. The application that I am working on has a need to update the images frequently. What is the best way to do it? I am thinking of creating a jar file for images and deploying it to web logic server Ishared library). If I have to add a new image, I can just make a jar file and re-deploy it again. I am new to ADF, so I am not sure if my approach is correct. Please advise.
    And, thanks for your blog. It was helpful.
    -Ashok

  • How can i create a .mov file from image sequence with different durations

    how do u create an image sequence with different durations? image one stays for 10 seconds and image two may stay for 30 and so on. each one has a custom duration. can this be done with an apple script or a text file saved as an mov file?

    Hello Omar,
    The example code Programmatic Printing of TestStand Reports - Modular contains a sequence that will convert an XML file to an HTML file given the XML file's path and the path to the stylesheet.  It may need to be altered to fit with the modifications you have already made to the report generation routines, but I think it should definitely get you off on the right foot.  Let me know if you have any questions!
    NickB
    National Intruments

  • Using Ternary operators to set image source

    Hi,
    I'm using JDeveloper llg, and have an ADF table, in one of the columns im trying to have just an image displayed.
    Using:
              <af:column width="16">
                         <img src="icons/bullet_green.png"
                                 height="16"
                                 width="16"/>
                </af:column>this works fine and the correct image is displayed. Is it possible to use an EL expression to determine which image should be displayed using a ternary operator? i have tried the following:
              <af:column width="16">
                            <img src="#{row.ServiceState == '100' ? 'icons/bullet_green.png' : 'icons/bullet_red.png'}"
                                 height="16"
                                 width="16"/>
              </af:column>however no image at all is now displayed when the application is run. Does anybody now how to fix this?
    Thanks in advance...

    One solution is to use an af:image instead of the normal img tag. Then put two af:image tags inside you af:column and set the visible attribute to your EL like:
    <af:column width="16">
    <af:image shortDesc="klassiert" source="icons/bullet_green.png" visible="#{row.ServiceState == '100'}" inlineStyle=" height:16px; width:16px;" />
    <af:image shortDesc="klassiert" source="icons/bullet_red.png" visible="#{row.ServiceState != '100'}" inlineStyle=" height:16px; width:16px;" />
    </af:column>Timo

  • How to set image border with CSS Designer?

    I must be missing something obvious...
    I need to set an image border. I select the image. But I don't see any relevant inline style option in CSS Designer.
    It only lets me change <inline style> : td but there's no option for the image.
    What am I missing?
    Thanks,
    Leo

    Thanks John,
    Yes, obviously I select the image.
    However, it doesn't change anything.
    I don't get the "img" selector whatever choice I select it the Sources pane.
    What am I missing?

  • Create waveform from a set of points with differtent time intervals

    Hello,
    I would like to create a waveform from a set of points like this
    Time           Data
    0                 0
    0,5              1
    0,6              2
    1                 1
    2                 0
    5                 1
    The problem is that the time interval between each points are not the same.
    The only idea I found was to create a waveform for each doublet of points with the same rate (100ms) and than to append them together.
    Does anybody have a better idea?
    Regards,
    Risotto.

    If you use a Wave From data type, re-sampling is not required.
    When using a WF datatype the chart (graph) will pick-up the X value from the t0 of the waveform.
    The trick is to just build an array of the single update value and make sure the t0 value is correct.
    Re-create this example
    and try it for yourself.
    Ben
    Note: make sure the data you pass is consistant with the data already displayed. If you post a t0 value that is older than what is already displayed, the chart will clear the display and start over.
    Message Edited by Ben on 09-15-2006 11:49 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    WF_Datatype.JPG ‏59 KB

  • Creating a function which you can execute with a parameter for date range

    Hi Everyone,
    Hope you can help me.
    I have specific data that I am looking at that I require to query from a function. This function will require that I specify a parameter for a specific date which will only list the date criteria f my choosing.
    Here is the data..
    StudentID
    FirstName
    LastName
    ClassName
    ClassStartDate
    ClassEndDate
    GPA
    1
    John      
    Davids    
    Soft Dev  
    11/1/2013 9:00
    11/30/2013 12:00
    3.25
    2
    John      
    Davids    
    Database  
    10/1/2013 9:00
    10/30/2013 12:00
    3.5
    3
    John      
    Davids    
    Web Design
    10/1/2013 9:00
    10/30/2013 12:00
    4
    4
    John      
    Davids    
    Psychology
    10/1/2013 9:00
    10/30/2013 12:00
    3.25
    So here is an example function which will need to be altered. I am hoping someone could help me figure this out. I thought the below may have been correct, but it just errors out.
    SET
    ANSI_NULLSON
    GO
    SET
    QUOTED_IDENTIFIERON
    GO
    -- =============================================
    -- Author: <Author,,Name>
    -- Create date: <Create Date,,>
    -- Description: <Description,,>
    -- =============================================
    CREATE
    FUNCTIONStudentGPATimePeriod
    @startdate
    AS
    BEGIN
    selectFirstName,LastName,ClassName,ClassStartDate,ClassEndDate,GPA
    fromdbo.Students
    whereClassStartDate
    =@startdate
    END
    GO

    Hi Saravana,
    If I would to execute this function, how would the parameter be entered?
    exec dbo.StudentGPATimePeriod
    i think what you need is PROCEDURE, try below
    --For a single date
    Create PROCEDURE StudentGPATimePeriod
    ( @startdate datetime )
    AS
    Begin
    select FirstName,LastName,ClassName,ClassStartDate,ClassEndDate,GPA
    from dbo.Students
    where ClassStartDate >=@startdate and ClassStartDate < dateadd(day,1,@startdate)
    End
    GO
    --for multiple dates
    CREATE PROCEDURE getStudentGPAMultipledate
    ( @startdate datetime,@enddate datetime )
    AS
    BEGIN
    select FirstName,LastName,ClassName,ClassStartDate,ClassEndDate,GPA
    from dbo.Students
    where ClassStartDate >=@startdate and ClassStartDate < dateadd(day,1,@enddate)
    END
    GO
    EXEC StudentGPATimePeriod @startdate='2014-11-12'
    GO
    EXEC getStudentGPAMultipledate @startdate='2014-11-12',@enddate='2014-11-13'

  • Help needed in creating a trigger

    hi,
    I am creating a Trigger which keep track of the updates of a particular table.
    Whenver a col value is updated i want to insert a row into newtable, with colname,old value and new value.
    How do we get to know which col value is changed in a table?
    Thanks

    I have seen the approach you propose (1 row for each column changed) and it is tedious and prone to maintenance headaches. You have to write code for each column, doing compares (remembering to consider NULLs), dealing with different datatypes, etc. You also have to decide how to record inserts and deletes.
    An easier trigger-based solution is to create a history table for the table you want to track, with all of the columns from the original, plus whatever else you need for housekeeping. Write an After Insert/Update/Delete trigger on your base table, and populate/insert rows into the history table:
    - For inserts, populate and insert row from the :new. values
    - For deletes, populate and insert a row from the :old. values
    - For updates, popualte and insert a row from the :old. values and another from the :new. values
    I would also have a column to designate whether this is an Insert, Delete, Update-Old or Update-New row.
    Once you have done one example, the rest are easy. If you were sufficiently motivated (I have not yet been), you could probably write a script to query DBA_TAB_COLS and generate the code.

  • Template to create a 3D box set of books

    I'm looking for a template to create a 3D boxed set of books with the cover on the right side and three spines to the left. There was a really nice tutorial on how to do it on YouTube and the woman had the templates available for 99 cents on Amazon Kindle but of course, her website doesn't work and there's no templates. ( [removed link] ) I just need a simple template to drop the spines and front cover in. Can anyone help me?

    I recently came across a free action for this called 3-D Box Generator by Art Bees
    3D Box generator for Photoshop | PSD Box
    Simple and works great!
    Nancy O.

  • Change image source distorts new image

    Is there any easy way, once I change image source in Edge Animate, to get it to at least be proportionally correct? When I change an image source with a different size, it comes in distorted.

    If you change the source it will fill the boundaries of the original source image automatically. If the size is different, it is probably better to delete the original image and drop the new one.
    If you are talking about loading an image dynamically and changing them dynamically, use css background image with no-repeat and have you div be the size of the largest image used unless you code the image size when they change.

  • How to use ApplicationModuleImpl.createViewObject for VO with bind variable

    I need to implement a AM method to create VO instance from a generic VODef with bind variables.
    The createViewObject() will trigger the executeQuery of the VO before I can set up the bind variables for the query.
    What is the proper way to create view object instance with bind variables?

    I am using JDeveloper 11.1.1.2.
    I have a ViewObjectA declared with some bind variables which determine what business data to be retrieved at runtime via a service method of the ApplicationModule.
    As the ViewObjectA is only referenced internally within ApplicationModule and I need more than one instance of the ViewObjectA for different conditions at runtime,
    I use ApplicationModuleImpl.createViewObject() to create an instance of ViewObjectA instead of adding ViewObjectA to the data model of the ApplicationModule.
    Currently, when the ViewObjectA is instantiated, it also trigger an executeQuery() which will not retrieve correct data until I set up the bind variables.
    However, the createViewObject() method doesn't let me pass in the values of the binding variables.
    Currenlty, I just call the createViewObject() and then set the binding variables values and call executeQuery() again.
    Just checking if there is a better way to do so...

  • LOV table column filter with bind variable

    Greetings everyone,
    I am using JDev version: 11.1.2.3.0
    I have a table which has all it's columns with filterable property set to 'true'. I have already created a filter for the first one which displays the total list of users registered in the system. But the second one is a bit more complex.
    I want to display a LOV which takes it's values from a VO with a bind variable. In a normal situation there is a another VO which links one of it's properties to this bind var in the View Accessor section of the LOV configuration dialog just like this:
    http://2.bp.blogspot.com/_OSq71i5oy0c/SUa6qdnkkoI/AAAAAAAABnY/QnBPmGFgLI4/s400/3.PNG
    But i want to be able to display this LOV in a column filter, the code i used is this:
    <f:facet name="filter">
                             <af:selectOneChoice value="#{vs.filterCriteria.Debtor}"
                                    label="Debtor" unselectedLabel=""
                                     id="soc104">
                                                                            <af:forEach items="#{bindings.ContractPartiesView1.rangeSet}"
                                                                                        var="debtors">
                                                                                <f:selectItem id="si104"
                                                                                              itemLabel="#{debtors.Name}"
                                                                                              itemValue="#{debtors.PartyNumber}"/>
                                                                            </af:forEach>
                                                                        </af:selectOneChoice>
                                                                    </f:facet>
    Where Name is the name of the items to display, and PartyNumber is the value by which the table property (column) Debtor is connected to ContractPartiesView1 (the DC of the first VO).
    It doesn't display nothing, and i suppose this is due the fact that ContractPartiesView1 has that bind variable which stays uninitialized.
    I need to find a way to initialize this bind variable to get the filtered values for the LOV. I've tried to use a listOfValue binding insted of a tree, but with no result. Am i missing something?
    Thanks in advance

    I had resolved this, the very next day, but i didn't have chance to reply.
    I've simply created another VO, which didn't have a bind variable to get that ID, it was simply linked with a master detail relationship with the one it should get the ID from (via FK). I've created this other VO because the first one was already in use for some other requirement.

  • Dynamic region table with binding problem

    Hi. I'm using jdev 11.1.1.3 and ADF full stack.
    My app uses single page approach with ADF libraries and a dynamic region to show content. Main page includes a menu bar which is created on session startup and is used to load task flows from libraries.
    I have a class to provide some table functionality like CRUD, multi-row delete, etc and I need to reuse with every table included in libraries.
    To do this, in main web app I have a managed bean to hold table binding and to provide this common functions to all fragments if needed.
    I think it must be in request scope as fragment changes.
    Here's the problem: when I navigate to a fragment which contains a table with binding, first time goes well,
    but next time table, when fragment changes,new table displays without header or without data.
    If I go to another fragment without binding and return to a fragment with problem, it displays well. With fragments without table binding, it works OK.
    I've tried changing scope of this 'general' managed bean, but same thing. If I put a bean for each fragment, it works OK.
    So, how can I 'share' this managed bean through every table? Any suggestions? is it possible?
    Please, help me ....
    Thanks,
    DEMR.

    I am seeing a similar problem in my app. I have a main menu that drives a dynamic region. If the task flow that gets displayed in the dynamic region also contains a dynamic region, when the inner dynamic region is refreshed to point to a second task flow, the page does not render correctly. The errors we have seen include data in tables not being displayed in some cases, and PPR errors in other cases. In both cases, if the inner dynamic region is replaced (by a single bounded task flow with navigation logic in a template, for example) the errors go away. There appears to be issues involved with including a dynamic region within a dynamic region.
    Have you made any progress on solving your issue?

Maybe you are looking for