我正在尝试让javax.validation在Tomcat 7上运行.
我已经进入了我的WEB_INF/lib:hibernate-validator-4.3.0以及slf4j-api-1.7.1和slf4j-simple-1.7.1.
当我运行我的代码时,验证被忽略了!它在玻璃鱼上工作正常,有没有其他人有这个问题?
干杯! NFV
使用jQuery和formatCurrency扩展如下:
$(function() {
$(".currency").blur(function(){ formatCurrencyInput(this) });
});
function formatCurrencyInput(input) {
if($(input).val() != '') {
if(isNumeric($(input).val())) {
$(input).formatCurrency(null,{groupDigits:false,roundToDecimalPlace:2,symbol:'£'});
$(input).css('border-color', '');
}
else {
$(input).css('border-color', '#FFCCCC');
}
}
}
Run Code Online (Sandbox Code Playgroud)
具有"货币"类的所有文本输入都从45 =>£45.00转换为例如.
奇怪的是,如果formatCurrencyInput函数在该部分中定义,它可以正常工作.如果我将函数外部化为.js文件,它将返回£45.00(注意Â字符).我想这是一个字符编码问题,但我该如何解决这个问题呢?
我想在 jstl 标签内使用 StringUtils.abbreviate(),是否有用于此的 taglib 位置?
我搜索了公共站点和网络,但找不到示例。是否有一种通用的方法也可以找到 taglib 位置,也许在 javadoc 树的标准位置?
谢谢!网卡
我试图在这里遵循播放框架ebean教程:
http://www.playframework.com/documentation/2.1.2/JavaEbean
但是,当我尝试包含play.db.ebean.*并尝试编译时,找不到包(没有play.db包).我已将ebean.default ="models.*"添加到我的application.conf中
我还需要做些什么来获得依赖吗?例如,有没有相当于玩游戏1.2的游戏?
追踪:
[error] /home/nfv/workspace-scala/scims/app/models/Person.scala:3: object db is not a member of package play
[error] import play.db.ebean.Model;
[error] ^
[error] /home/nfv/workspace-scala/scims/app/models/Person.scala:5: not found: type Model
[error] class Person extends Model {
[error] ^
[error] two errors found
[error] (compile:compile) Compilation failed
[error] Total time: 4 s, completed 09-Sep-2013 11:23:00
Run Code Online (Sandbox Code Playgroud)
干杯NFV
我有以下specs2测试:
package concurrent
import akka.actor.{Props, actorRef2Scala}
import akka.testkit.TestActorRef
import scala.concurrent.duration._
class MessageCoordinatingActorSpec extends ActorBaseSpec {
"MessageCoordinatingActor" should {
"receive a Result and update the related token and status" in {
val (repositoryActorProbe, messageCoordinatingActorRef) = buildMockMessageCoordinatingActor
val addresses = MockSession.getTestAddressesWithServicesAt(
"16 Main Street", List("Service1", "Service2"))
val postCode = Postcode("NE28 9QR", addresses)
val matchedAddr = addresses.find(_.addrToken=="16 Main Street")
messageCoordinatingActorRef ! Result(LookupResult(
LookupStatus.ServicesAvailable, postCode, matchedAddr, true), testRecord)
//Expect message to persist the virgin postcode record
repositoryActorProbe.expectMsg(pairLongToDuration(3, SECONDS),
PersistPostcode(postCode))
1 mustEqual 1
}
} …Run Code Online (Sandbox Code Playgroud)