var data : [(String,String)] = []

script {
foreach(a in Address.all()) {

selectField(something, data)

Is it possible to map entity data to an selectField easier than this in mobl?

Submitted by Terje Pedersen on 7 March 2011 at 15:04

On 30 March 2011 at 11:13 Terje Pedersen commented:

Another question if I have lets say:

entity Musician {
name : String
instrument : Instrument

entity Instrument {
name : String
manufactor : String

screen root() {
var m = Musician(name=“Terje Pedersen”)

If I now want to have a selectField for all Instrument binding to m.instrument how do I do that?

On 20 January 2013 at 20:44 Brian Hayward commented:

I ran into this recently as well and was also going to ask if there was an easier way to solve this. It doesn’t seem as clean as the mobl language would want it to be. Seems like we need a entity to tuple2 mapper or something?

On 20 January 2013 at 20:46 Brian Hayward tagged !bhayward

Log in to post comments