Search Results

Search found 37316 results on 1493 pages for 'model view controller'.

Page 18/1493 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • MVC 2 View Layout CSS Control Layout

    - by Cory Mathewson
    I'm new to a lot of what I'm trying to do with the development of a new MVC2 web application so this is a beginner question. I need to understand my options for control and content layout on a web page. I’m using MVC2 so I’m using Controllers, Views, ViewModels, and View Templates. What I need to spin up on…fast…is control the granular layout of controls and content on any particular view. Below I’ve pasted two examples of auto generated templates that illustrate my challenge. I see that layout is controlled by CSS in my Site.css document. In the first example I get a sequential flow of DisplayLabel and DisplayField. I prefer the adjacent layout of DisplayLabel on the same line as DisplayField produced from example 2. However, example 2 is too simple because the formatting is applied to the Label and the Field. I think the correct way to tackle this learning curve is Microsoft Expression but I don’t have personal bandwidth at the moment to tackle Expression. Can anyone point me to a resource that will expose me to lots of examples for CSS formatting? I have lots of syntax questions. For instance, I believe is referencing the Site.css but I can’t find a "display-label" section in Site.css. Example 1 <fieldset> <legend>Fields</legend> <div class="display-label">DocTitle</div> <div class="display-field"><%: Model.DocTitle %></div> <div class="display-label">DocoumentPropertiesID</div> <div class="display-field"><%: Model.DocumentPropertiesID %></div> Example 2 <h2>Title: <%: Model.DocTitle %></h2> <h2>Created: <%: Model.Created %></h2> <h2>Modified: <%: Model.Modified %></h2> <h2>Author: <%: Model.tbl_Author.Name %></h2> <h2>Genre: <%: Model.tbl_DocumentGenre.GenreName %></h2>

    Read the article

  • asp.net mvc changing one menu based on which controller is selected from another menu

    - by jj
    Hi, I am envisioning a site layout like this- top navigation menu linking to maybe 4 or 5 indexes of different controllers. each of these sections will be working with different model objects. Left navigation menu is specific to a controller. so, for each of the top menu buttons (corresponding to different controllers) I would like the left navigation menu to offer options only specific to the currently used controler. What's the best way to go about setting this up? Thanks!!

    Read the article

  • Can I rebuild degraded RAID1 on a SAS 5 i controller with a larger mirror drive size?

    - by Kenny
    A drive failed on a Dell SAS 5i controller - see controller bios screengrab: http://imagebin.ca/view/SkZbszA.html The primary is a 160GB 10k sata drive. I added a 250GB 7k rpm drive in the hope that the array would rebuild onto this drive. This did not happen. (assuming that the controller would just operate at the speed of the slowest drive) The controller could see the new drive, but it didn't automatically rebuild the raid1 onto this drive. (my assumption is that it did not do this rebuild as the drive sizes are different). There was an option to add the new drive to the existing raid1 array - but when I tried this a message appeared stating that all data on the array would be lost. (I didn't get a screenshot of this message, I will later) Should the SAS 5i allow me to rebuild the array onto a larger drive? Is the option to add the drive to the array the right way to go? Many thanks!

    Read the article

  • Zend framework "invalid controller" error message

    - by stef
    When I load the homepage of a ZF site I get a message saying "Invalid controller specified (error)" where "error" seems to be the name of the controller. In my bootstrap.php I have the snippet below where I added the prints statement in the catch(): // Dispatch the request using the front controller. try { $frontController->dispatch(); } catch (Exception $exception) { print $exception; exit; exit($exception->getMessage()); } This prints out: exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)' in /www/common/ZendFramework/library16/Zend/Controller/Dispatcher/Standard.php:241 Stack trace: #0 /www/common/ZendFramework/library16/Zend/Controller/Front.php(934): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 /www/site.com/htdocs/application/bootstrap.php(38): Zend_Controller_Front->dispatch() #2 /www/site.com/htdocs/public/index.php(16): require('/www/site....') #3 {main} Can anyone make sense out of what it going on? I have a hunch it has something to do with case sensitivity and the naming conventions of ZF. The initial "invalid controller" message comes from the snippet below print $request->getControllerName(); if (!$this->isDispatchable($request)) { $controller = $request->getControllerName(); if (!$this->getParam('useDefaultControllerAlways') && !empty($controller)) { require_once 'Zend/Controller/Dispatcher/Exception.php'; throw new Zend_Controller_Dispatcher_Exception('Invalid controller specified (' . $request->getControllerName() . ')'); } $className = $this->getDefaultControllerClass($request); } This all prints out "indexerrorInvalid controller specified (error)" so it looks like it's trying to load the index controller first, can not and then has a problem loading the error controller. Could it just be that the path to the controller files is wrong?

    Read the article

  • How to reference a Domain Controller out of the Local Network?

    - by Adrian
    We have multiple servers scattered over different hosting providers. For learning, experimenting and, ultimately, production purposes, I set one of them as a Domain Controller. That went well, most of our services are now authenticating via AD, which helps us a lot. What I want to do now is to simplify the authentication for the multiple servers, by making each of them look at the Domain Controller. This way, our Devs can log into (Remote Desktop) the multiple servers with the same credentials from AD. I know I have to configure each server to look at the Domain Controller. But when I try to add the Domain Controller to the Computer, it cannot find it, although the Domain Controller address is a valid, reachable internet sub-domain (as in "ad.ourcompany.com"). This is the detailed error message: Note: This information is intended for a network administrator. If you are not your network's administrator, notify the administrator that you received this information, which has been recorded in the file C:\Windows\debug\dcdiag.txt. The following error occurred when DNS was queried for the service location (SRV) resource record used to locate an Active Directory Domain Controller for domain ad.ourcompany.com: The error was: "DNS name does not exist." (error code 0x0000232B RCODE_NAME_ERROR) The query was for the SRV record for _ldap._tcp.dc._msdcs.ad.ourcompany.com Common causes of this error include the following: - The DNS SRV records required to locate a AD DC for the domain are not registered in DNS. These records are registered with a DNS server automatically when a AD DC is added to a domain. They are updated by the AD DC at set intervals. This computer is configured to use DNS servers with the following IP addresses: 109.188.207.9 109.188.207.10 - One or more of the following zones do not include delegation to its child zone: ad.ourcompany.com ourcompany.com com . (the root zone) For information about correcting this problem, click Help. What am I missing? I'm an experienced Dev, but a newbie Sysdamin experimenting with new stuff. Disclaimer All IP addresses and domains/subdomains were changed to preserve security. If by any chance you still can see private information, please let me know so that I can change it.

    Read the article

  • Kohana3 Route with Subdirectories in Controller Folder

    - by ahmet2106
    Hello everybody I'm using Kohana for so long, but the new Version is a litte bit other. My problem with an example: classes/ controller/ pages.php pages/ imprint.php I want to change my Route so, that if i call domain.tld/pages, the pages.php should called with action_index(). But if i call domain.tld/pages/imprint, pages/imprint.php should called with action_index() (and this should work too: pages/imprint/demo - action_demo() in pages/imprint.php) Tried this with bootstrap and http://kohanaframework.org/guide/api/Route this examples, but cant get it work. How can i make this? Any help? Thanks Closed: was my fault The Route::set('pages'...) must be before Route::set('default'...);

    Read the article

  • Multi-Tenant VMWare View Deployment

    - by SimonJGreen
    We have VMWare View 5 set up for a single tenant environment, absolutely brilliant and works perfectly. Two thumbs up there! We're looking at the possibility of deploying this in a multi tenant scenario, where multiple unlinked companies connect to a VDI solution hosted by us but have no visibility of each other. Obviously;y this could be achieved by doubling up on all the components, having a complete VMWare View stack for each tenant, but this seems a little bit messy. Has anyone done this before, and if so how? Googling sheds little light apart from this experts exchange topic.

    Read the article

  • Cakephp 1.3 controller save() does not save data

    - by Thijs
    Hi all, I want to add a new user to the database, and do so by making them fill in a form and submitting this. All seems to work fine. Just before my save() call in the controller I return all data and all necessary data is there. It is valid(ated), since no errors are returned. But then nothing happens. I'm being returned to my form without any errors being shown. This is my 'save-line': if($this->Registratie->save($this->data)) { I'm not making use of any beforeSave() methods. Using debug($this->validationErrors); shows: app/controllers/registratie_controller.php (line 45) Which is the line of code from above. I've been going through my code over and over, but I'm clueless as to what the problem could be. Any help is greatly appreciated! Thanks in advance!

    Read the article

  • Setup a new domain controller over a temporary VPN, but now Windows delays startup?

    - by Kris Anderson
    I'm migrating servers from colo locations to Amazon's VPC EC2 instances. If anyone hasn't worked with Amazon VPC before, VPN is a pain in the arse! Anyways, I setup a new server that acts as the domain controller for our Amazon VPC. In order to migrate all the user accounts from our existing domain controllers I manually connected to our colo VPN using my user account on the new Amazon EC2 machine. I was able to join the domain and the new Amazon server became another domain controller on our network. So far so good. The problem I'm having is that when booting the EC2 domain controller (which is no longer connected to the VPN so it can't communicate with the existing controllers), it takes a good 6-8 minuted before I can remote into the server (instead of the 1-2 minutes it should take). Also, during this time most of the services we also run (like IIS) also give 404 errors until the 6-8 minutes have passed. It's almost like the domain controller is attempting to reach the other domain controllers first and after 6-8 minutes it falls back to the one located on the local machine? I don't think that's what's happening though, because Server 2008 R2 doesn't have primary and backup domain controllers. They're all equal as far as Windows is concerned. For my network adapter I have only one DNS listed, 127.0.0.1, so it should be looking up the local domain controller and not the other domain controllers it connected to over VPN when VPN was enabled. In the server logs I'm seeing these warnings pop up during a reboot: The winlogon notification subscriber is taking long time to handle the notification event (CreateSession). The winlogon notification subscriber took 409 second(s) to handle the notification event (CreateSession). Any ideas on what's happening here? I would try removing the existing domain controllers from the new Amazon EC2 machine, but I still need to connect over VPN a few times to migrate some data between the servers, and I don't want that change being reflected back to the other domain controllers in our colo locations.

    Read the article

  • Getting objc_msg send exception while release navigation controller and view controller in presentmo

    - by Rani
    Hi Guys, I'm getting exception in dealloc when I release navcontroller and viewcontroller of presentmodelviewcontrolelr the code that i wrote MasterViewController* viewController = [[MasterViewController alloc] init]; viewController.pathIsFrom = @"Home"; isBookMark=YES; viewController.isBookmark=isBookMark; UINavigationController *itemNavController = [[UINavigationController alloc] initWithRootViewController:viewController]; itemNavController.navigationBar.barStyle= UIBarStyleBlackOpaque; [self.navigationController presentModalViewController:itemNavController animated:YES]; [itemNavController release]; [viewController release]; can anyone help me. Thanks In advance.

    Read the article

  • passive view and display logic

    - by genesys
    Hi! In MVC and MVP and similar patterns there's often the approach of the "passive view" which is as stupid as possible. This should facilitate unit testing and create a clearer separation of view and model. I know that those patterns come in very different flavours and especially the understanding of MVP seems to differ from article to article. Therefore my question is not "how do i implement this pattern correctly". I want to improve view and model separation and go for better testability of the application. Therefore i'd like to go for a passive view. But my question is, where would you put logic that is clearly only view related? like a textviewer should scroll the text when the scrollbar is moved. would you put the logic for this into the Presenter? Let's say the textviewer has some extended functionality. like setting markings on textpassages. The logic for this makes clearly sense to be put into the Presenter. However, if it is mixed with all the 'direct' logic of the view (like scrolling the text) the Presenter could become very big, which is also not really a nice design. So my question is where to put display related logic of a passive view and what functionallity to mix in the Presenter. Thanks!

    Read the article

  • Can I rebuild degraded RAID1 on a SAS 5 i controller with a larger mirror drive size?

    - by Kenny
    Hi, A drive failed on a Dell SAS 5i controller - see controller bios screengrab: http://imagebin.ca/view/SkZbszA.html The primary is a 160GB 10k sata drive. I added a 250GB 7k rpm drive in the hope that the array would rebuild onto this drive. This did not happen. (assuming that the controller would just operate at the speed of the slowest drive) The controller could see the new drive, but it didn't automatically rebuild the raid1 onto this drive. (my assumption is that it did not do this rebuild as the drive sizes are different). There was an option to add the new drive to the existing raid1 array - but when I tried this a message appeared stating that all data on the array would be lost. (I didn't get a screenshot of this message, I will later) Should the SAS 5i allow me to rebuild the array onto a larger drive? Is the option to add the drive to the array the right way to go? Many thanks!

    Read the article

  • How to access the parent view controller?

    - by tarnfeld
    I am using this code to push a view controller in ViewControllerA: DatePickerViewController *viewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController" bundle:nil]; NSMutableArray *info = [[NSMutableArray alloc] initWithObjects:@"Exam Duration",nil]; [viewController setInfo:info]; [info release]; [self.navigationController pushViewController:viewController animated:YES]; [viewController release]; In the DatePickerViewController that is slid in, it has a text field. In ViewControllerA how can I get the value of this text field once the viewWillDisappear method is fired, it's to save data.

    Read the article

  • What's faster Model.get(keys) or Model.get_by_id(ids, parent=None)

    - by WooYek
    I'm wondering is there a difference in terms of computing cost for the Model.get(keys) and Model.get_by_id(ids, parent=None) methods? Is there a server side computing advantage of using numeric id's over encoded string keys, or other way around? How big is the difference? PS. Sorry, if it's a dupe. I'm sure I read an article about it, but I cannot find it now.

    Read the article

  • Virtual Desktop Provisioning - Vmware View 5.2 Maintenance Questions

    - by Lee J. DeAngelis
    Currently running an environment of about 400 VMware View 5.2 virtual Desktops. The environment runs pretty efficiently but we sometimes run into problems with certain pools from time to time. Just recently we had a pool that was causing high write latency when users logged in. It just happened all of a sudden and had been working fine for weeks. On a hunch we completely broke down the pool and re-provisioned it from a new image. This corrected the problem. In fact every real issue we've had so far was fixed by a recompose or complete break down and re-provisioning of one pool or another.Our environment consists of Cisco UCS and Netapp 3240s using flashcache running VMware View 5.2. My questions are: What are some maintenance best practices other VDI admins are using? How often are you recomposing? rebalancing? re-provisioning? How long should you keep base image snapshots around?

    Read the article

  • Android custom view - setting it to take up max space available but no more

    - by Rich
    I have a custom View class in my app that I'm using in xml layouts. Wherever I'm using this view in my xml, I don't want it to stretch it's container, but I want it to fill out whatever space is available. Here's an example to make it a little clearer. I have a LinearLayout set to horizontal orientation with my custom view followed by a TextView. The TextView is going to stretch the LinearLayout so that it takes up the space it needs and no more. I want my custom view to take up the vertical space that the TextView has made available. Let's say the TextView ends up being 50px tall because of it's contents. The LinearLayout is thus stretched to about this height (not taking into account any margins or padding), so I just want the view to know it can stretch to that height and not "push on" its container. Without overriding and of the measurement methods of the base class (onMeasure, etc) my View is actually stretching to take up as much space as possible. I have already played around with wrap_content and fill_parent a bunch, so I'm assuming I need to do something in one of the View class' measure methods.

    Read the article

  • Problem pushing multiple view controllers onto navigation controller stack

    - by Jim
    Hi, I am trying to push three view controllers onto the navigation controller. [self.navigationController pushViewController:one animated:YES]; [self.navigationController pushViewController:two animated:YES]; [self.navigationController pushViewController:three animated:YES]; The desired behavior is that view three will show, and when the back button is pressed it will go to view two and then to view one... What actually happens is that view one is visible and pressing back goes to view two and then back again it goes to view one. Which is to say that view one is shown instead of view three. Very strangely, looking at the viewController array of the navigationController after the calls above show the right entries, and looking at the visibleViewController property shows that it has view three in it... even though view one is visible. If i navigate to a sub view from the visible view one (that shows in the place of view three) and press back from that sub view... it goes to view three. It looks like it is showing view one, but knows it is on view three... I am completely confused... any ideas? Jim

    Read the article

  • Why is the W3C box model considered better?

    - by Mel
    Why do most developers consider the W3C box-model to be better than the box-model used by Internet Explorer? I know it's very frustrating developing pages that look the way you want them on Internet Explorer, but I find the W3C box-model to be counter-intuitive. For example, if margins, padding, and border were factored into the width, I could assign fixed width values for all my columns without having to worry about how many columns I have and what changes I make to my padding and margins. Under W3C box model I have to worry about how many columns I have, and develop something akin to a mathematical formula to calculate my values. Changing them would nightmarish, especially for complex layouts. My novice opinion is that it's more restrictive. Consider this small frame-work I wrote: #content { margin:0 auto 30px auto; padding:0 30px 30px 30px; width:900px; } #content .column { float:left; margin:0 20px 20px 20px; } #content .first { margin-left:0; } #content .last { margin-right:0; } .width_1-4 { width:195px; } .width_1-3 { width:273px; } .width_1-2 { width:430px; } .width_3-4 { width:645px; } .width_1-1 { width:900px; } These values I have assigned here will falter unless there are three columns, and thus the margins at 0(first)+20+20+20+20+0(last). It would be a disaster if I wanted to add padding to my columns too, as my entire setup would have to be re calibrated. Now imagine if column width incorporated all the other elements, all I would need to do is change one associated value, and I have my layout. I'm less criticizing it and more hoping to understand why it's better, or why I'm finding it more difficult. Am I doing this whole thing wrong? I don't know very much about this topic, but it seems counter intuitive to use W3C's box-model. Some advice would be really appreciated. Thanks

    Read the article

  • grails date from params in controller

    - by nils petersohn
    y is it so hard to extract the date from the view via the params in a grails controller? i don't want to extract the date by hand like this: instance.dateX = parseDate(params["dateX_value"])//parseDate is from my helper class i just want to use instance.properties = params you know :) in the model the type is java.util.Date and in the params is all the information (dateX_month, dateX_day, ...) i searched on the net and found nothing on this :( i hoped that grails 1.3.0 could help but still the same thing. i can't and will not belief that extracting the date by hand is nessesary!

    Read the article

  • Using Interfaces in an action signature of ASP.NET MVC controller

    - by Dmitry Borovsky
    Hello, I want to use interface in Action signature. So I've tried make own ModelBinder by deriving DefaultModelBinder: public class InterfaceBinder<T> : DefaultModelBinder where T: new() { protected override object CreateModel(ControllerContext controllerContext, ModelBindingContext bindingContext, Type modelType) { return base.CreateModel(controllerContext, bindingContext, typeof(T)); } } public interface IFoo { string Data { get; set; } } public class Foo: IFoo /*other interfaces*/ { /* a lot of other methods and properties*/ public Bar Data{get;set;} string IFoo.Data { get{return Data.ToString()}; set{Data = new Bar(value)}; } } public class MegaController: Controller { public ActionResult Process([ModelBinder(typeof(InterfaceBinder<Foo>))]IFoo foo){/*bla-bla-bla*/} } But it doesn't work. Does anybody have idea how release this behaviour? And yes, I know that I can make my own implementation of IModelBinder, but I'm looking for easier way.

    Read the article

  • Handling Exceptions that happen in a asp.net MVC Controller Constructor

    - by Jason
    What's the best way to handle exceptions that happen from within a controller's constructor? All I can think of to do is use Application_OnError() or put a try/catch in my ControllerFactory. Neither of these solutions seem ideal. Application_OnError is to broad - I have some non-mvc content in the site that has its own error handling. Using a try/catch block seems kinda hacky. If I'm serving different content type -html/text/json/rss.... I would like to be able to handle the exception from within the action method instead of having to write all kinds of conditions to determine what kind of error message to serve. Am I missing something here, or has anyone else dealt with this?

    Read the article

  • Instantiate a model when the kind of model needed is represented as a string argument

    - by indiehacker
    My input data is a string representing the kind of datastore model I want to make. In python, I am using the eval() function to instantiate the model (below code), but this seems overly complex so I was wondering if there is a simpler way people normally do this? >>>model_kind="TextPixels" >>>key_name_eval="key_name" >>>key_name="key_name" >>>kwargs {'lat': [0, 1, 2, 3], 'stringText': 'boris,ted', 'lon': [0, 1, 2, 8], 'zooms': [0, 10]} >>>obj=eval( model_type + '(key_name='+tester+ ',**kwargs )' ) >>>obj <datamodel.TextPixels object at 0xed8808c>

    Read the article

  • .NET - Retrieve attribute from controller context?

    - by ropstah
    I have a controller insert action: <AcceptVerbs(HttpVerbs.Post)> _ Function InsertObject(<Bind(Exclude:="Id")> <ModelBinder(GetType(CustomModelBinder))> ByVal object As SomeObject) As ActionResult End Function And i have a CustomModelBinder class with a BindModel implementation: Public Function BindModel( _ ByVal controllerContext As System.Web.Mvc.ControllerContext, _ ByVal bindingContext As System.Web.Mvc.ModelBindingContext) As Object Implements System.Web.Mvc.IModelBinder.BindModel For Each s In HttpContext.Current.Request.Form.Keys HttpContext.Current.Response.Write(s & ": " & HttpContext.Current.Request.Form(s) & "<br />") Next HttpContext.Current.Response.End() End Function As you can see I have a controllerContext and a ModelBindingContext available. How do I get the: <Bind(Exclude:="Id")> part inside the BindModel implementation?

    Read the article

  • Unity - Mecanim & Rigidbody on Third Person Controller - Gravity bug?

    - by Celtc
    I'm working on a third person controller which uses physX to interact with the other objects (using the Rigidbody component) and Mecanim to animate the character. All the animations used are baked to Y, and the movement on this axis is controlled by the gravity applied by the rigidbody component. The configuration of the falling animation: And the character components configuration: Since the falling animation doesn't have root motion on XZ, I move the character on XZ by code. Like this: // On the Ground if (IsGrounded()) { GroundedMovementMgm(); // Stores the velocity velocityPreFalling = rigidbody.velocity; } // Mid-Air else { // Continue the pre falling velocity rigidbody.velocity = new Vector3(velocityPreFalling.x, rigidbody.velocity.y, velocityPreFalling.z); } The problem is that when the chracter starts falling and hit against a wall in mid air, it gets stuck to the wall. Here are some pics which explains the problems: Hope someone can help me. Thanks and sory for my bad english! PD.: I was asked for the IsGrounded() function, so I'm adding it: void OnCollisionEnter(Collision collision) { if (!grounded) TrackGrounded(collision); } void OnCollisionStay(Collision collision) { TrackGrounded(collision); } void OnCollisionExit() { grounded = false; } public bool IsGrounded() { return grounded; } private void TrackGrounded(Collision collision) { var maxHeight = capCollider.bounds.min.y + capCollider.radius * .9f; foreach (var contact in collision.contacts) { if (contact.point.y < maxHeight && Vector3.Angle(contact.normal, Vector3.up) < maxSlopeAngle) { grounded = true; break; } } } I'll also add a LINK to download the project if someone wants it.

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >