小编Nig*_* Wu的帖子

Drools规则"不存在"

我正在使用JBoss Drools编写一些业务规则.我在"不存在"规则上遇到了问题.这是我的代码.

rule "ATL 27R-A12 Subfleet A319-100 Departure configuration list has flap 1"
    salience 20
    no-loop true
    when
        AircraftConfig(aircraftType=="A319-100")
        RunwayInfo(airport3lCode== "ATL", runwayId == "27R-A12" )
        not (exists (DepartureConfiguration( flap == 1 )))
    then
        throw new RuleNotMatchException("The configurations do not match the rule of this runway.");
end
Run Code Online (Sandbox Code Playgroud)

我的事实包括:An AircraftConfig,an RunwayInfo和几个DepartureConfigurations.我想在没有DepartureConfiguration它的情况下解雇规则flap=1.我的意思是,如果有三个DepartureConfigurations,其中一个有flap=1,其他的是flap=2flap=3,那么这个规则就不会发射.我怎么能做这个工作?

drools business-rules

3
推荐指数
1
解决办法
1万
查看次数

jQuery Selector [name = value]不起作用

我是jQuery的新手.使用[name = value]选择器时遇到了问题.这是HTML:

<input type="number"/>
Run Code Online (Sandbox Code Playgroud)

很简单吧?这是JS:

$("input").val(100);
$("input[value='100']").val(200)?
Run Code Online (Sandbox Code Playgroud)

结果是:脚本的第一行有效,但不是第二行.(Chrome,FF,IE9)这两行都适用于IE8.怎么会这样?顺便说一下,我正在使用jQuery1.7.2.或者你可以在http://jsfiddle.net/wzKNV/上测试上面的代码

jquery internet-explorer google-chrome jquery-selectors

2
推荐指数
1
解决办法
3227
查看次数