[jboss-user] [JBoss Seam] - Re: conversationId and IPC Portlets

dcshonda do-not-reply at jboss.com
Tue Jan 22 07:23:30 EST 2008


Hi everyone!

Please, help me. I have a problem with IPC Portlets. I have similar case. 
But my problem is that I cannot rerender portlet B. I have a listener in portlet B, and it works fine. 

My problem is that I have a <h:commandLink ...> in Portlet A, and I want to recibe a data in portlet B, when I push link in portlet A. 

I am really new in JBoss Seam and portlets and I am not very sure, what is wrong...

Portlet A: (BuscadorOperacionesWindow)


  | 
  | <h:dataTable id="tablaOperaciones" value="#{expedientes}" rows="10" class="blue-table" border="1" var="op">
  |    <h:column>
  |        <f:facet name="header">#{messages.expediente}</f:facet>
  |            <h:commandLink value="#{op.operacionId}" action="#gestorexpediente.enviaDatos(op.operacionId)}" >
  |                 <f:param name="datoOp" value="#{op.operacionId}" />   
  |            </h:commandLink>
  |    </h:column>
  |    ...
  | 

Portlet B: (VisorOperacionWindow)


  | <h:panelGrid columns="2">
  |     <h:outputLabel value="#{messages.operacion}"/>
  |     <h:outputLabel id="datoOp"/>
  |     ...
  | 

Listener - Portlet B



  | public class PortletB extends GenericPortlet
  | {
  |     public static class Listener implements PortalNodeEventListener
  |     {
  |         public PortalNodeEvent onEvent(PortalNodeEventContext context, PortalNodeEvent event)
  |         {
  |        	PortalNode node = event.getNode();
  |                 String nodeName = node.getName();
  |              
  |             WindowActionEvent newEvent = null;
  |             
  |             if (nodeName.equals("BuscadorOperacionesWindow") && event instanceof WindowActionEvent)
  |             {
  |             	
  |                 WindowActionEvent wae = (WindowActionEvent) event;
  |                 PortalNode windowB = node.resolve("../VisorOperacionWindow");
  |                 if (windowB != null)
  |                 {
  |                	      newEvent = new WindowActionEvent(windowB);
  |                       newEvent.setMode(wae.getMode());
  |                       newEvent.setWindowState(wae.getWindowState());
  |                 	
  |                       Map parametros = (Map)wae.getParameters();
  |                       for (Iterator keyValuePairs = parametros.entrySet().iterator(); keyValuePairs.hasNext();)
  |                       {
  |                          Map.Entry entry = (Map.Entry) keyValuePairs.next();
  |                          Object key = entry.getKey();
  |                          Object value = entry.getValue();
  |                          if(key.equals("datoOp"))
  |                          {
  |                               HashMap param = new HashMap();
  |                               param.put(key, value);
  |                               newEvent.setParameters(param);
  |                               return newEvent;
  |                          }
  |                       }
  |                   return context.dispatch();
  |                 }
  |             }
  |           return context.dispatch();
  |         }
  |     }
  | }
  | 

Anyone, can give me an example of JSF portlet + IPC + Seam

Thanks very much 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122158#4122158

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122158



More information about the jboss-user mailing list