NEWBIE: AS3/XML DataGrid Component interaction

So heres the situation:
I'm trying to create a simple newsreader using a Flash
DataGrid component in which data is loaded via EXTERNAL XML
attributes. And it works fine...got 2 columns, "subject" and "date
posted", and the appropriate data being sent to the right place.
So heres the problem:
I'd like to link those rows, when the user clicks on any
individual row, to load the "URL" attribute that the XML has
defined. Feels like there's an easy solution but i just can't put
my finger on it:
Is this possible? Code below:
< LexHead />

Whay are you using a different formatted xml for the dummy
than the real data. Using internal data for testing is a fine
technique, but i needs to be the same format as the real data.
Otherwise how will you know when you get the code right?
I have an example that uses HTTPService to get an xml file
from the server, uses a tree to display/edit the nodes, a dynamic
dataGrid for displaying/editing the attributes, and HTTPService to
send it back to the server. The backend is JSP, so to run that
you'd need a J2EE web server like Tomcat, but the tree and property
explorer might be useful.
Semd me an email and I will send it to you directly.
Tracy

Similar Messages

  • Customizing DataGrid component in Flash CS3 using AS3

    Can anyone please explain how to customize the DataGrid
    component in Flash CS3 using AS3???
    How do you remove/change the grid lines for the rows and
    colums?
    How do you remove/change the border?
    My day has been lost searching for this answer. Flash
    Documentation is worthless and Google finds nothing with regards to
    AS3. ASDGRH.
    Thanks in advance,
    TedWeb

    I hope you've found a resolution to this by now, but I just noticed the discussion title when posting a captioning issue.
    In a nutshell, create a listener on your FLVPlayback module with a VideoEvent.SKIN_LOADED event. You'll also need to set the showCaptions in your FLVPlaybackCaptioning object to true. Apparently, if the captions are set to false when the player object loads the skin, the captions aren't recognized and your captions toggle will require an extra click to activate the captions.
    Here's the link to another discussion on the same topic with all of the details:
    http://kb2.adobe.com/cps/402/kb402452.html
    Also, have you had any issues with the caption button in the FLVPlayback skin not showing up? That's my current issue. Here's the discussion for it:
    http://forums.adobe.com/thread/796423?tstart=0

  • CS5.5 can't find the XML Connector Component - what give

    I'm working on a actionscript 2 file in flash CS5.5 and can't find the XML Connector Component any place. What happened to it?  How are you suppose to get a round it missing. Is there someplace I can download the .swc file and install it? converting to action script 3 is not an option in this case.
    thanks
    Joel

    Thanks for the reply...
    But I can't find any information on using the URLLoader class in Actionscript 2. This is an Actionscript 2 project that I don't have the time or the knowlage to try convert to AS3.  What I need is the AS2 XML Connector Component, I just can't find it anyplace in CS5.5. Where did they move it to? or is it gone?. The cs5.5 help files link me over to the AS2 reference guide. I found lots of references to it in the AS 2 guide in the cs5.5 help files but they all start with....
    Confirm that your Publish Settings specify ActionScript 2.0.
    Add an instance of the XMLConnector component to your application and give it an instance name.
    So the problem is, I can't find an "instance" of the XML Connector Component any place in flash CS5.5. I do see all the parameters and the trigger method listed in the script window but can't find the "component". All the sample scripts I've found on using the XMLconnect have a line to import the component and when I try to use them it throws an error. 
    In fact I can't find any of the "Data" components that were in my older copy of flash. So I asume that Adobe , in their collective wisdom, decided we didn't need them any more so I guess the question needs to be...
    Given that this project must use actionscript 2, and that the XML connector Component appearently doesn't exsist any more. How do I do the job it did to get an XML file into my AS2 flash project. if I can get it loaded I can use the inspector, as I use to I assume, to bind it. Any code example or links to some would be appreciated.
    thanks
    Joel

  • No DataGrid component?

    I believe JavaFX seriously needs a DataGrid component to render tabular data as a GRID, where data can be paged, sorted, filtered like other data grid solutions (Adobe Flex, jQGrid, DataTables etc).
    This is one of the basic controls, any serious application would definitely need. TableView is the only closest thing I found, but that doesn't fit the bill at all.
    The DataFx project looks promising, but is very primitive.
    I hope Oracle will come up with a pretty GRID control soon, to beat the competition. We were planning to go with JavaFX and the only thing that is stopping us is the lack of a GRID component, we have to look for other web-based alternatives now.

    I think there's more to the TableView API than you're seeing, as it's supported by the JavaFX Properties and Collections APIs. The columns are exposed as a mutable, observable List, as is the data. So the columns are dynamic and can be readily changed as necessary, the table will update automatically.
    I used you example as a way to test this out; I've made no effort whatsoever to make this look good, the css is relatively straightforward. Also, I have no knowledge whatsoever of your business domain, so this will likely look somewhat naive. I think the code structure might be helpful though. There are some things I wish were a bit different but I'll come to that after the code.
    I'm going to assume you have some kind of data model and some way of knowing when the data's changed. I've mocked this up with a DataModel class with listener notification, but there are other ways this could happen (could be an EJB, for example). I've made this completely agnostic with respect to JavaFX.
    DataModel.java (a mockup of something I assume you already have existing):
    import java.util.ArrayList;
    import java.util.List;
    public class DataModel {
         private double minDeviation ;
         private double maxDeviation ;
         private int numDeviationCategories ;
         private int numRows ;
         private List<DataListener> listeners ;
         public DataModel(double minDeviation, double maxDeviation,
                   int numDeviationCategories, int numRows) {
              this.minDeviation = minDeviation;
              this.maxDeviation = maxDeviation;
              this.numDeviationCategories = numDeviationCategories;
              this.numRows = numRows;
              this.listeners = new ArrayList<DataListener>();
         public String getValue(int row, double deviation) {
              int category = (int) ((numDeviationCategories - 1)*(deviation - minDeviation) / (maxDeviation - minDeviation)) ;
              return String.format("f(%d, %d)", category+1, row+1);
         public double getMinDeviation() {
              return minDeviation;
         public void setMinDeviation(double minDeviation) {
              if (minDeviation != this.minDeviation) {
                   this.minDeviation = minDeviation;
                   fireDeviationRangeChanged();
         public double getMaxDeviation() {
              return maxDeviation;
         public void setMaxDeviation(double maxDeviation) {
              if (maxDeviation != this.maxDeviation) {
                   this.maxDeviation = maxDeviation;
                   fireDeviationRangeChanged();
         public int getNumDeviationCategories() {
              return numDeviationCategories;
         public void setNumDeviationCategories(int numDeviationCategories) {
              if (numDeviationCategories != this.numDeviationCategories) {
                   this.numDeviationCategories = numDeviationCategories;
                   fireNumDeviationCategoriesChanged();
         public int getNumRows() {
              return numRows;
         public void setNumRows(int numRows) {
              if (this.numRows != numRows) {
                   this.numRows = numRows;
                   fireNumRowsChanged();
         public void addDataListener(DataListener l) {
              listeners.add(l);
         public void removeDataListener(DataListener l) {
              listeners.remove(l);
         private void fireDeviationRangeChanged() {
              DataEvent event = new DataEvent(this);
              for (DataListener l : listeners) {
                   l.deviationRangeChanged(event);
         private void fireNumDeviationCategoriesChanged() {
              DataEvent event = new DataEvent(this);
              for (DataListener l : listeners) {
                   l.numDeviationCategoriesChanged(event);
         private void fireNumRowsChanged() {
              DataEvent event = new DataEvent(this);
              for (DataListener l : listeners) {
                   l.numRowsChanged(event);
    }And there are two almost trivial supporting classes to support the listener notification:
    public interface DataListener {
         public void deviationRangeChanged(DataEvent event);
         public void numDeviationCategoriesChanged(DataEvent event);
         public void numRowsChanged(DataEvent event);
    public class DataEvent {
         private final DataModel source ;
         public DataEvent(DataModel source) {
              this.source = source;
         public DataModel getSource() {
              return source;
    }The TableView exposes ObservableLists for the columns and the data. We need to update those lists when the data or column structure changes. So we need an adapter to sit in front of our generic DataModel and manipulate those lists when the data changes. This class will take a reference to a DataModel in addition to references to the column list and data list; it will listen for notifications from the DataModel and update the lists as necessary. (I'm implementing each row in the table simply as a List<String>, and we retrieve each element from the row using a custom CellValueFactory.)
    TableDataModel.java:
    public class TableDataModel {
         private DataModel model ;
         private final ObservableList<TableColumn<List<String>, ?>> columns ;
         private final ObservableList<List<String>> items ;
         public TableDataModel(DataModel model, ObservableList<TableColumn<List<String>, ?>> columns, ObservableList<List<String>> items) {
              this.model = model ;
              this.columns = columns;
              this.items = items ;
              buildColumns();
              buildItems();
              model.addDataListener(new ModelListener());
         private void buildColumns() {
              int numCols = model.getNumDeviationCategories();
              List<TableColumn<List<String>, String>> colList = new ArrayList<TableColumn<List<String>, String>>();
              double minDeviation = model.getMinDeviation() ;
              double maxDeviation = model.getMaxDeviation() ;
              double colDeviationIncrement = (maxDeviation - minDeviation) / (numCols-1) ;
              Format percentFormat = DecimalFormat.getPercentInstance();
              for (int col=0; col<numCols; col++) {
                   String colTitle = percentFormat.format(minDeviation + col*colDeviationIncrement);
                   TableColumn<List<String>, String> column = new TableColumn<List<String>, String>(colTitle);
                   final int colIndex = col ;
                   column.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<List<String>,String>,ObservableValue<String>>() {
                        @Override
                        public ObservableValue<String> call(
                                  CellDataFeatures<List<String>, String> cellDataFeatures) {
                             List<String> data = cellDataFeatures.getValue();
                             return new SimpleStringProperty(data.get(colIndex));
                   colList.add(column);
              columns.clear();
              columns.addAll(colList);
         private void buildItems() {
              List<List<String>> itemList = new ArrayList<List<String>>();
              int numCols = model.getNumDeviationCategories() ;
              for (int row = 0; row<model.getNumRows(); row++) {
                   List<String> data = new ArrayList<String>();
                   double minDeviation = model.getMinDeviation() ;
                   double colDeviationIncrement = (model.getMaxDeviation() - minDeviation) / (numCols-1) ;
                   for (int col = 0 ; col < numCols; col++) {
                        double deviation = minDeviation + col * colDeviationIncrement ;
                        data.add(model.getValue(row, deviation));
                   itemList.add(data);
              items.clear();
              items.addAll(itemList);
         private class ModelListener implements DataListener {
              @Override
              public void deviationRangeChanged(DataEvent event) {
                   double minDeviation = model.getMinDeviation();
                   double maxDeviation = model.getMaxDeviation();
                   int numCols = model.getNumDeviationCategories();
                   double colDeviationIncrement = (maxDeviation - minDeviation) / (numCols-1);
                   Format percentFormat = DecimalFormat.getPercentInstance();
                   for (int col=0; col<numCols; col++) {
                        String colTitle = percentFormat.format(minDeviation + col*colDeviationIncrement);
                        columns.get(col).setText(colTitle);
              @Override
              public void numDeviationCategoriesChanged(DataEvent event) {
                   buildItems();
                   buildColumns();
              @Override
              public void numRowsChanged(DataEvent event) {
                   buildItems();
    }To test this out, I have a simple UI for changing the range of "deviations" displayed, the number of columns, and the number of rows. The controller for the UI simply instantiates a DataModel and passes calls to it when the user changes these values. In real life, of course, the changes to the data model could come from anywhere - likely from polling a server or server push. The UI also contains the TableView, retrieves the columns and items from it, and passes those, along with the data model to a TableDataModel which ties it all together. This isn't really part of the infrastructure, but for completeness here's the controller:
    Controller.java
    public class Controller {
         @FXML private TableView<List<String>> tableView ;
         @FXML private TextField minDevTF ;
         @FXML private TextField maxDevTF ;
         @FXML private TextField numColsTF ;
         @FXML private TextField numRowsTF ;
         @FXML private Button minDevIncButton ;
         @FXML private Button minDevDecButton ;
         @FXML private Button maxDevIncButton ;
         @FXML private Button maxDevDecButton ;
         @FXML private Button numColsIncButton ;
         @FXML private Button numColsDecButton ;
         @FXML private Button numRowsIncButton ;
         @FXML private Button numRowsDecButton ;
         private DataModel model ;
         public void initialize() {
              model = new DataModel(0.8, 1.2, 5, 6);
              final TableDataModel tableModel = new TableDataModel(model, tableView.getColumns(), tableView.getItems());
              model.addDataListener(new DataListener() {
                   @Override
                   public void deviationRangeChanged(DataEvent event) {
                        if (model.getMaxDeviation() - model.getMinDeviation() <= 0.01) {
                             minDevIncButton.setDisable(true);
                             maxDevDecButton.setDisable(true);
                        } else {
                             minDevIncButton.setDisable(false);
                             maxDevDecButton.setDisable(false);
                        Format percentFormat = DecimalFormat.getPercentInstance();
                        minDevTF.setText(percentFormat.format(model.getMinDeviation()));
                        maxDevTF.setText(percentFormat.format(model.getMaxDeviation()));
                   @Override
                   public void numDeviationCategoriesChanged(DataEvent event) {
                        numColsDecButton.setDisable(model.getNumDeviationCategories() <= 2);
                        numColsTF.setText(Integer.toString(model.getNumDeviationCategories()));
                   @Override
                   public void numRowsChanged(DataEvent event) {
                        numRowsDecButton.setDisable(model.getNumRows() <= 2);
                        numRowsTF.setText(Integer.toString(model.getNumRows()));
              Format percentFormat = DecimalFormat.getPercentInstance();
              minDevTF.setText(percentFormat.format(model.getMinDeviation()));
              maxDevTF.setText(percentFormat.format(model.getMaxDeviation()));
              numColsTF.setText(Integer.toString(model.getNumDeviationCategories()));
              numRowsTF.setText(Integer.toString(model.getNumRows()));
         public void decrementMinDeviation() {
              model.setMinDeviation(model.getMinDeviation() - 0.01);
         public void incrementMinDeviation() {
              model.setMinDeviation(model.getMinDeviation() + 0.01);
         public void decrementMaxDeviation() {
              model.setMaxDeviation(model.getMaxDeviation() - 0.01);
         public void incrementMaxDeviation() {
              model.setMaxDeviation(model.getMaxDeviation() + 0.01);
         public void decrementNumColumns() {
              model.setNumDeviationCategories(model.getNumDeviationCategories() - 1);
         public void incrementNumColumns() {
              model.setNumDeviationCategories(model.getNumDeviationCategories() + 1);
         public void decrementNumRows() {
              model.setNumRows(model.getNumRows() - 1);
         public void incrementNumRows() {
              model.setNumRows(model.getNumRows() + 1);
    }Here's the FXML for the UI:
    root.fxml:
    <?xml version="1.0" encoding="UTF-8"?>
    <?import javafx.scene.layout.BorderPane?>
    <?import javafx.scene.control.ScrollPane?>
    <?import javafx.scene.layout.HBox?>
    <?import javafx.scene.layout.VBox?>
    <?import javafx.scene.layout.FlowPane?>
    <?import javafx.scene.control.TextField?>
    <?import javafx.scene.control.Button?>
    <?import javafx.scene.control.Label?>
    <?import javafx.scene.control.TableView?>
    <?import javafx.scene.shape.Path?>
    <?import javafx.scene.shape.MoveTo?>
    <?import javafx.scene.shape.LineTo?>
    <?import javafx.scene.shape.ClosePath?>
    <?import javafx.scene.paint.Color?>
    <?import javafx.scene.control.ProgressIndicator?>
    <BorderPane xmlns:fx="http://javafx.com/fxml"
         fx:controller="edu.marshall.denvir.tests.gridlike.Controller">
         <top>
              <FlowPane>
                   <HBox>
                        <Label text="Min Deviation:"/>
                        <TextField fx:id="minDevTF" editable="false" />
                        <VBox>
                             <Button fx:id="minDevIncButton" prefWidth="20" prefHeight="10" minWidth="20" minHeight="10" onAction="#incrementMinDeviation">
                                  <graphic>
                                  <Path fill="BLACK">
                                       <elements>
                                            <MoveTo x="0" y="4"/>
                                            <LineTo x="2" y="0"/>
                                            <LineTo x="4" y="4"/>
                                            <ClosePath/>
                                       </elements>
                                  </Path>
                                  </graphic>                              
                             </Button>
                             <Button fx:id="minDevDecButton" prefWidth="20" prefHeight="10" minWidth="20" minHeight="10" onAction="#decrementMinDeviation">
                                  <graphic>
                                  <Path fill="BLACK">
                                       <elements>
                                            <MoveTo x="0" y="4"/>
                                            <LineTo x="2" y="0"/>
                                            <LineTo x="4" y="4"/>
                                            <ClosePath/>
                                       </elements>
                                  </Path>
                                  </graphic>                              
                             </Button>
                        </VBox>
                   </HBox>
                   <HBox>
                        <Label text="Max Deviation:" />
                        <TextField fx:id="maxDevTF" editable="false" />
                        <VBox>
                             <Button fx:id="maxDevIncButton" prefWidth="20" prefHeight="10" minWidth="20" minHeight="10"  onAction="#incrementMaxDeviation" styleClass="increment-button">
                                  <graphic>
                                  <Path fill="BLACK">
                                       <elements>
                                            <MoveTo x="0" y="4"/>
                                            <LineTo x="2" y="0"/>
                                            <LineTo x="4" y="4"/>
                                            <ClosePath/>
                                       </elements>
                                  </Path>
                                  </graphic>
                             </Button>
                             <Button fx:id="maxDevDecButton" prefWidth="20" prefHeight="10" minWidth="20" minHeight="10"  onAction="#decrementMaxDeviation">
                                  <graphic>
                                  <Path fill="BLACK">
                                       <elements>
                                            <MoveTo x="0" y="4"/>
                                            <LineTo x="2" y="0"/>
                                            <LineTo x="4" y="4"/>
                                            <ClosePath/>
                                       </elements>
                                  </Path>
                                  </graphic>
                             </Button>
                        </VBox>
                   </HBox>
                   <HBox>
                        <Label text="Number of columns:" />
                        <TextField fx:id="numColsTF" editable="false" />
                        <VBox>
                             <Button fx:id="numColsIncButton" prefWidth="20" prefHeight="10" minWidth="20" minHeight="10" onAction="#incrementNumColumns">
                                  <graphic>
                                  <Path fill="BLACK">
                                       <elements>
                                            <MoveTo x="0" y="4"/>
                                            <LineTo x="2" y="0"/>
                                            <LineTo x="4" y="4"/>
                                            <ClosePath/>
                                       </elements>
                                  </Path>
                                  </graphic>
                             </Button>
                             <Button fx:id="numColsDecButton" prefWidth="20" prefHeight="10" minWidth="20" minHeight="10" onAction="#decrementNumColumns">
                                  <graphic>
                                  <Path fill="BLACK">
                                       <elements>
                                            <MoveTo x="0" y="4"/>
                                            <LineTo x="2" y="0"/>
                                            <LineTo x="4" y="4"/>
                                            <ClosePath/>
                                       </elements>
                                  </Path>
                                  </graphic>
                             </Button>
                        </VBox>
                   </HBox>
                   <HBox>
                        <Label text="Number of Rows:" />
                        <TextField fx:id="numRowsTF" editable="false" />
                        <VBox>
                             <Button fx:id="numRowsIncButton" prefWidth="20" prefHeight="10" minWidth="20" minHeight="10"  onAction="#incrementNumRows">
                                  <graphic>
                                  <Path fill="BLACK">
                                       <elements>
                                            <MoveTo x="0" y="4"/>
                                            <LineTo x="2" y="0"/>
                                            <LineTo x="4" y="4"/>
                                            <ClosePath/>
                                       </elements>
                                  </Path>
                                  </graphic>
                             </Button>
                             <Button fx:id="numRowsDecButton" prefWidth="20" prefHeight="10" minWidth="20" minHeight="10" onAction="#decrementNumRows">
                                  <graphic>
                                  <Path fill="BLACK">
                                       <elements>
                                            <MoveTo x="0" y="4"/>
                                            <LineTo x="2" y="0"/>
                                            <LineTo x="4" y="4"/>
                                            <ClosePath/>
                                       </elements>
                                  </Path>
                                  </graphic>
                             </Button>
                        </VBox>
                   </HBox>
              </FlowPane>
         </top>
         <center>
                   <TableView fx:id="tableView"/>
         </center>
    </BorderPane>and finally the test driver:
    Gridlike.java:
    public class Gridlike extends Application {
         @Override
         public void start(Stage primaryStage) throws Exception {
              Parent root = FXMLLoader.load(getClass().getResource("root.fxml"));
              Scene scene = new Scene(root, 600, 400);
              primaryStage.setScene(scene);
              primaryStage.sizeToScene();
              primaryStage.show();
         public static void main(String[] args) {
              launch(args);
    }So that seems to me not to be too bad. Obviously in the real world there's likely to be way more functionality in the data model and table data model implementations, but the structure is pretty clean and it should integrate pretty nicely with existing structures without much effort.
    One thing I don't like is having to pass the ObservableLists to the TableDataModel. I'd prefer the TableDataModel simply to instantiate it's own lists and expose them, the way it is seems like too much strong couple from the model to the view. The problem is that the TableView only exposes ObservableLists. If it exposed ListPropertys, then those properties could just be bound to arbitrary list properties (or observable lists) exposed by a TableDataModel, which I think would be a bit cleaner.
    In terms of having APIs for binding directly from TableViews to JDBC code, or similar, I think that would be nice but is probably a bit unrealistic at this stage. What happened in the web app world was that this kind of functionality was implemented by third party frameworks, and only after the use cases had really settled down did Sun/Oracle provide standard implementations (JPA and JSF, depending on what you're looking for). I don't think we'll have to wait as long as we waited for those, but I'd guess it will be a while.
    The row headers, however, would be pretty nice, and it seems those could be fairly easily added to the TableView API. It shouldn't be too hard to create a column for them and style it so it looks different, but it would mess with the cleanliness of the data model.
    Just my $0.02 worth...

  • Flash 2.0 Datagrid component bug ?

    Recently I found a bug in Datagrid component. The swf file
    which contain datagrid act differely in IE 6, and IE 7.
    This is what I've done:
    1) Compile swf, export it together with html file.
    2) Run the html file
    3)Press on one of the cell,drag it and then release it
    outside of the browser/flash canvas.
    4)Move the mouse pointer back to flash canvas
    5)The grid will scroll automatically( move the move up and
    down to test)
    6)After a few times mouse pointer movement, suddenly IE
    crash, CPU usage 100%
    I have tested the swf file on firefox 2.007 and stand alone
    flash player, however, none of the flash player have this bug.
    Therefore I suspect that the ActiveX flash plugin for IE cause this
    bug.
    This is the source code, which I use to create the datagrid
    for testing.
    ps: open one fla file, drag datagrid component from component
    panel to the stage or it will not run.
    import mx.controls.DataGrid;
    var header = "Stock Code/\nName,Type,Status,Order
    Date\nTime,Duration,OrderQty/\nPrice,Matched Qty/\nPrice,Trd
    Curr/\nMatched Value,Account No/\nOrder No";
    var wid =
    "90,43.2699356842522,91.5969497381748,87.4747020181826,60.4473499934867,67.9851014914014, 90.2231829093762,111.8984058876167,134.104372277509";
    var alig = "left ,left, left , left , left , right , right ,
    right , left ";
    var halig = "center ,center,center , center , center , center
    , center , center , center ";
    var fxdata:Array = new Array();
    fxdata[0]= new Array("67676
    GPACKET","Buy","Expired","05/09/2007 06:04:20 PM","Day","200
    4.34","0 0.00","MYR 0.00","423423423432");
    fxdata[1]= new Array("054066
    FASTRAK","Buy","Expired","05/09/2007 01:45:18 PM","Day","47,900
    0.27","0 0.00","MYR 0.00","fdsfsdfsdf");
    fxdata[2]= new Array("737013
    HUBLINE","Sell","Expired","05/09/2007 11:53:19 AM","Day","400
    0.69","0 0.00","MYR 0.00","93743");
    fxdata[3]= new Array("31474
    L&G","Buy","Expired","03/09/2007 11:35:35 AM","Day","500
    0.70","0 0.00","MYR 0.00","389dskjfsd");
    fxdata[4]= new Array("38182
    GENTING","Buy","Expired","28/08/2007 11:38:59 AM","Day","500
    7.35","0 0.00","MYR 0.00","90sklsdakl");
    fxdata[5]= new Array("05005
    PALETTE","Buy","Expired","28/08/2007 11:08:23 AM","Day","500
    0.115","0 0.00","MYR 0.00","jsdaflk;as");
    fxdata[6]= new Array("093082
    GPACKET","Buy","Expired","27/08/2007 03:49:43 PM","Day","300
    3.82","0 0.00","MYR 0.00","jsdafj;sda");
    fxdata[7]= new Array("644769
    KELADI","Buy","Expired","27/08/2007 11:05:36 AM","Day","10,000
    0.30","0 0.00","MYR 0.00","jsadjf;lkdas");
    fxdata[8]= new Array("676653
    KASSETS","Buy","Expired","24/08/2007 06:15:33 PM","Day","500
    2.93","0 0.00","MYR 0.00","jlsdf;adas");
    fxdata[9]= new Array("473323
    JAKS","Buy","Expired","23/08/2007 04:45:03 PM","Day","100 0.915","0
    0.00","MYR 0.00","jjkljsdlfasd");
    fxdata[10]= new Array("03069
    IPOWER","Buy","Expired","22/08/2007 10:18:01 AM","Day","9,800
    0.365","0 0.00","MYR 0.00","jlajsd;lfjads");
    fxdata[11]= new Array("05025
    LNGRES","Buy","Expired","21/08/2007 03:08:06 PM","Day","9,900
    0.28","0 0.00","MYR 0.00","jlkjsdafl");
    fxdata[12]= new Array("01308 N2N","Buy","Expired","21/08/2007
    10:34:51 AM","Day","200 1.71","0 0.00","MYR 0.00","mjkjadsflasd");
    fxdata[13]= new Array("70069
    IPOWER","Buy","Cancelled","21/08/2007 10:02:08 AM","Day","0
    0.37","0 0.00","MYR 0.00","jkjasd;fsda");
    fxdata[14]= new Array("03069
    IPOWER","Buy","Cancelled","20/08/2007 07:20:54 PM","Day","0
    0.38","0 0.00","MYR 0.00","jkjsdlkfjsdaf");
    fxdata[15]= new Array("12651
    MRCB","Buy","Replaced","20/08/2007 05:31:59 PM","Day","900 2.35","0
    0.00","MYR 0.00","upuewoirwe");
    var mdtgrid:DataGrid;
    _root.createEmptyMovieClip("displayobj1",
    _root.getNextHighestDepth(),{_x:0,_y:0});
    initial();
    function initial(){
    _root.mdtgrid =
    _root.createClassObject(mx.controls.DataGrid, "xxx",
    _root.getNextHighestDepth());
    _root.mdtgrid.doLater(_root,"setData");
    function setData(){ //insert data to datagrid
    var temp:Array = new Array();
    for (var i in _root.fxdata){
    temp
    = new Object();
    for (var j in _root.fxdata){
    temp
    [j] = _root.fxdata[j];
    _root.mdtgrid.dataProvider =temp;
    _root.mdtgrid.doLater(_root,"setdgStyle");
    function setdgStyle(){
    var rowhight = 40;
    var noofrow = 8;
    var headerheight = 35;
    var gridheight = (rowhight * noofrow) + headerheight ;
    _root.mdtgrid.setSize(800, gridheight);
    _root.mdtgrid.rowHeight =rowhight;
    _root.setHeader(_root.header.split(","));
    _root.setWidth(_root.wid.split(","));
    _root.setAlign(_root.alig.split(","));
    _root.mdtgrid.invalidate();
    function setHeader(datasource:Array){ //set header label
    var leng:Number = _root.mdtgrid.columnCount;
    var sleng:Number = datasource.length;
    var temp:Object;
    for (i =0 ;i<leng;i++){
    if (i>=sleng){
    break;
    _root.mdtgrid.getColumnAt(i).headerText = datasource
    function setWidth(datasource:Array){ //set columns width
    var leng:Number = _root.mdtgrid.columnCount;
    var sleng:Number = datasource.length;
    var temp:Object;
    for (i =0 ;i<leng;i++){
    if (i>=sleng){
    break;
    _root.mdtgrid.getColumnAt(i).width = Number(datasource);
    function setAlign(datasource:Array){ //set Alignment
    var leng:Number = _root.mdtgrid.columnCount;
    var sleng:Number = datasource.length;
    var temp:Object;
    for (i =0 ;i<leng;i++){
    if (i>=sleng){
    break;
    temp = _root.mdtgrid.getColumnAt(i);
    temp.setStyle("textAlign",trim(datasource

    Anyone know how to fix it ?

  • Anyone have a good tutorial for an AS3-XML image gallery?

    I'm a pretty good Flash developer, but I've never worked with XML in Flash.  I'm looking for a good tutorial on creating an XML driven image gallery, but I have yet to really find anything.  Does anyone out there have a good tutorial?  Thanks!
    Jesse

    Your best bets for getting something more specific to your needs will either be to...
    - search Google using terms like "AS3 XML gallery tutorial" and "AS3 XML slideshow tutorial"
    - take one fairly complicated tutorial and learn how it works down to understanding each element of what is being done.  Once you a proper level of understanding you should be able to reason out how to create one of your own with whatever different features you prefer

  • Passing Arrays to the DataGrid Component

    How's it going my peoples? I'm having some difficulties
    passing Arrays into a DataGrid Component. It just doesnt seem to
    work for me. Anyone have any ideas on the best way of doing this?
    Thank you in advance.

    We have Our site build using odp.net but suddenly it stoped working on the production server. MS Provider is working fine in that case. so we want to have one copy of solution with MS provider as backup copy so in future if any failure occurs to odp.net we can use this copy. So for that I need to know how to pass arrays to oracle using MS Provider.
    Regards,
    Suresh

  • I can't save Process Component Interaction Model

    Hello together,
    unfortunatly I have a big problem to save a process component interaction model. Sometimes it works and sometimes I get the error message (there is no special behaviour to get that error):
    "Save operation is not possible. Internal error: An item in the database has already been deleted."
    What item is deleted? What does that error message mean?
    Thanks for your ideas.
    Regards,
    Yvonne

    Make sure you're not trying to save to the cloud.  Have a look on here for this error and you'll see it's quite common
    It could be when your Mac is trying to sync with the cloud.  Turn this off and see if it fixes your issue
    Everytime I try to save a document in .pages it tells me: The file “Untitled.pages” couldn’t be opened.  All I want to do is save it.. not open it.. help! Any ideas??

  • Process Component Interaction Model to Configuration

    Hi,
    I've developped several interfaces by using Process integration scenarios . Now I want to use a Process Component Interaction Model as the starting point. The documentation describes how to build the different models but I don't find anything on how to go from your Process Component interaction model all the way to a configured scenario.
    I suppose, you drill down all the elements and create the different design objects but I would like to actually have some documentation guiding me through it the first time.
    Is there anything out there ???
    The help seems to be still geared towards the PIScenario of previous versions.
    Also, has anyone found a good book regarding modeling in PI other than interface patterns and the B2B book... everything I find seems to be for older versions .
    Thanks.
    Thierry

    Did you ever resolve this issue?  I am facing exactly the same issue and have the same question.

  • I can't see XML DB component trying to install it in database 9i

    Hi
    We are trying to install APEX on our old database 9.2.0.4 (patched to 9.2.0.8).
    APEX install requires XML DB component in database, but we're pretty sure that it's not installed
    (there is no user XDB and 'select comp_name from dba_registry' doesn't show signal of that component).
    Original CDs are lost, so we downloaded from e-Delivery the following files:
    B14882-01
    B14883-01
    B14884-01
    But when we go to Universal Installer, XML DB component is not shown in installed/not-intalled list.
    Our box is an ORACLE UNBREAKABLE LINUX Enterprise 4.5 x86-64 bits
    Does this component have another name?
    How do we install XML DB component?
    Thanks in advance
    Oscar

    Hi,
    Check the following link will help you
    http://lbdwww.epfl.ch/f/teaching/courses/oracle9i/appdev.920/a96620/appaman.htm
    Or
    check the following note:
    https://metalink2.oracle.com/metalink/plsql/f?p=130:14:7431989769142239402::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,243554.1,1,1,1,helvetica
    XML FAQ's
    https://metalink2.oracle.com/metalink/plsql/f?p=130:14:7431989769142239402::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,416132.1,1,0,1,helvetica
    Regards,
    Taj
    Edited by: Mohammed Taj on Jul 11, 2009 8:43 PM
    Edited by: Mohammed Taj on Jul 11, 2009 8:48 PM

  • Can any one have link where datagrid component

    can any one have link where datagrid component, ACTUALLY I
    WANT HERE that i have rendered checkbox component in datagrid &
    delete multiple rows of datagrid help?

    Hi Sairam, what do you want to do?
    1) You can to change language vendor in transaction xk02 with the vendor number and on Address screen you go to Communication tab and change the language there.
    2) You can put the currency of vendor on Purchasing data screen in the same transaction
    I wish that this information help you
    Rose

  • Newbie: Problem populating DataGrid from CF created xml

    Hi,
    I'm new to Flex and I'm working my way through the chapter 'Using HTTPService components' so I can populate a DataGrid from CF created xml.
    The Document on Live docs works only partially for me - ColdFusion section under (http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_2.html#195458).
    The insert part works and I'm able to write to the database without a problem, but the DataGrid is not being populated and stays empty? I'm working locally, so there shouldn't be any cross-domain issue?
    Hope someone is able to point into the right direction.
    Thanks.

    Use the debugger and see if any data is received from the server on request ( I'm assuming that somewhere, you are making a request to the server that should read some data ). If data is received then you are not populating the DataGrid correctly ( most likely you are not giving the correct path to the elements that should appear in the DataGrid ); else, the server-side script is not reading any data and you should check why.

  • Custom Sort (by date) in a DataGrid component

    So I've got a data grid component hooked up to a data provider like so:
    var weekData:XML=// some xml loaded in earlier....
    var weekGrid:DataGrid=new DataGrid();
    var dataProvider:DataProvider=new DataProvider();
    for each(var entry:XML in weekData){
         dp.addItem({event:entry.title,date:FormatDate.format(new Date(entry.@startDate),5),data:entry.@startDate});
    The title column is just what you might think. The date colum is actually a format like May 2012 or Feb 2013. And the data "column" isn't actually shown in the dataGrid it is the "key" for sorting by date. It contains the getTime() value of the date like 1328515200000. So that will make date sorting just a case of Array.NUMERIC with the appropriate Array.DESCENDING when needed.
    I've found that if I do this:
    weekGrid.dataProvider.sortOn("data",Array.NUMERIC)
    weekGrid.invalidate();
    it works and the grid is sorted -- IF I have some other button to click to cause that code to run.
    I want to tie it together with the click event on the grid header. Thusly:
    weekGrid.addEventListener(DataGridEvent.HEADER_RELEASE,sortDataGrid);
    And I've getting the event and all, but evidently that is fireing off the built-in sorting which happens after mine. And it doesn't do what I want.
    Any idea how to stop that and allow my perferred sorting to take place?

    if you don't want the user to sort your datagrid, use:
    weekGrid.sortableColumns = false;
    and execute your sort without clicking anything.  or use:
    weekGrid.addEventListener(DataGridEvent.HEADER_RELEASE,sortDataGrid);
    function sortDataGrid(e:DataGridEvent):void{
        setTimeout(sortF,100);
    function sortF():void{
        weekGrid.dataProvider.sortOn("data",Array.NUMERIC)

  • Prebleme avec datagrid component dropdownlist  et update dababase

    Bonjour,
    je travaille avec j2ee/flex.j'ai realisé une datagrid qui est remplie pas des données depuis la base de données et qui contient de plus un DataGridColumn ou j'ai definitun component DropDownList.ce component est rempli depuis la base de données aussi grace au script et l'ensemble declaration des services.le probleme et que je dois affecter a chaque persoonnele une academie choisie depuis le component drop DropDownListet l'enrigistrer dans la base de donné.voici mon code:
    <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:services="services.*" xmlns:skins="arcade.skins.*" > <fx:Style source="projet2.css"/> <fx:Script> <![CDATA[ import mx.controls.Alert; import mx.events.FlexEvent;  import spark.events.IndexChangeEvent;     protected function dataGrid_creationCompleteHandler(event:FlexEvent):void { listePersoResult.token = personnelServiceImpl.listePerso(); }     ]]> </fx:Script> <fx:Declarations> <s:CallResponder id="listePersoResult"/> <services:PersonnelServiceImpl id="personnelServiceImpl" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"> <services:channelSet> <s:ChannelSet> <s:AMFChannel uri="htttp://localhost:8080/GENIE1/messagebroker/amf"/> </s:ChannelSet> </services:channelSet> </services:PersonnelServiceImpl>     </fx:Declarations> <mx:DataGrid x="10" y="37" id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{listePersoResult.lastResult}"> <mx:columns> <mx:DataGridColumn headerText="iduser" dataField="iduser"/> <mx:DataGridColumn headerText="prenomPers" dataField="prenomPers"/> <mx:DataGridColumn headerText="idPer" dataField="idPer"/> <mx:DataGridColumn headerText="Academie"> <mx:itemRenderer> <fx:Component> <mx:HBox> <fx:Script> <![CDATA[ import mx.controls.Alert; import mx.events.FlexEvent; import spark.events.IndexChangeEvent; protected function dropDownList_creationCompleteHandler(event:FlexEvent):void { listeAcademieResult.token = academieServiceImpl.listeAcademie(); }  ]]> </fx:Script>  <fx:Declarations> <services:AcademieServiceImpl id="academieServiceImpl" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"> <services:channelSet> <s:ChannelSet> <s:AMFChannel uri="htttp://localhost:8080/GENIE1/messagebroker/amf"/> </s:ChannelSet> </services:channelSet> </services:AcademieServiceImpl>  <s:CallResponder id="listeAcademieResult"/> </fx:Declarations>   <s:DropDownList x="108" y="224" id="dropDownList" creationComplete="dropDownList_creationCompleteHandler(event)" labelField="intituleAcad"> <s:AsyncListView list="{listeAcademieResult.lastResult}"/> </s:DropDownList> </mx:HBox> </fx:Component> </mx:itemRenderer> </mx:DataGridColumn> </mx:columns> </mx:DataGrid>  </s:Application>
    le probleme est ou definir mon bouton et comment mettre a jour ma base de donnée en cliquant sur ce bouton avec l'ensembe des valeurs selectionnés dans le dropdownlist.j'utilise hubernate et spring.

  • How to Post Xml data into interactive form in web dynpro

    Hi,
    I want to be creating the xml source for web dynpro programatically.
    This is because my adobe form is highly dynamic where even the kind of ui elements and the position is decided at runtime.
    It is a highly interactive chart which I am planning.
    I want to then bind this dynamically generated xml to the pdf.
    Let me know your ideas.
    Thanks,
    Harish

    Conclusion from my point of view:
    1) You cannot have this thing interactive if you want to work with all the features of OM, if you want to cover all the details. In that case you need to create some tool for drawing the pictures for you and then only send the picture into the form. If anybody would like to do the changes you would add the table at the bottom of the page where a guy can say something like "chair A move under the big banana B" or "fire Mr. C, remove the position of Mr. C". That is probably the thing I would go for
    2) I am afraid you or your employer do not understand how the Adobe forms work. This is possible, but as I said before, that would be a nightmare for the developer (I cannot tell the price, would start with like 20 MDs).
    3) If you would like to mimic some existing solution and don´t want to buy that, then it´s ok for me. But don´t try to re-create the existing .NET or Java stuff in ABAP. I am skilled Java programmer and I can tell the freedom and the speed of the development is quite different. If the customer/ boss insist on developing such thing, use WEB development, go for PURE JAVA (I would go this way), use Java Connector in a JSP/ J2EE stuff and then incorporate the result into the portal.
    Hope that clarifies the problem a little,
    regards Otto

Maybe you are looking for