Tapestry EventListener annotations produce incorrect bind URLs in portal context
--------------------------------------------------------------------------------
Key: TAPESTRY-2587
URL: https://issues.apache.org/jira/browse/TAPESTRY-2587
Project: Tapestry
Issue Type: Bug
Components: Portlet
Affects Versions: 4.1.5, 4.1.3, 4.1.2, 4.1.1, 4.1
Environment: Windows XP
Reporter: Daniel Watson
The javascript rendered by the Body component for a standard element event
listener:
<script type="text/javascript"><!--
tapestry.addOnLoad(function(e) {
tapestry.cleanConnect("testElement", "onclick",
"event2061605841");
tapestry.event2061605841=function(e){
var content={beventname:"onclick"};
tapestry.event.buildEventProperties(e, content,
arguments);
if (!content["beventtarget.id"])
content["beventtarget.id"]="testElement";
tapestry.bind("/email-portlet/app?page=AliasList&service=directevent", content);
};
tapestry.connect("testElement", "onclick", "event2061605841");
});
// --></script>
...Is rendered incorrectly in a *portal* context. More specifically the URL
passed to the tapestry.bind(...) call is not the URL of the web-app, but the
current URL of the portal.
For example in a java portal container the above code contains will use a URL
like...
http://localhost:8080/portletdriver/dt?[...removed portal
crap...]&page=AliasList&service=directevent
...which obviously never reaches the tapestry event listener.
Im guessing that component,rather than element, EventListeners experience the
same problem.
So far I know that manually (as in - hard coding) the javascript with the
correct URL into the template makes the event listener work. I realize this is
in no way suitable, and it was only for testing purposes. If someone could
shed a little light on the javascript rendering process for EventListener
annotations I think can write a more permanent fix that renders the correct URL
in a portal context.
Specifically... where in the tapestry source does this script get generated?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]