Thanks, Carsten, this turns out to be exactly what's happening - scripts 
included in another script cause this issue (possibly just in CQ, I haven't 
tried it in straight JR/Sling).  So in my BindingsValuesProvider, I'll have it 
check if keys exist already before adding them.

--David


-----Original Message-----
From: Carsten Ziegeler [mailto:[email protected]] 
Sent: Tuesday, November 30, 2010 2:18 AM
To: [email protected]
Subject: Re: BindingValuesProvider

Levine, David  wrote
> Hah.  Actually, it seems like any possible value is protected in CQ.  I tried 
> updating my BindingsValuesProvider quickly before leaving for the day with a 
> new key:
> 
> "org.apache.sling.api.scripting.ScriptEvaluationException: 
> java.lang.IllegalArgumentException: Key testCUData is protected."
> 
You should check if the value is already set in the bindings before
setting this. Otherwise you get the error above if a script is included
from another script (which is the case in CQ).

Carsten
-- 
Carsten Ziegeler
[email protected]

***
Scanned

**
This e-mail message is intended only for the designated recipient(s) named 
above. The information contained in this e-mail and any attachments may be 
confidential or legally privileged. If you are not the intended recipient, you 
may not review, retain, copy, redistribute or use this e-mail or any attachment 
for any purpose, or disclose all or any part of its contents.  If you have 
received this e-mail in error, please immediately notify the sender by reply 
e-mail and permanently delete this e-mail and any attachments from your 
computer system.

Reply via email to