I'm using a Qooxdoo table widget attached to a remote model.
Reading remote data into the table worked like charm, but since the table has some editable column, the problem is: how do I instruct the model to write those changed data to the server?
The model is defined by the book, overriding the _loadRowData and _loadRowCount methods, attached to the related *Completed handlers, just like it is described into this page.
Thanks
From what I know, the Remote model doesn't provide a way to communicate changes back to the server. Instead, you can listen for the table's "dataEdited" event. Just how you send the changes to the server of course depends on the type of backend you're using.
Related
I am using vb.net WinForms with SQL Server 2014. I have a form with various textboxes and checkboxes I am populating from the database with a BindingSource. The two tables with the relevant info are called Channel and Setup. A setup can have many channels while a channel belongs to one setup. In the setup table I have a field called CurrentSetup which indicates the active setup with a bit. I need to show info only from the channels that belong to the active setup. I tried putting "CurrentSetup='True'" on the BindingSource, but that doesn't seem to work because all my data is coming from the ChannelBindingSource which can only read the foreign key (Setup_id) from the Setup table, but can't access the rest of the table it seems.
So to sum it up, my question is how can I filter a BindingSource based on a field from a related table?
I'd add to that that I'm using the Entity Framework (6), and I've read that BindingSources aren't even the recommended way to do this, but it's the only thing I've found that seems to work so far. If I'm way off base with this, and should be doing something else I'm open to that too. I just still find BindingSources in the current (VS 2013) Microsoft documentation.
If you're using EF then you should be getting only the data you want using LINQ to Entities. It would be something like this:
Dim currentChannels = context.Channels.Where(Function(c) c.Setup.CurrentSetup)
That will then give you a list of all the Channel entities related to the Setup that has its CurrentSetup set to True.
When I try to create some entities I don't see the option to input fields. I just see the SaveEntity button.
However I can view all the existing entities.
What is very strange is - there is another entity called VideoEntity for which the create did not work yesterday but works today.
Can somebody help me with this seemingly unpredictable tool ?
Regards,
Sathya
i think the console knows what properties each entity has based on existing data, rather then your models. and the data is only updated periodically. when did you upload your app? maybe waiting a few hours will give the console time to update.
alternatively, you could use the remote api to add your entities, or write a small snippet and upload such as ...
VideoStatsEntity(app='home', ip='116.89.52.67', params='tag=20130210').put()
Writing a simple interface to the data-store to allow you to edit/create models is probably the best thing to do in this case. You know what they contain so you can adjust your interface accordingly, rather then waiting for the admin interface to "catch up" as Gwyn notes.
I believe that there are some property types that are impossible to add via the admin interface that you are using so you'll probably get to the point sooner rather then later of creating a custom interface.
The admin datastore view is good for quickly checking out the contents of the datastore, but ever tried paging through 100's of entries? Not fun.
Some days I love my dba's, and then there is today...
In a Grails app, we use the database-migration plugin (based on Liquibase) to handle migrations etc.
All works lovely.
I have been informed that there is a set of db administrative meta data that we must support on every table. This information has zero use to the app.
Now, I can easily update my models to accommodate this. But that answer is ugly.
The problem is now at each migration, Liquibase/database-migration plugin, complains about the schema and the model being out of sync.
Is there anyway to tell Liquibase (or GORM) that columns x,y,z are to be ignored?
What I am trying to avoid is changesets like this:
changeSet(author: "cwright (generated)", id: "1333733941347-5") {
dropColumn(columnName: "BUILD_MONTH", tableName: "ASSIGNMENT") }
Which tries to bring the schema back in line with the model. Being able to annotate those columns as not applying to the model would be a good thing.
Sadly, you're probably better off defining your own mapping block and taking control of the Data Mapper (what Hibernate essentially is) yourself at this point. If you need to take control of the way the database-integration plugin handles migrations, you might wanna look at the source or raise an issue on the JIRA. Naively, mapping your columns explicitly in the domain model should allow you to bypass unnecessary columns from the DB.
I have a WPF DataGrid for which data comes from a stored procedure. I want to know how can I virtualize that data?. I am using ADO.NET Entity Framework. My data in the database changes regularly and it needs to be fetched regularly through my stored procedure. Thanks in Advance.
Try to have a look at this post in order to see if it is useful to you. It is a generic solution to virtualize a collection. There is a sample too. Basically it works by proxing the data inside the collection to intercept when the UI observe the element, when it occours, a page is fetched. The only drawback is that the entity in the collection as to be declared as "proxable", so it must be public and with virtual properties.
I am building an application in Qt/QML.
I have a table view of the database (PostgreSQL).
Is there a way to dynamically refresh my table if there is any change in the database.
One no-so-efficient way to do it is to keep sending periodic SQL queries.
Is there any automatic way to keep my view refreshed?
I am open to use any other Database also if required.
Qt seems to support the NOTIFY mechanism of PostgreSQL databases. Googling for it it found some bug reports, so not sure of well implemented that is. Since I've never used it, I'll have to refer you to google.
If you use QSqlTableModel (or an editable subclass of QSqlQueryModel) with QTableView, any edits made will immediately be visible.