@(model: play.utils.meta.ModelMetadata,
	fields: java.lang.Iterable[play.utils.meta.FieldMetadata], 
	key: Object, 
	modelForm: Form[_])

@import helper._ 
@import helper.twitterBootstrap._

@template.layout(Messages("crud.appname"), model.getName) {
        
	<h3>@if(key != null) { @Messages("crud.update") } else { @Messages("crud.new") }  @Messages(model.getName)</h3>

    @form(if(key != null) { play.utils.crud.routes.RouterCrudController.update(model.getName, key + "") } 
          else            { play.utils.crud.routes.RouterCrudController.create(model.getName) }) { 

        @for(field <- javaCollectionToScala(fields)) {
        	@if(!field.isKey && field.getWidget != null) {
        		@field.getWidget.render(modelForm)
        	}
        }
        
        <div>
           <input type="submit" class="btn btn-success" value="@if(key != null) { @Messages("crud.update") } else { @Messages("crud.create") }">
        </div>
    }
    
}

@(model: play.utils.meta.ModelMetadata,
	fields: java.lang.Iterable[play.utils.meta.FieldMetadata], 
	key: Object, 
	modelForm: play.data.Form[_])

@import helper._ 
@import helper.twitterBootstrap._

@template.layout(Messages("crud.appname"), model.getName) {
        
	<h3>@if(key != null) { @Messages("crud.update") } else { @Messages("crud.new") }  @Messages(model.getName)</h3>

    @form(if(key != null) { play.utils.crud.routes.RouterCrudController.update(model.getName, key + "") } 
          else            { play.utils.crud.routes.RouterCrudController.create(model.getName) }) { 

        @for(field <- javaCollectionToScala(fields)) {
        	@if(!field.isKey && field.getWidget != null) {
        		@field.getWidget.render(modelForm)
        	}
        }
        
        <div>
           <input type="submit" class="btn btn-success" value="@if(key != null) { @Messages("crud.update") } else { @Messages("crud.create") }">
        </div>
    }
    
}

Fix compilation error in view: use play.data.Form
Fix compilation error in view: use play.data.Form
