I'm wondering if setting an unbound parameter programmatically in T4 should
be similar to the way that the IComponentVisitor classes do it, by manually
creating a binding and setting that. I suppose I could try that...
On 8/31/05, The Chris Method <[EMAIL PROTECTED]> wrote:
>
> I have a component that runs through all components inside of it and sets
> the anchor for any that are a DirectLink. So there are two lines like this:
>
> DirectLink link = (DirectLink) iter.next();
> link.setProperty("anchor", getAnchorName());
>
> I get this error:
>
> *caused by*
> *org.apache.hivemind.ApplicationRuntimeException*<http://localhost:8080/#>:
> Parameter 'anchor' is not bound and can not be updated.
> $DirectLink_944#setAnchor ($DirectLink_944.java:-1)
> sun.reflect.NativeMethodAccessorImpl#invoke0
> sun.reflect.NativeMethodAccessorImpl#invoke
> sun.reflect.DelegatingMethodAccessorImpl#invoke
> java.lang.reflect.Method#invoke
> org.apache.hivemind.util.PropertyAdaptor#write (PropertyAdaptor.java:92)
> org.apache.hivemind.util.ClassAdaptor#write (ClassAdaptor.java:62)
> org.apache.hivemind.util.PropertyUtils#write (PropertyUtils.java:54)
> org.apache.tapestry.AbstractComponent#setProperty
> (AbstractComponent.java:711)
>
>
> "anchor" is defined in the DirectLink.jwc as a parameter. Why can't I set
> the value programmatically? This worked in the last version of Tapestry, so
> I'm sure this is just a case of my lack of understanding about the way
> bindings and parameters are working in Tapestry 4.
>
>