JavaFX TabPane – One controller for each tab

One approach is to encapsulate each of your tab pages into a separate FXML file with it’s own associated controller class. Then in your FXML file for the main tab control you can do something like this: <TabPane fx:controller=”com.foo.MainController”> <tabs> <Tab text=”Untitled Tab 1″> <content> <fx:include fx:id=”fooTabPage” source=”fooTabPage.fxml”/> </content> </Tab> <Tab text=”Untitled Tab 2″> <content> … Read more

Argh! Why does System.Web.Mvc.HandleErrorInfo get passed to my views?

Here is an issue on codeplex explaining why that error occurs. Quote from http://web.archive.org/web/20131004122626/http://aspnet.codeplex.com/workitem/1795 since original link is dead: HandleError Attribute should not store exception information in ViewData When the HandleError attribute handles an exception, it stores the exception information in the ViewData. This is a problem when the Error.aspx inherits from the site.master and … Read more

How do I generate a controller spec using rspec?

the rspec way is rails g rspec:controller passwords it gives create spec/controllers/passwords_controller_spec.rb –Update You can configure your application to generate rspec when model or controller is created. Add to config/application.rb # don’t generate RSpec tests for views and helpers. config.generators do |g| g.test_framework :rspec, fixture: true g.fixture_replacement :factory_girl, dir: ‘spec/factories’ g.view_specs false g.helper_specs false end … Read more

Submitting form and pass data to controller method of type FileStreamResult

When in doubt, follow MVC conventions. Create a viewModel if you haven’t already that contains a property for JobID public class Model { public string JobId {get; set;} public IEnumerable<MyCurrentModel> myCurrentModel { get; set; } //…any other properties you may need } Strongly type your view @model Fully.Qualified.Path.To.Model Add a hidden field for JobId to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)