Wrong usage of #field in yabe tutorial

Bug #617540 reported by niels
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
New
Undecided
Unassigned

Bug Description

Based on http://groups.google.com/group/play-framework/browse_thread/thread/7707253f309970a5# I send this bug-report:
In guide9 of the tutorial is an bug in the form.html.
The field in the form.html will not be marked in case of an error.
The reason seems to be that it must be ${errors.forKey('post.title')} instead of ${field.errorClass} because
the field is defined at title. But then the whole concept of the field-tag is broken.
So I wonder if this could be a better solution:

    <p>
        #{field 'post.content'}
        <label>Write here:</label>
        <textarea name="content"
            class="${field.errorClass}">${field.value}</textarea>
        #{/field}
    </p>

Seems to work too, you only have to set name="content", otherwise the
action can't be called correctly.
Is this the optimum or is there a more elegant way?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.