Hi all,

I'm not sure about using the form component correctly, because my
setup ends in a Javascript exception.

Environment:
- Tapestry 5.4-alpha-15
- configuration.add(SymbolConstants.FORM_CLIENT_LOGIC_ENABLED, false);
- tapestry-beanvalidator module using Hibernate Validator 4.3.1.Final

The setup is pretty easy: there is a class RSSChannel with two String
properties, url and name, both @NotNull and there is this basic form:

<t:form t:id="form" validate="rssChannel">

    <t:errors />

    <div class="form-group">
        <t:label for="url">URL</t:label>
        <t:textfield t:id="url" value="rssChannel.url" class="form-control" />
    </div>

    <div class="form-group">
        <t:label for="name">Name</t:label>
        <t:textfield t:id="name" value="rssChannel.name" class="form-control" />
    </div>

    <t:submit />

</t:form>

In case one of the fields is empty, the correct validation errors are
reported back to the client, but I get a JS exception while Tapestry
tries to highlight the corresponding text field:

Uncaught TypeError: Object function () { return
wrapElement(document.body); } has no method 'findFirst' (fields.js,
line 20)

Is this a bug? If yes, I will create an issue.

Another question: Is it possible to create plain old HTML forms,
without all the Javascript automagically added by Tapestry? A normal
input tag isn't bound to a page property out of the box. I'm thinking
of creating leaner server-side only form components.

Thanks a lot in advance for all hints!

Thilo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to