Search Results

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

Page 164/278 | < Previous Page | 160 161 162 163 164 165 166 167 168 169 170 171  | Next Page >

  • trying to create a asp.net mvc viewpage w/o codebehind page

    - by mrblah
    Hi, Trying to create a view page in my asp.net-mvc app. I have a strongly typed view, and I have also ovverriden the MVCPage class also. For some reason when I load the page it says it can't load the type: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Line 2: Inherits="Blah.MyViewPage<Blah.ViewDataForBLahPage>" %> public class MyViewPage<TViewData> : ViewPage<TViewData> where TViewData : class public class ViewDataForBlahPage : MyViewData

    Read the article

  • WPF MVVM: Convention over Configuration for ResourceDictionary ?

    - by Jeffrey Knight
    Update In the wiki spirit of StackOverflow, here's an update: I spiked Joe White's IValueConverter suggestion below. It works like a charm. I've written a "quickstart" example of this that automates the mapping of ViewModels-Views using some cheap string replacement. If no View is found to represent the ViewModel, it defaults to an "Under Construction" page. I'm dubbing this approach "WPF MVVM White" since it was Joe White's idea. Here are a couple screenshots. The first image is a case of "[SomeControlName]ViewModel" has a corresponding "[SomeControlName]View", based on pure naming convention. The second is a case where the ModelView doesn't have any views to represent it. No more ResourceDictionaries with long ViewModel to View mappings. It's pure naming convention now. I'm hosting a download of the project here: http://rootsilver.com/files/Mvvm.White.Quickstart.zip I'll follow up with a longer blog post walk through. Original Post I read Josh Smith's fantastic MSDN article on WPF MVVM over the weekend. It's destined to be a cult classic. It took me a while to wrap my head around the magic of asking WPF to render the ViewModel. It's like saying "Here's a class, WPF. Go figure out which UI to use to present it." For those who missed this magic, WPF can do this by looking up the View for ModelView in the ResourceDictionary mapping and pulling out the corresponding View. (Scroll down to Figure 10 Supplying a View ). The first thing that jumps out at me immediately is that there's already a strong naming convention of: classNameView ("View" suffix) classNameViewModel ("ViewModel" suffix) My question is: Since the ResourceDictionary can be manipulated programatically, I"m wondering if anyone has managed to Regex.Replace the whole thing away, so the lookup is automatic, and any new View/ViewModels get resolved by virtue of their naming convention? [Edit] What I'm imagining is a hook/interception into ResourceDictionary. ... Also considering a method at startup that uses interop to pull out *View$ and *ViewModel$ class names to build the DataTemplate dictionary in code: //build list foreach .... String.Format("<DataTemplate DataType=\"{x:Type vm:{0} }\"><v:{1} /></DataTemplate>", ...)

    Read the article

  • Getting "undefined method" error on form select in cucumber

    - by zlog
    I'm trying to visit a page with cucumber, with: visit new_video_path but I get this error: undefined method `episode_id' for #<Video:0x22df8dc> (ActionView::TemplateError) On line #19 of app/views/videos/_form.html.erb ... 19: <%= select(:video, :episode_id, @episodes.collect {|e| [ e.title, e.id ] }, { :include_blank => true }) %> It loads fine in the browser, and the form processes fine too. What did I do wrong?

    Read the article

  • Oracle sample data problems

    - by Jay
    So, I have this java based data trasformation / masking tool, which I wanted to test out on Oracle 10g. The good part with Oracle 10g is that you get a load of sample schemas with half a million records in some. The schemas are : SH, OE, HR, IX and etc. So, I installed 10g, found out that the installation scripts are under ORACLE_HOME/demo/scripts. I customized these scripts a bit to run in batch mode. That solves one half of my requirement - to create source data for my testing my data transformation software. The second half of the requirement is that I create the same schemas under different names (TR_HR, TR_OE and so on...) without any data. These schemas would represent my target schemas. So, in short, my software would pick up data from a table in a schema and load it up in to the same table in a different schema. Now, I have two issues in creating my target schema and emptying it. I would like this in a batch job. But the oracle scripts you get, the sample schema names are not configurable. So, I tried creating a script, replacing OE with TR_OE, HR with TR_HR and so on. However, this approach is kind of irritating coz the sample schemas are kind of complicated in the way they are created; Oracle creates synonyms, views, materialized views, data types and lot of weird stuff. I would like the target schemas (TR_HR, TR_OE,...) to be empty. But some of the schemas have circular references, which would not allow me to delete data. The only work around seems to be removing certain foreign keys, deleting data and then adding the constraints back. Is there any easy way to all this, without all this fuss? I would need a complicated data set for my testing (complicated as in tables with triggers, multiple hierarchies.. for instance.. a child table that has children up to 5 levels, a parent table that refers to an IOT table and an IOT table that refers to a non-IOT table etc..). The sample schemas are just about perfect from a data set perspective. The only challenge I see is in automating this whole process of loading up the source schemas, and then creating the target schemas and emptying them. Appreciate your help and suggestions.

    Read the article

  • Visual Studio Default Browser (MVC)

    - by Kirschstein
    Possible Duplicate: Visual Studio opens default browser instead of IE I want to change the default browser used by Visual Studio for debugging. Normally the route I'd take to do this is right clicking on an .aspx file and setting the default from the 'browse with' dialog. Unfortunately, MVC views don't have the browse with option. What other ways can you set the default browser? EDIT: FireFox is set to my default browser in Windows, but VS still opens up IE.

    Read the article

  • NSXMLParser, Issue with ASCII Character Set

    - by Ansari
    Hi all <Feeds> <channel> <ctitle>YouTube</ctitle> <cdescription>YouTube - Recently added videos</cdescription> <items> <recentlyAdded> <item> <serverItemId>1</serverItemId> <title>Fan Video CARS</title> <author>mikar1</author> <guid isPermaLink='false'></guid> <link>http://www.youtube.com/watch?v=y7ssHOBFvGk&amp;feature=youtube_gdata</link> <pubDate></pubDate> <description> <descriptionTitle>Fan Video CARS</descriptionTitle> <descriptionText>THE REALSONG OF THIS VIDEOS IS REAL GONE, BUT FOR COPYRIGHTS RASONS.....YOUTUBE FORCE ME A CHANGE THE SONG :s Un pequeño video, de la pelicula Cars!</descriptionText> <added></added> <airDate></airDate> <duration></duration> <Views></Views> <ratings>4.340909</ratings> <From></From> </description> <thumbnail> <height>100</height> <width>100</width> <url>http://i.ytimg.com/vi/y7ssHOBFvGk/2.jpg</url> </thumbnail> </item> </recentlyAdded> </items> </channel> I am using NSXMLParser, and when it reaches the it blows up. It breaks the text to pieces "THE REALSONG OF THIS VIDEOS IS REAL GONE, BUT FOR COPYRIGHTS RASONS.....YOUTUBE FORCE ME A CHANGE THE SONG :s Un peque" And next should be "ño" but it just quit the parsing there and further tags are being handled. :( It always does with the ISO 8859 1 Character cames in ) Any quick idea ??? Thanks in Advance ..........

    Read the article

  • Dynamic URL -> Controller mapping for routes in Rails

    - by Daniel Beardsley
    I would like to be able to map URLs to Controllers dynamically based on information in my database. I'm looking to do something functionally equivalent to this (assuming a View model): map.route '/:view_name', :controller => lambda { View.find_by_name(params[:view_name]).controller } Others have suggested dynamically rebuilding the routes, but this won't work for me as there may be thousands of Views that map to the same Controller

    Read the article

  • HAML on Rails 3 doesn`t work

    - by Peter
    Hey there, i have tried to render some files with HAML in Rails 3. But HAMl doesn`t work. My testfiles have the extension .html.haml. In the GEMFile i have written gem 'haml' and executed the bundle install When i call my testapp i become an error like this: Template is missing Missing template posts/index with {:locale=>[:en, :en], :formats=>[:html], :handlers=>[:rjs, :rhtml, :rxml, :builder, :erb]} in view paths "/Users/piet/Sites/blog/app/views" Hope, i become some help here. Peter

    Read the article

  • Apply an Animation on a Drawable in Android

    - by Casebash
    I am adding a glow animation effect to a logo. So far, I have managed to get the glow image behind the logo, using a LayeredDrawable, but I can't figure out how to animate it. I have found that AlphaAnimation would achieve the desired effect, but unfortunately I can only apply it on Views, not Drawables. How can I achieve this effect?

    Read the article

  • NoMethodError for time_zone_select in a form

    - by Jack
    I've set up my app exactly in line with the Railscasts Time Zone Episode 1 but when I run <%= f.time_zone_select :time_zone, ActiveSupport::TimeZone.us_zones %> I get this error NoMethodError in Users#new Showing app/views/users/new.html.erb where line #27 raised: You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.<= With line 27 being the aforementioned line. I am really stuck on this...

    Read the article

  • Common header view on top of nib files with Interface builder

    - by Tiago
    Hi, I have a nib file that contains an header that will be used in most of my views, so that I can change it's layout just once when I need. I'd like to know if it's possible to add the header nib view with interface builder, or if I need to do that programmatically and how should it be done. I've thought about setting the subclass of the subview to a UIView subclass that automatically loads the nib file, but I'd like to do that with interface builder. Is that possible?

    Read the article

  • html.erb vs erb (and haml equivalents)

    - by mathee
    I'm not sure I understand the difference between the html.erb files and erb files in the views for a Ruby on Rails application. (Similarly for haml files.) What are the dis/advantages of each (html.erb/haml or erb/haml) files? PS I'm not asking about the difference between the erb and haml files -- just appending the extension to an html file versus not appending it.

    Read the article

  • Partials in Liquid

    - by kostia
    Hello, We're trying to rewrite our current views from ERb to Liquid and we got following problem: we have a lot of render(:partial => '/path/to/partial') in our code, but we found absolutely no instructions how to render partials in Liquid. The only one solution we found was with help of render_to_string but it's just to ugly to be true. Thanx!

    Read the article

  • asp.net mvc usercontrol viewdata

    - by kusanagi
    i have user control, which i render on several views. i want to show viewdata in the usercontrol, but viewdata must be filled in controller method, so i need to fill viewdata on each controller method of each view, where i render usercontrol. is there any simple solutions?

    Read the article

  • Avoiding .gsp extention in a GSP Page Without a Controller

    - by Guy
    Using grails 1.2.1 this should be very simple, but still I can't get it to work. In my application /grails-app/views I've added mypage.gsp Plus "/mypage"(view:"mypage") to the mappings block of my URLMapping class. while http://server-name:8080/myapp/mypage.gsp works I'm still getting 404 - page not found when I try to open http://server-name:8080/myapp/mypage Thanks, Guy

    Read the article

  • How to add the textviews equally in a Row?

    - by Rakesh
    Hi Guys,i have 5 text views to be added horizontally,and it needs to occupy the displaywidth.When i change the screen orientation,it should change based on it.Is that can be done by Layout or it should be done programmatically Regards Rakesh Shankar.P

    Read the article

  • CakePHP admin panel

    - by ab
    I am new to CakePHP and want an admin panel on my custom CMS for a client. Is there any way other than just linking to an admin page to each controller that I can pull views from other controllers such as users and posts?

    Read the article

  • why my code error,about serve the static file using django..

    - by zjm1126
    my settings.py: DIRNAME = os.path.dirname(__file__) STATIC_DOC_ROOT = os.path.join(DIRNAME, 'media') MEDIA_URL = '/media/' my urls.py: def google(request): return render_to_response('a.html',context_instance=RequestContext(request)) urlpatterns = patterns('', (r'^$',google), (r'^media/(?P<path>.*)$', 'django.views.static.serve',{'document_root':settings.STATIC_DOC_ROOT,'show_indexes': True}), ) and my a.html is: <script type="text/javascript" src="/media/jquery-1.4.2.js"></script> <script type="text/javascript"> alert($) </script> but,it can't defiend the '$' why ? thanks

    Read the article

< Previous Page | 160 161 162 163 164 165 166 167 168 169 170 171  | Next Page >