How to set up a label control from custom event handler?

Hi,
Below I try to describe my problem:
I have a single instance of MyClass (I use Cairngorm framework), with ArrayCollection as a variable, in which I would like to keep a couple addresses from database.
Additionaly  I created a custom components with a list of people retrieved from database, with eventhandler  for a doubleclick event. After I doubleclick on some person, I create a custom event and dispatch it. In command class connected with this event I connect to the database and get full data about this person and a set of her addresses. This set of addresses I placed into ArrayCollection in my model variable. And now I have a problem, because one of this address (the birth place) I would like to display below the list with persons, in a Panel with a couple of label control, but .... I can't to bind label control to my model.addresses[???] because I don't know if this doubleclicked person has this birth address at all?
I wonder if it is possible to set up label control in my custom components in time when I'm receiving the data from database in my custom event handler???
One of the way to achieve this is to define a string var in my model and placed this special address in it, and then the label control to this variable, for instance {model.birthplace}, but this is only needed for a moment, I don't want to keep this address in extra variable in model, because I have already it in my ArrayCollection in model, so it would be a duplicate.
I hope that you could understand me and my english :-)
Best regards

Looks like I migh not be a novice swing programmer for long then.

Similar Messages

  • Problem reading custom property file from custom event handler.

    Hi,
    My custom event handler needs some bits of information that I have set up in a property file. However, when the event handler runs it throws a FileNotFound exception - actually its because permission was denied.
    I have added the code System.getProperty("user.name") to find out the actual user that the event handler is running as. It reports that "oracle" is the user.
    That's great. However, the permissions on the file will allow oracle to read/write the file. If I log onto the server where OCDB runs (as oracle), I can vi the file.
    The file is owned by another user, but the "oracle" is a member of the group that has read/write (we're running on a unix box). The file is not 777.
    The event handler is actually calling a static utility method that returns the Properties. This utility is used elsewhere in other custom apps in conjunction with OCDB (on the same server). It works there, so the utility is functioning correctly.
    Is there something going on that I'm missing? Like somehow the event handler is acually runn as somebody else?
    Here is the node log.
    2007/07/17 12:52:16 [oracle.ifs] [37] 434364 system FINE: Error /opt/csc/sfi/configuration/sfi.properties (Permission
    denied) Additional INFO: java.io.FileNotFoundException: /opt/csc/sfi/configuration/sfi.properties (Permission denied)
    Thanks in advance for the help.
    Winston

    Matt,
    Sorry to have wasted your time. It was a server reboot issue. The ocdb server hasn't been restarted since early July. We added the users and groups late last week. Although we tested on line, the server wasn't quite up to speed with the new changes.
    We bounced the server and all is well.
    Thanks
    Winston

  • How to set title of jsp page from resource bundle

    hi ,
    How to set title of jsp page from resource bundle....

    Depends on how you configured and declared the resourcebundle in your JSP. The usual way is just<title>${resourceBundle.messageKey}</title>

  • Using pages, how can I create a label run from contacts

    Using pages, how can I create a label run from contacts?

    You mean you want to use XML to create a flat file, right? Not that the database is using XML in some way? If so, why do you want to use XML?

  • How to create automatic creation of BP from customer and vendor master data

    Hi gurus,
    can any one tell how to create automatic creation of BP from customer and vendor master data.
    Please give me the steps.
    Thanks
    Sasikanth.

    HI,
    Goto SPRO\ Cross application components \ Master data synchronization \ Synchronization control.
    Assign account groups of customer and vendors to respective BP grouping. This setting is enough to create BP in background while creating customer / vendor. But the fields groups are very much important, ensure mandatory fields should be sync.
    rgds,
    Srini

  • How to Set A Default Start Time For New Events In Calendar?

    How to Set A Default Start Time For New Events In Calendar?

    John,
    Thanks for that suggestion - could not get it to work. However, I did manage a different approach. I finally determined the sequence of events in terms of how the various events and listeners fire (I think).
    Basically, the CalendarActivityListener fires, followed by the listener associated with the Calendar object's Create facet, followed finally by the CalendarEventListener - the final is where the TriggerEvent is available and then finally, control is passed to the popup/dialog in the Create facet. So, my approach of trying to set/get the TriggerDate in the user's HTTP session was doomed to failure because it was being get before it had been set :(
    Anyway, I ended up adding a bit of code to the CalendarEvent listener - it grabs the current BindingContext, navigates through the DCBindingContainer to derive an Iterator for the ViewObject which drives the calendar and then grabs the currently active row. I then do a few tests to make sure we're working with a "new" row because I don't want to alter start & end dates associated with an existing calendar entry and then I define the Start and End dates to be the Trigger Date.
    Works just fine. Snippet from the listener follows
    BindingContext bindingContext = BindingContext.getCurrent();+
    *if ( bindingContext != null )    {*+
    DCBindingContainer dcBindings = (DCBindingContainer) bindingContext.getCurrentBindingsEntry();+
    DCIteratorBinding iterator = dcBindings.findIteratorBinding("EventsView1Iterator");+
    Row currentRow = iterator.getCurrentRow();+
    if ( currentRow.getAttribute("StartDate") == null)+
    currentRow.setAttribute("StartDate", calendarEvent.getTriggerDate());+
    if (currentRow.getAttribute("EndDate")==null)+
    currentRow.setAttribute("EndDate", calendarEvent.getTriggerDate());+
    *}*

  • How to call a static method from an event handler

    Hi,
       I'm trying to call a static method of class I designed.  But I don't know how to do it.  This method will be called from an event handler of a web dynpro for Abap application.
    Can somebody help me?
    Thx in advance.
    Hamza.

    To clearly specify the problem.
    I have a big part code that I use many times in my applications. So I decided to put it in a static method to reuse the code.  but my method calls functions module of HR module.  but just after the declaration ( at the first line of the call function) it thows an exception.  So I can't call my method.

  • Raise a button's click event handler from another event handler

    hi,
    I am trying to raise a button's click event from another button's click event.
    Automation gives a runtime error. I checked out some other forums for answers but they dont work when called from another event handler.
    Console.WriteLine(gestureData.name);
    if (s==b2) ;
    //raise button2's click event
    private void b2_Click(object sender, RoutedEventArgs e)
    MessageBox.Show("I am button2");
    private void b3_Click(object sender, RoutedEventArgs e)
    MessageBox.Show("I am button3");
    Any help will be appreciated.
    Thanks,
    Shaleen
    TheHexLord

    Hi Andy,
    I tried to implement your suggestion.
    What I am trying to do is, say there is a label whose content property needs to be updated every time a button b1 is clicked. When the button is clicked , it check if a condition is met and depending upon that condition it updates the content of the label
    . Say , if the text entered is "add" and the button is clicked and the label's content is set to "add", if the text entered is "sub" and then the button is clicked, the label's content is set to "sub".
    I understand that there is no need to fire up different methods for this as this can be done by checking for conditions in the same button click event but it seems that updating the UI is not happening. I get an error saying.:
    A first chance exception of type 'System.InvalidOperationException' occurred in WindowsBase.dll
    The program '[6660] WpfApplication8.vshost.exe: Program Trace' has exited with code 0 (0x0).
    The program '[6660] WpfApplication8.vshost.exe: Managed (v4.0.30319)' has exited with code -1073741819 (0xc0000005) 'Access violation'.
    this goes away when I remove the Label.Content="add" or Label.Content= "sub";
    I think the label's content property does not update dynamically.
    Thanks
    TheHexLord

  • Opening a new window from an event handler in IC WebUI

    Hello ,
    I want to open a new browser window on the click of a button (through the event handler) .This can be done using javascript ,but I ideally want it to be triggered from the event handler .The URL is dynamically
    generated . Please do let me know if there are ways to achieve this .

    Hi,
    In the place where you declare your button write this code.
        ls_button-id = xx.
        lv_string1 = 'javascript:window.open( "'.
        lv_string2 = '" );'.
        ls_button-on_client_click = 'javascript:window.open( "lv_url");'
        CONCATENATE lv_string1
                    lv_url
                    lv_string2
                    INTO lv_string3.
        ls_button-on_client_click = lv_string3.
        ls_button-enabled = abap_true.
        APPEND ls_button TO gt_editbutton.
    pass your dynamic URL here to lv_url. Dont Pass anything to ls_button-on_click.
    You can do this coding in DO_PREPARE_OUTPUT or IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS wherever your button is present.
    Regards,
    Masood Imrani S.

  • How to get selection of a DropdownListBox and its event handler

    Hi,
    I am trying to get the selection of a DropdownListBox in its event handler. The thing is, that I can´t cast the Component to a DropdownListBox.
    DropDownListBox secondDDLB = (DropDownListBox)this.getComponentByName("SecondUserDDLB");
    How I can get the selected item in an event handler ?
    Regards
    Flo

    DropDownListBox NO
    DropdownListBox YES
    Regards

  • How to set up validations in controlling

    Hi All,
    I have an issue.
    I have set up planning for all cost elements and internal orders. While posting actual amounts greater than planned amount. The system should pop up an error messgae.
    How to set up validation for this issue.
    Regards
    Arun

    Hi Arun,
    As far as the internal order goes, you can set up Budgets and activate 'availability control' which would trigger an 'eeror message' when it exceeds the budget amount. Path: SPRO-Controlling-Internal Order-Budger and Availability Control
    The same facility is not available in Cost center budget.
    You may have to write an exit or validations.
    Regards,
    Suraj

  • Anyone knows how to set printer to economy mode from your ibook?

    I am using a HP 1320 laser printer for both my ibook G4 and a pc. With the pc there is no problem to set the printer to economy mode for toner saving, but I can't find a way to set up the same mode from Mac. Is it because of the version of the printer software? Does anyone know how to do it from your mac?
    Any suggestion will be appreciated.

    My Canon driver gives me the ability to create presets based on specific types of pictures (high quality color, draft mode, black & white etc.). It sounds like the HP driver is not as generous.
    All printer settings for ink, paper handling, etc. occur on the screen appearing when you select "print". If "economy" does not appear, then the PC driver probably (no surprise) gives more options than the related Mac driver.
    Have you contacted HP directly? If not, it might be your best tact, at least to offer suggestions for future driver options.
    In the 3rd party "driver" world, a favorite is Gutenprint (formerly known as Gimp-Print). This driver package may offer you more print options than HP.
    iMac G5 Rev C 20" 2.5gb RAM 250 gb HD/iBook G4 1.33 ghz 1.5gb RAM 40 gb HD   Mac OS X (10.4.5)   LaCie 160gb d2 HD Canon i960 printer

  • How to set a variable's value from job output

    Can anyone point me at documentation on how to set the value of a variable based on the output of a job? We are running TES v6.0.2.153.
    The Agent/Adapter is a Linux command line, so the Command could be for example:
    echo foo
    and I would like a variable named bar to contain the value foo.  (Obviously in real life the variable value would be dependent on what the command output)
    Thanks in advance,
    Martin

    One more nugget: to parse the response from a command from a UNIX/Linux agent for a specific string and store that in a variable, I followed Rami's advice and then had to find the string in the output.
    The below example puts the first digit of a random number in the variable:
    Job Command:
    bash -c
    Command Parameters:
    "'echo' Random number is $RANDOM | perl -ple 's/.*Random number is (\d{1}).*/\1/'"
    Note that your command itself (in this case "echo") cannot be put in the Command box, otherwise TES does not interpret the Command Parameters correctly.  So you need to set the Command to "bash -c" (run the command in the parameter string), and enter your command and parameters within double quotes in the Command Parameters, with the command being run (in this case "echo") in single quotes at the beginning.
    (I also had to make my .bash_profile run without any output to avoid it being prefixed to the variable value.)
    Hope this helps,
    Martin.

  • How to set genericObject in a TaskInstance from java

    Hi,
    How can I set generiobject to a taskInstace from java?
    And
    How can I get a variable of any other taskInstace in workFlow?
    Please suggest me.
    Thanks ,
    Ravi.G

    Hi,
    How can I set generiobject to a taskInstace from java?
    And
    How can I get a variable of any other taskInstace in workFlow?
    Please suggest me.
    Thanks ,
    Ravi.G

  • How to set value for Dropdown control using Querystring filter wepart

    Hi,
    I have a dropdown in my customized list form and need to set the value for the dropdown control using query string filter web part.
    I am able to set value for textbox control using Query String Filer web part.
    But, since the dropdown values are not populated on form load, the value is not set for dropdown control.
    How to load the values in dropdown control on form load and set a value using Query String filter webpart?
    Thanks,
    dhijit

    Hi,
    According to your post, my understanding is that you want to filter choice field using Query String Filter web part.
    To filter using query string filter web part, we can set the default value for the choice field in the query string filter web part panel as below, then connect to the list.
    Now it would be filter by the value you have set.
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

Maybe you are looking for

  • Mini dvi to hdmi adapter

    I have ordered a mini dvi to female hdmi adapter for my MacBook...and hdmi cable to run to my Pansonic HDTV; so I can watch movies I rent from iTunes. Do I need an additional cable for sound? If so, please inform what I need? I do have HDMI Audio inp

  • How to add plug in filters to CS6?

    On my PC (Win7) i have a very old version of Photoshop (7.0) installed plus various old and new filters (eye candy, alien skin, xenofex, filter forge ...) as plug-ins. Now i bought CS6 (student version) and want to use these filters here as well. How

  • Is it possible to undo AS06

    Dear all, please can you assist? We need to undo the deletion of an asset because it was still in use and now the MIGO of the PO item where the asset was assigned to cannot be reversed. Dear SDN Team, I had a similar discussion last week and it has b

  • HTTP Adapter Implementation

    Does anyone have some sort of how-to guide in using the HTTP Adapter ? From the point of having installed to HTTP Adapter - Once you have deployed the Servlet, and have tested that it loops.. I realize there are AQ's to be set up as well. Am not an O

  • Sort formula format

    Hi, I need help on system action "Sort rows". What format the field "sort formula" has? Edited by: Eugene Balakhonov on Apr 15, 2008 3:17 PM