The allowed annotation for entity properties provides a way to restrict the choices the user has when the property is used in an input:

entity Person{
  friends -> Set<Person> (allowed=from Person as p where p != this)
}
var p1 := Person{}
define page root(){
  form{
    input(p1.friends)
    submit action{} {"save"}
  } 
}

The allowed collection can now be accessed through an entity function with name allowed[PropertyName], e.g. p1.allowedFriends()

Submitted by Danny Groenewegen on 1 June 2011 at 14:22

On 1 June 2011 at 14:22 Danny Groenewegen tagged 1.2.8

On 1 June 2011 at 14:22 Danny Groenewegen closed this issue.

Log in to post comments