Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Read Datums from controllers
rangandr
Developer documentation is not clear on whether or not it is possible to read component datum's that are configurable by content editors in controller code.
Datum values that are declared in appearance XML or content XML and readable in the context from externals do not seem to be visible during a form post to a controller method.
Any ideas? Thanks!
Find more posts tagged with
Comments
AlexC
In TS 6.7.2 and LS 3.1 it is possible and Controllers can have their own Parameters section with Datums that are specific to the controller and can be adjusted at design time.
See the Login.component for an example of this.
Controllers have always had their own simple name/value pair with something like:
[HTML]
<Controller Name="something">
<Param Name="name">some value</Param>
</Controller>
[/HTML]
But this is old notation used in 3.0.x days and Parameters are recommended for 3.1 and newer.
rangandr
Thanks for the reply.
As with the Login component, <Controller><Param> 's are not exposed to the page editor under the Content tab when editing an instance of the component on a page.
A workaround might be to convert datum values (which are configurable by LS users) into hidden form inputs when the view is rendered and have the controller read on submit - but in our case, these values should not be exposed client-side.
Another idea would be to have the external write datum values to the session for the controller but we're looking for a better solution...