Flex :: Pass An Edited Flex Datagrid To A CFC To Insert To A Database?
Nov 3, 2009
I have a datagrid which is editable and I need to send that back to the database via a CFC for insertion into the database after all the editing is complete. Dumping the array collection to cfdump tells me that I have an array with items and a structure but i cannot understand how to "loop" through each and insert into the DB.There seems to be very little written which actually works! My MXML and CFC are below but give me the error of "You have attempted to dereference a scalar variable of type class coldfusion.runtime.Array as a structure with members." -which is nice
[Bindable]
private var getconsent:ArrayCollection = new ArrayCollection([
{LocationName:'Service A', Contact: 'Bob Jones' },
I have two datagrids 1. OPTION GRID and 2. ELECTION GRID. I have used VBox container as itemRenderer in ELECTION GRID which consists of TextInput in Description Column. The following is the sample SWF.
Whenever the checkbox is selected in the OPTION GRID i have to add a corresponding text input with description value in the 2nd grid (ELECTION GRID) for all the rows. Suppose if two checkboxes are selected, i have to add two textinput in the 2nd grid and so on... This is working fine. But whenever if i edit the textinput and scrolled up or down, the value gets collapsed between the rows or get vanished. I suspect that the itemRenderers will be re-used for the other rows while scrolling. How to retain the edited value in textinput ?
The Election Event is a customised event which will be triggered and invoke the listener function addTextInput whenever the checkbox is selected/de-selected in OPTION GRID.
private function addTextInput(electionEvent : ElectionEvent) : void
Is their a way to retain the edited value in TextInput ?
I'm using flex to develop my first desktop app and I'm working with sqlite for the first time as well. I'm creating my database and all the tables and I would also like to add a few rows of data into a couple of the tables so that the users have some data to work with on first install.
The only problem I'm having is every time I run the program it keeps inserting the same data over and over again. I'm just wondering if its possible to do a - INSERT INTO IF NOT EXISTS. or some other kind of work around.
I have a TabNavigator, and each tab is a Module. One of the modules is labelled Units and the full code of the module is posted in this post. There are several problems:
1) Forms are not populated with data from the datagrid selection. 2) Selecting a row and clicking delete gives the very-common error: TypeError: Error #1009: Cannot access a property or method of a null object reference.
A trace on the valueObject unit within the selectionChangeHandler function gives NULL. Why? Note: In other modules (other tabs of the TabNavigator), I have DropDownLists populated with units. This means that the valueObject Unit is defined in the other modules. However, valueObjects should be private to modules, and not shared.
my application needs to allow users to insert rows below the current datagrid row. My solution is to to add a row to the dataproviders collection. This works, but the row does not appear beneath the current row the user clicked on.The Datagrid has a default sort order (date ASC), which re-orders the data...so this seems to affect the position of the row in the grid.
Is there a way to insert a horizontal line after a certain number of rows, which may be variable depending upon a property in data provider of a datagrid?
I have a small flex datagrid. The dataProvider is an xmlList. I have two columns, userList and user permissions. The user permissions column as checkboxes. The values for the checkbox are stored as 0 and 1 in mySQL. While returning it from PHP, I am converting them to true or false. Its returning the values correctly to the frontend.
But inside the itemrenderer, the checkbox is not being set to true or false. Either everything is true or everything is false.
[URL]
How can I correctly set the value of the checkboxes from the DB values?
I need to display DropDownLists in a column of a DataGrid in my Flex application. Here is what I am doing:
First, I have a item renderer function that creates a custom item renderer, and passes it a property that is an IList that will be used as the dataProvider of the dropDownList:
private function rendererFunction(item:Object):ClassFactory { var itemRenderer:ClassFactory = new ClassFactory(AudActionDropDownIR); itemRenderer.properties = {AudActionData: AudActionData};
[Code]....
First, how can I call the init function when the renderer is created? Second, when I set the column's itemRendererFunction="rendererFunction", the app will not launch, a white screen comes up. But when I set itemRenderer="components.AudActionDropDownIR", the app will launch, but of course there is no data in the dropdown list.
I have a mxml component with a datagrid listing project names and code versions. I have the selected projects from the datagrid binded to a public variable named "selectedProjects". But how to access this variable in another mxml component. I want the selected project's name in that component's text area. I even created an instance of the first component and using that called the selectedProjects variable. But I do not get the value updated in the text area.
This is the code for the first component where I get the selected projects name in a variable:
The change event seems to only throw when using the calendar pop-up. It is not thrown when the user manually types in to the field. I also tried dataChange.
I'm using an editable datagrid where the user is typing in their data. When they click outside the datagrid it doesn't show the last value they entered. The value is there and if you click on that field again it will show up. If you click outside the field for a second time, this time the value stays displayed. How can I get the value to show up the first time the datagrid looses focus?[code]
I was wondering how I apply an edited actionscript class to a component?
I've made a few changes to the TileLayout class (spark.layout.supportClasses.LayoutBase), but am unable to apply this new layout format to my group in my application... is it treated like a different tag within the layout tag?[code]...
I want to create a Flex 3 application running in Adobe Air that accesses an SQLite database and I need to keep this database in sync with an SQL server 2005 database running a website.Is this something that Flex supports or is it going to be a custom script? Also, has anybody done anything like this?
Edit: The synchronisation can be done on a daily basis rather than real time. The data will be read only from a front end perspective with a CMS to do updates on the website.
I have researched this issue all over and most people say use the .refresh() method to update a datagrid after updating or adding a new record. This does not do anything. So, my issue is this. I have a mySQL database hosted I am connecting via PHP, I have 1 mxml file and 2 php files (I know I can use just 1 but I am learning and this was easier for me to use for troubleshooting). The issue is no matter what I change on the datagrid the update does not show on the datagrid unless I close out of IE and reopen it. I can refresh or open the page in another window and the update does not show. I have to exit entirely and restart in order for any updates or additions to show.Here is my licenseTracker.mxml
I have updated the mxml code to only show the needed code for the program to run the update.
I am new to Flex and have an issue I hope you all can help me out with.
I have researched this issue all over and most people say use the .refresh() method to update a datagrid after updating or adding a new record. This does not do anything.
So, my issue is this. I have a mySQL database hosted on 000webhost.com, I am connecting via PHP, I have 1 mxml file and 2 php files (I know I can use just 1 but I am learning and this was easier for me to use for troubleshooting). The issue is no matter what I change on the datagrid the update does not show on the datagrid unless I close out of IE and reopen it. I can refresh or open the page in another window and the update does not show. I have to exit entirely and restart in order for any updates or additions to show.
I am planning on using Flash Builder 4/Flex to write an AIR application which is primarily based around recording, storing and analyzing data.I'll be creating charts etc that need to update in almost real time.It's essential to me that the application be able to function without an internet connection so I need a local database of some variety,but I would also eventually like to build in online synchronization of the data where either database can be update each other based on newer information. Moreover, some type of encryption would definitely be welcome, and speed is a large concern
Synchronization: Primarily updates/additions/deletions will be done on the offline database, but ideally I want to have a web interface that will allow the same updates/additions/deletions and will be synced (beyond that I'm not sure exactly how to do it as I can model that based on what is most achievable).I'm wondering if there's any prebuilt engine that could handle the synchronization of 2 databases. I may end up having the web interface only be for additions, which would be significantly easier to sync.. and I may start that way, but i want to build with technologies that will best allow me to implement full online crud at some point.
Here is the issue: a client wants his entire equipment inventory accessible by persons navigating to his jquery mobile site. The inventory that exists on the desktop site was, as I understood, built with Flex. Is it possible to access this database for the jquery mobile site? I believe it is. I was then given this information from someone in the know:
I am planning to develop a standalone application, which infact will be used for personal purposes. So only single user access may be there. I want to develop it in Flex. Just want some opinions from the gurus over here : Whether i should use Flex or AIR (I know only Flex, AIR i need to start learning)Which database i should use? SQLLite or HSQLDB or some other.
im trying to output my database information in a text input field in flex by using remoteObject(cfc). The information is being provided by a database using a query and an array collection. I'm just unsure how i go about taking the queried array collection information and display it into TextInput Fields.
I am writing a large flex app that has to connect to a database many times. I currently am using asp pages to connect, but I would like to use the most efficient option. What do you think is the best way to connect to a database from a flex app?
I have a function that inserts data into a SQLite database. I can manually add data using
sqlStatement.text = "INSERT INTO users (First_Name, Last_Name) VALUES ('John', 'Doe')";
This works perfectly. Now I am trying to insert the data from a variable instead. I can trace my variable from this function- trace(Main._firstName); //returns John, but when I insert it using this:
I am completely new to Flash and actionscript.I have a small project which requires me to submit details into a MS Access Database. I have created an asp scrip to do the same but it doesnt seem to be working. I am posting the code.
I have a quiz game that i have finish. in this game have a finish button. if the finish button clicked the score from the quiz want to insert into mysql database.
I am trying to access a .Net service which requires an authentication header. If WebService is used it works fine. But when it is accessed using HTTPService it throws error. The project is already done by somebody else using HTTPService. Now changing to webService requires some time since there needs to be modification in a lot of files.
Below is the SOAP envelop required by the service.