<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<br><br>&gt; Date: Fri, 10 Apr 2009 17:02:14 -0700<br>&gt; From: sdoyle_2@yahoo.com<br>&gt; To: rules-users@lists.jboss.org<br>&gt; Subject: [rules-users] Keep getting error trying to access value in hash map.<br>&gt; <br>&gt; <br>&gt; I'm trying to extract the value from a hashmap after first extracting a key<br>&gt; and I keep getting the same error.<br>&gt; <br>&gt; Here is the rule information:<br>&gt; <br>&gt; target: Target();<br>&gt; perm: PermissionCheck(target == target, action == "edit", granted == false);<br>&gt; primaryKey : TargetId(targetNum == 1) from target.codes.keySet();<br>&gt; primaryCode : TargetCode() from target.codes.values[primaryKey];<br><br>when you write <i>target.codes.values[primaryKey]</i> drools looks for a getter method "getValues" in the object "codes" trying to return a field called "values".<br><br>try to replace <i>target.codes.values[primaryKey]</i> with <i>target.codes.get(primaryKey)</i><br><br>Alessandro Terrinoni<br><br><br>&gt; <br>&gt; Here is the error:<br>&gt; <br>&gt; Caused by: javax.el.ELException: /layout/test.xhtml @25,111<br>&gt; rendered="#{s:hasPermission(target,'edit')}": org.mvel.CompileException:<br>&gt; unable to resolve property: values<br>&gt;         at<br>&gt; com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)<br>&gt;         at<br>&gt; javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:390)<br>&gt;         ... 61 more<br>&gt; Caused by: org.mvel.CompileException: unable to resolve property: values<br>&gt;         at<br>&gt; org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAcces<br>&gt; sorOptimizer.java:288)<br>&gt;         at<br>&gt; org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAcce<br>&gt; ssorOptimizer.java:109)<br>&gt;         at<br>&gt; org.mvel.ast.VariableDeepPropertyNode.getReducedValueAccelerated(VariableDeepPropertyNode<br>&gt; .java:29)<br>&gt; <br>&gt; Thanks<br>&gt; -- <br>&gt; View this message in context: http://www.nabble.com/Keep-getting-error-trying-to-access-value-in-hash-map.-tp22996482p22996482.html<br>&gt; Sent from the drools - user mailing list archive at Nabble.com.<br>&gt; <br>&gt; _______________________________________________<br>&gt; rules-users mailing list<br>&gt; rules-users@lists.jboss.org<br>&gt; https://lists.jboss.org/mailman/listinfo/rules-users<br><br /><hr />Scegli fra pił di 30 stazioni!  <a href='http://clk.atdmt.com/GBL/go/140630364/direct/01/' target='_new'>Ascolta la radio su Messenger</a></body>
</html>