Can Wicket allow both of the following parameters to be passed to the PageParameters object? Apparently not?
accountId which shown in URL ( /account/<ID> )infoMessage parameter not displayed in URL (bookmarkable)
I am currently using IndexedHybridUrlCodingStrategy for the page in question, and just trying the "0" and "infoMessage" parameters throw this exception:
WicketMessage: not all parameters have been encoded. Make sure that all parameter names are integers in sequential order starting from zero. Names of the current parameters: [0, infoMessage]
If I change the parameter name "infoMessage" to "1", it works, but it gives an ugly URL (in this case something like /account/42/Tosite%20108207%20tallennettiin.5 ), which is not what I want.
Now the obvious answer might be that infoMessage should not be in PageParameters . But the fact is, I tried to add it as a regular constructor parameter, for example:
public AccountPage(PageParameters parameters, String infoMessage) {
But this approach is not suitable in one important use case. After you delete the persistent Record object associated with the account, the following: does not load the account correctly (the deleted account is still displayed). This code is executed in onClick () of AjaxFallbackLink.
setResponsePage(new AccountPage(AccountPage.pageParameters(account), message));
On the other hand, my original approach ...
setResponsePage(AccountPage.class, AccountPage.pageParameters(account));
... works great because it somehow loads the AccountPage “more thoroughly”, but again, I don't know how easy it is to pass the infoMessage parameter.
( AccountPage.pageParameters() above is a simple static utility for creating the corresponding PageParameters with "0" = account identifier. The AccountPage constructor always loads the account with saving using the identifier.)
Any ideas? Perhaps using AjaxFallbackLink partially causes the problem?
Use of the gate 1.4.