views

Drupal Front-page with views

Hello everyone) Is there a way of making front-page containing 2 views, without using panels module in Drupal 6.x? thanks ...

ASP.net MVC, display a view from another controller

Is it possible to display a view from another controller? Say for example I have a CategoriesController and a Category/NotFound.aspx view. While in the CategoriesController I can easly return View("NotFound"). Now say I have a ProductsController and an action and view to add a product. However, this action requires that we have a Cat...

MySQL Views in Navicat - How to define 'primary key'?

Often when I define a View in Navicat I receive the following message: xxx does not have a primary key. Updates to this table will be done using the following pseudo statement: UPDATE xxx SET ModifiedFieldsAndValues WHERE AllFieldsAndOldValues LIMIT 1 Obviously I only use my Views for viewing data, not updating. But this did make m...

What's the best way to update data in a table while it's in use without locking the table?

I have a table in a SQL Server 2005 Database that is used a lot. It has our product on hand availability information. We get updates every hour from our warehouse and for the past few years we've been running a routine that truncates the table and updates the information. This only takes a few seconds and has not been a problem, until no...

MVC. Strongly-typed view difference (MVC sources vs. assembly)

I'm trying to create a strongly typed partial view <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Pt.Data.Services>>" %> <table> <% foreach (Pt.Data.Services item in Model) { Html.RenderPartial("ServiceItem",item); } %> </table> in Controller IEnumerable<...

Django and Generic Views

I've written an entire app pretty successfully in Django but I have this nagging question that I think I know the answer to but I just want to make sure. One of the things I really liked about Django was the data model and the ability to not have to do "obvious" stuff. For example, we use the admin interface extensively in our app. Th...

Advanced search with Drupal (Views and CCK)

Hi. I'm building a site where products are hold in a content type created with CCK. Products can be associated with multiple taxonomy vocabularities. Now I need an advanced product search which user could use to search by many search arguments (taxonomy terms, CCK field values). I have done quite a lot googling but I haven't been able t...

Authorized View or Configure View as Authorized?

Is it best to create a separate view for authorized and unauthorized even if there will not be a lot of additional information in the authorized view? Or should there be one view and with model data adjusted accordingly? EDIT: In MVC, I believe it better to have 2 views and then use partial views for the duplicate information. agree? ...

Is this a bad way to structure my Sql Server database?

Hi folks, I have a table that contains a few columns and then 2 final (nullable) columns which are varbinary (actually, they are SQL 2008 geography types, but I want to keep this post database agnostic). I've hit around 500mb with around 200K rows. The varbinary is the problem - and I need the data. So, I was wondering if it's bad if ...

Most efficient design to search for this data in my database?

Hi folks, I have the following database tables and a view which represents that data. The tables are heirachial (if that is how u describe it) :- EDIT: I've replace my 3 tables with FAKE table names/data (for this post) because I'm under NDA to not post anything about out projects, etc. So yeah.. I don't really save people ...

Set authentication as true for the view of the control that performs the authentication in ASP.Net MVC

In the authentication control I have the following line to mark a user as authenticated in the system (after checking out the password): FormsAuth.SignIn(userName, rememberMe); and if I redirect, which is the standard behvaior, everything is ok. But if I show a view right away, the usual ways to check whether a user is authenticated: ...

[iphone] Do I need multiple controllers for a single view with different types of controls?

If I have a view with several buttons, a table, and some other controls, do I need a controller for each type (button, table, etc), or should I have one controller per view that handles all of the necessary actions? It doesn't seem a single controller is possible as they may have to inherit from different parent classes. What is the bes...

Separating two forms in the same view in ASP.Net MVC

I've merged the create account view and the log in view in the same view. So it's a view with two forms, but they get mixed when I submit. If I try to log in and there's an error that is displayed with: Html.ValidationSummary() both forms get the error. And I started to rename fields to loginPassword, createPassword, because otherwise...

Django: Add number of results

I'm displaying the number of search results, however, i do more than one search. So to display the number of results i'd have to add them up. So i've tried this: <p>Found {{ products|length + categories|length + companies|length }} results.</p> But i get an error. How do i do this? ...

What item should I create in ASP.NET MVC if I want to break a view into smaller sub-views?

I have an ASP.NET MVC application I'm building and I'm using a Master page. On this master page, I would like to further break things up by creating a separate file for "Tabs", "Header", and "Footer". What kind of view should I create to encapsulate these things to help remove clutter from my Master Page? Also, how do I reference th...

How to optimize MySQL Views

I have some querys using views, and these run a lot slower than I would expect them to given all relevant tables are indexed (and not that large anyway). I hope I can explain this: My main Query looks like this (grossly simplified) select [stuff] from orders as ord left join calc_order_status as ors on (ors.order_id = ord.id) calc_...

MS Access linked to SQL server views

Hello, we have an issue with an access database we are upgrading to use SQL Server as its data store. This particular database links to 2 sql databases, so I thought to simplify things, we have a view in the main database that linked to each table in the secondary database. That way access would only need to talk directly with one SQL...

Select date fields for only 6 months beginning with current in Drupal Views

I have a content type with a date field which can have multiple values. How can i select the dates in Views for each month separately, beginning with the current month and have table columns titled with the month names? ...

What's the cleanest way to add a class attribute to an html element in a view in rails

I'm writing some Rails code for a partial view, and I want it to only show a comment field if somebody is already logged onto a site here. If the page is viewed by someone who isn't a member of the site yet, the shared/comment_not_logged_in fragment should be passed in. However, I'm totally stumped as to why I can't run the same check ...

Switch Between Views in Cocoa (not Cocoa Touch)

It seems like there is a lot of online information regarding switching between views in Cocoa Touch, but not that many in "desktop" Cocoa. For an app I am creating, I am wondering the pros/cons of the methods (and please list the methods if you could), and which one people personally use/suggest. I don't think that using an invisible b...