Help with event listener

I'm having some trouble trying to figure out how this event listener will work.
The main application is building an arrayCollection of a calendarDay custom components which is displayed by a DataGroup.
Within each calendarDay custom component i may create an arrayList of a DriverDetailComponent custom components displayed within the calendarDay by a DataGroup.
If a user double clicks on the DriverDetailComponent that is two layers in I would like to change states of the main application.  I'm having trouble figuring out what item in the main application to set the listener on.  Please help.
I can't figure out how to post the below as scrollable code snips so this is very long.
Main application code:
<code><?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:components="components.*"
               preinitialize="readDataFile()"
               creationComplete="buildRowTitles()"
               width="1024" height="512"  backgroundColor="#A4BDD8">
    <s:states>
        <s:State name="State1"/>
        <s:State name="driverDetailState"/>
    </s:states>
    <!--
    <fx:Style source="EventCalendar.css"/>
    creationComplete="readDataFile()"    creationComplete="driversList.send()"-->
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->       
        <mx:DateFormatter id="myDateFormatter"
                          formatString="EEE, MMM D, YYYY"/>
        <!--<s:HTTPService id="driversList"
                       url="files/drivers.xml"
                       result="driversList_resultHandler(event)"
                       fault="driversList_faultHandler(event)"/>
        <s:HTTPService id="postDriversList"
                       url="files/drivers.xml"
                       method="POST"
                       result="postDriversList_resultHandler(event)"
            />-->
        <!--<s:Move id="expandTab"
                target="{labelTab}"
                xBy="250"/>-->
    </fx:Declarations>
    <fx:Script>
        <![CDATA[
            import components.CalendarDay;
            import components.TruckDriver;
            import components.calendarDay;
            import events.CancelChangeDriversEvent;
            import events.ChangeDriversEvent;
            import events.EditDriverEvent;
            import mx.collections.ArrayCollection;
            import mx.collections.ArrayList;
            import mx.containers.Form;
            import mx.controls.Alert;
            import mx.controls.CalendarLayout;
            import mx.core.FlexGlobals;
            import mx.core.IVisualElement;
            import mx.core.WindowedApplication;
            import mx.printing.FlexPrintJob;
            import mx.rpc.events.FaultEvent;
            import mx.rpc.events.ResultEvent;
            import mx.rpc.xml.SimpleXMLEncoder;
            import spark.components.Application;
            import utilities.FormatUtil;
            import utilities.ObjectToXML;
            /* public var prefsFile:File; */ // The preferences prefsFile
            [Bindable] public var driversXML:XML; // The XML data
            public var stream:FileStream; // The FileStream object used to read and write prefsFile data.
            public var fileName:String="driversArrayCollection";
            public var directory:String = "AceTrackerData";
            public var dataFile:File = File.documentsDirectory.resolvePath(directory + "\\" + fileName);
            [Bindable]
            public var drivers:ArrayCollection=new ArrayCollection();
            private var fileStream:FileStream;
            [Bindable]
            public var calendarDayArray:ArrayCollection = new ArrayCollection;
            public var i:int;
            [Bindable]
            public var weekOneTitle:String;
            [Bindable]
            public var weekTwoTitle:String;
            [Bindable]
            public var weekThreeTitle:String;
            [Bindable]
            public var weekFourTitle:String;
            public var day:Object;
            protected function readDataFile():void
                if(dataFile.exists)
                    fileStream = new FileStream();
                    fileStream.open(dataFile, FileMode.READ);
                    drivers = fileStream.readObject() as ArrayCollection;
                    fileStream.close();
                else
                    drivers = new ArrayCollection();
                    var driver:TruckDriver = new TruckDriver("New", "Driver", 000);
                    drivers.addItem(driver);
                    saveData(drivers);
                buildCalendarArray();
            protected function buildCalendarArray():void
                calendarDayArray.removeAll();
                for (i=0; i<28; i++)
                    var cd:calendarDay = new calendarDay;
                    cd.dateOffset= i-7
                    cd.drivers=drivers;
                     cd.addEventListener("editDriverEvent",editDriverEvent_Handler);
                    calendarDayArray.addItem(cd);
          private function saveData(obj:Object):void//this is called on the postDriversList result handler to create and write XML data to the file
                var fs:FileStream = new FileStream();
                fs.open(dataFile, FileMode.WRITE);
                /* fs.writeUTFBytes(myXML); */
                fs.writeObject(drivers);
                fs.close();
            protected function driverschedule1_changeDriversHandler(event:ChangeDriversEvent):void
                saveData(drivers); 
                readDataFile();//i read the drivers file again, this refreshes my data, and removes any temporary data that may have been stored in the drivers array
                buildCalendarArray();
                currentState = 'State1';//this hides the driversdetail window after we've clicked save
                /* postDriversList.send(event.driverInfo); */  //this needs to be different
                /* Alert.show("TEST"); */
            protected function driverschedule1_cancelChangeDriversHandler(event:CancelChangeDriversEvent):void
                /* Alert.show("Changes have been canceled."); */
                readDataFile();//this re-reads the saved data file so that the changes that were made in the pop up window
                // are no longer reflected if you reopen the window
                buildCalendarArray();
                currentState = 'State1';  //this hides the driversdetail window after we've clicked cancel
            protected function buildRowTitles():void
                var calendarDay0:Object;
                var calendarDay6:Object;
                calendarDay0=calendarDayArray.getItemAt(0);
                calendarDay6=calendarDayArray.getItemAt(6);
                weekOneTitle = calendarDay0.getDayString() + " - " + calendarDay6.getDayString();
                weekTwoTitle=calendarDayArray.getItemAt(7).getDayString()+ " - " + calendarDayArray.getItemAt(13).getDayString();
                weekThreeTitle=calendarDayArray.getItemAt(14).getDayString()+ " - " + calendarDayArray.getItemAt(20).getDayString();
                weekFourTitle=calendarDayArray.getItemAt(21).getDayString()+ " - " + calendarDayArray.getItemAt(27).getDayString();
        ]]>
    </fx:Script>
    <s:Group height="100%" width="100%">
        <s:layout>
            <s:BasicLayout/>  <!--This is the outermost layout for the main application MXML-->
        </s:layout>
    <s:Scroller width="95%" height="100%"  >
    <s:Group height="100%" width="100%"  ><!--this groups the vertically laid out row titles hoizontally with the large group of calendar days and day titles-->
        <s:layout>
            <s:HorizontalLayout/>
        </s:layout>
    <s:Group height="95%" width="50" ><!--this is the group of row titles layed out vertically-->
        <s:layout>
            <s:VerticalLayout paddingLeft="40" paddingTop="35"/>
        </s:layout>
        <s:Label text="{weekOneTitle}"
                 rotation="-90"
                 backgroundColor="#989393"
                 height="25%" width="115"
                 fontWeight="normal" fontSize="15"
                 paddingTop="4" textAlign="center"  />
        <s:Label text="{weekTwoTitle}"
                 rotation="-90"
                 backgroundColor="#989393"
                 height="25%" width="115"
                 fontWeight="normal" fontSize="15"
                 paddingTop="4" textAlign="center" />
        <s:Label text="{weekThreeTitle}"
                 rotation="-90"
                 backgroundColor="#989393"
                 height="25%" width="115"
                 fontWeight="normal" fontSize="15"
                 paddingTop="4" textAlign="center"  />
        <s:Label text="{weekFourTitle}"
                 rotation="-90"
                 backgroundColor="#989393"
                 height="25%" width="115"
                 fontWeight="normal" fontSize="15"
                 paddingTop="4" textAlign="center"  />
    </s:Group>
    <s:Group height="100%" width="100%" >
        <!--this vertically groups together the horizontal day names group and the tile layout datagroup of calendar days-->
        <s:layout>
            <s:VerticalLayout paddingLeft="5"/>
        </s:layout>
    <s:Group width="100%" >
        <s:layout><!--this group horizontal layout is for the Day names at the top-->
            <s:HorizontalLayout paddingTop="10"/>
        </s:layout>
        <s:Label id="dayNames" text="Sunday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
        <s:Label text="Monday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
        <s:Label text="Tuesday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
        <s:Label text="Wednesday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
        <s:Label text="Thursday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
        <s:Label text="Friday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
        <s:Label text="Saturday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
    </s:Group>
        <!--<s:SkinnableContainer width="16%">-->
            <s:DataGroup id="calendarDataGroup"
                         dataProvider="{calendarDayArray}"
                         itemRenderer="{null}"  resizeMode="scale"
                          height="100%" width="100%"
                          >  <!--  I had to use a null renderer because otherwise each instance is added in a group container renderers.DriverScheduleRenderer-->
                <s:layout >
                    <s:TileLayout requestedColumnCount="7" />
                </s:layout>
            </s:DataGroup>
        <!--</s:SkinnableContainer>-->
    <!--<mx:FormItem label="Today's Date:">
        <s:TextInput id="dateToday"
                     text="{myDateFormatter.format(testDate)}"/>
    </mx:FormItem>-->
    <!--<components:DriverSchedule drivers="{drivers}"
                               changeDriversEvent="driverschedule1_changeDriversHandler(event)"/>-->
        <s:HGroup>  <!--this groups together my drivers button and my print button at the bottom of the calendar-->
        <s:Button id="showDriverDetailButton"
                  label="Driver List"
                  click="currentState = 'driverDetailState'">
            <!--</s:Button>
            <s:Button id="printButton"
                label="Print"
                >  click="printButton_clickHandler(event)"-->
            </s:Button>
        </s:HGroup>    <!--this is the end of the small hgroup which pairs my drivers button with the print button-->                  
    </s:Group><!--this ends the vertical grouping of the day names and the tile layout calendar-->   
