New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URL generation for links and resources doesn't work in Liferay environment #172
Comments
It's a "Wicket problem". See my comments here: My solutions: either you provide custom URLRenderer as in this fork of portlets integration for Wicket 6: https://github.com/zeratul021/core/commit/0209130543de8490a4972f55164c9900d2951a28 or use some bridging similar to: |
Thanks Marek. |
Hi, well I can''t speak for the core team, but I didn't get any specific answer/follow-up on this problem. wicketstuff-portlet should be a bridge, and does quite intervening stuff regarding core request cycle funtionality. So even if it may seem as too intrusive, custom UrlRenderer probably fits just right in Any way, I see 4645 as a regression for "portlet initiative" and unfortuantelly I didn't study the issue completely to understand why such fix was needed. I will try to have a look at it this week and see if something can be done. Trivially it's a matter of three lines of code being reintroduced. P.S. I didn't notice link URL problems. |
Appreciate your comment. I just noticed that Martin marked the bug I reported (https://issues.apache.org/jira/browse/WICKET-4882) as invalid and suggested focusing on UrlRenderer. Considering that, do you think wicket-portlet could provide the implementation that is going to address that issue. To be honest I'm still hoping that it can be solved without the need to maintain our own version of wicketstuff/wicket. |
Yes, I think so. But:
So for the sake of commit readability in branches I would not merge from my master to 1.5 branch - everything would be marked as changed (code formatting, code cleanup, etc..) |
Thanks for your efforts Marek. |
Really nothing to thank for, at least for now. |
Is it the same problem?: in Wicket6.6.0 resource URLs for DefaultNestedTree renders like: where geo_editor1 - dir in Portlet name is "geo_editor", and this is missing in URL, right? I made modifications |
Wicket 6.7.0, wicketstuff-portlet 6.5.0 - not solved problem with missing porlet name, see comment above 172#issuecomment-15390878 |
The issue andreynek reported prevented us from using ajax in wicket portlets as the ajax jquery scripts were not properly loaded. Managed to fix this by customizing PortletRequestMapper#encodeSharedResourceUrl urlBuilder. request.getFilterpath() seemed to return empty string. I changed this to ThreadPortletContext.getHttpServletRequest().getServletPath() and now it seems to work properly. This might not be the proper way to fix this and maybe one should just figure out why the filterpath was empty but for now this will do. |
I tried to use AjaxEditableLabel to modify PortletPreferences; Liferay 6.2 CE & Wicket 6.18.0. I think there is no any better solution than initially suggested https://github.com/zeratul021/core/commit/0209130543de8490a4972f55164c9900d2951a28 But it didn't work for me initially. URLs for JavaScript were "relative"; it didn't work because JavaScript didn't know "base URL" and tried to access root context instead. It worked for me with explicit (hardcoded) URL prefixing:
Here, "t-portlets-portlet" is explicit context of web application (in my scenario, subfolder in "webapps" with the same name, tomcat/webapps/t-portlets-portlet); "search" is Wicket filter mapping. I am trying to find how to avoid hardcoding... it was initial step to make it working... |
I think "client URL" has incorrect "base URL" settings such as "/web/guest/test" instead of "/t-portlets-portlet/view"; anyway, this works fine for me, with images, CSS, portlet preferences, AJAX, and etc.: package ca.tokenizer.wicket; import javax.servlet.http.HttpServletRequest; import org.apache.wicket.request.Request; public class PortletUrlRenderer extends UrlRenderer
} |
fixed on wicket-6.x, wicket-7.x and master branches |
…meday; wicketstuff#172 Kendo UI: Added KendoDestroyListener and Initializer; wicketstuff#172 Added InputWindow#newFeedbackPanel, having ContainerFeedbackMessageFilter
- extend from AjaxRequestTarget.AbstractListener. So no need to provide empty impls for methods which are not used - remove 'static' for the declaration of IDestroyable interface. It is implied.
The same is achieved now by just using Menu#refresh() because DestroyListener destroys Kendo widgets before re-render them
Hi,
I posted https://issues.apache.org/jira/browse/WICKET-4882 against Wicket. I'm not sure if it is wicket or wicketstuff related problem though.
Thanks
Tomasz
The text was updated successfully, but these errors were encountered: