Actual behaviour:

  • code contains:
    var usr := User{};
    form{
    table{
    row{ "Name: " input(usr.name) }
    // …
  • User entity has no name declared
  • no errors show up at build time.
  • when accessing the form after subsion a 500 erro shows up:
    java.lang.Error: Unresolved compilation problem:
    The method setName(String) is undefined for the type User

    exampleapp.beans.loginForm_Template.storeInputsInternal(loginForm_Template.java:1294)
    exampleapp.beans.loginForm_Template.storeInputs(loginForm_Template.java:68)
    exampleapp.beans.templateargument1_Template.storeInputsInternal(templateargument1_Template.java:477)
    exampleapp.beans.templateargument1_Template.storeInputs(templateargument1_Template.java:68)
    exampleapp.beans.mainString_Template.storeInputsInternal(mainString_Template.java:1652)
    exampleapp.beans.mainString_Template.storeInputs(mainString_Template.java:70)
    exampleapp.beans.login_Template.storeInputsInternal(login_Template.java:477)
    exampleapp.beans.login_Template.storeInputs(login_Template.java:68)
    exampleapp.beans.LoginPage.serve(LoginPage.java:80)
    utils.DispatchServletHelper.handlePage(DispatchServletHelper.java:316)
    utils.DispatchServletHelper.doServe(DispatchServletHelper.java:281)
    utils.DispatchServlet.doPost(DispatchServlet.java:47)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

Expected behaviour:

  • Error at compile time
Submitted by Tim on 26 February 2010 at 15:29

On 26 February 2010 at 15:47 Lennart Kats commented:

Possible duplicate of WebDSL/33.


On 26 February 2010 at 15:51 Danny Groenewegen commented:

Note that the ‘name’ property is special case, it is declared for each entity (default is the id if there is no name property, derived property, or property with name annotation). The name property is used as the reference to an entity in inputs, e.g. input of a Set. However, it is not always a real property that can be assigned to, and there should indeed be a check that ensures there are no inputs or assignments in that case.

Log in to post comments