How to trap Selection change

Hi All,
I need to observer selection change. How do i go about it. In basicpersistinterface the kBPISelectionObserverImpl is bound with the panel. Similarly I want to call a method on selection change and not update some UI, so where do i need to put my ActiveSelectionObserver.
It can  be just displaying an alert of selection change, but how do we trap it.
Please contribute your valuable suggestions.
Thanks in advance.
Jasmine Shaikh

You can aggregate your observer to any easily accessed boss that's permanently around. For example kSessionBoss already has 15 observers, kAppBoss has 7 observers. You would use a private IID, though. Invoke AutoAttach from a StartupShutdown service.
Given that, you're probably wrong architecture-wise by watching the selection without UI involved. There are plenty other notifications, besides there are also different mechanisms to watch the selection from closer on (e.g. SelectionExt). Can you give more details on your intent?
Dirk

Similar Messages

  • How to generate selection change event through code in JTree?

    I am developing an application which downloads the file from other system and adds it into the tree. On selecting any file in the tree I m displaying it's contents. But now i am trying to display the contents of downloaded file as soon as it's download completes. Here i am not getting the way to how to generate the event as the download completes, because i tried that setSelectionPath(TreePath path), but it also don't generates the selection change event. Is there any other way to do so?

    Put null in place of oldLeadSelectionPath. From the API for TreeSelectionEvent:
    protected TreePath     oldLeadSelectionPath:
    leadSelectionPath before the paths changed, may be null.
    I'm at the office and can't try out anything, so please let me know whether that works for you.
    db
    edit Or it may be easier to put all code from your valueChanged (...) override in a new method and invoke that method both from valueChanged (...) and wherever else you need.
    Edited by: Darryl.Burke

  • How do I select/change the status of my post/reply?

    Hello,
    I'm fairly new to the forum and I'm finding it challenging to figure out how to use all the features in a straight forward manner.
    For instance,  I've noticed on my recent reply to one of my post questions that the status automatically showed up as "this solved my question".  I did not select this status and I did not see any place to select the status of my reply.  I went back to edit the reply status immediately and still saw no way to change it.
    The fact is, that my reply was not in relation to solving my question at all.  I replied to someone who offered a solution and I was replying as to the results of that solution, which did not solve my issues, it just created different issues.  So now my post shows as solved when my question hasn't been answered and the issue is not solved.
    The probabability that my question above has been asked ad infinitum is better than good, I suspect.  But when I search the quesiton in the search communities box I don't get a clear answer.  Please do excuse me then, if I am repeating an over asked question.  I'm not even sure I'm searching the forum correctly or if there are other options to search in addtion the search box in the upper right hand corner....
    Honestly, I've been on a lot of forums and am an active member of several, I'm a fairly advanced mac user, having been a mac guy for decades, and this forum doesn't appear to be very clear or easy to figure out how to use to me.  It feels as if they're almost trying to discourage you from figuring some things out...weird.  I've been searching for a clear answer for this for an hour now--trying different queries and different parts of the forum.
    Any help with how to select and change post and reply staus would be much appreciated.

    These buttons that you show were not on the post I replied to in my thread.
    You will see the buttons only, if you are the original poster of the thread, not if you asked a question in thread, that someone else started.  Also, you will not see these buttons, if you already markes answers as solved or helpful. You can mark two answers as "Helpful" and one answer as "Solved". Afterwards the buttons will vanish, see "Answering to Questions".
    Another question that comes up is, if I fail to select either button and simply reply to the post without selecting anything, what happens then?
    Then the buttons will stay, until you mark an answer. You are not obliged to mark every answer. It is up to you, how you rate the answers you receive.
    You may want to have a look at the tutorials on the main page of the ASC: https://discussions.apple.com/static/apple/tutorial/index.html
    Regards
    Léonie

  • How do i select a whole heap of bands and change there genre in one shot .

    how do i select a whole heap of bands and change there genre in one shot like old itunes, before i was able to hold ctrl and select all the bands, now i have to do it individually or go to songs and select them individually.
    ctrl or shift doesnt do anything anymore.
    thaks for your help.

    Use the Songs or List views.
    tt2

  • How do I select two-sided printing now that I have Adobe Reader? I didn't know it would change my pr

    How do I select two-sided printing now that I have Adobe Reader? I didn't know it would change my print function at all and am curious why it does. My HP printer always did this and on the old screen there was a check off box for two-sided printing. Thank you!

    Hello Mickeyps
    What's the Adobe Reader version at your end? I am using Reader 11.0.06 and I do see this option. See below.
    Regards,
    Deepak

  • Using bootcamp was installing windows xp, at the select ntfs or fat format selected "leave the current file system intact." How can that be changed to a correct choice. Mac side opens correctly. Windows shows disk error.

    using bootcamp, was installing windows xp, at the select ntfs or fat format mistakenly selected "leave the current file system intact." How can that be changed to a correct choice. Mac side opens correctly. Windows shows disk error. and doesn't respond to press any key. When looking in the startup disk section, windows on boot camp can be seen, but not selected. (13"MacBook Pro  10.6.8)

    Have a read here http://support.apple.com/kb/TS1722 for solution.
    Stefan

  • HT1451 when editing info, how do i select multiple items to edit a group? For example, changing the artist name on multiple tracks at once?

    when editing info, how do i select multiple items to edit a group? For example, changing the artist name on multiple tracks at once?

    Same way you select multipl items anywhere else.
    Hold ctrl and click the items you want.
    If they are in consecutive order, click the 1st then Shift click the last.

  • How to change images of selected items in gridview on selection changed event in universal app

    Hi,
    I am developing Universal App. I have bind the images to the Gridview using ObservableCollection. I have set gridview
    SelectionMode as Multiple . I want to change the images of selected items but I don't know how to do in Selection Changed event of Gridview. I got selected items with the help of
    Gridview SelectedItems property. How can i change the images of respected selected items?
    Please reply me asap.
    Thanks in advance.

    Hi, Sorry for late reply,
    Please change the class : 
    public class ImageCollection : INotifyPropertyChanged
    private string source;
    public string Source
    get { return source; }
    set { SetProperty(ref source, value); }
    public int MyProperty { get; set; }
    protected void SetProperty<T>(ref T storage, T value, [System.Runtime.CompilerServices.CallerMemberName] String propertyName = null)
    if (!object.Equals(storage, value))
    storage = value;
    if (PropertyChanged != null)
    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    protected void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] String propertyName = null)
    if (PropertyChanged != null)
    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    public event PropertyChangedEventHandler PropertyChanged;
    XAML
    <GridView x:Name="gd"
    Tapped="gd_Tapped">
    <GridView.ItemTemplate>
    <DataTemplate>
    <Grid Height="300" Width="250">
    <Image Source="{Binding Source}" Stretch="Fill"/>
    <Grid Height="100" Background="#B2000000" VerticalAlignment="Bottom">
    <TextBlock Text="{Binding MyProperty}" FontSize="25" />
    </Grid>
    </Grid>
    </DataTemplate>
    </GridView.ItemTemplate>
    </GridView>
    C#
    //ObservableCollection of class
    ObservableCollection<ImageCollection> img = new ObservableCollection<ImageCollection>();
    public MainPage()
    this.InitializeComponent();
    img.Add(new ImageCollection() { MyProperty = 1, Source = "ms-appx:///Assets/Logo.scale-100.png" });
    img.Add(new ImageCollection() { MyProperty = 2, Source = "ms-appx:///Assets/2.jpg" });
    img.Add(new ImageCollection() { MyProperty = 3, Source = "ms-appx:///Assets/3.jpg" });
    img.Add(new ImageCollection() { MyProperty = 4, Source = "ms-appx:///Assets/4.jpeg" });
    gd.ItemsSource = img;
    private void gd_Tapped(object sender, TappedRoutedEventArgs e)
    GridView gv = (GridView)sender;
    ImageCollection ic = gv.SelectedItem as ImageCollection;
    ic.Source = "ms-appx:///Assets/4.jpeg";
    gv.UpdateLayout();
    I have used  INotifyPropertyChanged now UI is not fluctuate 
    and I have not bind again O-Collection.
    I hope so You will get right answer. 
    shah

  • How can I set a property when an event happens? (selection changed on datagrid)

    I have a datagrid, I would like to change the backgrund of the datagrid when the selection changed event is fired.
    I can not use data trigger, because is in the case that I expected a value, but in this case is when change, to any value.
    An option is to use an event trigger, but all the examples that I have found is to use with an actions, and I just want to set a property.
    How could I do that?
    I am using MVVM pattern, so I would like to avoid the use in code-behind.
    Thank so much.

    You could use an event trigger and implement your own TriggerAction<T> that sets the background property. There is an example of how to create a custom TriggerAction available here:
    http://stackoverflow.com/questions/942548/setting-a-property-with-an-eventtrigger.
    The following example sets the Background property of the DataGrid to a red SolidColorBrush when the SelectionChanged event is fired. It should give you the idea:
    <DataGrid x:Name="dgrid"
    xmlns:local="clr-namespace:WpfApplication22">
    <i:Interaction.Triggers>
    <i:EventTrigger EventName="SelectionChanged">
    <local:SetPropertyAction PropertyName="Background" TargetObject="{Binding ElementName=dgrid}">
    <local:SetPropertyAction.PropertyValue>
    <SolidColorBrush>Red</SolidColorBrush>
    </local:SetPropertyAction.PropertyValue>
    </local:SetPropertyAction>
    </i:EventTrigger>
    </i:Interaction.Triggers>
    <DataGrid.Columns>
    namespace WpfApplication22
    public class SetPropertyAction : TriggerAction<FrameworkElement>
    public string PropertyName
    get { return (string)GetValue(PropertyNameProperty); }
    set { SetValue(PropertyNameProperty, value); }
    public static readonly DependencyProperty PropertyNameProperty
    = DependencyProperty.Register("PropertyName", typeof(string),
    typeof(SetPropertyAction));
    public object PropertyValue
    get { return GetValue(PropertyValueProperty); }
    set { SetValue(PropertyValueProperty, value); }
    public static readonly DependencyProperty PropertyValueProperty
    = DependencyProperty.Register("PropertyValue", typeof(object),
    typeof(SetPropertyAction));
    public object TargetObject
    get { return GetValue(TargetObjectProperty); }
    set { SetValue(TargetObjectProperty, value); }
    public static readonly DependencyProperty TargetObjectProperty
    = DependencyProperty.Register("TargetObject", typeof(object),
    typeof(SetPropertyAction));
    protected override void Invoke(object parameter)
    object target = TargetObject ?? AssociatedObject;
    PropertyInfo propertyInfo = target.GetType().GetProperty(
    PropertyName,
    BindingFlags.Instance|BindingFlags.Public
    |BindingFlags.NonPublic|BindingFlags.InvokeMethod);
    propertyInfo.SetValue(target, PropertyValue);
    For more information about how to hook up event triggers and handle events in MVVM, please refer to my blog post:
    http://blog.magnusmontin.net/2013/06/30/handling-events-in-an-mvvm-wpf-application/
    Please also remember to mark helpful posts as answer.

  • How to block lead selection change in a tree ?

    Hi Guys,
    <u>Scenario</u>
    I have MasterTree - DetailEditor pair. <i>MasterTree</i> is used to visit some tree-structured data and <i>DetailEditor</i> is used to edit currently selected tree node.
    <u>Requirement</u>
    If currently selected node data is updated through <i>DetailEditor</i> and needs to be saved, than on a subsequent tree selection change the user should be warned about unsaved data.
    <u>Implementation</u>
    In <b>onAction</b> event handler of <i>MasterTree</i> I check whether last selected node data is updated and needs to be saved and if this is the case rollback <i>treeSelection</i> to that node. On the time <b>onAction</b> event handler is called the tree selection is changed from the node that needs save to the newly selected node. In order to rollback <i>treeSelection</i> I need to introduce variable referencing last selected tree node.
    <u>Question</u>
    Is there any other technique to implement above scenario without using additional variable and manually rollback <i>treeSelection</i> ? For example, to plug in WDP framework on validation step just before lead selection is changed.
    Thanks in advance

    Alex,
    Here is a link to the phase model of WD:
    http://help.sap.com/saphelp_nw04/helpdata/en/b8/cd96edb9c8794aa362e6e8b4236a1f/frameset.htm
    There aren't any hooks provided prior to the event handlers being called. As far as I can tell, the way you are handling it is the only way that will work.
    -Cindy

  • How to veto a JComboBox selection change in ItemListener

    I have a JComboBox whose current value is tied to some data cached in my application. I want to be able to examine the selection in an ItemListener attached to the JComboBox, and if the value is different than what I have cached, I want to ask the user if they really want to change because the change will render some other data as no longer valid. If the user wants to abandon the change, then I want to "abandon" or "veto" the selection change and reset it to the old value.
    For instance, if the combo box has values "Foo" and "Bar" in it, and "Foo" is the cached selection, then the user goes and changes the selection to "Bar", I want to prompt them with something like "You have changed the value to Bar. Doing so will render XXX no longer valid. Do you want to continue?" -- if they cancel the change, then leave the selection as "Foo".
    What is the best way to do this within ItemListener's itemStateChanged? Are there better ways to do this besides what I've outlined? I didn't see anything in "Core JFC" book or the JDK documentation that discussed this sort of thing.
    Thanks in advance,
    Eric

    Hi,
    It is a design problem and not realy a language problem... The way I create vetoing design it that a keep the previous selection of the JComboBox... upon action I look if the application can do the new computation...if not...ask the user... if true| run calculations if not set the JComboBox to the previous selection...
    JRG

  • How to 'veto' a jList selection change

    Hi All,
    I have a JList which I'm using as a record selector - so whenever my user selects an item on the list, the associated record is loaded up into the other controls on this form for editing. If the user edits any of the data items, I want to ask whether to save changes or not if another item is selected from the JList. So, I've added code in my 'selection changed' function to check for changes and show a 'yes/no/cancel' JOptionPane. The code for my 'yes' and 'no' respones work fine - either save the changes or not, then show the next record. My problem is handling if a user clicks cancel...
    If the user selects 'Cancel', I dont want any of my "show new record" code to execute (this is easy, I can just 'return' out of the function) but also I don't want the JList selection to change. I've tried calling setSelectedIndex() back to the originally selected item, but this in turn triggers my 'selection changed' function to be called again, which causes the user to be asked twice whether they want to save changes!
    So, what I'm after is a kind of beforeSelectionChanged event, which allows the possibility of denying the selection change - but it doesn't look like this exists! I vaguely remember another language (possibly C++/MFC) having this - the user's action could be ignored depending on the return value of the function. Can anyone offer a way of achieving this in Java?
    (It's been a while since I last touched Java, and I'm a complete n00b with Swing. Using NetBeans as my IDE.)
    Thanks in advance for any suggestions!
    Andy

    The way I do it, is to implement a VetoableSelectionModel similar to a bean with a vetoable property: on selection change it queries registered VetoableChangeListeners if they don't object and backs out if one of them barks.
    HTH
    Jeanette

  • How to trap the event before unlock of locked text frames

    How to trap the event before the message "You must check out the contents of this frame in order to make changes. Check out now?" for locked text frames?
    I have tried installing the service Responder kUserEditTextCmdResponder
    The responder event is fired after the unlock of text frame in this case.
    I was trying the service kEditCmdPreProcessService, but I could not find the companion interface for this service.
    How to find the companion interface?

    calle111 wrote:
    The answer to why i need the event executed if nothing has changed is that in my application the text ring will hold some predefined settings for some other controls. If the user selects one of the predefined settings from the text ring a bunch of other controls will take predefined values. These values in the other controls can now be altered by the user. If the user now wants to re-apply the same set of pre-defined settings as last time it should be as simple as selecting the pre-defined settings from the text ring. If now the same value is selected from the text ring, no event will be executed.
    What you should do instead is change the value of the ring to a "special" value (e.g. using a local variable) whenever one of the other settings change, indicating that the settings have been modified. It seems wrong to show an inconsistent value in the ring, right?
    Now, whenever you change it back to one of the default settings, is IS a value changed event and there is no problem. .
    Here's a quick draft.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    event_testerMOD.vi ‏10 KB

  • New owner here.  How can I select specific pages of a document found on line and print just those pages.  What I see is the ability to select only 1 page at a time and print that one selected page only.   Thanks much.

    New owner here.  I see that in printing I can select one page and print same.  How do I select numerous pages from a document and print only those selected pages? I would not think that I can only select one page at a time.  Thanks much

    Just change the range as illustrated below.  If you don't see that, click the Show Details button.

  • How to transport Parameter changes in a crystal report

    Hi All,
    Very Good morning!!!
    I have designed a crystal report with static parameters. Earlier i used to have a dropdown kind of input selection for my parameters.
    Now i got a new requirement for a direct input in the field....tht means no dropdown ...single date field is to be entered directly.
    Accordingly i have removed the dropdown and changed to a single direct date field. I saved these changes to a request and transported to quality. Not sure whether the parameter changes are collected into a request.
    Whereas i couldn't found any changes of my parameters in quality. They are as same dropdown manner in the quality whereas i need them to be a direct field date entry which did not affected the quality server after transporting the changes.
    Could some one please let me know how to reflect these changes in quality server regarding parameter changes in a crystal report for BW.
    Thanks in Advance.
    Jitendra

    Please re-post if this is still an issue or purchase a case and have a dedicated support
    engineer work with your directly

Maybe you are looking for

  • ITunes can't find existing files after upgrading HDD

    What the subject says - I have a 2008 Mac Pro & iTunes 10.6.3. I just upgraded the HDD where iTunes lives, by copying the entire drive to the new one, then installing the new one in the same bay as the old one. Whenever I open iTunes, a few of my +/-

  • Value Limit in Service Line

    Hi All, While doing a service order and entering the item in service line with a total value of more than 100 crores  I am getting a error message no.SE370 that Value of line exceed allowed value limit.But I did not find the message SE370 in the attr

  • Bex queris

    In the Bex queris, when I try to select values for Fiscal year I get the following error message: Message     M     Description BRAIN        629    specify a value for a Current Fiscal Year (single value entry,                                        

  • JTable multi column sorting (jdk 1.5)

    Hi, Can you please send a short example (and/or a link) to multi column sorting using sun TableSorter class ? Thanks a lot, Ido

  • Layout - Batch Number Transactions Report

    Hi all, Our customer has made a layout (IBT3, In Document Tree) in the report 'Batch Number Transactions' via "Inventory -> Inventory Reports -> Batch Number Transactions Report" When you have filled the selection criteria in Batch Number Transaction