</s:Group>        <!--this ends the horizontal grouping of the calendar (names and days) with the week labels at the left-->
    </s:Scroller>
        <s:SkinnableContainer includeIn="driverDetailState"
                              width="95%" height="95%"  horizontalCenter="0" verticalCenter="0"
                              backgroundColor="#989898" backgroundAlpha="0.51">
            <s:BorderContainer horizontalCenter="0" verticalCenter="0">
            <components:DriverSchedule id="driverSchedule"
                                        drivers="{drivers}"
                                       changeDriversEvent="driverschedule1_changeDriversHandler(event)"
                                       cancelChangeDriversEvent="driverschedule1_cancelChangeDriversHandler(event)"
                                       />
            </s:BorderContainer>
        </s:SkinnableContainer>
    </s:Group>  <!--end of basic layout group-->
</s:WindowedApplication>
</code>
calendarDay.mxml code:
<code>
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/mx"
         creationComplete="initDay()"
          width="100%">  <!--width="16%" height="25%"  width="160" height="112"-->
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
        <mx:DateFormatter id="myDateFormatter"
                          formatString="MMM D"/>
    </fx:Declarations>
    <fx:Metadata>
        [Event(name = "editDriverEvent", type="events.EditDriverEvent")]
    </fx:Metadata>
    <fx:Script>
        <![CDATA[
            import components.CalendarDay;
            import components.DriverDetailComponent;
            import events.EditDriverEvent;
            import mx.collections.ArrayCollection;
            import mx.collections.ArrayList;
            import mx.controls.CalendarLayout;
            import mx.controls.DateField;
            [Bindable]
            public var todayCollection:ArrayCollection = new ArrayCollection;
            [Bindable]
            public var todayList:ArrayList=new ArrayList; //arraylist created as data provider for dataGroup, this is where all drivers with an arrival date of today are added
            [Bindable]
            public var currDate:Date =new Date; //this will be used to contain the current real world date
            [Bindable]
            public var calDate:Date = new Date; //this is used below to determine the date of the calender day that is being created
            [Bindable] 
            public var todaysDate:CalendarDay;
            [Bindable]
            public var currDay:int;
            [Bindable]
            public var dateOffset:int;
            public var drivers:ArrayCollection= new ArrayCollection();
               public var driver:Object;  
            public var rowLabel:String;
            public function initDay():void
                todaysDate  = new CalendarDay(currDate, currDate.day, dateOffset)//currDate represents the day the operating system says today is
                    currDay=todaysDate.returnDate().getDate();//currDay is an int representing the day of the month
                    calDate=todaysDate.returnDate();//calDate represents the actual date on the calendar (MM-DD-YYY) that is currently being evaluated
                    /* if (currDay ==currDate.getDate()) //i want to highlight the day if it is in fact today
                        cont.styleName="Today";
                        if (calDate.getDate() == currDate.getDate())
                        calDayBorder.setStyle("backgroundColor", "#FFFF00");
                    else
                        calDayBorder.setStyle("backgroundColor", "#EEEEEE");
                     addDrivers(); 
                return;
              public function addDrivers():void
                   var count:int = 0;
                  /*var driverDetail:DriverDetailComponent;
                  var driver =  */
                for each (driver in drivers)
                {//i check the date value based on data entry of mm-dd-yy format against the calculated date for the day
                    //the calender is building and if it is equal the drivers information is added to this day of the calendar
                    if (DateField.stringToDate(driver.arrivalDate,"MM/DD/YYYY").getDate() == calDate.getDate())
                            var driverDetail:DriverDetailComponent = new DriverDetailComponent; //i create a new visual component that adds the id and destination to the calendar day
                            driverDetail.driverid = drivers[count].id; //i feed the id property which is the truck# - firstName
                            driverDetail.driverToLoc=drivers[count].toLoc; //i feed the toLoc which is the current destination of the driver
                            driverDetail.driverArrayLocation=count;   //here i feed the location of this driver in the "drivers" array so i know where it's at for the click listener
                            todayList.addItem(driverDetail);
                        //this concatenates the drivers truck number first name and destination to display in the calendar day
                            /* todayList.addItem(driver.truckNumber + " - " + driver.firstName + " - " + driver.toLoc); */
                count ++;
            public function getDayString():String
                rowLabel =myDateFormatter.format(calDate);
                return rowLabel;
        ]]>
    </fx:Script>
    <s:BorderContainer id="calDayBorder" width="160" styleName="Today" cornerRadius="2" dropShadowVisible="true" height="100%">
        <s:layout>
            <s:BasicLayout/>   
        </s:layout>
        <!--I need to make a custom item renderer for my calendar days that limits the height and width of the day, and also puts the items
        closer together so i can fit maybe 5 drivers on a single day-->
        <s:DataGroup dataProvider="{todayList}"
                     itemRenderer="spark.skins.spark.DefaultComplexItemRenderer"
                     bottom="-2"
                     width="115" left="2">  <!--width="94%"  width="100"  width="16%"-->
            <s:layout >
                <s:VerticalLayout gap="-4"/> <!--The reduced gap pushes the drivers together if there are serveral on one day. This helps cleanly show several drivers on one day-->
            </s:layout>
        </s:DataGroup >
        <s:Label  text="{currDay}" right="3" top="2" fontSize="14" fontWeight="bold"/>
    </s:BorderContainer>
</s:Group>
</code>
DriverDetailComponent code:
<code><?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/mx">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Metadata>
        [Event(name = "editDriverEvent", type="events.EditDriverEvent")]
    </fx:Metadata>
    <fx:Script>
        <![CDATA[
            import events.EditDriverEvent;
            import mx.controls.Alert;
            [Bindable]
            public var driverid:String;
            [Bindable]
            public var driverArrayLocation:int;
            [Bindable]
            public var driverToLoc:String;
            protected function label1_doubleClickHandler(event:MouseEvent):void
                Alert.show("You have selected " +driverid +" at location "  + driverArrayLocation.toString() +" in the drivers ArrayCollection.");
                var eventObject:EditDriverEvent = new EditDriverEvent("editDriverEvent",driverArrayLocation);
                dispatchEvent(eventObject);
        ]]>
    </fx:Script>
    <s:Label id="driverDetailLabel" text="{driverid} - {driverToLoc}"  doubleClick="label1_doubleClickHandler(event)" doubleClickEnabled="true"/>
</s:Group>
</code>

lkb3 wrote:
I'm trying to add a listener to [this JOptionPane pane dialog box|http://beidlers.net/photos/d/516-1/search_screenshot.JPG|my dialog box], so that when it pops up, the cursor is in the text box, but then if the user clicks a button other than the default, the cursor reverts back into the text box.
The code I have is this:
  // BUILD DIALOG BOX
JLabel option_label = new JLabel("Select a search option:");
// Create the button objects
JRadioButton b1 = new JRadioButton("Search PARTS by name");
JRadioButton b2 = new JRadioButton("Search ASSEMBLIES by name");
JRadioButton b3 = new JRadioButton("Search DRAWINGS by name");
JRadioButton b4 = new JRadioButton("Search all by DESCRIPTION");
b1.setSelected(true);
// Tie them together in a group
ButtonGroup group = new ButtonGroup();
group.add(b1);
group.add(b2);
group.add(b3);
group.add(b4);
// Add them to a panel stacking vertically
JPanel panel = new JPanel();
panel.setLayout(new BoxLayout(panel,BoxLayout.Y_AXIS));
panel.add(b1);
panel.add(b2);
panel.add(b3);
panel.add(b4);
JLabel name_label = new JLabel("Enter a search term (add *'s as required)");
JTextField name = new JTextField(30);
name.addComponentListener(new ComponentListener() {
public void componentHidden(ComponentEvent ce) { }
public void componentMoved(ComponentEvent ce) { }
public void componentResized(ComponentEvent ce) {
ce.getComponent().requestFocus();
public void componentShown(ComponentEvent ce) { }
Object[] array = { option_label, panel, name_label, name };
// GET INPUT FROM USER
int res = JOptionPane.showConfirmDialog(null, array, "Select", JOptionPane.OK_CANCEL_OPTION);
String searchTerm = name.getText();This sucessfully has the focus in the text box when opened; is there a way to get the focus to go back into the text box after the user clicks a radio button?
Thanks!
[this JOptionPane pane dialog box|http://beidlers.net/photos/d/516-1/search_screenshot.JPG|dialog Joption]
you will need to add ItemListener to the JRadioButtons

Similar Messages

  • I need help with event structure. I am trying to feed the index of the array, the index can vary from 0 to 7. Based on the logic ouput of a comparison, the index buffer should increment ?

    I need help with event structure.
    I am trying to feed the index of the array, the index number can vary from 0 to 7.
    Based on the logic ouput of a comparison, the index buffer should increment
    or decrement every time the output of comparsion changes(event change). I guess I need to use event structure?
    (My event code doesn't execute when there is an  event at its input /comparator changes its boolean state.
    Anyone coded on similar lines? Any ideas appreciated.
    Thanks in advance!

    You don't need an Event Structure, a simple State Machine would be more appropriate.
    There are many examples of State Machines within this forum.
    RayR

  • Please help on event listener (notified)

    i create a dynamic text field, i want it notified that, when
    got value send in the text field, then go to play another frame. i
    found some tag like event listener and text event . but i dun know
    how to used it.
    any expert got any suggestion or advice show me?

    Hi kglad,
    In AS3 watch method is removed.
    Can you please tell me how we can do the same in actionscript 3?
    Thanks,
    Shanthi

  • Need help with EVENT BOOKING: option for multiple, payment (pay pal standard or pro only) add cost, etc

    Hello!
    I'm at my wits end: please help! It seems straight forward, and I sold my client on BC thinking this was doable in the events module, but it seems maybe not so without a ton of custom coding.
    1. Book an event online,
    with option for multiple (say 1-5 people at a fixed cost per person),
    and checkout using only Pay Pal (standard or pro, doesn't matter, but I think Standard won't work without shopping cart).
    2. The events are every day but Sunday all year long (just admission to an attraction), so is there a way to upload months in advance so they don't have to be manually entered?
    I'm so grateful for any assistance.

    This is all very achievable:
    • Events you can add multiple people to book.
    • PayPal you use use our APP that's in the BC Appstore (Liam to confirm is works with bookings)
    I'm sales and marketing at Pretty, so I'm not the person to advise on how all this fits together. But I'm sure Liam can point you in the right direction.
    If you need some consulting or us to do it for you just let me know [email protected]
    Brett
    www.prettydigital.com.au

  • Help with event in iMovie '09 event library?

    I am going nuts with an iMovie project!
    I am trying to make a movie of my recent vacation (which I do every year). I have already invested about 15 hours in the project. I opened iMovie tonight and tried to view it. Immediately, I noticed something was odd because as my cursor ran across clips in my project they did not show in the viewer and where ever the cursor was over a clip (either in the project or on a clip in the event I was working from) the thumbnail image in the filmstrip switched to light gray.
    When I play my project all the music and titles I added play but the clips are blacked out AND the clip's audio doesn't play. The source clips in the event library also play the same in the viewer (blackout and with no audio). The problem seems to relate only to the event I am working with to create my project. I checked some other events in my library and they play fine in the viewer (although I am not using any video from those events in my current project).
    Any help would be greatly appreciated.
    Just for the record I am running OS 10.5.8 on a 2.66 GHz Intel Core 2 Duo. I am using iMovie '09 v. 8.0.6. Also, the clips were imported directly into iMovie.

    Thanks for the suggestions guys.
    I wound up resolving this on my own. I finally went to Time Machine and restored the folder "movies" under my account name. I went back about an hour before I stopped working on the project. This restored the project and allowed me to continue to work on it. I only lost about 3 minutes at the very end that I had to recreate (much better than recreating the entire project over). It has been about a week since the restore and (knock wood!) all has been well. I have learned the value of a Time Machine back-up.
    One thing of note: Immediately after the restore I did have an issue with iMovie not recognizing my iTunes library. Once I opened iTunes and went back to iMovie the library was there.
    Hope this helps someone else.
    Tim

  • Help with Event Handlers with Scope

    I have a question of how I must implement the event handlers with scope, I have problems in the execution of processes BPEL (they are generating exceptions in the dehydration)
    I have two models for event handlers and I need to know which is the best way to implement event handlers.
    Another question is, in what it influences the "variableAccessSerializable" attribute.
    Thanks!
    1) Event Handlers with PartnerLink invocation OUTSIDE Scope
    <invoke name="Invoke_1" partnerLink="PartnerLink1"/>
    <scope name="Scope_1" variableAccessSerializable="yes">
    <eventHandlers>
    <onMessage partnerLink="PartnerLink1"/>
    <onAlarm/>
    </eventHandlers>
    <sequence name="Sequence_1">
    </sequence>
    </scope>
    2) Event Handler with PartnerLink invocation INSIDE scope
    <scope name="Scope_1" variableAccessSerializable="yes">
    <eventHandlers>
    <onMessage partnerLink="PartnerLink1"/>
    <onAlarm/>
    </eventHandlers>
    <sequence name="Sequence_1">
    <invoke name="Invoke_1" partnerLink="PartnerLink1"/>
    </sequence>
    </scope>

    Thanks -- indeed a crucial call might be missing. I was doing
    this until 3 yesterday morning.
    Would this be the correct sample code to use? :
    http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm ?context=Flash_MX_2004&file=00000846.html
    It seems to work (although someone cautions in the page
    comments that it doesn't).
    Part of my trouble in working with AS 2.0 is that I feel I
    shouldn't have to do such complicated things (Delegate classes,
    etc) in order to get simple things done (loading XML files). This
    is not a complaint per se -- rather I feel that I must be missing
    something, that it is my inexperience that is causing me to bend
    through so many hoops: programming "should" be elegant and simple.
    So, any links helpful. Thanks.

  • How to complete process with event listening inside

    Hi all,
    I have a workflow, a part of it contains a branch gate way:
    Branch 1: Wait point (7 days)
    Branch 2: Listening event
    If after 7 days and no event is sent, the workflow auto emails user and closes
    Oherwise it will route to another user.
    I observe that if event is received, then at the end the process status can be COMPLETE. But if after 7 days and no event is received, after last user complete the form, the process status is still RUNNING.
    I'm thinking about this approach: adding 1 sending event after wait point in branch 1, it send an event so that branch 2 can be completed.
    Is there any other solution to complete this kind of process?
    Thank you and regards,
    Anh

    instead of using a gateway and an event recieve, catch the event on the wait operation (so that the event icon is on the corner of the wait operation's icon). That way, the event is listened for only during the time that the wait operation is executing.You draw a route off of the operation, and you draw a route off of the event catch. If the event catch occurs, its route is followed but not the other. Make sense?
    http://help.adobe.com/en_US/livecycle/9.0/workbenchHelp/000113.html#1032048
    scott

  • Help with event.target.name

    I am very green with actionscript and coding in general so please forgive me if I am asking something that sounds super simple.
    Is it possible to take "event.target.name" value which in my case would be something like "SW5005_mc" and change that value.
    I use that value right now to tell another clip to gotoAndStop(event.target.name); which I have frames labeled the same as the event.target.name.
    I would like to take the value of event.target.name for instance "SW5005_mc" and remove the "_mc" and put a dash in between the "SW" and the "5005"
    to get "SW-5005" which then I would pass into a text field.
    I really don't know where to begin or if this is possible.
    Thanks for any help or suggestions,
    Chris

    yes you can do it with String manipulation, check out the various String Class methods, some examples here:
    http://www.wuup.co.uk/as3-basics-string-manipulation-in-actionscript-3/
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/String.html

  • Help with Event Handling!

    I'm creating a program that is supposed to have a circle and a line disappear when mouse button is pressed, than when mouse button is released, reappear. My program is below, but I do not have a clue why it won't do anything when the mouse button is clicked. Thanks for the help.
    import objectdraw.*;
    import java.awt.*;
    public class NoClicking extends WindowController{
         FramedOval circle;
         Line diagonal;
    public void begin()
         new FramedOval( 153, 28, 94, 94, canvas);
         new Line( 167, 42, 233, 108, canvas);
    public void onMousePress(Location point)
    // When mouse button is depressed, the circle with diagonal line disappears.
    circle = new FramedOval( 153, 28, 94, 94, canvas);
         diagonal = new Line( 167, 42, 233, 108, canvas);
         circle.hide();
         diagonal.hide();
    public void onMouseRelease(Location point)
    // When mouse button is released, the circle with diagonal line reappears.
         circle.show();
         diagonal.hide();
    }

    Basic debugging. You are expecting that method onMousePress to be called when the mouse button is pressed, I assume. Well, is it being called? Run it through your IDE debugger or put in a System.out.println statement to confirm that it is or is not being called. That will tell you where to look next.
    I don't know what all of those classes are, but I would have expected "circle = new FramedOval(...)" to be in the begin() method and not in onMousePress. Otherwise you are creating a FramedOval in begin, which I assume is displayed, and then in onMousePress you create another FramedOval, which you then hide. That wouldn't hide the FramedOval you created in begin, would it? I'm just assuming that I know what your classes are supposed to do.

  • Help with event window and "Nav" button?

    I lost my event window, where do I locate it? Also, in the event window there should be a "Nav" buttion, I didn't see it when I had it up, why?
    Running version 11.5 on CS5.5.

    Hi hkbstudios,
    Welcome to Adobe forums. The help article http://helpx.adobe.com/dreamweaver/using/changes-insert-options-creative-cloud.html has changes to the Insert menu in the latest version.
    Thanks,
    Preran

  • Help with Event Structure!.

    Hello,
    I am trying to config one event structure in the way I could change the range of sample graph to analyze it. 
    I have 3 graphs. The upper is the signal input.  In the middle is the signal fitted with some calculations and the bottom is the graph where I fix the sample width to analyze with anothers values.
    I put event structure in the way I read from file and later update the array of data to force the execution of Case "array 2". 
    Its only one example but I would like to change the value of "start" and " length" of sample signal but I cant get the data to show again. I tried diferent options, like put another event source inside of event case "array 2".
    I could join case 1 and 2, but the problem is with "start and lenght" control, I can`t get its display when i change the values.
    I created a example since its part of my program, to simulate the similar way i need.
    Thank in advance, Fred.
    Solved!
    Go to Solution.
    Attachments:
    example-eventStructure.vi ‏56 KB
    006_RR.txt ‏7 KB

    altenbach wrote:
    billko wrote:
    crossrulz wrote:
    You need to wire up the value of Array 2 to the output tunnel of the event case.  Currently, that output tunnel is set to "Use Default if Unwired".  So since you didn't wire up that tunnel, the value going into the shift register will become an empty array.
    That's one thing I am totally paranoid about.  I hate that the tunnels in an event structure are "Use Default if Unwired" by default, yet they don't show that little dot that suggests that it is.
    Of course they do! What makes you say they don't?
    I actually like the current behavior, especially for the boolean going to the stop button. I would not want to wire it in all the other cases where the loop should not stop.
    Maybe the behavior could be a bit fine-tuned. Automatic "Use default if unwired" should only apply to scalars. Tunnels for arrays and clusters, etc. should require a manual "use default if unwired" setting.
    Ha - it's because of my own paranoia about the "Default if Unwired" that led me to believe this.  I guess I always have something wired to every single case so I haven't seen it in ages.  I created one just now and specifically looked for the dot, and when I added a second case, there it was.  Of course if I wire something to that second case, it disappears.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Need help with color & listener

    here is a snip of my code below & i would like to know why when i run it color red,green, blue stay the same. it should be getting darker as the slider approaches 250 and lighter as it gets to 0.
    another question i have is about my actionPerformed and statechanged. is there an easy way i can combine both together since both are dealing with the same operation. if the user changes the slider it updates the text box,also adjust color to light or dark & if the user enter's a number in the text box it changes the slider to that position,also adjust the color to light or dark. can any of you just post a snip of a code on how you would go about doing this for color red thanks.
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public  class MyColorChooser extends JFrame implements ChangeListener,ActionListener
    {   private JPanel RGB,change;       //panel labels
          private JSlider Red,Green,Blue;  //jslider labels
          private JTextField Re,Ge,Bu;     //textfield labels
          private JLabel Rd,Gr,Bl;         //labels
         public MyColorChooser()
                super("MyColorChooser PrOgRaM ");
                 //setup JSliders
                  Red= new JSlider(SwingConstants.HORIZONTAL,0,250,10);
                   Red.setMajorTickSpacing(10);
                   Red.setPaintTicks(true);
                Red.addChangeListener( this );
                  Green= new JSlider(SwingConstants.HORIZONTAL,0,250,10);
                   Green.setMajorTickSpacing(10);
                   Green.setPaintTicks(true);
                   Green.addChangeListener( this);
                   Blue= new JSlider(SwingConstants.HORIZONTAL,0,250,10);
                   Blue.setMajorTickSpacing(10);
                   Blue.setPaintTicks(true);
                   Blue.addChangeListener( this);
               //setup JTextFields 
                 Re= new JTextField(4);
                 Re.addActionListener( this);
                 Ge= new JTextField(4);
                 Ge.addActionListener(this);
                 Bu= new JTextField(4);
                 Bu.addActionListener(this);
                //JSliders Change Listeners
                   RGB= new JPanel();
              //setup labels,jslider & textfields
                RGB.setLayout(new GridLayout(3, 3));
               RGB.add(new Label("RED: ")); RGB.add(Red); RGB.add(Re);
               RGB.add(new Label("Green: "));  RGB.add(Green); RGB.add(Ge);
               RGB.add(new Label("Blue: "));  RGB.add(Blue); RGB.add(Bu);
                 //dummy jpanel to display color change
                 change = new JPanel();
                 change.setLayout(new FlowLayout(1, 80, 0));
              //Display RGB on screen
                 Container c= getContentPane();
                 c.add(RGB,BorderLayout.SOUTH);
                 c.add(change, BorderLayout.CENTER);
                 setSize(400, 300);
               show();
                public void stateChanged(ChangeEvent e)
               { //Object test= e.getSource();
                if (e.getSource() == Red)
                 {   int r= Red.getValue();
                        change.setBackground(Color.red);
                          Red.setForeground(Color.red);//paint ticks
                          Re.setText("" + r);
                 if (e.getSource()== Green)
                  { change.setBackground(Color.green);
                         Green.setForeground(Color.green);//paint ticks
                     int g= Green.getValue();
                         Ge.setText("" + g);
                     if (e.getSource() == Blue)
                     {   change.setBackground(Color.blue);
                      Blue.setForeground(Color.blue);//paint ticks
                      int b= Blue.getValue();
                          Bu.setText("" + b);
                public void actionPerformed(ActionEvent e)
                     if (e.getSource()== Re)
                     {     String text = Re.getText();
                        int value = Integer.parseInt(text);
                        value = Math.max(0,Math.min(250,value));
                        Re.setText(" "+value);
                             Red.setValue(value);
                   if (e.getSource()== Ge)
                     {     String text = Ge.getText();
                        int value = Integer.parseInt(text);
                        value = Math.max(0,Math.min(250,value));
                        Ge.setText(" "+value);
                             Green.setValue(value);
                     if (e.getSource()== Bu)
                     {     String text = Bu.getText();
                        int value = Integer.parseInt(text);
                        value = Math.max(0,Math.min(250,value));
                        Bu.setText(" "+value);
                             Blue.setValue(value);
          public static void main(String args[])
               { //close app
                 MyColorChooser app= new MyColorChooser();
                 app.setDefaultCloseOperation(
                      JFrame.EXIT_ON_CLOSE);
          }

    here you go man. just a couple things. i moved all the color control stuff to changeColor(). the reason the colors didn't change, is because no matter what happened with RED, you just did
    change.setBackground(Color.red);
    i also changed it, to where you can mix the colors. not sure if this is what you wanted to do.
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public  class MyColorChooser extends JFrame implements ChangeListener,ActionListener {
         private JPanel RGB,change;  //panel labels
         private JSlider Red,Green,Blue;  //jslider labels
         private JTextField Re,Ge,Bu;     //textfield labels
         private JLabel Rd,Gr,Bl; //labels
         int r=0,g=0,b=0; //color values
         public MyColorChooser()      {
              super("MyColorChooser PrOgRaM ");//setup JSliders
              Red= new JSlider(SwingConstants.HORIZONTAL,0,250,10);
              Red.setMajorTickSpacing(10);
              Red.setPaintTicks(true);
              Red.addChangeListener( this );
              Green= new JSlider(SwingConstants.HORIZONTAL,0,250,10);
              Green.setMajorTickSpacing(10);
              Green.setPaintTicks(true);
              Green.addChangeListener( this);
              Blue= new JSlider(SwingConstants.HORIZONTAL,0,250,10);
              Blue.setMajorTickSpacing(10);
              Blue.setPaintTicks(true);
              Blue.addChangeListener( this);          //setup JTextFields
              Re= new JTextField(4);
              Re.addActionListener( this);
              Ge= new JTextField(4);
              Ge.addActionListener(this);
              Bu= new JTextField(4);
              Bu.addActionListener(this);               //JSliders Change Listeners
              RGB= new JPanel();                     //setup labels,jslider & textfields
              RGB.setLayout(new GridLayout(3, 3));
              RGB.add(new Label("RED: "));
              RGB.add(Red); RGB.add(Re);
              RGB.add(new Label("Green: "));
              RGB.add(Green); RGB.add(Ge);
              RGB.add(new Label("Blue: "));
              RGB.add(Blue);
              RGB.add(Bu);//dummy jpanel to display color change
              change = new JPanel();
              change.setLayout(new FlowLayout(1, 80, 0));          //Display RGB on screen
              Container c= getContentPane();
              c.add(RGB,BorderLayout.SOUTH);
              c.add(change, BorderLayout.CENTER);
              setSize(400, 300);
              show();
         public void stateChanged(ChangeEvent e)           {
              Object source= e.getSource();
              changeColor(source);
         public void actionPerformed(ActionEvent e)      {
              Object source= e.getSource();
              changeColor(source);
         public void changeColor(Object source){
              if (source == Red)       {
                   r= Red.getValue();
                   change.setBackground(new Color(r,g,b));
                   Red.setForeground(Color.red);//paint ticks
                   Re.setText("" + r);
               if (source == Green)              {
                   change.setBackground(new Color(r,g,b));
                   Green.setForeground(Color.green);//paint ticks
                   g= Green.getValue();
                   Ge.setText("" + g);
              if (source == Blue)                 {
                   change.setBackground(new Color(r,g,b));
                   Blue.setForeground(Color.blue);//paint ticks
                   b= Blue.getValue();
                   Bu.setText("" + b);
         public static void main(String args[])           { //close app
              MyColorChooser app= new MyColorChooser();
              app.setDefaultCloseOperation(  JFrame.EXIT_ON_CLOSE);
    }

  • Need help with apex listener administration username & passwd

    Hello,
    I downloaded apex ODD and tried to lunch listener admin http://localhost:8888/apex/listenerAdmin
    Please help me the username and password.
    Thank you very much.

    Hailt wrote:
    Hello,
    I downloaded apex ODD and tried to lunch listener admin http://localhost:8888/apex/listenerAdmin
    Please help me the username and password.
    Thank you very much.1) To not attempt to eat a listener. It is not good for you.
    2) Are you sure you are in the right forum for this? (You may be .. but you may well not be) ... if ODD is open developer day the information on passwords is usually in the installation instructions.
    .. i cant recall having to worry about apex listeners, but i havant used the latest versions ...
    The main purpose of the post way to correct your possible eating disorder.

  • Need Help with Event Handler Code - Doesnt come up in Event Handler Manager

    Hello there,
    Below is the code snippet that I am using to create a event handler:
    package com.oracle.events;
    import com.thortech.util.logging.Logger;
    import com.thortech.xl.client.events.tcBaseEvent;
    import com.thortech.xl.dataobj.tcDataObj;
    import com.thortech.xl.util.logging.LoggerModules;
    public class tcCheckOvrallProvStatusUDFs extends tcBaseEvent
         private static Logger logger = Logger.getLogger(LoggerModules.XL_JAVA_CLIENT);
         public tcCheckOvrallProvStatusUDFs()
              setEventName("Generating tcCheckOvrallProvStatusUDFs");
    * @Override
    * @throws Exception
         protected void implementation() throws Exception {
              tcDataObj data = getDataObject();
              String OIDProvStatus = data.getString("usr_udf_oidusrprovstatus");
    String EBSProvStatus = data.getString("usr_udf_ebstcausrprovstatus");
              if (OIDProvStatus.equals("Provisioned") && EBSProvStatus.equals("Provisioned")) {
                   setOverAllProvStatus(data);
         * @param data
         * @throws Exception
         private void setOverAllProvStatus(tcDataObj data) throws Exception
              data.setString("usr_udf_ovrrscprovstatus", "Provisioned");
    Its a simple code that I am using to populate value of a UDF field depending on the value of other 2 fields. I want to trigger it on Post-Insert and Post-Update events.
    But even if I restart the OIM server after placing the successfully compiled file (0 errors, 0 warnings) into the EventHandlers folder of OIM_HOME; it doesnt show up in the Design Console -> Development Tools -> Business Rule Definition -> Event Handler Manager. :( In order to create a event handler i need that file to show up in the lookup of event handlers/adapters. This JAR file doesnt come up over there.
    Is there anything missing within the code ?
    What else needs to be specified?
    Please provide some guidance.
    Thanks,
    - jhb.

    Now I have placed this JAR file in JAVATasks folder - made an entity adapter - in the event handler manager - i gave the class name/event handler name as 'setUDFValue' and the package as 'project5'. But now im getting it 'DOBJ.EVT_NOT_FOUND - Event Handler not found' error.
    package project5;
    import java.util.Hashtable;
    import Thor.API.Exceptions.tcAPIException;
    import java.util.Hashtable;
    import java.util.HashMap;
    import com.thortech.xl.util.config.ConfigurationClient;
    import Thor.API.tcResultSet;
    import Thor.API.tcUtilityFactory;
    import Thor.API.Operations.tcUserOperationsIntf;
    import java.lang.System;
    import Thor.API.Exceptions.tcUserNotFoundException;
    import java.util.Properties;
    import javax.mail.Message;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    public class setUDFValue {
    private static final String SMTP_HOST_NAME="mail.smtp.host";
    public setUDFValue() {
    // public static void main(String[] args) {
    // setUDFValue.setvalue("jatinbhatt");
    // setUDFValue.sendemail("[email protected]","[email protected]");
    public static void setvalue(String UserID) {   
    try
    System.setProperty("XL.HomeDir", "F:/oim/oimserver/xellerate");
    System.setProperty("log4j.configuration",
    "F:/oim/oimserver/xellerate/config/log.properties");
    System.setProperty("java.security.policy",
    "F:/oim/oimserver/xellerate/config/xl.policy");
    System.setProperty("java.security.auth.login.config",
    "F:/oim/oimserver/xellerate/config/auth.conf");
    System.out.println("Startup...");
    System.out.println("Getting configuration...");
    ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
    System.out.println("Login...");
    Hashtable env = config.getAllSettings();
    tcUtilityFactory ioUtilityFactory = new tcUtilityFactory(env,"xelsysadm","oimadmin1");
    System.out.println("Getting utility interfaces...");
    tcUserOperationsIntf moUserUtility = (tcUserOperationsIntf)ioUtilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
    HashMap userMap = new HashMap();
    String str1 = null;
    String str2 = null;
    userMap.put("Users.User ID",UserID);
    userMap.put("Users.Status", "Active");
    tcResultSet userResultSet = null;
    try {
    userResultSet = moUserUtility.findAllUsers(userMap);
    } catch (tcAPIException e2) {
    // TODO Auto-generated catch block
    e2.printStackTrace();
    for (int i=0; i<userResultSet.getRowCount(); i++)
    userResultSet.goToRow(i);
    str1 = userResultSet.getStringValue("USR_UDF_OIDUSERPROV");
    str2 = userResultSet.getStringValue("USR_UDF_EBSUSERPROV");
    // System.out.println(userResultSet.getStringValue("USR_UDF_OIDUSERPROV"));
    // System.out.println(userResultSet.getStringValue("USR_UDF_EBSUSERPROV"));
    if (str1.equals("Provisioned") && (str2.equals("Provisioned") || str2.equals("NA")))
    userMap.put("USR_UDF_OVRRSCPROVSTATUS","Provisioned");
    moUserUtility.updateUser(userResultSet,userMap);
    moUserUtility.close();
    }catch (Exception e){
    e.printStackTrace();
    ERROR:
    ERROR RMICallHandler-63 XELLERATE.SERVER - Class/Method: tcDataObj/ runEvent encounter some problems: project5.setUDFValue
    java.lang.ClassCastException: project5.setUDFValue
         at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcUSR.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.updateUserData(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.updateUser(Unknown Source)
         at com.thortech.xl.ejb.beans.tcUserOperationsSession.updateUser(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.SecurityRoleInterceptor.invoke(SecurityRoleInterceptor.java:47)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at tcUserOperations_RemoteProxy_6ocop18.updateUser(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Thanks,
    - jhb.

  • Help with Client/Server communication

    Im working on a project for university, and one aspect of it is downloading files from a remote computer.
    The majority of my project so far has been using RMI only, for browsing the remote computer, deleting files, renaming files, creating new directories and searching for files. All of this is done via a GUI client, with a server running on the server machine.
    Ive now reached the part where I'll need to implement the downloading of files. I want the user to select a file from within the GUI and click download, and get it off the server.
    I dont need any help with event handlers or getting the contents of the remote computer or anything of that sort.
    Consider when I have the name of the file that I want to download from the client.
    Im having trouble understanding how exactly its going to work. Ive seen examples of file transfer programs where the user types in the name of the file in the command line which they want to download. But my implementation will differ.
    Every time the user clicks the button, I have to send to the server the name of a different file which will need to be downloaded.
    I imagine in the event handler for the Download button I'll be creating a new socket and Streams for the download of the file that the user wants. But how am I to send to the client a dynamic file name each time when the user tries to download a different file?
    I am a bit new at this, and Ive been searching on the forums for examples and Ive run through them, but I think my situation is a bit different.
    Also, will RMI play any part in this? Or will it purely be just Socket and Streams?
    I'll also develop an Upload button, but I imagine once I get the Download one going, the Upload one should be much harder.
    Any ideas and help would be appreciated.

    Hi
    I'm no RMI expert... and I did not understand your question very well....
    I think you should do this procedure:
    you should send a request for the file from the client to the server . then a new connection between the two machines should be made which will be used to send the file.
    by using UDP you will achive it quite nicely...
    //socket - is your TCP socket  you already use on the client...
    //out - socket's output stream
    byte [] b=new String("File HelloWorld.java").getBytes();
    // you should use a different way for using this rather than using strings...
    out.write(b);
    DatagramSocket DS=new DatagramSocket(port);
    DS.recieve(packet); //the data is written into the packet...on the server side you should...
    //socket - is your TCP socket  you already use on the server...
    //in - socket's input stream
    byte [] b=new byte[256];
    out.read(b);
    /*Here you check what file you need to send to the client*/
    DatagramSocket DS=new DatagramSocket(server_port);
    byte [] data=//you should read the file and translate it into bytes and build a packet with them
    DS.send(packet); //the data is in the packet...This way the server sends the required file to the client .....
    I hope it will help, otherwise try being clearier so I could help you...
    SIJP

Maybe you are looking for

  • Have to re-boot each time I want to load iTunes

    I recently bought a new computer, successfully downloaded itunes and my music. However, itunes will only open and operate properly the first time it's opened after start up. If I close itunes and try to re-open, I get an error message saying "itunes

  • ALC888S Realtek Driver Update?

    Hello, I have put a lot of work into perfecting my PC's video and audio over the last 2 years, the PC in question is a HP p6313w. I had installed a powerful graphics card to the computer, equipped surround sound and the whole lot. One of the things I

  • Roles retrieval

    Hi, I am trying to retrieve the Roles that I have created in Weblogic console Securityrealms->myrealm->Globalrole->roles from a page flow using userInfoControl.getAvailableUserRoles(getRequest()).(weblogic 9.2)But I get only the anonymous role. If I

  • I just started using Firefox. When I added a bookmark it was alphabatized and now when i add a bookmark it is added randomly

    I just started using Firefox. When I added a bookmark it was alphabatized and now when i add a bookmark it is added randomly

  • Lx3, RAW images and Aperture 3

    I recently purchased the legendary lx3, and though I'm quite pleased with the camera I admit being disappointed in the level of distortion in RAW mode. I've read various threads/articles on how the latest version of A3 (which I have btw) corrected th