Search Results

Search found 9 results on 1 pages for 'setori'.

Page 1/1 | 1 

  • Flex/Flash 4 datagrid displays raw xml

    - by Setori
    Problem: Flex/Flash4 client (built with FlashBuilder4) displays the xml sent from the server exactly as is - the datagrid keeps the format of the xml. I need the datagrid to parse the input and place the data in the correct rows and columns of the datagrid. flow: click on a date in the tree and it makes a server request for batch information in xml form. Using a CallResponder I then update the datagrid's dataProvider. [code] <fx:Script> <![CDATA[ import mx.controls.Alert; [Bindable]public var selectedTreeNode:XML; public function taskTreeChanged(event:Event):void { selectedTreeNode=Tree(event.target).selectedItem as XML; var searchHubId:String = selectedTreeNode.@hub; var searchDate:String = selectedTreeNode.@lbl; if((searchHubId == "") || (searchDate == "")){ return; } findShipmentBatches(searchDate,searchHubId); } protected function findShipmentBatches(searchDate:String, searchHubId:String):void{ findShipmentBatchesResult.token = actWs.findShipmentBatches(searchDate, searchHubId); } protected function updateBatchDataGridDP():void{ task_list_dg.dataProvider = findShipmentBatchesResult.lastResult; } ]]> </fx:Script> <fx:Declarations> <actws:ActWs id="actWs" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/> <s:CallResponder id="findShipmentBatchesResult" result="updateBatchDataGridDP()"/> </fx:Declarations> <mx:AdvancedDataGrid id="task_list_dg" width="100%" height="95%" paddingLeft="0" paddingTop="0" paddingBottom="0"> <mx:columns> <mx:AdvancedDataGridColumn headerText="Receiving date" dataField="rd"/> <mx:AdvancedDataGridColumn headerText="Msg type" dataField="mt"/> <mx:AdvancedDataGridColumn headerText="SSD" dataField="ssd"/> <mx:AdvancedDataGridColumn headerText="Shipping site" dataField="sss"/> <mx:AdvancedDataGridColumn headerText="File name" dataField="fn"/> <mx:AdvancedDataGridColumn headerText="Batch number" dataField="bn"/> </mx:columns> </mx:AdvancedDataGrid> //xml example from server <batches> <batch> <rd>2010-04-23 16:31:00.0</rd> <mt>SC1REVISION01</mt> <ssd>2010-02-18 00:00:00.0</ssd> <sss>100000009</sss> <fn>Revision 1-DF-Ocean-SC1SUM-Quanta-PACT-EMEA-Scheduled Ship Date 20100218.csv</fn> <bn>10041</bn> </batch> <batches> [/code] and the xml is pretty much displayed exactly as is shown in the example above in the datagrid columns... I would appreciate your assistance.

    Read the article

  • Flex/Flash 4 datagrid literally displays XML

    - by Setori
    Problem: Flex/Flash4 client (built with FlashBuilder4) displays the xml sent from the server exactly as is - the datagrid keeps the format of the xml. I need the datagrid to parse the input and place the data in the correct rows and columns of the datagrid. flow: click on a date in the tree and it makes a server request for batch information in xml form. Using a CallResponder I then update the datagrid's dataProvider. [code] <fx:Script> <![CDATA[ import mx.controls.Alert; [Bindable]public var selectedTreeNode:XML; public function taskTreeChanged(event:Event):void { selectedTreeNode=Tree(event.target).selectedItem as XML; var searchHubId:String = selectedTreeNode.@hub; var searchDate:String = selectedTreeNode.@lbl; if((searchHubId == "") || (searchDate == "")){ return; } findShipmentBatches(searchDate,searchHubId); } protected function findShipmentBatches(searchDate:String, searchHubId:String):void{ findShipmentBatchesResult.token = actWs.findShipmentBatches(searchDate, searchHubId); } protected function updateBatchDataGridDP():void{ task_list_dg.dataProvider = findShipmentBatchesResult.lastResult; } ]]> </fx:Script> <fx:Declarations> <actws:ActWs id="actWs" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/> <s:CallResponder id="findShipmentBatchesResult" result="updateBatchDataGridDP()"/> </fx:Declarations> <mx:AdvancedDataGrid id="task_list_dg" width="100%" height="95%" paddingLeft="0" paddingTop="0" paddingBottom="0"> <mx:columns> <mx:AdvancedDataGridColumn headerText="Receiving date" dataField="rd"/> <mx:AdvancedDataGridColumn headerText="Msg type" dataField="mt"/> <mx:AdvancedDataGridColumn headerText="SSD" dataField="ssd"/> <mx:AdvancedDataGridColumn headerText="Shipping site" dataField="sss"/> <mx:AdvancedDataGridColumn headerText="File name" dataField="fn"/> <mx:AdvancedDataGridColumn headerText="Batch number" dataField="bn"/> </mx:columns> </mx:AdvancedDataGrid> [/code] I cannot upload a pic, but this is the xml: [code] 2010-04-23 16:35:51.0 PRESHIP 2010-02-15 00:00:00.0 100000009 DF-Ocean-PRESHIPSUM-Quanta-PACT-EMEA-Scheduled Ship Date 20100215.csv 10053 [/code] and the xml is pretty much displayed exactly as is in the datagrid columns... I would appreciate your assistance.

    Read the article

  • Flex/Flash 4 ExternalInterface.call - trying to get a string from HTML to Actionscript.

    - by Setori
    Dear all, I need to obtain a string from HTML and put it into Actionscript. the actionscript: import flash.external.ExternalInterface; protected function getUserName():void{ var isAvailable:Boolean = ExternalInterface.available; var findUserName:String = "findUserName"; if(isAvailable){ var foundUserName:String = ExternalInterface.call(findUserName); Alert.show(foundUserName);}} the javascript: function findUserName() { var label = document.getElementById("username-label"); if(label.value != ""){ alert("the name in the box is: " + label.value); return label.value;} else return "nothing in the textbox";}} the JSP: <%IUserSession userSession = SessionManager.getSession();%> <logic:notEmpty name="userSession"> <logic:notEqual value="anonymous" name="userSession" property="userLoginId"> <td align="right" width="10%" > <input id="username-label" type="text" value="<bean:write name="userSession" property="userLoginId"/>" /> </td> </logic:notEqual> </logic:notEmpty> the rendered HTML: <td align="right" width="10%"> <input id="username-label" type="text" value="a-valid-username" /> </td> when the javascript execution hits var label = document.getElementById("username-label"); a null is returned and crashes, no alert shows no error message is shown. firfox 3.5 windows, container is Tomcat. Please advise, and thank you in advance.

    Read the article

  • Objective-J Cappuccino want a list of buttons on main menu, when I click the panel refreshes with UI

    - by Setori
    Dear all, I am new to objective-j/c and cappuccino not really sure how this all fits together. The code below is taken from http://github.com/jfahrenkrug/CappuccinoLocations1 What I need to do is: I need a landing main menu which is a CPView called ie MainView with five or so buttons, when you click on the LocationButton on MainView is replaces MainView by with LocationView, which displays the contents of jfahrenkrug's work. A similar effect will happen with each other button. What is the correct Objective-c/j way of handling this approach? @import <Foundation/CPObject.j> @import "src/Location/LocationView.j" @implementation AppController : CPObject { LocationView locationView; } - (void)applicationDidFinishLaunching:(CPNotification)aNotification { var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask], mainContentView = [theWindow locationView], bounds = [locationView bounds]; [mainContentView setBackgroundColor:[CPColor colorWithRed:212.0 /255.0 green:221.0/ 255.0 blue:230.0/255.0 alpha:1.0]]; locationView = [[LocationView alloc] initWithFrame:CGRectMake(0,0,920.0,590.0)]; [locationView setCenter:[mainContentView center]]; [locationView setBackgroundColor:[CPColor whiteColor]] [locationView setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin]; var shadow = [[CPShadowView alloc] initWithFrame:CGRectMakeZero()]; [shadow setFrameForContentFrame:[locationView frame]]; [shadow setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin]; [mainContentView addSubview:shadow]; [mainContentView addSubview:locationView]; [theWindow orderFront:self]; } Now we have the locationView.j @import "LocationsController.j" @import "LocationListView.j" @import "MapController.j" @import "LocationsToolbar.j" @import "LocationDetailView.j" @import "LocationDetailController.j" @implementation LocationView : CPView { LocationsController locationsController; LocationListView locationListView; MapController mapController; MKMapView mapView; CPTextField coordinatesLabel; LocationsToolbar locationsToolbar; LocationDetailView locationDetailView; LocationDetailController locationDetailController; CPTextField searchField; // id delegate @accessors; } - (id)initWithFrame:(CGRect)aFrame { self = [super initWithFrame:aFrame]; if(self){ locationsController = [[LocationsController alloc] init]; [locationsController loadExampleLocations]; locationListView = [[LocationListView alloc] initWithFrame:CGRectMake(0.0,0.0,226.0,400.0)]; [locationListView setContent:[locationsController locations]]; [locationListView setDelegate:locationsController]; [locationsController setLocationListView:locationListView]; var locationScrollView = [[CPScrollView alloc] initWithFrame:CGRectMake(10.0,65.0,243.0,400.0)]; [locationScrollView setDocumentView:locationListView]; [locationScrollView setAutohidesScrollers:YES]; [[locationScrollView self] setBackgroundColor:[CPColor whiteColor]]; [self addSubview:locationScrollView]; mapController = [[MapController alloc] init]; mapView = [[MKMapView alloc] initWithFrame:CGRectMake(510,65,400,400) apiKey:'' ]; [mapView setDelegate:self]; mapController.mapView = mapView; [self addSubview:mapView]; coordinatesLabel = [[CPTextField alloc] initWithFrame:CGRectMake(510,465,200,35)]; [coordinatesLabel setTextColor:[CPColor colorWithHexString:@"009900"]]; [coordinatesLabel setFont:[CPFont systemFontOfSize:14.0]]; [coordinatesLabel setEditable:NO]; [coordinatesLabel setStringValue:@"-/-"]; [mapController setCoordinatesLabel:coordinatesLabel]; [self addSubview:coordinatesLabel]; locationsToolbar = [[LocationsToolbar alloc] initWithFrame:CGRectMake(10.0,467.0,226.0,25.0)]; [locationsToolbar setDelegate:locationsController]; [self addSubview:locationsToolbar]; locationDetailController = [[LocationDetailController alloc] init]; locationDetailController.mapController = mapController; locationsController.locationDetailController = locationDetailController; [mapController setDelegate:locationDetailController]; locationDetailView = [[LocationDetailView alloc] initWithFrame:CGRectMake(510,490,400,90)]; [locationDetailView setDelegate:locationDetailController]; [locationDetailController setLocationDetailView:locationDetailView]; [self addSubview:locationDetailView]; searchField = [CPTextField roundedTextFieldWithStringValue:@"" placeholder:@"Location" width:200.0]; [searchField setFrameOrigin:CGPointMake(510.0,35.0)]; [searchField setDelegate:self]; [self addSubview:searchField]; var searchButton = [[CPButton alloc] initWithFrame:CGRectMake(710.0,37.0,60.0,24.0)]; [searchButton setTitle:"Search"]; [searchButton setTarget:self]; [searchButton setAction:@selector(searchLocation)]; [self addSubview:searchButton]; } return self; }

    Read the article

  • how to put a drop down list in a flex advanced data grid

    - by Setori
    How can one put components into an advanced data grid? I wish to have a standard row with string items, in this row there is a date selector I want to put in, and in another cell of the row I want to put a drop down list box containing text "40" and "20" or you can manually edit the cell so that it displays what ever input you decide (other than 40 and 20) thanks so much

    Read the article

  • Search Oracle date type column with hibernate, seach by everything in that day - ignore the time.

    - by Setori
    hi there <property name="batchCreatedDate" type="java.util.Date"> <meta attribute="field-description">batch create date</meta> <column name="BATCH_CREATED_DATE" length="7" not-null="true" /> </property> table column type is BATCH_CREATED_DATE DATE NOT NULL With the data in that date column being similar to this '2010-05-13 14:56:36.0' now I want to search for all items within the 24 hours of 2010-05-13, currently my call only returns all items with date "2010-05-13 14:56:36.0" exactly. What would my HQL statement look like to hand this kind of scenario? Thank you so much

    Read the article

1