[
https://issues.apache.org/jira/browse/WICKET-649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526935
]
Ate Douma commented on WICKET-649:
----------------------------------
Fixing IOnChangeListener components with
wantOnSelectionChangedNotifications()==true:
The IOnChangeListener components which have
wantOnSelectionChangedNotifications() set (question: why is this method not
part of the IOnChangeListener interface?),
generate a listener callback url send back to Wicket using either:
a) a hidden field if the component is part of a form
b) by setting the window.location.href when clicked
Both these methods are problematic in a portlet context wherein the (base)
callback url is encoded as portlet url.
For method a), the url stored in the hidden field is decoded by Wicket itself
and bypasses the portal for decoding the embedded wicket url.
So, for this method not the generated portlet url needs to be stored in the
hidden field but the wicket url used to generate the portlet url...
Luckily, the PortletRequestContext already saves the last encoded wicket url
internally (for redirect checks mainly), so as long as no other portlet url is
generated,
this internally stored wicket url can be retrieved back to be used as (base)
callback url in the hidden field.
And, as in all current implementations (o.a.w.markup.html.form.Check,
.CheckBox, .DropDownChoice, .Radio, .RadioChoice) the portlet url is generated
just before in the same code block,
this solution can savely be used.
For method b) however, I don't have a solution yet :(
As already described above for the Wicket.Ajax.Request.get() problem, the only
way to solve this is using a POST (form) solution.
But in this case it cannot done through an Ajax request but needs to be
performed on the client main browser window.
So, to properly solve this, we need to provide or dynamically create a
special/extra form!
I have only found 1 example in wicket-examples which uses method b): DatesPage.
For now I will "solve" the DatesPage example with a very minor change by moving
its LocaleDropDownChoice component inside a new "localeForm" , thereby
switching it to use method a).
A real solution for method b) still needs to be found, but how to do that needs
some discussion first.
> New Wicket Portlet support: fix appending query parameters
> ----------------------------------------------------------
>
> Key: WICKET-649
> URL: https://issues.apache.org/jira/browse/WICKET-649
> Project: Wicket
> Issue Type: Sub-task
> Components: wicket-portlet
> Affects Versions: 1.3.0-beta2, 1.3.0-beta3
> Reporter: Ate Douma
> Assignee: Ate Douma
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.