In this example the first list gets searched but the second stays with the initial content if you let say change search to ā€œZā€. Most likely you will use when() around them.


application searchtest

import mobl::ui::generic

entity Member {
aid : Num
name : String (searchable)
}

screen root() {
var search = ""

script {
	if(Member.all().count() == 0) {
		add(Member(aid=1, name="Terje"));
		add(Member(aid=2, name="Zef"));
		add(Member(aid=3, name="Cato"));
		add(Member(aid=4, name="Nina"));
	}
}

header("searchtest")
searchBox(search)
group {	
	header("List1")
	list(t in Member.searchPrefix(search)) {
		item { label(t.aid) " " label(t.name) }
	}
	header("List2")
	list(t in Member.searchPrefix(search)) {
		item { label(t.aid) " " label(t.name) }
	}					
}

}

Submitted by Terje Pedersen on 24 June 2011 at 15:39

On 8 July 2011 at 13:47 Zef Hemel tagged 0.4.5

On 8 July 2011 at 13:51 Zef Hemel commented:

Will be fixed in 0.4.5. This bug applied to all controls and screens with more than one list, by the way.


On 8 July 2011 at 13:51 Zef Hemel closed this issue.

Log in to post comments