As we know beehive controls are powerful like Database control. We will access the control in a controller or control using @Control but in normal Java classes we can use this annotation.
We can access control object outside beehive context by following:
ControlTestContainerContext ctcc = new ControlTestContainerContext();
ctcc.beginContext();
SampleCTL CTL = Controls.instantiate(SampleCTLBean.class, null, ctcc, null);
SampleCTL - control interface
SampleCTLBean - Control's Bean class, which generated by beehive apt compiler.
In this way we can use the beehive system controls, in Restful services, Servlet and Java application.
Happy coding.
We can access control object outside beehive context by following:
ControlTestContainerContext ctcc = new ControlTestContainerContext();
ctcc.beginContext();
SampleCTL CTL = Controls.instantiate(SampleCTLBean.class, null, ctcc, null);
SampleCTL - control interface
SampleCTLBean - Control's Bean class, which generated by beehive apt compiler.
In this way we can use the beehive system controls, in Restful services, Servlet and Java application.
Happy coding.
Comments
Post a Comment