Passing an object to a custom control

I have custom control that I have defined two new property definitions for. Currently they are set a type: string in the properties panel for the custom control.

I need to be able to pass them an Server-Side javascript object, however the object is being rendered as a string when passed to the control.

Any ideas??

Subject: Put the object in sessionScope?..

  • Alternatively, once you’ve defined your custom properties, set them in the Source Tab and see if that works. The Design tab is shockingly limited, despite all the “blue diamonds”, and about as unwieldy as using a 20 lb sledge as a tack hammer.

  • Now that I’ve typed that, however, I’m pretty sure the Source tab won’t work. No matter how you slice it, a custom property becomes an attribute in the XML. Attributes can’t hold complex data types without some razzle-dazzle to convert to string and back. Simpler to use sessionScope, which can hold objects. If you need multiples, then put your objects into a HashMap on sessionScope and key them for retrieval.

Hope this helps…