loading table of contents...

Content Application Developer Manual / Version 2310

Table Of Contents

4.1.4 Programmatic Access to Content Beans

In order to "bootstrap" yourself into the world of content beans from the CoreMedia Unified API, you need to use the content bean factory programmatically, for example from within a Controller. The factory API is simple, the most relevant method is ContentBeanFactory#createBeanFor(Content). For example:

Content content = ... // for example through a query
Article article =

The controller needs access to the content bean factory. Since the controller itself typically is a bean defined in the application context, you can inject the factory reference into the controller object:

<bean id="myController" class="...">
  <property name="contentBeanFactory" ref="contentBeanFactory"/>

This fragment will invoke #setContentBeanFactory on the controller supplying an instance of the referenced factory.

Search Results

Table Of Contents

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.