dev@javaserverfaces.java.net

How to pass parameters to a jsp page via a portlet ?

From: baptiste <baptiste_prieur_at_yahoo.fr>
Date: Sat, 27 Jan 2007 06:18:47 -0800 (PST)

Hi,
I use portlet and JSF technologies.

I wish to pass parameters to a jsp page via a portlet ...

I declare a portlet in portlet.xml file :

<?xml version="1.0" encoding="UTF-8"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd
http://java.sun.com/xml/ns/portlet/port … .xsd" version="1.0">

<portlet>
<portlet-name>maPortlet</portlet-name>
<portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
<init-param>
<name>default-view</name>
<value>jsp/home.jsp</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
</supports>
<portlet-info>
<title>jsf</title>
</portlet-info>
</portlet>
</portlet-app>


I want to pass parameters to jsp page : home.jsp
And with these parameters I want to initialize attributes of a managed bean.
Thus, I declare in a faces-config.xml file a managed bean and I precise
parameters :

<managed-bean>
...
<managed-property>
<property-name>property</property-name>
<property-class>java.lang.String</property-class>
<value>#{param.param1}</value>
</managed-property>
</managed-bean>

The managed bean must be initialized with parameters

In brief, I dont know how to pass parameters to a jsp page via a portlet in
order to initialize managed bean with parameters ?
If somebody know the solution, can you give me some instructions in order to
sovle my problem..

Thanks you.

Baptiste
-- 
View this message in context: http://www.nabble.com/How-to-pass-parameters-to-a-jsp-page-via-a-portlet---tf3127809.html#a8666289
Sent from the javaserverfaces dev mailing list archive at Nabble.com.