views

ASP.NET MVC Populating a DropDownList with a value from the view

In my controller I have this: ViewData["maskList"] = new SelectList(equipmentRepository.GetMasks(), "Id", "DisplayName"); and then I bind it to my view using <div each="var nfa in mfa.NasalFittingAssessment"> ${Html.DropDownList("NasalMaskTypeId", ViewData["maskList"] as IEnumerable<System.Web.Mvc.SelectListItem>, new { class = "...

Problem Using Partial View In for each loop

I'm a little confused here, I am trying use a partial view in a for each loop like so <% foreach (var item in (IEnumerable<MVCLD.Models.Article>)ViewData["LatestWebsites"]){%> <% Html.RenderPartial("articlelisttemaple", item); %> <% } %> And my partial view looks like this <div class="listingholders"> ...

Emulating Preference look/feel with LinearLayout

I really like the look and feel of the Preference UI items and want to replicate that in my application. Basically I've got an Activity with a couple LinearLayouts set to be focusable. When they are focused, I want them to turn green (like Preferences do). Any idea how to apply that style to my LinearLayouts? Note: The LinearLayouts ...

android: tablerow mixed with columns and multiline text

I am trying to have a tablelayout contains several tablerows. One of the rows contains 4 buttons, while the second row contains a very long text. However, the width of the button stretches with the text in the second row. Is there anyway to prevent this? http://img684.imageshack.us/i/tableview1.jpg/ http://img521.imageshack.us/i/tab...

Custom view with nib as subview doesn't seem to be loading

I've created a custom view that loads its content from a nib, like this: /* PricingDataView.h */ #import <UIKit/UIKIt.h> @interface PricingDataView : UIView { UIView *contentView; } @property (nonatomic, retain) IBOutlet UIView *contentView; @end /* PricingDataView.m */ #import "PricingDataView.h" @implementation PricingDataView ...

iPhone SDK: Switching to one view then back to previous view errors

I have a UITabBarConroller that I use to switch between 3 different views. This all works perfectly. On one of my tabs, I added a button at the to called "Add", I have added an outlet to this, as well as an IBAction method which looks like the following: // Method used to load up view where we can add a new ride - (IBAction)showAddNew...

Test Views in ASP.NET MVC2 (ala RSpec)

Hi, I am really missing heavily the ability to test Views independently of controllers. The way RSpec does it. What I want to do is to perform assertions on the rendered view (where no controller is involved!). In order to do so I should provide required Model, ViewData and maybe some details from HttpContextBase (when will we get rid ...

Manage views for content types (or add a view to multiple lists)

I'm surprised that I cannot find on the net a solution where I could manage views for content types. Do I really have to visit each task list with my browser to add/modify a view? Is there any solutions available that would allow me to just define a view for content type and thus make this view available on all lists where content type ...

How to restrict SharePoint WSS3 users to edit only fields that are in their dedicated views

Hi guys, Here is situation: There is a list with the fieds: Title, Client, Project, Description. There is a view for analysts with the fields visible: Title, Projec, Description. All is fine so far as the analysts work with their views and not with the lists. But when they need to modify the records clicking on Edit, they see and able...

Pass a variable from view to the layout's partial view

I am trying using a partial to render the application's menu, capitalizing the 'tab' using CSS, based on a local variable (tab): <%= link_to "employees", jobs_path, :class => (tab=="employees" ? "selected":"unselected") %> <a class="unselected">jobs</a> <%= link_to "tags", tags_path, :class => (tab=="tags" ? "selected":"unselected...

Drupal: create a node with employee working hours

I have a bit complicated task. 1. I need to create a node with employee working hours (it's gonna be created for all users with role "employee"), which looks like this: Monday: From __ : __ To __ : __ Tuesday: From __ : __ To __ : __ Wednesday: From __ : __ To __ : __ etc. So, I'll have to create probably 14 CCK ...

MVC 2: Html.TextBoxFor, etc. in VB.NET 2010

Hello, I have this sample ASP.NET MVC 2.0 view in C#, bound to a strongly typed model that has a first name, last name, and email: <div> First: <%= Html.TextBoxFor(i => i.FirstName) %> <%= Html.ValidationMessageFor(i => i.FirstName, "*") %> </div> <div> Last: <%= Html.TextBoxFor(i => i.LastName) %> <%= Html.ValidationMe...

How to use global view files in Zend Framework?

Hi, I am trying to use global or shared view files. Let's say I have a module in Application/Modules/default and I have "IndexController.php" inside "default/controllers" within "IndexController", I would like to render a view that is located in "Application/Views". I tried to use addScriptPath, but Zend_View tries to look "Applicati...

Drupal - Use lightbox with Views (Rel attribute) - in output link

In Drupal I have two image fields, one to act as a thumbnail and the other the image that will open when the thumbnail is clicked. The only way I could find to link the two was to use the option for "Output this field as a link" and link to the image field. This works, so when I click the thumbnail it opens the larger image however I wo...

Getting touch events from points -6,0 to 320, 470

Hi, I am just trying to program a simple drawing program. Along with drawing, I would like to know the points that I am currently touching. I am just using a window, subclassed viewController and a subclassed view.I also hid the status bar. Everything seems to work the way it is supposed to. The thing is that I can't get it to draw with...

Aliasing a route causes rails to expect paths that don't exist

ok here's some code: prompt>rails my_app prompt>cd my_app prompt>script/generate scaffold service_type title:string time_allotment:integer prompt>rake db:migrate then edit these files to look like this: #routes.rb: ActionController::Routing::Routes.draw do |map| map.resources :services, :controller => :service_types map.connect '...

Django urls conf

So now I am still at the Django tutorial part 3: http://docs.djangoproject.com/en/1.1/intro/tutorial03/#intro-tutorial03 Trying to set up the urls.py with this piece of code provided by the tutorial from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^polls/...

ASP.NET MVC View Not posting back to Post method and expecting a parameterless Constructor?

Hi, I am trying to post back some data using a viewmodel i have created and it works for me for one of the projects.But I am doin this right now public ActionResult Foo(string userkey) { vm.Value="Xvalue"; return View(vm); } [HttpPost] public ActionResult Foo( MyViewModel vm) { // process input if (inputOK) ...

How can i add a Top5 of popular items on my website?

How can i create a section on my website where i show the 5 most viewed items? I guess it's a start to use this query: SELECT TOP 5 * FROM Palace. But how can i detect the number of views and link it to the right palace? Doing the echo afterwards shouldn't give that much trouble. Thnx in advance! ...

View Controller Question

First off I'm new at programming. I'm creating an app with one navigation bar controller. The app is pretty basic except for a quiz section that is comprised of 12 xibs. As the users takes the quiz a new xib is pushed onto the stack. I want to create a button that takes the user back to the home screen if they do not want to complete...