Announcement Announcement Module
Collapse
No announcement yet.
page rendering issue - Spring in weblogic Portal. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • page rendering issue - Spring in weblogic Portal.

    Hi,

    I am trying to rendering the page from index.jsp by clicking respective hyper links.

    index.jsp

    <%@ include file="/WEB-INF/jsp/include.jsp" %>

    <div class="portlet-section-header">Testing Spring..</div>

    <div class="portlet-section-body">
    <a href="<portlet:renderURL> <portletaram name="action" value="submitempinfo" />
    </portlet:renderURL>" > Click Action URL</a>
    </div>

    SpringPortal_portlet.xml file has references like below

    <bean id="submitEmployeeInformation" class="com.jpmorgan.employee.controller.SubmitEmpl oyeeInformation" parent="employeeControllerTemplate">
    <property name="sessionForm" value="true"/>
    <property name="commandName" value="employee"/>
    <property name="commandClass" value="com.jpmorgan.employee.model.Employee"/>
    <property name="formView" value="EmployeeInfo"/>
    <property name="successView" value="Success"/>
    <property name="validator" ref="empValidator" />
    </bean>

    <!-- URL mappings Start-->
    <bean id="portletModeParameterHandlerMapping" class="org.springframework.web.portlet.handler.Por tletModeParameterHandlerMapping">
    <property name="interceptors">
    <list>
    <ref bean="parameterMappingInterceptor"/>
    </list>
    </property>
    <property name="portletModeParameterMap">
    <map>
    <entry key="view">
    <map>
    <entry key="employeeMain"><ref bean="employeeMainController"/></entry>
    <entry key="showempinfo"><ref bean="showEmployeeInformation"/></entry>
    <entry key="submitempinfo"><ref bean="submitEmployeeInformation"/></entry>
    <!-- <entry key="view"><ref bean="viewController" /> </entry>-->
    </map>
    </entry>
    </map>
    </property>
    </bean>

    When i click the link; i am expecting the submitempinfo bean should be called and it should display the respective form "EmployeeInfo".

    But it is not displaying anything; staying in the index.jsp only.

    All the beans are successfully deployed.

    Help me.

    Thanks,
    Lakshmi.

  • #2
    Hi,

    Firstly, please use the code tags, its makes your listings easier to read.

    Which controller serves index.jsp? I don't see any mapping to serve the default view for the portlet, so where is this coming from?

    Chris

    Comment


    • #3
      Hi,

      I have view controller definition that will load my index.jsp.

      Code:
      <bean id="employeeMainController" class="com.jpmorgan.employee.controller.EmployeeMainController" parent="employeeControllerTemplate">
      </bean>
      
      <bean id="portletModeHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping">
              <property name="order" value="20"/>
      		<property name="interceptors">
      			<list>
      			</list>
      		</property>
      		<property name="portletModeMap">
      			<map>
      				<entry key="view"><ref bean="employeeMainController"/></entry>
      			</map>
      		</property>
      	</bean>
      And EmployeeMainController will bring up the index.jsp.

      Code:
      public class EmployeeMainController extends AbstractController {
      
          @Override
      	public ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response) {
      
              //return new ModelAndView("index");
              return new ModelAndView("index");
              
      	}
         
      }
      Please let me know if you need any more information.

      Thanks,
      Lakshmi

      Comment


      • #4
        Originally posted by laknarayan View Post
        Hi,

        I have view controller definition that will load my index.jsp.

        Code:
        <bean id="portletModeHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping">
                <property name="order" value="20"/>
        		<property name="interceptors">
        			<list>
        			</list>
        		</property>
        		<property name="portletModeMap">
        			<map>
        				<entry key="view"><ref bean="employeeMainController"/></entry>
        			</map>
        		</property>
        	</bean>
        Ok, makes more sense now. This mapping is being applied before your other mapping, so all requests when the portlet is in the view mode will go to employeeMainController (since this mapping is applied first and it defines employeeMainController to handle all view requests). Add the order property to your other mapping with a lower value than 20 to ensure it applies BEFORE this mapping.
        Last edited by cmelgar; Sep 3rd, 2008, 06:22 PM. Reason: fix typo

        Comment

        Working...
        X