[Gridsphere-users] Ajax with GS 3.0.8 does not work?

Jason Novotny novotny at gridsphere.org
Mon Mar 17 09:29:28 PDT 2008


Hi Anand,

    I admit the AJAX support is somewhat brittle, it was a decent 
prototype but needs more hardening. It looks like you figured out how 
the tag converts it to an ajz request which the javascript can deal 
with. Now have a look at PortletLayoutEngine#service method. There is 
logic of the form "if (req.getParameter("ajax") != null) {"  that is 
probably where things could be going wrong for you...

    Cheers, Jason

Anand Vaidya wrote:
> I am using the following JSP fragment to test AJAX with Gridsphere 3.0.8 
> (tomcat 5.5.25, JDK 1.5.0_14, Linux x86)
>
> <ui:form>
> <ui:frame>
>
> <!-- copied from docs -->
> <ui:actionsubmit key="myaction"  action="myAction" useAjax="true">
>     <ui:param name="somename" value="avalue"/>
>     <ui:param name="anothername" value="anewvalue"/>
> </ui:actionsubmit><br />
>
> </ui:frame>
> </ui:form>
>
> Upon clicking, I was expecting a long exception report (since the myAction() 
> method is not created yet) but nothing happened.
>
> I added a couple of alert() to the gridsphere_ajax.js, apparently, the ajax 
> request is processed and goes to the servlet (forwarded to gs), then returns 
> to the  ajax:success portion of the JS code , but a null fragment is 
> returned. See below:
>
> 8x--------
> Sending: /gridsphere/gridsphere/?ajax=true&cid=60&
> -----------x8
>
> I think the myAction() is never invoked. 
>
> Removing the useAjax=true , results in the expected behaviour (if myAction() 
> is missing, the portlet crashes, if a myAction() method is added, it executes 
> correctly)
>
> So, where am I going wrong? Can anyone on the list help?
>
> Regards
> Anand
> _______________________________________________
> Gridsphere-users mailing list
> Gridsphere-users at gridsphere.org
> http://lists.gridsphere.org/mailman/listinfo/gridsphere-users
>
>   



More information about the Gridsphere-users mailing list