TableCellRenderer having Multiple Components

Hello All
I have a JTable where I want to put more than one Button/Label in a TableCellRenderer and then listen to which button was clicked.
e.g Say I have a Table with 5 Columns, in the Last Column I want to Use a TableCellRenderer which has three buttons "add" "delete" "Change".
I am using a JPanel as a Component of the Renderer and layout three above mentioned buttons. But am not sure how to listen to the event about which button was Clicked... cause for each button should open seperate screen. There could also be more buttons in the CellRenderer. (So I want a general way of handling any number of buttons in the Renderer and then listen to them when they are clicked)
My Renderer looks like this....
public static String CVDelimiter = ";";
     public static class CdsTableCellRenderer extends CastleTableCellRenderer {
          public Component getTableCellRendererComponent(JTable table,
                    Object value, boolean isSelected, boolean hasFocus, int row,
                    int column) {
               if (table.getColumnName(column).equalsIgnoreCase(
                         CdsTableModel.CREDIT_EVENTS)) {
                    JPanel creditEventPanel = new JPanel();
// getValueAt  returns me the add ; delete ;  update
                             StringTokenizer st = new StringTokenizer((String) table
                              .getValueAt(row, column),  CVDelimiter);
                while (st.hasMoreTokens()) {
                     JButton  button = new JButton  (st.nextToken());
                    creditEventPanel.add(button);
                    return creditEventPanel;
               } else
                    return super.getTableCellRendererComponent(table, value, isSelected,
                              hasFocus, row, column);
     }Thanks
-Pankaj

you can't click the buttons anyway. A cell renderer is called a renderer for a reason: it's a rendered image of the cell. It's not creating a button, it's creating a picture of a button. If you want to know about clicking, use a mouse listener on the table and get the row/column for the coordinate clicked.

Similar Messages

  • MM: PO Not Picking up PR Having Multiple Line Items

    Hi All,
    When Creating PO with Reference to PR Having multiple line items, not picking up the line items and also the vendor and also the where in we  have to select  input tax code.
    CASE1: Created PR 760001340 with single line item and also could able to create PO.
    Case2: Created PR 760001341 with multiple line items, When creating PO with reference to PR the line items and Vendor are not picking Up.
    Plz. Advise a solution.
    Thanks in Advance.....
    Regards
    Sudheer

    HI SHWN,
    Thanks for prompt response.
    ERROR Message: When referencing a requisition, please also enter a requisition item no.
    Regards
    Sudheer

  • Does anyone have experience with having multiple editors work on the same project from different computers?

    Does anyone have experience with having multiple editors work on the same project from different computers?

    As much as I hate to admit it, YOU ARE RIGHT!
    I will tread lightly on this project.
    Thanks for the sanity check,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • I'm having multiple crashes on my new 5s. I can't connect to my Mac Pro!! Power cord broken. How can I fix this without connecting to my MacBook? Very frustrating and disappointing. Please help!!!

    I'm having multiple crashes on my new 5s. I can't connect to my Mac Pro!! Power cord broken. How can I fix this without connecting to my MacBook? Very frustrating and disappointing. Please help!!!

    Hi there Rlong50,
    You may want to try force closing all open apps and resetting the device as an initial troubleshooting step. Take a look at the articles below for more information.
    iOS: Force an app to close
    http://support.apple.com/kb/ht5137
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/ht1430
    -Griff W.

  • Having multiple problems with script - NTFS Permissions and AD Groups

    Hi, all!  I'm having multiple problems with my first script I've written with Powershell.  The script below does the following:
    1. Prompts the user for a corporate division under which a shared folder will be created, and adjusts variables accordingly.
    2. Prompts if the folder will be a global folder or an office/location-specific folder, and makes appropriate adjustments to variables.
    3.  If a global folder, prompts for the name.  If an office/location-specific folder, prompts for each component of the street address, city and state and an optional modifier.  I've prompted for this information in this way because the information
    is used differently later on in the script.
    4.  Verifies the entered information and requests confirmation to proceed.
    5.  Creates the folder.
    6.  Creates an AD OU and/or security group(s).
    7.  Applies appropriate security groups to the new folder and removes undesired permissions.
    Import-Module ActiveDirectory
    $Division = ""
    $DivAbbr = ""
    $OU = ""
    $OUDrive = "AD:\"
    $FolderName = ""
    $OUName = ""
    $GroupName = ""
    $OURoot = "ou=DFS Restructure Testing OU,ou=Pennsylvania Camp Hill 4410 Industrial Park Rd,ou=Locations,ou=Camp Hill,dc=jacobsonco,DC=com"
    $FSRoot = "E:\"
    $FolderPath = ""
    $DefaultFolders = "Archive","Customer Service","Equipment","Inbounds","Management","Outbounds","Processes","Projects","Quality","Reports","Returns","Safety","Schedules","Time Keeping","Training"
    [bool]$Location = 0
    do {
    $userInput = Read-Host "Enter CLS Division: (W)arehousing, (S)taffing, or (P)ackaging"
    Switch ($userInput)
    W {$Division = "Warehousing"; $DivAbbr = "WHSE"; $OU = "ou=Warehousing,"; break}
    S {"Staffing is not yet implemented."; break}
    P {"Packaging is not yet implemented."; break}
    default {"Invalid choice. Please re-enter."; break}
    while ($DivAbbr -eq "")
    write-host ""
    write-host ($Division + " was selected.")
    $FolderPath = $Division + "\"
    write-host ""
    $choice = ""
    do {
    $choice = Read-Host "Will this be a (G)lobal folder or (L)ocation folder?"
    Switch ($choice)
    G {$Location = $false; break}
    L {$Location = $true; $FolderPath = $FolderPath + "Locations\"; $OU = "ou=Locations," + $OU; break}
    default {"Invalid choice. Please re-enter."; $choice = ""; break}
    while ($choice -eq "")
    write-host ""
    write-host ("Location is set to: " + $Location)
    write-host ""
    if ($Location -eq $false) {
    $FolderName = Read-Host "Please enter folder name:"
    $GroupName = $DivAbbr + " " + $FolderName
    } else {
    $input = Read-Host "Please enter two-letter state abbreviation:"
    $FolderName = $FolderName + $input + " "
    $input = Read-Host "Please enter city:"
    $FolderName = $FolderName + $input + " "
    $input = Read-Host "Please enter street address number only:"
    $FolderName = $FolderName + $input
    $GroupName = $DivAbbr + " " + $FolderName
    $FolderName = $FolderName + " "
    $input = Read-Host "Please enter street name:"
    $FolderName = $FolderName + $input
    $input = Read-Host "Please enter any optional information to appear in folder name:"
    if ($input -ne "") {
    $FolderName = $FolderName + " " + $input
    $OUName = $FolderName
    write-host
    write-host "Path for folder: "$FSRoot$FolderPath$FolderName
    write-host "AD Path: "$OUDrive$OU$OURoot
    write-host "New OU Name: "$OUName
    write-host -NoNewLine "New Security Group names: "$GroupName
    if ($Location -eq $true) { write-host " and "$GroupName" MGMT" }
    write-host
    $input = Read-Host "Please confirm creation of new site/folder: (Y/N) "
    if ($input -ne "Y") { Exit }
    write-host
    write-host -NoNewLine "Folder exists: "; Test-Path ($FSRoot + $FolderPath + $FolderName)
    if (Test-Path ($FSRoot + $FolderPath + $FolderName)) {
    Write-Host "Folder already exists! Skipping folder creation..."
    } else {
    write-host "Folder does not exist. Creating..."
    new-item -path ($FSRoot + $FolderPath) -name $FolderName -itemtype directory
    Set-Location ($FSRoot + $FolderPath + $FolderName)
    if ($Location -eq $true) {
    $tempOUName = "ou=" + $OUName + ","
    write-host
    write-host $OUDrive$tempOUName$OU$OURoot
    write-host
    write-host -NoNewLine "OU exists: "; Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)
    if (Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)) {
    Write-Host "OU already exists! Skipping OU creation..."
    } else {
    write-host "OU does not exist. Creating..."
    New-ADOrganizationalUnit -Name $OUName -Path ($OU + $OURoot) -ProtectedFromAccidentalDeletion $false
    $GroupNameMGMT = $GroupName + " MGMT"
    if (!(Test-Path ($OUDrive + "CN=" + $GroupName + "," + $tempOUName + $OU + $OURoot))) { write-host "Normal user group does not exist. Creating..."; New-ADGroup -Name $GroupName -GroupCategory Security -GroupScope Global -Path ("OU=" + $OUName + "," + $OU + $OURoot)}
    if (!(Test-Path ($OUDrive + "CN=" + $GroupNameMGMT + "," + $tempOUName + $OU + $OURoot))) { write-host "Management user group does not exist. Creating..."; New-ADGroup -Name $GroupNameMGMT -GroupCategory Security -GroupScope Global -Path ("OU=" + $OUName + "," + $OU + $OURoot)}
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    # $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    $BIUsers = New-Object System.Security.Principal.NTAccount("BUILTIN\Users")
    $BIUsersSID = $BIUsers.Translate([System.Security.Principal.SecurityIdentifier])
    write-host $BIUsersSID.Value
    # out-string -inputObject $BIUsers
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($BIUsersSID.Value,"ReadAndExecute,AppendData,CreateFiles,Synchronize","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.RemoveAccessRuleAll($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    get-acl ($FSRoot + $FolderPath + $FolderName) | fl
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $ADGroupName = "JACOBSON\" + $GroupName
    $objUser = New-Object System.Security.Principal.NTAccount($ADGroupName)
    $objUser.Translate([System.Security.Principal.SecurityIdentifier]).Value
    write-host $ADGroupName
    write-host $objUser.Value
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName,"ReadAndExecute","ContainerInherit, ObjectInherit", "None", "Allow")
    Out-String -InputObject $ar
    $FolderACL.AddAccessRule($Ar)
    $ADGroupName = "JACOBSON\" + $GroupNameMGMT
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName, "Modify", "ContainerInherit, ObjectInherit", "None", "Allow")
    Out-String -InputObject $ar
    $FolderACL.AddAccessRule($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    } else {
    $tempOUName = "cn=" + $GroupName + ","
    write-host
    write-host $OUDrive$tempOUName$OU$OURoot
    write-host
    write-host -NoNewLine "Group exists: "; Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)
    if (Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)) {
    Write-Host "Security group already exists! Skipping new security group creation..."
    } else {
    write-host "Security group does not exist. Creating..."
    New-ADGroup -Name $GroupName -GroupCategory Security -GroupScope Global -Path ($OU + $OURoot)
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $ADGroupName = "JACOBSON\" + $GroupName
    $FolderACL.SetAccessRuleProtection($True,$True)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName,"Modify","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    My problems right now are in the assignment/removal of security groups on the newly-created folder, and the problems are two-fold.  Yes, I am running this script as an Administrator.
    First, I am unable to remove the BUILTIN\Users group from the folder when this is an office/location-specific folder.  I've tried to remove the group in several different ways, and none are having any effect.  Oddly, if I type in the lines directly
    into Powershell, they work as expected.  I've tried the following methods:
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    $BIUsers = New-Object System.Security.Principal.NTAccount("BUILTIN\Users")
    $BIUsersSID = $BIUsers.Translate([System.Security.Principal.SecurityIdentifier])
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($BIUsersSID.Value,"ReadAndExecute,AppendData,CreateFiles,Synchronize","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.RemoveAccessRuleAll($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    In the first case, the script goes through and has no apparent effect because afterwards, I do a get-acl and the BUILTIN\Users group is still there, although when looking through the GUI, inheritance appears to have been broken from the parent folder.
    In the second case, I get the following error message:
    Exception calling "RemoveAccessRuleAll" with "1" argument(s): "Some or all identity references could not be translated."
    At C:\Users\tesdallb\Documents\FileServerBuild.ps1:110 char:5
    +     $FolderACL.RemoveAccessRuleAll($Ar)
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : IdentityNotMappedException
    This seems strange that the local server is unable to translate the SID of a BUILTIN account.  I've also tried explicitly putting in the BUILTIN\Users SID in place of the variable in the New-Object line, but that gives me the same error.  I've
    also tried the solutions given in this thread:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/ad59dc58-1360-4652-ae09-2cd4273cbd4f/remove-acl-issue?forum=winserverpowershell and at this URL:
    http://technet.microsoft.com/en-us/library/ff730951.aspx but these solutions also failed to have any effect.
    My second problem is when I try to apply the newly-created security groups, I also will get the "Some or all identity references could not be translated."  I thought I had found a workaround to the problem by adding the -PassThru option to
    the New-ADGroup commands, because it would output the SID of the group after creation, however a few lines later, the server is unable to translate the account to apply the security groups to the folder.
    My first Powershell script has been working well up to this point and now I seem to have hit a showstopper.  Any help is appreciated.
    Thanks!

    I was hoping to stay with strictly Powershell, but unless I can find a Powershell solution, I may resort to ICACLS.
    As for the problems with my groups not being translatable right after creating them, I think I have solved this problem by using the -Server parameter on all my New-ADGroup commands and this example code seems to have gotten around the translation problem,
    again utilizing the -Server parameter on the Get-ADGroup command:
    get-acl ($FSRoot + $FolderPath + $FolderName) | fl
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    # Add the new normal users group to the folder with Read and Execute permissions
    $GroupSID = Get-ADGroup -Identity $GroupName -Server chadc01.jacobsonco.com | Select-Object -ExpandProperty SID
    $SIDIdentity = New-Object System.Security.Principal.SecurityIdentifier($GroupSID)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($SIDIdentity,"ReadAndExecute","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    # Add the management users group to the folder with Modify permissions
    $GroupMGMTSID = Get-ADGroup -Identity $GroupNameMGMT -Server chadc01.jacobsonco.com | Select-Object -ExpandProperty SID
    $SIDIdentity = New-Object System.Security.Principal.SecurityIdentifier($GroupMGMTSID)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($SIDIdentity, "Modify", "ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    Going this route seems to ensure that the Domain Controller I'm creating my groups on is the same one that I'm querying for the group's SID to use in the FileSystemAccessRule.  It's been working fairly consistently.
    Still having issues with the translation of the BUILTIN\Users group, though. 

  • HT203433 Hi! I am so stumped with having multiple apple ID accounts now when I try to do an update on my iPhoto app it tells me to log into the account I used to purchase that app. I have tried going into my other accounts. Please help.

    Hi! I am so stumped with having multiple Apple ID accounts. I did this not knowing what I was doing and now I can not update my iPhoto app because it tells me to log into the account that I used to purchase it. I thought I was trying to do this but I can't get anywhere.
    Please help!
    Flora

    Hi Florafromco,
    You can view your iTunes Store account and request assistance by following the instructions below:
    iTunes Store & Mac App Store: Seeing your purchase history and order numbers
    http://support.apple.com/kb/ht2727
    I hope this information helps ....
    The following article will provide a little more information regarding using multiple Apple ID's:
    Using your Apple ID for Apple services
    http://support.apple.com/kb/HT4895
    I hope this information helps ....
    Have a great day!
    Have a great day!
    - Judy

  • How to remove multiple components border inside a single table column cell

    Hi,
    I'm adding multiple components to a table cell. To provide a good layout I'm using the following component hierarchy in a table column - table-->groupPanel--> gridPanel-->staticText Components 1 ..2 ..3. Now when I do preview in browser or run the app, the table shows up fine, but textComponent s(1,2,3) in the column are each surrounded by a border (which is the width of gridPanel border). Is there a way to get rid of this border?
    This only occurs when you add multiple components in table cell, under gridpanel layout component.
    I've tried searching for a way to remove the grid pane layout component border but couldn't find any info. Used style class border setting to not set but that doesn't help either. I checked forums, tutorial, learning sections etc., but no success. Any help or direction is appreciated..
    Thanks
    -Vinod

    Hi ,
    Can you please post the query ..what u have tried ...
    SQL> select sub from coa1;
    SUB
    XY
    XY
    XY
    XY
    XY
    HXY
    HXY
    HXY
    8 rows selected.
    SQL> select obj from coa1;
    OBJ
    AM
    AM
    AM
    AK
    AK
    AK
    ATK
    ATK
    8 rows selected.
    SQL> SELECT OBJ FROM COA1
    2 UNION ALL
    3 SELECT SUB FROM COA1;
    OBJ
    AM
    AM
    AM
    AK
    AK
    AK
    ATK
    ATK
    XY
    XY
    XY
    OBJ
    XY
    XY
    HXY
    HXY
    HXY
    16 rows selected.
    SQL> insert into coa2 (obj)
    2 (
    3 SELECT OBJ FROM COA1
    4 UNION ALL
    5 SELECT SUB FROM COA1
    6 );
    16 rows created.
    SQL> select * from coa2;
    OBJ SUB MCU DOC F
    AM
    AM
    AM
    AK
    AK
    AK
    ATK
    ATK
    XY
    XY
    XY
    OBJ SUB MCU DOC F
    XY
    XY
    HXY
    HXY
    HXY
    16 rows selected.
    SQL>
    i tried the same it worked fine .....
    so u can combine select and insert statements .. you can get the required result.....!
    Thanks
    Ananda
    Edited by: Ananda on Feb 2, 2009 7:38 PM
    Edited by: Ananda on Feb 2, 2009 7:52 PM

  • Use of multiple components in ABAP WEB DYNPRO

    Hi,
    Am  new to  abap web dynpro and I just want to know whether  we  can  use  multiple components for an application in web dynpro.
    Thanks ,
    Dhaya.G
    Edited by: Dhayalinie Ganesh on Feb 22, 2012 12:06 PM

    Hi,
    depending requirement of application we can use multiple components.
    for example if we want to display table data into alv grid for that we can use the existing(standard component) ie: SALV_WD_TABLE  .Like such a way we can use the components as per our requirements.
    For importing components:
    --> Go to properties tab of view of your web dynpro application
    --> There you can find one button create controller usage ,click on it then import the components
    Thanks&Regards
    Sreenivas Pachva
    Edited by: sreenivas.p on Feb 22, 2012 1:11 PM

  • Having multiple Goods Suppliers in Partner profiles of Vendor - Uses

    Hi All,
    We use multiple goods suppliers in partner profiles of vendor so that if the supplier has manufacturing facilitiy at various places for same material and he supplies us from one of them as lsited in the PO.
    Above is one of th use of having multiple goods suppliers in partner profiles of vendor.
    Other than above are there any specific benefits , can some one help me in listing  out .
    Regards,
    Vengal Rao.

    do you need to follow up an individual order with a GS or many many orders at one time?
    I am not aware of any standard PO report by partner roles.
    In general the GS partner is just for information purposes, except you are doing business in European Union, then the GS partner is taken instead of the vendor to determine the country of dispatch for the Intrastat reporting.

  • I have been having multiple issues lately with my iMac

    I have been having multiple issues lately with my iMac - starting with insanely slow processing/run speeds. 
    When I run Activity Monitor, consistently the highest usage of CPU is "ReportCrash" - typically shows up as 80-200% of CPU.
    What could this be caused by?
    I posted only a portion of the code from Activity Monitor but not sure what exactly is relevant or not.  I can certainly post more if it's needed.
    Many thanks!
    Analysis of sampling ReportCrash (pid 332) every 1 millisecond
    Process:         ReportCrash [332]
    Path:            /System/Library/CoreServices/ReportCrash
    Load Address:    0x10e14a000
    Identifier:      ReportCrash
    Version:         ??? (???)
    Code Type:       X86-64 (Native)
    Parent Process:  launchd [1]
    Date/Time:       2013-04-23 18:17:29.753 -0400
    OS Version:      Mac OS X 10.8.3 (12D78)
    Report Version:  7
    Call graph:
        2492 Thread_6876   DispatchQueue_1: com.apple.main-thread  (serial)
        + 2492 start  (in libdyld.dylib) + 1  [0x7fff847cd7e1]
        +   2492 ???  (in ReportCrash)  load address 0x10e14a000 + 0xfb9c  [0x10e159b9c]
        +     2492 -[NSConditionLock lockWhenCondition:beforeDate:]  (in Foundation) + 235  [0x7fff815f1e39]
        +       2492 -[NSCondition waitUntilDate:]  (in Foundation) + 357  [0x7fff815f1fe3]
        +         2492 _pthread_cond_wait  (in libsystem_c.dylib) + 927  [0x7fff86326023]
        +           2492 __psynch_cvwait  (in libsystem_kernel.dylib) + 10  [0x7fff8b52f0fa]
        2491 Thread_6877   DispatchQueue_2: com.apple.libdispatch-manager  (serial)
        + 2491 _dispatch_mgr_thread  (in libdispatch.dylib) + 54  [0x7fff887179ee]
        +   2481 _dispatch_mgr_invoke  (in libdispatch.dylib) + 883  [0x7fff88717dea]
        +   ! 2481 kevent  (in libsystem_kernel.dylib) + 10  [0x7fff8b52fd16]
        +   8 _dispatch_mgr_invoke  (in libdispatch.dylib) + 134  [0x7fff88717afd]
        +   ! 4 _dispatch_mgr_thread2  (in libdispatch.dylib) + 43  [0x7fff887180a8]
        +   ! : 3 _dispatch_queue_drain  (in libdispatch.dylib) + 180  [0x7fff88716448]
        +   ! : | 2 _dispatch_queue_invoke  (in libdispatch.dylib) + 72  [0x7fff88716305]
        +   ! : | + 1 _dispatch_source_invoke  (in libdispatch.dylib) + 58  [0x7fff88717022]
        +   ! : | + ! 1 _dispatch_kevent_register  (in libdispatch.dylib) + 280  [0x7fff887173f4]
        +   ! : | + !   1 _dispatch_source_kevent_resume  (in libdispatch.dylib) + 63  [0x7fff88717513]
        +   ! : | + !     1 _dispatch_kevent_resume  (in libdispatch.dylib) + 92  [0x7fff88717588]
        +   ! : | + !       1 _dispatch_kevent_machport_resume  (in libdispatch.dylib) + 96  [0x7fff887175ec]
        +   ! : | + !         1 mach_port_move_member  (in libsystem_kernel.dylib) + 31  [0x7fff8b52e539]
        +   ! : | + !           1 _kernelrpc_mach_port_move_member_trap  (in libsystem_kernel.dylib) + 10  [0x7fff8b52d626]
        +   ! : | + 1 _dispatch_source_invoke  (in libdispatch.dylib) + 257  [0x7fff887170e9]
        +   ! : | +   1 _dispatch_kevent_unregister  (in libdispatch.dylib) + 286  [0x7fff887189ad]
        +   ! : | +     1 free  (in libsystem_c.dylib) + 199  [0x7fff8633a8f8]
        +   ! : | +       1 szone_free_definite_size  (in libsystem_c.dylib) + 211  [0x7fff8634012c]
        +   ! : | +         1 _spin_lock$VARIANT$mp  (in libsystem_c.dylib) + 13  [0x7fff8630ff9d]
        +   ! : | 1 _dispatch_queue_push_list_slow2  (in libdispatch.dylib) + 33  [0x7fff88715e10]
        +   ! : |   1 _dispatch_wakeup  (in libdispatch.dylib) + 132  [0x7fff88715ecd]
        +   ! : |     1 _dispatch_queue_wakeup_global_slow  (in libdispatch.dylib) + 59  [0x7fff88716073]
        +   ! : |       1 pthread_workqueue_addthreads_np  (in libsystem_c.dylib) + 47  [0x7fff86324016]
        +   ! : |         1 __workq_kernreturn  (in libsystem_kernel.dylib) + 10  [0x7fff8b52f6d6]
        +   ! : 1 _dispatch_queue_drain  (in libdispatch.dylib) + 48  [0x7fff887163c4]
        +   ! 3 _dispatch_mgr_thread2  (in libdispatch.dylib) + 71  [0x7fff887180c4]
        +   ! : 3 _dispatch_source_drain_kevent  (in libdispatch.dylib) + 172  [0x7fff887186d2]
        +   ! :   3 _dispatch_source_merge_kevent  (in libdispatch.dylib) + 226  [0x7fff88718858]
        +   ! :     3 _dispatch_wakeup  (in libdispatch.dylib) + 132  [0x7fff88715ecd]
        +   ! :       3 _dispatch_queue_push_list_slow2  (in libdispatch.dylib) + 33  [0x7fff88715e10]
        +   ! :         3 _dispatch_wakeup  (in libdispatch.dylib) + 132  [0x7fff88715ecd]
        +   ! :           3 _dispatch_queue_wakeup_global_slow  (in libdispatch.dylib) + 59  [0x7fff88716073]
        +   ! :             3 pthread_workqueue_addthreads_np  (in libsystem_c.dylib) + 47  [0x7fff86324016]
        +   ! :               3 __workq_kernreturn  (in libsystem_kernel.dylib) + 10  [0x7fff8b52f6d6]
        +   ! 1 _dispatch_mgr_thread2  (in libdispatch.dylib) + 61  [0x7fff887180ba]
        +   !   1 _dispatch_cache_cleanup  (in libdispatch.dylib) + 30  [0x7fff88716695]
        +   !     1 szone_free  (in libsystem_c.dylib) + 473  [0x7fff8633c91d]
        +   !       1 _spin_lock$VARIANT$mp  (in libsystem_c.dylib) + 13  [0x7fff8630ff9d]
        +   2 _dispatch_mgr_invoke  (in libdispatch.dylib) + 858,885  [0x7fff88717dd1,0x7fff88717dec]

    It would help to know more about your iMac.
    What year, screen size, CPU speed and amount of RAM installed?
    How full is your Mac's hard drive?
    How many applications do you run simultaneously in the background while working in another application?
    Do you run any antivirus software on your Mac? Antivirus software can slow down the normal operation of OS X.
    Do you run any "crapware" like Mackeeper or any other type of so called hard drive "cleaning" apps?
    Have you downloaded and installed anything recently that might have caused the erratic behaviour of your iMac?

  • Flat file having multiple header lines , how to separate the same and pushit into my intrnal table

    Hi Guys,
                    I got an issue , My flat file having multiple header lines
    TPS27RPR  MOME                                      THRIFT (SAVING) PLAN SYSTEM                                           Page    2
    09:54 05 JAN 2014                          List of Contributors w/Company Contributions                           Phase DAY Unit TRE
    Company No: xxxxxxxx - xxxxxxxxxxxxx.
                                                                            Employee/       Employee/
    Employee Full Name/                                                       Company         Company                        Allocation
    Number  ID Number                           PS  PN  End Date        Contribution          Profit        Total Balance   Percentage
    some lines of data and again
    TPS27RPR  MOME                                      THRIFT (SAVING) PLAN SYSTEM                                           Page    2
    09:54 05 JAN 2014                          List of Contributors w/Company Contributions                           Phase DAY Unit TRE
    Company No: xxxxxxxx - xxxxxxxxxxxxx.
                                                                            Employee/       Employee/
    Employee Full Name/                                                       Company         Company                        Allocation
    Number  ID Number                           PS  PN  End Date        Contribution          Profit        Total Balance   Percentage
    in this case how could I separate the header lines from the flat file and update the details to my internal table.
    kindly help me on this issue.
    Thanks and regards,
    M.S.Amirtharajvijay.

    Hi Amirthraj,
    If the flat file is static (if the content within it is same for all) then use the offset concept. First get the contents of the flat file into an internal table and later find the field that has to be in final internal table within the line, calculate the offset for the line and get the value into an workarea. Finally modify/append the work area into an internal table. Also wait for other experts answers for any other hassle free way to achieve the requirement.
    With Regards,
    Giriesh M

  • How to handle stored procedure response having multiple queries

    Hi Friends,
    While working in JDBC to RFC scenario,I faced an issue that my stored procedure is having multiple SQL queries in it. First Select and then update and again some select options.So,how to handle the response of the stored procedure. I read that while using sender JDBC
    " db.processDBSQLStatement=<SQL-Select-Statement>
    Either specify a valid SQL SELECT statement to select the data to be sent from the specified database, or specify an SQL EXECUTE statement to execute a stored procedure that contains exactly one SELECT statement  "
    So, please suggest me is there any other way to catch the output of the stored procedure.Because, if select statement is working fine but if any other quires fails then data inconsistencies can happen.Kindly help me out.
    Thanks and Regards,
    Nutan

    Hi nutan,
    >>Already exception is handled in SP.But,issue is that select will never fail so, sender adapter will get the resultset from select and continue process.But if later any other query fails in SP adpter wont be getting any response.
    Along with exception you need to handle the case when some other query fails. A SP is like a procedure which will do a certain list of activities before providing the output. So during this activity if some query fail then you can send back the response with a message!!!! And in XI handle this error (by routing it to some error receiver etc)
    >>I need to try something like creating a temporary table and inserting the resultset of slect statement in that. and perform all other operations and after successful completion of all the queries.Again i want to get all the values from the temporary table. So,whether I can write such query in the sender communication channel.Please suggest me for this.
    Approach looks ok, but think of the delay for JDBC sender adapter. IT will invoke your SP and will wait for it to fill a table and do all the processing. I guess this may become a issue for you.
    Check on the frequency of this interface and message size before taking this design approach
    Regards
    Suraj

  • What is the point in having multiple columns in ORDER BY clause?

    DB version:10gR2
    When using ORDER BY clause, the rows are always sorted according to the first column in the ORDER BY clause. So, what is point in having multiple columns in the ORDER BY clause(i always see this in production codes)?
    For the below SQLs' from SCOTT schema, the result sets are always ordered according the first column ename. When i added job asc and job desc, the result set doesn't change.
    SQL> select * from emp order by ename;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    20
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    20
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
    14 rows selected.
    SQL> select * from emp order by ename, job;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    20
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    20
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
    14 rows selected.
    SQL>  select * from emp order by ename, job desc;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    20
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    20
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
    14 rows selected.

    Because there is only one employee with the name SCOTT,FORD ...etc in the emp table and your first column in the order by list is ename
    you spot the difference now
    SQL> select * from emp order by job;
         EMPNO ENAME      JOB              MGR HIREDATE                  SAL       COMM     DEPTNO
          7788 SCOTT      ANALYST         7566 19-APR-87 00:00:00       3000                    20
          7902 FORD       ANALYST         7566 03-DEC-81 00:00:00       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-82 00:00:00       1300                    10
          7900 JAMES      CLERK           7698 03-DEC-81 00:00:00        950                    30
          7369 SMITH      CLERK           7902 17-DEC-80 00:00:00        800                    20
          7876 ADAMS      CLERK           7788 23-MAY-87 00:00:00       1100                    20
          7698 BLAKE      MANAGER         7839 01-MAY-81 00:00:00       2850                    30
          7566 JONES      MANAGER         7839 02-APR-81 00:00:00       2975                    20
          7782 CLARK      MANAGER         7839 09-JUN-81 00:00:00       2450                    10
          7839 KING       PRESIDENT            17-NOV-81 00:00:00       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81 00:00:00       1500          0         30
          7654 MARTIN     SALESMAN        7698 28-SEP-81 00:00:00       1250       1400         30
          7521 WARD       SALESMAN        7698 22-FEB-81 00:00:00       1250        500         30
          7499 ALLEN      SALESMAN        7698 20-FEB-81 00:00:00       1600        300         30
    14 rows selected.
    Elapsed: 00:00:00.00
    SQL> select * from emp order by job, deptno asc;
         EMPNO ENAME      JOB              MGR HIREDATE                  SAL       COMM     DEPTNO
          7902 FORD       ANALYST         7566 03-DEC-81 00:00:00       3000                    20
          7788 SCOTT      ANALYST         7566 19-APR-87 00:00:00       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-82 00:00:00       1300                    10
          7369 SMITH      CLERK           7902 17-DEC-80 00:00:00        800                    20
          7876 ADAMS      CLERK           7788 23-MAY-87 00:00:00       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-81 00:00:00        950                    30
          7782 CLARK      MANAGER         7839 09-JUN-81 00:00:00       2450                    10
          7566 JONES      MANAGER         7839 02-APR-81 00:00:00       2975                    20
          7698 BLAKE      MANAGER         7839 01-MAY-81 00:00:00       2850                    30
          7839 KING       PRESIDENT            17-NOV-81 00:00:00       5000                    10
          7654 MARTIN     SALESMAN        7698 28-SEP-81 00:00:00       1250       1400         30
          7844 TURNER     SALESMAN        7698 08-SEP-81 00:00:00       1500          0         30
          7521 WARD       SALESMAN        7698 22-FEB-81 00:00:00       1250        500         30
          7499 ALLEN      SALESMAN        7698 20-FEB-81 00:00:00       1600        300         30
    14 rows selected.
    Elapsed: 00:00:00.01
    SQL> select * from emp order by job,deptno desc;
         EMPNO ENAME      JOB              MGR HIREDATE                  SAL       COMM     DEPTNO
          7902 FORD       ANALYST         7566 03-DEC-81 00:00:00       3000                    20
          7788 SCOTT      ANALYST         7566 19-APR-87 00:00:00       3000                    20
          7900 JAMES      CLERK           7698 03-DEC-81 00:00:00        950                    30
          7369 SMITH      CLERK           7902 17-DEC-80 00:00:00        800                    20
          7876 ADAMS      CLERK           7788 23-MAY-87 00:00:00       1100                    20
          7934 MILLER     CLERK           7782 23-JAN-82 00:00:00       1300                    10
          7698 BLAKE      MANAGER         7839 01-MAY-81 00:00:00       2850                    30
          7566 JONES      MANAGER         7839 02-APR-81 00:00:00       2975                    20
          7782 CLARK      MANAGER         7839 09-JUN-81 00:00:00       2450                    10
          7839 KING       PRESIDENT            17-NOV-81 00:00:00       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81 00:00:00       1500          0         30
          7654 MARTIN     SALESMAN        7698 28-SEP-81 00:00:00       1250       1400         30
          7521 WARD       SALESMAN        7698 22-FEB-81 00:00:00       1250        500         30
          7499 ALLEN      SALESMAN        7698 20-FEB-81 00:00:00       1600        300         30
    14 rows selected.
    Elapsed: 00:00:00.01
    SQL>

  • Drag and Drop of multiple components at once

    Hi everybody,
    I need to select and drag multiple components (Eg. JLabels) at once, it is quite simple to manage just one drag at a time but how can be managed a multiple drag?
    I mean something like Windows files selection mechanism : using Ctrl + Left mouse click to select the components and then start dragging them all to the drop target.
    Beneath the code I'm using for testing , clicking and dragging each JLabel to JTextField just cause the copy of JLabel text to the JTextField contents.
    In the sample a left click on each displayed label sets a border just to identify the selected status of the labels to drag but there's no implementation of the drop mechanism that should copy all the selected JLabels text to the drop target (the JTextField).
    import java.awt.Dimension;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.util.HashMap;
    import javax.swing.BorderFactory;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    import javax.swing.TransferHandler;
    import javax.swing.UIManager;
    import javax.swing.border.Border;
    import javax.swing.border.CompoundBorder;
    import javax.swing.border.EmptyBorder;
    public class SelectableJLabel extends JPanel {
      MouseListener listener = new DragMouseAdapter();
      public Border getBorder(boolean getSelectedBorder) {
        Border outsideBorder = BorderFactory.createEmptyBorder(2,2,2,2);
        Border insideBorder = BorderFactory.createEmptyBorder(2,2,2,2);
        if (getSelectedBorder)
          insideBorder = BorderFactory.createEtchedBorder();
        return BorderFactory.createCompoundBorder(outsideBorder, insideBorder);
      private class DragMouseAdapter extends MouseAdapter {
        public void mousePressed(MouseEvent e) {
          System.out.println("Press!");
          JComponent c = (JComponent) e.getSource();
          JLabel lbl = (JLabel)c;     
          if (lbl.getBorder()==null || ((CompoundBorder)lbl.getBorder()).getInsideBorder() instanceof EmptyBorder) {
            lbl.setBorder(getBorder(true));
            TransferHandler handler = c.getTransferHandler();
            handler.exportAsDrag(c, e, TransferHandler.COPY);    
          } else
            lbl.setBorder(getBorder(false));        
        /* (non-Javadoc)
         * @see java.awt.event.MouseAdapter#mouseClicked(java.awt.event.MouseEvent)
        @Override
        public void mouseClicked(MouseEvent e) {
      public JLabel getSelectableLabel() {
        JLabel selectableJLabel = new JLabel("You can't select me");
        selectableJLabel.setBorder(getBorder(false));
        selectableJLabel.setTransferHandler(new TransferHandler("text"));
        selectableJLabel.addMouseListener(listener);
        return selectableJLabel;
      public SelectableJLabel() {
        // a regular JLabel
        add(getSelectableLabel());
        add(getSelectableLabel());
        add(getSelectableLabel());
        // a look-alike JLabel
        JTextField f = new JTextField("You can select me........................");
        f.setDragEnabled(true);
        //f.setEditable(false);
        f.setBorder(null);
        f.setForeground(UIManager.getColor("Label.foreground"));
        f.setFont(UIManager.getFont("Label.font"));
        add(f);
      public Dimension getPreferredSize() {
        return new Dimension(100, 100);
      public static void main(String s[]) {
        JFrame frame = new JFrame("SelectableJLabel");
        SelectableJLabel panel = new SelectableJLabel();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.getContentPane().add(panel, "Center");
        frame.setSize(panel.getPreferredSize());
        frame.setVisible(true);
    }Tnx in advance for HELP
    Massimo
    Edited by: JKut on May 2, 2010 10:48 AM

    For multiple selections I recommend to use "JList". The "ListTransferHandler" provided in the "DropDemo" sample code supports multiple selections: [http://java.sun.com/docs/books/tutorial/uiswing/dnd/dropmodedemo.html]. To enable MULTIPLE_INTERVAL_SELECTION, simply remove the following statement in the "DropDemo" class:
            list.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);

  • Logging same NC code for multiple components

    Hi,
    When logging NC codes in SAP ME 6.0 it is possible to log the same NC Code (defect) against many ref-des for
    multiple components.
    However when logging a secondary code (Action) for the previous primary NC Code all the choosen ref-des and components
    don't get copied..
    Is this how it is supposed to work or is there a setting somewhere so that all ref-des and components gets copied?
    Best Regards,
    Johan Nordebrink

    Hi Johan,
    The matter of your question is related to Ref Des List re-desinged for 6.0.
    Overall situation looks like a design gap because:
    - no explicit statement in the documentation describing the case of copying multiple Ref Des'es;
    - the case of 1-to-1 relation between Component and Ref Des is mentioned in the context of auto-population of these feilds on tabbing out if one of the field is populated;
    - the case of single Ref Des is widely referenced in the context of VTR that is a new feature in 6.0.
    So, if you need this to be reviewed by Product Mgmt (maybe they agreed to identify this as a bug), as usually you should either ask your SAP ME Consulting representative or submit a support ticket (depending on whom you pefer to talk with ).
    Regards,
    Sergiy

Maybe you are looking for