Search Results

Search found 6941 results on 278 pages for 'drupal views'.

Page 94/278 | < Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >

  • ASP.NET MVC Areas Application Using Multiple Projects

    - by harrisonmeister
    Hi I have been following this tutorial: http://msdn.microsoft.com/en-us/library/ee307987(VS.100).aspx#registering_routes_in_account_and_store_areas and have an application (a bit more complex) like this set up. All the areas are working fine, however I have noticed that if I change the project name of the Accounts project to say Areas.Accounts, that it wont find any of my views within the accounts project due to the Area name not being the same as the project name e.g. the accounts routes.cs file still has this: public override string AreaName { get { return "Accounts"; } } Does anyone know why I would have to change it to this: public override string AreaName { // Needs to match the project name? get { return "Areas.Accounts"; } } for my views in the accounts project to work? I would really like the AreaName to still be Accounts, but for ASP.net MVC to look in the "Views\Areas\Areas.Accounts\" folder when its all munged into one project, rather than trying to find it within "View\Areas\Accounts\" Thanks Mark

    Read the article

  • How to integrate KVC in MVC?

    - by Paperflyer
    So I have an MVC-application in Cocoa. There are some custom views, a controller and a model. Of course, the views need to know some stuff, so they get their data from the controller. However, they do not use accessors in the controller, they use KVC with a keypath that calls right through to the model: // In view.m time = [timeSource valueForKeyPath:@"theModel.currentTime"]; // timeSource is a pseudo-delegate of the view that holds the controller This simplifies things a great deal and technically, the views still don't know the model in person (that is, in pointer). But of course, they access it directly. Is that a usual (or at least sensible) usage of KVC and MVC? Or how would you implement this kind of communication?

    Read the article

  • UIViewAnimationTransition and landscape

    - by moor
    Hi! I'm having a problem with UIViewAnimationTransitionCurlUp and landscape mode. In my landscape application I have a view controller that manages two fullscreen views. In the controller I have a container view for the transitions. To switch between the two views, I use a curled transition but the animation is performed as if it were in portrait mode. I have setted the UIDeviceOrientation in info.plist, also the supported orientations to both landscape right and left. The controller returns true in shouldAutorotateToInterfaceOrientation only for landscape right and left. I have also tried to start the controller and views with 480 width and 320 height manually. I dont know where is the problema and dont know what else to try. Could someone help me? Thank you!

    Read the article

  • Multiple skins in ASP.NET MVC using StringTemplate

    - by Jamie
    I am considering the StringTemplate view engine for my ASP.NET MVC application. This application will be built with one skin, but I then expect many more, often very similar skins to be developed for it. This is primiarly the reason for my choice of StringTemplate as the view engine, as there will be zero logic in the views. In my head, I envisaged having each skin in a directory under the 'Views' directory in the folder structure, then maintaining a data structure which maps hostnames to skin directories. An obvious disadvantage of this approach is that I will have to explicitly specify my view files - an alternative might be to hack the implementation of the View() method to change the /views/controller/action standard path and insert an extra layer. Is anyone aware of any examples of implementations along these lines using ASP.NET MVC and StringTemplate at present? Can anyone forsee any potential problems with my approach? Thanks in advance.

    Read the article

  • MKMapView doesn't want to call didAddAnnotationViews method

    - by TheLearner
    I am writing a little map kit app but it doesn't want to call the delegate method didaddannotationviews: (void)mapView:(MKMapView *)mv didAddAnnotationViews:(NSArray *)views { //Get the first MKAnnotationView from the views returned MKAnnotationView *annotationView = [views objectAtIndex:0]; //Get the annotation from the first annotation view and save it in a variable which can hold any object as long as it implements mkannotation id <MKAnnotation> mp = [annotationView annotation]; //Create a region MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance([mp coordinate], 250, 250); //As the mapview to animate i.e. display the region [mv setRegion:region animated:YES]; } @interface WhereAmIAppDelegate : NSObject { UIWindow *window; CLLocationManager *locationManager; IBOutlet MKMapView *mapView; IBOutlet UIActivityIndicatorView *activityIndicator; IBOutlet UITextField *locationTitleField; }

    Read the article

  • Why is the unit test useful when the view is not unit testable in MVVM?

    - by BigTiger
    Why is the unit test useful when the view is not unit testable in MVVM? In MVVM, we have the models, view-models, and views. The claimed advantage is that MVVM can make the models and view=models unit testable. But all the three parties belong to the same application. If the views are not unit testable, why test the other two? Will unit testing the other two and leave one not tested improve the quality? Removing all the code-behind from the views sounds weird to me. How about the code-behind only handles the pure UI operations?

    Read the article

  • Running a custom VirtualPathProvider with a PreCompiled website

    - by epilog
    Hi, currently I have a custom VirtualPathProvider in a Asp.net MVC web application. This VirtualPathProvider checks the Area from the route "/{Area}/{Controller}/..." and uses the NameSpace.{Area}.Main.dll module to return the views that are contained in that assembly as Embedded Resources. This works great and I don't have to deploy any ascx, js, css files. Now my problem is this: I would like to precompile the aspx and ascx files in the assembly and instead of having the views as embedded resources I would have the view class with all the Response.Write and dings and dongs. I can precompile the views using the aspnet_compiler but I keep getting an error when ever the ViewEngine tries to find the view and fails. My main goal is to have a way for the first time usage of a certain view/usercontrol would be faster and don't wait for the compilation to happen. This is a requirement since the application could be grouped into plugins and this plugins be deployed into the Bin directory. Any thoughts? With best regards Carlos Sobrinho

    Read the article

  • Django simple syndication example gives: ImportError, cannot import name Feed

    - by AP257
    I'm trying to set up the simple syndication example from the Django docs, in a working project. But I'm getting an ImportError, even though I'm sure I've copied the example exactly. Here's what I have in feeds.py: from django.contrib.syndication.views import Feed class LatestEntriesFeed(Feed): # etc And here's what I have in urls.py: from election.feeds import LatestEntriesFeed #... further down, at the appropriate line... # RSS feed (r'^feed/$', LatestEntriesFeed()), But Django says it can't import the Feed class from django.contrib.syndication.views: ImportError at /feed/ cannot import name Feed ....feeds.py in <module> from django.contrib.syndication.views import Feed Any ideas? I'm baffled!

    Read the article

  • Displaying most popular posts on my blog - Ruby on Rails

    - by bgadoci
    I have created a simple blog application using Ruby on Rails, both of which I am new to. I am trying to get my most 'voted' posts to display in my /views/posts/index.html.erb view. Here are the basics. I have created a votes table and successfully allow a user to 'vote' for a post on the /views/posts/show.html.erb page. When they vote, it passes '1' to the votes table and I return the vote count via ajax to the same show page. Vote belongs_to :post and Post has_many :votes. I would like to display in /views/posts/index.html.erb the post title and the amount of times it has been voted for, ordered by posts with the highest vote count. Any ideas on how to do this?

    Read the article

  • advise how to implement a code generator for asp.NET mvc 2

    - by loviji
    Hello, I would like your advice about how best to solve my problem. In a Web server is running. NET Framework 4.0. Whatever the methods and technologies you would advise me. applications built on the basis Asp.NET MVC 2. I have a database table in MS SQL Server. For each database, I must implement the interface for viewing, editing, and deleting. So code generator must generate model, controller and views.. Generation should happen after clicking on the button. as model I use .NET Entity Framework. Now, I need to generate controllers and views. So if i have a table with name tableN1. and below its colums: [ID] [bigint] IDENTITY(1,1) NOT NULL, [name] [nvarchar 20] NOT NULL, [fullName] [nvarchar 50] NOT NULL, [age] [int] NOT NULL [active] [bit] NULL for this table, i want to generate views and controller. thanks.

    Read the article

  • copy a versioned files in clearcase

    - by devtech
    Hi , I need a perl script using I can copy a versioned file (using extended path) to a directory . the simple copy command here does not working. here the versioned files K:\views\jah\hakgs\sr\th\test.java@@\main\branch\view\1 K:\views\jah\hakgs\sr\th\test.java@@\main\branch\view\2 K:\views\jah\hakgs\sr\th\test.java@@\main\branch\view\3 I want these files copy and stored outside the view to a directory.like the first versionned file must store in folder name 1,second file in folder 2,3rd file in 3. Is it possible to do with a perl script. Please give any suggestion.Many thanks in advance

    Read the article

  • Django template not loading properly

    - by fmsf
    Hey, When this one runs everything goes fine: (r"^newobject$", "views.myobjects.newobject"), All the CSS + JS files are properly fetched from: static/css/... static/js/... When this one runs: (r"^mybjects/(([a-z]|[A-Z]|[0-9])+)$","views.myobjects.loadobject"), All the css and JS files that are being fetched, are run trough the urlpatterns and are returning my defailt page: (r"", 'views.main.index'), This makes all my CSS and JS code to actualy be HTML. My guess is that i'm giving some noob mistake. Is there any common reason why this should happen? And how to fix it?

    Read the article

  • Rails Custom Plugin/Gem with Partials

    - by Jason
    I am writing a gem which provides helpers for views. The HTML I want to insert via the helper is complex enough that I'd rather write it in a _partial.html.erb file. How do I get the gem's view path include in the application's load_path? Note: the only gem I've found that does something like this is Devise. When a view cannot be found, Rails prints the load path which (on my machine) looks like: Missing partial sortable_nested_set/tree with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>[:html], :locale=>[:en, :en]} in view paths "/home/jason/VirtualRestaurant3/app/views", "/home/jason/.rvm/gems/ruby-1.9.2-preview3/gems/devise-1.1.rc0/app/views" How does Devise do it? My gem: http://github.com/jrmurad/SortableNestedSet Devise gem: +http://+github.com/plataformatec/devise

    Read the article

  • Django template not loading javascript and css properly due to urlpatterns

    - by fmsf
    Hey, When this one runs everything goes fine: (r"^newobject$", "views.myobjects.newobject"), All the CSS + JS files are properly fetched from: static/css/... static/js/... When this one runs: (r"^mybjects/(([a-z]|[A-Z]|[0-9])+)$","views.myobjects.loadobject"), All the css and JS files that are being fetched, are run trough the urlpatterns and are returning my defailt page: (r"", 'views.main.index'), This makes all my CSS and JS code to actualy be HTML. My guess is that i'm giving some noob mistake. Is there any common reason why this should happen? And how to fix it?

    Read the article

  • MySQL - Calculating a value from two columns in each row, using the result in a WHERE or HAVING clause

    - by taber
    I have a MySQL db schema like so: id flags views done ------------------------------- 1 2 20 0 2 66 100 0 3 25 40 0 4 30 60 0 ... thousands of rows ... I want to update all of the rows whose flags / views are = 0.2. First as a test I want to try to SELECT to see how many rows would actually get updated. I tried: SELECT flags/views AS poncho FROM mytable HAVING poncho 0.2 But this only returns like 2 rows and I know there should be a lot more than that. It seems like it's calculating the poncho value on all rows or something odd. What am I doing wrong? Thanks!

    Read the article

  • Slide in the second tab bar view by clicking on item in the first

    - by Henrik Erlandsson
    I have an app with three tabs that switch views instantaneously when the user taps them. The first view is a table view selecting which 'location type' to filter by, to only show those pins (add those annotations) to the second view, a MapView. When a table cell is clicked, it switches instantaneously to the mapview, using this code: self.tabBarController.selectedIndex=1; However, I would like to do this with a slide-in-from-right animation, like the one you get when drilling down a hierarchy of table views. I tried this: [self.navigationController pushViewController:[self.tabBarController.viewControllers objectAtIndex:1] animated:YES]; which compiles without error or warning, but does not switch views. How do I 'apply' a navigation controller 'onto' a tab bar controller? Or is there some way to select another viewcontroller and specify an animation?

    Read the article

  • Problem with passing data to view in codeigniter code.

    - by Jagira
    Hello, I have a codeigniter code that is working on local Apache installation. But it does not work on Godaddy Hosting. I have got other similar views and controllers which are working on Godaddy. Following is the code. I have pasted only relevant code. Controller: function index() { $this-load-model('Feedmodel'); $data['posts']=$this-Feedmodel-gethomedata(); $this-load-view('home',$data); } View: Total ' .$post['title'].''; ? The error that I am getting is A PHP Error was encountered Severity: Notice Message: Undefined variable: posts Filename: views/home.php Line Number: 59 A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: views/home.php Line Number: 59

    Read the article

  • In ASP.NET MVC, why can't I inherit from "MyCustomView" without specifying the full type name?

    - by Seth Petry-Johnson
    In my MVC apps I normally declare a base view type that all of my views inherit from. I get a parser error when I specify Inherits="MyView" in my Page declaration, but not if I specify Inherits="MyApp.Web.Views.MyView". Strangely enough, it also works fine if I specify Inherits="MyView<T> (where T is any valid type). Why can I specify a strongly typed view without the full type name, but not a generic view? My base view class is declared like this: namespace MyApp.Web.Views { public class MyView : MyView<object> { } public class MyView<TModel> : ViewPage<TModel> where TModel : class { } }

    Read the article

  • HTML Frameset Query

    - by sarah
    Hi I have the following code for framset display <FRAMESET ROWS="18%,*" > <FRAME SRC="./views/Title_Page.html" NAME=TITLE SCROLLING=NO MARGINHEIGHT=1 noresize="noresize"> <FRAMESET COLS="20%,*"> <FRAME SRC="./views/Navigation_Page.jsp" NAME=SIDEBAR noresize="noresize" scrolling="no"> <FRAME SRC="./views/Welcome.html" NAME=MAIN noresize="noresize"> </FRAMESET> <NOFRAMES>NOFRAMES stuff </NOFRAMES> </FRAMESET> I want to add a logout link which logges out of the app ,when i add a link in Title_Page.html it logges out only that frame but not the others,how will handle it?i want to log out completly from all the frames

    Read the article

  • django search and filter in Google App Engine

    - by alexarsh
    Hi, I'm trying to add filter and search to my site. It's exactly the same code as in another working django project. The difference is that this time I do it with app engine. my views: http://slexy.org/view/s21GMw2sh1 I have 2 problems: 1.) I get error: "'Query' object has no attribute 'all'" on line 59 in views. As I understand it's something to do with the fact that GAE queryset is different from django queryset. How can I fix that? 2.) If I have 'search' in my request.GET I also fall on line 54 in my views. This is because I can't search by Q object in GAE, I guess. How can I fix that? Thanks, Alex A.

    Read the article

  • WPF Composite - Expose EF model to all modules

    - by Tony
    Hi All, I have an application that uses WPF Composite, and I have an issue. I've got a big database that is attached to the application and I need it exposed to different modules as part of the application. What is the best way to expose my Entity Framework model to all my different modules and views inside them? Do I have one EF model or a separate one for each module and then only the tables that each module needs. The only problem being that some tables have a relationship and will have different views and those views will be in different modules. Any ideas how to resolve this?

    Read the article

  • ASP.NET MVC - separating large app

    - by marc_s
    I've been puzzled by what I consider a contradiction in terms: ASP.NET MVC claims to be furthering and supporting the "separation of concern" motto, which I find a great idea. However, it seems there's no way of separating out controllers, model or views into their own assembly, or separating areas into assemblies. With the fixed Controller, Model and View folders in your ASP.NET MVC, you're actually creating a huge hodge podge of things. Is that the separation of concerns, really?? Seems like quite the contrary to me. So what I'm wondering: how can I create an ASP.NET MVC solution that will either separate out controllers, the model, and the folders full of views, into separate assemblies? how can I put areas of ASP.NET MVC 2 into separate assemblies? or how else do you manage a large ASP.NET MVC app - which has several dozen or even over a hundred controllers, lots of model and viewmodel classes, and several hundred views?

    Read the article

  • rails 3.0.3 - ActiveRecord::Relation, undefined method error

    - by brg
    I am having this unexplained ActiveRecord::Relation, undefined method error . I don't know why, since my model association are well defined and the event table has the foreign keys for the user table. I tried using this fix but it failed: Rails 3 ActiveRecord::Relation random associations behavior event.rb class Event < ActiveRecord::Base belongs_to :user attr_accessible :event_name, :Starts_at, :finish, :tracks end user.rb class User < ActiveRecord::Base has_many :events, :dependent = :destroy attr_accessible :name, :event_attributes accepts_nested_attributes_for :events, :allow_destroy = true end schema.rb ActiveRecord::Schema.define(:version = 20101201180355) do create_table "events", :force = true do |t| t.string "event_name" t.string "tracks" t.datetime "starts_at" t.datetime "finish" t.datetime "created_at" t.datetime "updated_at" t.integer "user_id" end end error message NoMethodError in Users#index undefined method `events' for # Extracted source (around line #10): 7: <%= sortable "Tracks" % 8: 10: <% @users.events.each do |event| % 11: <% debugger % 12: 13: <%= event.starts_at % Trace of template inclusion: app/views/users/index.html.erb Rails.root: C:/rails_project1/events_manager Application Trace | Framework Trace | Full Trace app/views/users/_event_user.html.erb:10:in _app_views_users__event_user_html_erb__412443848_34308540_1390678' app/views/users/index.html.erb:7:in_app_views_users_index_html_erb___603337143_34316016_0'

    Read the article

  • Can't reach the new zend controller/view

    - by Zakaria
    Hi, I've installed Zend Studio 7.1.1 that contains 1.9 framework. For the server side, I use easyphp (very similar to wamp) When I create the project, I obviously obtain this architecture: MyProject |-- application | |-- Bootstrap.php | |-- configs | | `-- application.ini | |-- controllers | | |-- ErrorController.php | | `-- IndexController.php | |-- models | `-- views | |-- helpers | `-- scripts | |-- error | | `-- error.phtml | `-- index | `-- index.phtml |-- library |-- public | |-- .htaccess | `-- index.php `-- tests |-- application | `-- bootstrap.php |-- library | `-- bootstrap.php `-- phpunit.xml To launch the project, I enter: http://127.0.0.1/MonProjet/public/index.php But when I create a new controller (TestController.php) and the associated view (application.views/test/index.phtml) and when I enter: http://127.0.0.1/MonProjet/public/test the browser returns the error : object not found (404). although I activated the mod_rewrite LoadModule rewrite_module modules/mod_rewrite.so So, how can I set the routing mechanism to reach the new controllers and their views? Thank you very much, regards.

    Read the article

  • jQuery Sparklines: $.getJSON data can't be read

    - by Bob Jansen
    I'm trying to generate a pie graph with Sparklines but I'm running into some trouble. I can't seem to figure out what I'm doing wrong, but I feel it is a silly mistake. I'm using the following code to generate a sparkline chart in the div #traffic_bos_ss: //Display Visitor Screen Size Stats $.getJSON('models/ucp/traffic/traffic_display_bos.php', { type: 'ss', server: server, api: api, ip: ip, }, function(data) { var values = data.views; //alert(values); $('#traffic_bos_ss').sparkline(values, { type: "pie", height: "100%", tooltipFormat: 'data.screen - {{value}}', }); }); The JSON string fetched: {"screen":"1220x1080, 1620x1080, 1920x1080","views":"[2, 2, 61]"} For some reason Sparklines does not process the variable values. When I alert the variable it outputs "[2, 2, 61]". Now the jQuery code does work when I replace the snippet: var values = data.views; with var values = [2, 2, 61]; What am I doing wrong?

    Read the article

< Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >