You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Andi Huber (Jira)" <ji...@apache.org> on 2021/12/06 06:50:00 UTC
[jira] [Resolved] (ISIS-2903) Recreation fails for ViewModels containing Entities
[ https://issues.apache.org/jira/browse/ISIS-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andi Huber resolved ISIS-2903.
------------------------------
Resolution: Fixed
{color:#1d1c1d}I found that {color}_Action_{color:#1d1c1d} clicks do trigger their own AJAX request-cycle in {color}{_}Wicket{_}{color:#1d1c1d}, which we historically used to build the Action-result's {color}{{EntityPage}}{color:#1d1c1d} instance and then passed this instance to {color}{{RequestCycle.get().setResponsePage(entityPage)}}{color:#1d1c1d} for Wicket to render with the next request-cycle{color}{_}.{_} {color:#1d1c1d}I also learned, when this next request-cycle happens to run on a different thread, this will not work.{color}{color:#1d1c1d}A first fix I have done, is to not build the {color}{{EntityPage}}{color:#1d1c1d} within the AJAX request-cycle, instead just create the bookmark for the Action's result, which we then pass over to the next request-cycle, that renders the page using {color}{{{}PageParameters{}}}{color:#1d1c1d}. That way we guarantee, the {color}{{EntityPage}}{color:#1d1c1d} is built from scratch before rendering. Meaning, all contained entities are also attached to their persistence layer.{color}
> Recreation fails for ViewModels containing Entities
> ---------------------------------------------------
>
> Key: ISIS-2903
> URL: https://issues.apache.org/jira/browse/ISIS-2903
> Project: Isis
> Issue Type: Bug
> Components: Isis Core, Isis Examples Demo App
> Reporter: Andi Huber
> Assignee: Andi Huber
> Priority: Blocker
> Fix For: 2.0.0-M7
>
>
> reproduce ... [Demo] Nature Stateful Refs Entity
> Various glitches:
> 'add Child' ... no choices given
> 'add All' ... throws
> java.lang.IllegalStateException: entity demo.JaxbRefEntity is required to have a memoized ID, otherwise cannot re-attach
> Also click on VM's title (reload page) throws.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)