It must be an ognl bug.  I can't think of any reason why it shouldn't work.
(and you are using the
http://opencomponentry.com/repository/m2-snapshot-repo/ right? )

http://jira.opensymphony.com/browse/OGNL

On 6/6/07, Julian Wood <[EMAIL PROTECTED]> wrote:

This works fine:

     <component id="showInactivePeople" type="Checkbox">
         <binding name="value" value="ognl:useActivePeopleOnly"/>
     </component>

     --

     @InitialValue("ognl: false") @Persist
     public abstract boolean getUseActivePeopleOnly();
     public abstract void setUseActivePeopleOnly(boolean
useActivePeopleOnly);

     @EventListener(targets = "showInactivePeople", events =
"onclick", async = true, submitForm="showActiveForm", validateForm =
false)
     public void showActivePeople(IRequestCycle cycle)
     {
         cycle.getResponseBuilder().updateComponent("peopleTable");
     }

Now my view should actually be inverted from my model:

         <binding name="value" value="ognl:!useActivePeopleOnly"/>

but that gives me a ognl.InappropriateExpressionException

ognl.SimpleNode.setValueBody(SimpleNode.java:299)
ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:208)
ognl.SimpleNode.setValue(SimpleNode.java:287)
ognl.Ognl.setValue(Ognl.java:618)
org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.writeCompiled(
ExpressionEvaluatorImpl.java:192)
...

I also tried:

         <binding name="value" value="ognl:useActivePeopleOnly ==
false"/>
         <binding name="value" value="ognl:useActivePeopleOnly !=
true"/>

with the same results. So is it me, or ognl, or tapestry that's at
fault?

Thanks,

J

--
Julian Wood <[EMAIL PROTECTED]>

Software Engineer
Teaching & Learning Centre
University of Calgary

http://tlc.ucalgary.ca





--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Reply via email to