[
https://issues.apache.org/jira/browse/CLK-667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12863157#action_12863157
]
Andrey Rybin commented on CLK-667:
----------------------------------
Also SpringClickServlet can get all fields and methods of Page annotated with
@Autowired and inject them.
It looks not so hard to implement, but covers (IMHO) 80% of functionality.
> Spring servlet should support stateful pages with transient beans
> -----------------------------------------------------------------
>
> Key: CLK-667
> URL: https://issues.apache.org/jira/browse/CLK-667
> Project: Click
> Issue Type: Bug
> Components: extras
> Affects Versions: 2.1.0
> Reporter: Bob Schellink
> Assignee: Bob Schellink
> Fix For: 2.2.0
>
>
> SpringClickServlet currently injects beans only for newly created page
> instances. This works well for stateless pages but not for stateful pages
> that have been serialized/deserialized. After a stateful pages has been
> deserialized, the bean references are null.
> ClickServlet provides the #activePage hook which can be used to re-inject
> beans after deserialization.
> Unfortunately this fix will only apply to "Click created pages with bean
> injection" or option 3 described in the SpringClickServlet. Option 1 and 2,
> where Spring itself creates the Click pages and inject beans, does not work
> after deserialization because Spring does not re-initialize the page. Its
> possible to inject serializable proxies instead of direct references, however
> that could mean relying in byte code generation.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.