Search Results

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

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

  • Starting with asp.net MVC

    - by Josemalive
    Hello, Actually im doing a home page that only have an action called Index() that returns the view Index.ascx. This index page will be composed by lastest news and lastest registered users, i think that create two partial views is the best idea (this way i could use it in other views). for other hand i have a data access class that calls to database for get stuff (get last news, get last users, etc...) My question is simple, should i call to the this data access class in the Index() action of my HomeController, and add to the ViewData the data obtained? I think that this index() action shouldnt be the responsable of passing this data to the partial views, right? Could you give me a hand? im messing too much? ;-) Thanks in advance. Best Regards. Jose

    Read the article

  • Iterating 'Active' View Controllers

    - by ISDi
    Ola Folks, In an iPhone application I am displaying different views by using the addSubView:SomeViewController.view method. I want to be able to, at the very least, log the view controllers that are in the view hierarchy that is being displayed. I would prefer to be able to get a handle to a specific view controller. I know how to iterate the views, I just do not see how to access the view controllers of those views. I am looking for something that will give me the type of access to the view controllers that UINavigationController::ViewControllers does. I thought I could get away with: for (UIViewController* oVC in [self.view subviews]) but this is not having the intended effect. If someone has a way of doing this, please share it with me. -isdi-

    Read the article

  • I want multipart/alternative; ActionMailer only sending text/html

    - by macek
    I'm following the Ruby on Rails Guide: ActionMailer Basics Section 2.7 Snippet: Action Mailer will automatically send multipart emails if you have different templates for the same action. So, for our UserMailer example, if you have welcome_email.text.plain.erb and welcome_email.text.html.erb in app/views/user_mailer, Action Mailer will automatically send a multipart email with the HTML and text versions setup as different parts. Well, I have both: app/views/user_mailer/welcome_mail.text.html.erb app/views/user_mailer/welcome_mail.text.plain.erb app/models/user_mailer.rb class UserMailer < ActionMailer::Base def welcome_mail(user) recipients user.email from "[email protected]" subject "Thanks for registering" body :user => user end end Any luck?

    Read the article

  • Loading different portrait/landscape UIViews

    - by Tronic
    Hi, I have following View COntroller structure: ScrollViewController LandscapeViewController PortraitViewController Each with its own .nib The app starts in landscape mode where many landscape views are added to a scrollview. Each landscape view has its specific portrait view, so I have to assign like ID's to each of this views. Can you tell me, how I can load the specific portrait view for each landscape view when rotating the device? Do I have to make two scroll views? One for landscape, one for portrait? Or is it possible to just scroll through the landscape scrollview an load just one portrait view with the right content based on an ID? How could I implement that? The data comes from a property list. Thanks in advance!

    Read the article

  • sharepoint online quick launch

    - by Brian
    Hello, we are converting from sharepoint 2003 to sharepoint on line. I am having trouble reproducing a specific behavior in the online version. If a choose a list, I get a "select a view" navigation on the left hand side of the page showing the available views. When a new view is created, it automatically appears on this navigation list. In the online sharepoint, instead there is a view dropdown. I know I can manually setup links on the quick launch but I'm looking for an automatic way to do this. Can the online sharepoint be set up so that when views are added they automatically appear as left-hand links? Or can the "views" dropdown be moved to the left side which would be an acceptable work around? Please note I am unfamiliar with SP designer and I do work with .NET but I dont want to go that route just for this issue - thanks.

    Read the article

  • Entity framework and database logic.

    - by Xavier Devian
    Hi all, i have a question that's being around for several years. As all you know entity framework is an ORM tool that tries to model the database to an object oriented access model. All the samples I've seen are quering directly to the database tables. So, which is the role of the views in the database now?. The views were used to model the database in a more friendly way, that is, several physical tables, one logic table. This was great for example in hidding the complex relational model on stored procedures as queryng the views inside them was much easier than reproducing the query joins over and over on each stored procedure. So the question is, why is entity framework so good if stored procedures can not take benefit of it?

    Read the article

  • Cake PHP Error: Make sure you have created index.ctp (???)

    - by Louis Stephens
    I was just starting to learn cakephp today by going through a "blog tutorial". I created my blog_controller.php and then created a folder named 'blog' with the apps/views/ structure. The next step in the tutorial was to create the index.ctp file within the blog folder under views. In the tutorial it declares that all error messages should be gone. However, I still receive an error message: Error: The view for BlogController::index() was not found. Error: Confirm you have created the file: /Users/trippstephens/Dropbox/cakephp-cakephp1x-348e5f0/app/views/blog/index.ctp For the life of me, I can not figure out what I have done wrong. I am running cakephp under MAMP and it "installed" successfully. Any help would be appreciated.

    Read the article

  • Search function fails because it refers to the wrong controller action?

    - by Christoffer
    My Sunspot search function (sunspot_rails gem) works just fine in my index view, but when I duplicate it to my show view my search breaks... views/supplierproducts/show.html.erb <%= form_tag supplierproducts_path, :method => :get, :id => "supplierproducts_search" do %> <p> <%= text_field_tag :search, params[:search], placeholder: "Search by SKU, product name & EAN number..." %> </p> <div id="supplierproducts"><%= render 'supplierproducts' %></div> <% end %> assets/javascripts/application.js $(function () { $('#supplierproducts th a').live('click', function () { $.getScript(this.href); return false; } ); $('#supplierproducts_search input').keyup(function () { $.get($("#supplierproducts_search").attr("action"), $("#supplierproducts_search").serialize(), null, 'script'); return false; }); }); views/supplierproducts/show.js.erb $('#supplierproducts').html('<%= escape_javascript(render("supplierproducts")) %>'); views/supplierproducts/_supplierproducts.hmtl.erb <%= hidden_field_tag :direction, params[:direction] %> <%= hidden_field_tag :sort, params[:sort] %> <table class="table table-bordered"> <thead> <tr> <th><%= sortable "sku", "SKU" %></th> <th><%= sortable "name", "Product name" %></th> <th><%= sortable "stock", "Stock" %></th> <th><%= sortable "price", "Price" %></th> <th><%= sortable "ean", "EAN number" %></th> </tr> </thead> <% for supplierproduct in @supplier.supplierproducts %> <tbody> <tr> <td><%= supplierproduct.sku %></td> <td><%= supplierproduct.name %></td> <td><%= supplierproduct.stock %></td> <td><%= supplierproduct.price %></td> <td><%= supplierproduct.ean %></td> </tr> </tbody> <% end %> </table> controllers/supplierproducts_controller.rb class SupplierproductsController < ApplicationController helper_method :sort_column, :sort_direction def show @supplier = Supplier.find(params[:id]) @search = @supplier.supplierproducts.search do fulltext params[:search] end @supplierproducts = @search.results end end private def sort_column Supplierproduct.column_names.include?(params[:sort]) ? params[:sort] : "name" end def sort_direction %w[asc desc].include?(params[:direction]) ? params[:direction] : "asc" end models/supplierproduct.rb class Supplierproduct < ActiveRecord::Base attr_accessible :ean, :name, :price, :sku, :stock, :supplier_id belongs_to :supplier validates :supplier_id, presence: true searchable do text :ean, :name, :sku end end Visiting show.html.erb works just fine. Log shows: Started GET "/supplierproducts/2" for 127.0.0.1 at 2012-06-24 13:44:52 +0200 Processing by SupplierproductsController#show as HTML Parameters: {"id"=>"2"} Supplier Load (0.1ms) SELECT "suppliers".* FROM "suppliers" WHERE "suppliers"."id" = ? LIMIT 1 [["id", "2"]] SOLR Request (252.9ms) [ path=#<RSolr::Client:0x007fa5880b8e68> parameters={data: fq=type%3ASupplierproduct&start=0&rows=30&q=%2A%3A%2A, method: post, params: {:wt=>:ruby}, query: wt=ruby, headers: {"Content-Type"=>"application/x-www-form-urlencoded; charset=UTF-8"}, path: select, uri: http://localhost:8982/solr/select?wt=ruby, open_timeout: , read_timeout: } ] Supplierproduct Load (0.2ms) SELECT "supplierproducts".* FROM "supplierproducts" WHERE "supplierproducts"."id" IN (1) Supplierproduct Load (0.1ms) SELECT "supplierproducts".* FROM "supplierproducts" WHERE "supplierproducts"."supplier_id" = 2 Rendered supplierproducts/_supplierproducts.html.erb (2.2ms) Rendered supplierproducts/show.html.erb within layouts/application (3.3ms) Rendered layouts/_shim.html.erb (0.0ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."remember_token" = 'zMrtTbDun2MjMHRApSthCQ' LIMIT 1 Rendered layouts/_header.html.erb (2.1ms) Rendered layouts/_footer.html.erb (0.2ms) Completed 200 OK in 278ms (Views: 20.6ms | ActiveRecord: 0.6ms | Solr: 252.9ms) But it breaks when I type in a search. Log shows: Started GET "/supplierproducts?utf8=%E2%9C%93&search=a&direction=&sort=&_=1340538830635" for 127.0.0.1 at 2012-06-24 13:53:50 +0200 Processing by SupplierproductsController#index as JS Parameters: {"utf8"=>"?", "search"=>"a", "direction"=>"", "sort"=>"", "_"=>"1340538830635"} Rendered supplierproducts/_supplierproducts.html.erb (2.4ms) Rendered supplierproducts/index.js.erb (2.9ms) Completed 500 Internal Server Error in 6ms ActionView::Template::Error (undefined method `supplierproducts' for nil:NilClass): 10: <th><%= sortable "ean", "EAN number" %></th> 11: </tr> 12: </thead> 13: <% for supplierproduct in @supplier.supplierproducts %> 14: <tbody> 15: <tr> 16: <td><%= supplierproduct.sku %></td> app/views/supplierproducts/_supplierproducts.html.erb:13:in `_app_views_supplierproducts__supplierproducts_html_erb___2251600857885474606_70174444831200' app/views/supplierproducts/index.js.erb:1:in `_app_views_supplierproducts_index_js_erb___1613906916161905600_70174464073480' Rendered /Users/Computer/.rvm/gems/ruby-1.9.3-p194@myapp/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (33.3ms) Rendered /Users/Computer/.rvm/gems/ruby-1.9.3-p194@myapp/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.9ms) Rendered /Users/Computer/.rvm/gems/ruby-1.9.3-p194@myapp/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (39.7ms)

    Read the article

  • How do I build a specialized JQuery Timer

    - by Sayem Ahmed
    I have an asp.net page where two grid views are available showing current stock market price updates. I need to update these two grid views every 20 seconds. So I was thinking of using JQuery to do this job. What I need is a timer which will fire every 20 seconds, send an ajax request to the servers, bring the order lists from the server using json and then update those two grid views. If a request to the server is still being served 20 seconds after it is fired, then I want the old one to be aborted without causing any trouble. I already know how to bring objects using json. I just need to figure out how to send a request every 20 seconds and cancel a request if it is still being server for 20 seconds.

    Read the article

  • ListView is Widget(View) or Layout(Viewgroup)?

    - by Manoj Maurya
    Hi All, I need your help to explore few topics in Android. My understanding is Widget is View and Layout is ViewGroups in Android. I described the problems as below- Please go through the below links- developer.android.com/guide/topics/ui/custom-components.html- (add http:// in the beginning) developer.android.com/resources/tutorials/views/index.html - (add http:// in the beginning) In the first link ListView is included as Widget and in the Second link ListView has been shown as Layout. So, is ListView is Widget(View) or Layout(Viewgroup)? Same is the case for Spinner in Andriod developer.android.com/resources/tutorials/views/hello-spinner.html- (add http:// in the beginning) (Link- says Spinner is Widget(View)) developer.android.com/guide/topics/ui/layout-objects.html- (add http:// in the beginning) says Spinner is Layout(ViewGroup) So, Spinner is View or ViewGroup? Please update me with your views?

    Read the article

  • Drawing rubber band line during user drag

    - by Pete W
    In my iPhone app, I would like the user to be able to "connect" two of my views by: 1) starting a drag in View A 2) as they drag towards View B, a straight line with one end in View A and the other end under at the current drag point, animates in a rubber-band fashion 3) when/if they release in View B, the line is then shown between the two views I've seen examples of dragging and dropping views, and other examples of animations, but I haven't seen one that is a simple example of this kind of user-directed animation. Any pointers towards examples or the specific docs I should be looking at would be appreciated. If this turns out to be trivial - my apologies. Although I've done quite a bit of development, I'm just getting started in the iPhone SDK and Core Graphics.

    Read the article

  • ASP.NET MVC Using Multiple user controls on a single .aspx(view)

    - by Pinu
    I am getting this following error , when i am tring to having two user controls in one page. The model item passed into the dictionary is of type 'System.Linq.EnumerableQuery1[Data.EventLog]' but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable1[Data.Notes]'. <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> Test </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <h2>Test</h2> <% Html.RenderPartial("~/Views/Shared/UserControl/Tracking.ascx"); %> <% Html.RenderPartial("~/Views/Shared/UserControl/Notes.ascx"); %> </asp:Content>

    Read the article

  • How will you register a custom view engine where in the Areas will not be affected?

    - by Fleents
    I made a custom view engine for my application. ~/Themes/Default/Views.. And I have an Area called Admin. Area/Admin/Views.. I register my custom view engine in Global.asax : RegisterViewEngines(ViewEngines.Engines); AreaRegistration.RegisterAllAreas(); RegisterRoutes(RouteTable.Routes); When I browsed my admin site, it cant find the views.. I know its because of my custom view engine.. But how can you register new custom view engine without affecting the view engine of areas?

    Read the article

  • Django startup importing causes reverse to happen

    - by nicknack
    This might be an isolated problem, but figured I'd ask in case someone has thoughts on a graceful approach to address it. Here's the setup: -------- views.py -------- from django.http import HttpResponse import shortcuts def mood_dispatcher(request): mood = magic_function_to_guess_my_mood(request) return HttpResponse('Please go to %s' % shortcuts.MOODS.get(mood, somedefault)) ------------ shortcuts.py ------------ MOODS = # expensive load that causes a reverse to happen The issue is that shortcuts.py causes an exception to be thrown when a reverse is attempted before django is done building the urls. However, views.py doesn't yet need to import shortcuts.py (used only when mood_dispatcher is actually called). Obvious initial solutions are: 1) Import shortcuts inline (just not very nice stylistically) 2) Make shortcuts.py build MOODS lazily (just more work) What I ideally would like is to be able to say, at the top of views.py, "import shortcuts except when loading urls"

    Read the article

  • Django: url and content creation results in 500 and no apache error log entry

    - by user1684082
    If i try to open a created url i get an 500 error. My procedure was: First python manage.py startapp black I added in project/settings.py under INSTALLED_APPS 'black', I added in project/urls.py url(r'^test/', include('black.urls')), Content of black/urls.py is: from django.conf.urls import patterns, url from black import views urlpatterns = patterns('', url(r'^$', views.index, name='index') ) And content of black/views.py: from django.http import HttpResponse def index(request): return HttpResponse("SHOW ME: BLACK") After all i synced the database. I can't see any error in apache-error-log and also not in my posted django files. What could cause this?

    Read the article

  • undefined method `events' for #<ActiveRecord::Relation:0x4177518> -rails 3.0.3

    - by brg
    I am having this unexplained NoMethodError with undefined method `events' for #. 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

  • solutions for rapid front-end development?

    - by fayer
    im using mvc framework and i have learned some techniques that help me with different parts of RAD. models: doctrine/visual paradigm controllers/libraries: various design patterns now i only need to know what technique/solution i should use for the views so that i can create views more rapidly. cause i don't think it's efficient to code css/html manually, even though i understand it. its the same principle when using visual paradigm to create both my mysql database tables and doctrine model classes. i believe in using right tools will boost up development speed. so what could i use for the views to save time and energy and don't reinvent the wheel all the time? dreamweaver? any css generation tools? 960/blueprint for layout? suggestions? thanks

    Read the article

  • show activity indicator while loading ViewController

    - by Crystal
    I have a ViewController that takes time to load its views. When I run Instruments, I see from the home screen, if I tap on the icon that pushes that view controller onto the stack, it's half laying out the views, and half getting the data for the views. I tried adding an activity indicator to display on the home screen over the button when the button is pressed to push the LongRunningViewController onto the stack. So I basically do this: - (IBAction)puzzleView:(id)sender { dispatch_async(dispatch_get_main_queue(), ^{ [self.activityIndicator startAnimating]; }); PuzzleViewController *detailViewController = [[[PuzzleViewController alloc] init] autorelease]; [self.navigationController pushViewController:detailViewController animated:YES]; [self.activityIndicator stopAnimating]; }

    Read the article

  • How can I make a view get bigger again, as soon as the status bar goes back to normal height after a

    - by Thanks
    In the simulator I went to Hardware menu and activated the simulation of bigger status bar during phone call. Now, I tried to make a view in my nib that takes up the whole screen. As soon as the status bar gets smaller, I want my view to get bigger, so it uses that space up there. But regardless of any autoresizing settings, my view will keep pressed down after that status bar gets smaller. There is a empty slot left where the status bar was after hanging up the call. What's that actually supposed to be? Is my app recognizing the status bar as a view, or is the status bar indeed making my screen smaller? I mean...does it mess around with my views as if it was a view itself, or do my views not know about a status bar, but about a smaller screen size when the status bar gets bigger? How do you get your views big again when the status bar returns to normal height?

    Read the article

  • Can I include a view in Kohana 3 that is not within `application/views`?

    - by alex
    I am building a staff area for a website, which is completely different to the main brochure style site. I have 2 Kohana systems setup. I realise they can both share the same system and modules folder. Now, with the second one, I want to make the main template view a view in a different folder. I tried this in my base controller $this->template = DOCROOT . '../~new2/application/views/template.php'; But Kohana is looking for it in its own views folder as evident by the error I received. I even put a var_dump(file_exists($this->template)); // true to be sure it was finding the correct file. Is there a way to add a template file that is not within the views folder, without hacking the core Kohana code (and if I'm lucky not extending and overloading the view class).

    Read the article

  • "modal" in apple documentation

    - by Crystal
    Apple uses "modal" often in their documentation. Like dismissModalViewController in their titles of methods, or documentation like: "The UIViewController class provides the fundamental view-management model for iPhone applications. The basic view controller class supports the presentation of an associated view in addition to basic support for managing modal views and rotating views in response to device orientation changes. Subclasses such as UINavigationController and UITabBarController provide additional behavior for managing complex hierarchies of view controllers and views." I'm not sure as to what context I should think of when I see modal in the names and documentation. Any thoughts? Thanks.

    Read the article

  • How to get an item value of json using C#?

    - by user3487837
    How to get an item value of json using C#? json: [{ ID: '6512', fd: [{ titie: 'Graph-01', type: 'graph', views: { graph: { show: true, state: { group: 'DivisionName', series: ['FieldWeight', 'FactoryWeight', 'Variance'], graphType: 'lines-and-points' } } } }, { titie: 'Graph-02', type: 'Graph', views: { graph: { show: true, state: { group: 'DivisionName', series: ['FieldWeight', 'FactoryWeight', 'Variance'], graphType: 'lines-and-points' } } } }] }, { ID: '6506', fd: [{ titie: 'Map-01', type: 'map', views: { map: { show: true, state: { kpiField: 'P_BudgetAmount', kpiSlabs: [{ id: 'P_BudgetAmount', hues: ['#0fff03', '#eb0707'], scales: '10' }] } } } }] }] Above mentioned one is json, Here titie value will be get in a list please help me... my code is: string dashletsConfigPath = Url.Content("~/Content/Dashlets/Dashlets.json"); string jArray = System.IO.File.ReadAllText(Server.MapPath(dashletsConfigPath)) List<string> lists = new List<string>(); JArray list = JArray.Parse(jArray); var ll = list.Select(j => j["dashlets"]).ToList();

    Read the article

  • setting up/installing/configuring nginx LEMP stack on fresh VPS server

    - by Grant Tailor
    I need some help in settingup/installing and configuring nginx LEMP stack on a fresh new VPS I have. The specs of the CentOS 5.7 VPS are 2GB DDR3 ECC RAM(4GB burst), 1 core 1.5Ghz(3Ghz burst) and 100GB RAID 10 storage, unmetered bandwidth @ 100Mpbs all for a whopping $25/month(unbeatable, yeah I know :) Anyways I have followed this LEMP (will also need MySQL and PHP) stack guide on linode http://library.linode.com/lemp-guides/centos-5 but basically what I want is to be able to host multiple website on this webserver after everything is setup. I am used to using DirectAdmin control panel on other server and want to have things setup so I can host multiple websites - mostly wordpress and drupal themes. Lets say 10 websites on this nginx web server. So can someone please help me on what I need to do to take "full" advantage of nginx power and performance, while been able to easily manage these multiple websites (wordpress and drupal themes)?

    Read the article

  • Apache: tmp is not writable

    - by Patrick
    hi, I've installed Drupal on a new webserver and I get the following errors: warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/customers/rollergirl.ch/rollergirl.ch:/var/www/diagnostics:/usr/share/php) in /customers/rollergirl.ch/rollergirl.ch/httpd.www/drupal/sites/all/modules/imagecache/imagecache.install on line 37. ImageCache Temp Directory /tmp is not writeable by the webserver. I guess this happen because the server is not configured with a writable tmp folder I don't have access to Apache configuration file (I only know for sure it is Apache). Could you suggest me what to do ? I can only contact web server service ? thanks

    Read the article

  • Removing write permission on home and public_html on Centos/Cpanel

    - by user5858
    I'm running sites on two Cpanel accounts on my VPS on WHM. I'm using DSO php handler and Apache server on my Web server. After recent intrusion attacks I've chowned to root with permission 555 on $HOME and public_html folder. I'm on VPS with Cpanel on Centos. I'm running CMS based software like Joomla Drupal etc. Will this cause any problem to my VPS installation or server side processes? Drupal, Joomla, MyBB etc will not be affected by this. Some files will not be created like error_log. At least hackers will not be able to place any malicious code within home folder or the public_html folder.

    Read the article

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