|
|
|
Ok, I'll try to explain:
My component jwc: <component-specification allow-body="no" allow-informal-parameters="yes" class="de.actano.rplan.pc.web.components.DetailPanel"> <parameter name="disabled" required="no" default-value="false"> <description>Boolean value</description> </parameter> ... <component id="cmbAdd" type="DropDown"> <binding name="disabled" value="disabled"/> ... </component> ... <component id="commentEditor" type="CommentEditor"> <binding name="disabled" value="commentEditorDisabled"/> ... </component> ... </component-specification> My component class: public abstract class DetailPanel extends BaseComponent { public abstract boolean isDisabled(); ... public boolean isCommentEditorDisabled() { // Some extended checks.... } } So, when component "cmbAdd" is being rendered, it asks for its property "disabled", which should return the value "disabled" from the parent component "DetailPanel", but instead of doing this, we'll jump into the method "isCommentEditorDisabled" in the class "DetailPanel". Let me say, that we have lots more of this is...EditorDisabled" in this class. I've debugged into OGNL class "OgnlRuntime", method "public static Method getReadMethod(Class target, String name, int numParms)" to see, whats happen. There are three loops to find the correct getter method named "isDisabled" is our case. But as the first loop doesn't check for methods starting with "is" or "has", we'll go into the second loop, which only checks, if the method ends with the name of the method to find, doesn't start with "set" and if the returnType is VOID - which is also true for "isCommentEditorDisabled". And because this method comes first in the method array, it is returned first. I haven't checked the code from OGNL 2.6.7, but with this version, all went fine... Oops, I mean "...the returnType isn't VOID"
| ||||||||||||||||||||||||||||||||||||||||||||||
If you can show me a sample expression and a sample of the specific object types / values involved then that will help a lot.