Created
June 29, 2011 12:33
-
-
Save ignatov/1053739 to your computer and use it in GitHub Desktop.
Set values to mbr.comment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Set value to mbr.comment from mbr.tag() */ | |
private def setCurrent(mbr: MemberEntity, isSelf: Boolean) = { | |
def doo(mbr: MemberEntity, isSelf: Boolean)() = { | |
println(mbr.tag()) | |
val value = mbr.tag() match { | |
case c: Comment => c.comment.is | |
case s: String => s | |
case _ => "None" | |
} | |
println(value) | |
mbr.comment.get.update(value) | |
println(mbr) | |
println(mbr.comment) | |
Noop | |
} | |
SHtml.a(doo(mbr, isSelf) _, Text("Activate"), ("class", "button")) | |
} | |
/** Set "Value" to mbr.comment. */ | |
private def setPredefined(mbr: MemberEntity, isSelf: Boolean) = { | |
def doo(mbr: MemberEntity, isSelf: Boolean)() = { | |
val value = "Value" | |
println(value) | |
mbr.comment.get.update(value) | |
println(mbr) | |
println(mbr.comment) | |
Noop | |
} | |
SHtml.a(doo(mbr, isSelf) _, Text("Activate 'Value'"), ("class", "button")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment