English 中文(简体)
ICEFaces + Liferay : how to set value for public-render-parameter
原标题:

ICEFaces + Liferay : I created two war file firstApp.war and secondApp.war file and deployed on liferay. I want to implement, when I click submit button on firstApp.war application’s page , firstAppBacking bean should set some value in public-render-parameter so that I can get that value in secondApp.war application something like IPC. Please sugeest me how can i set the valiue in firstAppText.

<portlet-app ....>
<portlet>
    <portlet-name>firstApp</portlet-name>
    <display-name>First App</display-name>
    <portlet-class>com.icesoft.faces.webapp.http.portlet.MainPortlet</portlet-class>
    <init-param>
        <name>com.icesoft.faces.VIEW</name>
        <value>/jsp/firstApp.iface</value>
    </init-param>
    ....
    **<supported-public-render-parameter>firstAppText</supported-public-render-parameter>**
</portlet>
<public-render-parameter>
    <identifier>firstAppText</identifier>
    <qname xmlns:x="http://www.liferay.com/public-render-parameters">x:firstAppText</qname>
</public-render-parameter>

问题回答

There are several ways to do that. First of all, the basic concepts are well described here.

As you can see, you can share data in different "contexts". One way is to share the data via the session by declaring shared-portlet-session-attribute in portlet.xml, e.g.

<shared-portlet-session-attribute> 
   <name>someName</name>
   <java-class>com.some.class</java-class>
<shared-portlet-session-attribute>

Other ways to share data are: - PortletSession - PortletContext - Page Parameters - Portlet Events

The different ways are described in this book. I haven t yet tried all of them, therefore I cannot give more details now.





相关问题
Portlet Data sharing using liferay and icefaces

I am using liferay 1.8.2 and liferay 5.2. I have many portlets in different war files and I tried the examples in the liferay docs as to how to share data between differenet portlets across multiple ...

Icefaces: Network Connection Timeouts in IE only

My application has a long running request that takes over a minute. If I m using Chrome or Firefox I just need to be patient. If I use IE however, at the one minute mark I get the popup that says I ...

Escapse url GET parameters in URL with Java/ICEFaces

I have a JAVA with JSF/ICEFaces application. I need to pass parameters from one page to another so I user something like: <f:param name="eventName" value="#{item.event_name}" /> And then get ...

Unit testing icefaces

Can you separate components of an IceFaces application so they can be tested in isolation instead of using something like Selenium or HttpUnit on the assembled application? Backing beans can be ...

Setting floating point formatting locale for JSF / ICEfaces?

I am writing a JSF (ICEfaces) application using resource bundles to handle internationalisation. The application nicely applies the (default) Dutch "nl" locale for the resource bundle but fails to ...

ICEFaces inputFile getting the file content without upload

Is there any way of just getting the content of the browsed file without any upload/file transfer operations? I currently use ICEFaces inputFile component but I do not need the default uploading ...

热门标签