Type something in the “phrase” textField and then press the “new button” and type something in the next “phrase” textField, both textfields are updated with the same. Press search and the correct typed in information is stored there so it just updates a bit to much.


application searchexample

import mobl::ui::generic

type Search {
search : String
operator : String
text : String
}

control search(s : Search) {
group {
item {
selectField(s.search, [(“Bilagsnr”,“Bilagsnr”),(“Kontonr”,“Kontonr”),(“Momskode”,“Mvakode”),(“Tekst”,“Tekst”),(“TSum”,“Beløp”),(“Periode”,“Periode”)])
}
item {
selectField(s.operator, [(“=”,“=”),(“>=”,“større eller lik”),(“<=”,“mindre eller lik”),(“!=”,“ulik”),(“?=”,“inneholder”),(“)=”,“starter med”),(“(=”,“slutter med”)])
}
item {
textField(s.text, placeholder=“phrase”)
}
}
header("")
}

screen root() {
var searches = Collection(Search(search = “Bilagsnr”, operator = “=”, text = ""))

header("Search") {
	backButton()
	button("new", onclick={
		searches.add(Search(search = "Bilagsnr", operator = "=", text = ""));
	})
}

list(s in searches) {
	search(s)
}
button("Search", onclick={ searchresult(searches); })	

}

screen searchresult(searches : Collection) {
header(“Searchresult”) {
backButton()
}

group {
	list(s in searches) {
		item {
			label(s.search) label(s.operator) label(s.text)
		}
	}
}

}

Submitted by Terje Pedersen on 25 July 2011 at 11:02
bilag-sok.png30 August 2011 at 09:09

On 30 August 2011 at 09:10 Terje Pedersen commented:

Have added a screenshot of it. Do I have to change it to show only one search control? Or could I do something else getting it working as desired?


On 22 September 2011 at 08:26 Terje Pedersen commented:

Any method to get this working?


On 22 September 2011 at 08:57 Terje Pedersen commented:

I changed it to use entity istead of type, worked better.

Log in to post comments