Hi everybody,

I'm playing with dialogs for my project and ran across 2 problems.

The first is when I have an AjaxLinkSubmit inside a dialog.  When I click on it to send the data to the server and close the dialog, the response tries to connect the link again with dojo, but fails with a bad srcObj error.  I filed a bug on this and attached a possible solution.  My code in the bug description doesn't display nice, sorry. ( http://tacoscomponents.jot.com/BugReporter/Bug117)

The second one is really special.  I have a tab like component that displays other components. The components are defined in other pages, so that any external module can dynamically had a panel to the main component.  In one of the component, I have a dialog, but when I switch to that component, the _javascript_ that initializes the dialog is never generated.  I have the fields of the dialog at the bottom of the screen without any style.  If I hit F5 to refresh the page, the the _javascript_ is generated and it works great. I searched a little bit in the dialog.java code and spotted these lines that seems to cause the problem :

        if ((ajaxRequest && !ajaxr.containsComponentId(getId()))
                || (writer instanceof NullWriter))
            return;
       
        PageRenderSupport pageRenderSupport = TapestryUtils.getPageRenderSupport(cycle, this);
        getScript().execute(cycle, pageRenderSupport, scriptParms);

In my case, I have an ajax request, but the dialog is not in the updateComponents list, since the page calling the update has absolutly no idea that a dialog is contained in the component it is showing.  The condition resolves to true, so the script is never executed.  Sure, a quick fix would be to remove the containsComponentId in the if clause, but I'm afraid there would be major side effects.  Anyone has an idea ?  I will file a bug report on this too, but tomorrow. I'm going to sleep for now...

Frederic


Reply via email to