I am trying to create a page which contains a "Form" and a "Grid". Consider a standard usecase of data filter and resulting data table below.
For creating this kind of page, I am struggling to apply my marionette knowledge.
I am sure I need a composite view for the datatable. But then how do I put rest of the content which includes another potentially composite view for the filtering form content?
I think I need a composite view containing another composite view. But that seems incorrect since composite view dictates that the itemView must repeat 'n' no of times. and here I do not have a repeating case really.
I have read through David Sulk's tutorial, Derrik's tutorials.. But could not apply their thoughts to my problem.
Can someone guide me?
--Vijay
Related
I have recently developed an odd behaviour in my views. I am trying to generate a simple view that simply lists all entered data of that content type in a table. I have stripped all bells and whistles from the view to get it working but it just won't.
When I create a new view, I can add the relevant fields for the content type, filters etc. It all works as expected. If I then save and try to create another page view for the next content type, all my fields disappear (including the original fields used in the original view). The only fields available are core fields like content:type, content:title, content:post date etc.
I have checked permissions, display values in the content type, searched extensively online. Most people's issue is the relationship hasn't been established but my view doesn't rely on a relationship, it is a simple display view.
Any help or pointers would be truly appreciated.
Thanks in advance Nelle
Drupal 7.22
Views 7.x-3.7
This is a bug in Views. See this bug report for a work-around (disable Views caching and UI Javascript).
Did you tried to remove filters from new page?
There is an important option when you use the same view to create many pages or blocks :
when you edit a field or filter, you should choose where to apply modifications (For All displays or this page (override)
I wrote my own sub-class, for some selection stuff and paging etc. But those all worked with the renderer(), which required them to return a string.
This worked fine, I created some image-tags and returned those.
But how does this class work in detail?
I want a sub-class which displays a chart in a cell, which should technically be no problem, but the renderer() doesn't seem the right place for it, since it only works for strings.
Does the Class get instantiated for every row? or is it really just one instance for a column, which methods get called for every row with the needed data and the instances don't hold any state about the rows?
The renderer() mechanism is actually implemented in Ext.grid.column.Column, for which there is one per column.
As you have mentioned, the renderer() function returns a string, which could be an HTML string (which could be rather complex - have a look at the templates used by ExtJs for the standard columns). But you cannot return a component (chart).
To the best of my knowledge (based on my own understanding and replies to similar questions), ExtJs does not offer a straight-forward way to render components within grid cells. If you really think about it - you are asking a grid for much more than its intended role. It was designed to present records per raw, with the addition of simple user interaction facilities, like checkboxes.
But what you are really asking for is more of a way to layout charts, for which problem i suggest you look into the Table layout.
Alternatively you should be able to render a chart into a dom element, which will be defined in your own custom column template. But I will consider this to be an involved task.
I am designing a Data Entry UI for a WPF application and have a scenario where I need to enter a many-many relationship.
Object A is Parent object. A has an observable collection of type Object B.
Object B has two text fields and an observable collection of Object C which has four text fields.
I need to create a UI which will allow an efficient addition of B and C.
I have created a Nested Tab Control where the outer tab control has object B and it has an inner tab control which can accommodate many object C in it.
However this UI looks ugly and non intuitive. Any suggestions on what would be a better way?
Using a grid in master-detail(-detail) mode?
Check this or this or this to bring you some ideas. Third party vendors like DevExpress and Telerik provide real good data grids and other user controls. Don't know if standard Microsoft DataGrid provides master-detail functionality. But this should give you some ideas.
We are building a Silverlight app and using PureMVC but the technology and framework probably aren't that important to this question.
We have a view that contains a grid and that grid is bound to a model. However, we have additional columns of data that we would like to display for the user but the data is derived and not stored in the model.
Where is the best place within MVC to handle this?
Any help or suggestions would greatly be appreciated!
Thanks a lot,
Bobby
Add properties to your model object for the additional columns then wire up the logic behind them in their property gets and bind them to the grid as additional columns.
From a 'patterns' approach, do not change your model (unless your model already is purposed as a ViewModel. Implement a specific view model in this case. A view model should have view logic (additional columns, code specific to the model layout, etc) a plain model should not.
I'm building an AS3.0 model for reading from an sqlite database. I've successfully got it working with a simple table. Basically I have a databasemodel class with some shared functions and from it I extend classes, theoretically for each table on the database, but also for 'views' ie combinations of data on different tables when I need to mix things up.
Some of the events have tags stored in a separate table, and I'm wondering about the best way to handle those.. should I include an array in the event class and work with it that way, or separate each tag/cluster of tags into their own class? The tags are predefined and will be edited basically in the same places as if just another property of the event. However many events are imported and can only be edited by changing the tags.