Announcement Announcement Module
No announcement yet.
Javascipt is not work in spring portlet mvc Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Javascipt is not work in spring portlet mvc

    Iím developing a Portlet with Spring 2.5.5(tried Spring 2.0), I success in registering the portlet in liferay5.1.2 with tomcat5.5. In this application, I want to launch a popup window from my portlet and manage it with a Spring MVC controller of this portlet. I have read many related paper in spring community and liferay community. I find a good reference:
    the author provides a solution for us:
    PortletURL popUpURL = response.createRenderURL();
    popUpURL.setParameter("action", "popUpController");
    popUpURL.setParameter("windowState",LiferayWindowS tate.EXCLUSIVE.toString());

    unfortunately, above javascript segment canít work well in my environment. The IE6 always says Ďline 492: ; is expectedí, I debug and find line 492 is
    PortletURL popUpURL = response.createRenderURL();
    Further debugging, I find IE6 canít recognize PortletURL and response. Bisides, I find IE6 canít recognize renderRequest and renderResponse, thought I add some common required code into the jsp header.

    So my question is:
    1) Whatís wrong with my configuration?
    2) Why the javascript(liferay-portal-tomcat-6.0-5.1.2\webapps\ROOT\html\js) canít work well? But my own javascript(such as dtree.js below) can work well.
    3) Are these problems related to Spring Portlet MVC?

    Two jsp pages in my application as follows:
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ include file="/WEB-INF/include/portletDefineObjects.jsp" %>
    <%@ taglib prefix="form" uri="" %>
    <%@ taglib uri="" prefix="fmt" %>
    <%@ taglib uri="" prefix="c" %>
    <%--<%@ taglib uri="" prefix="portlet" %>--%>
    <script src="/inp/script/jquery-1.2.6.js" type="text/javascript"></script>
    <script src="/inp/script/ui.core.js" type="text/javascript"></script>
    <script src="/inp/script/ui.tabs.js" type="text/javascript"></script>
    <script src="/inp/script/dtree.js" type="text/javascript"></script>
    <script src="/inp/script/liferay/popup.js" type="text/javascript"></script>
    <script type="text/javascript">
    function SetCurrentSelect(fragmentnum,navigation_type_sid,n avigation_sid){
    var nodePath=eval("d"+fragmentnum).getNodePath(navigat ion_sid);
    document.all.bread.innerText = nodePath;
    PortletURL popUpURL = response.createRenderURL();
    popUpURL.setParameter("action", "popUpController");
    popUpURL.setParameter("windowState", LiferayWindowState.EXCLUSIVE.toString());

    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ taglib uri="" prefix="portlet" %>
    <%@ page import="javax.portlet.RenderRequest"%>
    <%@ page import="javax.portlet.RenderResponse"%>
    <%@ page import="javax.portlet.PortletConfig"%>
    RenderRequest renderRequest = (RenderRequest)request.getAttribute("javax.portlet .request");
    RenderResponse renderResponse = (RenderResponse)request.getAttribute("javax.portle t.response");
    PortletConfig portletConfig = (PortletConfig)request.getAttribute("javax.portlet .config");
    <portlet:defineObjects />

    Thanks in advance.

    Last edited by boocheen; Feb 23rd, 2009, 02:33 AM.

  • #2

    ]11111111111111111111111111111111111111111111111111 111:d


    • #3
      Brass air fittings

      Now that is a lot of brass air fittings there is just about every type
      of air fitting that you could want. Wholesale prices too. I guess these could be used as small water pipe fitting also. I
      used some of the parts to make my babington wvo burner.


      • #4
        I have no idea about this problem now. Perhaps, I ignore some important configuration in this application. Please give me some effective suggestions.

        Last edited by boocheen; Feb 23rd, 2009, 02:35 AM.


        • #5
          Hello Boocheen,
          I'm also creating a portlet using Spring 2.5.5 and liferay 5.1.2
          I'm having a problem getting my success view controller to work. I've posted a thread on fourm but still no concrete answer. I'm attaching here my post link, if you can have a look and point out what I'm doing is wrong.