Wednesday Feb 16, 2011

Portlet Container and JSF Portlet Bridge Projects migrated

The Portlet Container and JSF Portlet Bridge Projects have been migrated from CollabNet hosted infrastructure to Kenai hosted infrastructure.

The new URLs are

Portlet Container Project : http://portlet-container.java.net

JSF Portlet Bridge Project: http://jsfportletbridge.java.net

The previous URLs are being redirected to the new URLs.

All the links and downloads have been appropriately modified. If anything is missing, please let me know. Thanks.


Sunday Oct 19, 2008

JSF portlet and Public Render Parameters

In this blog i will talk about the support for public render parameter (new feature that was added in Portlet 2.0 specification) in the JSF Portlet Bridge.

In JSFPortletBridge version 1.2.3 an enhancement was added to keep track of request scoped information. Check the issue 30 for more details. This feature can be used to support the sharing of render parameters among jsf portlets. I will explain how to do it. The example war and source is referenced at the end.

1. First you need to set the following initialization parameter in the portlet.xml for the portlet that wants to share the render parameter
       <init-param>
            <name>com.sun.faces.portlet.SAVE_REQUEST_SCOPE</name>
            <value>true</value>
        </init-param>      

This causes the form parameters to be set as render parameters. As a result all form parameters are available in the render of the portlet.

2. Now identify the parameter to be shared and specify it in the portlet.xml. Since JSF generates the name, you need to specify the generated name in the portlet.xml..For example consider the following snippet

<f:view>
    <h:form id="helloForm">
        .............
    <h:inputText id="userNo" value="#{UserNumberBean.userNumber}"
             validator="#{UserNumberBean.validate}"/>
    .................
    </h:form>
</f:view>

If you want to share the inputText "userNo", then specify the parameter "helloForm:userNo" as supported-public-render-parameter.

If you notice i have dropped the tag <p:portletPage> . This tag causes the portlet namespace to be prepended to the parameter name. The parameter name will be "portletnamespace:helloForm:userNo". The namespace that is generated by the portlet container will be different in each portal. So i have removed it.

The parameter can be specified in the portlet.xml as follows..
<portlet-app>
    <portlet>
    ...........
        <supported-public-render-parameter>helloForm:userNo</supported-public-render-parameter>
    </portlet>
    <public-render-parameter>
        <identifier>helloForm:userNo</identifier>
        <qname xmlns:x="http://www.sun.com/params">x:userNumber</qname>
    </public-render-parameter>
</portlet-app>


3. If another JSF Portlet also specifies the same parameter as supported-public-render-parameter, then it can access the parameter as

    FacesContext context = FacesContext.getCurrentInstance();
    PortletRequest request = (PortletRequest)context.getExternalContext().getRequest();
    return request.getParameter("helloForm:userNo");

This will return the value entered in the first JSF Portlet.

Deploy the guessnumbersharedportlet.war on OpenPortal Portlet Container 2.0 and see the public render parameter at work. You can check the sources to see how this is done. The sample will work on Project WebSynergy and Liferay Portal also.



Friday Jul 20, 2007

JSF Portlet Bridge in Maven Repository

We now have the JSF Portlet Bridge jars available on the java.net maven2 repository.

Put this in your pom.xml

Under <repositories>

        <repository>
            <id>maven2-repository.dev.java.net</id>
            <name>Java.net Repository for Maven</name>
            <url>https://maven2-repository.dev.java.net/nonav/repository</url>
        </repository>       

Under <dependencies>

      <dependency>
            <groupId>com.sun.faces.portlet</groupId>
            <artifactId>jsf-portlet</artifactId>
            <version>1.2.1</version>
            <scope>compile</scope>
        </dependency> 

The current versions are 1.2.1 and 1.1.5

Whenever the new version is available in JSF Portlet Bridge project site it will also be available via maven2 repository

Wednesday Jul 11, 2007

JSF Portlet Bridge 1.2.1 and 1.1.5 released

We've released the JSF Portlet Bridge 1.2.1 and 1.1.5.

The changelog contains issues resolved as well as any new features added.

If you find any issues or have any feedback for features, etc., please let us know!

To know more about JSF Portlet Bridge you can check the article JavaServer Faces Technology-Based Portlet Bridge

Tuesday Jul 03, 2007

New Contributor to JSF Portlet Bridge Project

The JSF Portlet Bridge Project is making steady progress. Late last year the project released JSF Portlet Bridge 1.2 which enables running JSF 1.2 applications as portlets in the OpenPortal Portlet Container. The project team is currently improving on that implementation.

   I would also like to welcome a new member to the project -- A. Alonso Dominguez, from Social Labs NetSolutions.  He is actively contributing for the implementation of JSR 301 in the project. JSR 301 is the Portlet Bridge Specification for JavaServer Faces Technology. It standardizes the behaviour of bridge implementations to ensure true interoperability for JSF artifacts. See the JSF Portlet Bridge Project for more details.

Thursday Jun 28, 2007

JSF Portlet Bridge Article

Marina and I just published an article on JSF Portlet Bridge titled:

Open-Source Portal Initiative at Sun, Part 5: JavaServer Faces Technology-Based Portlet Bridge.

The JSF Portlet Bridge Project is developing a JSF portlet integration library with which you can run and deploy JavaServer Faces technology-based applications as JSR 168-complaint portlets.

This article describes its design and binary, the procedure for modifying JSF applications to comply with JSR 168(illustrated by a sample application), and the tag library.

 

About

Deepak Gothe

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today