~peter-kovac11/play/play-scala-console-improvements

« back to all changes in this revision

Viewing changes to modules/crud/app/controllers/CRUD.java

  • Committer: guillaume
  • Date: 2009-11-11 17:19:54 UTC
  • Revision ID: guillaume@macbook-pro-de-guillaume.local-20091111171954-1z761dqr0aw93747
yabe-with-scala

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
                return null;
177
177
            }
178
178
            ObjectType type = new ObjectType(entityClass);
179
 
            type.name = controllerClass.getSimpleName();
180
 
            type.controllerName = controllerClass.getSimpleName().toLowerCase();
 
179
            type.name = controllerClass.getSimpleName().replace("$", "");
 
180
            type.controllerName = controllerClass.getSimpleName().toLowerCase().replace("$", "");
181
181
            type.controllerClass = controllerClass;
182
182
            return type;
183
183
        }
186
186
            if (controllerClass.isAnnotationPresent(For.class)) {
187
187
                return ((For) (controllerClass.getAnnotation(For.class))).value();
188
188
            }
189
 
            String name = controllerClass.getSimpleName();
 
189
            String name = controllerClass.getSimpleName().replace("$", "");
190
190
            name = "models." + name.substring(0, name.length() - 1);
191
191
            try {
192
192
                return Play.classloader.loadClass(name);
279
279
 
280
280
        public List<ObjectField> getFields() {
281
281
            List fields = new ArrayList();
282
 
            for (Field f : entityClass.getFields()) {
 
282
            for (Field f : entityClass.getDeclaredFields()) {
283
283
                if(Modifier.isTransient(f.getModifiers())) {
284
284
                    continue;
285
285
                }