1

i'm trying to create basic application on Play Frramework(1.2.2) + siena (2.0.2) + crudsiena(2.0.1) + gae(1.4). all of these i got from play's dependency management system. I was follwing sample in documentation and i got an strange error:

Not found els.list action not found

and than same "eaten" class names later in routes that was registered:

GET /admin/? els.index

GET /admin/mymodels els.list

GET /admin/mymodels/new els.blank

GET /admin/mymodels/{id} els.show

Stack trace is very strait forward to:

play.exceptions.ActionNotFoundException: Action els.index not found
    at play.mvc.ActionInvoker.getActionMethod(ActionInvoker.java:585)
    at play.mvc.ActionInvoker.resolve(ActionInvoker.java:84)
    at Invocation.HTTP Request(Play!)
Caused by: java.lang.Exception: Controller controllers.els not found
    ... 3 more

my files look like:

app/models/MyModels.java:

package models;

import controllers.CRUD;
import controllers.CRUD.For;

@For(models.MyModel.class)
public class MyModels extends CRUD {

}

app/models/MyModel.java:

package models;

import java.util.Date;

import siena.Id;
import siena.Model;

public class MyModel extends Model {
    @Id
    Long id;
    String name;
    String description;
    Integer price;
    Boolean avaliable;
    Date menuItemCreated;

}

+ route set to /admin module:crudsiena + dependencies.yml added lines about gae, siena and crudsiena

other files are left unchanged.

Does anybody know what i'm doing wrong ?

Thanks in advice.

  • Do you have index or list actions defined in your els controller ? – sojin Jul 19 '11 at 00:21
  • the problem is that there is no "els" controller. these actions are in controller.CRUD which i extend in MyModels class.So it meant to be the "MyModels" controller but for unknown reason it just cutoff some characters from start of class name. i think that this is meant by some convention , but i couldn find in documentation any word about it. – Mike Stetsyshyn Jul 19 '11 at 10:03

1 Answers1

2

Why does your controller is in the package models? shouldn't it be in package controllers?

mandubian
  • 4,427
  • 1
  • 22
  • 15
  • Thanks, seems like it helped. after some magic and moving controllers to "controllers" package it worked like it should – Mike Stetsyshyn Jul 21 '11 at 17:16
  • Don't hesitate to tell me if you have problems because generally you use crudsiena in the way explained in the doc but if you change it, some issues may happen! – mandubian Jul 21 '11 at 18:40
  • again thanks, it really helped by moving class to proper package. i'll ask if there would be some problems in future :) (but i suppose not because use crudsiena only for dev) – Mike Stetsyshyn Jul 29 '11 at 10:13