[jira] [Updated] (WICKET-5698) WebApplication#unmount() unmounts the whole compound mapper if some of its inner ones matches
[ https://issues.apache.org/jira/browse/WICKET-5698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesse Long updated WICKET-5698: --- Attachment: WICKET-5698-3.patch WICKET-5698-3.patch I agree that IRequestMapperDelegate is a slightly less accurate name, but that consistency is more important in this case. I have attached an updated patch. As a side effect of the rename, protected final CryptoMapper#getWrappedMapper() has been renamed to #getDelegateMapper(). Slight further incompatibility with Wicket 6, felt only by subclasses of CryptoMapper. > WebApplication#unmount() unmounts the whole compound mapper if some of its > inner ones matches > - > > Key: WICKET-5698 > URL: https://issues.apache.org/jira/browse/WICKET-5698 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 7.0.0-M3, 6.17.0 >Reporter: Martin Grigorov >Assignee: Martin Grigorov > Fix For: 6.18.0, 7.0.0-M4 > > Attachments: WICKET-5698-2.patch, WICKET-5698-3.patch, > WICKET-5698.patch > > > From dev@ mailing lists: http://markmail.org/message/wmdgbrhvrvaeygvr > WebApplication.unmount() calls getRootRequestMapperAsCompound(), and > calls unmount() on that. > getRootRequestMapperAsCompound() checks if the root request mapper is a > compound, if not, wraps it in a compound, sets the compound as root and > returns the compound. > CompoundRequestMapper.unmount() identifies which of the mappers added > directly to the compound handle the url, and removes them. > The problem: > If the original root mapper was a single wrapper, or layer of wrappers, > with the actual mounted mapper wrapped some levels down, then the whole > wrapper is removed, not just the specific MountedMapper that is wrapped. > This has the effect of removing every single mapper, leaving root mapper > as an empty compound. > I would like to attempt to provide a patch to fix this, but would like > guidance on the approach. I have come up with three approaches: > 1. Introduce interface IWrappedRequestMapper. This will be an interface > which has one method: IRequestMapper getWrappedRequestMapper(). We can > then have all wrapper mappers implement this and work down the tree to > find the correct MountedMapper (wicket 6) to remove. > 2. Have WebApplication hold a reference to a specific > CompoundRequestMapper, and have all mount()/unmount() operations add and > remove from this mapper. This compound would need to be added to the > default list during init. This makes it complicated to work out how to > do things like have CryptoMapper not apply to mounted pages. > 3. Add method unmount() to IRequestMapper, so that wrappers can > delegate. This obviously can only be done in wicket 7, but we're making > mounting a problem of every single request mapper, when not even > Application cares about mounting. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (WICKET-5698) WebApplication#unmount() unmounts the whole compound mapper if some of its inner ones matches
[ https://issues.apache.org/jira/browse/WICKET-5698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesse Long updated WICKET-5698: --- Attachment: WICKET-5698-2.patch Lets do that without ConcurrentModificationExceptions > WebApplication#unmount() unmounts the whole compound mapper if some of its > inner ones matches > - > > Key: WICKET-5698 > URL: https://issues.apache.org/jira/browse/WICKET-5698 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 7.0.0-M3, 6.17.0 >Reporter: Martin Grigorov >Assignee: Martin Grigorov > Fix For: 6.18.0, 7.0.0-M4 > > Attachments: WICKET-5698-2.patch, WICKET-5698.patch > > > From dev@ mailing lists: http://markmail.org/message/wmdgbrhvrvaeygvr > WebApplication.unmount() calls getRootRequestMapperAsCompound(), and > calls unmount() on that. > getRootRequestMapperAsCompound() checks if the root request mapper is a > compound, if not, wraps it in a compound, sets the compound as root and > returns the compound. > CompoundRequestMapper.unmount() identifies which of the mappers added > directly to the compound handle the url, and removes them. > The problem: > If the original root mapper was a single wrapper, or layer of wrappers, > with the actual mounted mapper wrapped some levels down, then the whole > wrapper is removed, not just the specific MountedMapper that is wrapped. > This has the effect of removing every single mapper, leaving root mapper > as an empty compound. > I would like to attempt to provide a patch to fix this, but would like > guidance on the approach. I have come up with three approaches: > 1. Introduce interface IWrappedRequestMapper. This will be an interface > which has one method: IRequestMapper getWrappedRequestMapper(). We can > then have all wrapper mappers implement this and work down the tree to > find the correct MountedMapper (wicket 6) to remove. > 2. Have WebApplication hold a reference to a specific > CompoundRequestMapper, and have all mount()/unmount() operations add and > remove from this mapper. This compound would need to be added to the > default list during init. This makes it complicated to work out how to > do things like have CryptoMapper not apply to mounted pages. > 3. Add method unmount() to IRequestMapper, so that wrappers can > delegate. This obviously can only be done in wicket 7, but we're making > mounting a problem of every single request mapper, when not even > Application cares about mounting. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (WICKET-5698) WebApplication#unmount() unmounts the whole compound mapper if some of its inner ones matches
[ https://issues.apache.org/jira/browse/WICKET-5698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesse Long updated WICKET-5698: --- Attachment: (was: WICKET-5698-2.patch) > WebApplication#unmount() unmounts the whole compound mapper if some of its > inner ones matches > - > > Key: WICKET-5698 > URL: https://issues.apache.org/jira/browse/WICKET-5698 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 7.0.0-M3, 6.17.0 >Reporter: Martin Grigorov >Assignee: Martin Grigorov > Fix For: 6.18.0, 7.0.0-M4 > > Attachments: WICKET-5698.patch > > > From dev@ mailing lists: http://markmail.org/message/wmdgbrhvrvaeygvr > WebApplication.unmount() calls getRootRequestMapperAsCompound(), and > calls unmount() on that. > getRootRequestMapperAsCompound() checks if the root request mapper is a > compound, if not, wraps it in a compound, sets the compound as root and > returns the compound. > CompoundRequestMapper.unmount() identifies which of the mappers added > directly to the compound handle the url, and removes them. > The problem: > If the original root mapper was a single wrapper, or layer of wrappers, > with the actual mounted mapper wrapped some levels down, then the whole > wrapper is removed, not just the specific MountedMapper that is wrapped. > This has the effect of removing every single mapper, leaving root mapper > as an empty compound. > I would like to attempt to provide a patch to fix this, but would like > guidance on the approach. I have come up with three approaches: > 1. Introduce interface IWrappedRequestMapper. This will be an interface > which has one method: IRequestMapper getWrappedRequestMapper(). We can > then have all wrapper mappers implement this and work down the tree to > find the correct MountedMapper (wicket 6) to remove. > 2. Have WebApplication hold a reference to a specific > CompoundRequestMapper, and have all mount()/unmount() operations add and > remove from this mapper. This compound would need to be added to the > default list during init. This makes it complicated to work out how to > do things like have CryptoMapper not apply to mounted pages. > 3. Add method unmount() to IRequestMapper, so that wrappers can > delegate. This obviously can only be done in wicket 7, but we're making > mounting a problem of every single request mapper, when not even > Application cares about mounting. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (WICKET-5698) WebApplication#unmount() unmounts the whole compound mapper if some of its inner ones matches
[ https://issues.apache.org/jira/browse/WICKET-5698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesse Long updated WICKET-5698: --- Attachment: WICKET-5698-2.patch WICKET-5698-2.patch - A neatened up version of the patch, with tests. Summary of patch: Add new interface IWrappedRequestMapper to mark wrapping request mappers. Implement IWrappedRequestMapper where appropriate. Remove ICompoundRequestMapper#unmount(), as WebApplication now takes responsibility for this. Remove package private CompoundRequestMapper#size() which was only used in now non-existant tests. Implement mapper tree traversing unmount in WebApplication. Create WebApplicationTest to test unmounting. > WebApplication#unmount() unmounts the whole compound mapper if some of its > inner ones matches > - > > Key: WICKET-5698 > URL: https://issues.apache.org/jira/browse/WICKET-5698 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 7.0.0-M3, 6.17.0 >Reporter: Martin Grigorov >Assignee: Martin Grigorov > Fix For: 6.18.0, 7.0.0-M4 > > Attachments: WICKET-5698-2.patch, WICKET-5698.patch > > > From dev@ mailing lists: http://markmail.org/message/wmdgbrhvrvaeygvr > WebApplication.unmount() calls getRootRequestMapperAsCompound(), and > calls unmount() on that. > getRootRequestMapperAsCompound() checks if the root request mapper is a > compound, if not, wraps it in a compound, sets the compound as root and > returns the compound. > CompoundRequestMapper.unmount() identifies which of the mappers added > directly to the compound handle the url, and removes them. > The problem: > If the original root mapper was a single wrapper, or layer of wrappers, > with the actual mounted mapper wrapped some levels down, then the whole > wrapper is removed, not just the specific MountedMapper that is wrapped. > This has the effect of removing every single mapper, leaving root mapper > as an empty compound. > I would like to attempt to provide a patch to fix this, but would like > guidance on the approach. I have come up with three approaches: > 1. Introduce interface IWrappedRequestMapper. This will be an interface > which has one method: IRequestMapper getWrappedRequestMapper(). We can > then have all wrapper mappers implement this and work down the tree to > find the correct MountedMapper (wicket 6) to remove. > 2. Have WebApplication hold a reference to a specific > CompoundRequestMapper, and have all mount()/unmount() operations add and > remove from this mapper. This compound would need to be added to the > default list during init. This makes it complicated to work out how to > do things like have CryptoMapper not apply to mounted pages. > 3. Add method unmount() to IRequestMapper, so that wrappers can > delegate. This obviously can only be done in wicket 7, but we're making > mounting a problem of every single request mapper, when not even > Application cares about mounting. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (WICKET-5698) WebApplication#unmount() unmounts the whole compound mapper if some of its inner ones matches
[ https://issues.apache.org/jira/browse/WICKET-5698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov updated WICKET-5698: Attachment: WICKET-5698.patch Attaching Jesse Long's patch from dev@ mail thread. > WebApplication#unmount() unmounts the whole compound mapper if some of its > inner ones matches > - > > Key: WICKET-5698 > URL: https://issues.apache.org/jira/browse/WICKET-5698 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 7.0.0-M3, 6.17.0 >Reporter: Martin Grigorov >Assignee: Martin Grigorov > Fix For: 6.18.0, 7.0.0-M4 > > Attachments: WICKET-5698.patch > > > From dev@ mailing lists: http://markmail.org/message/wmdgbrhvrvaeygvr > WebApplication.unmount() calls getRootRequestMapperAsCompound(), and > calls unmount() on that. > getRootRequestMapperAsCompound() checks if the root request mapper is a > compound, if not, wraps it in a compound, sets the compound as root and > returns the compound. > CompoundRequestMapper.unmount() identifies which of the mappers added > directly to the compound handle the url, and removes them. > The problem: > If the original root mapper was a single wrapper, or layer of wrappers, > with the actual mounted mapper wrapped some levels down, then the whole > wrapper is removed, not just the specific MountedMapper that is wrapped. > This has the effect of removing every single mapper, leaving root mapper > as an empty compound. > I would like to attempt to provide a patch to fix this, but would like > guidance on the approach. I have come up with three approaches: > 1. Introduce interface IWrappedRequestMapper. This will be an interface > which has one method: IRequestMapper getWrappedRequestMapper(). We can > then have all wrapper mappers implement this and work down the tree to > find the correct MountedMapper (wicket 6) to remove. > 2. Have WebApplication hold a reference to a specific > CompoundRequestMapper, and have all mount()/unmount() operations add and > remove from this mapper. This compound would need to be added to the > default list during init. This makes it complicated to work out how to > do things like have CryptoMapper not apply to mounted pages. > 3. Add method unmount() to IRequestMapper, so that wrappers can > delegate. This obviously can only be done in wicket 7, but we're making > mounting a problem of every single request mapper, when not even > Application cares about mounting. -- This message was sent by Atlassian JIRA (v6.3.4#6332)