Skip to main content

curious problem with dcontainer setInclude

1 reply [Last post]
Joined: 2008-10-27
Points: 0

Am I doing something dumb here?

I have an ajax command that returns a text string of a jsp page name to display in a dcontainer.
the setInclude and the evaluate in the glue all work because if I pass back
somepage.jsp, then the page is loaded.
I need to pass the jsp page a bean reference to load data from, but I can't do this if the include does a GET.
I tried returning "servletref?page=somepage" so I can forward in the servlet passing the request bean, but nothing at all seems to work starting with "servletref", even just "servletref". This is the same servletref that is used elsewhere in the page to populate comboboxes using ajax, so I'm sure it is valid.

The server never sees the request for the servlet at all, yet the jsp page is always requested.

I've traced the code down into where it does a .src= on some object I think, but nothing happens, no error message, no trace output or log. zip.

Is there an obvious mistake? A less complex method of passing a bean reference to the thing having setInclude done on it?
Currently my only alternative is a session bean in the JSP.

Any suggestions welcome.

Here is the glue code

jmaki.subscribe("/cb/getDfpFormats/*", function(args) {
var format = args.value;
jmaki.doAjax({method: "POST",
url: "formatSettingsAjax?format="+ encodeURIComponent(format),
callback: function(_req) {
var tmp = _req.responseText;
var obj = eval("({targetId:'contentpane', value : 'formatSettingsAjax?page="+ encodeURIComponent(tmp) + "'})");
jmaki.publish('/jmaki/dcontainer/setInclude', obj);
// error handler?


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2008-10-27
Points: 0

ok. found it.

The servlet was based on carla's blog about interacting combo boxes, which use 'post' to get the data with ajax , and I am using 'get' and of course there is
no code in servlet. no action.

thanks for anyone who looked.