I am in the process of migrating our portlets from Jetspeed 2.1.3 and Wicket 1.3.7 to Jetspeed 2.2.0 and Wicket 1.4.

I have used the j2-admin portlets as an example to learn from. I've created a new portlet from scratch to test with. This portlet contains a LinkTree and AjaxTabbedPanel. These two components are used in the Portal Site Manager admin portlet and everything works fine in regards to the AJAX requests. In my test portlet the AJAX requests cause a full page refresh and change the browser URL to something like

http://localhost:8010/jetspeed/portal/ _ns:YWpzbWluLTN8YzB8ZDB8ZV93dXZpZXc9MT0vYWpheFRlc3QvP3JhbmRvbVxcPTAuMjg1NjEyMDI0ODc5Nzc1 /default-page.psml

from the original

http://localhost:8010/jetspeed/portal/default-page.psml

The Wicket debug window gets as far as invoking the precall handlers but on the doGet function's t.send(null); function call, everything seems to go wrong and I get a new page with the ugly URL.

This doesn't happen in the Jetspeed admin portlets but I cannot for the life of me figure out what I have done incorrectly.

My portlet.xml looks like this:

        <portlet id="ajaxTest">
            <description>Ajax Test</description>
            <portlet-name>AjaxTest</portlet-name>
            <display-name> Ajax Test</display-name>
<portlet- class>org.apache.wicket.protocol.http.portlet.WicketPortlet</portlet- class>
            <init-param>
              <name>wicketFilterPath</name>
              <value>/ajaxTest</value>
            </init-param>
            <init-param>
              <name>editPage</name>
              <value>/ajaxTest/edit</value>
            </init-param>
            <expiration-cache>0</expiration-cache>
            <supports>
                <mime-type>*/*</mime-type>
                <portlet-mode>view</portlet-mode>
                <portlet-mode>edit</portlet-mode>
            </supports>
            <portlet-info>
                <title>Michael's Ajax Test</title>
                <short-title>AjaxTest</short-title>
                <keywords>mth1,ajax,test</keywords>
            </portlet-info>
        </portlet>

And my web.xml looks like this:

    <filter>
      <filter-name>AjaxTest</filter-name>
<filter-class>org.apache.wicket.protocol.http.WicketFilter</ filter-class>
      <init-param>
        <param-name>applicationClassName</param-name>
        <param-value>mth1.wicket.ajax.AjaxTestApplication</param-value>
      </init-param>
    </filter>

    <filter-mapping>
      <filter-name>AjaxTest</filter-name>
      <url-pattern>/ajaxTest/*</url-pattern>
      <dispatcher>REQUEST</dispatcher>
      <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>

I also have the context.xml in META-INF set to crossContext="true".

I don't know if my problem lies in Jetspeed land or Wicket land, but seeing as how Jetspeed uses Wicket now and the AJAX in those portlets seem to work fine, I am hoping someone who developed these portlets will be able to give me some hint. I am at my wits end...

Any help is appreciated!

Thanks,
Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to