CRUD: limiting select options

Asked by jpy

For example, i've the following models:
@Entity
public class Song extends Model {
    public String title;

    @ManyToOne
    public Artist artist; // yes i'm aware of redundancy

    @ManyToOne
    public Album album;
}

@Entity
public class Album extends Model {

    @ManyToOne
    public Artist artist;
}

Is it possible to limit the albums displayed in the HTML select depending on the chosen artist while adding/editing Songs in CRUD.

Question information

Language:
English Edit question
Status:
Answered
For:
play framework Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
true_cp (true-cp) said :
#1

CRUD module is basically a very general framework with simple build-in function. If you would like to extend the functionality, for example add some limitation or constrain, you have to write code by hand by overrieding build-in behavior. Because there is almost no configuration for such things.

Can you help with this problem?

Provide an answer of your own, or ask jpy for more information if necessary.

To post a message you must log in.