Tree selection by user or programmatically

Hallow All!
How can I know if tree selection mode by user or programmatically?
I want to listen - tree selection and do some operation only if the selection made by user (mouse or keyboard) and do nothing if the selection made programmtically!
I tried to use isFocusOwner methos:
addTreeSelectionListener(new TreeSelectionListener() {
               public void valueChanged(TreeSelectionEvent e) {
                    if(!TopologyTree.this.isFocusOwner()){
                         return;
}but is doesn't work, if some text field in another panel has the focus then the tree gain the focus only after the tree selection event performed
any help will be most appreciated!
Eran.

Create a substitution rule in which user name from the header is substituted to any of the fields in vendor line item. (assignment, text etc). After this you can use this for APP.
Tarun

Similar Messages

  • At line-selection & At user-command

    Hi friends,
    I have a small doubt. Can we user AT LINE-SELECTION & AT USER-COMMAND in one report..plz gimme an example.
    Thanks is advance,
    regards,
    Ram

    hi, try these with example i have given.
    Write the set pf-status under start-of-selection,
    In the set pf-status under the function keys give
    F2 Pick Choose.
    u can validate the at line-selection by taking..
    At line-selection.
    case sy-lsind.
    when 1.
    message....
    when 2.
    message....
    endcase.
    similarly, for At user-command.
    case sy-ucomm.
    when 'back'.
    message...
    when...
    endcase.
    Syntax
    AT USER-COMMAND.
    Effect
    This statement defines an event block whose event is triggered by the ABAP runtime environment if, during the display of a screen list, a function with a self-defined function code was chosen.
    Note
    Self-defined function codes are all those that include character combinations, except for the following:
    The function codes PICK and PF## ("##" stands for 01 to 24) do not cause the event AT USER-COMMAND, but the events AT LINE-SELECTION and AT PF##.
    All function codes that start with the character "%" are interpreted as system functions and do not cause the event AT USER-COMMAND. The system functions for lists are listed in the following table 1.
    The function codes in the following table 2, likewise, do not cause the event AT USER-COMMAND, but are handled by the list processor.
    Table 1
    Function code Function
    %CTX Call a context menu
    %EX Exit
    %PC Save to file
    %PRI Print
    %SC Search for ...
    %SC+ Find next
    %SL Search in office
    %ST Save to report tree
    Table 2
    Function code Function
    BACK Back
    P- Scroll to previous page
    P-- Scroll to first page
    P+ Scroll to next page
    P++ Scroll to last page
    PFILE name Store list lines in a text file named abap.lst in standard character representation in the standard directory of the application server. If a name is entered using name, this is converted to lowercase letters and used as the file name.
    PL- Scroll to first line of the page
    PL-n Scroll n lines back
    PL+ Scroll to last line of the page
    PL+n Scroll n lines up
    PNOP No effect
    PP- Scroll back one page
    PP-n Scroll n pages back
    PP+ Scroll one page forward
    PP+n Scroll n pages forwad
    PPn Scroll to beginning of page n
    PRI, PRINT Print
    PS-- Scroll to first column
    PS++ Scroll to last column
    PS- Scroll one column to the left
    PS-n Scroll n columns to the left
    PS+ Scroll one column to the right
    PS+n Scroll n columns to the right
    PSn Scroll to column n
    PZn Scroll to line n
    RW Cancel
    here is an example handling both the commands in a program.
    EXAMPLE:
    START-OF-SELECTION.
    WRITE: 'Basic List',
    / 'SY-LSIND:', sy-lsind.
    TOP-OF-PAGE.
    WRITE 'Top-of-Page'.
    ULINE.
    TOP-OF-PAGE DURING LINE-SELECTION.
    CASE sy-pfkey.
    WHEN 'TEST'.
    WRITE 'Self-defined GUI for Function Codes'.
    ULINE.
    ENDCASE.
    AT LINE-SELECTION.
    SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
    PERFORM out.
    sy-lsind = sy-lsind - 1.
    AT USER-COMMAND.
    CASE sy-ucomm.
    WHEN 'FC1'.
    PERFORM out.
    WRITE / 'Button FUN 1 was pressed'.
    WHEN 'FC2'.
    PERFORM out.
    WRITE / 'Button FUN 2 was pressed'.
    WHEN 'FC3'.
    PERFORM out.
    WRITE / 'Button FUN 3 was pressed'.
    WHEN 'FC4'.
    PERFORM out.
    WRITE / 'Button FUN 4 was pressed'.
    WHEN 'FC5'.
    PERFORM out.
    WRITE / 'Button FUN 5 was pressed'.
    ENDCASE.
    sy-lsind = sy-lsind - 1.
    FORM out.
    WRITE: 'Secondary List',
    / 'SY-LSIND:', sy-lsind,
    / 'SY-PFKEY:', sy-pfkey.
    ENDFORM.
    Hope this may be helpful.
    Sri.
    pls:award points.

  • How can I select a user on a MacBook running mountain lion?

    I cannot select a select a user in my MacBook, I have the Mountain Lion OS. On the screen when I start my computer the users are there and the cursor moves but when I try to select any of them I am not able to do it.
    Is there a way to fix this?
    As an additional information, my DVD drive doesn't work.
    I would appreciate any help.

    I cannot select a select a user in my MacBook, I have the Mountain Lion OS. On the screen when I start my computer the users are there and the cursor moves but when I try to select any of them I am not able to do it.
    Is there a way to fix this?
    As an additional information, my DVD drive doesn't work.
    I would appreciate any help.

  • Error when selecting a user

    Hi everyone:
    We have implemented SAP NetWeaver 7.0, and we defined "ABAP System" as Data Source.
    We've come across a strange error while selecting some particular users (clicking on user) in Netweaver under User Management -> Identity Management > Selecting a User (clicking on user)
    "java.lang.NoSuchMethodError: com.sap.tc.webdynpro.services.sal.url.api.WDURLGenerator.isSecureURL(Ljava/lang/String;)Z"
    So far, this error has happened only when selecting a user that has the E-Mail field defined in the ABAP side. If we delete the E-Mail address from de ABAP account and then select the user in the Java Identity Management, the error disappears and the user account is perfectly shown.
    Any suggestions guys??
    Regards,
    Pablo Vaquero

    Hi Ravi,
    Thank for your reply.
    That indeed is the issue!... Since we have defined "ABAP System" as the Data Source, the E-Mail field can only be mantained on the ABAP side. But, as I've said on my previous post, when we fill this field in the ABAP side for any particular user and then want to see this change in user details on the UME side, when clicking on that particular user we get the error mentioned above.
    Regards,
    Pablo

  • A function for generate a actual tree select

    hi,
    i tried to write a function that generate a actual tree select and i think this is very helpful
    Create Or Replace Function Generate_Tree_Fun(p_Path Varchar2,
    p_Delimiter Varchar2,
    p_Level Integer,
    p_Tbl_Name Varchar2,
    p_Parent_Field Varchar2,
    p_Child_Filed Varchar2)
    Return Varchar2 Is
    v_Txt Varchar2(5000) := '';
    v_Row_Num Number;
    v_Max_Count Number;
    v_Child Varchar2(100);
    v_Parent Varchar2(100);
    v_Level Number := p_Level;
    Begin
    If (v_Level = 1) Then
    Return '';
    End If;
    If (v_Level > 1) Then
    v_Txt := '|' || Lpad('_', 6, '_');
    End If;
    If (v_Level > 2) Then
    For i In 1 .. p_Level - 2 Loop
    v_Level := v_Level - 1;
    v_Child := Ltrim(Regexp_Replace(p_Path,
    Ltrim(Replace(p_Path,
    p_Delimiter,
    ')(' || p_Delimiter) || ')',
    '\' || v_Level),
    p_Delimiter);
    Execute Immediate 'Select t.' || p_Parent_Field || '
    From ' || p_Tbl_Name || ' t
    Where t.' || p_Child_Filed || ' = :1'
    Into v_Parent
    Using v_Child;
    Execute Immediate 'Select a, b From (Select Row_Number() Over(Order By t.' ||
    p_Child_Filed ||
    ') a,Count(1) Over(Partition By t.' ||
    p_Parent_Field || ') b,t.' || p_Child_Filed ||
    ',t.' || p_Parent_Field || ' From ' || p_Tbl_Name ||
    ' t Where t.' || p_Parent_Field ||
    ' = :1 Order By t.' || p_Child_Filed || ') Where ' ||
    p_Child_Filed || ' = :2 '
    Into v_Row_Num, v_Max_Count
    Using v_Parent, v_Child;
    If (v_Row_Num <> v_Max_Count) Then
    v_Txt := Rpad('|', 20, ' ') || v_Txt;
    Else
    v_Txt := Rpad(' ', 20, ' ') || v_Txt;
    End If;
    End Loop;
    End If;
    Return v_Txt;
    End;
    select Generate_Tree_Fun(sys_connect_by_path(e.empno,','),',',level,'emp','mgr','empno') || e.ename
    from emp e
    start with mgr is null
    connect by e.mgr=prior e.empno
    enjoy it

    Arash wrote:
    hi,
    i tried to write a function that generate a actual tree select and i think this is very helpful
    We are so proud of you!

  • Autopayment Proposal Selection by user id who posted the open item.

    Dear Gurus,
    I want to select the open items by the user name who posted the document. I checked the free selection. But it shows no field USNAM by BKPF or BSEG. Any other way I can select the user name?
    Thank you
    Emma

    Create a substitution rule in which user name from the header is substituted to any of the fields in vendor line item. (assignment, text etc). After this you can use this for APP.
    Tarun

  • Selecting a user playlist as source in Itunes DJ

    Hi,
    I'm using iTunes 9 with Apple script version 2.3. I'm fairly newbie in applescript
    I would like to select a user playlist, say called 'Jazz', that is built by myself, and change it as the source in iTunes DJ. With Apple script.
    So far I have managed changing the iTunes window to ITunes DJ by:
    *tell application "iTunes"*
    * set dj_playlist to some playlist whose special kind is Party Shuffle*
    * -- ...and the source playlist for Jazz*
    *-- ??? HERE*
    *end tell*
    Is it possible? any help would appreciated. Thanks.
    Indy

    No it isn't possible via the Apple TV 2, sorry.

  • Tree selection event in jtree

    hi
    i'm using a jtree in my gui but im facing a problem
    jTree1.addTreeSelectionListener(new TreeSelectionListener() {
                   public void valueChanged(TreeSelectionEvent e)
                        jTree1_valueChange(e);
    as you can see that whenever i click on a particular node in the tree the tree selection event occurs which calls the valuechanged method and it does as required but if i click again on the same selection as before the tree selection event does not occur and it does not call the method so say that the node i'm selecting is supposed to be dynamic and has to be refreshed if i click on it again it will not update itself through the value changed method. can somebody please tell me a way to be able to get the valuechanged method even if i click on the same selection.
    im a bot new to java swing programing so please if you could be a little more explanatory it could help
    thanks

    You problem is talked about (and a solution proposed) in the JavaDoc.
    See the code sample in the doc header from http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JTree.html

  • At line-selection & at user-command event issue

    hi
    i am working on a interactive report,with at line & at user command event,on list 3 i have used a pf status,to trigger the at user command event,till that i was working with at line selection,which are working fine,but on list 3,i am able to see my pf status,but at user command event is not working properly,its still working like at line selection event,if i clk on record,it take to for nxt action,which i want to do through the action button of pf status.
    In debugging i checked that it coming to at user command,but the action in sy-user is 'PICK' & its doing the operation.
    WHEN '3'.
          IF itab4[] IS NOT INITIAL.
            SET PF-STATUS 'Z203'.
            LOOP AT itab4.
              AT FIRST.
                WRITE:/1 'Material' ,18 'Name'.
              ENDAT.
              WRITE:/1 itab4-matnr,8 itab4-maktx.
              HIDE:itab4-matnr.
            ENDLOOP.
          ELSE.
            WRITE:/ 'No Data Found'.
          ENDIF.
      ENDCASE.
      BREAK-POINT.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'CALL'.
          PERFORM bdc_mm02.
      ENDCASE.
    pls tel me how to use at line selection & at user command in same report to make both events working efficiently.
    regds
    vipin

    Check whether you have assigned Function Key F2 to your function code 'CALL'. If so change that function key. The function key F2 is always linked to function code 'PICK'.
    Regards
    Sathar

  • Creating user accounts programmatically

    Hi,
    We would like to perform few activities programmatically in Azure as follows:
    1) Like to know the approach or APIs available to create the user accounts programmatically
    2) Also would like to know how to access the pricing model of the Azure cloud component programmatically
    Please help us at the earliest to the APIs/ways we requested.
    Thanks,
    Sathish Kumar.K

    Hi
    What's the user account mean here?
    Co-admin or Storage account?
    I wrote a blog about how to manage Azure programmatically
    here.
    You can use that class libraries to do that.
    If you have any further question, please let me know
    For the second question:
    In my memory  there isn't have any billing API for developers, you can only get the info by portal.
    My Blog
    Please use Make as Answer if my post solved your problem and use
    Vote As Helpful if a post was useful.

  • Keyboard selection of user on login window

    Since using Mountain Lion, when all users are logged out and the Mac goes to sleep, on wake up, I am no more able to select the user on the login window using the (bluetooth) keyboard.
    However, if I click with the mouse on one of the users icon, selection using keyboard (left or right arrow) works again.
    Any ideas or solutions to this problem which is not present on my other machines nor was present on the iMac under Lion.
    Thanks for any input.

    Since using Mountain Lion, when all users are logged out and the Mac goes to sleep, on wake up, I am no more able to select the user on the login window using the (bluetooth) keyboard.
    However, if I click with the mouse on one of the users icon, selection using keyboard (left or right arrow) works again.
    Any ideas or solutions to this problem which is not present on my other machines nor was present on the iMac under Lion.
    Thanks for any input.

  • Tree selection bug?

    Hi,
    I don't know if this is a bug or not. When using XML as the
    data provider for the Tree component and multiple nodes have the
    same label, selecting anyone of the nodes will cause all of them to
    be selected. The problem stems from the fact that XML comparison is
    done by value. The comparison is dibe at line 6345 of ListBase. Is
    this a bug? If not, is there a known workaround?
    I attached code that reproduces the problem. Selecting the
    first node, selects the first, second and last node because, by
    value, they are all the same.
    Thanks!
    JPB

    Switch to using a strongly typed object that implements IUID,
    or just make
    sure your XML has other identifying information to it. It's
    not really that
    helpful to have 19 "foos" in your list unless there is
    something else
    different about them.
    So, something like
    <mx:XMLList id="treeData">
    <node label="Test entry 1" id="1"/>
    <node label="Test entry 1" id="2"/>
    <node label="Test entry 2" id="3"/>
    <node label="Test entry 1" id="4"/>
    </mx:XMLList>
    HTH;
    Amy
    "jpbouchard" <[email protected]> wrote in
    message
    news:g941f3$1u8$[email protected]..
    > Hi,
    >
    > I don't know if this is a bug or not. When using XML as
    the data provider
    > for
    > the Tree component and multiple nodes have the same
    label, selecting
    > anyone of
    > the nodes will cause all of them to be selected. The
    problem stems from
    > the
    > fact that XML comparison is done by value. The
    comparison is dibe at line
    > 6345
    > of ListBase. Is this a bug? If not, is there a known
    workaround?
    >
    > I attached code that reproduces the problem. Selecting
    the first node,
    > selects
    > the first, second and last node because, by value, they
    are all the same.
    >
    > Thanks!
    > JPB
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <mx:VBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="100%"
    > height="100%">
    > <mx:Script>
    > <![CDATA[
    > import mx.controls.Tree;
    >
    > private function selectFirst(): void {
    > myTree.selectedItem = treeData[0];
    > }
    >
    > ]]>
    > </mx:Script>
    >
    > <mx:XMLList id="treeData">
    > <node label="Test entry 1"/>
    > <node label="Test entry 1"/>
    > <node label="Test entry 2"/>
    > <node label="Test entry 1"/>
    > </mx:XMLList>
    >
    > <mx:Panel title="Tree Selection Bug" height="100%"
    width="100%"
    > paddingTop="10" paddingLeft="10" paddingRight="10"
    paddingBottom="10">
    > <mx:Button label="Select First"
    click="selectFirst()"/>
    > <mx:Tree id="myTree" width="100%" height="100%"
    labelField="@label"
    > showRoot="true" dataProvider="{treeData}"/>
    > </mx:Panel>
    >
    > </mx:VBox>
    >

  • HT2470 Why won't Itunes store my music library in my User/Music Folder, if I select my user name as a storage location in Itunes, Itunes creates folders for artist name right in my user folder, instead of in my user/music folder

    Why won't Itunes store my music library in my User/Music Folder? 
    If I select my user name as a storage location in Itunes, Itunes creates folders for artist name right in my user folder, instead of in my user/music folder.  This gets especially annoying because if I tell Itunes to store my "media" in my user/music folder, Itunes will then create a folder named "music" in my "music" folder and will also create additional folders in my user/music folder location to store other non-music media in as well. It is very annoying to see this lack of affinity for folders between two Apple created programs.

    Help iTunes locate your media folder:
    No content shows up in iTunes after updating
    http://support.apple.com/kb/TS1967

  • Updating user details programmatically

    Portal version 3.0.9.8.1
    We are successfully creating users programmatically using the
    APIs:
    PORTAL30_SSO.WWSSO_API_USER_ADMIN.CREATE_USER and
    PORTAL30.WWSEC_API.ADD_PORTAL_USER
    We are now trying to update user details programmatically using
    PORTAL30.WWSEC_API.MODIFY_PORTAL_USER but noticed that this only
    updates the portal30 user details - not portal30_sso.
    Is there an equivalent API for updating the portal30_sso user?

    Hi mon_adobe,
    It's not possible to redirect this form upon submission to another page. However what you can do here is place a redirect on the 'Update Details Form Confirmation Page' System Page as a workaround. You can access this System Page via Site Manager > System Pages > Update Details Form Confirmation Page.

  • No value is select  from  user define  table

    Hi ALL,
                 i am using  B1if , i am sending  data  B1 to  isr , i am using user define table  but problem  no value is select  from  user define  table  .
    my table ID  is @SSRPOD 
    <payload operation="">
         <ns0:MT_POD_B1_System xmlns:ns0="http://xxxx.com/SC/B1/Dlvr/CustDlvr/ExtPrfOfDlvr">
              <POD>
                   <Header>
                        <SalesOrderNumber>
                             <xsl:value-of select="$msg/BOM/BO/@SSRPOD/row/U_SalOrdNo" />
                        </SalesOrderNumber>
                        <ArrivalDate>
                             <xsl:value-of select="$msg/BOM/BO/@SSRPOD/row/U_TaxDate" />
                        </ArrivalDate>
                        <Detail>
                             <DOLineQuantity>
                                  <xsl:value-of select="$msg/BOM/BO/@SSRPOD/row/U_Quantity" />
                             </DOLineQuantity>
                             <UOM>
                                  <xsl:value-of select="$msg/BOM/BO/@SSRPOD/row/U_Unitmsr" />
                             </UOM>
                        </Detail>
                   </Header>
              </POD>
         </ns0:MT_POD_B1_System>
    </payload>
    I have set following things. 
    Inbound Channel
        scenirio step identifier :z.xxxx
        Inbound Channel(IPO):INB_B1_EVNT_ASYN_EVT
        InboundType:Asynchronous
        Process Trigger:B1Event
        Identification Method: B1Event
        Identification Parameter:n.a
        Identifier:?????                                  
        Identifier Namespace:??????
      can anyone help me?
    Edited by: Sinha_Sinha on Feb 3, 2012 7:47 AM

    Found an authorization object was missing, that enabled the case types to show but hitting the GO button brought a page that can not be viewed in IE.  on to the next hurdle..........

Maybe you are looking for

  • GUI_DOWNLOAD inside a BSP METHOD

    Hi all! I have a BSP application and, in the application class, I have a method named TXT_FACTURA. Inside of it, I need to save a txt file to local machine, so I tried to use the FM: GUI_DOWNLOAD or WS_DOWNLOAD but when the BSP arrives to execute thi

  • Best way to allow user to create JFrame

    Hi, I'm working on a part of an application that needs to allow a user to create some type of "Frame". I'll give an example: when you use an IDE an create a JFrame you can drag object to the frame until your happy with it. I you like to do something

  • ITunes won't respond

    I got a new hard drive and downloaded my DVD music backup from the old drive. Went fine for the 1st DVD ( backup on 2 DVD's) Later on when I went to download the 2nd I find iTunes won't open now. When I go to force quit it says iTunes not responding.

  • User Tracker Error: Application error: URN_NOT_FOUND : urn "ogs_server_urn" : Not found !!.

    Hello I'm running Cisco LMS 3.2 on a Windows Server 2003 R2 SP2. Products installed: CiscoWorks Common Services 3.3.0 Campus Manager 5.2.1 CiscoView 6.1.9 CiscoWorks Assistant 1.2.0 Device Fault Manager 3.2.0 Internetwork Performance Monitor 4.2.0 In

  • How can I tranfer photos from my Optimus LG 5 to my imac iphoto

    My computer does not reconize my phone when I plug it in. I can't transfer photos then. Suggestions?