| Issue 231: | Javascript API has no knowledge of table's context path | |
| 1 person starred this issue and may be notified of changes. | Back to list |
I have the following scenario... * Page URL has one context path (in this case, http://myserver.net/myportal/etc.../) * JMesa table resides in an application under another context path (i.e., http://myserver.net/myapp) The application with the table is included in the page via cross-context dispatching, so the browser only sees the page URL. This causes the following POST in submitWsColumn to fail: $.post('jmesa.wrk?', eval('(' + data + ')'), function(data) {}); My fix for this was to make HtmlSnippetsImpl extend from AbstractContextSupport so that it has access to the WebContext. Then, if the web context is set on the snippets, the following line is output from initJavaScriptLimit: jQuery.jmesa.setContextPath('myTableId','/myapp') I made modifications to jquery.jmesa.js to support setContextPath() and getContextPath() on a per-table basis. Finally, if the context path has indeed been set via initJavaScriptLimit(), that value is prepended in submitWsColumn. Otherwise the old behavior is used. These changes should be 100% backwards compatible. Please let me know if this is a good solution, or if I should try something else. Patch is attached.
Nov 27, 2009
Thank you! I did not notice that you posted the patch here...I will get this in. I will also do a release fairly soon. There is a language patch that was sent to me that I want to release as well.
Status:
Accepted
Nov 27, 2009
Have the patch applied now.
Mar 9, 2011
(No comment was entered for this change.)
Status:
Fixed
|
9.0 KB View Download