I'm having trouble creating a page, which requires two different databases..
The controller is automaticly set to 'DB2', which is also specified in the database config file.
When i add a var $uses = array ('groups') to the controller, which is from the other DB (DB1), i get the data from only DB2 and all requests to DB1 become a inval...
Guys and girls,
I have been working on this problem for a while but still no joy. This is my second question within this general area, because the last question was getting too long and this is now more well-defined.
Summary of the Problem:
I am loading a page for my customers and I get error:
undefined method 'name' for Nil:NilClass...
for example:
When the MEM CTRLER wants a instruction register to be populated with the DATA which the next ADDR REGISTER points to.
Does it send a signal to the ADDR REGISTER to place the next ADDR on the ADDR bus or does the ADDR go to the MEM CTRLER and is placed on the BUS by the MEM CTRLER?
...
Hi,
I am using search display controller and a search bar. When i click inside the serach bar the keyboard appears. When i navigate away to another page , the keyboard does not disappear and stays in the same page. Can you please help me ?
Thanks,
Andy.
...
I usually see Ruby on Rails books using
script/generate model Story name:string link:string
which is a singular Story, while when it is controller
script/generate controller Stories index
then the Story now is Stories, which is plural.
Is this a standard on Ruby on Rails? Is it true in other MVC frameworks too, like CakePHP, Symf...
I'm having a tough go trying to figure out what I need to mock in my tests to show that UrlHelper.RouteUrl() is returning the right URL. It works, but I'd like to have the right test coverage. The meat of the controller method looks like this:
var urlHelper = new UrlHelper(ControllerContext.RequestContext);
return Json(new BasicJsonMess...
Hi,
I'm struggling to read an int from the hidden field on aspx page.
<input type = "hidden" id = "myIntegerId" name = "integerId" value= "<%: Model.MyObjectId %>" runat = "server" />
The value is definately on the form, I can see it in the debugger and print it with <%: %>
When I read the form values in the controller, instead of ...
Hai
Can anyone guide me on How to customize the Tabbar such that each TabBarItem look like rounded button in Tabbar. and how to change the Tabbar Selection color.
...
Hello,
I'm working on a project where the data model is :
implemented in a separate gem
does not use ActiveRecord, nor any relational database storage ( actually it relies on couchdb )
makes usage of namespaces
makes intensive usage of class inheritance
To simplify the schema, let's say we have the following root class :
module ...
Hi, I'm studing asp.net mvc and in my test project I have some problems with inheritance:
In my model I use inheritanse in few entities:
public class Employee:Entity
{
/* few public properties */
}
It is the base class.
And descendants:
public class RecruitmentOfficeEmployee: Employee
{
public virtual Rec...
Hi,
I tried from a controller to use grailsApplication information to create some folder, however,
what I got from the following line of code is "false" - my grails application runs well, though....
File(grailsApplication.config.images.location.toString()).mkdirs()
could some one help, please?
thanks.
edit: thank you leebutts for...
Few questions:
Is it possible to call a controller method in a helper module (e.g., application helper)?
If so, how does the helper handle the rendering of views? Ignore it?
In what instances would you want to call a controller method from a helper? Is it bad practice?
Do you have any sample code where you're calling controller method...
Hello,
My application is following the MVC design pattern. The problem I keep running into is needing to call methods inside a Controller class from outside that Controller class (ex. A View class wants to call a Controller method, or a Manager class wants to call a Controller method). Is calling Controller methods in this way allowed ...
I'm new to grails. How do I test a form command object to make sure that it's working? Here's some setup code in a test. When I try to do it, I get the following exceptions:
Error occurred creating command object.
org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Error occurred creating command object.
...
I have a controller that uses a command object in a controller action. When mocking this command object in a grails' controller unit test, the hasErrors() method always returns false, even when I am purposefully violating its constraints. The more baffling thing is that in production, hasErrors() works! So this is just a testing problem....
Hi, I'd like to implement a base controller on one of my controllers. Within that base controller, I'd like to be able to get the current executing ActionResult name.
How would I go about doing this?
public class HomeController : ControllerBase
{
public ActionResult Index()
{
And;
public class ControllerBase : Controller
{
...
How to check what controller and method are called?
In html in body tag there is: <body id="somethingThatDependsOnControllerAndMethod">. id value will be assigned based on controller and it's method.
...
I want to pass the attributes associated with two objects into a path created from a route. In this case, the _url is skip_contact_letter_url. contact_letter and letter are passed through a render partial. The clip below resides in the partial.
<%= link_to_remote "Skip Letter Remote #{contact_letter}",
:url => skip_contact_le...
I don't really know where to look for an error... the situation: I have an ASPX view which contains a form and a few input's, and when I click the submit button everything is POST'ed to one of my ASP.NET MVC actions.
When I set a breakpoint there, it is hit correctly. When I use FireBug to see what is sent to the action, I correctly see...
I wrote a base class to help build my controllers more quickly and to remove duplication. It provides some helper methods, default actions and some meta programming to make these things easier to build.
One of those methods in the base class is like this:
def dynamicList(Class clazz) {
def model = new LinkedHashMap()
model[getM...