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

  • Javascipt is not work in spring portlet mvc

    Hi,
    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:
    forum.springframework.org/showthread.php?t=59196
    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:
    CommonComponentView.jsp:
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ include file="/WEB-INF/include/portletDefineObjects.jsp" %>
    <%@ taglib prefix="form" uri="www.springframework.org/tags/form" %>
    <%@ taglib uri="java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
    <%@ taglib uri="java.sun.com/jsp/jstl/core" prefix="c" %>
    <%--<%@ taglib uri="java.sun.com/portlet" prefix="portlet" %>--%>
    <%--<portlet:defineObjects/>--%>
    <html>
    <head>
    <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());
    }
    </script>
    </head>
    <body>
    Ö...
    </body>


    portletDefineObjects.jsp:
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ taglib uri="java.sun.com/portlet" 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.

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

  • #2
    111111111111111111111111111111111111

    11111111111111111111111111111111111111111111]11111111111111111111111
    ]11111111111111111111111111111111111111111111111111 111:d

    Comment


    • #3
      Brass air fittings

      Now that is a lot of brass air fittings http://www.liangdianup.com/subpages/airfitting_1.htm 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.

      Comment


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

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

        Comment


        • #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.

          http://forum.springsource.org/showth...d=1#post237918

          Thanks,
          anita

          Comment

          Working...
          X